Files
Fluxup_PAP/node_modules/@expo/cli/build/bin/cli.map
2026-03-10 16:18:05 +00:00

1 line
15 KiB
Plaintext
Executable File

{"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport Debug from 'debug';\nimport { boolish } from 'getenv';\n\nimport { installEventLogger } from '../src/events';\n\n// Setup event logger output\n// NOTE: Done before any console output\ninstallEventLogger();\n\n// Check Node.js version and issue a loud warning if it's too outdated\n// This is sent to stderr (console.error) so it doesn't interfere with programmatic commands\nconst NODE_MIN = [20, 19, 4];\nconst nodeVersion = process.version?.slice(1).split('.', 3).map(Number);\nif (nodeVersion[0] < NODE_MIN[0] || (nodeVersion[0] === NODE_MIN[0] && nodeVersion[1] < NODE_MIN[1])) {\n console.error(\n chalk.red`{bold Node.js (${process.version}) is outdated and unsupported.}`\n + chalk.red` Please update to a newer Node.js LTS version (required: >=${NODE_MIN.join('.')})\\n`\n + chalk.red`Go to: https://nodejs.org/en/download\\n`\n );\n}\n\n// Setup before requiring `debug`.\nif (boolish('EXPO_DEBUG', false)) {\n Debug.enable('expo:*');\n} else if (Debug.enabled('expo:')) {\n process.env.EXPO_DEBUG = '1';\n}\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n // NOTE(EvanBacon): Ensure every bundler-related command sets `NODE_ENV` as expected for the command.\n run: () => import('../src/run/index.js').then((i) => i.expoRun),\n 'run:ios': () => import('../src/run/ios/index.js').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android/index.js').then((i) => i.expoRunAndroid),\n start: () => import('../src/start/index.js').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild/index.js').then((i) => i.expoPrebuild),\n config: () => import('../src/config/index.js').then((i) => i.expoConfig),\n export: () => import('../src/export/index.js').then((i) => i.expoExport),\n 'export:web': () => import('../src/export/web/index.js').then((i) => i.expoExportWeb),\n 'export:embed': () => import('../src/export/embed/index.js').then((i) => i.expoExportEmbed),\n\n serve: () => import('../src/serve/index.js').then((i) => i.expoServe),\n\n // Auxiliary commands\n install: () => import('../src/install/index.js').then((i) => i.expoInstall),\n add: () => import('../src/install/index.js').then((i) => i.expoInstall),\n customize: () => import('../src/customize/index.js').then((i) => i.expoCustomize),\n lint: () => import('../src/lint/index.js').then((i) => i.expoLint),\n\n // Auth\n login: () => import('../src/login/index.js').then((i) => i.expoLogin),\n logout: () => import('../src/logout/index.js').then((i) => i.expoLogout),\n register: () => import('../src/register/index.js').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami/index.js').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n // NOTE(EvanBacon): This is here to silence warnings from processes that\n // expect the global expo-cli.\n '--non-interactive': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\nif (args['--non-interactive']) {\n console.warn(chalk.yellow` {bold --non-interactive} is not supported, use {bold $CI=1} instead`);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n add,\n export: _export,\n config,\n customize,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n // NOTE(EvanBacon): Don't document this command as it's a temporary\n // workaround until we can use `expo export` for all production bundling.\n // https://github.com/expo/expo/pull/21396/files#r1121025873\n 'export:embed': exportEmbed_unused,\n // The export:web command is deprecated. Hide it from the help prompt.\n 'export:web': exportWeb_unused,\n // Other ignored commands, these are intentially not listed in the `--help` output\n run: _run,\n // NOTE(cedric): Still pending the migration to ESLint's flat config\n lint: _lint,\n serve,\n // All other commands\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, export: _export, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n ${Object.keys({ install, customize, config, serve }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n\n process.exit(0);\n}\n\n// NOTE(EvanBacon): Squat some directory names to help with migration,\n// users can still use folders named \"send\" or \"eject\" by using the fully qualified `npx expo start ./send`.\nif (!isSubcommand) {\n const migrationMap: Record<string, string> = {\n init: 'npx create-expo-app',\n eject: 'npx expo prebuild',\n web: 'npx expo start --web',\n 'start:web': 'npx expo start --web',\n 'build:ios': 'eas build -p ios',\n 'build:android': 'eas build -p android',\n 'client:install:ios': 'npx expo start --ios',\n 'client:install:android': 'npx expo start --android',\n doctor: 'npx expo-doctor',\n upgrade: 'https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/',\n 'customize:web': 'npx expo customize',\n\n publish: 'eas update',\n 'publish:set': 'eas update',\n 'publish:rollback': 'eas update',\n 'publish:history': 'eas update',\n 'publish:details': 'eas update',\n\n 'build:web': 'npx expo export:web',\n\n 'credentials:manager': `eas credentials`,\n 'fetch:ios:certs': `eas credentials`,\n 'fetch:android:keystore': `eas credentials`,\n 'fetch:android:hashes': `eas credentials`,\n 'fetch:android:upload-cert': `eas credentials`,\n 'push:android:upload': `eas credentials`,\n 'push:android:show': `eas credentials`,\n 'push:android:clear': `eas credentials`,\n url: `eas build:list`,\n 'url:ipa': `eas build:list`,\n 'url:apk': `eas build:list`,\n webhooks: `eas webhook`,\n 'webhooks:add': `eas webhook:create`,\n 'webhooks:remove': `eas webhook:delete`,\n 'webhooks:update': `eas webhook:update`,\n\n 'build:status': `eas build:list`,\n 'upload:android': `eas submit -p android`,\n 'upload:ios': `eas submit -p ios`,\n };\n\n // TODO: Log telemetry about invalid command used.\n const subcommand = args._[0];\n if (subcommand in migrationMap) {\n const replacement = migrationMap[subcommand];\n console.log();\n const instruction = subcommand === 'upgrade' ? 'follow this guide' : 'use';\n console.log(\n chalk.yellow` {gray $} {bold expo ${subcommand}} is not supported in the local CLI, please ${instruction} {bold ${replacement}} instead`\n );\n console.log();\n process.exit(1);\n }\n const deprecated = ['send', 'client:ios'];\n if (deprecated.includes(subcommand)) {\n console.log();\n console.log(chalk.yellow` {gray $} {bold expo ${subcommand}} is deprecated`);\n console.log();\n process.exit(1);\n }\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => {\n exec(commandArgs);\n\n // NOTE(EvanBacon): Track some basic telemetry events indicating the command\n // that was run. This can be disabled with the $EXPO_NO_TELEMETRY environment variable.\n // We do this to determine how well deprecations are going before removing a command.\n if (!boolish('EXPO_NO_TELEMETRY', false)) {\n const { recordCommand } =\n require('../src/utils/telemetry') as typeof import('../src/utils/telemetry');\n recordCommand(command);\n }\n});\n"],"names":["process","installEventLogger","NODE_MIN","nodeVersion","version","slice","split","map","Number","console","error","chalk","red","join","boolish","Debug","enable","enabled","env","EXPO_DEBUG","defaultCmd","commands","run","then","i","expoRun","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","expoExportWeb","expoExportEmbed","serve","expoServe","install","expoInstall","add","customize","expoCustomize","lint","expoLint","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","log","__EXPO_VERSION","exit","warn","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","exportWeb_unused","_run","_lint","others","Object","keys","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","instruction","deprecated","includes","command","commandArgs","push","on","exec","recordCommand","require"],"mappings":";;;;;;gEACgB;;;;;;;gEACE;;;;;;;gEACA;;;;;;;yBACM;;;;;;wBAEW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASfA;AAPpB,4BAA4B;AAC5B,uCAAuC;AACvCC,IAAAA,0BAAkB;AAElB,sEAAsE;AACtE,4FAA4F;AAC5F,MAAMC,WAAW;IAAC;IAAI;IAAI;CAAE;AAC5B,MAAMC,eAAcH,mBAAAA,QAAQI,OAAO,qBAAfJ,iBAAiBK,KAAK,CAAC,GAAGC,KAAK,CAAC,KAAK,GAAGC,GAAG,CAACC;AAChE,IAAIL,WAAW,CAAC,EAAE,GAAGD,QAAQ,CAAC,EAAE,IAAKC,WAAW,CAAC,EAAE,KAAKD,QAAQ,CAAC,EAAE,IAAIC,WAAW,CAAC,EAAE,GAAGD,QAAQ,CAAC,EAAE,EAAG;IACpGO,QAAQC,KAAK,CACXC,gBAAK,CAACC,GAAG,CAAC,eAAe,EAAEZ,QAAQI,OAAO,CAAC,+BAA+B,CAAC,GACvEO,gBAAK,CAACC,GAAG,CAAC,2DAA2D,EAAEV,SAASW,IAAI,CAAC,KAAK,GAAG,CAAC,GAC9FF,gBAAK,CAACC,GAAG,CAAC,uCAAuC,CAAC;AAE1D;AAEA,kCAAkC;AAClC,IAAIE,IAAAA,iBAAO,EAAC,cAAc,QAAQ;IAChCC,gBAAK,CAACC,MAAM,CAAC;AACf,OAAO,IAAID,gBAAK,CAACE,OAAO,CAAC,UAAU;IACjCjB,QAAQkB,GAAG,CAACC,UAAU,GAAG;AAC3B;AAEA,MAAMC,aAAa;AAInB,MAAMC,WAA0D;IAC9D,yBAAyB;IACzB,qGAAqG;IACrGC,KAAK,IAAM,mEAAA,QAAO,yBAAuBC,IAAI,CAAC,CAACC,IAAMA,EAAEC,OAAO;IAC9D,WAAW,IA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