async function main() {
  // -i being the name of the .code file (i.e., 'ft-mint')
  const { i } = argv;
  // eslint-disable-next-line no-unneeded-ternary
  const suppress = argv.s ? true : false;

  if (!i) {
    console.log(
      "The '-i' option has not been specified.\nThat's OK, we can go ahead and loop through every .code file.\nHOWEVER, if you wanted to choose just one file, cancel this process, and instead use option -i (see the README-trusted-setup)",
    );
    console.log('Be warned, this could take up to an hour!');

    const carryOn = await inquirer.prompt([
      {
        type: 'yesno',
        name: 'continue',
        message: 'Continue?',
        choices: ['y', 'n'],
      },
    ]);
    if (carryOn.continue !== 'y') return;

    try {
      await runSetupAll(`${process.cwd()}/code/gm17`, suppress); // we'll do all .code files if no option is specified
    } catch (err) {
      throw new Error(`Trusted setup failed: ${err}`);
    }
  } else {
    await runSetup(`${process.cwd()}/code/${i}`, suppress);
  }
}
/**
 * Trusted setup for Nightfall. Either compiles all directories in /code/gm17, or a single directory using the -i flag.
 */
Trusted setup for Nightfall. Either compiles all directories in /code/gm17, or a single directory using the -i flag.
Trusted setup for Nightfall . Either compiles all directories in / code / gm17 or a single directory using the - i flag .
async function main() {
  const { i } = argv;
  const suppress = argv.s ? true : false;
  if (!i) {
    console.log(
      "The '-i' option has not been specified.\nThat's OK, we can go ahead and loop through every .code file.\nHOWEVER, if you wanted to choose just one file, cancel this process, and instead use option -i (see the README-trusted-setup)",
    );
    console.log('Be warned, this could take up to an hour!');
    const carryOn = await inquirer.prompt([
      {
        type: 'yesno',
        name: 'continue',
        message: 'Continue?',
        choices: ['y', 'n'],
      },
    ]);
    if (carryOn.continue !== 'y') return;
    try {
      await runSetupAll(`${process.cwd()}/code/gm17`, suppress); 
    } catch (err) {
      throw new Error(`Trusted setup failed: ${err}`);
    }
  } else {
    await runSetup(`${process.cwd()}/code/${i}`, suppress);
  }
}
async function main ( ) { const { i } = argv ; const suppress = argv . s ? true : false ; if ( ! i ) { console . log ( "The '-i' option has not been specified.\nThat's OK, we can go ahead and loop through every .code file.\nHOWEVER, if you wanted to choose just one file, cancel this process, and instead use option -i (see the README-trusted-setup)" , ) ; console . log ( 'Be warned, this could take up to an hour!' ) ; const carryOn = await inquirer . prompt ( [ { type : 'yesno' , name : 'continue' , message : 'Continue?' , choices : [ 'y' , 'n' ] , } , ] ) ; if ( carryOn . continue !== 'y' ) return ; try { await runSetupAll ( ` ${ process . cwd ( ) } ` , suppress ) ; } catch ( err ) { throw new Error ( ` ${ err } ` ) ; } } else { await runSetup ( ` ${ process . cwd ( ) } ${ i } ` , suppress ) ; } }
Trusted setup for Nightfall.
Trusted setup for Nightfall .
// -i being the name of the .code file (i.e., 'ft-mint') // eslint-disable-next-line no-unneeded-ternary // we'll do all .code files if no option is specified