@expo/eas-build-job 1.0.163 → 1.0.165
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 +5 -2
- package/dist/android.js +2 -8
- package/dist/android.js.map +1 -1
- package/dist/common.d.ts +7 -6
- package/dist/common.js +28 -1
- package/dist/common.js.map +1 -1
- package/dist/generic.d.ts +233 -921
- package/dist/generic.js +2 -13
- package/dist/generic.js.map +1 -1
- package/dist/ios.d.ts +5 -2
- package/dist/ios.js +2 -8
- package/dist/ios.js.map +1 -1
- package/dist/step.d.ts +36 -36
- package/dist/step.js +32 -14
- package/dist/step.js.map +1 -1
- package/package.json +2 -2
package/dist/android.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { LoggerLevel } from '@expo/logger';
|
|
3
|
-
import { ArchiveSource, Env, Platform, Workflow, Cache, EnvironmentSecret, BuildTrigger, BuildMode } from './common';
|
|
3
|
+
import { ArchiveSource, Env, Platform, Workflow, Cache, EnvironmentSecret, BuildTrigger, BuildMode, StaticWorkflowInterpolationContext } from './common';
|
|
4
|
+
import { Step } from './step';
|
|
4
5
|
export interface Keystore {
|
|
5
6
|
dataBase64: string;
|
|
6
7
|
keystorePassword: string;
|
|
@@ -61,6 +62,8 @@ export interface Job {
|
|
|
61
62
|
customBuildConfig?: {
|
|
62
63
|
path: string;
|
|
63
64
|
};
|
|
65
|
+
steps?: Step[];
|
|
66
|
+
outputs?: Record<string, string>;
|
|
64
67
|
experimental?: {
|
|
65
68
|
prebuildCommand?: string;
|
|
66
69
|
};
|
|
@@ -70,7 +73,7 @@ export interface Job {
|
|
|
70
73
|
submitProfile?: string;
|
|
71
74
|
};
|
|
72
75
|
loggerLevel?: LoggerLevel;
|
|
73
|
-
workflowInterpolationContext?:
|
|
76
|
+
workflowInterpolationContext?: StaticWorkflowInterpolationContext;
|
|
74
77
|
initiatingUserId: string;
|
|
75
78
|
appId: string;
|
|
76
79
|
environment?: 'production' | 'preview' | 'development';
|
package/dist/android.js
CHANGED
|
@@ -69,13 +69,6 @@ exports.JobSchema = joi_1.default.object({
|
|
|
69
69
|
applicationArchivePath: joi_1.default.string(),
|
|
70
70
|
buildType: joi_1.default.string().valid(...Object.values(BuildType)),
|
|
71
71
|
username: joi_1.default.string(),
|
|
72
|
-
customBuildConfig: joi_1.default.when('mode', {
|
|
73
|
-
is: joi_1.default.string().valid(common_1.BuildMode.CUSTOM),
|
|
74
|
-
then: joi_1.default.object({
|
|
75
|
-
path: joi_1.default.string(),
|
|
76
|
-
}).required(),
|
|
77
|
-
otherwise: joi_1.default.any().strip(),
|
|
78
|
-
}),
|
|
79
72
|
experimental: joi_1.default.object({
|
|
80
73
|
prebuildCommand: joi_1.default.string(),
|
|
81
74
|
}),
|
|
@@ -88,5 +81,6 @@ exports.JobSchema = joi_1.default.object({
|
|
|
88
81
|
initiatingUserId: joi_1.default.string().required(),
|
|
89
82
|
appId: joi_1.default.string().required(),
|
|
90
83
|
environment: joi_1.default.string().valid('production', 'preview', 'development'),
|
|
91
|
-
|
|
84
|
+
workflowInterpolationContext: joi_1.default.object().custom((workflowInterpolationContext) => common_1.StaticWorkflowInterpolationContextZ.optional().parse(workflowInterpolationContext)),
|
|
85
|
+
}).concat(common_1.CustomBuildConfigSchema);
|
|
92
86
|
//# sourceMappingURL=android.js.map
|
package/dist/android.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.js","sourceRoot":"","sources":["../src/android.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAA2C;AAE3C,
|
|
1
|
+
{"version":3,"file":"android.js","sourceRoot":"","sources":["../src/android.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAA2C;AAE3C,qCAgBkB;AAUlB,MAAM,cAAc,GAAG,aAAG,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,aAAG,CAAC,MAAM,EAA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AC,CAAC","sourcesContent":["import Joi from 'joi';\nimport { LoggerLevel } from '@expo/logger';\n\nimport {\n ArchiveSource,\n ArchiveSourceSchema,\n Env,\n EnvSchema,\n Platform,\n Workflow,\n Cache,\n CacheSchema,\n EnvironmentSecretsSchema,\n EnvironmentSecret,\n BuildTrigger,\n BuildMode,\n StaticWorkflowInterpolationContextZ,\n StaticWorkflowInterpolationContext,\n CustomBuildConfigSchema,\n} from './common';\nimport { Step } from './step';\n\nexport interface Keystore {\n dataBase64: string;\n keystorePassword: string;\n keyAlias: string;\n keyPassword?: string;\n}\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\nexport enum BuildType {\n APK = 'apk',\n APP_BUNDLE = 'app-bundle',\n}\n\nexport interface BuilderEnvironment {\n image?: string;\n node?: string;\n pnpm?: string;\n yarn?: string;\n bun?: string;\n ndk?: string;\n env?: Env;\n}\n\nconst BuilderEnvironmentSchema = Joi.object({\n image: Joi.string(),\n node: Joi.string(),\n yarn: Joi.string(),\n pnpm: Joi.string(),\n bun: Joi.string(),\n ndk: Joi.string(),\n env: EnvSchema,\n});\n\nexport interface BuildSecrets {\n buildCredentials?: {\n keystore: Keystore;\n };\n environmentSecrets?: EnvironmentSecret[];\n robotAccessToken?: string;\n}\n\nexport interface Job {\n mode: BuildMode;\n type: Workflow;\n triggeredBy: BuildTrigger;\n projectArchive: ArchiveSource;\n platform: Platform.ANDROID;\n projectRootDirectory: string;\n buildProfile?: string;\n updates?: {\n channel?: string;\n };\n secrets?: BuildSecrets;\n builderEnvironment?: BuilderEnvironment;\n cache: Cache;\n developmentClient?: boolean;\n version?: {\n versionCode?: string;\n /**\n * support for this field is implemented, but specifying it is disabled on schema level\n */\n versionName?: string;\n /**\n * support for this field is implemented, but specifying it is disabled on schema level\n */\n runtimeVersion?: string;\n };\n buildArtifactPaths?: string[];\n\n gradleCommand?: string;\n applicationArchivePath?: string;\n\n buildType?: BuildType;\n username?: string;\n\n customBuildConfig?: {\n path: string;\n };\n steps?: Step[];\n outputs?: Record<string, string>;\n\n experimental?: {\n prebuildCommand?: string;\n };\n expoBuildUrl?: string;\n githubTriggerOptions?: {\n autoSubmit: boolean;\n submitProfile?: string;\n };\n loggerLevel?: LoggerLevel;\n\n workflowInterpolationContext?: StaticWorkflowInterpolationContext;\n\n initiatingUserId: string;\n appId: string;\n\n environment?: 'production' | 'preview' | 'development';\n}\n\nconst SecretsSchema = Joi.object({\n buildCredentials: Joi.object({ keystore: KeystoreSchema.required() }),\n environmentSecrets: EnvironmentSecretsSchema,\n robotAccessToken: Joi.string(),\n});\n\nexport const JobSchema = Joi.object({\n mode: Joi.string()\n .valid(BuildMode.BUILD, BuildMode.CUSTOM, BuildMode.REPACK)\n .default(BuildMode.BUILD),\n type: Joi.string()\n .valid(...Object.values(Workflow))\n .required(),\n triggeredBy: Joi.string()\n .valid(...Object.values(BuildTrigger))\n .default(BuildTrigger.EAS_CLI),\n projectArchive: ArchiveSourceSchema.required(),\n platform: Joi.string().valid(Platform.ANDROID).required(),\n projectRootDirectory: Joi.string().required(),\n buildProfile: Joi.when('triggeredBy', {\n is: BuildTrigger.GIT_BASED_INTEGRATION,\n then: Joi.string().required(),\n otherwise: Joi.string(),\n }),\n updates: Joi.object({\n channel: Joi.string(),\n }),\n secrets: Joi.when('mode', {\n is: Joi.string().valid(BuildMode.CUSTOM),\n then: SecretsSchema,\n otherwise: SecretsSchema.required(),\n }),\n builderEnvironment: BuilderEnvironmentSchema,\n cache: CacheSchema.default(),\n developmentClient: Joi.boolean(),\n version: Joi.object({\n versionCode: Joi.string().regex(/^\\d+$/),\n }),\n buildArtifactPaths: Joi.array().items(Joi.string()),\n\n gradleCommand: Joi.string(),\n applicationArchivePath: Joi.string(),\n\n buildType: Joi.string().valid(...Object.values(BuildType)),\n username: Joi.string(),\n\n experimental: Joi.object({\n prebuildCommand: Joi.string(),\n }),\n expoBuildUrl: Joi.string().uri().optional(),\n githubTriggerOptions: Joi.object({\n autoSubmit: Joi.boolean().default(false),\n submitProfile: Joi.string(),\n }),\n loggerLevel: Joi.string().valid(...Object.values(LoggerLevel)),\n\n initiatingUserId: Joi.string().required(),\n appId: Joi.string().required(),\n\n environment: Joi.string().valid('production', 'preview', 'development'),\n\n workflowInterpolationContext: Joi.object().custom((workflowInterpolationContext) =>\n StaticWorkflowInterpolationContextZ.optional().parse(workflowInterpolationContext)\n ),\n}).concat(CustomBuildConfigSchema);\n"]}
|
package/dist/common.d.ts
CHANGED
|
@@ -73,11 +73,11 @@ export declare const ArchiveSourceSchemaZ: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
73
73
|
type: z.ZodLiteral<ArchiveSourceType.PATH>;
|
|
74
74
|
path: z.ZodString;
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
type: ArchiveSourceType.PATH;
|
|
77
76
|
path: string;
|
|
78
|
-
}, {
|
|
79
77
|
type: ArchiveSourceType.PATH;
|
|
78
|
+
}, {
|
|
80
79
|
path: string;
|
|
80
|
+
type: ArchiveSourceType.PATH;
|
|
81
81
|
}>, z.ZodObject<{
|
|
82
82
|
type: z.ZodLiteral<ArchiveSourceType.URL>;
|
|
83
83
|
url: z.ZodString;
|
|
@@ -117,13 +117,13 @@ export declare const EnvironmentSecretZ: z.ZodObject<{
|
|
|
117
117
|
value: z.ZodString;
|
|
118
118
|
type: z.ZodNativeEnum<typeof EnvironmentSecretType>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
name: string;
|
|
120
121
|
type: EnvironmentSecretType;
|
|
121
122
|
value: string;
|
|
122
|
-
name: string;
|
|
123
123
|
}, {
|
|
124
|
+
name: string;
|
|
124
125
|
type: EnvironmentSecretType;
|
|
125
126
|
value: string;
|
|
126
|
-
name: string;
|
|
127
127
|
}>;
|
|
128
128
|
export interface Cache {
|
|
129
129
|
disabled: boolean;
|
|
@@ -187,6 +187,7 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
|
|
|
187
187
|
}>>;
|
|
188
188
|
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
189
189
|
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
env: Record<string, string>;
|
|
190
191
|
after: Record<string, {
|
|
191
192
|
status: string;
|
|
192
193
|
outputs: Record<string, string | null>;
|
|
@@ -195,7 +196,6 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
|
|
|
195
196
|
status: string;
|
|
196
197
|
outputs: Record<string, string | null>;
|
|
197
198
|
}>;
|
|
198
|
-
env: Record<string, string>;
|
|
199
199
|
github?: {
|
|
200
200
|
event_name: "push" | "pull_request" | "workflow_dispatch";
|
|
201
201
|
sha: string;
|
|
@@ -204,6 +204,7 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
|
|
|
204
204
|
ref_type: string;
|
|
205
205
|
} | undefined;
|
|
206
206
|
}, {
|
|
207
|
+
env: Record<string, string>;
|
|
207
208
|
after: Record<string, {
|
|
208
209
|
status: string;
|
|
209
210
|
outputs: Record<string, string | null>;
|
|
@@ -212,7 +213,6 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
|
|
|
212
213
|
status: string;
|
|
213
214
|
outputs: Record<string, string | null>;
|
|
214
215
|
}>;
|
|
215
|
-
env: Record<string, string>;
|
|
216
216
|
github?: {
|
|
217
217
|
event_name: "push" | "pull_request" | "workflow_dispatch";
|
|
218
218
|
sha: string;
|
|
@@ -231,3 +231,4 @@ export type DynamicInterpolationContext = {
|
|
|
231
231
|
toJSON: (value: unknown) => string;
|
|
232
232
|
};
|
|
233
233
|
export type WorkflowInterpolationContext = StaticWorkflowInterpolationContext & DynamicInterpolationContext;
|
|
234
|
+
export declare const CustomBuildConfigSchema: Joi.ObjectSchema<any>;
|
package/dist/common.js
CHANGED
|
@@ -3,9 +3,10 @@ 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.StaticWorkflowInterpolationContextZ = exports.CacheSchema = 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.CustomBuildConfigSchema = exports.StaticWorkflowInterpolationContextZ = exports.CacheSchema = 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
|
+
const step_1 = require("./step");
|
|
9
10
|
var BuildMode;
|
|
10
11
|
(function (BuildMode) {
|
|
11
12
|
BuildMode["BUILD"] = "build";
|
|
@@ -137,4 +138,30 @@ exports.StaticWorkflowInterpolationContextZ = zod_1.z.object({
|
|
|
137
138
|
.optional(),
|
|
138
139
|
env: zod_1.z.record(zod_1.z.string()),
|
|
139
140
|
});
|
|
141
|
+
exports.CustomBuildConfigSchema = joi_1.default.object().when('.mode', {
|
|
142
|
+
is: BuildMode.CUSTOM,
|
|
143
|
+
then: joi_1.default.object().when('.customBuildConfig.path', {
|
|
144
|
+
is: joi_1.default.exist(),
|
|
145
|
+
then: joi_1.default.object({
|
|
146
|
+
customBuildConfig: joi_1.default.object({
|
|
147
|
+
path: joi_1.default.string().required(),
|
|
148
|
+
}).required(),
|
|
149
|
+
steps: joi_1.default.any().strip(),
|
|
150
|
+
outputs: joi_1.default.any().strip(),
|
|
151
|
+
}),
|
|
152
|
+
otherwise: joi_1.default.object({
|
|
153
|
+
customBuildConfig: joi_1.default.any().strip(),
|
|
154
|
+
steps: joi_1.default.array()
|
|
155
|
+
.items(joi_1.default.any())
|
|
156
|
+
.required()
|
|
157
|
+
.custom((steps) => (0, step_1.validateSteps)(steps), 'steps validation'),
|
|
158
|
+
outputs: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string()).required(),
|
|
159
|
+
}),
|
|
160
|
+
}),
|
|
161
|
+
otherwise: joi_1.default.object({
|
|
162
|
+
customBuildConfig: joi_1.default.any().strip(),
|
|
163
|
+
steps: joi_1.default.any().strip(),
|
|
164
|
+
outputs: joi_1.default.any().strip(),
|
|
165
|
+
}),
|
|
166
|
+
});
|
|
140
167
|
//# sourceMappingURL=common.js.map
|
package/dist/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,6BAAwB;AAIxB,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;AACrB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,uBAAW,CAAA;AACb,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,gCAAW,CAAA;AACb,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AAED,IAAY,YAGX;AAHD,WAAY,YAA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AAE,cAAc,EAAE,mBAAmB,CAAC,CAAC;QACjE,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;QACf,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;KACrB,CAAC;QACF,mFAAmF;SAClF,QAAQ,EAAE;IACb,GAAG,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CAC1B,CAAC,CAAC","sourcesContent":["import Joi from 'joi';\nimport { z } from 'zod';\n\nimport { BuildPhase, BuildPhaseResult } from './logs';\n\nexport enum BuildMode {\n BUILD = 'build',\n RESIGN = 'resign',\n CUSTOM = 'custom',\n REPACK = 'repack',\n}\n\nexport enum Workflow {\n GENERIC = 'generic',\n MANAGED = 'managed',\n UNKNOWN = 'unknown',\n}\n\nexport enum Platform {\n ANDROID = 'android',\n IOS = 'ios',\n}\n\nexport enum ArchiveSourceType {\n NONE = 'NONE',\n URL = 'URL',\n PATH = 'PATH',\n GCS = 'GCS',\n GIT = 'GIT',\n}\n\nexport enum BuildTrigger {\n EAS_CLI = 'EAS_CLI',\n GIT_BASED_INTEGRATION = 'GIT_BASED_INTEGRATION',\n}\n\nexport type ArchiveSource =\n | { type: ArchiveSourceType.NONE }\n | { type: ArchiveSourceType.GCS; bucketKey: string; metadataLocation?: string }\n | { type: ArchiveSourceType.URL; url: string }\n | { type: ArchiveSourceType.PATH; path: string }\n | {\n type: ArchiveSourceType.GIT;\n /**\n * Url that can be used to clone repository.\n * It should contain embedded credentials for private registries.\n */\n repositoryUrl: string;\n /** A Git ref - points to a branch head, tag head or a branch name. */\n gitRef: string | null;\n /**\n * Git commit hash.\n */\n gitCommitHash: string;\n };\n\nexport const ArchiveSourceSchema = Joi.object<ArchiveSource>({\n type: Joi.string()\n .valid(...Object.values(ArchiveSourceType))\n .required(),\n})\n .when(Joi.object({ type: ArchiveSourceType.GCS }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GCS).required(),\n bucketKey: Joi.string().required(),\n metadataLocation: Joi.string(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.URL }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.URL).required(),\n url: Joi.string().uri().required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.GIT }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GIT).required(),\n repositoryUrl: Joi.string().required(),\n gitCommitHash: Joi.string().required(),\n gitRef: Joi.string().allow(null).required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.PATH }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.PATH).required(),\n path: Joi.string().required(),\n }),\n });\n\nexport const ArchiveSourceSchemaZ = z.discriminatedUnion('type', [\n z.object({\n type: z.literal(ArchiveSourceType.GIT),\n repositoryUrl: z.string().url(),\n gitRef: z.string().nullable(),\n gitCommitHash: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.PATH),\n path: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.URL),\n url: z.string().url(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.GCS),\n bucketKey: z.string(),\n metadataLocation: z.string().optional(),\n }),\n]);\n\nexport type Env = Record<string, string>;\nexport const EnvSchema = Joi.object().pattern(Joi.string(), Joi.string());\n\nexport type EnvironmentSecret = {\n name: string;\n type: EnvironmentSecretType;\n value: string;\n};\nexport enum EnvironmentSecretType {\n STRING = 'string',\n FILE = 'file',\n}\nexport const EnvironmentSecretsSchema = Joi.array().items(\n Joi.object({\n name: Joi.string().required(),\n value: Joi.string().allow('').required(),\n type: Joi.string()\n .valid(...Object.values(EnvironmentSecretType))\n .required(),\n })\n);\nexport const EnvironmentSecretZ = z.object({\n name: z.string(),\n value: z.string(),\n type: z.nativeEnum(EnvironmentSecretType),\n});\n\nexport interface Cache {\n disabled: boolean;\n clear: boolean;\n key?: string;\n /**\n * @deprecated We don't cache anything by default anymore.\n */\n cacheDefaultPaths?: boolean;\n /**\n * @deprecated We use paths now since there is no default caching anymore.\n */\n customPaths?: string[];\n paths: string[];\n}\n\nexport const CacheSchema = Joi.object({\n disabled: Joi.boolean().default(false),\n clear: Joi.boolean().default(false),\n key: Joi.string().allow('').max(128),\n cacheDefaultPaths: Joi.boolean(),\n customPaths: Joi.array().items(Joi.string()),\n paths: Joi.array().items(Joi.string()).default([]),\n});\n\nexport interface BuildPhaseStats {\n buildPhase: BuildPhase;\n result: BuildPhaseResult;\n durationMs: number;\n}\n\nexport const StaticWorkflowInterpolationContextZ = z.object({\n after: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n needs: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n github: z\n .object({\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n })\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n .optional(),\n env: z.record(z.string()),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,6BAAwB;AAGxB,iCAAuC;AAEvC,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AAC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,EAAE;aAC9B,CAAC,CAAC,QAAQ,EAAE;YACb,KAAK,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;YACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;SAC3B,CAAC;QACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;YACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;YACpC,KAAK,EAAE,aAAG,CAAC,KAAK,EAAE;iBACf,KAAK,CAAC,aAAG,CAAC,GAAG,EAAE,CAAC;iBAChB,QAAQ,EAAE;iBACV,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,oBAAa,EAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;YAC9D,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAG,CAAC,MAAM,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SACrE,CAAC;KACH,CAAC;IACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;QACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACpC,KAAK,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;KAC3B,CAAC;CACH,CAAC,CAAC","sourcesContent":["import Joi from 'joi';\nimport { z } from 'zod';\n\nimport { BuildPhase, BuildPhaseResult } from './logs';\nimport { validateSteps } from './step';\n\nexport enum BuildMode {\n BUILD = 'build',\n RESIGN = 'resign',\n CUSTOM = 'custom',\n REPACK = 'repack',\n}\n\nexport enum Workflow {\n GENERIC = 'generic',\n MANAGED = 'managed',\n UNKNOWN = 'unknown',\n}\n\nexport enum Platform {\n ANDROID = 'android',\n IOS = 'ios',\n}\n\nexport enum ArchiveSourceType {\n NONE = 'NONE',\n URL = 'URL',\n PATH = 'PATH',\n GCS = 'GCS',\n GIT = 'GIT',\n}\n\nexport enum BuildTrigger {\n EAS_CLI = 'EAS_CLI',\n GIT_BASED_INTEGRATION = 'GIT_BASED_INTEGRATION',\n}\n\nexport type ArchiveSource =\n | { type: ArchiveSourceType.NONE }\n | { type: ArchiveSourceType.GCS; bucketKey: string; metadataLocation?: string }\n | { type: ArchiveSourceType.URL; url: string }\n | { type: ArchiveSourceType.PATH; path: string }\n | {\n type: ArchiveSourceType.GIT;\n /**\n * Url that can be used to clone repository.\n * It should contain embedded credentials for private registries.\n */\n repositoryUrl: string;\n /** A Git ref - points to a branch head, tag head or a branch name. */\n gitRef: string | null;\n /**\n * Git commit hash.\n */\n gitCommitHash: string;\n };\n\nexport const ArchiveSourceSchema = Joi.object<ArchiveSource>({\n type: Joi.string()\n .valid(...Object.values(ArchiveSourceType))\n .required(),\n})\n .when(Joi.object({ type: ArchiveSourceType.GCS }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GCS).required(),\n bucketKey: Joi.string().required(),\n metadataLocation: Joi.string(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.URL }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.URL).required(),\n url: Joi.string().uri().required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.GIT }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GIT).required(),\n repositoryUrl: Joi.string().required(),\n gitCommitHash: Joi.string().required(),\n gitRef: Joi.string().allow(null).required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.PATH }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.PATH).required(),\n path: Joi.string().required(),\n }),\n });\n\nexport const ArchiveSourceSchemaZ = z.discriminatedUnion('type', [\n z.object({\n type: z.literal(ArchiveSourceType.GIT),\n repositoryUrl: z.string().url(),\n gitRef: z.string().nullable(),\n gitCommitHash: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.PATH),\n path: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.URL),\n url: z.string().url(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.GCS),\n bucketKey: z.string(),\n metadataLocation: z.string().optional(),\n }),\n]);\n\nexport type Env = Record<string, string>;\nexport const EnvSchema = Joi.object().pattern(Joi.string(), Joi.string());\n\nexport type EnvironmentSecret = {\n name: string;\n type: EnvironmentSecretType;\n value: string;\n};\nexport enum EnvironmentSecretType {\n STRING = 'string',\n FILE = 'file',\n}\nexport const EnvironmentSecretsSchema = Joi.array().items(\n Joi.object({\n name: Joi.string().required(),\n value: Joi.string().allow('').required(),\n type: Joi.string()\n .valid(...Object.values(EnvironmentSecretType))\n .required(),\n })\n);\nexport const EnvironmentSecretZ = z.object({\n name: z.string(),\n value: z.string(),\n type: z.nativeEnum(EnvironmentSecretType),\n});\n\nexport interface Cache {\n disabled: boolean;\n clear: boolean;\n key?: string;\n /**\n * @deprecated We don't cache anything by default anymore.\n */\n cacheDefaultPaths?: boolean;\n /**\n * @deprecated We use paths now since there is no default caching anymore.\n */\n customPaths?: string[];\n paths: string[];\n}\n\nexport const CacheSchema = Joi.object({\n disabled: Joi.boolean().default(false),\n clear: Joi.boolean().default(false),\n key: Joi.string().allow('').max(128),\n cacheDefaultPaths: Joi.boolean(),\n customPaths: Joi.array().items(Joi.string()),\n paths: Joi.array().items(Joi.string()).default([]),\n});\n\nexport interface BuildPhaseStats {\n buildPhase: BuildPhase;\n result: BuildPhaseResult;\n durationMs: number;\n}\n\nexport const StaticWorkflowInterpolationContextZ = z.object({\n after: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n needs: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n github: z\n .object({\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n })\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n .optional(),\n env: z.record(z.string()),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n\nexport const CustomBuildConfigSchema = Joi.object().when('.mode', {\n is: BuildMode.CUSTOM,\n then: Joi.object().when('.customBuildConfig.path', {\n is: Joi.exist(),\n then: Joi.object({\n customBuildConfig: Joi.object({\n path: Joi.string().required(),\n }).required(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.array()\n .items(Joi.any())\n .required()\n .custom((steps) => validateSteps(steps), 'steps validation'),\n outputs: Joi.object().pattern(Joi.string(), Joi.string()).required(),\n }),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n});\n"]}
|