@expo/build-tools 0.1.112 → 0.1.113
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/dist/utils/prebuild.js
CHANGED
|
@@ -17,7 +17,7 @@ async function prebuildAsync(ctx, options) {
|
|
|
17
17
|
exports.prebuildAsync = prebuildAsync;
|
|
18
18
|
function getPrebuildCommand(job) {
|
|
19
19
|
var _a, _b;
|
|
20
|
-
let prebuildCommand = (_b = (_a = job.experimental) === null || _a === void 0 ? void 0 : _a.prebuildCommand) !== null && _b !== void 0 ? _b : `prebuild --non-interactive --platform ${job.platform}`;
|
|
20
|
+
let prebuildCommand = (_b = (_a = job.experimental) === null || _a === void 0 ? void 0 : _a.prebuildCommand) !== null && _b !== void 0 ? _b : `prebuild --non-interactive --no-install --platform ${job.platform}`;
|
|
21
21
|
if (!prebuildCommand.match(/(?:--platform| -p)/)) {
|
|
22
22
|
prebuildCommand = `${prebuildCommand} --platform ${job.platform}`;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../src/utils/prebuild.ts"],"names":[],"mappings":";;;;;;AACA,sEAA8D;AAQvD,KAAK,UAAU,aAAa,CACjC,GAAuB,EACvB,OAAyB;IAEzB,MAAM,YAAY,GAAiB;QACjC,GAAG,EAAE,GAAG,CAAC,2BAA2B;QACpC,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,GAAG,kCACE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,GAClB,GAAG,CAAC,GAAG,CACX;KACF,CAAC;IAEF,MAAM,GAAG,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;IACvE,MAAM,IAAA,sBAAU,EAAC,GAAG,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC,CAAC;AAClE,CAAC;AAfD,sCAeC;AA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B,CAAC,EAAE;QAChD,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC1E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;QACjD,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC3E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACpD,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9E;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport spawnAsync, { SpawnOptions } from '@expo/turtle-spawn';\n\nimport { BuildContext } from '../context';\n\nexport interface PrebuildOptions {\n extraEnvs?: Record<string, string>;\n}\n\nexport async function prebuildAsync<TJob extends Job>(\n ctx: BuildContext<TJob>,\n options?: PrebuildOptions\n): Promise<void> {\n const spawnOptions: SpawnOptions = {\n cwd: ctx.reactNativeProjectDirectory,\n logger: ctx.logger,\n env: {\n ...options?.extraEnvs,\n ...ctx.env,\n },\n };\n\n await ctx.runExpoCliCommand(getPrebuildCommand(ctx.job), spawnOptions);\n await spawnAsync(ctx.packageManager, ['install'], spawnOptions);\n}\n\nfunction getPrebuildCommand(job: Job): string {\n let prebuildCommand =\n job.experimental?.prebuildCommand ??\n `prebuild --non-interactive --no-install --platform ${job.platform}`;\n if (!prebuildCommand.match(/(?:--platform| -p)/)) {\n prebuildCommand = `${prebuildCommand} --platform ${job.platform}`;\n }\n if (!prebuildCommand.match(/--non-interactive/)) {\n prebuildCommand = `${prebuildCommand} --non-interactive`;\n }\n const npxCommandPrefix = 'npx ';\n const expoCommandPrefix = 'expo ';\n const expoCliCommandPrefix = 'expo-cli ';\n if (prebuildCommand.startsWith(npxCommandPrefix)) {\n prebuildCommand = prebuildCommand.substr(npxCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCommandPrefix)) {\n prebuildCommand = prebuildCommand.substr(expoCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCliCommandPrefix)) {\n prebuildCommand = prebuildCommand.substr(expoCliCommandPrefix.length).trim();\n }\n return prebuildCommand;\n}\n"]}
|