@expo/cli 0.13.2 → 0.14.0
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 +27 -25
- package/build/bin/cli.map +1 -1
- package/build/src/config/configAsync.js +1 -1
- package/build/src/config/configAsync.js.map +1 -1
- package/build/src/config/index.js +2 -2
- package/build/src/config/index.js.map +1 -1
- package/build/src/customize/generate.js +1 -1
- package/build/src/customize/generate.js.map +1 -1
- package/build/src/customize/typescript.js +3 -3
- package/build/src/customize/typescript.js.map +1 -1
- package/build/src/export/createMetadataJson.js.map +1 -1
- package/build/src/export/embed/index.js +4 -4
- package/build/src/export/embed/index.js.map +1 -1
- package/build/src/export/exportApp.js +6 -4
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportHermes.js +20 -10
- package/build/src/export/exportHermes.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +55 -39
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/fork-bundleAsync.js +44 -13
- package/build/src/export/fork-bundleAsync.js.map +1 -1
- package/build/src/export/index.js +2 -2
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/web/index.js +2 -2
- package/build/src/export/web/index.js.map +1 -1
- package/build/src/export/writeContents.js +3 -1
- package/build/src/export/writeContents.js.map +1 -1
- package/build/src/install/installAsync.js +1 -1
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/login/index.js +1 -1
- package/build/src/login/index.js.map +1 -1
- package/build/src/logout/index.js +1 -1
- package/build/src/logout/index.js.map +1 -1
- package/build/src/prebuild/index.js +3 -3
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +2 -2
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/register/index.js +1 -1
- package/build/src/register/index.js.map +1 -1
- package/build/src/run/android/index.js +2 -2
- package/build/src/run/android/index.js.map +1 -1
- package/build/src/run/ios/appleDevice/AppleDevice.js +35 -2
- package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -1
- package/build/src/run/ios/index.js +2 -2
- package/build/src/run/ios/index.js.map +1 -1
- package/build/src/start/index.js +3 -3
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/server/getStaticRenderFunctions.js +4 -1
- package/build/src/start/server/getStaticRenderFunctions.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +29 -10
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/bundleApiRoutes.js +0 -16
- package/build/src/start/server/metro/bundleApiRoutes.js.map +1 -1
- package/build/src/start/server/metro/createExpoMetroResolver.js +170 -0
- package/build/src/start/server/metro/createExpoMetroResolver.js.map +1 -0
- package/build/src/start/server/metro/fetchRouterManifest.js.map +1 -1
- package/build/src/start/server/metro/formatFileCandidates.js +72 -0
- package/build/src/start/server/metro/formatFileCandidates.js.map +1 -0
- package/build/src/start/server/metro/instantiateMetro.js +6 -7
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.js +2 -1
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/metro/router.js +2 -2
- package/build/src/start/server/metro/router.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +31 -14
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +43 -15
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/resolveAssets.js.map +1 -1
- package/build/src/start/server/type-generation/expo-env.js +1 -1
- package/build/src/start/server/type-generation/expo-env.js.map +1 -1
- package/build/src/start/server/type-generation/routes.js +1 -0
- package/build/src/start/server/type-generation/routes.js.map +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +2 -2
- package/build/src/utils/cocoapods.js +1 -0
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/env.js +3 -0
- package/build/src/utils/env.js.map +1 -1
- package/build/src/whoami/index.js +1 -1
- package/build/src/whoami/index.js.map +1 -1
- package/package.json +7 -8
- package/static/shims/react-native-web/dist/cjs/exports/BackHandler/index.js +10 -0
- package/static/shims/react-native-web/dist/exports/BackHandler/index.js +7 -0
- package/build/src/export/createBundles.js +0 -37
- package/build/src/export/createBundles.js.map +0 -1
- package/build/src/start/server/middleware/resolveEntryPoint.js +0 -42
- package/build/src/start/server/middleware/resolveEntryPoint.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n '--platform': [String],\n '--no-minify': Boolean,\n\n // Hack: This is added because EAS CLI always includes the flag.\n // If supplied, we'll do nothing with the value, but at least the process won't crash.\n // Note that we also don't show this value in the `--help` prompt since we don't want people to use it.\n '--experimental-bundle': Boolean,\n\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n '-p': '--platform',\n // Interop with Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n chalk`-p, --platform <platform> Options: android, ios, web, all. {dim Default: all}`,\n `--no-minify Prevent minifying source`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AA4BtB,CAAA,WA5BsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,iBAAiB,EAAEA,OAAO;QAC1B,OAAO,EAAEA,OAAO;QAChB,kBAAkB,EAAEA,OAAO;QAC3B,eAAe,EAAEC,MAAM;QACvB,cAAc,EAAEC,MAAM;QACtB,YAAY,EAAE;YAACA,MAAM;SAAC;QACtB,aAAa,EAAEF,OAAO;QAEtB,gEAAgE;QAChE,sFAAsF;QACtF,uGAAuG;QACvG,uBAAuB,EAAEA,OAAO;QAEhC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,4BAA4B;QAC5B,2BAA2B;QAC3B,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,6CAA6C;QAC7C,eAAe,EAAE,SAAS;KAC3B,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBK,CAAAA,GAAAA,KAAS,AAeR,CAAA,UAfQ,CACP,CAAC,iEAAiE,CAAC,EACnEC,MAAK,QAAA,CAAC,2BAA2B,CAAC,EAClC;YACEA,MAAK,QAAA,CAAC,kGAAkG,CAAC;YACzG,CAAC,iGAAiG,CAAC;YACnGA,MAAK,QAAA,CAAC,2FAA2F,CAAC;YAClG,CAAC,gFAAgF,CAAC;YAClF,CAAC,oEAAoE,CAAC;YACtE,CAAC,0EAA0E,CAAC;YAC5EA,MAAK,QAAA,CAAC,8EAA8E,CAAC;YACrF,CAAC,mDAAmD,CAAC;YACrD,CAAC,kDAAkD,CAAC;YACpD,CAAC,qCAAqC,CAAC;SACxC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACT,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEU,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/export/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n '--platform': [String],\n '--no-minify': Boolean,\n\n // Hack: This is added because EAS CLI always includes the flag.\n // If supplied, we'll do nothing with the value, but at least the process won't crash.\n // Note that we also don't show this value in the `--help` prompt since we don't want people to use it.\n '--experimental-bundle': Boolean,\n\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n '-p': '--platform',\n // Interop with Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n chalk`-p, --platform <platform> Options: android, ios, web, all. {dim Default: all}`,\n `--no-minify Prevent minifying source`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync.js');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AA4BtB,CAAA,WA5BsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,iBAAiB,EAAEA,OAAO;QAC1B,OAAO,EAAEA,OAAO;QAChB,kBAAkB,EAAEA,OAAO;QAC3B,eAAe,EAAEC,MAAM;QACvB,cAAc,EAAEC,MAAM;QACtB,YAAY,EAAE;YA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AAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAC7D,AAAC;QAxDWf,UAAU,GAAVA,UAAU"}
|
|
@@ -53,11 +53,11 @@ const expoExportWeb = async (argv)=>{
|
|
|
53
53
|
}
|
|
54
54
|
const projectRoot = (0, _args).getProjectRoot(args);
|
|
55
55
|
const { resolveOptionsAsync } = await Promise.resolve().then(function() {
|
|
56
|
-
return _interopRequireWildcard(require("./resolveOptions"));
|
|
56
|
+
return _interopRequireWildcard(require("./resolveOptions.js"));
|
|
57
57
|
});
|
|
58
58
|
const options = await resolveOptionsAsync(args).catch(_errors.logCmdError);
|
|
59
59
|
const { exportWebAsync } = await Promise.resolve().then(function() {
|
|
60
|
-
return _interopRequireWildcard(require("./exportWebAsync"));
|
|
60
|
+
return _interopRequireWildcard(require("./exportWebAsync.js"));
|
|
61
61
|
});
|
|
62
62
|
return exportWebAsync(projectRoot, options).catch(_errors.logCmdError);
|
|
63
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/export/web/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoExportWeb: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dev': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the web app for hosting on a web server`,\n chalk`npx expo export:web {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Bundle in development mode`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportWebAsync } = await import('./exportWebAsync');\n return exportWebAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExportWeb","argv","args","assertArgs","Boolean","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportWebAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5C,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,aAAa,GAAY,OAAOC,IAAI,GAAK;IACpD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAWtB,CAAA,WAXsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AASR,CAAA,UATQ,CACP,CAAC,kEAAkE,CAAC,EACpEC,MAAK,QAAA,CAAC,+BAA+B,CAAC,EACtC;YACEA,MAAK,QAAA,CAAC,qGAAqG,CAAC;YAC5G,CAAC,wDAAwD,CAAC;YAC1D,CAAC,qDAAqD,CAAC;YACvD,CAAC,wCAAwC,CAAC;SAC3C,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACP,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEQ,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/export/web/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoExportWeb: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dev': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the web app for hosting on a web server`,\n chalk`npx expo export:web {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Bundle in development mode`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportWebAsync } = await import('./exportWebAsync.js');\n return exportWebAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExportWeb","argv","args","assertArgs","Boolean","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportWebAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5C,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMA,aAAa,GAAY,OAAOC,IAAI,GAAK;IACpD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAWtB,CAAA,WAXsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AASR,CAAA,UATQ,CACP,CAAC,kEAAkE,CAAC,EACpEC,MAAK,QAAA,CAAC,+BAA+B,CAAC,EACtC;YACEA,MAAK,QAAA,CAAC,qGAAqG,CAAC;YAC5G,CAAC,wDAAwD,CAAC;YAC1D,CAAC,qDAAqD,CAAC;YACvD,CAAC,wCAAwC,CAAC;SAC3C,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACP,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEQ,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IACpE,MAAMC,OAAO,GAAG,MAAMD,mBAAmB,CAACR,IAAI,CAAC,CAACU,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEnE,MAAM,EAAEC,cAAc,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IAC/D,OAAOA,cAAc,CAACN,WAAW,EAAEG,OAAO,CAAC,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAChE,AAAC;QAjCWb,aAAa,GAAbA,aAAa"}
|
|
@@ -58,6 +58,7 @@ async function writeBundlesAsync({ bundles , outputDir , useServerRendering })
|
|
|
58
58
|
}
|
|
59
59
|
async function writeSourceMapsAsync({ bundles , hashes , fileNames , outputDir }) {
|
|
60
60
|
return (await Promise.all(Object.entries(bundles).map(async ([platform, bundle])=>{
|
|
61
|
+
if (!bundle) return null;
|
|
61
62
|
var _hermesSourcemap;
|
|
62
63
|
const sourceMap = (_hermesSourcemap = bundle.hermesSourcemap) != null ? _hermesSourcemap : bundle.map;
|
|
63
64
|
if (!sourceMap) {
|
|
@@ -110,7 +111,8 @@ async function writeAssetMapAsync({ outputDir , assets }) {
|
|
|
110
111
|
async function writeDebugHtmlAsync({ outputDir , fileNames }) {
|
|
111
112
|
// Make a debug html so user can debug their bundles
|
|
112
113
|
const contents = `
|
|
113
|
-
${Object.values(fileNames).
|
|
114
|
+
${Object.values(fileNames).filter((value)=>value != null
|
|
115
|
+
).map((fileName)=>`<script src="${_path.default.join("bundles", fileName)}"></script>`
|
|
114
116
|
).join("\n ")}
|
|
115
117
|
Open up this file in Chrome. In the JavaScript developer console, navigate to the Source tab.
|
|
116
118
|
You can see a red colored folder containing the original source code from your bundle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/writeContents.ts"],"sourcesContent":["import { Platform } from '@expo/config';\nimport crypto from 'crypto';\nimport fs from 'fs/promises';\nimport path from 'path';\n\nimport { createMetadataJson } from './createMetadataJson';\nimport { BundleOutput } from './fork-bundleAsync';\nimport { Asset } from './saveAssets';\n\nconst debug = require('debug')('expo:export:write') as typeof console.log;\n\n/**\n * @param props.platform native platform for the bundle\n * @param props.format extension to use for the name\n * @param props.hash crypto hash for the bundle contents\n * @returns filename for the JS bundle.\n */\nfunction createBundleFileName({\n platform,\n format,\n hash,\n}: {\n platform: string;\n format: 'javascript' | 'bytecode';\n hash: string;\n}): string {\n return `${platform}-${hash}.${format === 'javascript' ? 'js' : 'hbc'}`;\n}\n\n/**\n * @param bundle JS bundle as a string\n * @returns crypto hash for the provided bundle\n */\nfunction createBundleHash(bundle: string | Uint8Array): string {\n return crypto.createHash('md5').update(bundle).digest('hex');\n}\n\nexport async function writeBundlesAsync({\n bundles,\n outputDir,\n useServerRendering,\n}: {\n bundles: Partial<Record<Platform, Pick<BundleOutput, 'hermesBytecodeBundle' | 'code'>>>;\n outputDir: string;\n useServerRendering?: boolean;\n}) {\n const hashes: Partial<Record<Platform, string>> = {};\n const fileNames: Partial<Record<Platform, string>> = {};\n\n for (const [platform, bundleOutput] of Object.entries(bundles) as [\n Platform,\n Pick<BundleOutput, 'hermesBytecodeBundle' | 'code'>,\n ][]) {\n // TODO: Move native to use the newer `_expo/...` bundle writing system.\n if (platform === 'web' && useServerRendering) {\n continue;\n }\n const bundle = bundleOutput.hermesBytecodeBundle ?? bundleOutput.code;\n const hash = createBundleHash(bundle);\n const fileName = createBundleFileName({\n platform,\n format: bundleOutput.hermesBytecodeBundle ? 'bytecode' : 'javascript',\n hash,\n });\n\n hashes[platform] = hash;\n fileNames[platform] = fileName;\n await fs.writeFile(path.join(outputDir, fileName), bundle);\n }\n\n return { hashes, fileNames };\n}\n\ntype SourceMapWriteResult = {\n platform: string;\n fileName: string;\n hash: string;\n map: string;\n comment: string;\n};\n\nexport async function writeSourceMapsAsync({\n bundles,\n hashes,\n fileNames,\n outputDir,\n}: {\n bundles: Record<\n string,\n Pick<BundleOutput, 'hermesSourcemap' | 'map' | 'hermesBytecodeBundle' | 'code'>\n >;\n hashes?: Record<string, string>;\n fileNames?: Record<string, string>;\n outputDir: string;\n}): Promise<SourceMapWriteResult[]> {\n return (\n await Promise.all(\n Object.entries(bundles).map(async ([platform, bundle]) => {\n const sourceMap = bundle.hermesSourcemap ?? bundle.map;\n if (!sourceMap) {\n debug(`Skip writing sourcemap (platform: ${platform})`);\n return null;\n }\n\n const hash =\n hashes?.[platform] ?? createBundleHash(bundle.hermesBytecodeBundle ?? bundle.code);\n const mapName = `${platform}-${hash}.map`;\n await fs.writeFile(path.join(outputDir, mapName), sourceMap);\n\n const jsBundleFileName =\n fileNames?.[platform] ??\n createBundleFileName({\n platform,\n format: bundle.hermesBytecodeBundle ? 'bytecode' : 'javascript',\n hash,\n });\n const jsPath = path.join(outputDir, jsBundleFileName);\n\n // Add correct mapping to sourcemap paths\n const mappingComment = `\\n//# sourceMappingURL=${mapName}`;\n await fs.appendFile(jsPath, mappingComment);\n return {\n platform,\n fileName: mapName,\n hash,\n map: sourceMap,\n comment: mappingComment,\n };\n })\n )\n ).filter(Boolean) as SourceMapWriteResult[];\n}\n\nexport async function writeMetadataJsonAsync({\n outputDir,\n bundles,\n fileNames,\n}: {\n outputDir: string;\n bundles: Record<string, Pick<BundleOutput, 'assets'>>;\n fileNames: Record<string, string>;\n}) {\n const contents = createMetadataJson({\n bundles,\n fileNames,\n });\n const metadataPath = path.join(outputDir, 'metadata.json');\n debug(`Writing metadata.json to ${metadataPath}`);\n await fs.writeFile(metadataPath, JSON.stringify(contents));\n return contents;\n}\n\nexport async function writeAssetMapAsync({\n outputDir,\n assets,\n}: {\n outputDir: string;\n assets: Asset[];\n}) {\n // Convert the assets array to a k/v pair where the asset hash is the key and the asset is the value.\n const contents = Object.fromEntries(assets.map((asset) => [asset.hash, asset]));\n await fs.writeFile(path.join(outputDir, 'assetmap.json'), JSON.stringify(contents));\n return contents;\n}\n\nexport async function writeDebugHtmlAsync({\n outputDir,\n fileNames,\n}: {\n outputDir: string;\n fileNames: Record<string, string>;\n}) {\n // Make a debug html so user can debug their bundles\n const contents = `\n ${Object.values(fileNames)\n .map((fileName) => `<script src=\"${path.join('bundles', fileName)}\"></script>`)\n .join('\\n ')}\n Open up this file in Chrome. In the JavaScript developer console, navigate to the Source tab.\n You can see a red colored folder containing the original source code from your bundle.\n `;\n\n await fs.writeFile(path.join(outputDir, 'debug.html'), contents);\n return contents;\n}\n"],"names":["writeBundlesAsync","writeSourceMapsAsync","writeMetadataJsonAsync","writeAssetMapAsync","writeDebugHtmlAsync","debug","require","createBundleFileName","platform","format","hash","createBundleHash","bundle","crypto","createHash","update","digest","bundles","outputDir","useServerRendering","hashes","fileNames","bundleOutput","Object","entries","hermesBytecodeBundle","code","fileName","fs","writeFile","path","join","Promise","all","map","sourceMap","hermesSourcemap","mapName","jsBundleFileName","jsPath","mappingComment","appendFile","comment","filter","Boolean","contents","createMetadataJson","metadataPath","JSON","stringify","assets","fromEntries","asset","values"],"mappings":"AAAA;;;;QAqCsBA,iBAAiB,GAAjBA,iBAAiB;QA4CjBC,oBAAoB,GAApBA,oBAAoB;QAoDpBC,sBAAsB,GAAtBA,sBAAsB;QAmBtBC,kBAAkB,GAAlBA,kBAAkB;QAalBC,mBAAmB,GAAnBA,mBAAmB;AApKtB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;AACZ,IAAA,SAAa,kCAAb,aAAa,E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jB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/export/writeContents.ts"],"sourcesContent":["import { Platform } from '@expo/config';\nimport crypto from 'crypto';\nimport fs from 'fs/promises';\nimport path from 'path';\n\nimport { createMetadataJson } from './createMetadataJson';\nimport { BundleOutput } from './fork-bundleAsync';\nimport { Asset } from './saveAssets';\n\nconst debug = require('debug')('expo:export:write') as typeof console.log;\n\n/**\n * @param props.platform native platform for the bundle\n * @param props.format extension to use for the name\n * @param props.hash crypto hash for the bundle contents\n * @returns filename for the JS bundle.\n */\nfunction createBundleFileName({\n platform,\n format,\n hash,\n}: {\n platform: string;\n format: 'javascript' | 'bytecode';\n hash: string;\n}): string {\n return `${platform}-${hash}.${format === 'javascript' ? 'js' : 'hbc'}`;\n}\n\n/**\n * @param bundle JS bundle as a string\n * @returns crypto hash for the provided bundle\n */\nfunction createBundleHash(bundle: string | Uint8Array): string {\n return crypto.createHash('md5').update(bundle).digest('hex');\n}\n\nexport async function writeBundlesAsync({\n bundles,\n outputDir,\n useServerRendering,\n}: {\n bundles: Partial<Record<Platform, Pick<BundleOutput, 'hermesBytecodeBundle' | 'code'>>>;\n outputDir: string;\n useServerRendering?: boolean;\n}) {\n const hashes: Partial<Record<Platform, string>> = {};\n const fileNames: Partial<Record<Platform, string>> = {};\n\n for (const [platform, bundleOutput] of Object.entries(bundles) as [\n Platform,\n Pick<BundleOutput, 'hermesBytecodeBundle' | 'code'>,\n ][]) {\n // TODO: Move native to use the newer `_expo/...` bundle writing system.\n if (platform === 'web' && useServerRendering) {\n continue;\n }\n const bundle = bundleOutput.hermesBytecodeBundle ?? bundleOutput.code;\n const hash = createBundleHash(bundle);\n const fileName = createBundleFileName({\n platform,\n format: bundleOutput.hermesBytecodeBundle ? 'bytecode' : 'javascript',\n hash,\n });\n\n hashes[platform] = hash;\n fileNames[platform] = fileName;\n await fs.writeFile(path.join(outputDir, fileName), bundle);\n }\n\n return { hashes, fileNames };\n}\n\ntype SourceMapWriteResult = {\n platform: string;\n fileName: string;\n hash: string;\n map: string;\n comment: string;\n};\n\nexport async function writeSourceMapsAsync({\n bundles,\n hashes,\n fileNames,\n outputDir,\n}: {\n bundles: Partial<\n Record<string, Pick<BundleOutput, 'hermesSourcemap' | 'map' | 'hermesBytecodeBundle' | 'code'>>\n >;\n hashes?: Record<string, string | undefined>;\n fileNames?: Record<string, string | undefined>;\n outputDir: string;\n}): Promise<SourceMapWriteResult[]> {\n return (\n await Promise.all(\n Object.entries(bundles).map(async ([platform, bundle]) => {\n if (!bundle) return null;\n const sourceMap = bundle.hermesSourcemap ?? bundle.map;\n if (!sourceMap) {\n debug(`Skip writing sourcemap (platform: ${platform})`);\n return null;\n }\n\n const hash =\n hashes?.[platform] ?? createBundleHash(bundle.hermesBytecodeBundle ?? bundle.code!);\n const mapName = `${platform}-${hash}.map`;\n await fs.writeFile(path.join(outputDir, mapName), sourceMap);\n\n const jsBundleFileName =\n fileNames?.[platform] ??\n createBundleFileName({\n platform,\n format: bundle.hermesBytecodeBundle ? 'bytecode' : 'javascript',\n hash,\n });\n const jsPath = path.join(outputDir, jsBundleFileName);\n\n // Add correct mapping to sourcemap paths\n const mappingComment = `\\n//# sourceMappingURL=${mapName}`;\n await fs.appendFile(jsPath, mappingComment);\n return {\n platform,\n fileName: mapName,\n hash,\n map: sourceMap,\n comment: mappingComment,\n };\n })\n )\n ).filter(Boolean) as SourceMapWriteResult[];\n}\n\nexport async function writeMetadataJsonAsync({\n outputDir,\n bundles,\n fileNames,\n}: {\n outputDir: string;\n bundles: Record<string, Pick<BundleOutput, 'assets'> | undefined>;\n fileNames: Record<string, string | undefined>;\n}) {\n const contents = createMetadataJson({\n bundles,\n fileNames,\n });\n const metadataPath = path.join(outputDir, 'metadata.json');\n debug(`Writing metadata.json to ${metadataPath}`);\n await fs.writeFile(metadataPath, JSON.stringify(contents));\n return contents;\n}\n\nexport async function writeAssetMapAsync({\n outputDir,\n assets,\n}: {\n outputDir: string;\n assets: Asset[];\n}) {\n // Convert the assets array to a k/v pair where the asset hash is the key and the asset is the value.\n const contents = Object.fromEntries(assets.map((asset) => [asset.hash, asset]));\n await fs.writeFile(path.join(outputDir, 'assetmap.json'), JSON.stringify(contents));\n return contents;\n}\n\nexport async function writeDebugHtmlAsync({\n outputDir,\n fileNames,\n}: {\n outputDir: string;\n fileNames: Record<string, string | undefined>;\n}) {\n // Make a debug html so user can debug their bundles\n const contents = `\n ${Object.values(fileNames)\n .filter((value) => value != null)\n .map((fileName) => `<script src=\"${path.join('bundles', fileName!)}\"></script>`)\n .join('\\n ')}\n Open up this file in Chrome. In the JavaScript developer console, navigate to the Source tab.\n You can see a red colored folder containing the original source code from your bundle.\n `;\n\n await fs.writeFile(path.join(outputDir, 'debug.html'), contents);\n return contents;\n}\n"],"names":["writeBundlesAsync","writeSourceMapsAsync","writeMetadataJsonAsync","writeAssetMapAsync","writeDebugHtmlAsync","debug","require","createBundleFileName","platform","format","hash","createBundleHash","bundle","crypto","createHash","update","digest","bundles","outputDir","useServerRendering","hashes","fileNames","bundleOutput","Object","entries","hermesBytecodeBundle","code","fileName","fs","writeFile","path","join","Promise","all","map","sourceMap","hermesSourcemap","mapName","jsBundleFileName","jsPath","mappingComment","appendFile","comment","filter","Boolean","contents","createMetadataJson","metadataPath","JSON","stringify","assets","fromEntries","asset","values","value"],"mappings":"AAAA;;;;QAqCsBA,iBAAiB,GAAjBA,iBAAiB;QA4CjBC,oBAAoB,GAApBA,oBAAoB;QAoDpBC,sBAAsB,GAAtBA,sBAAsB;QAmBtBC,kBAAkB,GAAlBA,kBAAkB;QAalBC,mBAAmB,GAAnBA,mBAAmB;AApKtB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;AACZ,IAAA,SAAa,kCAAb,aAAa,EAAA;AACX,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEY,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;;;;;;AAIzD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,AAAs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sync(projectRoot, { packages , packageManager , sdkVe
|
|
|
139
139
|
* This should be dropped in favor of autolinking in the future.
|
|
140
140
|
*/ async function applyPluginsAsync(projectRoot, packages) {
|
|
141
141
|
const { autoAddConfigPluginsAsync } = await Promise.resolve().then(function() {
|
|
142
|
-
return _interopRequireWildcard(require("./utils/autoAddConfigPlugins"));
|
|
142
|
+
return _interopRequireWildcard(require("./utils/autoAddConfigPlugins.js"));
|
|
143
143
|
});
|
|
144
144
|
try {
|
|
145
145
|
const { exp } = (0, _config).getConfig(projectRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/install/installAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\n\nimport { checkPackagesAsync } from './checkPackages';\nimport { Options } from './resolveOptions';\nimport * as Log from '../log';\nimport {\n getOperationLog,\n getVersionedPackagesAsync,\n} from '../start/doctor/dependencies/getVersionedPackages';\nimport { getVersionedDependenciesAsync } from '../start/doctor/dependencies/validateDependenciesVersions';\nimport { groupBy } from '../utils/array';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { learnMore } from '../utils/link';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { joinWithCommasAnd } from '../utils/strings';\n\nexport async function installAsync(\n packages: string[],\n options: Options & { projectRoot?: string },\n packageManagerArguments: string[] = []\n) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo install` from a subdirectory of the project.\n const projectRoot = options.projectRoot ?? findUpProjectRootOrAssert(process.cwd());\n require('@expo/env').load(projectRoot);\n\n // Resolve the package manager used by the project, or based on the provided arguments.\n const packageManager = PackageManager.createForProject(projectRoot, {\n npm: options.npm,\n yarn: options.yarn,\n bun: options.bun,\n pnpm: options.pnpm,\n silent: options.silent,\n log: Log.log,\n });\n\n if (options.check || options.fix) {\n return await checkPackagesAsync(projectRoot, {\n packages,\n options,\n packageManager,\n packageManagerArguments,\n });\n }\n\n // Read the project Expo config without plugins.\n const { exp } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n // Resolve the versioned packages, then install them.\n return installPackagesAsync(projectRoot, {\n packageManager,\n packages,\n packageManagerArguments,\n sdkVersion: exp.sdkVersion!,\n });\n}\n\n/** Version packages and install in a project. */\nexport async function installPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n }: {\n /**\n * List of packages to version, grouped by the type of dependency.\n * @example ['uuid', 'react-native-reanimated@latest']\n */\n packages: string[];\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n // Read the project Expo config without plugins.\n const { pkg } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n //assertNotInstallingExcludedPackages(projectRoot, packages, pkg);\n\n const versioning = await getVersionedPackagesAsync(projectRoot, {\n packages,\n // sdkVersion is always defined because we don't skipSDKVersionRequirement in getConfig.\n sdkVersion,\n pkg,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioning.messages.length ? versioning.messages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (versioning.excludedNativeModules.length) {\n Log.log(\n chalk`\\u203A Using latest version instead of ${joinWithCommasAnd(\n versioning.excludedNativeModules.map(\n ({ bundledNativeVersion, name }) => `${bundledNativeVersion} for ${name}`\n )\n )} because ${\n versioning.excludedNativeModules.length > 1 ? 'they are' : 'it is'\n } listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n\n await packageManager.addAsync([...packageManagerArguments, ...versioning.packages]);\n\n await applyPluginsAsync(projectRoot, versioning.packages);\n}\n\nexport async function fixPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n }: {\n packages: Awaited<ReturnType<typeof getVersionedDependenciesAsync>>;\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n if (!packages.length) {\n return;\n }\n\n const { dependencies = [], devDependencies = [] } = groupBy(packages, (dep) => dep.packageType);\n const versioningMessages = getOperationLog({\n othersCount: 0, // All fixable packages are versioned\n nativeModulesCount: packages.length,\n sdkVersion,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioningMessages.length ? versioningMessages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (dependencies.length) {\n const versionedPackages = dependencies.map(\n (dep) => `${dep.packageName}@${dep.expectedVersionOrRange}`\n );\n\n await packageManager.addAsync([...packageManagerArguments, ...versionedPackages]);\n\n await applyPluginsAsync(projectRoot, versionedPackages);\n }\n\n if (devDependencies.length) {\n await packageManager.addDevAsync([\n ...packageManagerArguments,\n ...devDependencies.map((dep) => `${dep.packageName}@${dep.expectedVersionOrRange}`),\n ]);\n }\n}\n\n/**\n * A convenience feature for automatically applying Expo Config Plugins to the `app.json` after installing them.\n * This should be dropped in favor of autolinking in the future.\n */\nasync function applyPluginsAsync(projectRoot: string, packages: string[]) {\n const { autoAddConfigPluginsAsync } = await import('./utils/autoAddConfigPlugins');\n\n try {\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n\n // Only auto add plugins if the plugins array is defined or if the project is using SDK +42.\n await autoAddConfigPluginsAsync(\n projectRoot,\n exp,\n // Split any possible NPM tags. i.e. `expo@latest` -> `expo`\n packages.map((pkg) => pkg.split('@')[0]).filter(Boolean)\n );\n } catch (error: any) {\n // If we fail to apply plugins, the log a warning and continue.\n if (error.isPluginError) {\n Log.warn(`Skipping config plugin check: ` + error.message);\n return;\n }\n // Any other error, rethrow.\n throw error;\n }\n}\n"],"names":["installAsync","installPackagesAsync","fixPackagesAsync","PackageManager","Log","packages","options","packageManagerArguments","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","packageManager","createForProject","npm","yarn","bun","pnpm","silent","log","check","fix","checkPackagesAsync","exp","getConfig","skipPlugins","sdkVersion","pkg","versioning","getVersionedPackagesAsync","chalk","messages","length","join","name","excludedNativeModules","joinWithCommasAnd","map","bundledNativeVersion","learnMore","addAsync","applyPluginsAsync","dependencies","devDependencies","groupBy","dep","packageType","versioningMessages","getOperationLog","othersCount","nativeModulesCount","versionedPackages","packageName","expectedVersionOrRange","addDevAsync","autoAddConfigPluginsAsync","skipSDKVersionRequirement","split","filter","Boolean","error","isPluginError","warn","message"],"mappings":"AAAA;;;;QAkBsBA,YAAY,GAAZA,YAAY;QA+CZC,oBAAoB,GAApBA,oBAAoB;QAoEpBC,gBAAgB,GAAhBA,gBAAgB;AArIZ,IAAA,OAAc,WAAd,cAAc,CAAA;AAC5BC,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACR,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEU,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AAExCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AAIR,IAAA,qBAAmD,WAAnD,mDAAmD,CAAA;AAElC,IAAA,MAAgB,WAAhB,gBAAgB,CAAA;AACE,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AACjC,IAAA,KAAe,WAAf,eAAe,CAAA;AACd,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACX,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;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C/D,IAAIA,KAAK,CAACC,aAAa,EAAE;YACvB5D,GAAG,CAAC6D,IAAI,CAAC,CAAC,8BAA8B,CAAC,GAAGF,KAAK,CAACG,OAAO,CAAC,CAAC;YAC3D,OAAO;SACR;QACD,4BAA4B;QAC5B,MAAMH,KAAK,CAAC;KACb;CACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/install/installAsync.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\n\nimport { checkPackagesAsync } from './checkPackages';\nimport { Options } from './resolveOptions';\nimport * as Log from '../log';\nimport {\n getOperationLog,\n getVersionedPackagesAsync,\n} from '../start/doctor/dependencies/getVersionedPackages';\nimport { getVersionedDependenciesAsync } from '../start/doctor/dependencies/validateDependenciesVersions';\nimport { groupBy } from '../utils/array';\nimport { findUpProjectRootOrAssert } from '../utils/findUp';\nimport { learnMore } from '../utils/link';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { joinWithCommasAnd } from '../utils/strings';\n\nexport async function installAsync(\n packages: string[],\n options: Options & { projectRoot?: string },\n packageManagerArguments: string[] = []\n) {\n setNodeEnv('development');\n // Locate the project root based on the process current working directory.\n // This enables users to run `npx expo install` from a subdirectory of the project.\n const projectRoot = options.projectRoot ?? findUpProjectRootOrAssert(process.cwd());\n require('@expo/env').load(projectRoot);\n\n // Resolve the package manager used by the project, or based on the provided arguments.\n const packageManager = PackageManager.createForProject(projectRoot, {\n npm: options.npm,\n yarn: options.yarn,\n bun: options.bun,\n pnpm: options.pnpm,\n silent: options.silent,\n log: Log.log,\n });\n\n if (options.check || options.fix) {\n return await checkPackagesAsync(projectRoot, {\n packages,\n options,\n packageManager,\n packageManagerArguments,\n });\n }\n\n // Read the project Expo config without plugins.\n const { exp } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n // Resolve the versioned packages, then install them.\n return installPackagesAsync(projectRoot, {\n packageManager,\n packages,\n packageManagerArguments,\n sdkVersion: exp.sdkVersion!,\n });\n}\n\n/** Version packages and install in a project. */\nexport async function installPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n }: {\n /**\n * List of packages to version, grouped by the type of dependency.\n * @example ['uuid', 'react-native-reanimated@latest']\n */\n packages: string[];\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n // Read the project Expo config without plugins.\n const { pkg } = getConfig(projectRoot, {\n // Sometimes users will add a plugin to the config before installing the library,\n // this wouldn't work unless we dangerously disable plugin serialization.\n skipPlugins: true,\n });\n\n //assertNotInstallingExcludedPackages(projectRoot, packages, pkg);\n\n const versioning = await getVersionedPackagesAsync(projectRoot, {\n packages,\n // sdkVersion is always defined because we don't skipSDKVersionRequirement in getConfig.\n sdkVersion,\n pkg,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioning.messages.length ? versioning.messages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (versioning.excludedNativeModules.length) {\n Log.log(\n chalk`\\u203A Using latest version instead of ${joinWithCommasAnd(\n versioning.excludedNativeModules.map(\n ({ bundledNativeVersion, name }) => `${bundledNativeVersion} for ${name}`\n )\n )} because ${\n versioning.excludedNativeModules.length > 1 ? 'they are' : 'it is'\n } listed in {bold expo.install.exclude} in package.json. ${learnMore(\n 'https://expo.dev/more/expo-cli/#configuring-dependency-validation'\n )}`\n );\n }\n\n await packageManager.addAsync([...packageManagerArguments, ...versioning.packages]);\n\n await applyPluginsAsync(projectRoot, versioning.packages);\n}\n\nexport async function fixPackagesAsync(\n projectRoot: string,\n {\n packages,\n packageManager,\n sdkVersion,\n packageManagerArguments,\n }: {\n packages: Awaited<ReturnType<typeof getVersionedDependenciesAsync>>;\n /** Package manager to use when installing the versioned packages. */\n packageManager: PackageManager.NodePackageManager;\n /**\n * SDK to version `packages` for.\n * @example '44.0.0'\n */\n sdkVersion: string;\n /**\n * Extra parameters to pass to the `packageManager` when installing versioned packages.\n * @example ['--no-save']\n */\n packageManagerArguments: string[];\n }\n): Promise<void> {\n if (!packages.length) {\n return;\n }\n\n const { dependencies = [], devDependencies = [] } = groupBy(packages, (dep) => dep.packageType);\n const versioningMessages = getOperationLog({\n othersCount: 0, // All fixable packages are versioned\n nativeModulesCount: packages.length,\n sdkVersion,\n });\n\n Log.log(\n chalk`\\u203A Installing ${\n versioningMessages.length ? versioningMessages.join(' and ') + ' ' : ''\n }using {bold ${packageManager.name}}`\n );\n\n if (dependencies.length) {\n const versionedPackages = dependencies.map(\n (dep) => `${dep.packageName}@${dep.expectedVersionOrRange}`\n );\n\n await packageManager.addAsync([...packageManagerArguments, ...versionedPackages]);\n\n await applyPluginsAsync(projectRoot, versionedPackages);\n }\n\n if (devDependencies.length) {\n await packageManager.addDevAsync([\n ...packageManagerArguments,\n ...devDependencies.map((dep) => `${dep.packageName}@${dep.expectedVersionOrRange}`),\n ]);\n }\n}\n\n/**\n * A convenience feature for automatically applying Expo Config Plugins to the `app.json` after installing them.\n * This should be dropped in favor of autolinking in the future.\n */\nasync function applyPluginsAsync(projectRoot: string, packages: string[]) {\n const { autoAddConfigPluginsAsync } = await import('./utils/autoAddConfigPlugins.js');\n\n try {\n const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true });\n\n // Only auto add plugins if the plugins array is defined or if the project is using SDK +42.\n await autoAddConfigPluginsAsync(\n projectRoot,\n exp,\n // Split any possible NPM tags. i.e. `expo@latest` -> `expo`\n packages.map((pkg) => pkg.split('@')[0]).filter(Boolean)\n );\n } catch (error: any) {\n // If we fail to apply plugins, the log a warning and continue.\n if (error.isPluginError) {\n Log.warn(`Skipping config plugin check: ` + error.message);\n return;\n }\n // Any other error, rethrow.\n throw error;\n }\n}\n"],"names":["installAsync","installPackagesAsync","fixPackagesAsync","PackageManager","Log","packages","options","packageManagerArguments","setNodeEnv","projectRoot","findUpProjectRootOrAssert","process","cwd","require","load","packageManager","createForProject","npm","yarn","bun","pnpm","silent","log","check","fix","checkPackagesAsync","exp","getConfig","skipPlugins","sdkVersion","pkg","versioning","getVersionedPackagesAsync","chalk","messages","length","join","name","excludedNativeModules","joinWithCommasAnd","map","bundledNativeVersion","learnMore","addAsync","applyPluginsAsync","dependencies","devDependencies","groupBy","dep","packageType","versioningMessages","getOperationLog","othersCount","nativeModulesCount","versionedPackages","packageName","expectedVersionOrRange","addDevAsync","autoAddConfigPluginsAsync","skipSDKVersionRequirement","split","filter","Boolean","error","isPluginError","warn","message"],"mappings":"AAAA;;;;QAkBsBA,YAAY,GAAZA,YAAY;QA+CZC,oBAAoB,GAApBA,oBAAoB;QAoEpBC,gBAAgB,GAAhBA,gBAAgB;AArIZ,IAAA,OAAc,WAAd,cAAc,CAAA;AAC5BC,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACR,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEU,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AAExCC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AAIR,IAAA,qBAAmD,WAAnD,mDAAmD,CAAA;AAElC,IAAA,MAAgB,WAAhB,gBAAgB,CAAA;AACE,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AACjC,IAAA,KAAe,WAAf,eAAe,CAAA;AACd,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACX,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7C,eAAeJ,YAAY,CAChCK,QAAkB,EAClBC,OAA2C,EAC3CC,uBAAiC,GAAG,EAAE,EACtC;IACAC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;QA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;QAC5B,MAAMH,KAAK,CAAC;KACb;CACF"}
|
package/build/src/login/index.js
CHANGED
|
@@ -52,7 +52,7 @@ const expoLogin = async (argv)=>{
|
|
|
52
52
|
].join("\n"));
|
|
53
53
|
}
|
|
54
54
|
const { showLoginPromptAsync } = await Promise.resolve().then(function() {
|
|
55
|
-
return _interopRequireWildcard(require("../api/user/actions"));
|
|
55
|
+
return _interopRequireWildcard(require("../api/user/actions.js"));
|
|
56
56
|
});
|
|
57
57
|
return showLoginPromptAsync({
|
|
58
58
|
// Parsed options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/login/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogin: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--username': String,\n '--password': String,\n '--otp': String,\n '--sso': Boolean,\n // Aliases\n '-h': '--help',\n '-u': '--username',\n '-p': '--password',\n '-s': '--sso',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log in to an Expo account`,\n `npx expo login`,\n [\n `-u, --username <string> Username`,\n `-p, --password <string> Password`,\n `--otp <string> One-time password from your 2FA device`,\n // hiding from help until SSO is public\n // `-s, --sso Log in with SSO`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const { showLoginPromptAsync } = await import('../api/user/actions');\n return showLoginPromptAsync({\n // Parsed options\n username: args['--username'],\n password: args['--password'],\n otp: args['--otp'],\n sso: !!args['--sso'],\n }).catch(logCmdError);\n};\n"],"names":["expoLogin","argv","args","assertArgs","Boolean","String","printHelp","join","showLoginPromptAsync","username","password","otp","sso","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,SAAS,GAAY,OAAOC,IAAI,GAAK;IAChD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAetB,CAAA,WAfsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,OAAO,EAAEA,MAAM;QACf,OAAO,EAAED,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,OAAO;KACd,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,CAAAA,GAAAA,KAAS,AAWR,CAAA,UAXQ,CACP,CAAC,yBAAyB,CAAC,EAC3B,CAAC,cAAc,CAAC,EAChB;YACE,CAAC,iCAAiC,CAAC;YACnC,CAAC,iCAAiC,CAAC;YACnC,CAAC,+DAA+D,CAAC;YACjE,uCAAuC;YACvC,8CAA8C;YAC9C,CAAC,mCAAmC,CAAC;SACtC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAM,EAAEC,oBAAoB,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/login/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogin: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--username': String,\n '--password': String,\n '--otp': String,\n '--sso': Boolean,\n // Aliases\n '-h': '--help',\n '-u': '--username',\n '-p': '--password',\n '-s': '--sso',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log in to an Expo account`,\n `npx expo login`,\n [\n `-u, --username <string> Username`,\n `-p, --password <string> Password`,\n `--otp <string> One-time password from your 2FA device`,\n // hiding from help until SSO is public\n // `-s, --sso Log in with SSO`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const { showLoginPromptAsync } = await import('../api/user/actions.js');\n return showLoginPromptAsync({\n // Parsed options\n username: args['--username'],\n password: args['--password'],\n otp: args['--otp'],\n sso: !!args['--sso'],\n }).catch(logCmdError);\n};\n"],"names":["expoLogin","argv","args","assertArgs","Boolean","String","printHelp","join","showLoginPromptAsync","username","password","otp","sso","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,SAAS,GAAY,OAAOC,IAAI,GAAK;IAChD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAetB,CAAA,WAfsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,OAAO,EAAEA,MAAM;QACf,OAAO,EAAED,OAAO;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,OAAO;KACd,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,CAAAA,GAAAA,KAAS,AAWR,CAAA,UAXQ,CACP,CAAC,yBAAyB,CAAC,EAC3B,CAAC,cAAc,CAAC,EAChB;YACE,CAAC,iCAAiC,CAAC;YACnC,CAAC,iCAAiC,CAAC;YACnC,CAAC,+DAA+D,CAAC;YACjE,uCAAuC;YACvC,8CAA8C;YAC9C,CAAC,mCAAmC,CAAC;SACtC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAM,EAAEC,oBAAoB,CAAA,EAAE,GAAG,MAAM;+CAAO,wBAAwB;MAAC,AAAC;IACxE,OAAOA,oBAAoB,CAAC;QAC1B,iBAAiB;QACjBC,QAAQ,EAAEP,IAAI,CAAC,YAAY,CAAC;QAC5BQ,QAAQ,EAAER,IAAI,CAAC,YAAY,CAAC;QAC5BS,GAAG,EAAET,IAAI,CAAC,OAAO,CAAC;QAClBU,GAAG,EAAE,CAAC,CAACV,IAAI,CAAC,OAAO,CAAC;KACrB,CAAC,CAACW,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACvB,AAAC;QAzCWd,SAAS,GAATA,SAAS"}
|
|
@@ -39,7 +39,7 @@ const expoLogout = async (argv)=>{
|
|
|
39
39
|
`-h, --help Usage info`);
|
|
40
40
|
}
|
|
41
41
|
const { logoutAsync } = await Promise.resolve().then(function() {
|
|
42
|
-
return _interopRequireWildcard(require("../api/user/user"));
|
|
42
|
+
return _interopRequireWildcard(require("../api/user/user.js"));
|
|
43
43
|
});
|
|
44
44
|
return logoutAsync().catch(_errors.logCmdError);
|
|
45
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/logout/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogout: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log out of an Expo account`,\n `npx expo logout`,\n // options\n `-h, --help Usage info`\n );\n }\n\n const { logoutAsync } = await import('../api/user/user');\n return logoutAsync().catch(logCmdError);\n};\n"],"names":["expoLogout","argv","args","assertArgs","Boolean","printHelp","logoutAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAGsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,0BAA0B,CAAC,EAC5B,CAAC,eAAe,CAAC,EACjB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/logout/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoLogout: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Log out of an Expo account`,\n `npx expo logout`,\n // options\n `-h, --help Usage info`\n );\n }\n\n const { logoutAsync } = await import('../api/user/user.js');\n return logoutAsync().catch(logCmdError);\n};\n"],"names":["expoLogout","argv","args","assertArgs","Boolean","printHelp","logoutAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAGsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,0BAA0B,CAAC,EAC5B,CAAC,eAAe,CAAC,EACjB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,qBAAqB;MAAC,AAAC;IAC5D,OAAOA,WAAW,EAAE,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACzC,AAAC;QAtBWR,UAAU,GAAVA,UAAU"}
|
|
@@ -71,13 +71,13 @@ const expoPrebuild = async (argv)=>{
|
|
|
71
71
|
{ resolvePlatformOption , resolvePackageManagerOptions , resolveSkipDependencyUpdate }, // ../utils/errors
|
|
72
72
|
{ logCmdError }, ] = await Promise.all([
|
|
73
73
|
Promise.resolve().then(function() {
|
|
74
|
-
return _interopRequireWildcard(require("./prebuildAsync"));
|
|
74
|
+
return _interopRequireWildcard(require("./prebuildAsync.js"));
|
|
75
75
|
}),
|
|
76
76
|
Promise.resolve().then(function() {
|
|
77
|
-
return _interopRequireWildcard(require("./resolveOptions"));
|
|
77
|
+
return _interopRequireWildcard(require("./resolveOptions.js"));
|
|
78
78
|
}),
|
|
79
79
|
Promise.resolve().then(function() {
|
|
80
|
-
return _interopRequireWildcard(require("../utils/errors"));
|
|
80
|
+
return _interopRequireWildcard(require("../utils/errors.js"));
|
|
81
81
|
}),
|
|
82
82
|
]);
|
|
83
83
|
return (()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync'),\n import('./resolveOptions'),\n import('../utils/errors'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAmBtB,CAAA,WAnBsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;KACf,EACDJ,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBI,CAAAA,GAAAA,KAAS,AAgBR,CAAA,UAhBQ,CACP,CAAC,iEAAiE,CAAC,EACnEC,MAAK,QAAA,CAAC,6BAA6B,CAAC,EACpC;YACEA,MAAK,QAAA,CAAC,gHAAgH,CAAC;YACvH,CAAC,mFAAmF,CAAC;YACrF,CAAC,8GAA8G,CAAC;YAChHA,MAAK,QAAA,CAAC,qHAAqH,CAAC;YAC5HA,MAAK,QAAA,CAAC,8GAA8G,CAAC;YACrHA,MAAK,QAAA,CAAC,6GAA6G,CAAC;YACpHA,MAAK,QAAA,CAAC,mHAAmH,CAAC;YAC1H,CAAC,gIAAgI,CAAC;YAClIA,MAAK,QAAA,CAAC,iGAAiG,CAAC;YACxG,CAAC,qHAAqH,CAAC;YACvH,CAAC,mDAAmD,CAAC;SACtD,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,0FAA0F;IAC1F,MAAM,CACJ,kBAAkB;IAClB,EAAEC,aAAa,CAAA,EAAE,EACjB,mBAAmB;IACnB,EAAEC,qBAAqB,CAAA,EAAEC,4BAA4B,CAAA,EAAEC,2BAA2B,CAAA,EAAE,EACpF,kBAAkB;IAClB,EAAEC,WAAW,CAAA,EAAE,GAChB,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC;QACpB;mDAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/prebuild/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\n\nexport const expoPrebuild: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clean': Boolean,\n '--npm': Boolean,\n '--pnpm': Boolean,\n '--yarn': Boolean,\n '--bun': Boolean,\n '--no-install': Boolean,\n '--template': String,\n '--platform': String,\n '--skip-dependency-update': String,\n // Aliases\n '-h': '--help',\n '-p': '--platform',\n '-t': '--type',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Create native iOS and Android project files for building natively`,\n chalk`npx expo prebuild {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--no-install Skip installing npm packages and CocoaPods`,\n `--clean Delete the native folders and regenerate them before applying changes`,\n chalk`--npm Use npm to install dependencies. {dim Default when package-lock.json exists}`,\n chalk`--yarn Use Yarn to install dependencies. {dim Default when yarn.lock exists}`,\n chalk`--bun Use bun to install dependencies. {dim Default when bun.lockb exists}`,\n chalk`--pnpm Use pnpm to install dependencies. {dim Default when pnpm-lock.yaml exists}`,\n `--template <template> Project template to clone from. File path pointing to a local tar file or a github repo`,\n chalk`-p, --platform <all|android|ios> Platforms to sync: ios, android, all. {dim Default: all}`,\n `--skip-dependency-update <dependencies> Preserves versions of listed packages in package.json (comma separated list)`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n // Load modules after the help prompt so `npx expo prebuild -h` shows as fast as possible.\n const [\n // ./prebuildAsync\n { prebuildAsync },\n // ./resolveOptions\n { resolvePlatformOption, resolvePackageManagerOptions, resolveSkipDependencyUpdate },\n // ../utils/errors\n { logCmdError },\n ] = await Promise.all([\n import('./prebuildAsync.js'),\n import('./resolveOptions.js'),\n import('../utils/errors.js'),\n ]);\n\n return (() => {\n return prebuildAsync(getProjectRoot(args), {\n // Parsed options\n clean: args['--clean'],\n\n packageManager: resolvePackageManagerOptions(args),\n install: !args['--no-install'],\n platforms: resolvePlatformOption(args['--platform']),\n // TODO: Parse\n skipDependencyUpdate: resolveSkipDependencyUpdate(args['--skip-dependency-update']),\n template: args['--template'],\n });\n })().catch(logCmdError);\n};\n"],"names":["expoPrebuild","argv","args","assertArgs","Boolean","String","printHelp","chalk","join","prebuildAsync","resolvePlatformOption","resolvePackageManagerOptions","resolveSkipDependencyUpdate","logCmdError","Promise","all","getProjectRoot","clean","packageManager","install","platforms","skipDependencyUpdate","template","catch"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAmBtB,CAAA,WAnBsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,OAAO,EAAEA,OAAO;QAChB,QAAQ,EAAEA,OAAO;QACjB,QAAQ,EAAEA,OAAO;QACjB,OAAO,EAAEA,OAAO;QAChB,cAAc,EAAEA,OAAO;QACvB,YAAY,EAAEC,MAAM;QACpB,YAAY,EAAEA,MAAM;QACpB,0BAA0B,EAAEA,MAAM;QAClC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,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AClDiB,OAAO,EAAE,CAACjB,IAAI,CAAC,cAAc,CAAC;YAC9BkB,SAAS,EAAEV,qBAAqB,CAACR,IAAI,CAAC,YAAY,CAAC,CAAC;YACpD,cAAc;YACdmB,oBAAoB,EAAET,2BAA2B,CAACV,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACnFoB,QAAQ,EAAEpB,IAAI,CAAC,YAAY,CAAC;SAC7B,CAAC,CAAC;KACJ,CAAC,EAAE,CAACqB,KAAK,CAACV,WAAW,CAAC,CAAC;CACzB,AAAC;QArEWb,YAAY,GAAZA,YAAY"}
|
|
@@ -41,7 +41,7 @@ async function prebuildAsync(projectRoot, options) {
|
|
|
41
41
|
require("@expo/env").load(projectRoot);
|
|
42
42
|
if (options.clean) {
|
|
43
43
|
const { maybeBailOnGitStatusAsync } = await Promise.resolve().then(function() {
|
|
44
|
-
return _interopRequireWildcard(require("../utils/git"));
|
|
44
|
+
return _interopRequireWildcard(require("../utils/git.js"));
|
|
45
45
|
});
|
|
46
46
|
// Clean the project folders...
|
|
47
47
|
if (await maybeBailOnGitStatusAsync()) {
|
|
@@ -99,7 +99,7 @@ async function prebuildAsync(projectRoot, options) {
|
|
|
99
99
|
// err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.
|
|
100
100
|
if (options.platforms.includes("ios") && options.install && needsPodInstall) {
|
|
101
101
|
const { installCocoaPodsAsync } = await Promise.resolve().then(function() {
|
|
102
|
-
return _interopRequireWildcard(require("../utils/cocoapods"));
|
|
102
|
+
return _interopRequireWildcard(require("../utils/cocoapods.js"));
|
|
103
103
|
});
|
|
104
104
|
podsInstalled = await installCocoaPodsAsync(projectRoot);
|
|
105
105
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, hasNewDependencies } = await updateFromTemplateAsync(\n projectRoot,\n {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n }\n );\n\n // Install node modules\n if (options.install) {\n if (hasNewDependencies && options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Config syncing');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n });\n configSyncingStep.succeed('Config synced');\n } catch (error) {\n configSyncingStep.fail('Config sync failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","hasNewDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","packageManager","npm","clearNodeModulesAsync","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QAuCsBA,aAAa,GAAbA,aAAa;AApC0C,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAE1C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IAEvC,IAAIC,OAAO,CAACG,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\n\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\nimport { installAsync } from '../install/installAsync';\nimport { env } from '../utils/env';\nimport { setNodeEnv } from '../utils/nodeEnv';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n bun?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n setNodeEnv('development');\n require('@expo/env').load(projectRoot);\n\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git.js');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, hasNewDependencies } = await updateFromTemplateAsync(\n projectRoot,\n {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n }\n );\n\n // Install node modules\n if (options.install) {\n if (hasNewDependencies && options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n await installAsync([], {\n npm: !!options.packageManager?.npm,\n yarn: !!options.packageManager?.yarn,\n pnpm: !!options.packageManager?.pnpm,\n bun: !!options.packageManager?.bun,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Config syncing');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n });\n configSyncingStep.succeed('Config synced');\n } catch (error) {\n configSyncingStep.fail('Config sync failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods.js');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","setNodeEnv","load","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","hasNewDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","packageManager","npm","clearNodeModulesAsync","installAsync","yarn","pnpm","bun","silent","env","EXPO_DEBUG","CI","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QAuCsBA,aAAa,GAAbA,aAAa;AApC0C,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;AACjC,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAc,WAAd,cAAc,CAAA;AACP,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACP,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAE1C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAkBC,EACgC;IACjCC,CAAAA,GAAAA,QAAU,AAAe,CAAA,WAAf,CAAC,aAAa,CAAC,CAAC;IAC1BH,OAAO,CAAC,WAAW,CAAC,CAACI,IAAI,CAACH,WAAW,CAAC,CAAC;IAEvC,IAAIC,OAAO,CAACG,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,iBAAiB;UAAC,AAAC;QACt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AAgB,CAAC,AAAC;IAC1D,IAAI;QACF,MAAMC,CAAAA,GAAAA,QAAO,AAAuB,CAAA,QAAvB,CAACC,sBAAqB,sBAAA,CAAC,CAACrC,WAAW,EAAE;YAChDO,SAAS,EAAEN,OAAO,CAACM,SAAS;SAC7B,CAAC,CAAC;QACH2B,iBAAiB,CAACI,OAAO,CAAC,eAAe,CAAC,CAAC;KAC5C,CAAC,OAAOC,KAAK,EAAE;QACdL,iBAAiB,CAACM,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC7C,MAAMD,KAAK,CAAC;KACb;IAED,oBAAoB;IACpB,IAAIE,aAAa,GAAY,KAAK,AAAC;IACnC,8GAA8G;IAC9G,IAAIxC,OAAO,CAACM,SAAS,CAACmC,QAAQ,CAAC,KAAK,CAAC,IAAIzC,OAAO,CAACqB,OAAO,IAAIP,eAAe,EAAE;QAC3E,MAAM,EAAE4B,qBAAqB,CAAA,EAAE,GAAG,MAAM;mDAAO,uBAAuB;UAAC,AAAC;QAExEF,aAAa,GAAG,MAAME,qBAAqB,CAAC3C,WAAW,CAAC,CAAC;KAC1D,MAAM;QACLF,KAAK,CAAC,qBAAqB,CAAC,CAAC;KAC9B;IAED,OAAO;QACL8C,WAAW,EAAE,CAAC,CAAC3C,OAAO,CAACqB,OAAO;QAC9BuB,UAAU,EAAE,CAACJ,aAAa;QAC1BlC,SAAS,EAAEN,OAAO,CAACM,SAAS;QAC5BO,kBAAkB;QAClBH,GAAG;KACJ,CAAC;CACH"}
|
|
@@ -39,7 +39,7 @@ const expoRegister = async (argv)=>{
|
|
|
39
39
|
`-h, --help Usage info`);
|
|
40
40
|
}
|
|
41
41
|
const { registerAsync } = await Promise.resolve().then(function() {
|
|
42
|
-
return _interopRequireWildcard(require("./registerAsync"));
|
|
42
|
+
return _interopRequireWildcard(require("./registerAsync.js"));
|
|
43
43
|
});
|
|
44
44
|
return registerAsync().catch(_errors.logCmdError);
|
|
45
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/register/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoRegister: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Sign up for a new Expo account`,\n `npx expo register`,\n // Options\n `-h, --help Usage info`\n );\n }\n\n const { registerAsync } = await import('./registerAsync');\n return registerAsync().catch(logCmdError);\n};\n"],"names":["expoRegister","argv","args","assertArgs","Boolean","printHelp","registerAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,8BAA8B,CAAC,EAChC,CAAC,iBAAiB,CAAC,EACnB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,aAAa,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/register/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '../../bin/cli';\nimport { assertArgs, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoRegister: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n // Aliases\n '-h': '--help',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Sign up for a new Expo account`,\n `npx expo register`,\n // Options\n `-h, --help Usage info`\n );\n }\n\n const { registerAsync } = await import('./registerAsync.js');\n return registerAsync().catch(logCmdError);\n};\n"],"names":["expoRegister","argv","args","assertArgs","Boolean","printHelp","registerAsync","catch","logCmdError"],"mappings":"AAAA;;;;;;AAEsC,IAAA,KAAe,WAAf,eAAe,CAAA;AACzB,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,YAAY,GAAY,OAAOC,IAAI,GAAK;IACnD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAQtB,CAAA,WARsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,UAAU;QACV,IAAI,EAAE,QAAQ;KACf,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBG,CAAAA,GAAAA,KAAS,AAKR,CAAA,UALQ,CACP,CAAC,8BAA8B,CAAC,EAChC,CAAC,iBAAiB,CAAC,EACnB,UAAU;QACV,CAAC,wBAAwB,CAAC,CAC3B,CAAC;KACH;IAED,MAAM,EAAEC,aAAa,CAAA,EAAE,GAAG,MAAM;+CAAO,oBAAoB;MAAC,AAAC;IAC7D,OAAOA,aAAa,EAAE,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAC3C,AAAC;QAtBWR,YAAY,GAAZA,YAAY"}
|
|
@@ -72,14 +72,14 @@ const expoRunAndroid = async (argv)=>{
|
|
|
72
72
|
`, 0);
|
|
73
73
|
}
|
|
74
74
|
const { resolveStringOrBooleanArgsAsync } = await Promise.resolve().then(function() {
|
|
75
|
-
return _interopRequireWildcard(require("../../utils/resolveArgs"));
|
|
75
|
+
return _interopRequireWildcard(require("../../utils/resolveArgs.js"));
|
|
76
76
|
});
|
|
77
77
|
const parsed = await resolveStringOrBooleanArgsAsync(argv != null ? argv : [], rawArgsMap, {
|
|
78
78
|
"--device": Boolean,
|
|
79
79
|
"-d": "--device"
|
|
80
80
|
}).catch(_errors.logCmdError);
|
|
81
81
|
const { runAndroidAsync } = await Promise.resolve().then(function() {
|
|
82
|
-
return _interopRequireWildcard(require("./runAndroidAsync"));
|
|
82
|
+
return _interopRequireWildcard(require("./runAndroidAsync.js"));
|
|
83
83
|
});
|
|
84
84
|
return runAndroidAsync(_path.default.resolve(parsed.projectRoot), {
|
|
85
85
|
// Parsed options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/run/android/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { Command } from '../../../bin/cli';\nimport * as Log from '../../log';\nimport { assertWithOptionsArgs } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoRunAndroid: Command = async (argv) => {\n const rawArgsMap: arg.Spec = {\n // Types\n '--help': Boolean,\n '--no-build-cache': Boolean,\n '--no-install': Boolean,\n '--no-bundler': Boolean,\n '--variant': String,\n\n '--port': Number,\n // Aliases\n '-p': '--port',\n\n '-h': '--help',\n };\n const args = assertWithOptionsArgs(rawArgsMap, {\n argv,\n\n permissive: true,\n });\n\n // '-d' -> '--device': Boolean,\n\n if (args['--help']) {\n Log.exit(\n chalk`\n {bold Description}\n Run the native Android app locally\n\n {bold Usage}\n $ npx expo run:android <dir>\n\n {bold Options} \n --no-build-cache Clear the native build cache\n --no-install Skip installing dependencies\n --no-bundler Skip starting the bundler\n --variant <name> Build variant. {dim Default: debug}\n -d, --device [device] Device name to run the app on\n -p, --port <port> Port to start the dev server on. {dim Default: 8081}\n -h, --help Output usage information\n`,\n 0\n );\n }\n\n const { resolveStringOrBooleanArgsAsync } = await import('../../utils/resolveArgs');\n const parsed = await resolveStringOrBooleanArgsAsync(argv ?? [], rawArgsMap, {\n '--device': Boolean,\n '-d': '--device',\n }).catch(logCmdError);\n\n const { runAndroidAsync } = await import('./runAndroidAsync');\n\n return runAndroidAsync(path.resolve(parsed.projectRoot), {\n // Parsed options\n buildCache: !args['--no-build-cache'],\n install: !args['--no-install'],\n bundler: !args['--no-bundler'],\n port: args['--port'],\n variant: args['--variant'],\n\n // Custom parsed args\n device: parsed.args['--device'],\n }).catch(logCmdError);\n};\n"],"names":["Log","expoRunAndroid","argv","rawArgsMap","Boolean","String","Number","args","assertWithOptionsArgs","permissive","exit","chalk","resolveStringOrBooleanArgsAsync","parsed","catch","logCmdError","runAndroidAsync","path","resolve","projectRoot","buildCache","install","bundler","port","variant","device"],"mappings":"AAAA;;;;;;AAEkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAGXA,IAAAA,GAAG,mCAAM,WAAW,EAAjB;AACuB,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5B,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMC,cAAc,GAAY,OAAOC,IAAI,GAAK;IACrD,MAAMC,UAAU,GAAa;QAC3B,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,kBAAkB,EAAEA,OAAO;QAC3B,cAAc,EAAEA,OAAO;QACvB,cAAc,EAAEA,OAAO;QACvB,WAAW,EAAEC,MAAM;QAEnB,QAAQ,EAAEC,MAAM;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QAEd,IAAI,EAAE,QAAQ;KACf,AAAC;IACF,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAqB,AAIhC,CAAA,sBAJgC,CAACL,UAAU,EAAE;QAC7CD,IAAI;QAEJO,UAAU,EAAE,IAAI;KACjB,CAAC,AAAC;IAEH,+BAA+B;IAE/B,IAAIF,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBP,GAAG,CAACU,IAAI,CACNC,MAAK,QAAA,CAAC;;;;;;;;;;;;;;;AAeZ,CAAC,EACK,CAAC,CACF,CAAC;KACH;IAED,MAAM,EAAEC,+BAA+B,CAAA,EAAE,GAAG,MAAM;+CAAO,
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/android/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { Command } from '../../../bin/cli';\nimport * as Log from '../../log';\nimport { assertWithOptionsArgs } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\n\nexport const expoRunAndroid: Command = async (argv) => {\n const rawArgsMap: arg.Spec = {\n // Types\n '--help': Boolean,\n '--no-build-cache': Boolean,\n '--no-install': Boolean,\n '--no-bundler': Boolean,\n '--variant': String,\n\n '--port': Number,\n // Aliases\n '-p': '--port',\n\n '-h': '--help',\n };\n const args = assertWithOptionsArgs(rawArgsMap, {\n argv,\n\n permissive: true,\n });\n\n // '-d' -> '--device': Boolean,\n\n if (args['--help']) {\n Log.exit(\n chalk`\n {bold Description}\n Run the native Android app locally\n\n {bold Usage}\n $ npx expo run:android <dir>\n\n {bold Options} \n --no-build-cache Clear the native build cache\n --no-install Skip installing dependencies\n --no-bundler Skip starting the bundler\n --variant <name> Build variant. {dim Default: debug}\n -d, --device [device] Device name to run the app on\n -p, --port <port> Port to start the dev server on. {dim Default: 8081}\n -h, --help Output usage information\n`,\n 0\n );\n }\n\n const { resolveStringOrBooleanArgsAsync } = await import('../../utils/resolveArgs.js');\n const parsed = await resolveStringOrBooleanArgsAsync(argv ?? [], rawArgsMap, {\n '--device': Boolean,\n '-d': '--device',\n }).catch(logCmdError);\n\n const { runAndroidAsync } = await import('./runAndroidAsync.js');\n\n return runAndroidAsync(path.resolve(parsed.projectRoot), {\n // Parsed options\n buildCache: !args['--no-build-cache'],\n install: !args['--no-install'],\n bundler: !args['--no-bundler'],\n port: args['--port'],\n variant: args['--variant'],\n\n // Custom parsed args\n device: parsed.args['--device'],\n }).catch(logCmdError);\n};\n"],"names":["Log","expoRunAndroid","argv","rawArgsMap","Boolean","String","Number","args","assertWithOptionsArgs","permissive","exit","chalk","resolveStringOrBooleanArgsAsync","parsed","catch","logCmdError","runAndroidAsync","path","resolve","projectRoot","buildCache","install","bundler","port","variant","device"],"mappings":"AAAA;;;;;;AAEkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAGXA,IAAAA,GAAG,mCAAM,WAAW,EAAjB;AACuB,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AAC5B,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,MAAMC,cAAc,GAAY,OAAOC,IAAI,GAAK;IACrD,MAAMC,UAAU,GAAa;QAC3B,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,kBAAkB,EAAEA,OAAO;QAC3B,cAAc,EAAEA,OAAO;QACvB,cAAc,EAAEA,OAAO;QACvB,WAAW,EAAEC,MAAM;QAEnB,QAAQ,EAAEC,MAAM;QAChB,UAAU;QACV,IAAI,EAAE,QAAQ;QAEd,IAAI,EAAE,QAAQ;KACf,AAAC;IACF,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAqB,AAIhC,CAAA,sBAJgC,CAACL,UAAU,EAAE;QAC7CD,IAAI;QAEJO,UAAU,EAAE,IAAI;KACjB,CAAC,AAAC;IAEH,+BAA+B;IAE/B,IAAIF,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBP,GAAG,CAACU,IAAI,CACNC,MAAK,QAAA,CAAC;;;;;;;;;;;;;;;AAeZ,CAAC,EACK,CAAC,CACF,CAAC;KACH;IAED,MAAM,EAAEC,+BAA+B,CAAA,EAAE,GAAG,MAAM;+CAAO,4BAA4B;MAAC,AAAC;IACvF,MAAMC,MAAM,GAAG,MAAMD,+BAA+B,CAACV,IAAI,WAAJA,IAAI,GAAI,EAAE,EAAEC,UAAU,EAAE;QAC3E,UAAU,EAAEC,OAAO;QACnB,IAAI,EAAE,UAAU;KACjB,CAAC,CAACU,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEtB,MAAM,EAAEC,eAAe,CAAA,EAAE,GAAG,MAAM;+CAAO,sBAAsB;MAAC,AAAC;IAEjE,OAAOA,eAAe,CAACC,KAAI,QAAA,CAACC,OAAO,CAACL,MAAM,CAACM,WAAW,CAAC,EAAE;QACvD,iBAAiB;QACjBC,UAAU,EAAE,CAACb,IAAI,CAAC,kBAAkB,CAAC;QACrCc,OAAO,EAAE,CAACd,IAAI,CAAC,cAAc,CAAC;QAC9Be,OAAO,EAAE,CAACf,IAAI,CAAC,cAAc,CAAC;QAC9BgB,IAAI,EAAEhB,IAAI,CAAC,QAAQ,CAAC;QACpBiB,OAAO,EAAEjB,IAAI,CAAC,WAAW,CAAC;QAE1B,qBAAqB;QACrBkB,MAAM,EAAEZ,MAAM,CAACN,IAAI,CAAC,UAAU,CAAC;KAChC,CAAC,CAACO,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACvB,AAAC;QAhEWd,cAAc,GAAdA,cAAc"}
|
|
@@ -13,6 +13,7 @@ var _usbmuxdClient = require("./client/UsbmuxdClient");
|
|
|
13
13
|
var _afcprotocol = require("./protocol/AFCProtocol");
|
|
14
14
|
var _log = require("../../../log");
|
|
15
15
|
var _xcodeDeveloperDiskImagePrerequisite = require("../../../start/doctor/apple/XcodeDeveloperDiskImagePrerequisite");
|
|
16
|
+
var _xcrun = require("../../../start/platforms/ios/xcrun");
|
|
16
17
|
var _delay = require("../../../utils/delay");
|
|
17
18
|
var _errors = require("../../../utils/errors");
|
|
18
19
|
var _exit = require("../../../utils/exit");
|
|
@@ -76,10 +77,11 @@ async function runOnDevice({ udid , appPath , bundleId , waitForApp , deltaPath
|
|
|
76
77
|
// launch fails with EBusy or ENotFound if you try to launch immediately after install
|
|
77
78
|
await (0, _delay).delayAsync(200);
|
|
78
79
|
const debugServerClient = await launchApp(clientManager, {
|
|
80
|
+
bundleId,
|
|
79
81
|
appInfo,
|
|
80
82
|
detach: !waitForApp
|
|
81
83
|
});
|
|
82
|
-
if (waitForApp) {
|
|
84
|
+
if (waitForApp && debugServerClient) {
|
|
83
85
|
(0, _exit).installExitHooks(async ()=>{
|
|
84
86
|
// causes continue() to return
|
|
85
87
|
debugServerClient.halt();
|
|
@@ -129,7 +131,7 @@ async function uploadApp(clientManager, { appBinaryPath , destinationPath }) {
|
|
|
129
131
|
}
|
|
130
132
|
await afcClient.uploadDirectory(appBinaryPath, destinationPath);
|
|
131
133
|
}
|
|
132
|
-
async function
|
|
134
|
+
async function launchAppWithUsbmux(clientManager, { appInfo , detach }) {
|
|
133
135
|
let tries = 0;
|
|
134
136
|
while(tries < 3){
|
|
135
137
|
const debugServerClient = await clientManager.getDebugserverClient();
|
|
@@ -158,5 +160,36 @@ async function launchApp(clientManager, { appInfo , detach }) {
|
|
|
158
160
|
}
|
|
159
161
|
throw new _errors.CommandError("Unable to launch app, number of tries exceeded");
|
|
160
162
|
}
|
|
163
|
+
async function launchAppWithDeviceCtl(deviceId, bundleId) {
|
|
164
|
+
await (0, _xcrun).xcrunAsync([
|
|
165
|
+
"devicectl",
|
|
166
|
+
"device",
|
|
167
|
+
"process",
|
|
168
|
+
"launch",
|
|
169
|
+
"--device",
|
|
170
|
+
deviceId,
|
|
171
|
+
bundleId
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* iOS 17 introduces a new protocol called RemoteXPC.
|
|
176
|
+
* This is not yet implemented, so we fallback to devicectl.
|
|
177
|
+
*
|
|
178
|
+
* @see https://github.com/doronz88/pymobiledevice3/blob/master/misc/RemoteXPC.md#process-remoted
|
|
179
|
+
*/ async function launchApp(clientManager, { bundleId , appInfo , detach }) {
|
|
180
|
+
try {
|
|
181
|
+
return await launchAppWithUsbmux(clientManager, {
|
|
182
|
+
appInfo,
|
|
183
|
+
detach
|
|
184
|
+
});
|
|
185
|
+
} catch (error) {
|
|
186
|
+
debug("Failed to launch app with Usbmuxd, falling back to xcrun...", error);
|
|
187
|
+
// Get the device UDID and close the connection, to allow `xcrun devicectl` to connect
|
|
188
|
+
const deviceId = clientManager.device.Properties.SerialNumber;
|
|
189
|
+
clientManager.end();
|
|
190
|
+
// Fallback to devicectl for iOS 17 support
|
|
191
|
+
return await launchAppWithDeviceCtl(deviceId, bundleId);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
161
194
|
|
|
162
195
|
//# sourceMappingURL=AppleDevice.js.map
|