@expo/build-tools 1.0.127 → 1.0.128

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/generic.js CHANGED
@@ -8,24 +8,26 @@ 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");
10
10
  const steps_1 = require("@expo/steps");
11
- const nullthrows_1 = __importDefault(require("nullthrows"));
12
11
  const projectSources_1 = require("./common/projectSources");
13
12
  const easFunctions_1 = require("./steps/easFunctions");
14
13
  const customBuildContext_1 = require("./customBuildContext");
15
14
  const easFunctionGroups_1 = require("./steps/easFunctionGroups");
16
15
  async function runGenericJobAsync(ctx) {
17
- var _a;
18
16
  const customBuildCtx = new customBuildContext_1.CustomBuildContext(ctx);
19
17
  await (0, projectSources_1.prepareProjectSourcesAsync)(ctx, customBuildCtx.projectSourceDirectory);
20
18
  await addEasWorkflows(customBuildCtx);
21
- const relativeConfigPath = (0, nullthrows_1.default)((_a = ctx.job.customBuildConfig) === null || _a === void 0 ? void 0 : _a.path, 'Missing job definition file path.');
22
- const configPath = path_1.default.join(customBuildCtx.projectSourceDirectory, relativeConfigPath);
23
19
  const globalContext = new steps_1.BuildStepGlobalContext(customBuildCtx, false);
24
- const parser = new steps_1.BuildConfigParser(globalContext, {
25
- externalFunctions: (0, easFunctions_1.getEasFunctions)(customBuildCtx),
26
- externalFunctionGroups: (0, easFunctionGroups_1.getEasFunctionGroups)(customBuildCtx),
27
- configPath,
28
- });
20
+ const parser = ctx.job.steps
21
+ ? new steps_1.StepsConfigParser(globalContext, {
22
+ externalFunctions: (0, easFunctions_1.getEasFunctions)(customBuildCtx),
23
+ externalFunctionGroups: (0, easFunctionGroups_1.getEasFunctionGroups)(customBuildCtx),
24
+ steps: ctx.job.steps,
25
+ })
26
+ : new steps_1.BuildConfigParser(globalContext, {
27
+ externalFunctions: (0, easFunctions_1.getEasFunctions)(customBuildCtx),
28
+ externalFunctionGroups: (0, easFunctionGroups_1.getEasFunctionGroups)(customBuildCtx),
29
+ configPath: path_1.default.join(customBuildCtx.projectSourceDirectory, ctx.job.customBuildConfig.path),
30
+ });
29
31
  const workflow = await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {
30
32
  try {
31
33
  return await parser.parseAsync();
@@ -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,CAAC;QAAC,OAAO,UAAe,EAAE,CAAC;YACzB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;YAC7D,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;IAEH,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;AAChC,CAAC;AApCD,gDAoCC;AAEM,KAAK,UAAU,eAAe,CAAC,cAAkC;IACtE,MAAM,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE;QACjF,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAClB,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAChD,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,OAAO,CAAC,EACzD,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;AACJ,CAAC;AAVD,0CAUC","sourcesContent":["import fs from 'fs';\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"]}
1
+ {"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,uDAA0D;AAC1D,uCAAmG;AAGnG,4DAAqE;AACrE,uDAAuD;AACvD,6DAA0D;AAC1D,iEAAiE;AAE1D,KAAK,UAAU,kBAAkB,CAAC,GAA8B;IACrE,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GA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AAC,CAAC;gBAC5B,CAAC;YACH,CAAC;YACD,MAAM,UAAU,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;AAChC,CAAC;AAvCD,gDAuCC;AAEM,KAAK,UAAU,eAAe,CAAC,cAAkC;IACtE,MAAM,YAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE;QACjF,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAClB,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAChD,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,OAAO,CAAC,EACzD,EAAE,SAAS,EAAE,IAAI,EAAE,CACpB,CAAC;AACJ,CAAC;AAVD,0CAUC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport { BuildPhase, Generic } from '@expo/eas-build-job';\nimport { BuildConfigParser, BuildStepGlobalContext, errors, StepsConfigParser } from '@expo/steps';\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 globalContext = new BuildStepGlobalContext(customBuildCtx, false);\n\n const parser = ctx.job.steps\n ? new StepsConfigParser(globalContext, {\n externalFunctions: getEasFunctions(customBuildCtx),\n externalFunctionGroups: getEasFunctionGroups(customBuildCtx),\n steps: ctx.job.steps,\n })\n : new BuildConfigParser(globalContext, {\n externalFunctions: getEasFunctions(customBuildCtx),\n externalFunctionGroups: getEasFunctionGroups(customBuildCtx),\n configPath: path.join(\n customBuildCtx.projectSourceDirectory,\n ctx.job.customBuildConfig.path\n ),\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.127",
3
+ "version": "1.0.128",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -25,13 +25,13 @@
25
25
  "@expo/config": "8.5.4",
26
26
  "@expo/config-plugins": "7.8.4",
27
27
  "@expo/downloader": "1.0.118",
28
- "@expo/eas-build-job": "1.0.126",
28
+ "@expo/eas-build-job": "1.0.128",
29
29
  "@expo/env": "^0.3.0",
30
30
  "@expo/logger": "1.0.117",
31
31
  "@expo/package-manager": "1.5.2",
32
32
  "@expo/plist": "^0.1.3",
33
33
  "@expo/repack-app": "0.0.6",
34
- "@expo/steps": "1.0.126",
34
+ "@expo/steps": "1.0.128",
35
35
  "@expo/template-file": "1.0.117",
36
36
  "@expo/turtle-spawn": "1.0.117",
37
37
  "@expo/xcpretty": "^4.3.1",
@@ -69,5 +69,5 @@
69
69
  "node": "20.14.0",
70
70
  "yarn": "1.22.21"
71
71
  },
72
- "gitHead": "4e63c539ea8c9058eac1cd174c08c95913614330"
72
+ "gitHead": "8f98df8074316d9d152f00ae6deba610dfea1b6f"
73
73
  }