@expo/build-tools 1.0.134 → 1.0.137

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.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import { Generic } from '@expo/eas-build-job';
2
+ import { BuildWorkflow } from '@expo/steps';
3
+ import { Result } from '@expo/results';
2
4
  import { BuildContext } from './context';
3
5
  import { CustomBuildContext } from './customBuildContext';
4
- export declare function runGenericJobAsync(ctx: BuildContext<Generic.Job>): Promise<void>;
6
+ export declare function runGenericJobAsync(ctx: BuildContext<Generic.Job>): Promise<{
7
+ runResult: Result<void>;
8
+ buildWorkflow: BuildWorkflow;
9
+ }>;
5
10
  export declare function addEasWorkflows(customBuildCtx: CustomBuildContext): Promise<void>;
package/dist/generic.js CHANGED
@@ -8,6 +8,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");
10
10
  const steps_1 = require("@expo/steps");
11
+ const results_1 = require("@expo/results");
11
12
  const projectSources_1 = require("./common/projectSources");
12
13
  const easFunctions_1 = require("./steps/easFunctions");
13
14
  const customBuildContext_1 = require("./customBuildContext");
@@ -42,7 +43,8 @@ async function runGenericJobAsync(ctx) {
42
43
  throw parseError;
43
44
  }
44
45
  });
45
- await workflow.executeAsync();
46
+ const runResult = await (0, results_1.asyncResult)(workflow.executeAsync());
47
+ return { runResult, buildWorkflow: workflow };
46
48
  }
47
49
  exports.runGenericJobAsync = runGenericJobAsync;
48
50
  async function addEasWorkflows(customBuildCtx) {
@@ -1 +1 @@
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,CA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C,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;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"]}
1
+ {"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,uDAA0D;AAC1D,uCAMqB;AACrB,2CAAoD;AAGpD,4DAAqE;AACrE,uDAAuD;AACvD,6DAA0D;AAC1D,iEAAiE;AAE1D,KAAK,UAAU,kBAAkB,CACtC,GAA8B;IAE9B,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,aAAa,GAAG,IAAI,8BAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAExE,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,K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gDA2CC;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 {\n BuildConfigParser,\n BuildStepGlobalContext,\n BuildWorkflow,\n errors,\n StepsConfigParser,\n} from '@expo/steps';\nimport { Result, asyncResult } from '@expo/results';\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(\n ctx: BuildContext<Generic.Job>\n): Promise<{ runResult: Result<void>; buildWorkflow: BuildWorkflow }> {\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 const runResult = await asyncResult(workflow.executeAsync());\n\n return { runResult, buildWorkflow: workflow };\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.134",
3
+ "version": "1.0.137",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -25,13 +25,14 @@
25
25
  "@expo/config": "9.0.3",
26
26
  "@expo/config-plugins": "8.0.8",
27
27
  "@expo/downloader": "1.0.118",
28
- "@expo/eas-build-job": "1.0.133",
28
+ "@expo/eas-build-job": "1.0.137",
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.134",
34
+ "@expo/results": "^1.0.0",
35
+ "@expo/steps": "1.0.137",
35
36
  "@expo/template-file": "1.0.117",
36
37
  "@expo/turtle-spawn": "1.0.117",
37
38
  "@expo/xcpretty": "^4.3.1",
@@ -69,5 +70,5 @@
69
70
  "node": "20.14.0",
70
71
  "yarn": "1.22.21"
71
72
  },
72
- "gitHead": "a6d738aec8a6b2c4061d54d625acb91488b53a4d"
73
+ "gitHead": "8f804d35f40bf8fbfc3be65fbe06f4ec22a5431f"
73
74
  }
@@ -1,13 +0,0 @@
1
- build:
2
- name: EAS Update – Publish
3
- steps:
4
- - eas/checkout
5
-
6
- - eas/use_npm_token
7
-
8
- - eas/install_node_modules
9
-
10
- - run:
11
- name: Publish update
12
- command: |
13
- EXPO_TOKEN="${ eas.job.secrets.robotAccessToken }" npx -y eas-cli@latest update --auto