{"version":3,"sources":["jsdelivr-header.js","/npm/@feathersjs/cli@5.0.50/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,UAAW,eACT,YAAe,mBACf,YAAe,cACf,aAAc,WAAY,YAAe,gCACzC,kBAAqB,oBACrB,KAAK,mBACL,OACT,MAAM,QAAU,0BAA0B,YACnC,MAAM,cAAiB,GAAS,MAAO,IAC1C,MAAM,EAAS,QAAQ,QAAQ,QAAQ,2BACjC,EAAM,WAAW,IAChB,UAED,QAAQ,QAAQ,GACjB,KAAK,aAAa,EAAQ,EAAM,aAChC,MAAO,IACR,MAAM,OAAE,GAAW,EAAI,OACvB,EAAO,MAAM,UAAU,MAAM,MAAM,EAAM,sBAG1C,MAAM,QAAU,IAAI,QAC3B,QACK,KAAK,YACL,YAAY,2CACZ,QAAQ,SACR,qBACL,MAAM,SAAW,QAAQ,QAAQ,YAAY,MAAM,KACnD,SACK,QAAQ,OACR,YAAY,8BACZ,OAAO,gBAAiB,+BACxB,OAAO,cAAc,QAC1B,SACK,QAAQ,WACR,YAAY,0BACZ,OAAO,gBAAiB,oBACxB,OAAO,gBAAiB,uCACxB,OAAO,gBAAiB,4CACxB,OAAO,cAAc,YAC1B,SACK,QAAQ,QACR,YAAY,mBACZ,OAAO,gBAAiB,wBACxB,OAAO,gBAAiB,qCACxB,OAAO,cAAc,SAC1B,SACK,QAAQ,cACR,YAAY,iCACZ,OAAO,cAAc,eAC1B,SACK,QAAQ,kBACR,YAAY,yCACZ,OAAO,cAAc,mBAC1B,SAAS,YAAY,6CAA6C,SAAS,SACtE,IAAK,GAAQ,GAAG,MAAM,KAAK,EAAI,YAAY,EAAI,kBAC/C,KAAK","file":"/npm/@feathersjs/cli@5.0.50/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@feathersjs/cli@5.0.50/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import chalk from 'chalk';\nimport { Command } from 'commander';\nimport { dirname } from 'path';\nimport { runGenerator, getContext, version } from '@feathersjs/generators';\nimport { createRequire } from 'node:module';\nexport * from 'commander';\nexport { chalk };\nconst require = createRequire(import.meta.url);\nexport const commandRunner = (name) => async (options) => {\n    const folder = dirname(require.resolve('@feathersjs/generators'));\n    const ctx = getContext({\n        ...options\n    });\n    await Promise.resolve(ctx)\n        .then(runGenerator(folder, name, 'index.js'))\n        .catch((error) => {\n        const { logger } = ctx.pinion;\n        logger.error(`Error: ${chalk.white(error.message)}`);\n    });\n};\nexport const program = new Command();\nprogram\n    .name('feathers')\n    .description('The Feathers command line interface 🕊️')\n    .version(version)\n    .showHelpAfterError();\nconst generate = program.command('generate').alias('g');\ngenerate\n    .command('app')\n    .description('Generate a new application')\n    .option('--name <name>', 'The name of the application')\n    .action(commandRunner('app'));\ngenerate\n    .command('service')\n    .description('Generate a new service')\n    .option('--name <name>', 'The service name')\n    .option('--path <path>', 'The path to register the service on')\n    .option('--type <type>', 'The service type (knex, mongodb, custom)')\n    .action(commandRunner('service'));\ngenerate\n    .command('hook')\n    .description('Generate a hook')\n    .option('--name <name>', 'The name of the hook')\n    .option('--type <type>', 'The hook type (around or regular)')\n    .action(commandRunner('hook'));\ngenerate\n    .command('connection')\n    .description('Add a new database connection')\n    .action(commandRunner('connection'));\ngenerate\n    .command('authentication')\n    .description('Add authentication to the application')\n    .action(commandRunner('authentication'));\ngenerate.description(`Run a generator. Currently available: \\n  ${generate.commands\n    .map((cmd) => `${chalk.blue(cmd.name())}: ${cmd.description()} `)\n    .join('\\n  ')}`);\n"]}