@expo/build-tools 1.0.97 → 1.0.98

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.
@@ -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)((_a = ctx.job.customBuildConfig) === null || _a === void 0 ? void 0 : _a.path, 'Custom build config must be defined for custom builds');
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;AAEx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ger, 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: customBuildCtx.projectSourceDirectory,\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
+ {"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,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,MAAA,GAAG,CAAC,GAAG,CAAC,oBAAoB,mCAAI,GAAG,CAAC;SAC3F,CAAC,CAAC;QACH,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACnB,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,kBAAkB,GAAG,IAAA,oBAAU,EACnC,MAAA,GAAG,CAAC,GAAG,CAAC,iBAAiB,0CAAE,IAAI,EAC/B,uDAAuD,CACxD,CAAC;IACF,MAAM,UA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ACzE,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
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": "131b5481d80f4c5d6cdd27c65a672ace3d029a0d"
72
+ "gitHead": "e358ace5759b4f06bfa6b8dddedd90205266f2c9"
73
73
  }