@expo/build-tools 1.0.97 → 1.0.99
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/builders/custom.js +3 -3
- package/dist/builders/custom.js.map +1 -1
- package/dist/utils/expoUpdatesCli.d.ts +5 -1
- package/dist/utils/expoUpdatesCli.js +8 -3
- package/dist/utils/expoUpdatesCli.js.map +1 -1
- package/dist/utils/resolveRuntimeVersionAsync.js +4 -7
- package/dist/utils/resolveRuntimeVersionAsync.js.map +1 -1
- package/package.json +2 -2
package/dist/builders/custom.js
CHANGED
|
@@ -15,18 +15,18 @@ const easBuildInternal_1 = require("../common/easBuildInternal");
|
|
|
15
15
|
const easFunctionGroups_1 = require("../steps/easFunctionGroups");
|
|
16
16
|
const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
|
|
17
17
|
async function runCustomBuildAsync(ctx) {
|
|
18
|
-
var _a;
|
|
18
|
+
var _a, _b;
|
|
19
19
|
const customBuildCtx = new customBuildContext_1.CustomBuildContext(ctx);
|
|
20
20
|
await (0, projectSources_1.prepareProjectSourcesAsync)(ctx, customBuildCtx.projectSourceDirectory);
|
|
21
21
|
if (ctx.job.triggeredBy === eas_build_job_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
22
22
|
// We need to setup envs from eas.json
|
|
23
23
|
const env = await (0, easBuildInternal_1.resolveEnvFromBuildProfileAsync)(ctx, {
|
|
24
|
-
cwd: customBuildCtx.projectSourceDirectory,
|
|
24
|
+
cwd: path_1.default.join(customBuildCtx.projectSourceDirectory, (_a = ctx.job.projectRootDirectory) !== null && _a !== void 0 ? _a : '.'),
|
|
25
25
|
});
|
|
26
26
|
ctx.updateEnv(env);
|
|
27
27
|
customBuildCtx.updateEnv(ctx.env);
|
|
28
28
|
}
|
|
29
|
-
const relativeConfigPath = (0, nullthrows_1.default)((
|
|
29
|
+
const relativeConfigPath = (0, nullthrows_1.default)((_b = ctx.job.customBuildConfig) === null || _b === void 0 ? void 0 : _b.path, 'Custom build config must be defined for custom builds');
|
|
30
30
|
const configPath = path_1.default.join(ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory), relativeConfigPath);
|
|
31
31
|
const globalContext = new steps_1.BuildStepGlobalContext(customBuildCtx, false);
|
|
32
32
|
const easFunctions = (0, easFunctions_1.getEasFunctions)(customBuildCtx);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAwF;AACxF,uCAAgF;AAChF,4DAAoC;AAGpC,6DAAsE;AACtE,wDAAwD;AACxD,8DAA2D;AAC3D,iEAA6E;AAC7E,kEAAkE;AAClE,0DAAyE;AAElE,KAAK,UAAU,mBAAmB,CAAC,GAA2B;;IACnE,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,IAAA,2CAA0B,EAAC,GAAG,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAC7E,IAAI,GAAG,CAAC,GAAG,CAAC,WAAW,KAAK,4BAAY,CAAC,qBAAqB,EAAE,CAAC;QAC/D,sCAAsC;QACtC,MAAM,GAAG,GAAG,MAAM,IAAA,kDAA+B,EAAC,GAAG,EAAE;YACrD,GAAG,EAAE,cAAc,CAAC,sBAAsB;
|
|
1
|
+
{"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAwF;AACxF,uCAAgF;AAChF,4DAAoC;AAGpC,6DAAsE;AACtE,wDAAwD;AACxD,8DAA2D;AAC3D,iEAA6E;AAC7E,kEAAkE;AAClE,0DAAyE;AAElE,KAAK,UAAU,mBAAmB,CAAC,GAA2B;;IACnE,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,IAAA,2CAA0B,EAAC,GA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nC,CAAC;QAAC,OAAO,UAAe,EAAE,CAAC;YACzB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAClE,IAAI,UAAU,YAAY,cAAM,CAAC,kBAAkB,EAAE,CAAC;gBACpD,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;oBACpC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC;YACD,MAAM,UAAU,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC;QACH,IAAI,CAAC;YACH,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;QAChC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,gBAAgB,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,EAAE,CAAC;gBACzE,IAAI,CAAC;oBACH,MAAM,IAAA,iDAAgC,EAAC,GAA4B,EAAE;wBACnE,MAAM,EAAE,GAAG,CAAC,MAAM;qBACnB,CAAC,CAAC;gBACL,CAAC;gBAAC,MAAM,CAAC;oBACP,yCAAyC;gBAC3C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AA7DD,kDA6DC","sourcesContent":["import path from 'path';\n\nimport { BuildJob, BuildPhase, BuildTrigger, Ios, Platform } from '@expo/eas-build-job';\nimport { BuildConfigParser, BuildStepGlobalContext, errors } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { prepareProjectSourcesAsync } from '../common/projectSources';\nimport { getEasFunctions } from '../steps/easFunctions';\nimport { CustomBuildContext } from '../customBuildContext';\nimport { resolveEnvFromBuildProfileAsync } from '../common/easBuildInternal';\nimport { getEasFunctionGroups } from '../steps/easFunctionGroups';\nimport { findAndUploadXcodeBuildLogsAsync } from '../ios/xcodeBuildLogs';\n\nexport async function runCustomBuildAsync(ctx: BuildContext<BuildJob>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\n if (ctx.job.triggeredBy === BuildTrigger.GIT_BASED_INTEGRATION) {\n // We need to setup envs from eas.json\n const env = await resolveEnvFromBuildProfileAsync(ctx, {\n cwd: path.join(customBuildCtx.projectSourceDirectory, ctx.job.projectRootDirectory ?? '.'),\n });\n ctx.updateEnv(env);\n customBuildCtx.updateEnv(ctx.env);\n }\n const relativeConfigPath = nullthrows(\n ctx.job.customBuildConfig?.path,\n 'Custom build config must be defined for custom builds'\n );\n const configPath = path.join(\n ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory),\n relativeConfigPath\n );\n\n const globalContext = new BuildStepGlobalContext(customBuildCtx, false);\n const easFunctions = getEasFunctions(customBuildCtx);\n const easFunctionGroups = getEasFunctionGroups(customBuildCtx);\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\n externalFunctionGroups: easFunctionGroups,\n configPath,\n });\n const workflow = await ctx.runBuildPhase(BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {\n try {\n return await parser.parseAsync();\n } catch (parseError: any) {\n ctx.logger.error('Failed to parse the custom build config file.');\n if (parseError instanceof errors.BuildWorkflowError) {\n for (const err of parseError.errors) {\n ctx.logger.error({ err });\n }\n }\n throw parseError;\n }\n });\n try {\n try {\n await workflow.executeAsync();\n } finally {\n if (!ctx.artifacts.XCODE_BUILD_LOGS && ctx.job.platform === Platform.IOS) {\n try {\n await findAndUploadXcodeBuildLogsAsync(ctx as BuildContext<Ios.Job>, {\n logger: ctx.logger,\n });\n } catch {\n // do nothing, it's a non-breaking error.\n }\n }\n }\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n return ctx.artifacts;\n}\n"]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/// <reference types="bunyan" />
|
|
2
|
+
import { bunyan } from '@expo/logger';
|
|
1
3
|
export declare class ExpoUpdatesCLIModuleNotFoundError extends Error {
|
|
2
4
|
}
|
|
3
5
|
export declare class ExpoUpdatesCLIInvalidCommandError extends Error {
|
|
4
6
|
}
|
|
5
|
-
export declare function expoUpdatesCommandAsync(projectDir: string, args: string[]
|
|
7
|
+
export declare function expoUpdatesCommandAsync(projectDir: string, args: string[], { logger }: {
|
|
8
|
+
logger: bunyan;
|
|
9
|
+
}): Promise<string>;
|
|
@@ -27,15 +27,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.expoUpdatesCommandAsync = exports.ExpoUpdatesCLIInvalidCommandError = exports.ExpoUpdatesCLIModuleNotFoundError = void 0;
|
|
30
|
-
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
|
31
30
|
const resolve_from_1 = __importStar(require("resolve-from"));
|
|
31
|
+
const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
|
|
32
32
|
class ExpoUpdatesCLIModuleNotFoundError extends Error {
|
|
33
33
|
}
|
|
34
34
|
exports.ExpoUpdatesCLIModuleNotFoundError = ExpoUpdatesCLIModuleNotFoundError;
|
|
35
35
|
class ExpoUpdatesCLIInvalidCommandError extends Error {
|
|
36
36
|
}
|
|
37
37
|
exports.ExpoUpdatesCLIInvalidCommandError = ExpoUpdatesCLIInvalidCommandError;
|
|
38
|
-
async function expoUpdatesCommandAsync(projectDir, args) {
|
|
38
|
+
async function expoUpdatesCommandAsync(projectDir, args, { logger }) {
|
|
39
39
|
var _a;
|
|
40
40
|
let expoUpdatesCli;
|
|
41
41
|
try {
|
|
@@ -49,7 +49,12 @@ async function expoUpdatesCommandAsync(projectDir, args) {
|
|
|
49
49
|
throw e;
|
|
50
50
|
}
|
|
51
51
|
try {
|
|
52
|
-
|
|
52
|
+
const spawnResult = await (0, turtle_spawn_1.default)(expoUpdatesCli, args, {
|
|
53
|
+
stdio: 'pipe',
|
|
54
|
+
cwd: projectDir,
|
|
55
|
+
logger,
|
|
56
|
+
});
|
|
57
|
+
return spawnResult.stdout;
|
|
53
58
|
}
|
|
54
59
|
catch (e) {
|
|
55
60
|
if (e.stderr && typeof e.stderr === 'string' && e.stderr.includes('Invalid command')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoUpdatesCli.js","sourceRoot":"","sources":["../../src/utils/expoUpdatesCli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"expoUpdatesCli.js","sourceRoot":"","sources":["../../src/utils/expoUpdatesCli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAwE;AACxE,sEAA4C;AAG5C,MAAa,iCAAkC,SAAQ,KAAK;CAAG;AAA/D,8EAA+D;AAC/D,MAAa,iCAAkC,SAAQ,KAAK;CAAG;AAA/D,8EAA+D;AAExD,KAAK,UAAU,uBAAuB,CAC3C,UAAkB,EAClB,IAAc,EACd,EAAE,MAAM,EAAsB;;IAE9B,IAAI,cAAc,CAAC;IACnB,IAAI,CAAC;QACH,cAAc;YACZ,MAAA,IAAA,qBAAiB,EAAC,UAAU,EAAE,sBAAsB,CAAC,mCACrD,IAAA,sBAAW,EAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;YAClC,MAAM,IAAI,iCAAiC,CACzC,uIAAuI,CACxI,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;IAED,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,IAAA,sBAAU,EAAC,cAAc,EAAE,IAAI,EAAE;YACzD,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,UAAU;YACf,MAAM;SACP,CAAC,CAAC;QACH,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACrF,MAAM,IAAI,iCAAiC,CACzC,4BAA4B,IAAI,6CAA6C,CAC9E,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC;AAlCD,0DAkCC","sourcesContent":["import resolveFrom, { silent as silentResolveFrom } from 'resolve-from';\nimport spawnAsync from '@expo/turtle-spawn';\nimport { bunyan } from '@expo/logger';\n\nexport class ExpoUpdatesCLIModuleNotFoundError extends Error {}\nexport class ExpoUpdatesCLIInvalidCommandError extends Error {}\n\nexport async function expoUpdatesCommandAsync(\n projectDir: string,\n args: string[],\n { logger }: { logger: bunyan }\n): Promise<string> {\n let expoUpdatesCli;\n try {\n expoUpdatesCli =\n silentResolveFrom(projectDir, 'expo-updates/bin/cli') ??\n resolveFrom(projectDir, 'expo-updates/bin/cli.js');\n } catch (e: any) {\n if (e.code === 'MODULE_NOT_FOUND') {\n throw new ExpoUpdatesCLIModuleNotFoundError(\n `The \\`expo-updates\\` package was not found. Follow the installation directions at https://docs.expo.dev/bare/installing-expo-modules/`\n );\n }\n throw e;\n }\n\n try {\n const spawnResult = await spawnAsync(expoUpdatesCli, args, {\n stdio: 'pipe',\n cwd: projectDir,\n logger,\n });\n return spawnResult.stdout;\n } catch (e: any) {\n if (e.stderr && typeof e.stderr === 'string' && e.stderr.includes('Invalid command')) {\n throw new ExpoUpdatesCLIInvalidCommandError(\n `The command specified by ${args} was not valid in the \\`expo-updates\\` CLI.`\n );\n }\n throw e;\n }\n}\n"]}
|
|
@@ -15,15 +15,12 @@ async function resolveRuntimeVersionAsync({ exp, platform, projectDir, logger, e
|
|
|
15
15
|
try {
|
|
16
16
|
logger.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');
|
|
17
17
|
const extraArgs = logger.debug() ? ['--debug'] : [];
|
|
18
|
-
const resolvedRuntimeVersionJSONResult = await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
platform,
|
|
22
|
-
...extraArgs,
|
|
23
|
-
]);
|
|
18
|
+
const resolvedRuntimeVersionJSONResult = await (0, expoUpdatesCli_1.expoUpdatesCommandAsync)(projectDir, ['runtimeversion:resolve', '--platform', platform, ...extraArgs], {
|
|
19
|
+
logger,
|
|
20
|
+
});
|
|
24
21
|
const runtimeVersionResult = JSON.parse(resolvedRuntimeVersionJSONResult);
|
|
25
22
|
logger.debug('runtimeversion:resolve output:');
|
|
26
|
-
logger.debug(
|
|
23
|
+
logger.debug(resolvedRuntimeVersionJSONResult);
|
|
27
24
|
return (_a = runtimeVersionResult.runtimeVersion) !== null && _a !== void 0 ? _a : null;
|
|
28
25
|
}
|
|
29
26
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRuntimeVersionAsync.js","sourceRoot":"","sources":["../../src/utils/resolveRuntimeVersionAsync.ts"],"names":[],"mappings":";;;AACA,yDAA+C;AAG/C,qDAA8F;AAC9F,+CAAyF;AAElF,KAAK,UAAU,0BAA0B,CAAC,EAC/C,GAAG,EACH,QAAQ,EACR,UAAU,EACV,MAAM,EACN,yBAAyB,GAO1B;;IACC,IAAI,CAAC,IAAA,sEAAwD,EAAC,yBAAyB,CAAC,EAAE,CAAC;QACzF,MAAM,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;QA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CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAE1E,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC/C,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAE/C,OAAO,MAAA,oBAAoB,CAAC,cAAc,mCAAI,IAAI,CAAC;IACrD,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,uFAAuF;QACvF,IAAI,CAAC,YAAY,kDAAiC,EAAE,CAAC;YACnD,MAAM,CAAC,KAAK,CACV,uFAAuF,CAAC,CAAC,OAAO,EAAE,CACnG,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC;AAhDD,gEAgDC","sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { Updates } from '@expo/config-plugins';\nimport { bunyan } from '@expo/logger';\n\nimport { ExpoUpdatesCLIModuleNotFoundError, expoUpdatesCommandAsync } from './expoUpdatesCli';\nimport { isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported } from './expoUpdates';\n\nexport async function resolveRuntimeVersionAsync({\n exp,\n platform,\n projectDir,\n logger,\n expoUpdatesPackageVersion,\n}: {\n exp: ExpoConfig;\n platform: 'ios' | 'android';\n projectDir: string;\n logger: bunyan;\n expoUpdatesPackageVersion: string;\n}): Promise<string | null> {\n if (!isModernExpoUpdatesCLIWithRuntimeVersionCommandSupported(expoUpdatesPackageVersion)) {\n logger.debug('Using expo-updates config plugin for runtime version resolution');\n // fall back to the previous behavior (using the @expo/config-plugins eas-cli dependency rather\n // than the versioned @expo/config-plugins dependency in the project)\n return await Updates.getRuntimeVersionNullableAsync(projectDir, exp, platform);\n }\n\n try {\n logger.debug('Using expo-updates runtimeversion:resolve CLI for runtime version resolution');\n\n const extraArgs = logger.debug() ? ['--debug'] : [];\n\n const resolvedRuntimeVersionJSONResult = await expoUpdatesCommandAsync(\n projectDir,\n ['runtimeversion:resolve', '--platform', platform, ...extraArgs],\n {\n logger,\n }\n );\n const runtimeVersionResult = JSON.parse(resolvedRuntimeVersionJSONResult);\n\n logger.debug('runtimeversion:resolve output:');\n logger.debug(resolvedRuntimeVersionJSONResult);\n\n return runtimeVersionResult.runtimeVersion ?? null;\n } catch (e: any) {\n // if expo-updates is not installed, there's no need for a runtime version in the build\n if (e instanceof ExpoUpdatesCLIModuleNotFoundError) {\n logger.error(\n `Error when resolving runtime version using expo-updates runtimeversion:resolve CLI: ${e.message}`\n );\n return null;\n }\n throw e;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.99",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"node": "20.11.0",
|
|
70
70
|
"yarn": "1.22.21"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "bf60f9ef84d58301de2198e5f8bb650eca85b342"
|
|
73
73
|
}
|