eas-cli 9.0.10 → 9.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/README.md +148 -83
- package/build/build/android/prepareJob.js +11 -1
- package/build/build/build.js +9 -11
- package/build/build/ios/prepareJob.js +11 -1
- package/build/build/local.js +1 -1
- package/build/build/utils/formatBuild.js +4 -0
- package/build/build/utils/repository.js +11 -30
- package/build/commandUtils/EasCommand.js +4 -1
- package/build/commands/build/list.d.ts +7 -7
- package/build/commands/build/list.js +42 -29
- package/build/commands/build/resign.d.ts +8 -4
- package/build/commands/build/resign.js +21 -6
- package/build/commands/project/onboarding.d.ts +0 -1
- package/build/commands/project/onboarding.js +6 -2
- package/build/submit/ArchiveSource.js +4 -6
- package/build/uploads.d.ts +1 -1
- package/build/uploads.js +1 -1
- package/oclif.manifest.json +72 -30
- package/package.json +2 -2
|
@@ -35,6 +35,16 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
35
35
|
const maybeCustomBuildConfigPath = buildProfile.config
|
|
36
36
|
? (0, customBuildConfig_1.getCustomBuildConfigPathForJob)(buildProfile.config)
|
|
37
37
|
: undefined;
|
|
38
|
+
let buildMode;
|
|
39
|
+
if (ctx.repack) {
|
|
40
|
+
buildMode = eas_build_job_1.BuildMode.REPACK;
|
|
41
|
+
}
|
|
42
|
+
else if (buildProfile.config) {
|
|
43
|
+
buildMode = eas_build_job_1.BuildMode.CUSTOM;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
buildMode = eas_build_job_1.BuildMode.BUILD;
|
|
47
|
+
}
|
|
38
48
|
const job = {
|
|
39
49
|
type: ctx.workflow,
|
|
40
50
|
platform: eas_build_job_1.Platform.ANDROID,
|
|
@@ -72,7 +82,7 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
72
82
|
experimental: {
|
|
73
83
|
prebuildCommand: buildProfile.prebuildCommand,
|
|
74
84
|
},
|
|
75
|
-
mode:
|
|
85
|
+
mode: buildMode,
|
|
76
86
|
triggeredBy: eas_build_job_1.BuildTrigger.EAS_CLI,
|
|
77
87
|
...(maybeCustomBuildConfigPath && {
|
|
78
88
|
customBuildConfig: {
|
package/build/build/build.js
CHANGED
|
@@ -162,12 +162,14 @@ async function uploadProjectAsync(ctx) {
|
|
|
162
162
|
throw new Error('Project archive is too big. Maximum allowed size is 2GB.');
|
|
163
163
|
}
|
|
164
164
|
projectTarballPath = projectTarball.path;
|
|
165
|
-
const bucketKey
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
const [bucketKey, { metadataLocation }] = await Promise.all([
|
|
166
|
+
(0, uploads_1.uploadFileAtPathToGCSAsync)(ctx.graphqlClient, generated_1.UploadSessionType.EasBuildGcsProjectSources, projectTarball.path, (0, progress_1.createProgressTracker)({
|
|
167
|
+
total: projectTarball.size,
|
|
168
|
+
message: ratio => `Uploading to EAS Build (${(0, files_1.formatBytes)(projectTarball.size * ratio)} / ${(0, files_1.formatBytes)(projectTarball.size)})`,
|
|
169
|
+
completedMessage: (duration) => `Uploaded to EAS ${chalk_1.default.dim(duration)}`,
|
|
170
|
+
})),
|
|
171
|
+
uploadMetadataFileAsync(projectTarball, ctx),
|
|
172
|
+
]);
|
|
171
173
|
if (metadataLocation) {
|
|
172
174
|
return { bucketKey, metadataLocation };
|
|
173
175
|
}
|
|
@@ -196,11 +198,7 @@ async function uploadMetadataFileAsync(projectTarball, ctx) {
|
|
|
196
198
|
let projectMetadataFile = null;
|
|
197
199
|
try {
|
|
198
200
|
projectMetadataFile = await (0, repository_1.makeProjectMetadataFileAsync)(projectTarball.path);
|
|
199
|
-
const metadataLocation = await (0, uploads_1.uploadFileAtPathToGCSAsync)(ctx.graphqlClient, generated_1.UploadSessionType.EasBuildGcsProjectMetadata, projectMetadataFile.path
|
|
200
|
-
total: projectMetadataFile.size,
|
|
201
|
-
message: ratio => `Uploading metadata to EAS Build (${(0, files_1.formatBytes)(projectMetadataFile.size * ratio)} / ${(0, files_1.formatBytes)(projectMetadataFile.size)})`,
|
|
202
|
-
completedMessage: (duration) => `Uploaded to EAS ${chalk_1.default.dim(duration)}`,
|
|
203
|
-
}));
|
|
201
|
+
const metadataLocation = await (0, uploads_1.uploadFileAtPathToGCSAsync)(ctx.graphqlClient, generated_1.UploadSessionType.EasBuildGcsProjectMetadata, projectMetadataFile.path);
|
|
204
202
|
return { metadataLocation };
|
|
205
203
|
}
|
|
206
204
|
catch (err) {
|
|
@@ -26,6 +26,16 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
26
26
|
const maybeCustomBuildConfigPath = buildProfile.config
|
|
27
27
|
? (0, customBuildConfig_1.getCustomBuildConfigPathForJob)(buildProfile.config)
|
|
28
28
|
: undefined;
|
|
29
|
+
let buildMode;
|
|
30
|
+
if (ctx.repack) {
|
|
31
|
+
buildMode = eas_build_job_1.BuildMode.REPACK;
|
|
32
|
+
}
|
|
33
|
+
else if (buildProfile.config) {
|
|
34
|
+
buildMode = eas_build_job_1.BuildMode.CUSTOM;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
buildMode = eas_build_job_1.BuildMode.BUILD;
|
|
38
|
+
}
|
|
29
39
|
const job = {
|
|
30
40
|
type: ctx.workflow,
|
|
31
41
|
platform: eas_build_job_1.Platform.IOS,
|
|
@@ -66,7 +76,7 @@ async function prepareJobAsync(ctx, jobData) {
|
|
|
66
76
|
experimental: {
|
|
67
77
|
prebuildCommand: buildProfile.prebuildCommand,
|
|
68
78
|
},
|
|
69
|
-
mode:
|
|
79
|
+
mode: buildMode,
|
|
70
80
|
triggeredBy: eas_build_job_1.BuildTrigger.EAS_CLI,
|
|
71
81
|
...(maybeCustomBuildConfigPath && {
|
|
72
82
|
customBuildConfig: {
|
package/build/build/local.js
CHANGED
|
@@ -6,7 +6,7 @@ const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
|
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
|
|
9
|
-
const PLUGIN_PACKAGE_VERSION = '1.0.
|
|
9
|
+
const PLUGIN_PACKAGE_VERSION = '1.0.116';
|
|
10
10
|
var LocalBuildMode;
|
|
11
11
|
(function (LocalBuildMode) {
|
|
12
12
|
/**
|
|
@@ -71,38 +71,19 @@ async function commitPromptAsync(vcsClient, { initialCommitMessage, commitAllFil
|
|
|
71
71
|
}
|
|
72
72
|
exports.commitPromptAsync = commitPromptAsync;
|
|
73
73
|
async function makeProjectMetadataFileAsync(archivePath) {
|
|
74
|
-
const spinner = (0, ora_1.ora)('Creating project metadata file');
|
|
75
|
-
const timerLabel = 'makeProjectMetadataFileAsync';
|
|
76
|
-
const timer = setTimeout(() => {
|
|
77
|
-
spinner.start();
|
|
78
|
-
}, log_1.default.isDebug ? 1 : 1000);
|
|
79
|
-
(0, timer_1.startTimer)(timerLabel);
|
|
80
74
|
const metadataLocation = path_1.default.join((0, paths_1.getTmpDirectory)(), `${(0, uuid_1.v4)()}-eas-build-metadata.json`);
|
|
81
75
|
const archiveContent = [];
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
catch (e) {
|
|
96
|
-
clearTimeout(timer);
|
|
97
|
-
if (spinner.isSpinning) {
|
|
98
|
-
spinner.fail();
|
|
99
|
-
}
|
|
100
|
-
throw e;
|
|
101
|
-
}
|
|
102
|
-
clearTimeout(timer);
|
|
103
|
-
const duration = (0, timer_1.endTimer)(timerLabel);
|
|
104
|
-
const prettyTime = (0, timer_1.formatMilliseconds)(duration);
|
|
105
|
-
spinner.succeed(`Created project metadata file ${chalk_1.default.dim(prettyTime)}`);
|
|
76
|
+
await tar_1.default.list({
|
|
77
|
+
file: archivePath,
|
|
78
|
+
onentry: (entry) => {
|
|
79
|
+
if (entry.type === 'File' && !entry.path.includes('.git/')) {
|
|
80
|
+
archiveContent.push(entry.path);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
await fs_extra_1.default.writeJSON(metadataLocation, {
|
|
85
|
+
archiveContent,
|
|
86
|
+
});
|
|
106
87
|
return { path: metadataLocation, size: await fs_extra_1.default.stat(metadataLocation).then(stat => stat.size) };
|
|
107
88
|
}
|
|
108
89
|
exports.makeProjectMetadataFileAsync = makeProjectMetadataFileAsync;
|
|
@@ -71,7 +71,7 @@ class EasCommand extends core_1.Command {
|
|
|
71
71
|
log_1.default.error(err.message);
|
|
72
72
|
}
|
|
73
73
|
else if (err instanceof core_2.CombinedError && err?.graphQLErrors) {
|
|
74
|
-
const
|
|
74
|
+
const cleanGQLErrorsMessage = err?.graphQLErrors
|
|
75
75
|
.map((graphQLError) => {
|
|
76
76
|
const messageLine = graphQLError.message.replace('[GraphQL] ', '');
|
|
77
77
|
const requestIdLine = graphQLError.extensions?.requestId
|
|
@@ -84,6 +84,9 @@ class EasCommand extends core_1.Command {
|
|
|
84
84
|
return defaultMsg;
|
|
85
85
|
})
|
|
86
86
|
.join('\n');
|
|
87
|
+
const cleanMessage = err.networkError
|
|
88
|
+
? `${cleanGQLErrorsMessage}\n${err.networkError.message}`
|
|
89
|
+
: cleanGQLErrorsMessage;
|
|
87
90
|
log_1.default.error(cleanMessage);
|
|
88
91
|
baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
|
|
89
92
|
}
|
|
@@ -13,13 +13,13 @@ export default class BuildList extends EasCommand {
|
|
|
13
13
|
status: import("@oclif/core/lib/interfaces").OptionFlag<BuildStatus | undefined>;
|
|
14
14
|
distribution: import("@oclif/core/lib/interfaces").OptionFlag<BuildDistributionType | undefined>;
|
|
15
15
|
channel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
'app-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
17
|
+
'app-build-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
18
|
+
'sdk-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
19
|
+
'runtime-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
20
|
+
'app-identifier': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
21
|
+
'build-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
22
|
+
'git-commit-hash': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
23
23
|
};
|
|
24
24
|
static contextDefinition: {
|
|
25
25
|
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
@@ -44,13 +44,13 @@ class BuildList extends EasCommand_1.default {
|
|
|
44
44
|
status: graphqlBuildStatus,
|
|
45
45
|
distribution: graphqlBuildDistribution,
|
|
46
46
|
channel: flags.channel,
|
|
47
|
-
appVersion: flags
|
|
48
|
-
appBuildVersion: flags
|
|
49
|
-
sdkVersion: flags
|
|
50
|
-
runtimeVersion: flags
|
|
51
|
-
appIdentifier: flags
|
|
52
|
-
buildProfile: flags
|
|
53
|
-
gitCommitHash: flags
|
|
47
|
+
appVersion: flags['app-version'],
|
|
48
|
+
appBuildVersion: flags['app-build-version'],
|
|
49
|
+
sdkVersion: flags['sdk-version'],
|
|
50
|
+
runtimeVersion: flags['runtime-version'],
|
|
51
|
+
appIdentifier: flags['app-identifier'],
|
|
52
|
+
buildProfile: flags['build-profile'],
|
|
53
|
+
gitCommitHash: flags['git-commit-hash'],
|
|
54
54
|
simulator: flags.simulator,
|
|
55
55
|
},
|
|
56
56
|
paginatedQueryOptions,
|
|
@@ -61,34 +61,47 @@ _a = BuildList;
|
|
|
61
61
|
BuildList.description = 'list all builds for your project';
|
|
62
62
|
BuildList.flags = {
|
|
63
63
|
platform: core_1.Flags.enum({
|
|
64
|
-
options:
|
|
64
|
+
options: Object.values(platform_1.RequestedPlatform),
|
|
65
|
+
char: 'p',
|
|
65
66
|
}),
|
|
66
67
|
status: core_1.Flags.enum({
|
|
67
|
-
options:
|
|
68
|
-
|
|
69
|
-
types_1.BuildStatus.IN_QUEUE,
|
|
70
|
-
types_1.BuildStatus.IN_PROGRESS,
|
|
71
|
-
types_1.BuildStatus.PENDING_CANCEL,
|
|
72
|
-
types_1.BuildStatus.ERRORED,
|
|
73
|
-
types_1.BuildStatus.FINISHED,
|
|
74
|
-
types_1.BuildStatus.CANCELED,
|
|
75
|
-
],
|
|
68
|
+
options: Object.values(types_1.BuildStatus),
|
|
69
|
+
description: 'Filter only builds with the specified status',
|
|
76
70
|
}),
|
|
77
71
|
distribution: core_1.Flags.enum({
|
|
78
|
-
options:
|
|
79
|
-
|
|
80
|
-
types_1.BuildDistributionType.INTERNAL,
|
|
81
|
-
types_1.BuildDistributionType.SIMULATOR,
|
|
82
|
-
],
|
|
72
|
+
options: Object.values(types_1.BuildDistributionType),
|
|
73
|
+
description: 'Filter only builds with the specified distribution type',
|
|
83
74
|
}),
|
|
84
75
|
channel: core_1.Flags.string(),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
76
|
+
'app-version': core_1.Flags.string({
|
|
77
|
+
aliases: ['appVersion'],
|
|
78
|
+
description: 'Filter only builds created with the specified main app version',
|
|
79
|
+
}),
|
|
80
|
+
'app-build-version': core_1.Flags.string({
|
|
81
|
+
aliases: ['appBuildVersion'],
|
|
82
|
+
description: 'Filter only builds created with the specified app build version',
|
|
83
|
+
}),
|
|
84
|
+
'sdk-version': core_1.Flags.string({
|
|
85
|
+
aliases: ['sdkVersion'],
|
|
86
|
+
description: 'Filter only builds created with the specified Expo SDK version',
|
|
87
|
+
}),
|
|
88
|
+
'runtime-version': core_1.Flags.string({
|
|
89
|
+
aliases: ['runtimeVersion'],
|
|
90
|
+
description: 'Filter only builds created with the specified runtime version',
|
|
91
|
+
}),
|
|
92
|
+
'app-identifier': core_1.Flags.string({
|
|
93
|
+
aliases: ['appIdentifier'],
|
|
94
|
+
description: 'Filter only builds created with the specified app identifier',
|
|
95
|
+
}),
|
|
96
|
+
'build-profile': core_1.Flags.string({
|
|
97
|
+
char: 'e',
|
|
98
|
+
aliases: ['profile', 'buildProfile'],
|
|
99
|
+
description: 'Filter only builds created with the specified build profile',
|
|
100
|
+
}),
|
|
101
|
+
'git-commit-hash': core_1.Flags.string({
|
|
102
|
+
aliases: ['gitCommitHash'],
|
|
103
|
+
description: 'Filter only builds created with the specified git commit hash',
|
|
104
|
+
}),
|
|
92
105
|
...pagination_1.EasPaginatedQueryFlags,
|
|
93
106
|
limit: (0, pagination_1.getLimitFlagWithCustomValues)({ defaultTo: 10, limit: queries_1.BUILDS_LIMIT }),
|
|
94
107
|
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
@@ -8,7 +8,8 @@ interface BuildResignFlags {
|
|
|
8
8
|
offset?: number;
|
|
9
9
|
limit?: number;
|
|
10
10
|
platform?: Platform;
|
|
11
|
-
|
|
11
|
+
targetProfile?: string;
|
|
12
|
+
sourceProfile?: string;
|
|
12
13
|
maybeBuildId?: string;
|
|
13
14
|
wait: boolean;
|
|
14
15
|
}
|
|
@@ -18,7 +19,8 @@ interface RawBuildResignFlags {
|
|
|
18
19
|
offset: number | undefined;
|
|
19
20
|
limit: number | undefined;
|
|
20
21
|
platform: 'android' | 'ios' | undefined;
|
|
21
|
-
profile: string | undefined;
|
|
22
|
+
'target-profile': string | undefined;
|
|
23
|
+
'source-profile': string | undefined;
|
|
22
24
|
wait: boolean;
|
|
23
25
|
id: string | undefined;
|
|
24
26
|
}
|
|
@@ -30,7 +32,8 @@ export default class BuildResign extends EasCommand {
|
|
|
30
32
|
offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
31
33
|
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
32
34
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
33
|
-
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
35
|
+
'target-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
36
|
+
'source-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
34
37
|
wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
35
38
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
36
39
|
};
|
|
@@ -44,13 +47,14 @@ export default class BuildResign extends EasCommand {
|
|
|
44
47
|
};
|
|
45
48
|
runAsync(): Promise<void>;
|
|
46
49
|
sanitizeFlags(flags: RawBuildResignFlags): BuildResignFlags;
|
|
47
|
-
ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset, }: {
|
|
50
|
+
ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset, buildProfile, }: {
|
|
48
51
|
graphqlClient: ExpoGraphqlClient;
|
|
49
52
|
projectId: string;
|
|
50
53
|
platform: Platform;
|
|
51
54
|
nonInteractive: boolean;
|
|
52
55
|
limit?: number;
|
|
53
56
|
offset?: number;
|
|
57
|
+
buildProfile?: string;
|
|
54
58
|
}, maybeBuild?: BuildFragment): Promise<BuildFragment>;
|
|
55
59
|
maybeGetBuildAsync(graphqlClient: ExpoGraphqlClient, maybeBuildId?: string, maybePlatform?: Platform): Promise<BuildFragment | undefined>;
|
|
56
60
|
}
|
|
@@ -51,10 +51,18 @@ class BuildResign extends EasCommand_1.default {
|
|
|
51
51
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasBuild]);
|
|
52
52
|
const easJsonAccessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
|
|
53
53
|
const easJsonCliConfig = (await eas_json_1.EasJsonUtils.getCliConfigAsync(easJsonAccessor)) ?? {};
|
|
54
|
-
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.
|
|
54
|
+
const buildProfile = await eas_json_1.EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, flags.targetProfile ?? 'production');
|
|
55
55
|
const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: buildProfile.env });
|
|
56
56
|
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
|
|
57
|
-
const build = await this.ensureBuildSelectedAsync({
|
|
57
|
+
const build = await this.ensureBuildSelectedAsync({
|
|
58
|
+
graphqlClient,
|
|
59
|
+
projectId,
|
|
60
|
+
platform,
|
|
61
|
+
nonInteractive,
|
|
62
|
+
limit,
|
|
63
|
+
offset,
|
|
64
|
+
buildProfile: flags.sourceProfile,
|
|
65
|
+
}, maybeBuild);
|
|
58
66
|
const credentialsCtx = new context_1.CredentialsContext({
|
|
59
67
|
projectInfo: { exp, projectId },
|
|
60
68
|
nonInteractive,
|
|
@@ -132,12 +140,13 @@ class BuildResign extends EasCommand_1.default {
|
|
|
132
140
|
offset: flags.offset,
|
|
133
141
|
limit: flags.limit,
|
|
134
142
|
platform: flags.platform,
|
|
135
|
-
|
|
143
|
+
sourceProfile: flags['source-profile'],
|
|
144
|
+
targetProfile: flags['target-profile'],
|
|
136
145
|
maybeBuildId: flags.id,
|
|
137
146
|
wait: flags.wait,
|
|
138
147
|
};
|
|
139
148
|
}
|
|
140
|
-
async ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset, }, maybeBuild) {
|
|
149
|
+
async ensureBuildSelectedAsync({ graphqlClient, projectId, platform, nonInteractive, limit, offset, buildProfile, }, maybeBuild) {
|
|
141
150
|
if (maybeBuild) {
|
|
142
151
|
return maybeBuild;
|
|
143
152
|
}
|
|
@@ -154,6 +163,7 @@ class BuildResign extends EasCommand_1.default {
|
|
|
154
163
|
distribution: generated_1.DistributionType.Internal,
|
|
155
164
|
platform: (0, AppPlatform_1.toAppPlatform)(platform),
|
|
156
165
|
status: generated_1.BuildStatus.Finished,
|
|
166
|
+
buildProfile,
|
|
157
167
|
},
|
|
158
168
|
});
|
|
159
169
|
if (!build) {
|
|
@@ -185,9 +195,14 @@ BuildResign.flags = {
|
|
|
185
195
|
char: 'p',
|
|
186
196
|
options: ['android', 'ios'],
|
|
187
197
|
}),
|
|
188
|
-
profile: core_1.Flags.string({
|
|
198
|
+
'target-profile': core_1.Flags.string({
|
|
189
199
|
char: 'e',
|
|
190
|
-
description: 'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
200
|
+
description: 'Name of the target build profile from eas.json. Credentials and environment variables from this profile will be used when re-signing. Defaults to "production" if defined in eas.json.',
|
|
201
|
+
helpValue: 'PROFILE_NAME',
|
|
202
|
+
aliases: ['profile'],
|
|
203
|
+
}),
|
|
204
|
+
'source-profile': core_1.Flags.string({
|
|
205
|
+
description: 'Name of the source build profile from eas.json. Used to filter builds eligible for re-signing.',
|
|
191
206
|
helpValue: 'PROFILE_NAME',
|
|
192
207
|
}),
|
|
193
208
|
wait: core_1.Flags.boolean({
|
|
@@ -224,9 +224,8 @@ class Onboarding extends EasCommand_1.default {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
_a = Onboarding;
|
|
227
|
-
Onboarding.hidden = true;
|
|
228
227
|
Onboarding.aliases = ['init:onboarding', 'onboarding'];
|
|
229
|
-
Onboarding.description = 'continue onboarding process started on the expo.
|
|
228
|
+
Onboarding.description = 'continue onboarding process started on the https://expo.new website.';
|
|
230
229
|
Onboarding.flags = {};
|
|
231
230
|
Onboarding.args = [{ name: 'TARGET_PROJECT_DIRECTORY' }];
|
|
232
231
|
Onboarding.contextDefinition = {
|
|
@@ -317,7 +316,10 @@ async function configureProjectFromBareDefaultExpoTemplateAsync({ app, vcsClient
|
|
|
317
316
|
await vcsClient.trackFileAsync(easJsonPath);
|
|
318
317
|
log_1.default.log(`✅ Generated ${chalk_1.default.bold('eas.json')}. ${(0, log_1.learnMore)('https://docs.expo.dev/build-reference/eas-json/')}`);
|
|
319
318
|
log_1.default.log();
|
|
319
|
+
const baseExpoConfig = JSON.parse(await fs_extra_1.default.readFile(path_1.default.join(targetDir, 'app.json'), 'utf8'))
|
|
320
|
+
.expo;
|
|
320
321
|
const expoConfig = {
|
|
322
|
+
...baseExpoConfig,
|
|
321
323
|
name: app.name ?? app.slug,
|
|
322
324
|
slug: app.slug,
|
|
323
325
|
extra: {
|
|
@@ -333,9 +335,11 @@ async function configureProjectFromBareDefaultExpoTemplateAsync({ app, vcsClient
|
|
|
333
335
|
policy: 'appVersion',
|
|
334
336
|
},
|
|
335
337
|
ios: {
|
|
338
|
+
...baseExpoConfig.ios,
|
|
336
339
|
bundleIdentifier,
|
|
337
340
|
},
|
|
338
341
|
android: {
|
|
342
|
+
...baseExpoConfig.android,
|
|
339
343
|
package: bundleIdentifier,
|
|
340
344
|
},
|
|
341
345
|
};
|
|
@@ -155,8 +155,6 @@ async function handleBuildIdSourceAsync(ctx, source) {
|
|
|
155
155
|
async function handleBuildListSourceAsync(ctx) {
|
|
156
156
|
try {
|
|
157
157
|
const appPlatform = (0, AppPlatform_1.toAppPlatform)(ctx.platform);
|
|
158
|
-
const expiryDate = new Date(); // artifacts expire after 30 days
|
|
159
|
-
expiryDate.setDate(expiryDate.getDate() - 30);
|
|
160
158
|
const recentBuilds = await (0, builds_1.getRecentBuildsForSubmissionAsync)(ctx.graphqlClient, appPlatform, ctx.projectId, {
|
|
161
159
|
limit: exports.BUILD_LIST_ITEM_COUNT,
|
|
162
160
|
});
|
|
@@ -167,14 +165,14 @@ async function handleBuildListSourceAsync(ctx) {
|
|
|
167
165
|
sourceType: ArchiveSourceType.prompt,
|
|
168
166
|
});
|
|
169
167
|
}
|
|
170
|
-
if (recentBuilds.every(it => new Date(it.
|
|
168
|
+
if (recentBuilds.every(it => new Date(it.expirationDate) <= new Date())) {
|
|
171
169
|
log_1.default.error(chalk_1.default.bold('It looks like all of your build artifacts have expired. ' +
|
|
172
170
|
'EAS keeps your build artifacts only for 30 days.'));
|
|
173
171
|
return getArchiveAsync(ctx, {
|
|
174
172
|
sourceType: ArchiveSourceType.prompt,
|
|
175
173
|
});
|
|
176
174
|
}
|
|
177
|
-
const choices = recentBuilds.map(build => formatBuildChoice(build
|
|
175
|
+
const choices = recentBuilds.map(build => formatBuildChoice(build));
|
|
178
176
|
choices.push({
|
|
179
177
|
title: 'None of the above (select another option)',
|
|
180
178
|
value: null,
|
|
@@ -201,7 +199,7 @@ async function handleBuildListSourceAsync(ctx) {
|
|
|
201
199
|
throw err;
|
|
202
200
|
}
|
|
203
201
|
}
|
|
204
|
-
function formatBuildChoice(build
|
|
202
|
+
function formatBuildChoice(build) {
|
|
205
203
|
const { id, updatedAt, runtimeVersion, buildProfile, gitCommitHash, gitCommitMessage, channel, message, } = build;
|
|
206
204
|
const buildDate = new Date(updatedAt);
|
|
207
205
|
const splitCommitMessage = gitCommitMessage?.split('\n');
|
|
@@ -228,7 +226,7 @@ function formatBuildChoice(build, expiryDate) {
|
|
|
228
226
|
title,
|
|
229
227
|
description: filteredDescriptionArray.length > 0 ? filteredDescriptionArray.join('\n') : '',
|
|
230
228
|
value: build,
|
|
231
|
-
disabled:
|
|
229
|
+
disabled: new Date(build.expirationDate) < new Date(),
|
|
232
230
|
};
|
|
233
231
|
}
|
|
234
232
|
async function handlePromptSourceAsync(ctx) {
|
package/build/uploads.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface PresignedPost {
|
|
|
6
6
|
url: string;
|
|
7
7
|
fields: Record<string, string>;
|
|
8
8
|
}
|
|
9
|
-
export declare function uploadFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType, path: string, handleProgressEvent
|
|
9
|
+
export declare function uploadFileAtPathToGCSAsync(graphqlClient: ExpoGraphqlClient, type: UploadSessionType, path: string, handleProgressEvent?: ProgressHandler): Promise<string>;
|
|
10
10
|
export declare function uploadWithPresignedPostWithRetryAsync(file: string, presignedPost: PresignedPost, onAssetUploadBegin: () => void): Promise<Response>;
|
package/build/uploads.js
CHANGED
|
@@ -7,7 +7,7 @@ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
|
7
7
|
const promise_retry_1 = tslib_1.__importDefault(require("promise-retry"));
|
|
8
8
|
const fetch_1 = tslib_1.__importDefault(require("./fetch"));
|
|
9
9
|
const UploadSessionMutation_1 = require("./graphql/mutations/UploadSessionMutation");
|
|
10
|
-
async function uploadFileAtPathToGCSAsync(graphqlClient, type, path, handleProgressEvent) {
|
|
10
|
+
async function uploadFileAtPathToGCSAsync(graphqlClient, type, path, handleProgressEvent = () => { }) {
|
|
11
11
|
const signedUrl = await UploadSessionMutation_1.UploadSessionMutation.createUploadSessionAsync(graphqlClient, type);
|
|
12
12
|
await uploadWithSignedUrlWithProgressAsync(path, signedUrl, handleProgressEvent);
|
|
13
13
|
return signedUrl.bucketKey;
|