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
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const prompt = require('prompt-promise');

const run = async () => {
  while (true) {
    const otp = await prompt('NPM 2-factor auth code: ');
    prompt.done();
    if (otp) {
      return otp;
    } else {
      console.error('\nTwo-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 compiler/scripts/release/prompt-for-otp.js (domain: BabelCompiler, subdomain: Optimization, directory: compiler/scripts/release).

Analyze Your Own Codebase

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

Try Supermodel Free