@expo/build-tools 1.0.32 → 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 (101) hide show
  1. package/dist/builders/custom.js +1 -1
  2. package/dist/builders/custom.js.map +1 -1
  3. package/dist/customBuildContext.d.ts +1 -0
  4. package/dist/customBuildContext.js +1 -0
  5. package/dist/customBuildContext.js.map +1 -1
  6. package/dist/steps/easFunctions.d.ts +1 -3
  7. package/dist/steps/easFunctions.js +26 -17
  8. package/dist/steps/easFunctions.js.map +1 -1
  9. package/dist/steps/functions/checkout.js.map +1 -0
  10. package/dist/steps/functions/{utils/configureAndroidVersion.js → configureAndroidVersion.js} +2 -2
  11. package/dist/steps/functions/configureAndroidVersion.js.map +1 -0
  12. package/dist/steps/functions/{eas/configureExpoUpdatesIfInstalled.js → configureEASUpdateIfInstalled.js} +5 -5
  13. package/dist/steps/functions/configureEASUpdateIfInstalled.js.map +1 -0
  14. package/dist/steps/functions/configureIosCredentials.d.ts +2 -0
  15. package/dist/steps/functions/configureIosCredentials.js +54 -0
  16. package/dist/steps/functions/configureIosCredentials.js.map +1 -0
  17. package/dist/steps/functions/configureIosVersion.d.ts +2 -0
  18. package/dist/steps/functions/configureIosVersion.js +77 -0
  19. package/dist/steps/functions/configureIosVersion.js.map +1 -0
  20. package/dist/steps/functions/{eas/findAndUploadBuildArtifacts.d.ts → findAndUploadBuildArtifacts.d.ts} +1 -1
  21. package/dist/steps/functions/{eas/findAndUploadBuildArtifacts.js → findAndUploadBuildArtifacts.js} +4 -8
  22. package/dist/steps/functions/findAndUploadBuildArtifacts.js.map +1 -0
  23. package/dist/steps/functions/generateGymfileFromTemplate.d.ts +2 -0
  24. package/dist/steps/functions/generateGymfileFromTemplate.js +209 -0
  25. package/dist/steps/functions/generateGymfileFromTemplate.js.map +1 -0
  26. package/dist/steps/functions/{utils/injectAndroidCredentials.js → injectAndroidCredentials.js} +2 -2
  27. package/dist/steps/functions/injectAndroidCredentials.js.map +1 -0
  28. package/dist/steps/functions/installNodeModules.d.ts +4 -0
  29. package/dist/steps/functions/{eas/installNodeModules.js → installNodeModules.js} +6 -6
  30. package/dist/steps/functions/installNodeModules.js.map +1 -0
  31. package/dist/steps/functions/prebuild.d.ts +2 -0
  32. package/dist/steps/functions/{eas/prebuild.js → prebuild.js} +18 -26
  33. package/dist/steps/functions/prebuild.js.map +1 -0
  34. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.d.ts +2 -0
  35. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js +47 -0
  36. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js.map +1 -0
  37. package/dist/steps/functions/runFastlane.d.ts +2 -0
  38. package/dist/steps/functions/runFastlane.js +26 -0
  39. package/dist/steps/functions/runFastlane.js.map +1 -0
  40. package/dist/steps/functions/runGradle.d.ts +2 -0
  41. package/dist/steps/functions/runGradle.js +36 -0
  42. package/dist/steps/functions/runGradle.js.map +1 -0
  43. package/dist/steps/functions/{utils/uploadArtifact.d.ts → uploadArtifact.d.ts} +1 -1
  44. package/dist/steps/functions/{utils/uploadArtifact.js → uploadArtifact.js} +2 -2
  45. package/dist/steps/functions/uploadArtifact.js.map +1 -0
  46. package/dist/steps/functions/useNpmToken.d.ts +2 -0
  47. package/dist/steps/functions/{eas/setUpNpmrc.js → useNpmToken.js} +5 -5
  48. package/dist/steps/functions/useNpmToken.js.map +1 -0
  49. package/dist/steps/utils/android/gradle.d.ts +11 -0
  50. package/dist/steps/utils/android/gradle.js +110 -0
  51. package/dist/steps/utils/android/gradle.js.map +1 -0
  52. package/dist/steps/utils/expoUpdates.js +2 -2
  53. package/dist/steps/utils/expoUpdates.js.map +1 -1
  54. package/dist/steps/utils/ios/configure.d.ts +15 -0
  55. package/dist/steps/utils/ios/configure.js +78 -0
  56. package/dist/steps/utils/ios/configure.js.map +1 -0
  57. package/dist/steps/utils/ios/credentials/credentials.d.ts +4 -0
  58. package/dist/steps/utils/ios/credentials/credentials.js +16 -0
  59. package/dist/steps/utils/ios/credentials/credentials.js.map +1 -0
  60. package/dist/steps/utils/ios/credentials/distributionCertificate.d.ts +3 -0
  61. package/dist/steps/utils/ios/credentials/distributionCertificate.js +52 -0
  62. package/dist/steps/utils/ios/credentials/distributionCertificate.js.map +1 -0
  63. package/dist/steps/utils/ios/credentials/keychain.d.ts +19 -0
  64. package/dist/steps/utils/ios/credentials/keychain.js +93 -0
  65. package/dist/steps/utils/ios/credentials/keychain.js.map +1 -0
  66. package/dist/steps/utils/ios/credentials/manager.d.ts +23 -0
  67. package/dist/steps/utils/ios/credentials/manager.js +115 -0
  68. package/dist/steps/utils/ios/credentials/manager.js.map +1 -0
  69. package/dist/steps/utils/ios/credentials/provisioningProfile.d.ts +35 -0
  70. package/dist/steps/utils/ios/credentials/provisioningProfile.js +114 -0
  71. package/dist/steps/utils/ios/credentials/provisioningProfile.js.map +1 -0
  72. package/dist/steps/utils/ios/fastlane.d.ts +7 -3
  73. package/dist/steps/utils/ios/fastlane.js +21 -34
  74. package/dist/steps/utils/ios/fastlane.js.map +1 -1
  75. package/dist/steps/utils/ios/resolve.d.ts +2 -4
  76. package/dist/steps/utils/ios/resolve.js +9 -3
  77. package/dist/steps/utils/ios/resolve.js.map +1 -1
  78. package/dist/steps/utils/ios/xcpretty.d.ts +16 -0
  79. package/dist/steps/utils/ios/xcpretty.js +88 -0
  80. package/dist/steps/utils/ios/xcpretty.js.map +1 -0
  81. package/package.json +3 -3
  82. package/dist/steps/functions/eas/buildReactNativeApp.d.ts +0 -4
  83. package/dist/steps/functions/eas/buildReactNativeApp.js +0 -53
  84. package/dist/steps/functions/eas/buildReactNativeApp.js.map +0 -1
  85. package/dist/steps/functions/eas/checkout.js.map +0 -1
  86. package/dist/steps/functions/eas/configureExpoUpdatesIfInstalled.js.map +0 -1
  87. package/dist/steps/functions/eas/findAndUploadBuildArtifacts.js.map +0 -1
  88. package/dist/steps/functions/eas/installNodeModules.d.ts +0 -5
  89. package/dist/steps/functions/eas/installNodeModules.js.map +0 -1
  90. package/dist/steps/functions/eas/prebuild.d.ts +0 -3
  91. package/dist/steps/functions/eas/prebuild.js.map +0 -1
  92. package/dist/steps/functions/eas/setUpNpmrc.d.ts +0 -3
  93. package/dist/steps/functions/eas/setUpNpmrc.js.map +0 -1
  94. package/dist/steps/functions/utils/configureAndroidVersion.js.map +0 -1
  95. package/dist/steps/functions/utils/injectAndroidCredentials.js.map +0 -1
  96. package/dist/steps/functions/utils/uploadArtifact.js.map +0 -1
  97. /package/dist/steps/functions/{eas/checkout.d.ts → checkout.d.ts} +0 -0
  98. /package/dist/steps/functions/{eas/checkout.js → checkout.js} +0 -0
  99. /package/dist/steps/functions/{utils/configureAndroidVersion.d.ts → configureAndroidVersion.d.ts} +0 -0
  100. /package/dist/steps/functions/{eas/configureExpoUpdatesIfInstalled.d.ts → configureEASUpdateIfInstalled.d.ts} +0 -0
  101. /package/dist/steps/functions/{utils/injectAndroidCredentials.d.ts → injectAndroidCredentials.d.ts} +0 -0
@@ -18,7 +18,7 @@ async function runCustomBuildAsync(ctx) {
18
18
  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');
19
19
  const configPath = path_1.default.join(ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory), relativeConfigPath);
20
20
  const globalContext = new steps_1.BuildStepGlobalContext(customBuildCtx, false);
21
- const easFunctions = (0, easFunctions_1.getEasFunctions)(customBuildCtx, ctx);
21
+ const easFunctions = (0, easFunctions_1.getEasFunctions)(customBuildCtx);
22
22
  const parser = new steps_1.BuildConfigParser(globalContext, {
23
23
  externalFunctions: easFunctions,
24
24
  configPath,
@@ -1 +1 @@
1
- {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAsD;AACtD,uCAAgF;AAChF,4DAAoC;AAGpC,6DAAsE;AAC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I;QACF,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;KAC/B;IAAC,OAAO,GAAQ,EAAE;QACjB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;KACX;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAvCD,kDAuCC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Job } 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';\n\nexport async function runCustomBuildAsync<T extends Job>(ctx: BuildContext<T>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\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, ctx);\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\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 await workflow.executeAsync();\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":"","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EAAE,GAAG,EAAE,CAAC,CAAC;iBAC3B;aACF;YACD,MAAM,UAAU,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;IACH,IAAI;QACF,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;KAC/B;IAAC,OAAO,GAAQ,EAAE;QACjB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;KACX;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAvCD,kDAuCC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Job } 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';\n\nexport async function runCustomBuildAsync<T extends Job>(ctx: BuildContext<T>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\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 parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\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 await workflow.executeAsync();\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n return ctx.artifacts;\n}\n"]}
@@ -10,6 +10,7 @@ export declare class CustomBuildContext implements ExternalBuildContextProvider
10
10
  readonly projectSourceDirectory: string;
11
11
  readonly projectTargetDirectory: string;
12
12
  readonly defaultWorkingDirectory: string;
13
+ readonly buildLogsDirectory: string;
13
14
  readonly logger: bunyan;
14
15
  readonly runtimeApi: BuilderRuntimeApi;
15
16
  readonly job: Job;
@@ -19,6 +19,7 @@ class CustomBuildContext {
19
19
  this.projectSourceDirectory = path_1.default.join(buildCtx.workingdir, 'temporary-custom-build');
20
20
  this.projectTargetDirectory = path_1.default.join(buildCtx.workingdir, 'build');
21
21
  this.defaultWorkingDirectory = buildCtx.getReactNativeProjectDirectory();
22
+ this.buildLogsDirectory = path_1.default.join(buildCtx.workingdir, 'logs');
22
23
  this.runtimeApi = {
23
24
  uploadArtifacts: (...args) => buildCtx['uploadArtifacts'](...args),
24
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"customBuildContext.js","sourceRoot":"","sources":["../src/customBuildContext.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAqE;AAErE,uCAAiF;AAIjF,MAAM,8BAA8B,GAA2C;IAC7E,CAAC,wBAAQ,CAAC,OAAO,CAAC,EAAE,4BAAoB,CAAC,KAAK;IAC9C,CAAC,wBAAQ,CAAC,GAAG,CAAC,EAAE,4BAAoB,CAAC,MAAM;CAC5C,CAAC;AAMF,MAAa,kBAAkB;IAsB7B,YAAY,QAA2B;QACrC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QAExB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,0BAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,sBAAsB,GAAG,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;QACvF,IAAI,CAAC,sBAAsB,GAAG,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC,uBAAuB,GAAG,QAAQ,CAAC,8BAA8B,EAAE,CAAC;QACzE,IAAI,CAAC,UAAU,GAAG;YAChB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC;SACnE,CAAC;IACJ,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,8BAA8B,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEM,aAAa;QAClB,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;IAEM,SAAS,CAAC,GAAQ;QACvB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;CACF;AApDD,gDAoDC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';\nimport { bunyan } from '@expo/logger';\nimport { ExternalBuildContextProvider, BuildRuntimePlatform } from '@expo/steps';\n\nimport { ArtifactType, BuildContext } from './context';\n\nconst platformToBuildRuntimePlatform: Record<Platform, BuildRuntimePlatform> = {\n [Platform.ANDROID]: BuildRuntimePlatform.LINUX,\n [Platform.IOS]: BuildRuntimePlatform.DARWIN,\n};\n\nexport interface BuilderRuntimeApi {\n uploadArtifacts: (type: ArtifactType, paths: string[], logger: bunyan) => Promise<void>;\n}\n\nexport class CustomBuildContext implements ExternalBuildContextProvider {\n /*\n * Directory that contains project sources before eas/checkout.\n */\n public readonly projectSourceDirectory: string;\n\n /*\n * Directory where build is executed. eas/checkout will copy sources here.\n */\n public readonly projectTargetDirectory: string;\n\n /*\n * Directory where all build steps will be executed unless configured otherwise.\n */\n public readonly defaultWorkingDirectory: string;\n\n public readonly logger: bunyan;\n public readonly runtimeApi: BuilderRuntimeApi;\n public readonly job: Job;\n\n private _env: Env;\n\n constructor(buildCtx: BuildContext<Job>) {\n this._env = buildCtx.env;\n this.job = buildCtx.job;\n\n this.logger = buildCtx.logger.child({ phase: BuildPhase.CUSTOM });\n this.projectSourceDirectory = path.join(buildCtx.workingdir, 'temporary-custom-build');\n this.projectTargetDirectory = path.join(buildCtx.workingdir, 'build');\n this.defaultWorkingDirectory = buildCtx.getReactNativeProjectDirectory();\n this.runtimeApi = {\n uploadArtifacts: (...args) => buildCtx['uploadArtifacts'](...args),\n };\n }\n\n public get runtimePlatform(): BuildRuntimePlatform {\n return platformToBuildRuntimePlatform[this.job.platform];\n }\n\n public get env(): Env {\n return this._env;\n }\n\n public staticContext(): any {\n return {\n job: this.job,\n };\n }\n\n public updateEnv(env: Env): void {\n this._env = env;\n }\n}\n"]}
1
+ {"version":3,"file":"customBuildContext.js","sourceRoot":"","sources":["../src/customBuildContext.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAqE;AAErE,uCAAiF;AAIjF,MAAM,8BAA8B,GAA2C;IAC7E,CAAC,wBAAQ,CAAC,OAAO,CAAC,EAAE,4BAAoB,CAAC,KAAK;IAC9C,CAAC,wBAAQ,CAAC,GAAG,CAAC,EAAE,4BAAoB,CAAC,MAAM;CAC5C,CAAC;AAMF,MAAa,kBAAkB;IA2B7B,YAAY,QAA2B;QACrC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QAExB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,0BAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,sBAAsB,GAAG,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;QACvF,IAAI,CAAC,sBAAsB,GAAG,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC,uBAAuB,GAAG,QAAQ,CAAC,8BAA8B,EAAE,CAAC;QACzE,IAAI,CAAC,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,UAAU,GAAG;YAChB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,IAAI,CAAC;SACnE,CAAC;IACJ,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,8BAA8B,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEM,aAAa;QAClB,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC;IACJ,CAAC;IAEM,SAAS,CAAC,GAAQ;QACvB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;CACF;AA1DD,gDA0DC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';\nimport { bunyan } from '@expo/logger';\nimport { ExternalBuildContextProvider, BuildRuntimePlatform } from '@expo/steps';\n\nimport { ArtifactType, BuildContext } from './context';\n\nconst platformToBuildRuntimePlatform: Record<Platform, BuildRuntimePlatform> = {\n [Platform.ANDROID]: BuildRuntimePlatform.LINUX,\n [Platform.IOS]: BuildRuntimePlatform.DARWIN,\n};\n\nexport interface BuilderRuntimeApi {\n uploadArtifacts: (type: ArtifactType, paths: string[], logger: bunyan) => Promise<void>;\n}\n\nexport class CustomBuildContext implements ExternalBuildContextProvider {\n /*\n * Directory that contains project sources before eas/checkout.\n */\n public readonly projectSourceDirectory: string;\n\n /*\n * Directory where build is executed. eas/checkout will copy sources here.\n */\n public readonly projectTargetDirectory: string;\n\n /*\n * Directory where all build steps will be executed unless configured otherwise.\n */\n public readonly defaultWorkingDirectory: string;\n\n /*\n * Directory where build logs will be stored unless configure otherwise.\n */\n public readonly buildLogsDirectory: string;\n\n public readonly logger: bunyan;\n public readonly runtimeApi: BuilderRuntimeApi;\n public readonly job: Job;\n\n private _env: Env;\n\n constructor(buildCtx: BuildContext<Job>) {\n this._env = buildCtx.env;\n this.job = buildCtx.job;\n\n this.logger = buildCtx.logger.child({ phase: BuildPhase.CUSTOM });\n this.projectSourceDirectory = path.join(buildCtx.workingdir, 'temporary-custom-build');\n this.projectTargetDirectory = path.join(buildCtx.workingdir, 'build');\n this.defaultWorkingDirectory = buildCtx.getReactNativeProjectDirectory();\n this.buildLogsDirectory = path.join(buildCtx.workingdir, 'logs');\n this.runtimeApi = {\n uploadArtifacts: (...args) => buildCtx['uploadArtifacts'](...args),\n };\n }\n\n public get runtimePlatform(): BuildRuntimePlatform {\n return platformToBuildRuntimePlatform[this.job.platform];\n }\n\n public get env(): Env {\n return this._env;\n }\n\n public staticContext(): any {\n return {\n job: this.job,\n };\n }\n\n public updateEnv(env: Env): void {\n this._env = env;\n }\n}\n"]}
@@ -1,5 +1,3 @@
1
- import { Job } from '@expo/eas-build-job';
2
1
  import { BuildFunction } from '@expo/steps';
3
- import { BuildContext } from '../context';
4
2
  import { CustomBuildContext } from '../customBuildContext';
5
- export declare function getEasFunctions(ctx: CustomBuildContext, oldCtx: BuildContext<Job>): BuildFunction[];
3
+ export declare function getEasFunctions(ctx: CustomBuildContext): BuildFunction[];
@@ -1,29 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEasFunctions = void 0;
4
- const uploadArtifact_1 = require("./functions/utils/uploadArtifact");
5
- const checkout_1 = require("./functions/eas/checkout");
6
- const setUpNpmrc_1 = require("./functions/eas/setUpNpmrc");
7
- const installNodeModules_1 = require("./functions/eas/installNodeModules");
8
- const prebuild_1 = require("./functions/eas/prebuild");
9
- const buildReactNativeApp_1 = require("./functions/eas/buildReactNativeApp");
10
- const findAndUploadBuildArtifacts_1 = require("./functions/eas/findAndUploadBuildArtifacts");
11
- const configureExpoUpdatesIfInstalled_1 = require("./functions/eas/configureExpoUpdatesIfInstalled");
12
- const injectAndroidCredentials_1 = require("./functions/utils/injectAndroidCredentials");
13
- const configureAndroidVersion_1 = require("./functions/utils/configureAndroidVersion");
14
- function getEasFunctions(ctx, oldCtx // TODO: remove
15
- ) {
4
+ const uploadArtifact_1 = require("./functions/uploadArtifact");
5
+ const checkout_1 = require("./functions/checkout");
6
+ const useNpmToken_1 = require("./functions/useNpmToken");
7
+ const installNodeModules_1 = require("./functions/installNodeModules");
8
+ const prebuild_1 = require("./functions/prebuild");
9
+ const findAndUploadBuildArtifacts_1 = require("./functions/findAndUploadBuildArtifacts");
10
+ const configureEASUpdateIfInstalled_1 = require("./functions/configureEASUpdateIfInstalled");
11
+ const injectAndroidCredentials_1 = require("./functions/injectAndroidCredentials");
12
+ const configureAndroidVersion_1 = require("./functions/configureAndroidVersion");
13
+ const runGradle_1 = require("./functions/runGradle");
14
+ const resolveAppleTeamIdFromCredentials_1 = require("./functions/resolveAppleTeamIdFromCredentials");
15
+ const configureIosCredentials_1 = require("./functions/configureIosCredentials");
16
+ const configureIosVersion_1 = require("./functions/configureIosVersion");
17
+ const generateGymfileFromTemplate_1 = require("./functions/generateGymfileFromTemplate");
18
+ const runFastlane_1 = require("./functions/runFastlane");
19
+ function getEasFunctions(ctx) {
16
20
  return [
17
21
  (0, checkout_1.createCheckoutBuildFunction)(),
18
22
  (0, uploadArtifact_1.createUploadArtifactBuildFunction)(ctx),
19
- (0, setUpNpmrc_1.createSetUpNpmrcBuildFunction)(ctx),
20
- (0, installNodeModules_1.createInstallNodeModulesBuildFunction)(ctx),
21
- (0, prebuild_1.createPrebuildBuildFunction)(ctx),
22
- (0, buildReactNativeApp_1.createBuildReactNativeAppBuildFunction)(oldCtx),
23
+ (0, useNpmToken_1.createSetUpNpmrcBuildFunction)(),
24
+ (0, installNodeModules_1.createInstallNodeModulesBuildFunction)(),
25
+ (0, prebuild_1.createPrebuildBuildFunction)(),
23
26
  (0, findAndUploadBuildArtifacts_1.createFindAndUploadBuildArtifactsBuildFunction)(ctx),
24
- (0, configureExpoUpdatesIfInstalled_1.configureEASUpdateIfInstalledFunction)(),
27
+ (0, configureEASUpdateIfInstalled_1.configureEASUpdateIfInstalledFunction)(),
25
28
  (0, injectAndroidCredentials_1.injectAndroidCredentialsFunction)(),
26
29
  (0, configureAndroidVersion_1.configureAndroidVersionFunction)(),
30
+ (0, runGradle_1.runGradleFunction)(),
31
+ (0, resolveAppleTeamIdFromCredentials_1.resolveAppleTeamIdFromCredentialsFunction)(),
32
+ (0, configureIosCredentials_1.configureIosCredentialsFunction)(),
33
+ (0, configureIosVersion_1.configureIosVersionFunction)(),
34
+ (0, generateGymfileFromTemplate_1.generateGymfileFromTemplateFunction)(),
35
+ (0, runFastlane_1.runFastlaneFunction)(),
27
36
  ];
28
37
  }
29
38
  exports.getEasFunctions = getEasFunctions;
@@ -1 +1 @@
1
- {"version":3,"file":"easFunctions.js","sourceRoot":"","sources":["../../src/steps/easFunctions.ts"],"names":[],"mappings":";;;AAMA,qEAAqF;AACrF,uDAAuE;AACvE,2DAA2E;AAC3E,2EAA2F;AAC3F,uDAAuE;AACvE,6EAA6F;AAC7F,6FAA6G;AAC7G,qGAAwG;AACxG,yFAA8F;AAC9F,uFAA4F;AAE5F,SAAgB,eAAe,CAC7B,GAAuB,EACvB,MAAyB,CAAC,eAAe;;IAEzC,OAAO;QACL,IAAA,sCAA2B,GAAE;QAC7B,IAAA,kDAAiC,EAAC,GAAG,CAAC;QACtC,IAAA,0CAA6B,EAAC,GAAG,CAAC;QAClC,IAAA,0DAAqC,EAAC,GAAG,CAAC;QAC1C,IAAA,sCAA2B,EAAC,GAAG,CAAC;QAChC,IAAA,4DAAsC,EAAC,MAAM,CAAC;QAC9C,IAAA,4EAA8C,EAAC,GAAG,CAAC;QACnD,IAAA,uEAAqC,GAAE;QACvC,IAAA,2DAAgC,GAAE;QAClC,IAAA,yDAA+B,GAAE;KAClC,CAAC;AACJ,CAAC;AAhBD,0CAgBC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport { BuildFunction } from '@expo/steps';\n\nimport { BuildContext } from '../context';\nimport { CustomBuildContext } from '../customBuildContext';\n\nimport { createUploadArtifactBuildFunction } from './functions/utils/uploadArtifact';\nimport { createCheckoutBuildFunction } from './functions/eas/checkout';\nimport { createSetUpNpmrcBuildFunction } from './functions/eas/setUpNpmrc';\nimport { createInstallNodeModulesBuildFunction } from './functions/eas/installNodeModules';\nimport { createPrebuildBuildFunction } from './functions/eas/prebuild';\nimport { createBuildReactNativeAppBuildFunction } from './functions/eas/buildReactNativeApp';\nimport { createFindAndUploadBuildArtifactsBuildFunction } from './functions/eas/findAndUploadBuildArtifacts';\nimport { configureEASUpdateIfInstalledFunction } from './functions/eas/configureExpoUpdatesIfInstalled';\nimport { injectAndroidCredentialsFunction } from './functions/utils/injectAndroidCredentials';\nimport { configureAndroidVersionFunction } from './functions/utils/configureAndroidVersion';\n\nexport function getEasFunctions(\n ctx: CustomBuildContext,\n oldCtx: BuildContext<Job> // TODO: remove\n): BuildFunction[] {\n return [\n createCheckoutBuildFunction(),\n createUploadArtifactBuildFunction(ctx),\n createSetUpNpmrcBuildFunction(ctx),\n createInstallNodeModulesBuildFunction(ctx),\n createPrebuildBuildFunction(ctx),\n createBuildReactNativeAppBuildFunction(oldCtx),\n createFindAndUploadBuildArtifactsBuildFunction(ctx),\n configureEASUpdateIfInstalledFunction(),\n injectAndroidCredentialsFunction(),\n configureAndroidVersionFunction(),\n ];\n}\n"]}
1
+ {"version":3,"file":"easFunctions.js","sourceRoot":"","sources":["../../src/steps/easFunctions.ts"],"names":[],"mappings":";;;AAIA,+DAA+E;AAC/E,mDAAmE;AACnE,yDAAwE;AACxE,uEAAuF;AACvF,mDAAmE;AACnE,yFAAyG;AACzG,6FAAkG;AAClG,mFAAwF;AACxF,iFAAsF;AACtF,qDAA0D;AAC1D,qGAA0G;AAC1G,iFAAsF;AACtF,yEAA8E;AAC9E,yFAA8F;AAC9F,yDAA8D;AAE9D,SAAgB,eAAe,CAAC,GAAuB;IACrD,OAAO;QACL,IAAA,sCAA2B,GAAE;QAC7B,IAAA,kDAAiC,EAAC,GAAG,CAAC;QACtC,IAAA,2CAA6B,GAAE;QAC/B,IAAA,0DAAqC,GAAE;QACvC,IAAA,sCAA2B,GAAE;QAC7B,IAAA,4EAA8C,EAAC,GAAG,CAAC;QACnD,IAAA,qEAAqC,GAAE;QACvC,IAAA,2DAAgC,GAAE;QAClC,IAAA,yDAA+B,GAAE;QACjC,IAAA,6BAAiB,GAAE;QACnB,IAAA,6EAAyC,GAAE;QAC3C,IAAA,yDAA+B,GAAE;QACjC,IAAA,iDAA2B,GAAE;QAC7B,IAAA,iEAAmC,GAAE;QACrC,IAAA,iCAAmB,GAAE;KACtB,CAAC;AACJ,CAAC;AAlBD,0CAkBC","sourcesContent":["import { BuildFunction } from '@expo/steps';\n\nimport { CustomBuildContext } from '../customBuildContext';\n\nimport { createUploadArtifactBuildFunction } from './functions/uploadArtifact';\nimport { createCheckoutBuildFunction } from './functions/checkout';\nimport { createSetUpNpmrcBuildFunction } from './functions/useNpmToken';\nimport { createInstallNodeModulesBuildFunction } from './functions/installNodeModules';\nimport { createPrebuildBuildFunction } from './functions/prebuild';\nimport { createFindAndUploadBuildArtifactsBuildFunction } from './functions/findAndUploadBuildArtifacts';\nimport { configureEASUpdateIfInstalledFunction } from './functions/configureEASUpdateIfInstalled';\nimport { injectAndroidCredentialsFunction } from './functions/injectAndroidCredentials';\nimport { configureAndroidVersionFunction } from './functions/configureAndroidVersion';\nimport { runGradleFunction } from './functions/runGradle';\nimport { resolveAppleTeamIdFromCredentialsFunction } from './functions/resolveAppleTeamIdFromCredentials';\nimport { configureIosCredentialsFunction } from './functions/configureIosCredentials';\nimport { configureIosVersionFunction } from './functions/configureIosVersion';\nimport { generateGymfileFromTemplateFunction } from './functions/generateGymfileFromTemplate';\nimport { runFastlaneFunction } from './functions/runFastlane';\n\nexport function getEasFunctions(ctx: CustomBuildContext): BuildFunction[] {\n return [\n createCheckoutBuildFunction(),\n createUploadArtifactBuildFunction(ctx),\n createSetUpNpmrcBuildFunction(),\n createInstallNodeModulesBuildFunction(),\n createPrebuildBuildFunction(),\n createFindAndUploadBuildArtifactsBuildFunction(ctx),\n configureEASUpdateIfInstalledFunction(),\n injectAndroidCredentialsFunction(),\n configureAndroidVersionFunction(),\n runGradleFunction(),\n resolveAppleTeamIdFromCredentialsFunction(),\n configureIosCredentialsFunction(),\n configureIosVersionFunction(),\n generateGymfileFromTemplateFunction(),\n runFastlaneFunction(),\n ];\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../../src/steps/functions/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"]}
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.configureAndroidVersionFunction = void 0;
7
7
  const steps_1 = require("@expo/steps");
8
8
  const semver_1 = __importDefault(require("semver"));
9
- const gradleConfig_1 = require("../../utils/android/gradleConfig");
9
+ const gradleConfig_1 = require("../utils/android/gradleConfig");
10
10
  function configureAndroidVersionFunction() {
11
11
  return new steps_1.BuildFunction({
12
- namespace: 'utils',
12
+ namespace: 'eas',
13
13
  id: 'configure_android_version',
14
14
  name: 'Configure Android version',
15
15
  inputProviders: [
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureAndroidVersion.js","sourceRoot":"","sources":["../../../src/steps/functions/configureAndroidVersion.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAyF;AACzF,oDAA4B;AAE5B,gEAAmF;AAEnF,SAAgB,+BAA+B;IAC7C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,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: 'eas',\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"]}
@@ -7,13 +7,13 @@ exports.configureEASUpdateIfInstalledFunction = void 0;
7
7
  const assert_1 = __importDefault(require("assert"));
8
8
  const steps_1 = require("@expo/steps");
9
9
  const semver_1 = __importDefault(require("semver"));
10
- const appConfig_1 = require("../../../utils/appConfig");
11
- const expoUpdates_1 = require("../../utils/expoUpdates");
10
+ const expoUpdates_1 = require("../utils/expoUpdates");
11
+ const appConfig_1 = require("../../utils/appConfig");
12
12
  function configureEASUpdateIfInstalledFunction() {
13
13
  return new steps_1.BuildFunction({
14
14
  namespace: 'eas',
15
- id: 'configure_eas_update_if_installed',
16
- name: 'Configure EAS Update if installed',
15
+ id: 'configure_eas_update',
16
+ name: 'Configure EAS Update',
17
17
  inputProviders: [
18
18
  steps_1.BuildStepInput.createProvider({
19
19
  id: 'runtime_version',
@@ -53,4 +53,4 @@ function configureEASUpdateIfInstalledFunction() {
53
53
  });
54
54
  }
55
55
  exports.configureEASUpdateIfInstalledFunction = configureEASUpdateIfInstalledFunction;
56
- //# sourceMappingURL=configureExpoUpdatesIfInstalled.js.map
56
+ //# sourceMappingURL=configureEASUpdateIfInstalled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureEASUpdateIfInstalled.js","sourceRoot":"","sources":["../../../src/steps/functions/configureEASUpdateIfInstalled.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAEzF,oDAA4B;AAE5B,sDAA0E;AAC1E,qDAAsD;AAEtD,SAAgB,qCAAqC;IACnD,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,sBAAsB;QAC5B,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,iBAAiB;gBACrB,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,SAAS;gBACb,QAAQ,EAAE,KAAK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cesContent":["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 { configureEASUpdateIfInstalledAsync } from '../utils/expoUpdates';\nimport { readAppConfig } from '../../utils/appConfig';\n\nexport function configureEASUpdateIfInstalledFunction(): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'configure_eas_update',\n name: 'Configure EAS Update',\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"]}
@@ -0,0 +1,2 @@
1
+ import { BuildFunction } from '@expo/steps';
2
+ export declare function configureIosCredentialsFunction(): BuildFunction;
@@ -0,0 +1,54 @@
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.configureIosCredentialsFunction = void 0;
7
+ const assert_1 = __importDefault(require("assert"));
8
+ const steps_1 = require("@expo/steps");
9
+ const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
10
+ const credentials_1 = require("../utils/ios/credentials/credentials");
11
+ const configure_1 = require("../utils/ios/configure");
12
+ const resolve_1 = require("../utils/ios/resolve");
13
+ function configureIosCredentialsFunction() {
14
+ return new steps_1.BuildFunction({
15
+ namespace: 'eas',
16
+ id: 'configure_ios_credentials',
17
+ name: 'Configure iOS credentials',
18
+ inputProviders: [
19
+ steps_1.BuildStepInput.createProvider({
20
+ id: 'credentials',
21
+ required: true,
22
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.JSON,
23
+ defaultValue: '${ eas.job.secrets.buildCredentials }',
24
+ }),
25
+ steps_1.BuildStepInput.createProvider({
26
+ id: 'build_configuration',
27
+ required: false,
28
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
29
+ }),
30
+ ],
31
+ fn: async (stepCtx, { inputs }) => {
32
+ const rawCredentialsInput = inputs.credentials.value;
33
+ const { value, error } = credentials_1.IosBuildCredentialsSchema.validate(rawCredentialsInput, {
34
+ stripUnknown: true,
35
+ convert: true,
36
+ abortEarly: false,
37
+ });
38
+ if (error) {
39
+ throw error;
40
+ }
41
+ const credentialsManager = new manager_1.default(value);
42
+ const credentials = await credentialsManager.prepare(stepCtx.logger);
43
+ (0, assert_1.default)(stepCtx.global.staticContext.job, 'Job is not defined');
44
+ const job = stepCtx.global.staticContext.job;
45
+ await (0, configure_1.configureCredentialsAsync)(stepCtx.logger, stepCtx.workingDirectory, {
46
+ credentials,
47
+ buildConfiguration: (0, resolve_1.resolveBuildConfiguration)(job, inputs.build_configuration.value),
48
+ });
49
+ stepCtx.logger.info('Successfully configured iOS credentials');
50
+ },
51
+ });
52
+ }
53
+ exports.configureIosCredentialsFunction = configureIosCredentialsFunction;
54
+ //# sourceMappingURL=configureIosCredentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureIosCredentials.js","sourceRoot":"","sources":["../../../src/steps/functions/configureIosCredentials.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAGzF,+EAAqE;AACrE,sEAAiF;AACjF,sDAAmE;AACnE,kDAAiE;AAEjE,SAAgB,+BAA+B;IAC7C,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,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: 'eas',\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"]}
@@ -0,0 +1,2 @@
1
+ import { BuildFunction } from '@expo/steps';
2
+ export declare function configureIosVersionFunction(): BuildFunction;
@@ -0,0 +1,77 @@
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.configureIosVersionFunction = void 0;
7
+ const assert_1 = __importDefault(require("assert"));
8
+ const steps_1 = require("@expo/steps");
9
+ const semver_1 = __importDefault(require("semver"));
10
+ const credentials_1 = require("../utils/ios/credentials/credentials");
11
+ const manager_1 = __importDefault(require("../utils/ios/credentials/manager"));
12
+ const configure_1 = require("../utils/ios/configure");
13
+ const resolve_1 = require("../utils/ios/resolve");
14
+ function configureIosVersionFunction() {
15
+ return new steps_1.BuildFunction({
16
+ namespace: 'eas',
17
+ id: 'configure_ios_version',
18
+ name: 'Configure iOS version',
19
+ inputProviders: [
20
+ steps_1.BuildStepInput.createProvider({
21
+ id: 'credentials',
22
+ required: true,
23
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.JSON,
24
+ defaultValue: '${ eas.job.secrets.buildCredentials }',
25
+ }),
26
+ steps_1.BuildStepInput.createProvider({
27
+ id: 'build_configuration',
28
+ required: false,
29
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
30
+ }),
31
+ steps_1.BuildStepInput.createProvider({
32
+ id: 'build_number',
33
+ required: true,
34
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
35
+ defaultValue: '${ eas.job.version.buildNumber }',
36
+ }),
37
+ steps_1.BuildStepInput.createProvider({
38
+ id: 'app_version',
39
+ required: true,
40
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
41
+ defaultValue: '${ eas.job.version.appVersion }',
42
+ }),
43
+ ],
44
+ fn: async (stepCtx, { inputs }) => {
45
+ const rawCredentialsInput = inputs.credentials.value;
46
+ const { value, error } = credentials_1.IosBuildCredentialsSchema.validate(rawCredentialsInput, {
47
+ stripUnknown: true,
48
+ convert: true,
49
+ abortEarly: false,
50
+ });
51
+ if (error) {
52
+ throw error;
53
+ }
54
+ const credentialsManager = new manager_1.default(value);
55
+ const credentials = await credentialsManager.prepare(stepCtx.logger);
56
+ (0, assert_1.default)(stepCtx.global.staticContext.job, 'Job is not defined');
57
+ const job = stepCtx.global.staticContext.job;
58
+ const buildNumber = inputs.build_number.value;
59
+ const appVersion = inputs.app_version.value;
60
+ if (!semver_1.default.valid(appVersion)) {
61
+ throw new Error(`App verrsion provided by the "app_version" input is not a valid semver version: ${appVersion}`);
62
+ }
63
+ stepCtx.logger.info('Setting iOS version...');
64
+ stepCtx.logger.info(`Build number: ${buildNumber}`);
65
+ stepCtx.logger.info(`App version: ${appVersion}`);
66
+ await (0, configure_1.updateVersionsAsync)(stepCtx.logger, stepCtx.workingDirectory, {
67
+ buildNumber,
68
+ appVersion,
69
+ }, {
70
+ targetNames: Object.keys(credentials.targetProvisioningProfiles),
71
+ buildConfiguration: (0, resolve_1.resolveBuildConfiguration)(job, inputs.build_configuration.value),
72
+ });
73
+ },
74
+ });
75
+ }
76
+ exports.configureIosVersionFunction = configureIosVersionFunction;
77
+ //# sourceMappingURL=configureIosVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configureIosVersion.js","sourceRoot":"","sources":["../../../src/steps/functions/configureIosVersion.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,uCAAyF;AAEzF,oDAA4B;AAE5B,sEAAiF;AACjF,+EAAqE;AACrE,sDAA6D;AAC7D,kDAAiE;AAEjE,S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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,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,KAAe,CAAC;YACxD,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,KAAe,CAAC;YACtD,IAAI,CAAC,gBAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;gBAC7B,MAAM,IAAI,KAAK,CACb,mFAAmF,UAAU,EAAE,CAChG,CAAC;aACH;YAED,OAAO,CAAC,MAAM,CAAC,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: 'eas',\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,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 createFindAndUploadBuildArtifactsBuildFunction(ctx: CustomBuildContext): BuildFunction;
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.createFindAndUploadBuildArtifactsBuildFunction = void 0;
7
- const path_1 = __importDefault(require("path"));
8
4
  const eas_build_job_1 = require("@expo/eas-build-job");
9
5
  const steps_1 = require("@expo/steps");
10
- const context_1 = require("../../../context");
11
- const artifacts_1 = require("../../../utils/artifacts");
12
- const xcodeBuildLogs_1 = require("../../../ios/xcodeBuildLogs");
6
+ const context_1 = require("../../context");
7
+ const artifacts_1 = require("../../utils/artifacts");
8
+ const xcodeBuildLogs_1 = require("../../ios/xcodeBuildLogs");
13
9
  function createFindAndUploadBuildArtifactsBuildFunction(ctx) {
14
10
  return new steps_1.BuildFunction({
15
11
  namespace: 'eas',
@@ -39,7 +35,7 @@ function createFindAndUploadBuildArtifactsBuildFunction(ctx) {
39
35
  if (ctx.job.platform !== eas_build_job_1.Platform.IOS) {
40
36
  return;
41
37
  }
42
- const xcodeBuildLogsPath = await (0, xcodeBuildLogs_1.findXcodeBuildLogsPathAsync)(path_1.default.resolve(ctx.projectTargetDirectory, '../logs'));
38
+ const xcodeBuildLogsPath = await (0, xcodeBuildLogs_1.findXcodeBuildLogsPathAsync)(stepCtx.global.buildLogsDirectory);
43
39
  if (xcodeBuildLogsPath) {
44
40
  await ctx.runtimeApi.uploadArtifacts(context_1.ArtifactType.XCODE_BUILD_LOGS, [xcodeBuildLogsPath], logger);
45
41
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findAndUploadBuildArtifacts.js","sourceRoot":"","sources":["../../../src/steps/functions/findAndUploadBuildArtifacts.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,uCAA4C;AAE5C,2CAA6C;AAC7C,qDAAsD;AACtD,6DAAuE;AAGvE,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,sBAAsB,EAAE,IAAI,EAAE,MAAM,CAAC,CACxD,CACF,CACF,CAAC,IAAI,EAAE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AAC,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"]}
@@ -0,0 +1,2 @@
1
+ import { BuildFunction } from '@expo/steps';
2
+ export declare function generateGymfileFromTemplateFunction(): BuildFunction;