@expo/eas-build-job 18.8.0 → 18.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/android.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LoggerLevel } from '@expo/logger';
2
2
  import Joi from 'joi';
3
- import { ArchiveSource, BuildMode, BuildTrigger, Cache, Env, EnvironmentSecret, Hooks, Platform, StaticWorkflowInterpolationContext, Workflow } from './common';
3
+ import { ArchiveSource, BuildMode, BuildTrigger, Cache, Env, EnvironmentSecret, Hooks, JobOutputs, Platform, StaticWorkflowInterpolationContext, Workflow } from './common';
4
4
  import { Step } from './step';
5
5
  export interface Keystore {
6
6
  dataBase64: string;
@@ -65,7 +65,7 @@ export interface Job {
65
65
  };
66
66
  hooks?: Hooks;
67
67
  steps?: Step[];
68
- outputs?: Record<string, string>;
68
+ outputs?: JobOutputs;
69
69
  experimental?: {
70
70
  prebuildCommand?: string;
71
71
  };
package/dist/android.js CHANGED
@@ -71,6 +71,7 @@ exports.JobSchema = joi_1.default.object({
71
71
  buildType: joi_1.default.string().valid(...Object.values(BuildType)),
72
72
  username: joi_1.default.string(),
73
73
  hooks: common_1.HooksSchema,
74
+ outputs: common_1.JobOutputsSchema,
74
75
  experimental: joi_1.default.object({
75
76
  prebuildCommand: joi_1.default.string(),
76
77
  }),
package/dist/common.d.ts CHANGED
@@ -284,6 +284,9 @@ export type DynamicInterpolationContext = {
284
284
  substring: (input: string, start: number, end?: number) => string;
285
285
  };
286
286
  export type WorkflowInterpolationContext = StaticWorkflowInterpolationContext & DynamicInterpolationContext;
287
+ export type JobOutputs = Record<string, string>;
288
+ export declare const JobOutputsSchema: Joi.ObjectSchema<JobOutputs>;
289
+ export declare const JobOutputsSchemaZ: z.ZodRecord<z.ZodString, z.ZodString>;
287
290
  export declare const CustomBuildConfigSchema: Joi.ObjectSchema<any>;
288
291
  export declare enum EasCliNpmTags {
289
292
  STAGING = "latest-eas-build-staging",
package/dist/common.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EasCliNpmTags = exports.CustomBuildConfigSchema = exports.StaticWorkflowInterpolationContextZ = exports.CacheSchema = exports.HooksZ = exports.HooksSchema = exports.EnvironmentSecretZ = exports.EnvironmentSecretsSchema = exports.EnvironmentSecretType = exports.EnvSchema = exports.ArchiveSourceSchemaZ = exports.ArchiveSourceSchema = exports.BuildTrigger = exports.ArchiveSourceType = exports.Platform = exports.Workflow = exports.BuildMode = void 0;
6
+ exports.EasCliNpmTags = exports.CustomBuildConfigSchema = exports.JobOutputsSchemaZ = exports.JobOutputsSchema = exports.StaticWorkflowInterpolationContextZ = exports.CacheSchema = exports.HooksZ = exports.HooksSchema = exports.EnvironmentSecretZ = exports.EnvironmentSecretsSchema = exports.EnvironmentSecretType = exports.EnvSchema = exports.ArchiveSourceSchemaZ = exports.ArchiveSourceSchema = exports.BuildTrigger = exports.ArchiveSourceType = exports.Platform = exports.Workflow = exports.BuildMode = void 0;
7
7
  const joi_1 = __importDefault(require("joi"));
8
8
  const zod_1 = require("zod");
9
9
  const step_1 = require("./step");
@@ -262,6 +262,8 @@ exports.StaticWorkflowInterpolationContextZ = zod_1.z.object({
262
262
  // We need to .optional() to support jobs that are not triggered by an App Store Connect event.
263
263
  app_store_connect: AppStoreConnectContextZ.optional(),
264
264
  });
265
+ exports.JobOutputsSchema = joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string());
266
+ exports.JobOutputsSchemaZ = zod_1.z.record(zod_1.z.string(), zod_1.z.string());
265
267
  exports.CustomBuildConfigSchema = joi_1.default.object().when('.mode', {
266
268
  is: [BuildMode.CUSTOM, BuildMode.REPACK],
267
269
  then: joi_1.default.object().when('.customBuildConfig.path', {
@@ -271,7 +273,6 @@ exports.CustomBuildConfigSchema = joi_1.default.object().when('.mode', {
271
273
  path: joi_1.default.string().required(),
272
274
  }).required(),
273
275
  steps: joi_1.default.any().strip(),
274
- outputs: joi_1.default.any().strip(),
275
276
  }),
276
277
  otherwise: joi_1.default.object({
277
278
  customBuildConfig: joi_1.default.any().strip(),
@@ -279,13 +280,11 @@ exports.CustomBuildConfigSchema = joi_1.default.object().when('.mode', {
279
280
  .items(joi_1.default.any())
280
281
  .required()
281
282
  .custom(steps => (0, step_1.validateSteps)(steps), 'steps validation'),
282
- outputs: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string()).required(),
283
283
  }),
284
284
  }),
285
285
  otherwise: joi_1.default.object({
286
286
  customBuildConfig: joi_1.default.any().strip(),
287
287
  steps: joi_1.default.any().strip(),
288
- outputs: joi_1.default.any().strip(),
289
288
  }),
290
289
  });
291
290
  var EasCliNpmTags;
package/dist/generic.js CHANGED
@@ -40,7 +40,7 @@ var Generic;
40
40
  appId: zod_1.z.string(),
41
41
  hooks: common_1.HooksZ.optional(),
42
42
  steps: zod_1.z.array(step_1.StepZ).min(1),
43
- outputs: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
43
+ outputs: common_1.JobOutputsSchemaZ.optional(),
44
44
  });
45
45
  Generic.PartialJobZ = Generic.JobZ.partial();
46
46
  })(Generic || (exports.Generic = Generic = {}));
package/dist/index.d.ts CHANGED
@@ -11,5 +11,6 @@ export * from './context';
11
11
  export * from './generic';
12
12
  export * from './step';
13
13
  export * from './submission-config';
14
+ export * from './projectPackage';
14
15
  declare const version: any;
15
16
  export { version };
package/dist/index.js CHANGED
@@ -59,5 +59,6 @@ __exportStar(require("./context"), exports);
59
59
  __exportStar(require("./generic"), exports);
60
60
  __exportStar(require("./step"), exports);
61
61
  __exportStar(require("./submission-config"), exports);
62
+ __exportStar(require("./projectPackage"), exports);
62
63
  const version = require('../package.json').version;
63
64
  exports.version = version;
package/dist/ios.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LoggerLevel } from '@expo/logger';
2
2
  import Joi from 'joi';
3
- import { ArchiveSource, BuildMode, BuildTrigger, Cache, Env, EnvironmentSecret, Hooks, Platform, StaticWorkflowInterpolationContext, Workflow } from './common';
3
+ import { ArchiveSource, BuildMode, BuildTrigger, Cache, Env, EnvironmentSecret, Hooks, JobOutputs, Platform, StaticWorkflowInterpolationContext, Workflow } from './common';
4
4
  import { Step } from './step';
5
5
  export type DistributionType = 'store' | 'internal' | 'simulator';
6
6
  export interface TargetCredentials {
@@ -70,7 +70,7 @@ export interface Job {
70
70
  };
71
71
  hooks?: Hooks;
72
72
  steps?: Step[];
73
- outputs?: Record<string, string>;
73
+ outputs?: JobOutputs;
74
74
  experimental?: {
75
75
  prebuildCommand?: string;
76
76
  };
package/dist/ios.js CHANGED
@@ -90,6 +90,7 @@ exports.JobSchema = joi_1.default.object({
90
90
  applicationArchivePath: joi_1.default.string(),
91
91
  username: joi_1.default.string(),
92
92
  hooks: common_1.HooksSchema,
93
+ outputs: common_1.JobOutputsSchema,
93
94
  experimental: joi_1.default.object({
94
95
  prebuildCommand: joi_1.default.string(),
95
96
  }),
package/dist/logs.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare enum BuildPhase {
34
34
  FAIL_BUILD = "FAIL_BUILD",
35
35
  FIX_GRADLEW = "FIX_GRADLEW",
36
36
  RUN_GRADLEW = "RUN_GRADLEW",
37
+ GRADLE_BUILD_PROFILE = "GRADLE_BUILD_PROFILE",
37
38
  INSTALL_PODS = "INSTALL_PODS",
38
39
  CONFIGURE_XCODE_PROJECT = "CONFIGURE_XCODE_PROJECT",
39
40
  RUN_FASTLANE = "RUN_FASTLANE",
package/dist/logs.js CHANGED
@@ -39,6 +39,7 @@ var BuildPhase;
39
39
  // ANDROID
40
40
  BuildPhase["FIX_GRADLEW"] = "FIX_GRADLEW";
41
41
  BuildPhase["RUN_GRADLEW"] = "RUN_GRADLEW";
42
+ BuildPhase["GRADLE_BUILD_PROFILE"] = "GRADLE_BUILD_PROFILE";
42
43
  // IOS
43
44
  BuildPhase["INSTALL_PODS"] = "INSTALL_PODS";
44
45
  BuildPhase["CONFIGURE_XCODE_PROJECT"] = "CONFIGURE_XCODE_PROJECT";
@@ -101,6 +102,7 @@ exports.buildPhaseDisplayName = {
101
102
  // ANDROID
102
103
  [BuildPhase.FIX_GRADLEW]: 'Fix gradlew',
103
104
  [BuildPhase.RUN_GRADLEW]: 'Run gradlew',
105
+ [BuildPhase.GRADLE_BUILD_PROFILE]: 'Gradle build profile',
104
106
  // IOS
105
107
  [BuildPhase.INSTALL_PODS]: 'Install pods',
106
108
  [BuildPhase.CONFIGURE_XCODE_PROJECT]: 'Configure Xcode project',
@@ -160,6 +162,7 @@ exports.buildPhaseWebsiteId = {
160
162
  // ANDROID
161
163
  [BuildPhase.FIX_GRADLEW]: 'fix-gradlew',
162
164
  [BuildPhase.RUN_GRADLEW]: 'run-gradlew',
165
+ [BuildPhase.GRADLE_BUILD_PROFILE]: 'gradle-build-profile',
163
166
  // IOS
164
167
  [BuildPhase.INSTALL_PODS]: 'install-pods',
165
168
  [BuildPhase.CONFIGURE_XCODE_PROJECT]: 'configure-xcode-project',
@@ -40,6 +40,10 @@ export type Metadata = {
40
40
  * It's undefined if the expo package is not installed for the project.
41
41
  */
42
42
  sdkVersion?: string;
43
+ /**
44
+ * Version of the expo package used in the project.
45
+ */
46
+ expoPackageVersion?: string;
43
47
  /**
44
48
  * Runtime version (for Expo Updates)
45
49
  */
package/dist/metadata.js CHANGED
@@ -15,6 +15,7 @@ exports.MetadataSchema = joi_1.default.object({
15
15
  distribution: joi_1.default.string().valid('store', 'internal', 'simulator'),
16
16
  credentialsSource: joi_1.default.string().valid('local', 'remote'),
17
17
  sdkVersion: joi_1.default.string(),
18
+ expoPackageVersion: joi_1.default.string(),
18
19
  runtimeVersion: joi_1.default.string(),
19
20
  fingerprintHash: joi_1.default.string(),
20
21
  reactNativeVersion: joi_1.default.string(),
@@ -0,0 +1,5 @@
1
+ import { type Env } from './common';
2
+ export declare function getInstalledExpoPackageVersionAsync({ env, projectDir, }: {
3
+ env?: Env | NodeJS.ProcessEnv;
4
+ projectDir: string;
5
+ }): Promise<string>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getInstalledExpoPackageVersionAsync = getInstalledExpoPackageVersionAsync;
40
+ const turtle_spawn_1 = __importDefault(require("@expo/turtle-spawn"));
41
+ const results_1 = require("@expo/results");
42
+ const promises_1 = __importDefault(require("fs/promises"));
43
+ const semver_1 = __importDefault(require("semver"));
44
+ const errors = __importStar(require("./errors"));
45
+ async function getInstalledExpoPackageVersionAsync({ env = process.env, projectDir, }) {
46
+ const expoPackageJsonPathResult = await (0, results_1.asyncResult)((0, turtle_spawn_1.default)('node', ['--print', "require.resolve('expo/package.json')"], {
47
+ cwd: projectDir,
48
+ env,
49
+ stdio: 'pipe',
50
+ }));
51
+ if (!expoPackageJsonPathResult.ok) {
52
+ throw new errors.UserError('EAS_BUILD_EXPO_PACKAGE_VERSION_NOT_FOUND', 'Cannot resolve the installed expo package version because require.resolve("expo/package.json") failed.', { cause: expoPackageJsonPathResult.reason });
53
+ }
54
+ const expoPackageJsonPath = expoPackageJsonPathResult.value.stdout.toString().trim();
55
+ const expoPackageJsonResult = await (0, results_1.asyncResult)(readJsonAsync(expoPackageJsonPath));
56
+ if (!expoPackageJsonResult.ok) {
57
+ throw new errors.UserError('EAS_BUILD_EXPO_PACKAGE_VERSION_READ_FAILED', 'Cannot resolve the installed expo package version because expo/package.json could not be read.', { cause: expoPackageJsonResult.reason });
58
+ }
59
+ const expoPackageVersion = expoPackageJsonResult.value.version;
60
+ if (typeof expoPackageVersion !== 'string' || !semver_1.default.valid(expoPackageVersion)) {
61
+ throw new errors.UserError('EAS_BUILD_EXPO_PACKAGE_VERSION_INVALID', 'Cannot resolve the installed expo package version because expo/package.json has an invalid version.');
62
+ }
63
+ return expoPackageVersion;
64
+ }
65
+ async function readJsonAsync(filePath) {
66
+ return JSON.parse(await promises_1.default.readFile(filePath, 'utf8'));
67
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/eas-build-job",
3
- "version": "18.8.0",
3
+ "version": "18.13.1",
4
4
  "bugs": "https://github.com/expo/eas-cli/issues",
5
5
  "license": "MIT",
6
6
  "author": "Expo <support@expo.io>",
@@ -26,6 +26,8 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@expo/logger": "18.5.0",
29
+ "@expo/results": "1.0.0",
30
+ "@expo/turtle-spawn": "18.5.0",
29
31
  "joi": "^17.13.1",
30
32
  "semver": "^7.6.2",
31
33
  "zod": "^4.3.5"
@@ -38,5 +40,5 @@
38
40
  "ts-jest": "^29.1.4",
39
41
  "typescript": "^5.5.4"
40
42
  },
41
- "gitHead": "7c7fad4a13a8a45bdca698fc0fd4c08b17bb189c"
43
+ "gitHead": "dbf597957dc93133d15e99298c55c0ad31b994c1"
42
44
  }