@expo/eas-build-job 1.0.239 → 1.0.243
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/common.d.ts +5 -0
- package/dist/common.js +44 -39
- package/dist/common.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/common.d.ts
CHANGED
|
@@ -175,6 +175,11 @@ export type DynamicInterpolationContext = {
|
|
|
175
175
|
startsWith: (value: string, prefix: string) => boolean;
|
|
176
176
|
endsWith: (value: string, suffix: string) => boolean;
|
|
177
177
|
hashFiles: (...globs: string[]) => string;
|
|
178
|
+
replaceAll: (input: string, stringToReplace: string, replacementString: string) => string;
|
|
178
179
|
};
|
|
179
180
|
export type WorkflowInterpolationContext = StaticWorkflowInterpolationContext & DynamicInterpolationContext;
|
|
180
181
|
export declare const CustomBuildConfigSchema: Joi.ObjectSchema<any>;
|
|
182
|
+
export declare enum EasCliNpmTags {
|
|
183
|
+
STAGING = "latest-eas-build-staging",
|
|
184
|
+
PRODUCTION = "latest-eas-build"
|
|
185
|
+
}
|
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.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;
|
|
6
|
+
exports.EasCliNpmTags = 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
9
|
const step_1 = require("./step");
|
|
@@ -121,6 +121,41 @@ exports.CacheSchema = joi_1.default.object({
|
|
|
121
121
|
customPaths: joi_1.default.array().items(joi_1.default.string()),
|
|
122
122
|
paths: joi_1.default.array().items(joi_1.default.string()).default([]),
|
|
123
123
|
});
|
|
124
|
+
const GitHubContextZ = zod_1.z.object({
|
|
125
|
+
triggering_actor: zod_1.z.string().optional(),
|
|
126
|
+
event_name: zod_1.z.enum(['push', 'pull_request', 'workflow_dispatch', 'schedule']),
|
|
127
|
+
sha: zod_1.z.string(),
|
|
128
|
+
ref: zod_1.z.string(),
|
|
129
|
+
ref_name: zod_1.z.string(),
|
|
130
|
+
ref_type: zod_1.z.string(),
|
|
131
|
+
commit_message: zod_1.z.string().optional(),
|
|
132
|
+
label: zod_1.z.string().optional(),
|
|
133
|
+
repository: zod_1.z.string().optional(),
|
|
134
|
+
repository_owner: zod_1.z.string().optional(),
|
|
135
|
+
event: zod_1.z
|
|
136
|
+
.object({
|
|
137
|
+
label: zod_1.z
|
|
138
|
+
.object({
|
|
139
|
+
name: zod_1.z.string(),
|
|
140
|
+
})
|
|
141
|
+
.optional(),
|
|
142
|
+
head_commit: zod_1.z
|
|
143
|
+
.object({
|
|
144
|
+
message: zod_1.z.string(),
|
|
145
|
+
id: zod_1.z.string(),
|
|
146
|
+
})
|
|
147
|
+
.optional(),
|
|
148
|
+
pull_request: zod_1.z
|
|
149
|
+
.object({
|
|
150
|
+
number: zod_1.z.number(),
|
|
151
|
+
})
|
|
152
|
+
.optional(),
|
|
153
|
+
number: zod_1.z.number().optional(),
|
|
154
|
+
schedule: zod_1.z.string().optional(),
|
|
155
|
+
inputs: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()])).optional(),
|
|
156
|
+
})
|
|
157
|
+
.optional(),
|
|
158
|
+
});
|
|
124
159
|
exports.StaticWorkflowInterpolationContextZ = zod_1.z.object({
|
|
125
160
|
after: zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
126
161
|
status: zod_1.z.string(),
|
|
@@ -131,44 +166,9 @@ exports.StaticWorkflowInterpolationContextZ = zod_1.z.object({
|
|
|
131
166
|
outputs: zod_1.z.record(zod_1.z.string(), zod_1.z.string().nullable()),
|
|
132
167
|
})),
|
|
133
168
|
inputs: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()])).optional(),
|
|
134
|
-
github:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
event_name: zod_1.z.enum(['push', 'pull_request', 'workflow_dispatch', 'schedule']),
|
|
138
|
-
sha: zod_1.z.string(),
|
|
139
|
-
ref: zod_1.z.string(),
|
|
140
|
-
ref_name: zod_1.z.string(),
|
|
141
|
-
ref_type: zod_1.z.string(),
|
|
142
|
-
commit_message: zod_1.z.string().optional(),
|
|
143
|
-
label: zod_1.z.string().optional(),
|
|
144
|
-
repository: zod_1.z.string().optional(),
|
|
145
|
-
repository_owner: zod_1.z.string().optional(),
|
|
146
|
-
event: zod_1.z
|
|
147
|
-
.object({
|
|
148
|
-
label: zod_1.z
|
|
149
|
-
.object({
|
|
150
|
-
name: zod_1.z.string(),
|
|
151
|
-
})
|
|
152
|
-
.optional(),
|
|
153
|
-
head_commit: zod_1.z
|
|
154
|
-
.object({
|
|
155
|
-
message: zod_1.z.string(),
|
|
156
|
-
id: zod_1.z.string(),
|
|
157
|
-
})
|
|
158
|
-
.optional(),
|
|
159
|
-
pull_request: zod_1.z
|
|
160
|
-
.object({
|
|
161
|
-
number: zod_1.z.number(),
|
|
162
|
-
})
|
|
163
|
-
.optional(),
|
|
164
|
-
number: zod_1.z.number().optional(),
|
|
165
|
-
schedule: zod_1.z.string().optional(),
|
|
166
|
-
inputs: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()])).optional(),
|
|
167
|
-
})
|
|
168
|
-
.optional(),
|
|
169
|
-
})
|
|
170
|
-
// We need to .optional() to support jobs that are not triggered by a GitHub event.
|
|
171
|
-
.optional(),
|
|
169
|
+
github:
|
|
170
|
+
// We need to .optional() to support jobs that are not triggered by a GitHub event.
|
|
171
|
+
GitHubContextZ.optional(),
|
|
172
172
|
workflow: zod_1.z
|
|
173
173
|
.object({
|
|
174
174
|
id: zod_1.z.string(),
|
|
@@ -204,4 +204,9 @@ exports.CustomBuildConfigSchema = joi_1.default.object().when('.mode', {
|
|
|
204
204
|
outputs: joi_1.default.any().strip(),
|
|
205
205
|
}),
|
|
206
206
|
});
|
|
207
|
+
var EasCliNpmTags;
|
|
208
|
+
(function (EasCliNpmTags) {
|
|
209
|
+
EasCliNpmTags["STAGING"] = "latest-eas-build-staging";
|
|
210
|
+
EasCliNpmTags["PRODUCTION"] = "latest-eas-build";
|
|
211
|
+
})(EasCliNpmTags || (exports.EasCliNpmTags = EasCliNpmTags = {}));
|
|
207
212
|
//# 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;AAGxB,iCAAuC;AAEvC,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,+BAAm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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 R2 = 'R2',\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.R2; bucketKey: 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 z.object({\n type: z.literal(ArchiveSourceType.NONE),\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 inputs: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),\n github: z\n .object({\n triggering_actor: z.string().optional(),\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch', 'schedule']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n commit_message: z.string().optional(),\n label: z.string().optional(),\n repository: z.string().optional(),\n repository_owner: z.string().optional(),\n event: z\n .object({\n label: z\n .object({\n name: z.string(),\n })\n .optional(),\n head_commit: z\n .object({\n message: z.string(),\n id: z.string(),\n })\n .optional(),\n pull_request: z\n .object({\n number: z.number(),\n })\n .optional(),\n number: z.number().optional(),\n schedule: z.string().optional(),\n inputs: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),\n })\n .optional(),\n })\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n .optional(),\n workflow: z\n .object({\n id: z.string(),\n name: z.string(),\n filename: z.string(),\n url: z.string().url(),\n })\n .passthrough(),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n env: Record<string, string | undefined>;\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n contains: (value: string, substring: string) => boolean;\n startsWith: (value: string, prefix: string) => boolean;\n endsWith: (value: string, suffix: string) => boolean;\n hashFiles: (...globs: string[]) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n\nexport const CustomBuildConfigSchema = Joi.object().when('.mode', {\n is: [BuildMode.CUSTOM, BuildMode.REPACK],\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"]}
|
|
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;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,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,8BAAS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AC5B,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,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;AAEH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,qDAAoC,CAAA;IACpC,gDAA+B,CAAA;AACjC,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB","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 R2 = 'R2',\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.R2; bucketKey: 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 z.object({\n type: z.literal(ArchiveSourceType.NONE),\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\nconst GitHubContextZ = z.object({\n triggering_actor: z.string().optional(),\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch', 'schedule']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n commit_message: z.string().optional(),\n label: z.string().optional(),\n repository: z.string().optional(),\n repository_owner: z.string().optional(),\n event: z\n .object({\n label: z\n .object({\n name: z.string(),\n })\n .optional(),\n head_commit: z\n .object({\n message: z.string(),\n id: z.string(),\n })\n .optional(),\n pull_request: z\n .object({\n number: z.number(),\n })\n .optional(),\n number: z.number().optional(),\n schedule: z.string().optional(),\n inputs: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),\n })\n .optional(),\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 inputs: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),\n github:\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n GitHubContextZ.optional(),\n workflow: z\n .object({\n id: z.string(),\n name: z.string(),\n filename: z.string(),\n url: z.string().url(),\n })\n .passthrough(),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n env: Record<string, string | undefined>;\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n contains: (value: string, substring: string) => boolean;\n startsWith: (value: string, prefix: string) => boolean;\n endsWith: (value: string, suffix: string) => boolean;\n hashFiles: (...globs: string[]) => string;\n replaceAll: (input: string, stringToReplace: string, replacementString: string) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n\nexport const CustomBuildConfigSchema = Joi.object().when('.mode', {\n is: [BuildMode.CUSTOM, BuildMode.REPACK],\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\nexport enum EasCliNpmTags {\n STAGING = 'latest-eas-build-staging',\n PRODUCTION = 'latest-eas-build',\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as Android from './android';
|
|
2
2
|
export * as Ios from './ios';
|
|
3
|
-
export { ArchiveSourceType, ArchiveSource, ArchiveSourceSchemaZ, BuildMode, BuildPhaseStats, BuildTrigger, Env, EnvironmentSecret, EnvironmentSecretType, Workflow, Platform, Cache, WorkflowInterpolationContext, } from './common';
|
|
3
|
+
export { ArchiveSourceType, ArchiveSource, ArchiveSourceSchemaZ, BuildMode, BuildPhaseStats, BuildTrigger, EasCliNpmTags, Env, EnvironmentSecret, EnvironmentSecretType, Workflow, Platform, Cache, WorkflowInterpolationContext, } from './common';
|
|
4
4
|
export { Metadata, sanitizeMetadata } from './metadata';
|
|
5
5
|
export * from './job';
|
|
6
6
|
export * from './logs';
|
|
@@ -10,3 +10,5 @@ export * from './context';
|
|
|
10
10
|
export * from './generic';
|
|
11
11
|
export * from './step';
|
|
12
12
|
export * from './submission-config';
|
|
13
|
+
declare const version: any;
|
|
14
|
+
export { version };
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.errors = exports.sanitizeMetadata = exports.Platform = exports.Workflow = exports.EnvironmentSecretType = exports.BuildTrigger = exports.BuildMode = exports.ArchiveSourceSchemaZ = exports.ArchiveSourceType = exports.Ios = exports.Android = void 0;
|
|
29
|
+
exports.version = exports.errors = exports.sanitizeMetadata = exports.Platform = exports.Workflow = exports.EnvironmentSecretType = exports.EasCliNpmTags = exports.BuildTrigger = exports.BuildMode = exports.ArchiveSourceSchemaZ = exports.ArchiveSourceType = exports.Ios = exports.Android = void 0;
|
|
30
30
|
exports.Android = __importStar(require("./android"));
|
|
31
31
|
exports.Ios = __importStar(require("./ios"));
|
|
32
32
|
var common_1 = require("./common");
|
|
@@ -34,6 +34,7 @@ Object.defineProperty(exports, "ArchiveSourceType", { enumerable: true, get: fun
|
|
|
34
34
|
Object.defineProperty(exports, "ArchiveSourceSchemaZ", { enumerable: true, get: function () { return common_1.ArchiveSourceSchemaZ; } });
|
|
35
35
|
Object.defineProperty(exports, "BuildMode", { enumerable: true, get: function () { return common_1.BuildMode; } });
|
|
36
36
|
Object.defineProperty(exports, "BuildTrigger", { enumerable: true, get: function () { return common_1.BuildTrigger; } });
|
|
37
|
+
Object.defineProperty(exports, "EasCliNpmTags", { enumerable: true, get: function () { return common_1.EasCliNpmTags; } });
|
|
37
38
|
Object.defineProperty(exports, "EnvironmentSecretType", { enumerable: true, get: function () { return common_1.EnvironmentSecretType; } });
|
|
38
39
|
Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return common_1.Workflow; } });
|
|
39
40
|
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return common_1.Platform; } });
|
|
@@ -47,4 +48,6 @@ __exportStar(require("./context"), exports);
|
|
|
47
48
|
__exportStar(require("./generic"), exports);
|
|
48
49
|
__exportStar(require("./step"), exports);
|
|
49
50
|
__exportStar(require("./submission-config"), exports);
|
|
51
|
+
const version = require('../package.json').version;
|
|
52
|
+
exports.version = version;
|
|
50
53
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqC;AACrC,6CAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqC;AACrC,6CAA6B;AAC7B,mCAekB;AAdhB,2GAAA,iBAAiB,OAAA;AAEjB,8GAAA,oBAAoB,OAAA;AACpB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AACZ,uGAAA,aAAa,OAAA;AAGb,+GAAA,qBAAqB,OAAA;AACrB,kGAAA,QAAQ,OAAA;AACR,kGAAA,QAAQ,OAAA;AAIV,uCAAwD;AAArC,4GAAA,gBAAgB,OAAA;AACnC,wCAAsB;AACtB,yCAAuB;AACvB,mDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,yCAAuB;AACvB,sDAAoC;AAEpC,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAC1C,0BAAO","sourcesContent":["export * as Android from './android';\nexport * as Ios from './ios';\nexport {\n ArchiveSourceType,\n ArchiveSource,\n ArchiveSourceSchemaZ,\n BuildMode,\n BuildPhaseStats,\n BuildTrigger,\n EasCliNpmTags,\n Env,\n EnvironmentSecret,\n EnvironmentSecretType,\n Workflow,\n Platform,\n Cache,\n WorkflowInterpolationContext,\n} from './common';\nexport { Metadata, sanitizeMetadata } from './metadata';\nexport * from './job';\nexport * from './logs';\nexport * as errors from './errors';\nexport * from './artifacts';\nexport * from './context';\nexport * from './generic';\nexport * from './step';\nexport * from './submission-config';\n\nconst version = require('../package.json').version;\nexport { version };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/eas-build-job",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.243",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"node": "20.14.0",
|
|
36
36
|
"yarn": "1.22.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "bfc854a69575fd73ac7b8f056a5f18d4e70b505f"
|
|
39
39
|
}
|