Home / Function/ run() — react Function Reference

run() — react Function Reference

Architecture documentation for the run() function in prompt-for-otp.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  549aead2_3e41_bfc6_2104_90c31ed88345["run()"]
  1daaf3be_e97f_4dd5_b378_576f5df2611a["prompt-for-otp.js"]
  549aead2_3e41_bfc6_2104_90c31ed88345 -->|defined in| 1daaf3be_e97f_4dd5_b378_576f5df2611a
  style 549aead2_3e41_bfc6_2104_90c31ed88345 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/scripts/release/prompt-for-otp.js lines 11–22

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.)
    }
  }
};

Domain

Subdomains

Frequently Asked Questions

What does run() do?
run() is a function in the react codebase, defined in compiler/scripts/release/prompt-for-otp.js.
Where is run() defined?
run() is defined in compiler/scripts/release/prompt-for-otp.js at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free