@expo/build-tools 1.0.34 → 1.0.36

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.
Files changed (74) hide show
  1. package/dist/builders/custom.js +1 -1
  2. package/dist/builders/custom.js.map +1 -1
  3. package/dist/steps/easFunctions.d.ts +1 -3
  4. package/dist/steps/easFunctions.js +19 -22
  5. package/dist/steps/easFunctions.js.map +1 -1
  6. package/dist/steps/functions/checkout.js.map +1 -0
  7. package/dist/steps/functions/{utils/configureAndroidVersion.js → configureAndroidVersion.js} +2 -2
  8. package/dist/steps/functions/configureAndroidVersion.js.map +1 -0
  9. package/dist/steps/functions/{eas/configureEASUpdateIfInstalled.js → configureEASUpdateIfInstalled.js} +4 -4
  10. package/dist/steps/functions/configureEASUpdateIfInstalled.js.map +1 -0
  11. package/dist/steps/functions/{utils/configureIosCredentials.js → configureIosCredentials.js} +5 -5
  12. package/dist/steps/functions/configureIosCredentials.js.map +1 -0
  13. package/dist/steps/functions/{utils/configureIosVersion.js → configureIosVersion.js} +5 -5
  14. package/dist/steps/functions/configureIosVersion.js.map +1 -0
  15. package/dist/steps/functions/{eas/findAndUploadBuildArtifacts.d.ts → findAndUploadBuildArtifacts.d.ts} +1 -1
  16. package/dist/steps/functions/{eas/findAndUploadBuildArtifacts.js → findAndUploadBuildArtifacts.js} +3 -3
  17. package/dist/steps/functions/findAndUploadBuildArtifacts.js.map +1 -0
  18. package/dist/steps/functions/{utils/generateGymfileFromTemplate.js → generateGymfileFromTemplate.js} +5 -5
  19. package/dist/steps/functions/generateGymfileFromTemplate.js.map +1 -0
  20. package/dist/steps/functions/{utils/injectAndroidCredentials.js → injectAndroidCredentials.js} +2 -2
  21. package/dist/steps/functions/injectAndroidCredentials.js.map +1 -0
  22. package/dist/steps/functions/installNodeModules.d.ts +4 -0
  23. package/dist/steps/functions/{eas/installNodeModules.js → installNodeModules.js} +6 -6
  24. package/dist/steps/functions/installNodeModules.js.map +1 -0
  25. package/dist/steps/functions/prebuild.d.ts +2 -0
  26. package/dist/steps/functions/{eas/prebuild.js → prebuild.js} +18 -26
  27. package/dist/steps/functions/prebuild.js.map +1 -0
  28. package/dist/steps/functions/{utils/resolveAppleTeamIdFromCredentials.js → resolveAppleTeamIdFromCredentials.js} +3 -3
  29. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js.map +1 -0
  30. package/dist/steps/functions/{utils/runFastlane.js → runFastlane.js} +2 -2
  31. package/dist/steps/functions/runFastlane.js.map +1 -0
  32. package/dist/steps/functions/{utils/runGradle.js → runGradle.js} +2 -2
  33. package/dist/steps/functions/runGradle.js.map +1 -0
  34. package/dist/steps/functions/{utils/uploadArtifact.d.ts → uploadArtifact.d.ts} +1 -1
  35. package/dist/steps/functions/{utils/uploadArtifact.js → uploadArtifact.js} +2 -2
  36. package/dist/steps/functions/uploadArtifact.js.map +1 -0
  37. package/dist/steps/functions/useNpmToken.d.ts +2 -0
  38. package/dist/steps/functions/{eas/setUpNpmrc.js → useNpmToken.js} +5 -5
  39. package/dist/steps/functions/useNpmToken.js.map +1 -0
  40. package/dist/steps/utils/expoUpdates.js +2 -2
  41. package/dist/steps/utils/expoUpdates.js.map +1 -1
  42. package/package.json +2 -2
  43. package/dist/steps/functions/eas/buildReactNativeApp.d.ts +0 -4
  44. package/dist/steps/functions/eas/buildReactNativeApp.js +0 -47
  45. package/dist/steps/functions/eas/buildReactNativeApp.js.map +0 -1
  46. package/dist/steps/functions/eas/checkout.js.map +0 -1
  47. package/dist/steps/functions/eas/configureEASUpdateIfInstalled.js.map +0 -1
  48. package/dist/steps/functions/eas/findAndUploadBuildArtifacts.js.map +0 -1
  49. package/dist/steps/functions/eas/installNodeModules.d.ts +0 -5
  50. package/dist/steps/functions/eas/installNodeModules.js.map +0 -1
  51. package/dist/steps/functions/eas/prebuild.d.ts +0 -3
  52. package/dist/steps/functions/eas/prebuild.js.map +0 -1
  53. package/dist/steps/functions/eas/setUpNpmrc.d.ts +0 -3
  54. package/dist/steps/functions/eas/setUpNpmrc.js.map +0 -1
  55. package/dist/steps/functions/utils/configureAndroidVersion.js.map +0 -1
  56. package/dist/steps/functions/utils/configureIosCredentials.js.map +0 -1
  57. package/dist/steps/functions/utils/configureIosVersion.js.map +0 -1
  58. package/dist/steps/functions/utils/generateGymfileFromTemplate.js.map +0 -1
  59. package/dist/steps/functions/utils/injectAndroidCredentials.js.map +0 -1
  60. package/dist/steps/functions/utils/resolveAppleTeamIdFromCredentials.js.map +0 -1
  61. package/dist/steps/functions/utils/runFastlane.js.map +0 -1
  62. package/dist/steps/functions/utils/runGradle.js.map +0 -1
  63. package/dist/steps/functions/utils/uploadArtifact.js.map +0 -1
  64. /package/dist/steps/functions/{eas/checkout.d.ts → checkout.d.ts} +0 -0
  65. /package/dist/steps/functions/{eas/checkout.js → checkout.js} +0 -0
  66. /package/dist/steps/functions/{utils/configureAndroidVersion.d.ts → configureAndroidVersion.d.ts} +0 -0
  67. /package/dist/steps/functions/{eas/configureEASUpdateIfInstalled.d.ts → configureEASUpdateIfInstalled.d.ts} +0 -0
  68. /package/dist/steps/functions/{utils/configureIosCredentials.d.ts → configureIosCredentials.d.ts} +0 -0
  69. /package/dist/steps/functions/{utils/configureIosVersion.d.ts → configureIosVersion.d.ts} +0 -0
  70. /package/dist/steps/functions/{utils/generateGymfileFromTemplate.d.ts → generateGymfileFromTemplate.d.ts} +0 -0
  71. /package/dist/steps/functions/{utils/injectAndroidCredentials.d.ts → injectAndroidCredentials.d.ts} +0 -0
  72. /package/dist/steps/functions/{utils/resolveAppleTeamIdFromCredentials.d.ts → resolveAppleTeamIdFromCredentials.d.ts} +0 -0
  73. /package/dist/steps/functions/{utils/runFastlane.d.ts → runFastlane.d.ts} +0 -0
  74. /package/dist/steps/functions/{utils/runGradle.d.ts → runGradle.d.ts} +0 -0
@@ -7,10 +7,10 @@ exports.runGradleFunction = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const assert_1 = __importDefault(require("assert"));
9
9
  const steps_1 = require("@expo/steps");
10
- const gradle_1 = require("../../utils/android/gradle");
10
+ const gradle_1 = require("../utils/android/gradle");
11
11
  function runGradleFunction() {
12
12
  return new steps_1.BuildFunction({
13
- namespace: 'utils',
13
+ namespace: 'eas',
14
14
  id: 'run_gradle',
15
15
  name: 'Run gradle',
16
16
  inputProviders: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runGradle.js","sourceRoot":"","sources":["../../../src/steps/functions/runGradle.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,oDAA4B;AAE5B,uCAAyF;AAEzF,oDAAiF;AAEjF,SAAgB,iBAAiB;IAC/B,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,SAAS;gBACb,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;YACrC,IAAA,gBAAM,EAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;YAC5D,MAAM,OAAO,GAAG,IAAA,6BAAoB,EAClC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAChC,MAAM,CAAC,OAAO,CAAC,KAA2B,CAC3C,CAAC;YACF,MAAM,IAAA,yBAAgB,EAAC;gBACrB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,aAAa,EAAE,OAAO;gBACtB,UAAU,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;gBAC1D,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA1BD,8CA0BC","sourcesContent":["import path from 'path';\nimport assert from 'assert';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\n\nimport { resolveGradleCommand, runGradleCommand } from '../utils/android/gradle';\n\nexport function runGradleFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'run_gradle',\n name: 'Run gradle',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'command',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepCtx, { env, inputs }) => {\n assert(stepCtx.global.staticContext.job, 'Job is required');\n const command = resolveGradleCommand(\n stepCtx.global.staticContext.job,\n inputs.command.value as string | undefined\n );\n await runGradleCommand({\n logger: stepCtx.logger,\n gradleCommand: command,\n androidDir: path.join(stepCtx.workingDirectory, 'android'),\n env,\n });\n },\n });\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import { BuildFunction } from '@expo/steps';
2
- import { CustomBuildContext } from '../../../customBuildContext';
2
+ import { CustomBuildContext } from '../../customBuildContext';
3
3
  export declare function createUploadArtifactBuildFunction(ctx: CustomBuildContext): BuildFunction;
@@ -7,7 +7,7 @@ exports.createUploadArtifactBuildFunction = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const steps_1 = require("@expo/steps");
9
9
  const nullthrows_1 = __importDefault(require("nullthrows"));
10
- const context_1 = require("../../../context");
10
+ const context_1 = require("../../context");
11
11
  var BuildArtifactType;
12
12
  (function (BuildArtifactType) {
13
13
  BuildArtifactType["APPLICATION_ARCHIVE"] = "application-archive";
@@ -15,7 +15,7 @@ var BuildArtifactType;
15
15
  })(BuildArtifactType || (BuildArtifactType = {}));
16
16
  function createUploadArtifactBuildFunction(ctx) {
17
17
  return new steps_1.BuildFunction({
18
- namespace: 'utils',
18
+ namespace: 'eas',
19
19
  id: 'upload_artifact',
20
20
  name: 'Upload artifact',
21
21
  inputProviders: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadArtifact.js","sourceRoot":"","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,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA9BD,8EA8BC;AAED,SAAS,mCAAmC,CAAC,KAAa;IACxD,MAAM,aAAa,GAAa,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACjE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,IAAI,KAAK,mDAAmD,aAAa;aACtE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;KACH;IACD,OAAO,KAAK,KAAK,iBAAiB,CAAC,mBAAmB;QACpD,CAAC,CAAC,sBAAY,CAAC,mBAAmB;QAClC,CAAC,CAAC,sBAAY,CAAC,eAAe,CAAC;AACnC,CAAC","sourcesContent":["import path from 'path';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { ArtifactType } from '../../context';\nimport { CustomBuildContext } from '../../customBuildContext';\n\nenum BuildArtifactType {\n APPLICATION_ARCHIVE = 'application-archive',\n BUILD_ARTIFACT = 'build-artifact',\n}\n\nexport function createUploadArtifactBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'upload_artifact',\n name: 'Upload artifact',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'type',\n defaultValue: BuildArtifactType.APPLICATION_ARCHIVE,\n allowedValues: [BuildArtifactType.APPLICATION_ARCHIVE, BuildArtifactType.BUILD_ARTIFACT],\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'path',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepsCtx, { inputs }) => {\n const artifactType = validateAndConvertBuildArtifactType(\n nullthrows(inputs.type.value).toString()\n );\n const filePath = path.resolve(\n stepsCtx.workingDirectory,\n nullthrows(inputs.path.value).toString()\n );\n await ctx.runtimeApi.uploadArtifacts(artifactType, [filePath], stepsCtx.logger);\n },\n });\n}\n\nfunction validateAndConvertBuildArtifactType(input: string): ArtifactType {\n const allowedValues: string[] = Object.values(BuildArtifactType);\n if (!allowedValues.includes(input)) {\n throw new Error(\n `\"${input}\" is not allowed artifact type, allowed values: ${allowedValues\n .map((i) => `\"${i}\"`)\n .join(', ')}`\n );\n }\n return input === BuildArtifactType.APPLICATION_ARCHIVE\n ? ArtifactType.APPLICATION_ARCHIVE\n : ArtifactType.BUILD_ARTIFACTS;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { BuildFunction } from '@expo/steps';
2
+ export declare function createSetUpNpmrcBuildFunction(): BuildFunction;
@@ -7,9 +7,9 @@ exports.createSetUpNpmrcBuildFunction = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
9
  const steps_1 = require("@expo/steps");
10
- const packageManager_1 = require("../../../utils/packageManager");
10
+ const packageManager_1 = require("../../utils/packageManager");
11
11
  const NPMRC_TEMPLATE_PATH = path_1.default.join(__dirname, '../../templates/npmrc');
12
- function createSetUpNpmrcBuildFunction(ctx) {
12
+ function createSetUpNpmrcBuildFunction() {
13
13
  return new steps_1.BuildFunction({
14
14
  namespace: 'eas',
15
15
  id: 'use_npm_token',
@@ -18,7 +18,7 @@ function createSetUpNpmrcBuildFunction(ctx) {
18
18
  const { logger } = stepCtx;
19
19
  if (env.NPM_TOKEN) {
20
20
  logger.info('We detected that you set the NPM_TOKEN environment variable');
21
- const projectNpmrcPath = path_1.default.join(ctx.projectTargetDirectory, '.npmrc');
21
+ const projectNpmrcPath = path_1.default.join(stepCtx.global.projectTargetDirectory, '.npmrc');
22
22
  if (await fs_extra_1.default.pathExists(projectNpmrcPath)) {
23
23
  logger.info('.npmrc already exists in your project directory, skipping generation');
24
24
  }
@@ -32,11 +32,11 @@ function createSetUpNpmrcBuildFunction(ctx) {
32
32
  else {
33
33
  const projectNpmrcPath = path_1.default.join((0, packageManager_1.findPackagerRootDir)(stepCtx.workingDirectory), '.npmrc');
34
34
  if (await fs_extra_1.default.pathExists(projectNpmrcPath)) {
35
- logger.info(`.npmrc found at ${path_1.default.relative(ctx.projectTargetDirectory, projectNpmrcPath)}`);
35
+ logger.info(`.npmrc found at ${path_1.default.relative(stepCtx.global.projectTargetDirectory, projectNpmrcPath)}`);
36
36
  }
37
37
  }
38
38
  },
39
39
  });
40
40
  }
41
41
  exports.createSetUpNpmrcBuildFunction = createSetUpNpmrcBuildFunction;
42
- //# sourceMappingURL=setUpNpmrc.js.map
42
+ //# sourceMappingURL=useNpmToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNpmToken.js","sourceRoot":"","sources":["../../../src/steps/functions/useNpmToken.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,wDAA0B;AAC1B,uCAA4C;AAE5C,+DAAiE;AAEjE,MAAM,mBAAmB,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAE1E,SAAgB,6BAA6B;IAC3C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;YAC3B,IAAI,GAAG,CAAC,SAAS,EAAE;gBACjB,MAAM,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;gBAC3E,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;gBACpF,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;oBACzC,MAAM,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;iBACrF;qBAAM;oBACL,MAAM,aAAa,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;oBACrE,MAAM,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;oBACtF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBAC3B,MAAM,kBAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;iBACtD;aACF;iBAAM;gBACL,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAAC,IAAA,oCAAmB,EAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC;gBAC5F,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;oBACzC,MAAM,CAAC,IAAI,CACT,mBAAmB,cAAI,CAAC,QAAQ,CAC9B,OAAO,CAAC,MAAM,CAAC,sBAAsB,EACrC,gBAAgB,CACjB,EAAE,CACJ,CAAC;iBACH;aACF;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA/BD,sEA+BC","sourcesContent":["import path from 'path';\n\nimport fs from 'fs-extra';\nimport { BuildFunction } from '@expo/steps';\n\nimport { findPackagerRootDir } from '../../utils/packageManager';\n\nconst NPMRC_TEMPLATE_PATH = path.join(__dirname, '../../templates/npmrc');\n\nexport function createSetUpNpmrcBuildFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'use_npm_token',\n name: 'Use NPM_TOKEN',\n fn: async (stepCtx, { env }) => {\n const { logger } = stepCtx;\n if (env.NPM_TOKEN) {\n logger.info('We detected that you set the NPM_TOKEN environment variable');\n const projectNpmrcPath = path.join(stepCtx.global.projectTargetDirectory, '.npmrc');\n if (await fs.pathExists(projectNpmrcPath)) {\n logger.info('.npmrc already exists in your project directory, skipping generation');\n } else {\n const npmrcContents = await fs.readFile(NPMRC_TEMPLATE_PATH, 'utf8');\n logger.info('Creating .npmrc in your project directory with the following contents:');\n logger.info(npmrcContents);\n await fs.copy(NPMRC_TEMPLATE_PATH, projectNpmrcPath);\n }\n } else {\n const projectNpmrcPath = path.join(findPackagerRootDir(stepCtx.workingDirectory), '.npmrc');\n if (await fs.pathExists(projectNpmrcPath)) {\n logger.info(\n `.npmrc found at ${path.relative(\n stepCtx.global.projectTargetDirectory,\n projectNpmrcPath\n )}`\n );\n }\n }\n },\n });\n}\n"]}
@@ -12,10 +12,10 @@ const expoUpdates_2 = require("./android/expoUpdates");
12
12
  async function configureEASUpdateIfInstalledAsync({ job, workingDirectory, logger, inputs, appConfig, }) {
13
13
  var _a, _b, _c, _d, _e;
14
14
  if (!(await (0, isExpoUpdatesInstalled_1.default)(workingDirectory))) {
15
- logger.info('Expo Updates is not installed, skipping configuring Expo Updates.');
15
+ throw new Error(`Cannot configure Expo Updates because the expo-updates package is not installed.`);
16
16
  }
17
17
  const runtimeVersion = (_c = (_a = inputs.channel) !== null && _a !== void 0 ? _a : (_b = job.version) === null || _b === void 0 ? void 0 : _b.runtimeVersion) !== null && _c !== void 0 ? _c : (0, Updates_1.getRuntimeVersionNullable)(appConfig, job.platform);
18
- const jobOrInputChannel = (_d = inputs.runtimeVersion) !== null && _d !== void 0 ? _d : (_e = job.updates) === null || _e === void 0 ? void 0 : _e.channel;
18
+ const jobOrInputChannel = (_d = inputs.channel) !== null && _d !== void 0 ? _d : (_e = job.updates) === null || _e === void 0 ? void 0 : _e.channel;
19
19
  if (isEASUpdateConfigured(appConfig, logger)) {
20
20
  const channel = jobOrInputChannel !== null && jobOrInputChannel !== void 0 ? jobOrInputChannel : (await getChannelAsync(job, workingDirectory));
21
21
  if (channel) {
@@ -1 +1 @@
1
- {"version":3,"file":"expoUpdates.js","sourceRoot":"","sources":["../../../src/steps/utils/expoUpdates.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAoD;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EAAE,gBAAgB,CAAC,CAAC;YAC5D,OAAO;SACR;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACjD;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAQ,EAAE,gBAAwB;IAC/D,QAAQ,GAAG,CAAC,QAAQ,EAAE;QACpB,KAAK,wBAAQ,CAAC,OAAO,CAAC,CAAC;YACrB,OAAO,MAAM,IAAA,mDAAqC,EAAC,gBAAgB,CAAC,CAAC;SACtE;QACD,KAAK,wBAAQ,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,MAAM,IAAA,+CAAiC,EAAC,gBAAgB,CAAC,CAAC;SAClE;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACjD;AACH,CAAC;AAED,KAAK,UAAU,8BAA8B,CAC3C,GAAQ,EACR,cAAsB,EACtB,gBAAwB;IAExB,QAAQ,GAAG,CAAC,QAAQ,EAAE;QACpB,KAAK,wBAAQ,CAAC,OAAO,CAAC,CAAC;YACrB,MAAM,IAAA,mDAAqC,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;YAC9E,OAAO;SACR;QACD,KAAK,wBAAQ,CAAC,GAAG,CAAC,CAAC;YACjB,MAAM,IAAA,+CAAiC,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;YAC1E,OAAO;SACR;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACjD;AACH,CAAC","sourcesContent":["import { Job, Platform } from '@expo/eas-build-job';\nimport { bunyan } from '@expo/logger';\nimport { ExpoConfig } from '@expo/config';\nimport { getRuntimeVersionNullable } from '@expo/config-plugins/build/utils/Updates';\n\nimport isExpoUpdatesInstalledAsync from '../../utils/isExpoUpdatesInstalled';\n\nimport {\n iosGetNativelyDefinedChannelAsync,\n iosSetChannelNativelyAsync,\n iosSetRuntimeVersionNativelyAsync,\n} from './ios/expoUpdates';\nimport {\n androidGetNativelyDefinedChannelAsync,\n androidSetChannelNativelyAsync,\n androidSetRuntimeVersionNativelyAsync,\n} from './android/expoUpdates';\n\nexport async function configureEASUpdateIfInstalledAsync({\n job,\n workingDirectory,\n logger,\n inputs,\n appConfig,\n}: {\n job: Job;\n workingDirectory: string;\n logger: bunyan;\n inputs: {\n runtimeVersion?: string;\n channel?: string;\n };\n appConfig: ExpoConfig;\n}): Promise<void> {\n if (!(await isExpoUpdatesInstalledAsync(workingDirectory))) {\n logger.info('Expo Updates is not installed, skipping configuring Expo Updates.');\n }\n\n const runtimeVersion =\n inputs.channel ??\n job.version?.runtimeVersion ??\n getRuntimeVersionNullable(appConfig, job.platform);\n\n const jobOrInputChannel = inputs.runtimeVersion ?? job.updates?.channel;\n\n if (isEASUpdateConfigured(appConfig, logger)) {\n const channel = jobOrInputChannel ?? (await getChannelAsync(job, workingDirectory));\n if (channel) {\n await configureEASUpdate(job, logger, channel, workingDirectory);\n } else {\n if (job.releaseChannel !== undefined) {\n logger.warn(\n `This build is configured with EAS Update however has a Classic Updates releaseChannel set instead of having an EAS Update channel.`\n );\n } else {\n logger.warn(\n `This build is configured to query EAS Update for updates, however no channel is set.`\n );\n }\n }\n } else {\n logger.info(`Expo Updates is not configured, skipping configuring Expo Updates.`);\n }\n\n if (runtimeVersion) {\n logger.info('Updating runtimeVersion in Expo.plist');\n await setRuntimeVersionNativelyAsync(job, runtimeVersion, workingDirectory);\n }\n}\n\nexport function isEASUpdateConfigured(appConfig: ExpoConfig, logger: bunyan): boolean {\n const rawUrl = appConfig.updates?.url;\n if (!rawUrl) {\n return false;\n }\n try {\n const url = new URL(rawUrl);\n return ['u.expo.dev', 'staging-u.expo.dev'].includes(url.hostname);\n } catch (err) {\n logger.error({ err }, `Cannot parse expo.updates.url = ${rawUrl} as URL`);\n logger.error(`Assuming EAS Update is not configured`);\n return false;\n }\n}\n\nasync function configureEASUpdate(\n job: Job,\n logger: bunyan,\n channel: string,\n workingDirectory: string\n): Promise<void> {\n const newUpdateRequestHeaders: Record<string, string> = {\n 'expo-channel-name': channel,\n };\n\n const configFile = job.platform === Platform.ANDROID ? 'AndroidManifest.xml' : 'Expo.plist';\n logger.info(\n `Setting the update request headers in '${configFile}' to '${JSON.stringify(\n newUpdateRequestHeaders\n )}'`\n );\n\n switch (job.platform) {\n case Platform.ANDROID: {\n await androidSetChannelNativelyAsync(channel, workingDirectory);\n return;\n }\n case Platform.IOS: {\n await iosSetChannelNativelyAsync(channel, workingDirectory);\n return;\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n\nasync function getChannelAsync(job: Job, workingDirectory: string): Promise<string | null> {\n switch (job.platform) {\n case Platform.ANDROID: {\n return await androidGetNativelyDefinedChannelAsync(workingDirectory);\n }\n case Platform.IOS: {\n return await iosGetNativelyDefinedChannelAsync(workingDirectory);\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n\nasync function setRuntimeVersionNativelyAsync(\n job: Job,\n runtimeVersion: string,\n workingDirectory: string\n): Promise<void> {\n switch (job.platform) {\n case Platform.ANDROID: {\n await androidSetRuntimeVersionNativelyAsync(runtimeVersion, workingDirectory);\n return;\n }\n case Platform.IOS: {\n await iosSetRuntimeVersionNativelyAsync(runtimeVersion, workingDirectory);\n return;\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n"]}
1
+ {"version":3,"file":"expoUpdates.js","sourceRoot":"","sources":["../../../src/steps/utils/expoUpdates.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAoD;AAGpD,sEAAqF;AAErF,gGAA6E;AAE7E,mDAI2B;AAC3B,uDAI+B;AAExB,KAAK,UAAU,kCAAkC,CAAC,EACvD,GAAG,EACH,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,SAAS,GAUV;;IACC,IAAI,CAAC,CAAC,MAAM,IAAA,gCAA2B,EAAC,gBAAgB,CAAC,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;KACH;IAED,MAAM,cAAc,GAClB,MAAA,MAAA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BAAQ,CAAC,GAAG,CAAC,CAAC;YACjB,OAAO,MAAM,IAAA,+CAAiC,EAAC,gBAAgB,CAAC,CAAC;SAClE;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACjD;AACH,CAAC;AAED,KAAK,UAAU,8BAA8B,CAC3C,GAAQ,EACR,cAAsB,EACtB,gBAAwB;IAExB,QAAQ,GAAG,CAAC,QAAQ,EAAE;QACpB,KAAK,wBAAQ,CAAC,OAAO,CAAC,CAAC;YACrB,MAAM,IAAA,mDAAqC,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;YAC9E,OAAO;SACR;QACD,KAAK,wBAAQ,CAAC,GAAG,CAAC,CAAC;YACjB,MAAM,IAAA,+CAAiC,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;YAC1E,OAAO;SACR;QACD;YACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACjD;AACH,CAAC","sourcesContent":["import { Job, Platform } from '@expo/eas-build-job';\nimport { bunyan } from '@expo/logger';\nimport { ExpoConfig } from '@expo/config';\nimport { getRuntimeVersionNullable } from '@expo/config-plugins/build/utils/Updates';\n\nimport isExpoUpdatesInstalledAsync from '../../utils/isExpoUpdatesInstalled';\n\nimport {\n iosGetNativelyDefinedChannelAsync,\n iosSetChannelNativelyAsync,\n iosSetRuntimeVersionNativelyAsync,\n} from './ios/expoUpdates';\nimport {\n androidGetNativelyDefinedChannelAsync,\n androidSetChannelNativelyAsync,\n androidSetRuntimeVersionNativelyAsync,\n} from './android/expoUpdates';\n\nexport async function configureEASUpdateIfInstalledAsync({\n job,\n workingDirectory,\n logger,\n inputs,\n appConfig,\n}: {\n job: Job;\n workingDirectory: string;\n logger: bunyan;\n inputs: {\n runtimeVersion?: string;\n channel?: string;\n };\n appConfig: ExpoConfig;\n}): Promise<void> {\n if (!(await isExpoUpdatesInstalledAsync(workingDirectory))) {\n throw new Error(\n `Cannot configure Expo Updates because the expo-updates package is not installed.`\n );\n }\n\n const runtimeVersion =\n inputs.channel ??\n job.version?.runtimeVersion ??\n getRuntimeVersionNullable(appConfig, job.platform);\n\n const jobOrInputChannel = inputs.channel ?? job.updates?.channel;\n\n if (isEASUpdateConfigured(appConfig, logger)) {\n const channel = jobOrInputChannel ?? (await getChannelAsync(job, workingDirectory));\n if (channel) {\n await configureEASUpdate(job, logger, channel, workingDirectory);\n } else {\n if (job.releaseChannel !== undefined) {\n logger.warn(\n `This build is configured with EAS Update however has a Classic Updates releaseChannel set instead of having an EAS Update channel.`\n );\n } else {\n logger.warn(\n `This build is configured to query EAS Update for updates, however no channel is set.`\n );\n }\n }\n } else {\n logger.info(`Expo Updates is not configured, skipping configuring Expo Updates.`);\n }\n\n if (runtimeVersion) {\n logger.info('Updating runtimeVersion in Expo.plist');\n await setRuntimeVersionNativelyAsync(job, runtimeVersion, workingDirectory);\n }\n}\n\nexport function isEASUpdateConfigured(appConfig: ExpoConfig, logger: bunyan): boolean {\n const rawUrl = appConfig.updates?.url;\n if (!rawUrl) {\n return false;\n }\n try {\n const url = new URL(rawUrl);\n return ['u.expo.dev', 'staging-u.expo.dev'].includes(url.hostname);\n } catch (err) {\n logger.error({ err }, `Cannot parse expo.updates.url = ${rawUrl} as URL`);\n logger.error(`Assuming EAS Update is not configured`);\n return false;\n }\n}\n\nasync function configureEASUpdate(\n job: Job,\n logger: bunyan,\n channel: string,\n workingDirectory: string\n): Promise<void> {\n const newUpdateRequestHeaders: Record<string, string> = {\n 'expo-channel-name': channel,\n };\n\n const configFile = job.platform === Platform.ANDROID ? 'AndroidManifest.xml' : 'Expo.plist';\n logger.info(\n `Setting the update request headers in '${configFile}' to '${JSON.stringify(\n newUpdateRequestHeaders\n )}'`\n );\n\n switch (job.platform) {\n case Platform.ANDROID: {\n await androidSetChannelNativelyAsync(channel, workingDirectory);\n return;\n }\n case Platform.IOS: {\n await iosSetChannelNativelyAsync(channel, workingDirectory);\n return;\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n\nasync function getChannelAsync(job: Job, workingDirectory: string): Promise<string | null> {\n switch (job.platform) {\n case Platform.ANDROID: {\n return await androidGetNativelyDefinedChannelAsync(workingDirectory);\n }\n case Platform.IOS: {\n return await iosGetNativelyDefinedChannelAsync(workingDirectory);\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n\nasync function setRuntimeVersionNativelyAsync(\n job: Job,\n runtimeVersion: string,\n workingDirectory: string\n): Promise<void> {\n switch (job.platform) {\n case Platform.ANDROID: {\n await androidSetRuntimeVersionNativelyAsync(runtimeVersion, workingDirectory);\n return;\n }\n case Platform.IOS: {\n await iosSetRuntimeVersionNativelyAsync(runtimeVersion, workingDirectory);\n return;\n }\n default:\n throw new Error(`Platform is not supported.`);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -65,5 +65,5 @@
65
65
  "node": "18.13.0",
66
66
  "yarn": "1.22.19"
67
67
  },
68
- "gitHead": "ad4d0b971474e48a2ed99308857534b8b54b3f09"
68
+ "gitHead": "099bde714a075f1a5289511acc7dd626516f4011"
69
69
  }
@@ -1,4 +0,0 @@
1
- import { Job } from '@expo/eas-build-job';
2
- import { BuildFunction } from '@expo/steps';
3
- import { BuildContext } from '../../../context';
4
- export declare function createBuildReactNativeAppBuildFunction<T extends Job>(ctx: BuildContext<T>): BuildFunction;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createBuildReactNativeAppBuildFunction = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const eas_build_job_1 = require("@expo/eas-build-job");
9
- const steps_1 = require("@expo/steps");
10
- const fs_extra_1 = __importDefault(require("fs-extra"));
11
- const gradle_1 = require("../../../android/gradle");
12
- const fastlane_1 = require("../../utils/ios/fastlane");
13
- function createBuildReactNativeAppBuildFunction(ctx) {
14
- return new steps_1.BuildFunction({
15
- namespace: 'eas',
16
- id: 'build_react_native_app',
17
- name: 'Build React Native app',
18
- fn: async (stepsCtx) => {
19
- if (ctx.job.platform === eas_build_job_1.Platform.ANDROID) {
20
- const androidDir = path_1.default.join(stepsCtx.workingDirectory, 'android');
21
- if (!(await fs_extra_1.default.exists(androidDir))) {
22
- throw new steps_1.errors.BuildStepRuntimeError(`Android project directory (${androidDir}) does not exist. Make sure that the working directory for this step (${stepsCtx.workingDirectory}) is set to the root of your React Native project. If you are on a managed workflow, make sure that you have run "eas/prebuild" step to generate your native code.`);
23
- }
24
- stepsCtx.logger.info('Building Android project');
25
- await (0, gradle_1.runGradleCommand)(ctx, {
26
- logger: stepsCtx.logger,
27
- gradleCommand: (0, gradle_1.resolveGradleCommand)(ctx.job),
28
- androidDir,
29
- });
30
- }
31
- else {
32
- const iosDir = path_1.default.join(stepsCtx.workingDirectory, 'ios');
33
- if (!(await fs_extra_1.default.exists(iosDir))) {
34
- throw new steps_1.errors.BuildStepRuntimeError(`iOS project directory (${iosDir}) does not exist. Make sure that the working directory for this step (${stepsCtx.workingDirectory}) is set to the root of your React Native project. If you are on a managed workflow, make sure that you have run "eas/prebuild" step to generate your native code.`);
35
- }
36
- await (0, fastlane_1.runFastlaneGym)({
37
- workingDir: stepsCtx.workingDirectory,
38
- logger: stepsCtx.logger,
39
- buildLogsDirectory: ctx.buildLogsDirectory,
40
- env: ctx.env,
41
- });
42
- }
43
- },
44
- });
45
- }
46
- exports.createBuildReactNativeAppBuildFunction = createBuildReactNativeAppBuildFunction;
47
- //# sourceMappingURL=buildReactNativeApp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildReactNativeApp.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/buildReactNativeApp.ts"],"names":[],"mappings":";;;;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Ac,EAAC;oBACnB,UAAU,EAAE,QAAQ,CAAC,gBAAgB;oBACrC,MAAM,EAAE,QAAQ,CAAC,MAAM;oBACvB,kBAAkB,EAAE,GAAG,CAAC,kBAAkB;oBAC1C,GAAG,EAAE,GAAG,CAAC,GAAG;iBACb,CAAC,CAAC;aACJ;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AArCD,wFAqCC","sourcesContent":["import path from 'path';\n\nimport { Android, Job, Platform } from '@expo/eas-build-job';\nimport { BuildFunction, errors } from '@expo/steps';\nimport fs from 'fs-extra';\n\nimport { BuildContext } from '../../../context';\nimport { resolveGradleCommand, runGradleCommand } from '../../../android/gradle';\nimport { runFastlaneGym } from '../../utils/ios/fastlane';\n\nexport function createBuildReactNativeAppBuildFunction<T extends Job>(\n ctx: BuildContext<T>\n): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'build_react_native_app',\n name: 'Build React Native app',\n fn: async (stepsCtx) => {\n if (ctx.job.platform === Platform.ANDROID) {\n const androidDir = path.join(stepsCtx.workingDirectory, 'android');\n if (!(await fs.exists(androidDir))) {\n throw new errors.BuildStepRuntimeError(\n `Android project directory (${androidDir}) does not exist. Make sure that the working directory for this step (${stepsCtx.workingDirectory}) is set to the root of your React Native project. If you are on a managed workflow, make sure that you have run \"eas/prebuild\" step to generate your native code.`\n );\n }\n stepsCtx.logger.info('Building Android project');\n await runGradleCommand(ctx as BuildContext<Android.Job>, {\n logger: stepsCtx.logger,\n gradleCommand: resolveGradleCommand(ctx.job),\n androidDir,\n });\n } else {\n const iosDir = path.join(stepsCtx.workingDirectory, 'ios');\n if (!(await fs.exists(iosDir))) {\n throw new errors.BuildStepRuntimeError(\n `iOS project directory (${iosDir}) does not exist. Make sure that the working directory for this step (${stepsCtx.workingDirectory}) is set to the root of your React Native project. If you are on a managed workflow, make sure that you have run \"eas/prebuild\" step to generate your native code.`\n );\n }\n await runFastlaneGym({\n workingDir: stepsCtx.workingDirectory,\n logger: stepsCtx.logger,\n buildLogsDirectory: ctx.buildLogsDirectory,\n env: ctx.env,\n });\n }\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/checkout.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA4C;AAC5C,wDAA0B;AAE1B,SAAgB,2BAA2B;IACzC,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;YACrB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;YACvD,MAAM,kBAAE,CAAC,IAAI,CACX,QAAQ,CAAC,MAAM,CAAC,sBAAsB,EACtC,QAAQ,CAAC,MAAM,CAAC,sBAAsB,EACtC;gBACE,SAAS,EAAE,IAAI;aAChB,CACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAhBD,kEAgBC","sourcesContent":["import { BuildFunction } from '@expo/steps';\nimport fs from 'fs-extra';\n\nexport function createCheckoutBuildFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'checkout',\n name: 'Checkout',\n fn: async (stepsCtx) => {\n stepsCtx.logger.info('Checking out project directory');\n await fs.move(\n stepsCtx.global.projectSourceDirectory,\n stepsCtx.global.projectTargetDirectory,\n {\n overwrite: true,\n }\n );\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureEASUpdateIfInstalled.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/configureEASUpdateIfInstalled.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAEzF,oDAA4B;AAE5B,wDAAyD;AACzD,yDAA6E;AAE7E,SAAgB,qCAAqC;IACnD,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,m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AkC,EAAC;gBACvC,GAAG;gBACH,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;gBAC1C,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS;gBACT,MAAM,EAAE;oBACN,cAAc,EAAE,mBAAmB;oBACnC,OAAO,EAAE,mBAAmB;iBAC7B;aACF,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAlDD,sFAkDC","sourcesContent":["import assert from 'assert';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport { Job } from '@expo/eas-build-job';\nimport semver from 'semver';\n\nimport { readAppConfig } from '../../../utils/appConfig';\nimport { configureEASUpdateIfInstalledAsync } from '../../utils/expoUpdates';\n\nexport function configureEASUpdateIfInstalledFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'configure_eas_update_if_installed',\n name: 'Configure EAS Update if installed',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'runtime_version',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'channel',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepCtx, { env, inputs }) => {\n assert(stepCtx.global.staticContext.job, 'Job is not defined');\n const job = stepCtx.global.staticContext.job as Job;\n\n const appConfig = readAppConfig(\n stepCtx.workingDirectory,\n Object.keys(env).reduce((acc, key) => {\n acc[key] = env[key] ?? '';\n return acc;\n }, {} as Record<string, string>),\n stepCtx.logger\n ).exp;\n\n const releaseChannelInput = inputs.channel.value as string | undefined;\n const runtimeVersionInput = inputs.runtime_version.value as string | undefined;\n if (runtimeVersionInput && !semver.valid(runtimeVersionInput)) {\n throw new Error(\n `Runtime version provided by the \"runtime_version\" input is not a valid semver version: ${releaseChannelInput}`\n );\n }\n\n await configureEASUpdateIfInstalledAsync({\n job,\n workingDirectory: stepCtx.workingDirectory,\n logger: stepCtx.logger,\n appConfig,\n inputs: {\n runtimeVersion: runtimeVersionInput,\n channel: releaseChannelInput,\n },\n });\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"findAndUploadBuildArtifacts.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/findAndUploadBuildArtifacts.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,uCAA4C;AAE5C,8CAAgD;AAChD,wDAAyD;AACzD,gEAA0E;AAG1E,SAAgB,8CAA8C,CAC5D,GAAuB;IAEvB,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,iCAAiC;QACrC,IAAI,EAAE,iCAAiC;QACvC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;;YACpB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;YAC3B,MAAM,+BAA+B,GACnC,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,OAAO;gBACnC,CAAC,CAAC,MAAA,GAAG,CAAC,GAAG,CAAC,sBAAsB,mCAAI,0CAA0C;gBAC9E,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtC,MAAM,mBAAmB,GAAG,MAAM,IAAA,yBAAa,EAC7C,OAAO,CAAC,gBAAgB,EACxB,+BAA+B,EAC/B,MAAM,CACP,CAAC;YACF,MAAM,CAAC,IAAI,CACT,sBACE,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EACzC,KAAK,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACtC,CAAC;YACF,MAAM,cAAc,GAAG,CACrB,MAAM,OAAO,CAAC,GAAG,CACf,CAAC,MAAA,GAAG,CAAC,GAAG,CAAC,kBAAkB,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC9C,IAAA,yBAAa,EAAC,GAAG,CAAC,sBA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AC5B;YACD,IAAI,eAAe,CAAC,MAAM,KAAK,UAAU,EAAE;gBACzC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;gBAClD,MAAM,eAAe,CAAC,MAAM,CAAC;aAC9B;YACD,IAAI,oBAAoB,CAAC,MAAM,KAAK,UAAU,EAAE;gBAC9C,MAAM,CAAC,KAAK,CAAC,sCAAsC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC;aACnF;YACD,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAhFD,wGAgFC;AAED,SAAS,sBAAsB,CAAC,GAAY;IAC1C,IAAI,GAAG,CAAC,sBAAsB,EAAE;QAC9B,OAAO,GAAG,CAAC,sBAAsB,CAAC;KACnC;SAAM,IAAI,GAAG,CAAC,SAAS,EAAE;QACxB,OAAO,2CAA2C,CAAC;KACpD;SAAM;QACL,OAAO,iBAAiB,CAAC;KAC1B;AACH,CAAC","sourcesContent":["import { Ios, Platform } from '@expo/eas-build-job';\nimport { BuildFunction } from '@expo/steps';\n\nimport { ArtifactType } from '../../../context';\nimport { findArtifacts } from '../../../utils/artifacts';\nimport { findXcodeBuildLogsPathAsync } from '../../../ios/xcodeBuildLogs';\nimport { CustomBuildContext } from '../../../customBuildContext';\n\nexport function createFindAndUploadBuildArtifactsBuildFunction(\n ctx: CustomBuildContext\n): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'find_and_upload_build_artifacts',\n name: 'Find and upload build artifacts',\n fn: async (stepCtx) => {\n const { logger } = stepCtx;\n const applicationArchivePatternOrPath =\n ctx.job.platform === Platform.ANDROID\n ? ctx.job.applicationArchivePath ?? 'android/app/build/outputs/**/*.{apk,aab}'\n : resolveIosArtifactPath(ctx.job);\n const applicationArchives = await findArtifacts(\n stepCtx.workingDirectory,\n applicationArchivePatternOrPath,\n logger\n );\n logger.info(\n `Application archive${\n applicationArchives.length > 1 ? 's' : ''\n }: ${applicationArchives.join(', ')}`\n );\n const buildArtifacts = (\n await Promise.all(\n (ctx.job.buildArtifactPaths ?? []).map((path) =>\n findArtifacts(ctx.projectTargetDirectory, path, logger)\n )\n )\n ).flat();\n if (buildArtifacts.length > 0) {\n logger.info(`Found additional build artifacts: ${buildArtifacts.join(', ')}`);\n }\n\n logger.info('Uploading...');\n const [archiveUpload, artifactsUpload, xcodeBuildLogsUpload] = await Promise.allSettled([\n ctx.runtimeApi.uploadArtifacts(\n ArtifactType.APPLICATION_ARCHIVE,\n applicationArchives,\n logger\n ),\n (async () => {\n if (buildArtifacts.length > 0) {\n await ctx.runtimeApi.uploadArtifacts(\n ArtifactType.BUILD_ARTIFACTS,\n buildArtifacts,\n logger\n );\n }\n })(),\n (async () => {\n if (ctx.job.platform !== Platform.IOS) {\n return;\n }\n const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(\n stepCtx.global.buildLogsDirectory\n );\n if (xcodeBuildLogsPath) {\n await ctx.runtimeApi.uploadArtifacts(\n ArtifactType.XCODE_BUILD_LOGS,\n [xcodeBuildLogsPath],\n logger\n );\n }\n })(),\n ]);\n if (archiveUpload.status === 'rejected') {\n logger.error('Failed to upload application archive.');\n throw archiveUpload.reason;\n }\n if (artifactsUpload.status === 'rejected') {\n logger.error('Failed to upload build artifacts.');\n throw artifactsUpload.reason;\n }\n if (xcodeBuildLogsUpload.status === 'rejected') {\n logger.error(`Failed to upload Xcode build logs. ${xcodeBuildLogsUpload.reason}`);\n }\n logger.info('Upload finished');\n },\n });\n}\n\nfunction resolveIosArtifactPath(job: Ios.Job): string {\n if (job.applicationArchivePath) {\n return job.applicationArchivePath;\n } else if (job.simulator) {\n return 'ios/build/Build/Products/*simulator/*.app';\n } else {\n return 'ios/build/*.ipa';\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { BuildFunction, BuildStepEnv } from '@expo/steps';
2
- import { BuildStepContext } from '@expo/steps/dist_esm/BuildStepContext';
3
- import { CustomBuildContext } from '../../../customBuildContext';
4
- export declare function createInstallNodeModulesBuildFunction(ctx: CustomBuildContext): BuildFunction;
5
- export declare function installNodeModules(stepCtx: BuildStepContext, ctx: CustomBuildContext, env: BuildStepEnv): Promise<void>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"installNodeModules.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/installNodeModules.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAE1D,sEAAuC;AAGvC,kEAIuC;AACvC,oDAAsD;AAEtD,SAAgB,qCAAqC,CAAC,GAAuB;IAC3E,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,sBAAsB;QAC5B,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YAC7B,MAAM,kBAAkB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAC9C,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AATD,sFASC;AAEM,KAAK,UAAU,kBAAkB,CACtC,OAAyB,EACzB,GAAuB,EACvB,GAAiB;IAEjB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,MAAM,cAAc,GAAG,IAAA,sCAAqB,EAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACzE,MAAM,cAAc,GAAG,IAAA,oCAAmB,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACrE,IAAI,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IACvB,IAAI,cAAc,KAAK,+BAAc,CAAC,IAAI,EAAE;QAC1C,IAAI,GAAG,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;KAC5C;SAAM,IAAI,cAAc,KAAK,+BAAc,CAAC,IAAI,EAAE;QACjD,MAAM,OAAO,GAAG,MAAM,IAAA,sBAAY,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAC7D,IAAI,OAAO,EAAE;YACX,IAAI,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;SACtC;KACF;IACD,MAAM,CAAC,IAAI,CAAC,YAAY,cAAc,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC;IAC5F,MAAM,IAAA,sBAAK,EAAC,cAAc,EAAE,IAAI,EAAE;QAChC,GAAG,EAAE,cAAc;QACnB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG;KACJ,CAAC,CAAC;AACL,CAAC;AAvBD,gDAuBC","sourcesContent":["import { BuildFunction, BuildStepEnv } from '@expo/steps';\nimport { BuildStepContext } from '@expo/steps/dist_esm/BuildStepContext';\nimport spawn from '@expo/turtle-spawn';\n\nimport { CustomBuildContext } from '../../../customBuildContext';\nimport {\n findPackagerRootDir,\n PackageManager,\n resolvePackageManager,\n} from '../../../utils/packageManager';\nimport { isUsingYarn2 } from '../../../utils/project';\n\nexport function createInstallNodeModulesBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'install_node_modules',\n name: 'Install node modules',\n fn: async (stepCtx, { env }) => {\n await installNodeModules(stepCtx, ctx, env);\n },\n });\n}\n\nexport async function installNodeModules(\n stepCtx: BuildStepContext,\n ctx: CustomBuildContext,\n env: BuildStepEnv\n): Promise<void> {\n const { logger } = stepCtx;\n const packageManager = resolvePackageManager(ctx.projectTargetDirectory);\n const packagerRunDir = findPackagerRootDir(stepCtx.workingDirectory);\n let args = ['install'];\n if (packageManager === PackageManager.PNPM) {\n args = ['install', '--no-frozen-lockfile'];\n } else if (packageManager === PackageManager.YARN) {\n const isYarn2 = await isUsingYarn2(stepCtx.workingDirectory);\n if (isYarn2) {\n args = ['install', '--no-immutable'];\n }\n }\n logger.info(`Running \"${packageManager} ${args.join(' ')}\" in ${packagerRunDir} directory`);\n await spawn(packageManager, args, {\n cwd: packagerRunDir,\n logger: stepCtx.logger,\n env,\n });\n}\n"]}
@@ -1,3 +0,0 @@
1
- import { BuildFunction } from '@expo/steps';
2
- import { CustomBuildContext } from '../../../customBuildContext';
3
- export declare function createPrebuildBuildFunction(ctx: CustomBuildContext): BuildFunction;
@@ -1 +0,0 @@
1
- {"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/prebuild.ts"],"names":[],"mappings":";;;;;;AAEA,uCAAyF;AACzF,sEAAuC;AAGvC,kEAAsF;AAEtF,6DAA0D;AAO1D,SAAgB,2BAA2B,CAAC,GAAuB;IACjE,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,wBAAwB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,OAAO;gBACX,YAAY,EAAE,KAAK;gBACnB,oBAAoB,EAAE,mCAA2B,CAAC,OAAO;gBACzD,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;YACrC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;YAC3B,kGAAkG;YAClG,MAAM,cAAc,GAAG,IAAA,sCAAqB,EAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YACzE,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,GAAG,CAAC,GAAG,EAAE;gBAC1D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAgB;gBACpC,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC,KAAe;aACpE,CAAC,CAAC;YACH,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,GAAG,mBAAmB,CAAC,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BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport spawn from '@expo/turtle-spawn';\n\nimport { CustomBuildContext } from '../../../customBuildContext';\nimport { PackageManager, resolvePackageManager } from '../../../utils/packageManager';\n\nimport { installNodeModules } from './installNodeModules';\n\ntype PrebuildOptions = {\n clean?: boolean;\n skipDependencyUpdate?: string;\n};\n\nexport function createPrebuildBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'prebuild',\n name: 'Prebuild',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'skip_dependency_update',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'clean',\n defaultValue: false,\n allowedValueTypeName: BuildStepInputValueTypeName.BOOLEAN,\n required: true,\n }),\n ],\n fn: async (stepCtx, { inputs, env }) => {\n const { logger } = stepCtx;\n // TODO: make sure we can pass Apple Team ID to prebuild when adding credentials for custom builds\n const packageManager = resolvePackageManager(ctx.projectTargetDirectory);\n const prebuildCommandArgs = getPrebuildCommandArgs(ctx.job, {\n clean: inputs.clean.value as boolean,\n skipDependencyUpdate: inputs.skip_dependency_update.value as string,\n });\n const argsWithExpo = ['expo', ...prebuildCommandArgs];\n const options = {\n cwd: stepCtx.workingDirectory,\n logger,\n env: {\n EXPO_IMAGE_UTILS_NO_SHARP: '1',\n ...env,\n },\n };\n if (packageManager === PackageManager.NPM) {\n await spawn('npx', argsWithExpo, options);\n } else if (packageManager === PackageManager.YARN) {\n await spawn('yarn', argsWithExpo, options);\n } else if (packageManager === PackageManager.PNPM) {\n await spawn('pnpm', argsWithExpo, options);\n } else {\n throw new Error(`Unsupported package manager: ${packageManager}`);\n }\n await installNodeModules(stepCtx, ctx, env);\n },\n });\n}\n\nfunction getPrebuildCommandArgs(\n job: Job,\n { clean, skipDependencyUpdate }: PrebuildOptions\n): string[] {\n if (job.experimental?.prebuildCommand) {\n return sanitizeUserDefinedPrebuildCommand(job.experimental.prebuildCommand, job.platform, {\n clean,\n skipDependencyUpdate,\n });\n }\n return [\n 'prebuild',\n '--no-install',\n '--platform',\n job.platform,\n ...(skipDependencyUpdate ? ['--skip-dependency-update', skipDependencyUpdate] : []),\n ...(clean ? ['--clean'] : []),\n ];\n}\n\n// TODO: deprecate prebuildCommand in eas.json\nfunction sanitizeUserDefinedPrebuildCommand(\n userDefinedPrebuildCommand: string,\n platform: Platform,\n { clean, skipDependencyUpdate }: PrebuildOptions\n): string[] {\n let prebuildCommand = userDefinedPrebuildCommand;\n if (!prebuildCommand.match(/(?:--platform| -p)/)) {\n prebuildCommand = `${prebuildCommand} --platform ${platform}`;\n }\n if (skipDependencyUpdate) {\n prebuildCommand = `${prebuildCommand} --skip-dependency-update ${skipDependencyUpdate}`;\n }\n if (clean) {\n prebuildCommand = `${prebuildCommand} --clean`;\n }\n const npxCommandPrefix = 'npx ';\n const expoCommandPrefix = 'expo ';\n const expoCliCommandPrefix = 'expo-cli ';\n if (prebuildCommand.startsWith(npxCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(npxCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCliCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCliCommandPrefix.length).trim();\n }\n return prebuildCommand.split(' ');\n}\n"]}
@@ -1,3 +0,0 @@
1
- import { BuildFunction } from '@expo/steps';
2
- import { CustomBuildContext } from '../../../customBuildContext';
3
- export declare function createSetUpNpmrcBuildFunction(ctx: CustomBuildContext): BuildFunction;
@@ -1 +0,0 @@
1
- {"version":3,"file":"setUpNpmrc.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/setUpNpmrc.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,wDAA0B;AAC1B,uCAA4C;AAG5C,kEAAoE;AAEpE,MAAM,mBAAmB,GAAG,cAAI,CAAC,I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H,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA5BD,sEA4BC","sourcesContent":["import path from 'path';\n\nimport fs from 'fs-extra';\nimport { BuildFunction } from '@expo/steps';\n\nimport { CustomBuildContext } from '../../../customBuildContext';\nimport { findPackagerRootDir } from '../../../utils/packageManager';\n\nconst NPMRC_TEMPLATE_PATH = path.join(__dirname, '../../templates/npmrc');\n\nexport function createSetUpNpmrcBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'use_npm_token',\n name: 'Use NPM_TOKEN',\n fn: async (stepCtx, { env }) => {\n const { logger } = stepCtx;\n if (env.NPM_TOKEN) {\n logger.info('We detected that you set the NPM_TOKEN environment variable');\n const projectNpmrcPath = path.join(ctx.projectTargetDirectory, '.npmrc');\n if (await fs.pathExists(projectNpmrcPath)) {\n logger.info('.npmrc already exists in your project directory, skipping generation');\n } else {\n const npmrcContents = await fs.readFile(NPMRC_TEMPLATE_PATH, 'utf8');\n logger.info('Creating .npmrc in your project directory with the following contents:');\n logger.info(npmrcContents);\n await fs.copy(NPMRC_TEMPLATE_PATH, projectNpmrcPath);\n }\n } else {\n const projectNpmrcPath = path.join(findPackagerRootDir(stepCtx.workingDirectory), '.npmrc');\n if (await fs.pathExists(projectNpmrcPath)) {\n logger.info(\n `.npmrc found at ${path.relative(ctx.projectTargetDirectory, projectNpmrcPath)}`\n );\n }\n }\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureAndroidVersion.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/configureAndroidVersion.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAyF;AACzF,oDAA4B;AAE5B,mEAAsF;AAEtF,SAAgB,+BAA+B;IAC7C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,2BAA2B;QAC/B,IAAI,EAAE,2BAA2B;QACjC,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,cAAc;gBAClB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;gBACxD,YAAY,EAAE,kCAAkC;aACjD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,cAAc;gBAClB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;gBACxD,YAAY,EAAE,kCAAkC;aACjD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAChC,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,KAAe,CAAC;YACxD,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,KAAe,CAAC;YACxD,IAAI,CAAC,gBAAM,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;gBAC9B,MAAM,IAAI,KAAK,CACb,oFAAoF,WAAW,EAAE,CAClG,CAAC;aACH;YACD,MAAM,IAAA,iDAAkC,EAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,EAAE;gBACjF,WAAW;gBACX,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAjCD,0EAiCC","sourcesContent":["import { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport semver from 'semver';\n\nimport { injectConfigureVersionGradleConfig } from '../../utils/android/gradleConfig';\n\nexport function configureAndroidVersionFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'configure_android_version',\n name: 'Configure Android version',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'version_name',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n defaultValue: '${ eas.job.version.versionName }',\n }),\n BuildStepInput.createProvider({\n id: 'version_code',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.NUMBER,\n defaultValue: '${ eas.job.version.versionCode }',\n }),\n ],\n fn: async (stepCtx, { inputs }) => {\n const versionCode = inputs.version_code.value as number;\n const versionName = inputs.version_name.value as string;\n if (!semver.valid(versionName)) {\n throw new Error(\n `Version name provided by the \"version_name\" input is not a valid semver version: ${versionName}`\n );\n }\n await injectConfigureVersionGradleConfig(stepCtx.logger, stepCtx.workingDirectory, {\n versionCode,\n versionName,\n });\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureIosCredentials.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/configureIosCredentials.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAGzF,kFAAwE;AACxE,yEAAoF;AACpF,yDAAsE;AACtE,qDAAoE;AAEpE,SAAgB,+BAA+B;IAC7C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,2BAA2B;QAC/B,IAAI,EAAE,2BAA2B;QACjC,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,aAAa;gBACjB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,IAAI;gBACtD,YAAY,EAAE,uCAAuC;aACtD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,qBAAqB;gBACzB,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAChC,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC,KAA4B,CAAC;YAC5E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,uCAAyB,CAAC,QAAQ,CAAC,mBAAmB,EAAE;gBAC/E,YAAY,EAAE,IAAI;gBAClB,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,KAAK;aAClB,CAAC,CAAC;YACH,IAAI,KAAK,EAAE;gBACT,MAAM,KAAK,CAAC;aACb;YAED,MAAM,kBAAkB,GAAG,IAAI,iBAAqB,CAAC,KAAK,CAAC,CAAC;YAC5D,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAErE,IAAA,gBAAM,EAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;YAC/D,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAc,CAAC;YAExD,MAAM,IAAA,qCAAyB,EAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,EAAE;gBACxE,WAAW;gBACX,kBAAkB,EAAE,IAAA,mCAAyB,EAC3C,GAAG,EACH,MAAM,CAAC,mBAAmB,CAAC,KAA2B,CACvD;aACF,CAAC,CAAC;YAEH,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACjE,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA9CD,0EA8CC","sourcesContent":["import assert from 'assert';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport { Ios } from '@expo/eas-build-job';\n\nimport IosCredentialsManager from '../../utils/ios/credentials/manager';\nimport { IosBuildCredentialsSchema } from '../../utils/ios/credentials/credentials';\nimport { configureCredentialsAsync } from '../../utils/ios/configure';\nimport { resolveBuildConfiguration } from '../../utils/ios/resolve';\n\nexport function configureIosCredentialsFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'configure_ios_credentials',\n name: 'Configure iOS credentials',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'credentials',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n defaultValue: '${ eas.job.secrets.buildCredentials }',\n }),\n BuildStepInput.createProvider({\n id: 'build_configuration',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepCtx, { inputs }) => {\n const rawCredentialsInput = inputs.credentials.value as Record<string, any>;\n const { value, error } = IosBuildCredentialsSchema.validate(rawCredentialsInput, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n\n const credentialsManager = new IosCredentialsManager(value);\n const credentials = await credentialsManager.prepare(stepCtx.logger);\n\n assert(stepCtx.global.staticContext.job, 'Job is not defined');\n const job = stepCtx.global.staticContext.job as Ios.Job;\n\n await configureCredentialsAsync(stepCtx.logger, stepCtx.workingDirectory, {\n credentials,\n buildConfiguration: resolveBuildConfiguration(\n job,\n inputs.build_configuration.value as string | undefined\n ),\n });\n\n stepCtx.logger.info('Successfully configured iOS credentials');\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureIosVersion.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/configureIosVersion.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAEzF,oDAA4B;AAE5B,yEAAoF;AACpF,kFAAwE;AACxE,yDAAgE;AAChE,qDAAoE;AAEpE,SAAgB,2BAA2B;IACzC,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,uBAAuB;QAC3B,IAAI,EAAE,uBAAuB;QAC7B,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,aAAa;gBACjB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,IAAI;gBACtD,YAAY,EAAE,uCAAuC;aACtD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,qBAAqB;gBACzB,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,cAAc;gBAClB,QAAQ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IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC9C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;YACpD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,UAAU,EAAE,CAAC,CAAC;YAElD,MAAM,IAAA,+BAAmB,EACvB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,gBAAgB,EACxB;gBACE,WAAW;gBACX,UAAU;aACX,EACD;gBACE,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,0BAA0B,CAAC;gBAChE,kBAAkB,EAAE,IAAA,mCAAyB,EAC3C,GAAG,EACH,MAAM,CAAC,mBAAmB,CAAC,KAA2B,CACvD;aACF,CACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA5ED,kEA4EC","sourcesContent":["import assert from 'assert';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport { Ios } from '@expo/eas-build-job';\nimport semver from 'semver';\n\nimport { IosBuildCredentialsSchema } from '../../utils/ios/credentials/credentials';\nimport IosCredentialsManager from '../../utils/ios/credentials/manager';\nimport { updateVersionsAsync } from '../../utils/ios/configure';\nimport { resolveBuildConfiguration } from '../../utils/ios/resolve';\n\nexport function configureIosVersionFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'configure_ios_version',\n name: 'Configure iOS version',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'credentials',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n defaultValue: '${ eas.job.secrets.buildCredentials }',\n }),\n BuildStepInput.createProvider({\n id: 'build_configuration',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'build_number',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n defaultValue: '${ eas.job.version.buildNumber }',\n }),\n BuildStepInput.createProvider({\n id: 'app_version',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n defaultValue: '${ eas.job.version.appVersion }',\n }),\n ],\n fn: async (stepCtx, { inputs }) => {\n const rawCredentialsInput = inputs.credentials.value as Record<string, any>;\n const { value, error } = IosBuildCredentialsSchema.validate(rawCredentialsInput, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n\n const credentialsManager = new IosCredentialsManager(value);\n const credentials = await credentialsManager.prepare(stepCtx.logger);\n\n assert(stepCtx.global.staticContext.job, 'Job is not defined');\n const job = stepCtx.global.staticContext.job as Ios.Job;\n\n const buildNumber = inputs.build_number.value as string;\n const appVersion = inputs.app_version.value as string;\n if (!semver.valid(appVersion)) {\n throw new Error(\n `App verrsion provided by the \"app_version\" input is not a valid semver version: ${appVersion}`\n );\n }\n\n stepCtx.logger.info('Setting iOS version...');\n stepCtx.logger.info(`Build number: ${buildNumber}`);\n stepCtx.logger.info(`App version: ${appVersion}`);\n\n await updateVersionsAsync(\n stepCtx.logger,\n stepCtx.workingDirectory,\n {\n buildNumber,\n appVersion,\n },\n {\n targetNames: Object.keys(credentials.targetProvisioningProfiles),\n buildConfiguration: resolveBuildConfiguration(\n job,\n inputs.build_configuration.value as string | undefined\n ),\n }\n );\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateGymfileFromTemplate.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/generateGymfileFromTemplate.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,gDAAwB;AACxB,4CAAoB;AAEpB,wDAA0B;AAC1B,uCAAyF;AAEzF,yDAAiD;AACjD,wDAAgC;AAEhC,wEAA+C;AAC/C,+BAAkC;AAElC,yEAAoF;AACpF,kFAAyF;AACzF,qDAAmF;AACnF,+CAA8C;AAE9C,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBpC,CAAC;AAEF,MAAM,0BAA0B,GAAG;;;;;;;;;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Aa,CAAC,EAC3B,QAAQ,EACR,UAAU,EACV,IAAI,GAKL;IACC,MAAM,IAAA,uBAAY,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,KAAK,UAAU,gCAAgC,CAAC,QAAgB;IAC9D,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,oBAAoB,IAAA,SAAI,GAAE,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAC9D,MAAM,kBAAE,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["import assert from 'assert';\nimport path from 'path';\nimport os from 'os';\n\nimport fs from 'fs-extra';\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport { Ios } from '@expo/eas-build-job';\nimport { IOSConfig } from '@expo/config-plugins';\nimport plist from '@expo/plist';\nimport { bunyan } from '@expo/logger';\nimport templateFile from '@expo/template-file';\nimport { v4 as uuid } from 'uuid';\n\nimport { IosBuildCredentialsSchema } from '../../utils/ios/credentials/credentials';\nimport IosCredentialsManager, { Credentials } from '../../utils/ios/credentials/manager';\nimport { resolveBuildConfiguration, resolveScheme } from '../../utils/ios/resolve';\nimport { isTVOS } from '../../utils/ios/tvos';\n\nconst DEFAULT_CREDENTIALS_TEMPLATE = `\n suppress_xcode_output(true)\n clean(<%- CLEAN %>)\n\n scheme(\"<%- SCHEME %>\")\n <% if (BUILD_CONFIGURATION) { %>\n configuration(\"<%- BUILD_CONFIGURATION %>\")\n <% } %>\n\n export_options({\n method: \"<%- EXPORT_METHOD %>\",\n provisioningProfiles: {<% _.forEach(PROFILES, function(profile) { %>\n \"<%- profile.BUNDLE_ID %>\" => \"<%- profile.UUID %>\",<% }); %>\n }<% if (ICLOUD_CONTAINER_ENVIRONMENT) { %>,\n iCloudContainerEnvironment: \"<%- ICLOUD_CONTAINER_ENVIRONMENT %>\"\n <% } %>\n })\n\n export_xcargs \"OTHER_CODE_SIGN_FLAGS=\\\\\"--keychain <%- KEYCHAIN_PATH %>\\\\\"\"\n\n disable_xcpretty(true)\n buildlog_path(\"<%- LOGS_DIRECTORY %>\")\n\n output_directory(\"<%- OUTPUT_DIRECTORY %>\")\n`;\n\nconst DEFAULT_SIMULATOR_TEMPLATE = `\n suppress_xcode_output(true)\n clean(<%- CLEAN %>)\n\n scheme(\"<%- SCHEME %>\")\n <% if (BUILD_CONFIGURATION) { %>\n configuration(\"<%- BUILD_CONFIGURATION %>\")\n <% } %>\n\n derived_data_path(\"<%- DERIVED_DATA_PATH %>\")\n skip_package_ipa(true)\n skip_archive(true)\n destination(\"<%- SCHEME_SIMULATOR_DESTINATION %>\")\n\n disable_xcpretty(true)\n buildlog_path(\"<%- LOGS_DIRECTORY %>\")\n`;\n\nexport function generateGymfileFromTemplateFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'generate_gymfile_from_template',\n name: 'Generate Gymfile from template',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'template',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'credentials',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n }),\n BuildStepInput.createProvider({\n id: 'build_configuration',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'scheme',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'clean',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.BOOLEAN,\n defaultValue: false,\n }),\n BuildStepInput.createProvider({\n id: 'extra',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n }),\n ],\n fn: async (stepCtx, { inputs }) => {\n let credentials: Credentials | undefined = undefined;\n const rawCredentialsInput = inputs.credentials.value as Record<string, any> | undefined;\n if (rawCredentialsInput) {\n const { value, error } = IosBuildCredentialsSchema.validate(rawCredentialsInput, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n\n const credentialsManager = new IosCredentialsManager(value);\n credentials = await credentialsManager.prepare(stepCtx.logger);\n }\n\n const extra: Record<string, any> =\n (inputs.extra.value as Record<string, any> | undefined) ?? {};\n\n const templateInput = inputs.template.value as string | undefined;\n\n let template: string;\n if (templateInput) {\n template = templateInput;\n } else if (credentials) {\n template = DEFAULT_CREDENTIALS_TEMPLATE;\n } else {\n template = DEFAULT_SIMULATOR_TEMPLATE;\n }\n\n assert(stepCtx.global.staticContext.job, 'Job is not defined');\n const job = stepCtx.global.staticContext.job as Ios.Job;\n const buildConfiguration = resolveBuildConfiguration(\n job,\n inputs.build_configuration.value as string | undefined\n );\n const scheme = resolveScheme(\n stepCtx.workingDirectory,\n job,\n inputs.scheme.value as string | undefined\n );\n const entitlements = await maybeReadEntitlementsAsync(\n stepCtx.logger,\n stepCtx.workingDirectory,\n scheme,\n buildConfiguration\n );\n\n const templatePath = await saveTemplateToTemporaryFileAsync(template);\n\n const gymfilePath = path.join(stepCtx.workingDirectory, 'ios/Gymfile');\n\n const PROFILES: { BUNDLE_ID: string; UUID: string }[] = [];\n if (credentials) {\n const targets = Object.keys(credentials.targetProvisioningProfiles);\n for (const target of targets) {\n const profile = credentials.targetProvisioningProfiles[target];\n PROFILES.push({\n BUNDLE_ID: profile.bundleIdentifier,\n UUID: profile.uuid,\n });\n }\n }\n\n const ICLOUD_CONTAINER_ENVIRONMENT = (\n entitlements as Record<string, string | Record<string, string>>\n )?.['com.apple.developer.icloud-container-environment'] as string | undefined;\n\n const isTV = await isTVOS({\n scheme,\n buildConfiguration,\n workingDir: stepCtx.workingDirectory,\n });\n const simulatorDestination = `generic/platform=${isTV ? 'tvOS' : 'iOS'} Simulator`;\n\n await createGymfile({\n template: templatePath,\n outputFile: gymfilePath,\n vars: {\n SCHEME: scheme,\n BUILD_CONFIGURATION: buildConfiguration,\n OUTPUT_DIRECTORY: './build',\n CLEAN: String(inputs.clean.value),\n LOGS_DIRECTORY: stepCtx.global.buildLogsDirectory,\n ICLOUD_CONTAINER_ENVIRONMENT,\n SCHEME_SIMULATOR_DESTINATION: simulatorDestination,\n DERIVED_DATA_PATH: './build',\n ...(PROFILES ? { PROFILES } : {}),\n ...(credentials\n ? {\n KEYCHAIN_PATH: credentials.keychainPath,\n EXPORT_METHOD: credentials.distributionType,\n }\n : {}),\n ...extra,\n },\n });\n\n const gymfileContents = await fs.readFile(gymfilePath, 'utf8');\n stepCtx.logger.info(`Successfully generated Gymfile: ${gymfileContents}`);\n },\n });\n}\n\nasync function maybeReadEntitlementsAsync(\n logger: bunyan,\n workingDir: string,\n scheme: string,\n buildConfiguration: string\n): Promise<object | null> {\n try {\n const applicationTargetName =\n await IOSConfig.BuildScheme.getApplicationTargetNameForSchemeAsync(workingDir, scheme);\n const entitlementsPath = IOSConfig.Entitlements.getEntitlementsPath(workingDir, {\n buildConfiguration,\n targetName: applicationTargetName,\n });\n if (!entitlementsPath) {\n return null;\n }\n const entitlementsRaw = await fs.readFile(entitlementsPath, 'utf8');\n return plist.parse(entitlementsRaw);\n } catch (err) {\n logger.warn({ err }, 'Failed to read entitlements');\n return null;\n }\n}\n\nasync function createGymfile({\n template,\n outputFile,\n vars,\n}: {\n template: string;\n outputFile: string;\n vars: Record<string, string | number | any>;\n}): Promise<void> {\n await templateFile(template, vars, outputFile, { mustache: false });\n}\n\nasync function saveTemplateToTemporaryFileAsync(template: string): Promise<string> {\n const directory = path.join(os.tmpdir(), `gymfile-template-${uuid()}`);\n await fs.mkdir(directory, { recursive: true });\n const templatePath = path.join(directory, 'Gymfile.template');\n await fs.writeFile(templatePath, template);\n return templatePath;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"injectAndroidCredentials.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/injectAndroidCredentials.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,+BAAoC;AACpC,uCAKqB;AACrB,wDAA0B;AAC1B,8CAAsB;AAGtB,mEAAiF;AAEjF,MAAM,cAAc,GAAG,aAAG,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,gBAAgB,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,aAAG,CAAC,MAAM,CAAiC;IAC/E,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEd,SAAgB,gCAAgC;IAC9C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,aAAa;gBACjB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,IAAI;gBACtD,YAAY,EAAE,uCAAuC;aACtD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAChC,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC,KAA4B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BAAkB,CAAC,EACrE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAChC,CAAC;AACJ,CAAC","sourcesContent":["import path from 'path';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n BuildFunction,\n BuildStepContext,\n BuildStepInput,\n BuildStepInputValueTypeName,\n} from '@expo/steps';\nimport fs from 'fs-extra';\nimport Joi from 'joi';\nimport { Android } from '@expo/eas-build-job';\n\nimport { injectCredentialsGradleConfig } from '../../utils/android/gradleConfig';\n\nconst KeystoreSchema = Joi.object({\n dataBase64: Joi.string().required(),\n keystorePassword: Joi.string().allow('').required(),\n keyAlias: Joi.string().required(),\n keyPassword: Joi.string().allow(''),\n});\n\nconst AndroidBuildCredentialsSchema = Joi.object<{ keystore: Android.Keystore }>({\n keystore: KeystoreSchema.required(),\n}).required();\n\nexport function injectAndroidCredentialsFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'inject_android_credentials',\n name: 'Inject Android credentials',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'credentials',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n defaultValue: '${ eas.job.secrets.buildCredentials }',\n }),\n ],\n fn: async (stepCtx, { inputs }) => {\n const rawCredentialsInput = inputs.credentials.value as Record<string, any>;\n const { value, error } = AndroidBuildCredentialsSchema.validate(rawCredentialsInput, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n const credentials = value;\n\n await restoreCredentials(stepCtx, credentials);\n await injectCredentialsGradleConfig(stepCtx.logger, stepCtx.workingDirectory);\n },\n });\n}\n\nasync function restoreCredentials(\n stepsCtx: BuildStepContext,\n buildCredentials: {\n keystore: Android.Keystore;\n }\n): Promise<void> {\n stepsCtx.logger.info(\"Writing secrets to the project's directory\");\n const keystorePath = path.join(stepsCtx.global.projectTargetDirectory, `keystore-${uuidv4()}`);\n await fs.writeFile(keystorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));\n const credentialsJson = {\n android: {\n keystore: {\n keystorePath,\n keystorePassword: buildCredentials.keystore.keystorePassword,\n keyAlias: buildCredentials.keystore.keyAlias,\n keyPassword: buildCredentials.keystore.keyPassword,\n },\n },\n };\n await fs.writeFile(\n path.join(stepsCtx.global.projectTargetDirectory, 'credentials.json'),\n JSON.stringify(credentialsJson)\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveAppleTeamIdFromCredentials.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/resolveAppleTeamIdFromCredentials.ts"],"names":[],"mappings":";;;;;;AAAA,uCAKqB;AAErB,kFAAwE;AACxE,yEAAoF;AAEpF,SAAgB,yCAAyC;IACvD,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,wCAAwC;QAC5C,IAAI,EAAE,wCAAwC;QAC9C,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,aAAa;gBACjB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,IAAI;gBACtD,YAAY,EAAE,uCAAuC;aACtD,CAAC;SACH;QACD,eAAe,EAAE;YACf,uBAAe,CAAC,cAAc,CAAC;gBAC7B,EAAE,EAAE,eAAe;gBACnB,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;YACzC,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC,KAA4B,CAAC;YAC5E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,uCAAyB,CAAC,QAAQ,CAAC,mBAAmB,EAAE;gBAC/E,YAAY,EAAE,IAAI;gBAClB,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,KAAK;aAClB,CAAC,CAAC;YACH,IAAI,KAAK,EAAE;gBACT,MAAM,KAAK,CAAC;aACb;YAED,MAAM,kBAAkB,GAAG,IAAI,iBAAqB,CAAC,KAAK,CAAC,CAAC;YAC5D,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAErE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;YAClE,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AArCD,8FAqCC","sourcesContent":["import {\n BuildFunction,\n BuildStepInput,\n BuildStepInputValueTypeName,\n BuildStepOutput,\n} from '@expo/steps';\n\nimport IosCredentialsManager from '../../utils/ios/credentials/manager';\nimport { IosBuildCredentialsSchema } from '../../utils/ios/credentials/credentials';\n\nexport function resolveAppleTeamIdFromCredentialsFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'resolve_apple_team_id_from_credentials',\n name: 'Resolve Apple team ID from credentials',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'credentials',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.JSON,\n defaultValue: '${ eas.job.secrets.buildCredentials }',\n }),\n ],\n outputProviders: [\n BuildStepOutput.createProvider({\n id: 'apple_team_id',\n required: true,\n }),\n ],\n fn: async (stepCtx, { inputs, outputs }) => {\n const rawCredentialsInput = inputs.credentials.value as Record<string, any>;\n const { value, error } = IosBuildCredentialsSchema.validate(rawCredentialsInput, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n\n const credentialsManager = new IosCredentialsManager(value);\n const credentials = await credentialsManager.prepare(stepCtx.logger);\n\n stepCtx.logger.info(`Using Apple Team ID: ${credentials.teamId}`);\n outputs.apple_team_id.set(credentials.teamId);\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runFastlane.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/runFastlane.ts"],"names":[],"mappings":";;;AAAA,uCAA4C;AAE5C,uDAA0D;AAE1D,SAAgB,mBAAmB;IACjC,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YAC7B,MAAM,IAAA,yBAAc,EAAC;gBACnB,UAAU,EAAE,OAAO,CAAC,gBAAgB;gBACpC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;;oBACxC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAA,GAAG,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;oBAC1B,OAAO,GAAG,CAAC;gBACb,CAAC,EAAE,EAA4B,CAAC;gBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB;aACtD,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAjBD,kDAiBC","sourcesContent":["import { BuildFunction } from '@expo/steps';\n\nimport { runFastlaneGym } from '../../utils/ios/fastlane';\n\nexport function runFastlaneFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'run_fastlane',\n name: 'Run fastlane',\n fn: async (stepCtx, { env }) => {\n await runFastlaneGym({\n workingDir: stepCtx.workingDirectory,\n env: Object.keys(env).reduce((acc, key) => {\n acc[key] = env[key] ?? '';\n return acc;\n }, {} as Record<string, string>),\n logger: stepCtx.logger,\n buildLogsDirectory: stepCtx.global.buildLogsDirectory,\n });\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runGradle.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/runGradle.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,oDAA4B;AAE5B,uCAAyF;AAEzF,uDAAoF;AAEpF,SAAgB,iBAAiB;IAC/B,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,SAAS;gBACb,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;YACrC,IAAA,gBAAM,EAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;YAC5D,MAAM,OAAO,GAAG,IAAA,6BAAoB,EAClC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,EAChC,MAAM,CAAC,OAAO,CAAC,KAA2B,CAC3C,CAAC;YACF,MAAM,IAAA,yBAAgB,EAAC;gBACrB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,aAAa,EAAE,OAAO;gBACtB,UAAU,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;gBAC1D,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA1BD,8CA0BC","sourcesContent":["import path from 'path';\nimport assert from 'assert';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\n\nimport { resolveGradleCommand, runGradleCommand } from '../../utils/android/gradle';\n\nexport function runGradleFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'run_gradle',\n name: 'Run gradle',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'command',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepCtx, { env, inputs }) => {\n assert(stepCtx.global.staticContext.job, 'Job is required');\n const command = resolveGradleCommand(\n stepCtx.global.staticContext.job,\n inputs.command.value as string | undefined\n );\n await runGradleCommand({\n logger: stepCtx.logger,\n gradleCommand: command,\n androidDir: path.join(stepCtx.workingDirectory, 'android'),\n env,\n });\n },\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploadArtifact.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/uploadArtifact.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uCAAyF;AACzF,4DAAoC;AAEpC,8CAAgD;AAGhD,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IACpB,gEAA2C,CAAA;IAC3C,sDAAiC,CAAA;AACnC,CAAC,EAHI,iBAAiB,KAAjB,iBAAiB,QAGrB;AAED,SAAgB,iCAAiC,CAAC,GAAuB;IACvE,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,iBAAiB;QACvB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,MAAM;gBACV,YAAY,EAAE,iBAAiB,CAAC,mBAAmB;gBACnD,aAAa,EAAE,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,cAAc,CAAC;gBACxF,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,MAAM;gBACV,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACjC,MAAM,YAAY,GAAG,mCAAmC,CACtD,IAAA,oBAAU,EAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CACzC,CAAC;YACF,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAC3B,QAAQ,CAAC,gBAAgB,EACzB,IAAA,oBAAU,EAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CACzC,CAAC;YACF,MAAM,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA9BD,8EA8BC;AAED,SAAS,mCAAmC,CAAC,KAAa;IACxD,MAAM,aAAa,GAAa,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACjE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,IAAI,KAAK,mDAAmD,aAAa;aACtE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;KACH;IACD,OAAO,KAAK,KAAK,iBAAiB,CAAC,mBAAmB;QACpD,CAAC,CAAC,sBAAY,CAAC,mBAAmB;QAClC,CAAC,CAAC,sBAAY,CAAC,eAAe,CAAC;AACnC,CAAC","sourcesContent":["import path from 'path';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { ArtifactType } from '../../../context';\nimport { CustomBuildContext } from '../../../customBuildContext';\n\nenum BuildArtifactType {\n APPLICATION_ARCHIVE = 'application-archive',\n BUILD_ARTIFACT = 'build-artifact',\n}\n\nexport function createUploadArtifactBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'upload_artifact',\n name: 'Upload artifact',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'type',\n defaultValue: BuildArtifactType.APPLICATION_ARCHIVE,\n allowedValues: [BuildArtifactType.APPLICATION_ARCHIVE, BuildArtifactType.BUILD_ARTIFACT],\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'path',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepsCtx, { inputs }) => {\n const artifactType = validateAndConvertBuildArtifactType(\n nullthrows(inputs.type.value).toString()\n );\n const filePath = path.resolve(\n stepsCtx.workingDirectory,\n nullthrows(inputs.path.value).toString()\n );\n await ctx.runtimeApi.uploadArtifacts(artifactType, [filePath], stepsCtx.logger);\n },\n });\n}\n\nfunction validateAndConvertBuildArtifactType(input: string): ArtifactType {\n const allowedValues: string[] = Object.values(BuildArtifactType);\n if (!allowedValues.includes(input)) {\n throw new Error(\n `\"${input}\" is not allowed artifact type, allowed values: ${allowedValues\n .map((i) => `\"${i}\"`)\n .join(', ')}`\n );\n }\n return input === BuildArtifactType.APPLICATION_ARCHIVE\n ? ArtifactType.APPLICATION_ARCHIVE\n : ArtifactType.BUILD_ARTIFACTS;\n}\n"]}