@expo/build-tools 1.0.110 → 1.0.111
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 +2 -0
- package/dist/builders/custom.js.map +1 -1
- package/dist/generic.d.ts +2 -0
- package/dist/generic.js +2 -1
- package/dist/generic.js.map +1 -1
- package/package.json +2 -2
package/dist/builders/custom.js
CHANGED
|
@@ -14,9 +14,11 @@ const customBuildContext_1 = require("../customBuildContext");
|
|
|
14
14
|
const easBuildInternal_1 = require("../common/easBuildInternal");
|
|
15
15
|
const easFunctionGroups_1 = require("../steps/easFunctionGroups");
|
|
16
16
|
const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
|
|
17
|
+
const generic_1 = require("../generic");
|
|
17
18
|
async function runCustomBuildAsync(ctx) {
|
|
18
19
|
var _a, _b;
|
|
19
20
|
const customBuildCtx = new customBuildContext_1.CustomBuildContext(ctx);
|
|
21
|
+
await (0, generic_1.addEasWorkflows)(customBuildCtx);
|
|
20
22
|
await (0, projectSources_1.prepareProjectSourcesAsync)(ctx, customBuildCtx.projectSourceDirectory);
|
|
21
23
|
if (ctx.job.triggeredBy === eas_build_job_1.BuildTrigger.GIT_BASED_INTEGRATION) {
|
|
22
24
|
// We need to setup envs from eas.json
|
|
@@ -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;
|
|
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;AAC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AC;AACvB,CAAC;AA9DD,kDA8DC","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';\nimport { addEasWorkflows } from '../generic';\n\nexport async function runCustomBuildAsync(ctx: BuildContext<BuildJob>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await addEasWorkflows(customBuildCtx);\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"]}
|
package/dist/generic.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { Generic } from '@expo/eas-build-job';
|
|
2
2
|
import { BuildContext } from './context';
|
|
3
|
+
import { CustomBuildContext } from './customBuildContext';
|
|
3
4
|
export declare function runGenericJobAsync(ctx: BuildContext<Generic.Job>): Promise<void>;
|
|
5
|
+
export declare function addEasWorkflows(customBuildCtx: CustomBuildContext): Promise<void>;
|
package/dist/generic.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.runGenericJobAsync = void 0;
|
|
6
|
+
exports.addEasWorkflows = exports.runGenericJobAsync = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -49,4 +49,5 @@ async function addEasWorkflows(customBuildCtx) {
|
|
|
49
49
|
});
|
|
50
50
|
await fs_1.default.promises.cp(path_1.default.join(__dirname, '..', 'resources', '__eas'), path_1.default.join(customBuildCtx.projectSourceDirectory, '__eas'), { recursive: true });
|
|
51
51
|
}
|
|
52
|
+
exports.addEasWorkflows = addEasWorkflows;
|
|
52
53
|
//# sourceMappingURL=generic.js.map
|
package/dist/generic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,uDAA0D;AAC1D,uCAAgF;AAChF,4DAAoC;AAGpC,4DAAqE;AACrE,uDAAuD;AACvD,6DAA0D;AAC1D,iEAAiE;AAE1D,KAAK,UAAU,kBAAkB,CAAC,GAA8B;;IACrE,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GAAG,CAAC,CAAC;IAEnD,MAAM,IAAA,2CAA0B,EAAC,GAAG,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAE7E,MAAM,eAAe,CAAC,cAAc,CAAC,CAAC;IAEtC,MAAM,kBAAkB,GAAG,IAAA,oBAAU,EACnC,MAAA,GAAG,CAAC,GAAG,CAAC,iBAAiB,0CAAE,IAAI,EAC/B,mCAAmC,CACpC,CAAC;IACF,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;IAExF,MAAM,aAAa,GAAG,IAAI,8BAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAExE,MAAM,MAAM,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE;QAClD,iBAAiB,EAAE,IAAA,8BAAe,EAAC,cAAc,CAAC;QAClD,sBAAsB,EAAE,IAAA,wCAAoB,EAAC,cAAc,CAAC;QAC5D,UAAU;KACX,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC3F,IAAI,CAAC;YACH,OAAO,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,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s';\nimport path from 'path';\n\nimport { BuildPhase, Generic } from '@expo/eas-build-job';\nimport { BuildConfigParser, BuildStepGlobalContext, errors } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { BuildContext } from './context';\nimport { prepareProjectSourcesAsync } from './common/projectSources';\nimport { getEasFunctions } from './steps/easFunctions';\nimport { CustomBuildContext } from './customBuildContext';\nimport { getEasFunctionGroups } from './steps/easFunctionGroups';\n\nexport async function runGenericJobAsync(ctx: BuildContext<Generic.Job>): Promise<void> {\n const customBuildCtx = new CustomBuildContext(ctx);\n\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\n\n await addEasWorkflows(customBuildCtx);\n\n const relativeConfigPath = nullthrows(\n ctx.job.customBuildConfig?.path,\n 'Missing job definition file path.'\n );\n const configPath = path.join(customBuildCtx.projectSourceDirectory, relativeConfigPath);\n\n const globalContext = new BuildStepGlobalContext(customBuildCtx, false);\n\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: getEasFunctions(customBuildCtx),\n externalFunctionGroups: getEasFunctionGroups(customBuildCtx),\n configPath,\n });\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 job definition 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\n await workflow.executeAsync();\n}\n\nexport async function addEasWorkflows(customBuildCtx: CustomBuildContext): Promise<void> {\n await fs.promises.mkdir(path.join(customBuildCtx.projectSourceDirectory, '__eas'), {\n recursive: true,\n });\n\n await fs.promises.cp(\n path.join(__dirname, '..', 'resources', '__eas'),\n path.join(customBuildCtx.projectSourceDirectory, '__eas'),\n { recursive: true }\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.111",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"node": "20.11.0",
|
|
72
72
|
"yarn": "1.22.21"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "01ec06dd378c8aa73b4353d2ec15421d2e2dfbe4"
|
|
75
75
|
}
|