Home / File/ prompt-for-otp.js — react Source File

prompt-for-otp.js — react Source File

Architecture documentation for prompt-for-otp.js, a javascript file in the react codebase.

Entity Profile

Relationship Graph

Source Code

#!/usr/bin/env node

'use strict';

const prompt = require('prompt-promise');
const theme = require('../theme');

const run = async () => {
  while (true) {
    const otp = await prompt('NPM 2-factor auth code: ');
    prompt.done();

    if (otp) {
      return otp;
    } else {
      console.log();
      console.log(theme.error`Two-factor auth is required to publish.`);
      // (Ask again.)
    }
  }
};

module.exports = run;

Domain

Subdomains

Functions

Frequently Asked Questions

What does prompt-for-otp.js do?
prompt-for-otp.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in prompt-for-otp.js?
prompt-for-otp.js defines 1 function(s): run.
Where is prompt-for-otp.js in the architecture?
prompt-for-otp.js is located at scripts/release/publish-commands/prompt-for-otp.js (domain: BabelCompiler, subdomain: Optimization, directory: scripts/release/publish-commands).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free