@expo/eas-build-job 1.0.117 → 1.0.126
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/LICENSE +1 -1
- package/dist/generic.d.ts +105 -0
- package/dist/generic.js +2 -0
- package/dist/generic.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +19 -0
- package/dist/metadata.js +31 -1
- package/dist/metadata.js.map +1 -1
- package/dist/step.d.ts +365 -0
- package/dist/step.js +100 -0
- package/dist/step.js.map +1 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -12,7 +12,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that you d
|
|
|
12
12
|
to access the functionality of and directly benefit from the
|
|
13
13
|
functionality of the Licensed Work.
|
|
14
14
|
|
|
15
|
-
Change Date: 2027-
|
|
15
|
+
Change Date: 2027-07-01
|
|
16
16
|
|
|
17
17
|
Change License: MIT
|
|
18
18
|
|
package/dist/generic.d.ts
CHANGED
|
@@ -57,6 +57,69 @@ export declare namespace Generic {
|
|
|
57
57
|
}, {
|
|
58
58
|
path: string;
|
|
59
59
|
}>;
|
|
60
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
61
|
+
id: z.ZodOptional<z.ZodString>;
|
|
62
|
+
if: z.ZodOptional<z.ZodString>;
|
|
63
|
+
name: z.ZodOptional<z.ZodString>;
|
|
64
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
65
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
66
|
+
}, {
|
|
67
|
+
run: z.ZodString;
|
|
68
|
+
shell: z.ZodOptional<z.ZodString>;
|
|
69
|
+
uses: z.ZodOptional<z.ZodNever>;
|
|
70
|
+
with: z.ZodOptional<z.ZodNever>;
|
|
71
|
+
}>, "strip", z.ZodTypeAny, {
|
|
72
|
+
run: string;
|
|
73
|
+
name?: string | undefined;
|
|
74
|
+
env?: Record<string, string> | undefined;
|
|
75
|
+
id?: string | undefined;
|
|
76
|
+
if?: string | undefined;
|
|
77
|
+
working_directory?: string | undefined;
|
|
78
|
+
uses?: undefined;
|
|
79
|
+
with?: undefined;
|
|
80
|
+
shell?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
run: string;
|
|
83
|
+
name?: string | undefined;
|
|
84
|
+
env?: Record<string, string> | undefined;
|
|
85
|
+
id?: string | undefined;
|
|
86
|
+
if?: string | undefined;
|
|
87
|
+
working_directory?: string | undefined;
|
|
88
|
+
uses?: undefined;
|
|
89
|
+
with?: undefined;
|
|
90
|
+
shell?: string | undefined;
|
|
91
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
92
|
+
id: z.ZodOptional<z.ZodString>;
|
|
93
|
+
if: z.ZodOptional<z.ZodString>;
|
|
94
|
+
name: z.ZodOptional<z.ZodString>;
|
|
95
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
96
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
97
|
+
}, {
|
|
98
|
+
uses: z.ZodString;
|
|
99
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
100
|
+
run: z.ZodOptional<z.ZodNever>;
|
|
101
|
+
shell: z.ZodOptional<z.ZodNever>;
|
|
102
|
+
}>, "strip", z.ZodTypeAny, {
|
|
103
|
+
uses: string;
|
|
104
|
+
name?: string | undefined;
|
|
105
|
+
env?: Record<string, string> | undefined;
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
if?: string | undefined;
|
|
108
|
+
working_directory?: string | undefined;
|
|
109
|
+
with?: Record<string, unknown> | undefined;
|
|
110
|
+
run?: undefined;
|
|
111
|
+
shell?: undefined;
|
|
112
|
+
}, {
|
|
113
|
+
uses: string;
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
env?: Record<string, string> | undefined;
|
|
116
|
+
id?: string | undefined;
|
|
117
|
+
if?: string | undefined;
|
|
118
|
+
working_directory?: string | undefined;
|
|
119
|
+
with?: Record<string, unknown> | undefined;
|
|
120
|
+
run?: undefined;
|
|
121
|
+
shell?: undefined;
|
|
122
|
+
}>]>, "many">>;
|
|
60
123
|
secrets: z.ZodObject<{
|
|
61
124
|
robotAccessToken: z.ZodString;
|
|
62
125
|
environmentSecrets: z.ZodArray<z.ZodObject<{
|
|
@@ -171,6 +234,27 @@ export declare namespace Generic {
|
|
|
171
234
|
type?: undefined;
|
|
172
235
|
platform?: undefined;
|
|
173
236
|
loggerLevel?: LoggerLevel | undefined;
|
|
237
|
+
steps?: ({
|
|
238
|
+
uses: string;
|
|
239
|
+
name?: string | undefined;
|
|
240
|
+
env?: Record<string, string> | undefined;
|
|
241
|
+
id?: string | undefined;
|
|
242
|
+
if?: string | undefined;
|
|
243
|
+
working_directory?: string | undefined;
|
|
244
|
+
with?: Record<string, unknown> | undefined;
|
|
245
|
+
run?: undefined;
|
|
246
|
+
shell?: undefined;
|
|
247
|
+
} | {
|
|
248
|
+
run: string;
|
|
249
|
+
name?: string | undefined;
|
|
250
|
+
env?: Record<string, string> | undefined;
|
|
251
|
+
id?: string | undefined;
|
|
252
|
+
if?: string | undefined;
|
|
253
|
+
working_directory?: string | undefined;
|
|
254
|
+
uses?: undefined;
|
|
255
|
+
with?: undefined;
|
|
256
|
+
shell?: string | undefined;
|
|
257
|
+
})[] | undefined;
|
|
174
258
|
}, {
|
|
175
259
|
builderEnvironment: {
|
|
176
260
|
env: Record<string, string>;
|
|
@@ -216,5 +300,26 @@ export declare namespace Generic {
|
|
|
216
300
|
type?: undefined;
|
|
217
301
|
platform?: undefined;
|
|
218
302
|
loggerLevel?: LoggerLevel | undefined;
|
|
303
|
+
steps?: ({
|
|
304
|
+
uses: string;
|
|
305
|
+
name?: string | undefined;
|
|
306
|
+
env?: Record<string, string> | undefined;
|
|
307
|
+
id?: string | undefined;
|
|
308
|
+
if?: string | undefined;
|
|
309
|
+
working_directory?: string | undefined;
|
|
310
|
+
with?: Record<string, unknown> | undefined;
|
|
311
|
+
run?: undefined;
|
|
312
|
+
shell?: undefined;
|
|
313
|
+
} | {
|
|
314
|
+
run: string;
|
|
315
|
+
name?: string | undefined;
|
|
316
|
+
env?: Record<string, string> | undefined;
|
|
317
|
+
id?: string | undefined;
|
|
318
|
+
if?: string | undefined;
|
|
319
|
+
working_directory?: string | undefined;
|
|
320
|
+
uses?: undefined;
|
|
321
|
+
with?: undefined;
|
|
322
|
+
shell?: string | undefined;
|
|
323
|
+
})[] | undefined;
|
|
219
324
|
}>;
|
|
220
325
|
}
|
package/dist/generic.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.Generic = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const logger_1 = require("@expo/logger");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
+
const step_1 = require("./step");
|
|
7
8
|
var Generic;
|
|
8
9
|
(function (Generic) {
|
|
9
10
|
const BuilderEnvironmentSchemaZ = zod_1.z.object({
|
|
@@ -25,6 +26,7 @@ var Generic;
|
|
|
25
26
|
customBuildConfig: zod_1.z.object({
|
|
26
27
|
path: zod_1.z.string(),
|
|
27
28
|
}),
|
|
29
|
+
steps: zod_1.z.array(step_1.StepZ).optional(),
|
|
28
30
|
secrets: zod_1.z.object({
|
|
29
31
|
robotAccessToken: zod_1.z.string(),
|
|
30
32
|
environmentSecrets: zod_1.z.array(common_1.EnvironmentSecretZ),
|
package/dist/generic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;
|
|
1
|
+
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;AAClF,iCAA+B;AA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AE,yBAAyB;QAC7C,uEAAuE;QACvE,QAAQ,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC1B,WAAW,EAAE,OAAC,CAAC,OAAO,CAAC,qBAAY,CAAC,qBAAqB,CAAC;QAC1D,WAAW,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAW,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAC;AACL,CAAC,EAnCgB,OAAO,uBAAP,OAAO,QAmCvB","sourcesContent":["import { z } from 'zod';\nimport { LoggerLevel } from '@expo/logger';\n\nimport { ArchiveSourceSchemaZ, BuildTrigger, EnvironmentSecretZ } from './common';\nimport { StepZ } from './step';\n\nexport namespace Generic {\n const BuilderEnvironmentSchemaZ = z.object({\n image: z.string(),\n node: z.string().optional(),\n yarn: z.string().optional(),\n pnpm: z.string().optional(),\n bun: z.string().optional(),\n env: z.record(z.string()),\n // Linux\n ndk: z.string().optional(),\n // macOS\n bundler: z.string().optional(),\n fastlane: z.string().optional(),\n cocoapods: z.string().optional(),\n });\n\n export type Job = z.infer<typeof JobZ>;\n export const JobZ = z.object({\n projectArchive: ArchiveSourceSchemaZ,\n customBuildConfig: z.object({\n path: z.string(),\n }),\n steps: z.array(StepZ).optional(),\n secrets: z.object({\n robotAccessToken: z.string(),\n environmentSecrets: z.array(EnvironmentSecretZ),\n }),\n expoDevUrl: z.string().url(),\n builderEnvironment: BuilderEnvironmentSchemaZ,\n // We use this to discern between Android.Job, Ios.Job and Generic.Job.\n platform: z.never().optional(),\n type: z.never().optional(),\n triggeredBy: z.literal(BuildTrigger.GIT_BASED_INTEGRATION),\n loggerLevel: z.nativeEnum(LoggerLevel).optional(),\n });\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export * as Android from './android';
|
|
2
2
|
export * as Ios from './ios';
|
|
3
3
|
export { ArchiveSourceType, ArchiveSource, BuildMode, BuildPhaseStats, BuildTrigger, Env, EnvironmentSecret, EnvironmentSecretType, Workflow, Platform, Cache, } from './common';
|
|
4
|
-
export { Metadata, sanitizeMetadata } from './metadata';
|
|
4
|
+
export { Metadata, sanitizeMetadata, FingerprintSource, FingerprintSourceType } from './metadata';
|
|
5
5
|
export * from './job';
|
|
6
6
|
export * from './logs';
|
|
7
7
|
export * as errors from './errors';
|
|
8
8
|
export * from './artifacts';
|
|
9
9
|
export * from './context';
|
|
10
10
|
export * from './generic';
|
|
11
|
+
export * from './step';
|
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.ArchiveSourceType = exports.Ios = exports.Android = void 0;
|
|
29
|
+
exports.errors = exports.FingerprintSourceType = exports.sanitizeMetadata = exports.Platform = exports.Workflow = exports.EnvironmentSecretType = exports.BuildTrigger = exports.BuildMode = 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");
|
|
@@ -38,10 +38,12 @@ Object.defineProperty(exports, "Workflow", { enumerable: true, get: function ()
|
|
|
38
38
|
Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return common_1.Platform; } });
|
|
39
39
|
var metadata_1 = require("./metadata");
|
|
40
40
|
Object.defineProperty(exports, "sanitizeMetadata", { enumerable: true, get: function () { return metadata_1.sanitizeMetadata; } });
|
|
41
|
+
Object.defineProperty(exports, "FingerprintSourceType", { enumerable: true, get: function () { return metadata_1.FingerprintSourceType; } });
|
|
41
42
|
__exportStar(require("./job"), exports);
|
|
42
43
|
__exportStar(require("./logs"), exports);
|
|
43
44
|
exports.errors = __importStar(require("./errors"));
|
|
44
45
|
__exportStar(require("./artifacts"), exports);
|
|
45
46
|
__exportStar(require("./context"), exports);
|
|
46
47
|
__exportStar(require("./generic"), exports);
|
|
48
|
+
__exportStar(require("./step"), exports);
|
|
47
49
|
//# 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,mCAYkB;AAXhB,2GAAA,iBAAiB,OAAA;AAEjB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AAGZ,+GAAA,qBAAqB,OAAA;AACrB,kGAAA,QAAQ,OAAA;AACR,kGAAA,QAAQ,OAAA;AAGV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqC;AACrC,6CAA6B;AAC7B,mCAYkB;AAXhB,2GAAA,iBAAiB,OAAA;AAEjB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AAGZ,+GAAA,qBAAqB,OAAA;AACrB,kGAAA,QAAQ,OAAA;AACR,kGAAA,QAAQ,OAAA;AAGV,uCAAkG;AAA/E,4GAAA,gBAAgB,OAAA;AAAqB,iHAAA,qBAAqB,OAAA;AAC7E,wCAAsB;AACtB,yCAAuB;AACvB,mDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,yCAAuB","sourcesContent":["export * as Android from './android';\nexport * as Ios from './ios';\nexport {\n ArchiveSourceType,\n ArchiveSource,\n BuildMode,\n BuildPhaseStats,\n BuildTrigger,\n Env,\n EnvironmentSecret,\n EnvironmentSecretType,\n Workflow,\n Platform,\n Cache,\n} from './common';\nexport { Metadata, sanitizeMetadata, FingerprintSource, FingerprintSourceType } 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';\n"]}
|
package/dist/metadata.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { Workflow } from './common';
|
|
3
|
+
export declare enum FingerprintSourceType {
|
|
4
|
+
'GCS' = "GCS",
|
|
5
|
+
'PATH' = "PATH",
|
|
6
|
+
'URL' = "URL"
|
|
7
|
+
}
|
|
8
|
+
export type FingerprintSource = {
|
|
9
|
+
type: FingerprintSourceType.GCS;
|
|
10
|
+
bucketKey: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: FingerprintSourceType.PATH;
|
|
13
|
+
path: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: FingerprintSourceType.URL;
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
3
18
|
export type Metadata = {
|
|
4
19
|
/**
|
|
5
20
|
* Tracking context
|
|
@@ -44,6 +59,10 @@ export type Metadata = {
|
|
|
44
59
|
* Runtime version (for Expo Updates)
|
|
45
60
|
*/
|
|
46
61
|
runtimeVersion?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The location of the fingerprint file if one exists
|
|
64
|
+
*/
|
|
65
|
+
fingerprintSource?: FingerprintSource;
|
|
47
66
|
/**
|
|
48
67
|
* Version of the react-native package used in the project.
|
|
49
68
|
*/
|
package/dist/metadata.js
CHANGED
|
@@ -3,8 +3,37 @@ 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.sanitizeMetadata = exports.MetadataSchema = void 0;
|
|
6
|
+
exports.sanitizeMetadata = exports.MetadataSchema = exports.FingerprintSourceType = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
var FingerprintSourceType;
|
|
9
|
+
(function (FingerprintSourceType) {
|
|
10
|
+
FingerprintSourceType["GCS"] = "GCS";
|
|
11
|
+
FingerprintSourceType["PATH"] = "PATH";
|
|
12
|
+
FingerprintSourceType["URL"] = "URL";
|
|
13
|
+
})(FingerprintSourceType || (exports.FingerprintSourceType = FingerprintSourceType = {}));
|
|
14
|
+
const FingerprintSourceSchema = joi_1.default.object({
|
|
15
|
+
type: joi_1.default.string()
|
|
16
|
+
.valid(...Object.values(FingerprintSourceType))
|
|
17
|
+
.required(),
|
|
18
|
+
})
|
|
19
|
+
.when(joi_1.default.object({ type: FingerprintSourceType.GCS }).unknown(), {
|
|
20
|
+
then: joi_1.default.object({
|
|
21
|
+
type: joi_1.default.string().valid(FingerprintSourceType.GCS).required(),
|
|
22
|
+
bucketKey: joi_1.default.string().required(),
|
|
23
|
+
}),
|
|
24
|
+
})
|
|
25
|
+
.when(joi_1.default.object({ type: FingerprintSourceType.PATH }).unknown(), {
|
|
26
|
+
then: joi_1.default.object({
|
|
27
|
+
type: joi_1.default.string().valid(FingerprintSourceType.PATH).required(),
|
|
28
|
+
path: joi_1.default.string().required(),
|
|
29
|
+
}),
|
|
30
|
+
})
|
|
31
|
+
.when(joi_1.default.object({ type: FingerprintSourceType.URL }).unknown(), {
|
|
32
|
+
then: joi_1.default.object({
|
|
33
|
+
type: joi_1.default.string().valid(FingerprintSourceType.URL).required(),
|
|
34
|
+
url: joi_1.default.string().uri().required(),
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
8
37
|
exports.MetadataSchema = joi_1.default.object({
|
|
9
38
|
trackingContext: joi_1.default.object()
|
|
10
39
|
.pattern(joi_1.default.string(), [joi_1.default.string(), joi_1.default.number(), joi_1.default.boolean()])
|
|
@@ -17,6 +46,7 @@ exports.MetadataSchema = joi_1.default.object({
|
|
|
17
46
|
credentialsSource: joi_1.default.string().valid('local', 'remote'),
|
|
18
47
|
sdkVersion: joi_1.default.string(),
|
|
19
48
|
runtimeVersion: joi_1.default.string(),
|
|
49
|
+
fingerprintSource: FingerprintSourceSchema,
|
|
20
50
|
reactNativeVersion: joi_1.default.string(),
|
|
21
51
|
channel: joi_1.default.string(),
|
|
22
52
|
appName: joi_1.default.string(),
|
package/dist/metadata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAItB,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,oCAAa,CAAA;IACb,sCAAe,CAAA;IACf,oCAAa,CAAA;AACf,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AA2KD,MAAM,uBAAuB,GAAG,aAAG,CAAC,MAAM,CAAoB;IAC5D,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE;SACf,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;SAC9C,QAAQ,EAAE;CACd,CAAC;KACC,IAAI,CAAC,aAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE;IAC/D,IAAI,EAAE,aAAG,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QAC9D,SAAS,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC;CACH,CAAC;KACD,IAAI,CAAC,aAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,qB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AC,MAAM,EAAE;CAChC,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAAC,QAAgB;IAC/C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,sBAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACzD,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IACH,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,KAAK,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAXD,4CAWC","sourcesContent":["import Joi from 'joi';\n\nimport { Workflow } from './common';\n\nexport enum FingerprintSourceType {\n 'GCS' = 'GCS',\n 'PATH' = 'PATH',\n 'URL' = 'URL',\n}\n\nexport type FingerprintSource =\n | { type: FingerprintSourceType.GCS; bucketKey: string }\n | { type: FingerprintSourceType.PATH; path: string }\n | { type: FingerprintSourceType.URL; url: string };\n\nexport type Metadata = {\n /**\n * Tracking context\n * It's used to track build process across different Expo services and tools.\n */\n trackingContext: Record<string, string | number | boolean>;\n\n /**\n * Application version:\n * - managed projects: expo.version in app.json/app.config.js\n * - generic projects:\n * * iOS: CFBundleShortVersionString in Info.plist\n * * Android: versionName in build.gradle\n */\n appVersion?: string;\n\n /**\n * Application build version:\n * - Android: version code\n * - iOS: build number\n */\n appBuildVersion?: string;\n\n /**\n * EAS CLI version\n */\n cliVersion?: string;\n\n /**\n * Build workflow\n * It's either 'generic' or 'managed'\n */\n workflow?: Workflow;\n\n /**\n * Credentials source\n * Credentials could be obtained either from credential.json or EAS servers.\n */\n credentialsSource?: 'local' | 'remote';\n\n /**\n * Expo SDK version\n * It's determined by the expo package version in package.json.\n * It's undefined if the expo package is not installed for the project.\n */\n sdkVersion?: string;\n\n /**\n * Runtime version (for Expo Updates)\n */\n runtimeVersion?: string;\n\n /**\n * The location of the fingerprint file if one exists\n */\n fingerprintSource?: FingerprintSource;\n\n /**\n * Version of the react-native package used in the project.\n */\n reactNativeVersion?: string;\n\n /**\n * Channel (for Expo Updates when it is configured for for use with EAS)\n * It's undefined if the expo-updates package is not configured for use with EAS.\n */\n channel?: string;\n\n /**\n * Distribution type\n * Indicates whether this is a build for store, internal distribution, or simulator (iOS).\n * simulator is deprecated, use simulator flag instead\n */\n distribution?: 'store' | 'internal' | 'simulator';\n\n /**\n * App name (expo.name in app.json/app.config.js)\n */\n appName?: string;\n\n /**\n * App identifier:\n * - iOS builds: the bundle identifier (expo.ios.bundleIdentifier in app.json/app.config.js)\n * - Android builds: the application id (expo.android.package in app.json/app.config.js)\n */\n appIdentifier?: string;\n\n /**\n * Build profile name (e.g. release)\n */\n buildProfile?: string;\n\n /**\n * Git commit hash (e.g. aab03fbdabb6e536ea78b28df91575ad488f5f21)\n */\n gitCommitHash?: string;\n\n /**\n * Git commit message\n */\n gitCommitMessage?: string;\n\n /**\n * State of the git working tree\n */\n isGitWorkingTreeDirty?: boolean;\n\n /**\n * Username of the initiating user\n */\n username?: string;\n\n /**\n * Indicates what type of an enterprise provisioning profile was used to build the app.\n * It's either adhoc or universal\n */\n iosEnterpriseProvisioning?: 'adhoc' | 'universal';\n\n /**\n * Message attached to the build.\n */\n message?: string;\n\n /**\n * Indicates whether the build was run from CI.\n */\n runFromCI?: boolean;\n\n /**\n * Indicates whether the build was run with --no-wait flag.\n */\n runWithNoWaitFlag?: boolean;\n\n /**\n * Workflow name available for custom builds.\n */\n customWorkflowName?: string;\n\n /**\n * Indicates whether this is (likely, we can't be 100% sure) development client build.\n */\n developmentClient?: boolean;\n\n /**\n * Which package manager will be used for the build. Determined based on lockfiles in the project directory.\n */\n requiredPackageManager?: 'npm' | 'pnpm' | 'yarn' | 'bun';\n\n /**\n * Indicates if this is an iOS build for a simulator\n */\n simulator?: boolean;\n\n /**\n * Image selected by user for the build. If user didn't select any image and wants to use default for the given RN and SDK version it will undefined.\n */\n selectedImage?: string;\n\n /**\n * Custom node version selected by user for the build. If user didn't select any node version and wants to use default it will be undefined.\n */\n customNodeVersion?: string;\n};\n\nconst FingerprintSourceSchema = Joi.object<FingerprintSource>({\n type: Joi.string()\n .valid(...Object.values(FingerprintSourceType))\n .required(),\n})\n .when(Joi.object({ type: FingerprintSourceType.GCS }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(FingerprintSourceType.GCS).required(),\n bucketKey: Joi.string().required(),\n }),\n })\n .when(Joi.object({ type: FingerprintSourceType.PATH }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(FingerprintSourceType.PATH).required(),\n path: Joi.string().required(),\n }),\n })\n .when(Joi.object({ type: FingerprintSourceType.URL }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(FingerprintSourceType.URL).required(),\n url: Joi.string().uri().required(),\n }),\n });\n\nexport const MetadataSchema = Joi.object({\n trackingContext: Joi.object()\n .pattern(Joi.string(), [Joi.string(), Joi.number(), Joi.boolean()])\n .required(),\n appVersion: Joi.string(),\n appBuildVersion: Joi.string(),\n cliVersion: Joi.string(),\n workflow: Joi.string().valid('generic', 'managed'),\n distribution: Joi.string().valid('store', 'internal', 'simulator'),\n credentialsSource: Joi.string().valid('local', 'remote'),\n sdkVersion: Joi.string(),\n runtimeVersion: Joi.string(),\n fingerprintSource: FingerprintSourceSchema,\n reactNativeVersion: Joi.string(),\n channel: Joi.string(),\n appName: Joi.string(),\n appIdentifier: Joi.string(),\n buildProfile: Joi.string(),\n gitCommitHash: Joi.string().length(40).hex(),\n gitCommitMessage: Joi.string().max(4096),\n isGitWorkingTreeDirty: Joi.boolean(),\n username: Joi.string(),\n iosEnterpriseProvisioning: Joi.string().valid('adhoc', 'universal'),\n message: Joi.string().max(1024),\n runFromCI: Joi.boolean(),\n runWithNoWaitFlag: Joi.boolean(),\n customWorkflowName: Joi.string(),\n developmentClient: Joi.boolean(),\n requiredPackageManager: Joi.string().valid('npm', 'pnpm', 'yarn', 'bun'),\n simulator: Joi.boolean(),\n selectedImage: Joi.string(),\n customNodeVersion: Joi.string(),\n});\n\nexport function sanitizeMetadata(metadata: object): Metadata {\n const { value, error } = MetadataSchema.validate(metadata, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n } else {\n return value;\n }\n}\n"]}
|
package/dist/step.d.ts
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FunctionStepZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the step.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* id: step1
|
|
8
|
+
*/
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
/**
|
|
11
|
+
* Expression that determines whether the step should run.
|
|
12
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
13
|
+
*/
|
|
14
|
+
if: z.ZodOptional<z.ZodString>;
|
|
15
|
+
/**
|
|
16
|
+
* The name of the step.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* name: 'Step 1'
|
|
20
|
+
*/
|
|
21
|
+
name: z.ZodOptional<z.ZodString>;
|
|
22
|
+
/**
|
|
23
|
+
* The working directory to run the step in.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* working_directory: ./my-working-directory
|
|
27
|
+
*
|
|
28
|
+
* @default depends on the project settings
|
|
29
|
+
*/
|
|
30
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
31
|
+
/**
|
|
32
|
+
* Env variables override for the step.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* env:
|
|
36
|
+
* MY_ENV_VAR: my-value
|
|
37
|
+
* ANOTHER_ENV_VAR: another-value
|
|
38
|
+
*/
|
|
39
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
40
|
+
}, {
|
|
41
|
+
/**
|
|
42
|
+
* The custom EAS function to run as a step.
|
|
43
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* uses: eas/build
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* uses: my-custom-function
|
|
50
|
+
*/
|
|
51
|
+
uses: z.ZodString;
|
|
52
|
+
/**
|
|
53
|
+
* The arguments to pass to the function.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* with:
|
|
57
|
+
* arg1: value1
|
|
58
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
59
|
+
* arg3:
|
|
60
|
+
* key1: value1
|
|
61
|
+
* key2:
|
|
62
|
+
* - value1
|
|
63
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
64
|
+
*/
|
|
65
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
66
|
+
run: z.ZodOptional<z.ZodNever>;
|
|
67
|
+
shell: z.ZodOptional<z.ZodNever>;
|
|
68
|
+
}>, "strip", z.ZodTypeAny, {
|
|
69
|
+
uses: string;
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
env?: Record<string, string> | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
if?: string | undefined;
|
|
74
|
+
working_directory?: string | undefined;
|
|
75
|
+
with?: Record<string, unknown> | undefined;
|
|
76
|
+
run?: undefined;
|
|
77
|
+
shell?: undefined;
|
|
78
|
+
}, {
|
|
79
|
+
uses: string;
|
|
80
|
+
name?: string | undefined;
|
|
81
|
+
env?: Record<string, string> | undefined;
|
|
82
|
+
id?: string | undefined;
|
|
83
|
+
if?: string | undefined;
|
|
84
|
+
working_directory?: string | undefined;
|
|
85
|
+
with?: Record<string, unknown> | undefined;
|
|
86
|
+
run?: undefined;
|
|
87
|
+
shell?: undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export type FunctionStep = z.infer<typeof FunctionStepZ>;
|
|
90
|
+
export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the step.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* id: step1
|
|
96
|
+
*/
|
|
97
|
+
id: z.ZodOptional<z.ZodString>;
|
|
98
|
+
/**
|
|
99
|
+
* Expression that determines whether the step should run.
|
|
100
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
101
|
+
*/
|
|
102
|
+
if: z.ZodOptional<z.ZodString>;
|
|
103
|
+
/**
|
|
104
|
+
* The name of the step.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* name: 'Step 1'
|
|
108
|
+
*/
|
|
109
|
+
name: z.ZodOptional<z.ZodString>;
|
|
110
|
+
/**
|
|
111
|
+
* The working directory to run the step in.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* working_directory: ./my-working-directory
|
|
115
|
+
*
|
|
116
|
+
* @default depends on the project settings
|
|
117
|
+
*/
|
|
118
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
119
|
+
/**
|
|
120
|
+
* Env variables override for the step.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* env:
|
|
124
|
+
* MY_ENV_VAR: my-value
|
|
125
|
+
* ANOTHER_ENV_VAR: another-value
|
|
126
|
+
*/
|
|
127
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
|
+
}, {
|
|
129
|
+
/**
|
|
130
|
+
* The command-line programs to run as a step.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* run: echo Hello, world!
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* run: |
|
|
137
|
+
* npm install
|
|
138
|
+
* npx expo prebuild
|
|
139
|
+
* pod install
|
|
140
|
+
*/
|
|
141
|
+
run: z.ZodString;
|
|
142
|
+
/**
|
|
143
|
+
* The shell to run the "run" command with.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* shell: 'sh'
|
|
147
|
+
*
|
|
148
|
+
* @default 'bash'
|
|
149
|
+
*/
|
|
150
|
+
shell: z.ZodOptional<z.ZodString>;
|
|
151
|
+
uses: z.ZodOptional<z.ZodNever>;
|
|
152
|
+
with: z.ZodOptional<z.ZodNever>;
|
|
153
|
+
}>, "strip", z.ZodTypeAny, {
|
|
154
|
+
run: string;
|
|
155
|
+
name?: string | undefined;
|
|
156
|
+
env?: Record<string, string> | undefined;
|
|
157
|
+
id?: string | undefined;
|
|
158
|
+
if?: string | undefined;
|
|
159
|
+
working_directory?: string | undefined;
|
|
160
|
+
uses?: undefined;
|
|
161
|
+
with?: undefined;
|
|
162
|
+
shell?: string | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
run: string;
|
|
165
|
+
name?: string | undefined;
|
|
166
|
+
env?: Record<string, string> | undefined;
|
|
167
|
+
id?: string | undefined;
|
|
168
|
+
if?: string | undefined;
|
|
169
|
+
working_directory?: string | undefined;
|
|
170
|
+
uses?: undefined;
|
|
171
|
+
with?: undefined;
|
|
172
|
+
shell?: string | undefined;
|
|
173
|
+
}>;
|
|
174
|
+
export type ShellStep = z.infer<typeof ShellStepZ>;
|
|
175
|
+
export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
176
|
+
/**
|
|
177
|
+
* Unique identifier for the step.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* id: step1
|
|
181
|
+
*/
|
|
182
|
+
id: z.ZodOptional<z.ZodString>;
|
|
183
|
+
/**
|
|
184
|
+
* Expression that determines whether the step should run.
|
|
185
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
186
|
+
*/
|
|
187
|
+
if: z.ZodOptional<z.ZodString>;
|
|
188
|
+
/**
|
|
189
|
+
* The name of the step.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* name: 'Step 1'
|
|
193
|
+
*/
|
|
194
|
+
name: z.ZodOptional<z.ZodString>;
|
|
195
|
+
/**
|
|
196
|
+
* The working directory to run the step in.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* working_directory: ./my-working-directory
|
|
200
|
+
*
|
|
201
|
+
* @default depends on the project settings
|
|
202
|
+
*/
|
|
203
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
204
|
+
/**
|
|
205
|
+
* Env variables override for the step.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* env:
|
|
209
|
+
* MY_ENV_VAR: my-value
|
|
210
|
+
* ANOTHER_ENV_VAR: another-value
|
|
211
|
+
*/
|
|
212
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
213
|
+
}, {
|
|
214
|
+
/**
|
|
215
|
+
* The command-line programs to run as a step.
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* run: echo Hello, world!
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* run: |
|
|
222
|
+
* npm install
|
|
223
|
+
* npx expo prebuild
|
|
224
|
+
* pod install
|
|
225
|
+
*/
|
|
226
|
+
run: z.ZodString;
|
|
227
|
+
/**
|
|
228
|
+
* The shell to run the "run" command with.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* shell: 'sh'
|
|
232
|
+
*
|
|
233
|
+
* @default 'bash'
|
|
234
|
+
*/
|
|
235
|
+
shell: z.ZodOptional<z.ZodString>;
|
|
236
|
+
uses: z.ZodOptional<z.ZodNever>;
|
|
237
|
+
with: z.ZodOptional<z.ZodNever>;
|
|
238
|
+
}>, "strip", z.ZodTypeAny, {
|
|
239
|
+
run: string;
|
|
240
|
+
name?: string | undefined;
|
|
241
|
+
env?: Record<string, string> | undefined;
|
|
242
|
+
id?: string | undefined;
|
|
243
|
+
if?: string | undefined;
|
|
244
|
+
working_directory?: string | undefined;
|
|
245
|
+
uses?: undefined;
|
|
246
|
+
with?: undefined;
|
|
247
|
+
shell?: string | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
run: string;
|
|
250
|
+
name?: string | undefined;
|
|
251
|
+
env?: Record<string, string> | undefined;
|
|
252
|
+
id?: string | undefined;
|
|
253
|
+
if?: string | undefined;
|
|
254
|
+
working_directory?: string | undefined;
|
|
255
|
+
uses?: undefined;
|
|
256
|
+
with?: undefined;
|
|
257
|
+
shell?: string | undefined;
|
|
258
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
259
|
+
/**
|
|
260
|
+
* Unique identifier for the step.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* id: step1
|
|
264
|
+
*/
|
|
265
|
+
id: z.ZodOptional<z.ZodString>;
|
|
266
|
+
/**
|
|
267
|
+
* Expression that determines whether the step should run.
|
|
268
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
269
|
+
*/
|
|
270
|
+
if: z.ZodOptional<z.ZodString>;
|
|
271
|
+
/**
|
|
272
|
+
* The name of the step.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* name: 'Step 1'
|
|
276
|
+
*/
|
|
277
|
+
name: z.ZodOptional<z.ZodString>;
|
|
278
|
+
/**
|
|
279
|
+
* The working directory to run the step in.
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* working_directory: ./my-working-directory
|
|
283
|
+
*
|
|
284
|
+
* @default depends on the project settings
|
|
285
|
+
*/
|
|
286
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
287
|
+
/**
|
|
288
|
+
* Env variables override for the step.
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* env:
|
|
292
|
+
* MY_ENV_VAR: my-value
|
|
293
|
+
* ANOTHER_ENV_VAR: another-value
|
|
294
|
+
*/
|
|
295
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
296
|
+
}, {
|
|
297
|
+
/**
|
|
298
|
+
* The custom EAS function to run as a step.
|
|
299
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* uses: eas/build
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* uses: my-custom-function
|
|
306
|
+
*/
|
|
307
|
+
uses: z.ZodString;
|
|
308
|
+
/**
|
|
309
|
+
* The arguments to pass to the function.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* with:
|
|
313
|
+
* arg1: value1
|
|
314
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
315
|
+
* arg3:
|
|
316
|
+
* key1: value1
|
|
317
|
+
* key2:
|
|
318
|
+
* - value1
|
|
319
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
320
|
+
*/
|
|
321
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
322
|
+
run: z.ZodOptional<z.ZodNever>;
|
|
323
|
+
shell: z.ZodOptional<z.ZodNever>;
|
|
324
|
+
}>, "strip", z.ZodTypeAny, {
|
|
325
|
+
uses: string;
|
|
326
|
+
name?: string | undefined;
|
|
327
|
+
env?: Record<string, string> | undefined;
|
|
328
|
+
id?: string | undefined;
|
|
329
|
+
if?: string | undefined;
|
|
330
|
+
working_directory?: string | undefined;
|
|
331
|
+
with?: Record<string, unknown> | undefined;
|
|
332
|
+
run?: undefined;
|
|
333
|
+
shell?: undefined;
|
|
334
|
+
}, {
|
|
335
|
+
uses: string;
|
|
336
|
+
name?: string | undefined;
|
|
337
|
+
env?: Record<string, string> | undefined;
|
|
338
|
+
id?: string | undefined;
|
|
339
|
+
if?: string | undefined;
|
|
340
|
+
working_directory?: string | undefined;
|
|
341
|
+
with?: Record<string, unknown> | undefined;
|
|
342
|
+
run?: undefined;
|
|
343
|
+
shell?: undefined;
|
|
344
|
+
}>]>;
|
|
345
|
+
/**
|
|
346
|
+
* Structure of a custom EAS job step.
|
|
347
|
+
*
|
|
348
|
+
* GHA step fields skipped here:
|
|
349
|
+
* - `with.entrypoint`
|
|
350
|
+
* - `continue-on-error`
|
|
351
|
+
* - `timeout-minutes`
|
|
352
|
+
*
|
|
353
|
+
* * @example
|
|
354
|
+
* steps:
|
|
355
|
+
* - uses: eas/maestro-test
|
|
356
|
+
* id: step1
|
|
357
|
+
* name: Step 1
|
|
358
|
+
* with:
|
|
359
|
+
* flow_path: |
|
|
360
|
+
* maestro/sign_in.yaml
|
|
361
|
+
* maestro/create_post.yaml
|
|
362
|
+
* maestro/sign_out.yaml
|
|
363
|
+
* - run: echo Hello, world!
|
|
364
|
+
*/
|
|
365
|
+
export type Step = z.infer<typeof StepZ>;
|
package/dist/step.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const CommonStepZ = zod_1.z.object({
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the step.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* id: step1
|
|
11
|
+
*/
|
|
12
|
+
id: zod_1.z.string().optional(),
|
|
13
|
+
/**
|
|
14
|
+
* Expression that determines whether the step should run.
|
|
15
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
16
|
+
*/
|
|
17
|
+
if: zod_1.z.string().optional(),
|
|
18
|
+
/**
|
|
19
|
+
* The name of the step.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* name: 'Step 1'
|
|
23
|
+
*/
|
|
24
|
+
name: zod_1.z.string().optional(),
|
|
25
|
+
/**
|
|
26
|
+
* The working directory to run the step in.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* working_directory: ./my-working-directory
|
|
30
|
+
*
|
|
31
|
+
* @default depends on the project settings
|
|
32
|
+
*/
|
|
33
|
+
working_directory: zod_1.z.string().optional(),
|
|
34
|
+
/**
|
|
35
|
+
* Env variables override for the step.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* env:
|
|
39
|
+
* MY_ENV_VAR: my-value
|
|
40
|
+
* ANOTHER_ENV_VAR: another-value
|
|
41
|
+
*/
|
|
42
|
+
env: zod_1.z.record(zod_1.z.string()).optional(),
|
|
43
|
+
});
|
|
44
|
+
exports.FunctionStepZ = CommonStepZ.extend({
|
|
45
|
+
/**
|
|
46
|
+
* The custom EAS function to run as a step.
|
|
47
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* uses: eas/build
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* uses: my-custom-function
|
|
54
|
+
*/
|
|
55
|
+
uses: zod_1.z.string(),
|
|
56
|
+
/**
|
|
57
|
+
* The arguments to pass to the function.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* with:
|
|
61
|
+
* arg1: value1
|
|
62
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
63
|
+
* arg3:
|
|
64
|
+
* key1: value1
|
|
65
|
+
* key2:
|
|
66
|
+
* - value1
|
|
67
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
68
|
+
*/
|
|
69
|
+
with: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
70
|
+
run: zod_1.z.never().optional(),
|
|
71
|
+
shell: zod_1.z.never().optional(),
|
|
72
|
+
});
|
|
73
|
+
exports.ShellStepZ = CommonStepZ.extend({
|
|
74
|
+
/**
|
|
75
|
+
* The command-line programs to run as a step.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* run: echo Hello, world!
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* run: |
|
|
82
|
+
* npm install
|
|
83
|
+
* npx expo prebuild
|
|
84
|
+
* pod install
|
|
85
|
+
*/
|
|
86
|
+
run: zod_1.z.string(),
|
|
87
|
+
/**
|
|
88
|
+
* The shell to run the "run" command with.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* shell: 'sh'
|
|
92
|
+
*
|
|
93
|
+
* @default 'bash'
|
|
94
|
+
*/
|
|
95
|
+
shell: zod_1.z.string().optional(),
|
|
96
|
+
uses: zod_1.z.never().optional(),
|
|
97
|
+
with: zod_1.z.never().optional(),
|
|
98
|
+
});
|
|
99
|
+
exports.StepZ = zod_1.z.union([exports.ShellStepZ, exports.FunctionStepZ]);
|
|
100
|
+
//# sourceMappingURL=step.js.map
|
package/dist/step.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.js","sourceRoot":"","sources":["../src/step.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB;;;OAGG;IACH,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB;;;;;OAKG;IACH,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B;;;;;;;OAOG;IACH,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC;;;;;;;OAOG;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC;IAC9C;;;;;;;;;OASG;IACH,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEtC,GAAG,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC;AAIU,QAAA,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC;IAC3C;;;;;;;;;;;OAWG;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf;;;;;;;OAOG;IACH,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE5B,IAAI,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC;AAIU,QAAA,KAAK,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,kBAAU,EAAE,qBAAa,CAAC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nconst CommonStepZ = z.object({\n /**\n * Unique identifier for the step.\n *\n * @example\n * id: step1\n */\n id: z.string().optional(),\n /**\n * Expression that determines whether the step should run.\n * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).\n */\n if: z.string().optional(),\n /**\n * The name of the step.\n *\n * @example\n * name: 'Step 1'\n */\n name: z.string().optional(),\n /**\n * The working directory to run the step in.\n *\n * @example\n * working_directory: ./my-working-directory\n *\n * @default depends on the project settings\n */\n working_directory: z.string().optional(),\n /**\n * Env variables override for the step.\n *\n * @example\n * env:\n * MY_ENV_VAR: my-value\n * ANOTHER_ENV_VAR: another-value\n */\n env: z.record(z.string()).optional(),\n});\n\nexport const FunctionStepZ = CommonStepZ.extend({\n /**\n * The custom EAS function to run as a step.\n * It can be a function provided by EAS or a custom function defined by the user.\n *\n * @example\n * uses: eas/build\n *\n * @example\n * uses: my-custom-function\n */\n uses: z.string(),\n /**\n * The arguments to pass to the function.\n *\n * @example\n * with:\n * arg1: value1\n * arg2: ['ala', 'ma', 'kota']\n * arg3:\n * key1: value1\n * key2:\n * - value1\n * arg4: ${{ steps.step1.outputs.test }}\n */\n with: z.record(z.unknown()).optional(),\n\n run: z.never().optional(),\n shell: z.never().optional(),\n});\n\nexport type FunctionStep = z.infer<typeof FunctionStepZ>;\n\nexport const ShellStepZ = CommonStepZ.extend({\n /**\n * The command-line programs to run as a step.\n *\n * @example\n * run: echo Hello, world!\n *\n * @example\n * run: |\n * npm install\n * npx expo prebuild\n * pod install\n */\n run: z.string(),\n /**\n * The shell to run the \"run\" command with.\n *\n * @example\n * shell: 'sh'\n *\n * @default 'bash'\n */\n shell: z.string().optional(),\n\n uses: z.never().optional(),\n with: z.never().optional(),\n});\n\nexport type ShellStep = z.infer<typeof ShellStepZ>;\n\nexport const StepZ = z.union([ShellStepZ, FunctionStepZ]);\n\n/**\n * Structure of a custom EAS job step.\n *\n * GHA step fields skipped here:\n * - `with.entrypoint`\n * - `continue-on-error`\n * - `timeout-minutes`\n *\n * * @example\n * steps:\n * - uses: eas/maestro-test\n * id: step1\n * name: Step 1\n * with:\n * flow_path: |\n * maestro/sign_in.yaml\n * maestro/create_post.yaml\n * maestro/sign_out.yaml\n * - run: echo Hello, world!\n */\nexport type Step = z.infer<typeof StepZ>;\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.126",
|
|
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": "b329acd121e1a7d98d71d0ecf7396c8b875612a9"
|
|
39
39
|
}
|