@expo/build-tools 24.1.0 → 24.2.0
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/git.d.ts +1 -0
- package/dist/common/projectSources.js +25 -19
- package/package.json +4 -4
package/dist/common/git.d.ts
CHANGED
|
@@ -19,28 +19,21 @@ const zod_1 = require("zod");
|
|
|
19
19
|
const git_1 = require("./git");
|
|
20
20
|
const turtleFetch_1 = require("../utils/turtleFetch");
|
|
21
21
|
async function prepareProjectSourcesAsync(ctx, destinationDirectory) {
|
|
22
|
-
let projectArchive = ctx.job.projectArchive;
|
|
23
22
|
if (ctx.isLocal) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
else {
|
|
27
|
-
const projectArchiveResult = await (0, results_1.asyncResult)(fetchProjectArchiveSourceAsync(ctx));
|
|
28
|
-
if (!projectArchiveResult.ok) {
|
|
29
|
-
throw new eas_build_job_1.SystemError('Failed to fetch project sources. Re-run the job.', {
|
|
30
|
-
cause: projectArchiveResult.reason,
|
|
31
|
-
});
|
|
23
|
+
if (ctx.job.projectArchive.type !== eas_build_job_1.ArchiveSourceType.PATH) {
|
|
24
|
+
throw new eas_build_job_1.SystemError(`Expected a PATH project source for a local build, received ${ctx.job.projectArchive.type}.`, { trackingCode: 'INVALID_LOCAL_PROJECT_SOURCE' });
|
|
32
25
|
}
|
|
33
|
-
|
|
26
|
+
await prepareProjectSourcesLocallyAsync(ctx, ctx.job.projectArchive.path, destinationDirectory);
|
|
27
|
+
return { handled: true };
|
|
28
|
+
}
|
|
29
|
+
const projectArchiveResult = await (0, results_1.asyncResult)(fetchProjectArchiveSourceAsync(ctx));
|
|
30
|
+
if (!projectArchiveResult.ok) {
|
|
31
|
+
throw new eas_build_job_1.SystemError('Failed to fetch project sources. Re-run the job.', {
|
|
32
|
+
cause: projectArchiveResult.reason,
|
|
33
|
+
});
|
|
34
34
|
}
|
|
35
|
+
const projectArchive = projectArchiveResult.value;
|
|
35
36
|
switch (projectArchive.type) {
|
|
36
|
-
case eas_build_job_1.ArchiveSourceType.R2:
|
|
37
|
-
case eas_build_job_1.ArchiveSourceType.GCS: {
|
|
38
|
-
throw new Error('Remote project sources should be resolved earlier to URL');
|
|
39
|
-
}
|
|
40
|
-
case eas_build_job_1.ArchiveSourceType.PATH: {
|
|
41
|
-
await prepareProjectSourcesLocallyAsync(ctx, projectArchive.path, destinationDirectory); // used in eas build --local
|
|
42
|
-
return { handled: true };
|
|
43
|
-
}
|
|
44
37
|
case eas_build_job_1.ArchiveSourceType.NONE: {
|
|
45
38
|
// May be used in no-sources jobs like submission jobs.
|
|
46
39
|
return { handled: true };
|
|
@@ -207,7 +200,20 @@ async function fetchProjectArchiveSourceAsync(ctx) {
|
|
|
207
200
|
if (!jsonResult.ok) {
|
|
208
201
|
throw new Error(`Expected JSON response from server (${response.status}): ${jsonResult.reason}`);
|
|
209
202
|
}
|
|
210
|
-
const dataResult = zod_1.z
|
|
203
|
+
const dataResult = zod_1.z
|
|
204
|
+
.object({
|
|
205
|
+
data: zod_1.z.discriminatedUnion('type', [
|
|
206
|
+
zod_1.z.object({
|
|
207
|
+
type: zod_1.z.literal(eas_build_job_1.ArchiveSourceType.GIT),
|
|
208
|
+
repositoryUrl: zod_1.z.string().url(),
|
|
209
|
+
gitRef: zod_1.z.string().nullable(),
|
|
210
|
+
gitCommitHash: zod_1.z.string(),
|
|
211
|
+
}),
|
|
212
|
+
zod_1.z.object({ type: zod_1.z.literal(eas_build_job_1.ArchiveSourceType.URL), url: zod_1.z.string().url() }),
|
|
213
|
+
zod_1.z.object({ type: zod_1.z.literal(eas_build_job_1.ArchiveSourceType.NONE) }),
|
|
214
|
+
]),
|
|
215
|
+
})
|
|
216
|
+
.safeParse(jsonResult.value);
|
|
211
217
|
if (!dataResult.success) {
|
|
212
218
|
throw new Error(`Unexpected data from server (${response.status}): ${zod_1.z.prettifyError(dataResult.error)}`);
|
|
213
219
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.2.0",
|
|
4
4
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Expo <support@expo.io>",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@expo/config": "55.0.10",
|
|
41
41
|
"@expo/config-plugins": "55.0.7",
|
|
42
42
|
"@expo/downloader": "24.0.0",
|
|
43
|
-
"@expo/eas-build-job": "24.
|
|
43
|
+
"@expo/eas-build-job": "24.2.0",
|
|
44
44
|
"@expo/env": "^0.4.0",
|
|
45
45
|
"@expo/logger": "24.0.0",
|
|
46
46
|
"@expo/package-manager": "1.9.10",
|
|
47
47
|
"@expo/plist": "^0.3.5",
|
|
48
48
|
"@expo/results": "^1.0.0",
|
|
49
49
|
"@expo/spawn-async": "1.7.2",
|
|
50
|
-
"@expo/steps": "24.
|
|
50
|
+
"@expo/steps": "24.2.0",
|
|
51
51
|
"@expo/template-file": "24.0.0",
|
|
52
52
|
"@expo/turtle-spawn": "24.0.0",
|
|
53
53
|
"@expo/xcpretty": "^4.3.1",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"typescript": "^5.5.4",
|
|
103
103
|
"uuid": "^9.0.1"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "97553334d4275d9f18ec23b92e6c3ebe9593767e"
|
|
106
106
|
}
|