@expo/cli 55.0.6 → 55.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin/cli +13 -1
- package/build/bin/cli.map +1 -1
- package/build/src/api/user/actions.js +5 -2
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/api/user/expoSsoLauncher.js +22 -49
- package/build/src/api/user/expoSsoLauncher.js.map +1 -1
- package/build/src/api/user/user.js +6 -5
- package/build/src/api/user/user.js.map +1 -1
- package/build/src/config/configAsync.js +1 -1
- package/build/src/config/configAsync.js.map +1 -1
- package/build/src/customize/customizeAsync.js +1 -1
- package/build/src/customize/customizeAsync.js.map +1 -1
- package/build/src/export/embed/exportEmbedAsync.js +1 -1
- package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
- package/build/src/export/exportApp.js +1 -1
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +7 -11
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/web/exportWebAsync.js +1 -1
- package/build/src/export/web/exportWebAsync.js.map +1 -1
- package/build/src/install/installAsync.js +1 -1
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/lint/lintAsync.js +1 -1
- package/build/src/lint/lintAsync.js.map +1 -1
- package/build/src/login/index.js +6 -2
- package/build/src/login/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +1 -1
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +1 -1
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ios/runIosAsync.js +1 -1
- package/build/src/run/ios/runIosAsync.js.map +1 -1
- package/build/src/serve/serveAsync.js +1 -1
- package/build/src/serve/serveAsync.js.map +1 -1
- package/build/src/start/interface/commandsTable.js +89 -69
- package/build/src/start/interface/commandsTable.js.map +1 -1
- package/build/src/start/interface/interactiveActions.js +29 -14
- package/build/src/start/interface/interactiveActions.js.map +1 -1
- package/build/src/start/platforms/ios/devicectl.js +4 -1
- package/build/src/start/platforms/ios/devicectl.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.js +16 -9
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.js +5 -1
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/UrlCreator.js +17 -7
- package/build/src/start/server/UrlCreator.js.map +1 -1
- package/build/src/start/server/getStaticRenderFunctions.js +8 -8
- package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +20 -20
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js +1 -1
- package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js +5 -1
- package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
- package/build/src/start/server/metro/dev-server/createMetroMiddleware.js +18 -18
- package/build/src/start/server/metro/dev-server/createMetroMiddleware.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +9 -5
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +5 -1
- package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
- package/build/src/start/server/metro/resolveLoader.js +2 -0
- package/build/src/start/server/metro/resolveLoader.js.map +1 -1
- package/build/src/start/server/metro/runServer-fork.js +6 -5
- package/build/src/start/server/metro/runServer-fork.js.map +1 -1
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js +4 -4
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
- package/build/src/utils/downloadExpoGoAsync.js +36 -0
- package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
- package/build/src/utils/editor.js +404 -31
- package/build/src/utils/editor.js.map +1 -1
- package/build/src/utils/env.js +13 -11
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/getRunningProcess.js +80 -41
- package/build/src/utils/getRunningProcess.js.map +1 -1
- package/build/src/utils/ip.js +44 -8
- package/build/src/utils/ip.js.map +1 -1
- package/build/src/utils/nodeEnv.js +66 -1
- package/build/src/utils/nodeEnv.js.map +1 -1
- package/build/src/utils/port.js +2 -2
- package/build/src/utils/port.js.map +1 -1
- package/build/src/utils/qr.js +186 -0
- package/build/src/utils/qr.js.map +1 -0
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +16 -17
package/build/bin/cli
CHANGED
|
@@ -77,6 +77,18 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
77
77
|
}
|
|
78
78
|
return newObj;
|
|
79
79
|
}
|
|
80
|
+
var _process_version;
|
|
81
|
+
// Check Node.js version and issue a loud warning if it's too outdated
|
|
82
|
+
// This is sent to stderr (console.error) so it doesn't interfere with programmatic commands
|
|
83
|
+
const NODE_MIN = [
|
|
84
|
+
20,
|
|
85
|
+
19,
|
|
86
|
+
4
|
|
87
|
+
];
|
|
88
|
+
const nodeVersion = (_process_version = process.version) == null ? void 0 : _process_version.slice(1).split('.', 3).map(Number);
|
|
89
|
+
if (nodeVersion[0] < NODE_MIN[0] || nodeVersion[0] === NODE_MIN[0] && nodeVersion[1] < NODE_MIN[1]) {
|
|
90
|
+
console.error(_chalk().default.red`{bold Node.js (${process.version}) is outdated and unsupported.}` + _chalk().default.red` Please update to a newer Node.js LTS version (required: >=${NODE_MIN.join('.')})\n` + _chalk().default.red`Go to: https://nodejs.org/en/download\n`);
|
|
91
|
+
}
|
|
80
92
|
// Setup before requiring `debug`.
|
|
81
93
|
if ((0, _getenv().boolish)('EXPO_DEBUG', false)) {
|
|
82
94
|
_debug().default.enable('expo:*');
|
|
@@ -123,7 +135,7 @@ const args = (0, _arg().default)({
|
|
|
123
135
|
});
|
|
124
136
|
if (args['--version']) {
|
|
125
137
|
// Version is added in the build script.
|
|
126
|
-
console.log("55.0.
|
|
138
|
+
console.log("55.0.8");
|
|
127
139
|
process.exit(0);
|
|
128
140
|
}
|
|
129
141
|
if (args['--non-interactive']) {
|
package/build/bin/cli.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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\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":["boolish","Debug","enable","enabled","process","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","console","log","__EXPO_VERSION","exit","warn","chalk","yellow","isSubcommand","_","_export","runIos","runAndroid","exportEmbed_unused","exportWeb_unused","_run","_lint","others","Object","keys","join","migrationMap","init","eject","web","doctor","upgrade","publish","url","webhooks","subcommand","replacement","instruction","deprecated","includes","command","commandArgs","slice","push","on","exec","recordCommand","require"],"mappings":";;;;;;gEACgB;;;;;;;gEACE;;;;;;;gEACA;;;;;;;yBACM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExB,kCAAkC;AAClC,IAAIA,IAAAA,iBAAO,EAAC,cAAc,QAAQ;IAChCC,gBAAK,CAACC,MAAM,CAAC;AACf,OAAO,IAAID,gBAAK,C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AYE,IAAI,CAAC;AACnB;AAEA,qBAAqB;AACrB/E,QAAQgF,EAAE,CAAC,UAAU,IAAMhF,QAAQ6C,IAAI,CAAC;AACxC7C,QAAQgF,EAAE,CAAC,WAAW,IAAMhF,QAAQ6C,IAAI,CAAC;AAEzCzC,QAAQ,CAACwE,QAAQ,GAAGtE,IAAI,CAAC,CAAC2E;IACxBA,KAAKJ;IAEL,4EAA4E;IAC5E,uFAAuF;IACvF,qFAAqF;IACrF,IAAI,CAACjF,IAAAA,iBAAO,EAAC,qBAAqB,QAAQ;QACxC,MAAM,EAAEsF,aAAa,EAAE,GACrBC,QAAQ;QACVD,cAAcN;IAChB;AACF"}
|
|
1
|
+
{"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\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","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKJA;AAHpB,sEAAsE;AACtE,4FAA4F;AAC5F,MAAMC,WAAW;IAAC;IAAI;IAAI;CAAE;AAC5B,MAAMC,eAAcF,mBAAAA,QAAQG,OAAO,qBAAfH,iBAAiBI,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,EAAEX,QAAQG,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;IACjChB,QAAQiB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I,CAAC;AACnB;AAEA,qBAAqB;AACrB3F,QAAQ4F,EAAE,CAAC,UAAU,IAAM5F,QAAQ4D,IAAI,CAAC;AACxC5D,QAAQ4F,EAAE,CAAC,WAAW,IAAM5F,QAAQ4D,IAAI,CAAC;AAEzCxC,QAAQ,CAACqE,QAAQ,GAAGnE,IAAI,CAAC,CAACuE;IACxBA,KAAKH;IAEL,4EAA4E;IAC5E,uFAAuF;IACvF,qFAAqF;IACrF,IAAI,CAAC7E,IAAAA,iBAAO,EAAC,qBAAqB,QAAQ;QACxC,MAAM,EAAEiF,aAAa,EAAE,GACrBC,QAAQ;QACVD,cAAcL;IAChB;AACF"}
|
|
@@ -90,11 +90,14 @@ async function showLoginPromptAsync({ printNewLine = false, otp, ...options } =
|
|
|
90
90
|
}
|
|
91
91
|
const hasCredentials = options.username && options.password;
|
|
92
92
|
const sso = options.sso;
|
|
93
|
+
const browser = options.browser;
|
|
93
94
|
if (printNewLine) {
|
|
94
95
|
_log.log();
|
|
95
96
|
}
|
|
96
|
-
if (sso) {
|
|
97
|
-
await (0, _user.
|
|
97
|
+
if (sso || browser) {
|
|
98
|
+
await (0, _user.browserLoginAsync)({
|
|
99
|
+
sso: !!sso
|
|
100
|
+
});
|
|
98
101
|
return;
|
|
99
102
|
}
|
|
100
103
|
_log.log(hasCredentials ? `Logging in to EAS with email or username (exit and run 'npx expo login --help' for other login options)` : `Log in to EAS with email or username (exit and run 'npx expo login --help' for other login options)`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync,
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync, browserLoginAsync } from './user';\nimport * as Log from '../../log';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { learnMore } from '../../utils/link';\nimport promptAsync, { confirmAsync, Question, selectAsync } from '../../utils/prompts';\nimport { ApiV2Error } from '../rest/client';\n\n/** Show login prompt while prompting for missing credentials. */\nexport async function showLoginPromptAsync({\n printNewLine = false,\n otp,\n ...options\n}: {\n printNewLine?: boolean;\n username?: string;\n password?: string;\n otp?: string;\n sso?: boolean | undefined;\n browser?: boolean | undefined;\n} = {}): Promise<void> {\n if (env.EXPO_OFFLINE) {\n throw new CommandError('OFFLINE', 'Cannot authenticate in offline-mode');\n }\n const hasCredentials = options.username && options.password;\n const sso = options.sso;\n const browser = options.browser;\n\n if (printNewLine) {\n Log.log();\n }\n\n if (sso || browser) {\n await browserLoginAsync({ sso: !!sso });\n return;\n }\n\n Log.log(\n hasCredentials\n ? `Logging in to EAS with email or username (exit and run 'npx expo login --help' for other login options)`\n : `Log in to EAS with email or username (exit and run 'npx expo login --help' for other login options)`\n );\n\n let username = options.username;\n let password = options.password;\n\n if (!hasCredentials) {\n const resolved = await promptAsync(\n [\n !options.username && {\n type: 'text',\n name: 'username',\n message: 'Email or username',\n },\n !options.password && {\n type: 'password',\n name: 'password',\n message: 'Password',\n },\n ].filter(Boolean) as Question<string>[],\n {\n nonInteractiveHelp: `Use the EXPO_TOKEN environment variable to authenticate in CI (${learnMore(\n 'https://docs.expo.dev/accounts/programmatic-access/'\n )})`,\n }\n );\n username ??= resolved.username;\n password ??= resolved.password;\n }\n // This is just for the types.\n assert(username && password);\n\n try {\n await loginAsync({\n username,\n password,\n otp,\n });\n } catch (e) {\n if (e instanceof ApiV2Error && e.expoApiV2ErrorCode === 'ONE_TIME_PASSWORD_REQUIRED') {\n await retryUsernamePasswordAuthWithOTPAsync(\n username,\n password,\n e.expoApiV2ErrorMetadata as any\n );\n } else {\n throw e;\n }\n }\n}\n\nexport async function tryGetUserAsync(): Promise<Actor | null> {\n const user = await getUserAsync().catch(() => null);\n\n if (user) {\n return user;\n }\n\n const choices = [\n {\n title: 'Log in',\n value: true,\n },\n {\n title: 'Proceed anonymously',\n value: false,\n },\n ];\n\n const value = await selectAsync(\n chalk`\\n\\nIt is recommended to log in with your Expo account before proceeding. \\n{dim ${learnMore(\n 'https://expo.fyi/unverified-app-expo-go'\n )}}\\n`,\n choices,\n {\n nonInteractiveHelp: `Use the EXPO_TOKEN environment variable to authenticate in CI (${learnMore(\n 'https://docs.expo.dev/accounts/programmatic-access/'\n )})`,\n }\n );\n\n if (value) {\n await showLoginPromptAsync({ printNewLine: true });\n return (await getUserAsync()) ?? null;\n }\n\n return null;\n}\n"],"names":["showLoginPromptAsync","tryGetUserAsync","printNewLine","otp","options","env","EXPO_OFFLINE","CommandError","hasCredentials","username","password","sso","browser","Log","log","browserLoginAsync","resolved","promptAsync","type","name","message","filter","Boolean","nonInteractiveHelp","learnMore","assert","loginAsync","e","ApiV2Error","expoApiV2ErrorCode","retryUsernamePasswordAuthWithOTPAsync","expoApiV2ErrorMetadata","user","getUserAsync","catch","choices","title","value","selectAsync","chalk"],"mappings":";;;;;;;;;;;IAasBA,oBAAoB;eAApBA;;IAkFAC,eAAe;eAAfA;;;;gEA/FH;;;;;;;gEACD;;;;;;qBAEoC;sBACa;6DAC9C;qBACD;wBACS;sBACH;iEACuC;wBACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGpB,eAAeD,qBAAqB,EACzCE,eAAe,KAAK,EACpBC,GAAG,EACH,GAAGC,SAQJ,GAAG,CAAC,CAAC;IACJ,IAAIC,QAAG,CAACC,YAAY,EAAE;QACpB,MAAM,IAAIC,oBAAY,CAAC,WAAW;IACpC;IACA,MAAMC,iBAAiBJ,QAAQK,QAAQ,IAAIL,QAAQM,QAAQ;IAC3D,MAAMC,MAAMP,QAAQO,GAAG;IACvB,MAAMC,UAAUR,QAAQQ,OAAO;IAE/B,IAAIV,cAAc;QAChBW,KAAI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BAAW,EAC7BC,IAAAA,gBAAK,CAAA,CAAC,iFAAiF,EAAEf,IAAAA,eAAS,EAChG,2CACA,GAAG,CAAC,EACNW,SACA;QACEZ,oBAAoB,CAAC,+DAA+D,EAAEC,IAAAA,eAAS,EAC7F,uDACA,CAAC,CAAC;IACN;IAGF,IAAIa,OAAO;QACT,MAAMrC,qBAAqB;YAAEE,cAAc;QAAK;QAChD,OAAO,AAAC,MAAM+B,IAAAA,kBAAY,OAAO;IACnC;IAEA,OAAO;AACT"}
|
|
@@ -83,55 +83,37 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
83
83
|
}
|
|
84
84
|
return newObj;
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
<!DOCTYPE html>
|
|
88
|
-
<html lang="en">
|
|
89
|
-
<head>
|
|
90
|
-
<title>Expo SSO Login</title>
|
|
91
|
-
<meta charset="utf-8">
|
|
92
|
-
<style type="text/css">
|
|
93
|
-
html {
|
|
94
|
-
margin: 0;
|
|
95
|
-
padding: 0
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
body {
|
|
99
|
-
background-color: #fff;
|
|
100
|
-
font-family: Tahoma,Verdana;
|
|
101
|
-
font-size: 16px;
|
|
102
|
-
color: #000;
|
|
103
|
-
max-width: 100%;
|
|
104
|
-
box-sizing: border-box;
|
|
105
|
-
padding: .5rem;
|
|
106
|
-
margin: 1em;
|
|
107
|
-
overflow-wrap: break-word
|
|
108
|
-
}
|
|
109
|
-
</style>
|
|
110
|
-
</head>
|
|
111
|
-
<body>
|
|
112
|
-
SSO login complete. You may now close this tab and return to the command prompt.
|
|
113
|
-
</body>
|
|
114
|
-
</html>`;
|
|
115
|
-
async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl }) {
|
|
86
|
+
async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl, sso = false }) {
|
|
116
87
|
const scheme = 'http';
|
|
117
88
|
const hostname = 'localhost';
|
|
118
89
|
const path = '/auth/callback';
|
|
119
|
-
const
|
|
120
|
-
const
|
|
90
|
+
const buildExpoLoginUrl = (port, sso)=>{
|
|
91
|
+
const params = _querystring().default.stringify({
|
|
92
|
+
confirm_account: 'true',
|
|
121
93
|
app_redirect_uri: `${scheme}://${hostname}:${port}${path}`
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
return `${expoWebsiteUrl}/sso-login?${params}`;
|
|
94
|
+
});
|
|
95
|
+
return `${expoWebsiteUrl}${sso ? '/sso-login' : '/login'}?${params}`;
|
|
125
96
|
};
|
|
126
97
|
// Start server and begin auth flow
|
|
127
98
|
const executeAuthFlow = ()=>{
|
|
128
99
|
return new Promise(async (resolve, reject)=>{
|
|
129
100
|
const connections = new Set();
|
|
130
101
|
const server = _http().default.createServer((request, response)=>{
|
|
102
|
+
const redirectAndCleanup = (result)=>{
|
|
103
|
+
const redirectUrl = `${expoWebsiteUrl}/oauth/expo-cli?result=${result}`;
|
|
104
|
+
response.writeHead(302, {
|
|
105
|
+
Location: redirectUrl
|
|
106
|
+
});
|
|
107
|
+
response.end();
|
|
108
|
+
server.close();
|
|
109
|
+
for (const connection of connections){
|
|
110
|
+
connection.destroy();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
131
113
|
try {
|
|
132
114
|
var _request_url;
|
|
133
|
-
if (!(request.method === 'GET' && ((_request_url = request.url) == null ? void 0 : _request_url.includes(
|
|
134
|
-
throw new Error('Unexpected
|
|
115
|
+
if (!(request.method === 'GET' && ((_request_url = request.url) == null ? void 0 : _request_url.includes('/auth/callback')))) {
|
|
116
|
+
throw new Error('Unexpected login response.');
|
|
135
117
|
}
|
|
136
118
|
const url = new URL(request.url, `http:${request.headers.host}`);
|
|
137
119
|
const sessionSecret = url.searchParams.get('session_secret');
|
|
@@ -139,19 +121,10 @@ async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl }) {
|
|
|
139
121
|
throw new Error('Request missing session_secret search parameter.');
|
|
140
122
|
}
|
|
141
123
|
resolve(sessionSecret);
|
|
142
|
-
|
|
143
|
-
'Content-Type': 'text/html'
|
|
144
|
-
});
|
|
145
|
-
response.write(successBody);
|
|
146
|
-
response.end();
|
|
124
|
+
redirectAndCleanup('success');
|
|
147
125
|
} catch (error) {
|
|
126
|
+
redirectAndCleanup('error');
|
|
148
127
|
reject(error);
|
|
149
|
-
} finally{
|
|
150
|
-
server.close();
|
|
151
|
-
// Ensure that the server shuts down
|
|
152
|
-
for (const connection of connections){
|
|
153
|
-
connection.destroy();
|
|
154
|
-
}
|
|
155
128
|
}
|
|
156
129
|
});
|
|
157
130
|
server.listen(0, hostname, ()=>{
|
|
@@ -159,7 +132,7 @@ async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl }) {
|
|
|
159
132
|
const address = server.address();
|
|
160
133
|
(0, _assert().default)(address !== null && typeof address === 'object', 'Server address and port should be set after listening has begun');
|
|
161
134
|
const port = address.port;
|
|
162
|
-
const authorizeUrl =
|
|
135
|
+
const authorizeUrl = buildExpoLoginUrl(port, sso);
|
|
163
136
|
(0, _betteropn().default)(authorizeUrl);
|
|
164
137
|
});
|
|
165
138
|
server.on('connection', (connection)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/expoSsoLauncher.ts"],"sourcesContent":["import assert from 'assert';\nimport openBrowserAsync from 'better-opn';\nimport http from 'http';\nimport { Socket } from 'node:net';\nimport querystring from 'querystring';\n\nimport * as Log from '../../log';\n\
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/expoSsoLauncher.ts"],"sourcesContent":["import assert from 'assert';\nimport openBrowserAsync from 'better-opn';\nimport http from 'http';\nimport { Socket } from 'node:net';\nimport querystring from 'querystring';\n\nimport * as Log from '../../log';\n\nexport async function getSessionUsingBrowserAuthFlowAsync({\n expoWebsiteUrl,\n sso = false,\n}: {\n expoWebsiteUrl: string;\n sso?: boolean;\n}): Promise<string> {\n const scheme = 'http';\n const hostname = 'localhost';\n const path = '/auth/callback';\n\n const buildExpoLoginUrl = (port: number, sso: boolean): string => {\n const params = querystring.stringify({\n confirm_account: 'true',\n app_redirect_uri: `${scheme}://${hostname}:${port}${path}`,\n });\n return `${expoWebsiteUrl}${sso ? '/sso-login' : '/login'}?${params}`;\n };\n\n // Start server and begin auth flow\n const executeAuthFlow = (): Promise<string> => {\n return new Promise<string>(async (resolve, reject) => {\n const connections = new Set<Socket>();\n\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n const redirectAndCleanup = (result: 'success' | 'error'): void => {\n const redirectUrl = `${expoWebsiteUrl}/oauth/expo-cli?result=${result}`;\n response.writeHead(302, { Location: redirectUrl });\n response.end();\n server.close();\n for (const connection of connections) {\n connection.destroy();\n }\n };\n\n try {\n if (!(request.method === 'GET' && request.url?.includes('/auth/callback'))) {\n throw new Error('Unexpected login response.');\n }\n const url = new URL(request.url, `http:${request.headers.host}`);\n const sessionSecret = url.searchParams.get('session_secret');\n\n if (!sessionSecret) {\n throw new Error('Request missing session_secret search parameter.');\n }\n resolve(sessionSecret);\n redirectAndCleanup('success');\n } catch (error) {\n redirectAndCleanup('error');\n reject(error);\n }\n }\n );\n\n server.listen(0, hostname, () => {\n Log.log('Waiting for browser login...');\n\n const address = server.address();\n assert(\n address !== null && typeof address === 'object',\n 'Server address and port should be set after listening has begun'\n );\n const port = address.port;\n const authorizeUrl = buildExpoLoginUrl(port, sso);\n openBrowserAsync(authorizeUrl);\n });\n\n server.on('connection', (connection) => {\n connections.add(connection);\n\n connection.on('close', () => {\n connections.delete(connection);\n });\n });\n });\n };\n\n return await executeAuthFlow();\n}\n"],"names":["getSessionUsingBrowserAuthFlowAsync","expoWebsiteUrl","sso","scheme","hostname","path","buildExpoLoginUrl","port","params","querystring","stringify","confirm_account","app_redirect_uri","executeAuthFlow","Promise","resolve","reject","connections","Set","server","http","createServer","request","response","redirectAndCleanup","result","redirectUrl","writeHead","Location","end","close","connection","destroy","method","url","includes","Error","URL","headers","host","sessionSecret","searchParams","get","error","listen","Log","log","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CAACC,IAAI,EAAE;oBAC/D,MAAMC,gBAAgBN,IAAIO,YAAY,CAACC,GAAG,CAAC;oBAE3C,IAAI,CAACF,eAAe;wBAClB,MAAM,IAAIJ,MAAM;oBAClB;oBACArB,QAAQyB;oBACRhB,mBAAmB;gBACrB,EAAE,OAAOmB,OAAO;oBACdnB,mBAAmB;oBACnBR,OAAO2B;gBACT;YACF;YAGFxB,OAAOyB,MAAM,CAAC,GAAGxC,UAAU;gBACzByC,KAAIC,GAAG,CAAC;gBAER,MAAMC,UAAU5B,OAAO4B,OAAO;gBAC9BC,IAAAA,iBAAM,EACJD,YAAY,QAAQ,OAAOA,YAAY,UACvC;gBAEF,MAAMxC,OAAOwC,QAAQxC,IAAI;gBACzB,MAAM0C,eAAe3C,kBAAkBC,MAAML;gBAC7CgD,IAAAA,oBAAgB,EAACD;YACnB;YAEA9B,OAAOgC,EAAE,CAAC,cAAc,CAACpB;gBACvBd,YAAYmC,GAAG,CAACrB;gBAEhBA,WAAWoB,EAAE,CAAC,SAAS;oBACrBlC,YAAYoC,MAAM,CAACtB;gBACrB;YACF;QACF;IACF;IAEA,OAAO,MAAMlB;AACf"}
|
|
@@ -12,6 +12,9 @@ _export(exports, {
|
|
|
12
12
|
ANONYMOUS_USERNAME: function() {
|
|
13
13
|
return ANONYMOUS_USERNAME;
|
|
14
14
|
},
|
|
15
|
+
browserLoginAsync: function() {
|
|
16
|
+
return browserLoginAsync;
|
|
17
|
+
},
|
|
15
18
|
getActorDisplayName: function() {
|
|
16
19
|
return getActorDisplayName;
|
|
17
20
|
},
|
|
@@ -23,9 +26,6 @@ _export(exports, {
|
|
|
23
26
|
},
|
|
24
27
|
logoutAsync: function() {
|
|
25
28
|
return logoutAsync;
|
|
26
|
-
},
|
|
27
|
-
ssoLoginAsync: function() {
|
|
28
|
-
return ssoLoginAsync;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
function _fs() {
|
|
@@ -124,9 +124,10 @@ async function loginAsync(credentials) {
|
|
|
124
124
|
currentConnection: 'Username-Password-Authentication'
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
async function
|
|
127
|
+
async function browserLoginAsync({ sso = false }) {
|
|
128
128
|
const sessionSecret = await (0, _expoSsoLauncher.getSessionUsingBrowserAuthFlowAsync)({
|
|
129
|
-
expoWebsiteUrl: (0, _endpoint.getExpoWebsiteBaseUrl)()
|
|
129
|
+
expoWebsiteUrl: (0, _endpoint.getExpoWebsiteBaseUrl)(),
|
|
130
|
+
sso
|
|
130
131
|
});
|
|
131
132
|
const userData = await _UserQuery.UserQuery.meUserActorAsync({
|
|
132
133
|
'expo-session': sessionSecret
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/user.ts"],"sourcesContent":["import { promises as fs } from 'fs';\n\nimport { getAccessToken, getSession, setSessionAsync } from './UserSettings';\nimport { getSessionUsingBrowserAuthFlowAsync } from './expoSsoLauncher';\nimport * as Log from '../../log';\nimport { getDevelopmentCodeSigningDirectory } from '../../utils/codesigning';\nimport { env } from '../../utils/env';\nimport { getExpoWebsiteBaseUrl } from '../endpoint';\nimport { UserQuery, type Actor } from '../graphql/queries/UserQuery';\nimport { fetchAsync } from '../rest/client';\n\nlet currentUser: Actor | undefined;\n\nexport const ANONYMOUS_USERNAME = 'anonymous';\n\n/**\n * Resolve the name of the actor, either normal user or robot user.\n * This should be used whenever the \"current user\" needs to be displayed.\n * The display name CANNOT be used as project owner.\n */\nexport function getActorDisplayName(user?: Actor): string {\n switch (user?.__typename) {\n case 'User':\n return user.username;\n case 'SSOUser':\n return user.username;\n case 'Robot':\n return user.firstName ? `${user.firstName} (robot)` : 'robot';\n default:\n return ANONYMOUS_USERNAME;\n }\n}\n\nexport type { Actor };\n\nexport async function getUserAsync(): Promise<Actor | undefined> {\n const hasCredentials = getAccessToken() || getSession()?.sessionSecret;\n if (!env.EXPO_OFFLINE && !currentUser && hasCredentials) {\n const user = await UserQuery.currentUserAsync();\n currentUser = user ?? undefined;\n }\n return currentUser;\n}\n\nexport async function loginAsync(credentials: {\n username: string;\n password: string;\n otp?: string;\n}): Promise<void> {\n const res = await fetchAsync('auth/loginAsync', {\n method: 'POST',\n body: JSON.stringify(credentials),\n });\n const json: any = await res.json();\n const sessionSecret = json.data.sessionSecret;\n\n const userData = await UserQuery.meUserActorAsync({\n 'expo-session': sessionSecret,\n });\n\n await setSessionAsync({\n sessionSecret,\n userId: userData.id,\n username: userData.username,\n currentConnection: 'Username-Password-Authentication',\n });\n}\n\nexport async function
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/user.ts"],"sourcesContent":["import { promises as fs } from 'fs';\n\nimport { getAccessToken, getSession, setSessionAsync } from './UserSettings';\nimport { getSessionUsingBrowserAuthFlowAsync } from './expoSsoLauncher';\nimport * as Log from '../../log';\nimport { getDevelopmentCodeSigningDirectory } from '../../utils/codesigning';\nimport { env } from '../../utils/env';\nimport { getExpoWebsiteBaseUrl } from '../endpoint';\nimport { UserQuery, type Actor } from '../graphql/queries/UserQuery';\nimport { fetchAsync } from '../rest/client';\n\nlet currentUser: Actor | undefined;\n\nexport const ANONYMOUS_USERNAME = 'anonymous';\n\n/**\n * Resolve the name of the actor, either normal user or robot user.\n * This should be used whenever the \"current user\" needs to be displayed.\n * The display name CANNOT be used as project owner.\n */\nexport function getActorDisplayName(user?: Actor): string {\n switch (user?.__typename) {\n case 'User':\n return user.username;\n case 'SSOUser':\n return user.username;\n case 'Robot':\n return user.firstName ? `${user.firstName} (robot)` : 'robot';\n default:\n return ANONYMOUS_USERNAME;\n }\n}\n\nexport type { Actor };\n\nexport async function getUserAsync(): Promise<Actor | undefined> {\n const hasCredentials = getAccessToken() || getSession()?.sessionSecret;\n if (!env.EXPO_OFFLINE && !currentUser && hasCredentials) {\n const user = await UserQuery.currentUserAsync();\n currentUser = user ?? undefined;\n }\n return currentUser;\n}\n\nexport async function loginAsync(credentials: {\n username: string;\n password: string;\n otp?: string;\n}): Promise<void> {\n const res = await fetchAsync('auth/loginAsync', {\n method: 'POST',\n body: JSON.stringify(credentials),\n });\n const json: any = await res.json();\n const sessionSecret = json.data.sessionSecret;\n\n const userData = await UserQuery.meUserActorAsync({\n 'expo-session': sessionSecret,\n });\n\n await setSessionAsync({\n sessionSecret,\n userId: userData.id,\n username: userData.username,\n currentConnection: 'Username-Password-Authentication',\n });\n}\n\nexport async function browserLoginAsync({ sso = false }): Promise<void> {\n const sessionSecret = await getSessionUsingBrowserAuthFlowAsync({\n expoWebsiteUrl: getExpoWebsiteBaseUrl(),\n sso,\n });\n const userData = await UserQuery.meUserActorAsync({\n 'expo-session': sessionSecret,\n });\n await setSessionAsync({\n sessionSecret,\n userId: userData.id,\n username: userData.username,\n currentConnection: 'Browser-Flow-Authentication',\n });\n}\n\nexport async function logoutAsync(): Promise<void> {\n currentUser = undefined;\n await Promise.all([\n fs.rm(getDevelopmentCodeSigningDirectory(), { recursive: true, force: true }),\n setSessionAsync(undefined),\n ]);\n Log.log('Logged out');\n}\n"],"names":["ANONYMOUS_USERNAME","browserLoginAsync","getActorDisplayName","getUserAsync","loginAsync","logoutAsync","currentUser","user","__typename","username","firstName","getSession","hasCredentials","getAccessToken","sessionSecret","env","EXPO_OFFLINE","UserQuery","currentUserAsync","undefined","credentials","res","fetchAsync","method","body","JSON","stringify","json","data","userData","meUserActorAsync","setSessionAsync","userId","id","currentConnection","sso","getSessionUsingBrowserAuthFlowAsync","expoWebsiteUrl","getExpoWebsiteBaseUrl","Promise","all","fs","rm","getDevelopmentCodeSigningDirectory","recursive","force","Log","log"],"mappings":";;;;;;;;;;;IAaaA,kBAAkB;eAAlBA;;IAuDSC,iBAAiB;eAAjBA;;IAhDNC,mBAAmB;eAAnBA;;IAeMC,YAAY;eAAZA;;IASAC,UAAU;eAAVA;;IAwCAC,WAAW;eAAXA;;;;yBApFS;;;;;;8BAE6B;iCACR;6DAC/B;6BAC8B;qBAC/B;0BACkB;2BACA;wBACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACA,MAAMiB,IAAAA,6BAAe,EAAC;QACpBjB;QACAkB,QAAQH,SAASI,EAAE;QACnBxB,UAAUoB,SAASpB,QAAQ;QAC3ByB,mBAAmB;IACrB;AACF;AAEO,eAAe7B;IACpBC,cAAca;IACd,MAAMoB,QAAQC,GAAG,CAAC;QAChBC,cAAE,CAACC,EAAE,CAACC,IAAAA,+CAAkC,KAAI;YAAEC,WAAW;YAAMC,OAAO;QAAK;QAC3Ed,IAAAA,6BAAe,EAACZ;KACjB;IACD2B,KAAIC,GAAG,CAAC;AACV"}
|
|
@@ -116,7 +116,7 @@ async function configAsync(projectRoot, options) {
|
|
|
116
116
|
console.error = function() {};
|
|
117
117
|
}
|
|
118
118
|
(0, _nodeEnv.setNodeEnv)('development');
|
|
119
|
-
|
|
119
|
+
(0, _nodeEnv.loadEnvFiles)(projectRoot);
|
|
120
120
|
if (options.type) {
|
|
121
121
|
_assert().default.match(options.type, /^(public|prebuild|introspect)$/);
|
|
122
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/configAsync.ts"],"sourcesContent":["import { ExpoConfig, getConfig, ProjectConfig } from '@expo/config';\nimport assert from 'assert';\nimport util from 'util';\n\nimport * as Log from '../log';\nimport { CommandError } from '../utils/errors';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { profile } from '../utils/profile';\n\ntype Options = {\n type?: string;\n full?: boolean;\n json?: boolean;\n};\n\nexport function logConfig(config: ExpoConfig | ProjectConfig) {\n const isObjStr = (str: string): boolean => /^\\w+: {/g.test(str);\n Log.log(\n util.inspect(config, {\n colors: true,\n compact: false,\n // Sort objects to the end so that smaller values aren't hidden between large objects.\n sorted(a: string, b: string) {\n if (isObjStr(a)) return 1;\n if (isObjStr(b)) return -1;\n return 0;\n },\n showHidden: false,\n depth: null,\n })\n );\n}\n\nexport async function configAsync(projectRoot: string, options: Options) {\n const loggingFunctions = {\n log: console.log,\n warn: console.warn,\n error: console.error,\n };\n // Disable logging for this command if the user wants to get JSON output.\n // This will ensure that only the JSON is printed to stdout.\n if (options.json) {\n console.log = function () {};\n console.warn = function () {};\n console.error = function () {};\n }\n setNodeEnv('development');\n
|
|
1
|
+
{"version":3,"sources":["../../../src/config/configAsync.ts"],"sourcesContent":["import { ExpoConfig, getConfig, ProjectConfig } from '@expo/config';\nimport assert from 'assert';\nimport util from 'util';\n\nimport * as Log from '../log';\nimport { CommandError } from '../utils/errors';\nimport { setNodeEnv, loadEnvFiles } from '../utils/nodeEnv';\nimport { profile } from '../utils/profile';\n\ntype Options = {\n type?: string;\n full?: boolean;\n json?: boolean;\n};\n\nexport function logConfig(config: ExpoConfig | ProjectConfig) {\n const isObjStr = (str: string): boolean => /^\\w+: {/g.test(str);\n Log.log(\n util.inspect(config, {\n colors: true,\n compact: false,\n // Sort objects to the end so that smaller values aren't hidden between large objects.\n sorted(a: string, b: string) {\n if (isObjStr(a)) return 1;\n if (isObjStr(b)) return -1;\n return 0;\n },\n showHidden: false,\n depth: null,\n })\n );\n}\n\nexport async function configAsync(projectRoot: string, options: Options) {\n const loggingFunctions = {\n log: console.log,\n warn: console.warn,\n error: console.error,\n };\n // Disable logging for this command if the user wants to get JSON output.\n // This will ensure that only the JSON is printed to stdout.\n if (options.json) {\n console.log = function () {};\n console.warn = function () {};\n console.error = function () {};\n }\n setNodeEnv('development');\n loadEnvFiles(projectRoot);\n\n if (options.type) {\n assert.match(options.type, /^(public|prebuild|introspect)$/);\n }\n\n let config: ProjectConfig;\n\n if (options.type === 'prebuild') {\n const { getPrebuildConfigAsync } = await import('@expo/prebuild-config');\n\n config = await profile(getPrebuildConfigAsync)(projectRoot, {\n platforms: ['ios', 'android'],\n });\n } else if (options.type === 'introspect') {\n const { getPrebuildConfigAsync } = await import('@expo/prebuild-config');\n const { compileModsAsync } = await import('@expo/config-plugins/build/plugins/mod-compiler.js');\n\n config = await profile(getPrebuildConfigAsync)(projectRoot, {\n platforms: ['ios', 'android'],\n });\n\n await compileModsAsync(config.exp, {\n projectRoot,\n introspect: true,\n platforms: ['ios', 'android'],\n assertMissingModProviders: false,\n });\n // @ts-ignore\n delete config.modRequest;\n // @ts-ignore\n delete config.modResults;\n } else if (options.type === 'public') {\n config = profile(getConfig)(projectRoot, {\n skipSDKVersionRequirement: true,\n isPublicConfig: true,\n });\n } else if (options.type) {\n throw new CommandError(\n `Invalid option: --type ${options.type}. Valid options are: public, prebuild`\n );\n } else {\n config = profile(getConfig)(projectRoot, {\n skipSDKVersionRequirement: true,\n });\n }\n\n const configOutput = options.full ? config : config.exp;\n\n if (!options.json) {\n Log.log();\n logConfig(configOutput);\n Log.log();\n } else {\n process.stdout.write(JSON.stringify(configOutput));\n\n // Re-enable logging functions for testing.\n console.log = loggingFunctions.log;\n console.warn = loggingFunctions.warn;\n console.error = loggingFunctions.error;\n }\n}\n"],"names":["configAsync","logConfig","config","isObjStr","str","test","Log","log","util","inspect","colors","compact","sorted","a","b","showHidden","depth","projectRoot","options","loggingFunctions","console","warn","error","json","setNodeEnv","loadEnvFiles","type","assert","match","getPrebuildConfigAsync","profile","platforms","compileModsAsync","exp","introspect","assertMissingModProviders","modRequest","modResults","getConfig","skipSDKVersionRequirement","isPublicConfig","CommandError","configOutput","full","process","stdout","write","JSON","stringify"],"mappings":";;;;;;;;;;;IAiCsBA,WAAW;eAAXA;;IAlBNC,SAAS;eAATA;;;;yBAfqC;;;;;;;gEAClC;;;;;;;gEACF;;;;;;6DAEI;wBACQ;yBACY;yBACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQjB,SAASA,UAAUC,MAAkC;IAC1D,MAAMC,WAAW,CAACC,MAAyB,WAAWC,IAAI,CAACD;IAC3DE,KAAIC,GAAG,CACLC,eAAI,CAACC,OAAO,CAACP,QAAQ;QACnBQ,QAAQ;QACRC,SAAS;QACT,sFAAsF;QACtFC,QAAOC,CAAS,EAAEC,CAAS;YACzB,IAAIX,SAASU,IAAI,OAAO;YACxB,IAAIV,SAASW,I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AC1B,OAAO,IAAInB,QAAQQ,IAAI,KAAK,UAAU;QACpCxB,SAAS4B,IAAAA,gBAAO,EAACQ,mBAAS,EAAErB,aAAa;YACvCsB,2BAA2B;YAC3BC,gBAAgB;QAClB;IACF,OAAO,IAAItB,QAAQQ,IAAI,EAAE;QACvB,MAAM,IAAIe,oBAAY,CACpB,CAAC,uBAAuB,EAAEvB,QAAQQ,IAAI,CAAC,qCAAqC,CAAC;IAEjF,OAAO;QACLxB,SAAS4B,IAAAA,gBAAO,EAACQ,mBAAS,EAAErB,aAAa;YACvCsB,2BAA2B;QAC7B;IACF;IAEA,MAAMG,eAAexB,QAAQyB,IAAI,GAAGzC,SAASA,OAAO+B,GAAG;IAEvD,IAAI,CAACf,QAAQK,IAAI,EAAE;QACjBjB,KAAIC,GAAG;QACPN,UAAUyC;QACVpC,KAAIC,GAAG;IACT,OAAO;QACLqC,QAAQC,MAAM,CAACC,KAAK,CAACC,KAAKC,SAAS,CAACN;QAEpC,2CAA2C;QAC3CtB,QAAQb,GAAG,GAAGY,iBAAiBZ,GAAG;QAClCa,QAAQC,IAAI,GAAGF,iBAAiBE,IAAI;QACpCD,QAAQE,KAAK,GAAGH,iBAAiBG,KAAK;IACxC;AACF"}
|
|
@@ -26,7 +26,7 @@ async function customizeAsync(files, options, extras) {
|
|
|
26
26
|
// Locate the project root based on the process current working directory.
|
|
27
27
|
// This enables users to run `npx expo customize` from a subdirectory of the project.
|
|
28
28
|
const projectRoot = (0, _findUp.findUpProjectRootOrAssert)(process.cwd());
|
|
29
|
-
|
|
29
|
+
(0, _nodeEnv.loadEnvFiles)(projectRoot);
|
|
30
30
|
// Get the static path (defaults to 'web/')
|
|
31
31
|
// Doesn't matter if expo is installed or which mode is used.
|
|
32
32
|
const { exp } = (0, _config().getConfig)(projectRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/customize/customizeAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { queryAndGenerateAsync, selectAndGenerateAsync } from './generate';\nimport { Options } from './resolveOptions';\nimport { DestinationResolutionProps } from './templates';\nimport { getRouterDirectoryModuleIdWithManifest } from '../start/server/metro/router';\nimport { getPlatformBundlers } from '../start/server/platformBundlers';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { setNodeEnv } from '../utils/nodeEnv';\n\nexport async function customizeAsync(files: string[], options: Options, extras: any[]) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo customize` from a subdirectory of the project.\n const projectRoot = findUpProjectRootOrAssert(process.cwd());\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/customize/customizeAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\n\nimport { queryAndGenerateAsync, selectAndGenerateAsync } from './generate';\nimport { Options } from './resolveOptions';\nimport { DestinationResolutionProps } from './templates';\nimport { getRouterDirectoryModuleIdWithManifest } from '../start/server/metro/router';\nimport { getPlatformBundlers } from '../start/server/platformBundlers';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { setNodeEnv, loadEnvFiles } from '../utils/nodeEnv';\n\nexport async function customizeAsync(files: string[], options: Options, extras: any[]) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo customize` from a subdirectory of the project.\n const projectRoot = findUpProjectRootOrAssert(process.cwd());\n\n loadEnvFiles(projectRoot);\n\n // Get the static path (defaults to 'web/')\n // Doesn't matter if expo is installed or which mode is used.\n const { exp } = getConfig(projectRoot, {\n skipSDKVersionRequirement: true,\n });\n\n const routerRoot = getRouterDirectoryModuleIdWithManifest(projectRoot, exp);\n\n // Create the destination resolution props which are used in both\n // the query and select functions.\n const props: DestinationResolutionProps = {\n webStaticPath:\n (exp.web?.staticPath ?? getPlatformBundlers(projectRoot, exp).web === 'webpack')\n ? 'web'\n : 'public',\n appDirPath: routerRoot,\n };\n\n // If the user provided files, we'll generate them without prompting.\n if (files.length) {\n return queryAndGenerateAsync(projectRoot, {\n files,\n props,\n extras,\n });\n }\n\n // Otherwise, we'll prompt the user to select which files to generate.\n await selectAndGenerateAsync(projectRoot, {\n props,\n extras,\n });\n}\n"],"names":["customizeAsync","files","options","extras","exp","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","loadEnvFiles","getConfig","skipSDKVersionRequirement","routerRoot","getRouterDirectoryModuleIdWithManifest","props","webStaticPath","web","staticPath","getPlatformBundlers","appDirPath","length","queryAndGenerateAsync","selectAndGenerateAsync"],"mappings":";;;;+BAUsBA;;;eAAAA;;;;yBAVI;;;;;;0BAEoC;wBAGP;kCACnB;wBACM;yBACD;AAElC,eAAeA,eAAeC,KAAe,EAAEC,OAAgB,EAAEC,MAAa;QAoB9EC;IAnBLC,IAAAA,mBAAU,EAAC;IACX,0EAA0E;IAC1E,qFAAqF;IACrF,MAAMC,cAAcC,IAAAA,iCAAyB,EAACC,QAAQC,GAAG;IAEzDC,IAAAA,qBAAY,EAACJ;IAEb,2CAA2C;IAC3C,6DAA6D;IAC7D,MAAM,EAAEF,GAAG,EAAE,GAAGO,IAAAA,mBAAS,EAACL,aAAa;QACrCM,2BAA2B;IAC7B;IAEA,MAAMC,aAAaC,IAAAA,8CAAsC,EAACR,aAAaF;IAEvE,iEAAiE;IACjE,kCAAkC;IAClC,MAAMW,QAAoC;QACxCC,eACE,AAACZ,EAAAA,WAAAA,IAAIa,GAAG,qBAAPb,SAASc,UAAU,KAAIC,IAAAA,qCAAmB,EAACb,aAAaF,KAAKa,GAAG,KAAK,YAClE,QACA;QACNG,YAAYP;IACd;IAEA,qEAAqE;IACrE,IAAIZ,MAAMoB,MAAM,EAAE;QAChB,OAAOC,IAAAA,+BAAqB,EAAChB,aAAa;YACxCL;YACAc;YACAZ;QACF;IACF;IAEA,sEAAsE;IACtE,MAAMoB,IAAAA,gCAAsB,EAACjB,aAAa;QACxCS;QACAZ;IACF;AACF"}
|
|
@@ -185,7 +185,7 @@ async function exportEmbedAsync(projectRoot, options) {
|
|
|
185
185
|
options.resetCache = false;
|
|
186
186
|
}
|
|
187
187
|
(0, _nodeEnv.setNodeEnv)(options.dev ? 'development' : 'production');
|
|
188
|
-
|
|
188
|
+
(0, _nodeEnv.loadEnvFiles)(projectRoot);
|
|
189
189
|
// This is an optimized codepath that can occur during `npx expo run` and does not occur during builds from Xcode or Android Studio.
|
|
190
190
|
// Here we reconcile a bundle pass that was run before the native build process. This order can fail faster and is show better errors since the logs won't be obscured by Xcode and Android Studio.
|
|
191
191
|
// This path is also used for automatically deploying server bundles to a remote host.
|