eas-cli 3.13.0 → 3.13.2
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 +68 -67
- package/build/build/build.js +9 -1
- package/build/build/createContext.d.ts +2 -2
- package/build/build/createContext.js +2 -2
- package/build/build/errors.d.ts +2 -0
- package/build/build/errors.js +4 -1
- package/build/build/ios/version.js +11 -2
- package/build/build/runBuildAndSubmit.d.ts +1 -1
- package/build/build/runBuildAndSubmit.js +6 -5
- package/build/build/types.d.ts +1 -0
- package/build/build/types.js +1 -0
- package/build/build/utils/formatBuild.js +2 -0
- package/build/build/utils/printBuildInfo.js +1 -1
- package/build/commandUtils/EasCommand.d.ts +7 -6
- package/build/commandUtils/EasCommand.js +7 -5
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +5 -2
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +24 -5
- package/build/commandUtils/context/{OptionalProjectConfigContextField.d.ts → OptionalPrivateProjectConfigContextField.d.ts} +1 -1
- package/build/commandUtils/context/{OptionalProjectConfigContextField.js → OptionalPrivateProjectConfigContextField.js} +5 -5
- package/build/commandUtils/context/{ProjectConfigContextField.d.ts → PrivateProjectConfigContextField.d.ts} +1 -1
- package/build/commandUtils/context/{ProjectConfigContextField.js → PrivateProjectConfigContextField.js} +5 -4
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +1 -1
- package/build/commands/branch/create.d.ts +1 -1
- package/build/commands/branch/create.js +1 -1
- package/build/commands/branch/delete.d.ts +1 -1
- package/build/commands/branch/delete.js +1 -1
- package/build/commands/branch/list.d.ts +1 -1
- package/build/commands/branch/list.js +1 -1
- package/build/commands/branch/rename.d.ts +1 -1
- package/build/commands/branch/rename.js +1 -1
- package/build/commands/branch/view.d.ts +1 -1
- package/build/commands/branch/view.js +1 -1
- package/build/commands/build/cancel.d.ts +1 -1
- package/build/commands/build/cancel.js +2 -2
- package/build/commands/build/configure.d.ts +1 -1
- package/build/commands/build/configure.js +1 -1
- package/build/commands/build/index.d.ts +2 -1
- package/build/commands/build/index.js +2 -2
- package/build/commands/build/inspect.d.ts +2 -1
- package/build/commands/build/inspect.js +2 -2
- package/build/commands/build/internal.d.ts +2 -1
- package/build/commands/build/internal.js +2 -2
- package/build/commands/build/list.d.ts +1 -1
- package/build/commands/build/list.js +5 -1
- package/build/commands/build/resign.d.ts +2 -1
- package/build/commands/build/resign.js +2 -2
- package/build/commands/build/run.d.ts +1 -1
- package/build/commands/build/run.js +1 -1
- package/build/commands/build/version/get.d.ts +2 -1
- package/build/commands/build/version/get.js +2 -2
- package/build/commands/build/version/set.d.ts +2 -1
- package/build/commands/build/version/set.js +2 -2
- package/build/commands/build/version/sync.d.ts +2 -1
- package/build/commands/build/version/sync.js +2 -2
- package/build/commands/build/view.d.ts +1 -1
- package/build/commands/build/view.js +1 -1
- package/build/commands/channel/create.d.ts +1 -1
- package/build/commands/channel/create.js +1 -1
- package/build/commands/channel/delete.d.ts +1 -1
- package/build/commands/channel/delete.js +1 -1
- package/build/commands/channel/edit.d.ts +1 -1
- package/build/commands/channel/edit.js +1 -1
- package/build/commands/channel/list.d.ts +1 -1
- package/build/commands/channel/list.js +1 -1
- package/build/commands/channel/rollout.d.ts +1 -1
- package/build/commands/channel/rollout.js +1 -1
- package/build/commands/channel/view.d.ts +1 -1
- package/build/commands/channel/view.js +1 -1
- package/build/commands/config.d.ts +2 -1
- package/build/commands/config.js +2 -3
- package/build/commands/credentials.d.ts +3 -2
- package/build/commands/credentials.js +2 -2
- package/build/commands/device/create.d.ts +1 -1
- package/build/commands/device/create.js +2 -2
- package/build/commands/device/delete.d.ts +1 -1
- package/build/commands/device/delete.js +1 -1
- package/build/commands/device/list.d.ts +1 -1
- package/build/commands/device/list.js +1 -1
- package/build/commands/device/rename.d.ts +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/device/view.d.ts +1 -1
- package/build/commands/device/view.js +1 -1
- package/build/commands/metadata/pull.d.ts +1 -1
- package/build/commands/metadata/pull.js +1 -1
- package/build/commands/metadata/push.d.ts +1 -1
- package/build/commands/metadata/push.js +1 -1
- package/build/commands/open.d.ts +1 -1
- package/build/commands/open.js +1 -1
- package/build/commands/project/info.d.ts +1 -1
- package/build/commands/project/info.js +1 -1
- package/build/commands/project/init.js +3 -3
- package/build/commands/secret/create.d.ts +1 -1
- package/build/commands/secret/create.js +1 -1
- package/build/commands/secret/delete.d.ts +1 -1
- package/build/commands/secret/delete.js +1 -1
- package/build/commands/secret/list.d.ts +1 -1
- package/build/commands/secret/list.js +1 -1
- package/build/commands/secret/push.d.ts +1 -1
- package/build/commands/secret/push.js +1 -1
- package/build/commands/submit.d.ts +1 -1
- package/build/commands/submit.js +1 -1
- package/build/commands/update/configure.d.ts +1 -1
- package/build/commands/update/configure.js +1 -1
- package/build/commands/update/index.d.ts +2 -1
- package/build/commands/update/index.js +4 -8
- package/build/commands/update/list.d.ts +1 -1
- package/build/commands/update/list.js +1 -1
- package/build/commands/update/republish.d.ts +1 -1
- package/build/commands/update/republish.js +1 -1
- package/build/commands/update/roll-back-to-embedded.d.ts +2 -1
- package/build/commands/update/roll-back-to-embedded.js +4 -8
- package/build/commands/webhook/create.d.ts +1 -1
- package/build/commands/webhook/create.js +1 -1
- package/build/commands/webhook/delete.d.ts +1 -1
- package/build/commands/webhook/delete.js +1 -1
- package/build/commands/webhook/list.d.ts +1 -1
- package/build/commands/webhook/list.js +1 -1
- package/build/credentials/context.d.ts +0 -3
- package/build/credentials/context.js +1 -10
- package/build/credentials/ios/actions/DeviceUtils.js +1 -0
- package/build/credentials/ios/actions/SetUpAscApiKey.js +3 -3
- package/build/credentials/manager/HelperActions.d.ts +1 -1
- package/build/credentials/manager/ManageAndroid.js +1 -1
- package/build/credentials/manager/ManageIos.js +1 -1
- package/build/credentials/manager/SelectPlatform.d.ts +2 -2
- package/build/credentials/manager/SelectPlatform.js +2 -2
- package/build/easMultiselect.d.ts +24 -0
- package/build/easMultiselect.js +46 -0
- package/build/graphql/generated.d.ts +61 -10
- package/build/graphql/generated.js +2 -0
- package/build/graphql/types/Update.js +1 -1
- package/build/project/expoConfig.d.ts +7 -2
- package/build/project/expoConfig.js +10 -3
- package/build/prompts.d.ts +2 -1
- package/build/prompts.js +5 -1
- package/build/submit/ios/AscApiKeySource.d.ts +7 -2
- package/build/submit/ios/AscApiKeySource.js +63 -1
- package/build/submit/ios/IosSubmitCommand.d.ts +0 -1
- package/build/submit/ios/IosSubmitCommand.js +4 -49
- package/build/submit/ios/IosSubmitter.d.ts +0 -2
- package/build/submit/ios/IosSubmitter.js +1 -6
- package/build/update/utils.d.ts +2 -2
- package/build/update/utils.js +4 -2
- package/build/user/User.d.ts +2 -2
- package/build/user/User.js +5 -4
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +0 -10
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +0 -53
- package/build/submit/ios/CredentialsServiceSource.d.ts +0 -18
- package/build/submit/ios/CredentialsServiceSource.js +0 -62
|
@@ -13,7 +13,7 @@ export default class EnvironmentSecretCreate extends EasCommand {
|
|
|
13
13
|
};
|
|
14
14
|
static contextDefinition: {
|
|
15
15
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
16
|
-
|
|
16
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
17
17
|
};
|
|
18
18
|
runAsync(): Promise<void>;
|
|
19
19
|
}
|
|
@@ -18,7 +18,7 @@ const prompts_1 = require("../../prompts");
|
|
|
18
18
|
class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
20
|
let { flags: { name, value: secretValue, scope, force, type: secretType, 'non-interactive': nonInteractive, }, } = await this.parse(EnvironmentSecretCreate);
|
|
21
|
-
const {
|
|
21
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretCreate, {
|
|
22
22
|
nonInteractive,
|
|
23
23
|
});
|
|
24
24
|
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
@@ -7,7 +7,7 @@ export default class EnvironmentSecretDelete extends EasCommand {
|
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
9
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
10
|
-
|
|
10
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
11
11
|
};
|
|
12
12
|
runAsync(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -12,7 +12,7 @@ const prompts_1 = require("../../prompts");
|
|
|
12
12
|
class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
14
|
let { flags: { id, 'non-interactive': nonInteractive }, } = await this.parse(EnvironmentSecretDelete);
|
|
15
|
-
const {
|
|
15
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretDelete, {
|
|
16
16
|
nonInteractive,
|
|
17
17
|
});
|
|
18
18
|
let secret;
|
|
@@ -3,7 +3,7 @@ export default class EnvironmentSecretList extends EasCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static contextDefinition: {
|
|
5
5
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
6
|
-
|
|
6
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
7
7
|
};
|
|
8
8
|
runAsync(): Promise<void>;
|
|
9
9
|
}
|
|
@@ -10,7 +10,7 @@ const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
|
10
10
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
11
11
|
class EnvironmentSecretList extends EasCommand_1.default {
|
|
12
12
|
async runAsync() {
|
|
13
|
-
const {
|
|
13
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretList, {
|
|
14
14
|
nonInteractive: true,
|
|
15
15
|
});
|
|
16
16
|
const secrets = await EnvironmentSecretsQuery_1.EnvironmentSecretsQuery.allAsync(graphqlClient, projectId);
|
|
@@ -10,7 +10,7 @@ export default class EnvironmentSecretPush extends EasCommand {
|
|
|
10
10
|
};
|
|
11
11
|
static contextDefinition: {
|
|
12
12
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
|
-
|
|
13
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
14
14
|
};
|
|
15
15
|
runAsync(): Promise<void>;
|
|
16
16
|
}
|
|
@@ -20,7 +20,7 @@ const intersection_1 = tslib_1.__importDefault(require("../../utils/expodash/int
|
|
|
20
20
|
class EnvironmentSecretPush extends EasCommand_1.default {
|
|
21
21
|
async runAsync() {
|
|
22
22
|
const { flags: { scope, force, 'env-file': maybeEnvFilePath, 'non-interactive': nonInteractive }, } = await this.parse(EnvironmentSecretPush);
|
|
23
|
-
const {
|
|
23
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvironmentSecretPush, {
|
|
24
24
|
nonInteractive,
|
|
25
25
|
});
|
|
26
26
|
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
@@ -17,7 +17,7 @@ export default class Submit extends EasCommand {
|
|
|
17
17
|
analytics: import("../commandUtils/context/AnalyticsContextField").default;
|
|
18
18
|
projectDir: import("../commandUtils/context/ProjectDirContextField").default;
|
|
19
19
|
loggedIn: import("../commandUtils/context/LoggedInContextField").default;
|
|
20
|
-
|
|
20
|
+
privateProjectConfig: import("../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
21
21
|
};
|
|
22
22
|
runAsync(): Promise<void>;
|
|
23
23
|
private sanitizeFlags;
|
package/build/commands/submit.js
CHANGED
|
@@ -18,7 +18,7 @@ const statuspageService_1 = require("../utils/statuspageService");
|
|
|
18
18
|
class Submit extends EasCommand_1.default {
|
|
19
19
|
async runAsync() {
|
|
20
20
|
const { flags: rawFlags } = await this.parse(Submit);
|
|
21
|
-
const { loggedIn: { actor, graphqlClient },
|
|
21
|
+
const { loggedIn: { actor, graphqlClient }, privateProjectConfig: { exp, projectId, projectDir }, analytics, } = await this.getContextAsync(Submit, {
|
|
22
22
|
nonInteractive: false,
|
|
23
23
|
});
|
|
24
24
|
const flags = this.sanitizeFlags(rawFlags);
|
|
@@ -7,7 +7,7 @@ export default class UpdateConfigure extends EasCommand {
|
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
9
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
10
|
-
|
|
10
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
11
11
|
};
|
|
12
12
|
runAsync(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -12,7 +12,7 @@ class UpdateConfigure extends EasCommand_1.default {
|
|
|
12
12
|
async runAsync() {
|
|
13
13
|
const { flags } = await this.parse(UpdateConfigure);
|
|
14
14
|
const platform = flags.platform;
|
|
15
|
-
const {
|
|
15
|
+
const { privateProjectConfig: { projectId, exp, projectDir }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateConfigure, {
|
|
16
16
|
nonInteractive: flags['non-interactive'],
|
|
17
17
|
});
|
|
18
18
|
log_1.default.log('💡 The following process will configure your project to run EAS Update. These changes only apply to your local project files and you can safely revert them at any time.');
|
|
@@ -18,7 +18,8 @@ export default class UpdatePublish extends EasCommand {
|
|
|
18
18
|
};
|
|
19
19
|
static contextDefinition: {
|
|
20
20
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
21
|
-
|
|
21
|
+
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
22
|
+
getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
22
23
|
};
|
|
23
24
|
runAsync(): Promise<void>;
|
|
24
25
|
private sanitizeFlags;
|
|
@@ -31,15 +31,13 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
31
31
|
const { flags: rawFlags } = await this.parse(UpdatePublish);
|
|
32
32
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
33
33
|
const { auto: autoFlag, platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
34
|
-
const {
|
|
34
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdatePublish, {
|
|
35
35
|
nonInteractive,
|
|
36
36
|
});
|
|
37
37
|
if (jsonFlag) {
|
|
38
38
|
(0, json_1.enableJsonOutput)();
|
|
39
39
|
}
|
|
40
|
-
const { exp: expPossiblyWithoutEasUpdateConfigured, projectId, projectDir, } = await
|
|
41
|
-
isPublicConfig: true,
|
|
42
|
-
});
|
|
40
|
+
const { exp: expPossiblyWithoutEasUpdateConfigured, projectId, projectDir, } = await getDynamicPublicProjectConfigAsync();
|
|
43
41
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasUpdate]);
|
|
44
42
|
await (0, configure_1.ensureEASUpdateIsConfiguredAsync)(graphqlClient, {
|
|
45
43
|
exp: expPossiblyWithoutEasUpdateConfigured,
|
|
@@ -47,10 +45,8 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
47
45
|
projectDir,
|
|
48
46
|
projectId,
|
|
49
47
|
});
|
|
50
|
-
const { exp } = await
|
|
51
|
-
const { exp: expPrivate } = await
|
|
52
|
-
isPublicConfig: false,
|
|
53
|
-
});
|
|
48
|
+
const { exp } = await getDynamicPublicProjectConfigAsync();
|
|
49
|
+
const { exp: expPrivate } = await getDynamicPrivateProjectConfigAsync();
|
|
54
50
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
55
51
|
const branchName = await (0, publish_1.getBranchNameForCommandAsync)({
|
|
56
52
|
graphqlClient,
|
|
@@ -11,7 +11,7 @@ export default class UpdateList extends EasCommand {
|
|
|
11
11
|
};
|
|
12
12
|
static contextDefinition: {
|
|
13
13
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
|
-
|
|
14
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
15
15
|
};
|
|
16
16
|
runAsync(): Promise<void>;
|
|
17
17
|
}
|
|
@@ -13,7 +13,7 @@ class UpdateList extends EasCommand_1.default {
|
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const { flags } = await this.parse(UpdateList);
|
|
15
15
|
const { branch: branchFlag, all, json: jsonFlag, 'non-interactive': nonInteractive } = flags;
|
|
16
|
-
const {
|
|
16
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateList, {
|
|
17
17
|
nonInteractive,
|
|
18
18
|
});
|
|
19
19
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
|
|
@@ -31,7 +31,7 @@ export default class UpdateRepublish extends EasCommand {
|
|
|
31
31
|
};
|
|
32
32
|
static contextDefinition: {
|
|
33
33
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
34
|
-
|
|
34
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
35
35
|
};
|
|
36
36
|
runAsync(): Promise<void>;
|
|
37
37
|
sanitizeFlags(rawFlags: UpdateRepublishRawFlags): UpdateRepublishFlags;
|
|
@@ -23,7 +23,7 @@ class UpdateRepublish extends EasCommand_1.default {
|
|
|
23
23
|
async runAsync() {
|
|
24
24
|
const { flags: rawFlags } = await this.parse(UpdateRepublish);
|
|
25
25
|
const flags = this.sanitizeFlags(rawFlags);
|
|
26
|
-
const {
|
|
26
|
+
const { privateProjectConfig: { exp, projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateRepublish, {
|
|
27
27
|
nonInteractive: flags.nonInteractive,
|
|
28
28
|
});
|
|
29
29
|
if (flags.json) {
|
|
@@ -14,7 +14,8 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
|
14
14
|
};
|
|
15
15
|
static contextDefinition: {
|
|
16
16
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
17
|
-
|
|
17
|
+
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
18
|
+
getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
18
19
|
};
|
|
19
20
|
runAsync(): Promise<void>;
|
|
20
21
|
private publishRollbacksAsync;
|
|
@@ -31,15 +31,13 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
31
31
|
const { flags: rawFlags } = await this.parse(UpdateRollBackToEmbedded);
|
|
32
32
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
33
33
|
const { auto: autoFlag, platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
34
|
-
const {
|
|
34
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateRollBackToEmbedded, {
|
|
35
35
|
nonInteractive,
|
|
36
36
|
});
|
|
37
37
|
if (jsonFlag) {
|
|
38
38
|
(0, json_1.enableJsonOutput)();
|
|
39
39
|
}
|
|
40
|
-
const { exp: expPossiblyWithoutEasUpdateConfigured, projectId, projectDir, } = await
|
|
41
|
-
isPublicConfig: true,
|
|
42
|
-
});
|
|
40
|
+
const { exp: expPossiblyWithoutEasUpdateConfigured, projectId, projectDir, } = await getDynamicPublicProjectConfigAsync();
|
|
43
41
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasUpdate]);
|
|
44
42
|
await (0, configure_1.ensureEASUpdateIsConfiguredAsync)(graphqlClient, {
|
|
45
43
|
exp: expPossiblyWithoutEasUpdateConfigured,
|
|
@@ -47,10 +45,8 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
47
45
|
projectDir,
|
|
48
46
|
projectId,
|
|
49
47
|
});
|
|
50
|
-
const { exp } = await
|
|
51
|
-
const { exp: expPrivate } = await
|
|
52
|
-
isPublicConfig: false,
|
|
53
|
-
});
|
|
48
|
+
const { exp } = await getDynamicPublicProjectConfigAsync();
|
|
49
|
+
const { exp: expPrivate } = await getDynamicPrivateProjectConfigAsync();
|
|
54
50
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
55
51
|
const branchName = await (0, publish_1.getBranchNameForCommandAsync)({
|
|
56
52
|
graphqlClient,
|
|
@@ -10,7 +10,7 @@ export default class WebhookCreate extends EasCommand {
|
|
|
10
10
|
};
|
|
11
11
|
static contextDefinition: {
|
|
12
12
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
13
|
-
|
|
13
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
14
14
|
};
|
|
15
15
|
runAsync(): Promise<void>;
|
|
16
16
|
}
|
|
@@ -12,7 +12,7 @@ const input_1 = require("../../webhooks/input");
|
|
|
12
12
|
class WebhookCreate extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const { flags } = await this.parse(WebhookCreate);
|
|
15
|
-
const {
|
|
15
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(WebhookCreate, {
|
|
16
16
|
nonInteractive: flags['non-interactive'],
|
|
17
17
|
});
|
|
18
18
|
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)(flags);
|
|
@@ -11,7 +11,7 @@ export default class WebhookDelete extends EasCommand {
|
|
|
11
11
|
};
|
|
12
12
|
static contextDefinition: {
|
|
13
13
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
|
-
|
|
14
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
15
15
|
};
|
|
16
16
|
runAsync(): Promise<void>;
|
|
17
17
|
}
|
|
@@ -16,7 +16,7 @@ const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
|
16
16
|
class WebhookDelete extends EasCommand_1.default {
|
|
17
17
|
async runAsync() {
|
|
18
18
|
let { args: { ID: webhookId }, flags: { 'non-interactive': nonInteractive }, } = await this.parse(WebhookDelete);
|
|
19
|
-
const {
|
|
19
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(WebhookDelete, {
|
|
20
20
|
nonInteractive,
|
|
21
21
|
});
|
|
22
22
|
let webhook = webhookId && (await WebhookQuery_1.WebhookQuery.byIdAsync(graphqlClient, webhookId));
|
|
@@ -8,7 +8,7 @@ export default class WebhookList extends EasCommand {
|
|
|
8
8
|
};
|
|
9
9
|
static contextDefinition: {
|
|
10
10
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
11
|
-
|
|
11
|
+
privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
|
|
12
12
|
};
|
|
13
13
|
runAsync(): Promise<void>;
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ class WebhookList extends EasCommand_1.default {
|
|
|
19
19
|
if (json) {
|
|
20
20
|
(0, json_1.enableJsonOutput)();
|
|
21
21
|
}
|
|
22
|
-
const {
|
|
22
|
+
const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(WebhookList, {
|
|
23
23
|
nonInteractive: true,
|
|
24
24
|
});
|
|
25
25
|
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(graphqlClient, projectId);
|
|
@@ -34,9 +34,6 @@ export declare class CredentialsContext {
|
|
|
34
34
|
analytics: Analytics;
|
|
35
35
|
env?: Env;
|
|
36
36
|
});
|
|
37
|
-
static getExpoConfigInProject(projectDir: string, { env }?: {
|
|
38
|
-
env?: Env;
|
|
39
|
-
}): ExpoConfig | null;
|
|
40
37
|
get hasProjectContext(): boolean;
|
|
41
38
|
get exp(): ExpoConfig;
|
|
42
39
|
get projectId(): string;
|
|
@@ -26,15 +26,6 @@ class CredentialsContext {
|
|
|
26
26
|
this.nonInteractive = (_a = options.nonInteractive) !== null && _a !== void 0 ? _a : false;
|
|
27
27
|
this.projectInfo = options.projectInfo;
|
|
28
28
|
}
|
|
29
|
-
static getExpoConfigInProject(projectDir, { env } = {}) {
|
|
30
|
-
try {
|
|
31
|
-
return (0, expoConfig_1.getExpoConfig)(projectDir, { env });
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// ignore error, context might be created outside of expo project
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
29
|
get hasProjectContext() {
|
|
39
30
|
return !!this.projectInfo;
|
|
40
31
|
}
|
|
@@ -51,7 +42,7 @@ class CredentialsContext {
|
|
|
51
42
|
return;
|
|
52
43
|
}
|
|
53
44
|
// trigger getConfig error
|
|
54
|
-
(0, expoConfig_1.
|
|
45
|
+
(0, expoConfig_1.getPrivateExpoConfig)(this.options.projectDir);
|
|
55
46
|
}
|
|
56
47
|
async bestEffortAppStoreAuthenticateAsync() {
|
|
57
48
|
if (this.appStore.authCtx || !this.shouldAskAuthenticateAppStore) {
|
|
@@ -10,6 +10,7 @@ async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = [])
|
|
|
10
10
|
const { devices } = await (0, prompts_1.promptAsync)({
|
|
11
11
|
type: 'multiselect',
|
|
12
12
|
name: 'devices',
|
|
13
|
+
selectionFormat: '<num> devices selected',
|
|
13
14
|
message: 'Select devices for the ad hoc build:',
|
|
14
15
|
hint: '- Space to select. Return to submit',
|
|
15
16
|
choices: allDevices.map(device => ({
|
|
@@ -22,10 +22,10 @@ class SetUpAscApiKey {
|
|
|
22
22
|
this.purpose = purpose;
|
|
23
23
|
this.choices = [
|
|
24
24
|
{
|
|
25
|
-
title: '[Choose an existing
|
|
25
|
+
title: '[Choose an existing key]',
|
|
26
26
|
value: SetupAscApiKeyChoice.USE_EXISTING,
|
|
27
27
|
},
|
|
28
|
-
{ title: '[Add a new
|
|
28
|
+
{ title: '[Add a new key]', value: SetupAscApiKeyChoice.GENERATE },
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
async runAsync(ctx) {
|
|
@@ -91,7 +91,7 @@ class SetUpAscApiKey {
|
|
|
91
91
|
const result = await (0, prompts_1.promptAsync)({
|
|
92
92
|
type: 'select',
|
|
93
93
|
name: 'choice',
|
|
94
|
-
message: 'Select
|
|
94
|
+
message: 'Select the App Store Connect Api Key to use for your project:',
|
|
95
95
|
choices,
|
|
96
96
|
});
|
|
97
97
|
choice = result.choice;
|
|
@@ -8,7 +8,7 @@ export interface Action<T = void> {
|
|
|
8
8
|
graphqlClient: ExpoGraphqlClient;
|
|
9
9
|
analytics: Analytics;
|
|
10
10
|
projectInfo: CredentialsContextProjectInfo | null;
|
|
11
|
-
|
|
11
|
+
getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn;
|
|
12
12
|
runAsync(ctx: CredentialsContext): Promise<T>;
|
|
13
13
|
}
|
|
14
14
|
export declare class PressAnyKeyToContinue {
|
|
@@ -40,7 +40,7 @@ class ManageAndroid {
|
|
|
40
40
|
: null;
|
|
41
41
|
let projectInfo = null;
|
|
42
42
|
if (hasProjectContext) {
|
|
43
|
-
const { exp, projectId } = await this.callingAction.
|
|
43
|
+
const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
|
|
44
44
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
45
45
|
});
|
|
46
46
|
projectInfo = { exp, projectId };
|
|
@@ -50,7 +50,7 @@ class ManageIos {
|
|
|
50
50
|
: null;
|
|
51
51
|
let projectInfo = null;
|
|
52
52
|
if (this.callingAction.projectInfo) {
|
|
53
|
-
const { exp, projectId } = await this.callingAction.
|
|
53
|
+
const { exp, projectId } = await this.callingAction.getDynamicPrivateProjectConfigAsync({
|
|
54
54
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
55
55
|
});
|
|
56
56
|
projectInfo = { exp, projectId };
|
|
@@ -8,8 +8,8 @@ export declare class SelectPlatform {
|
|
|
8
8
|
readonly graphqlClient: ExpoGraphqlClient;
|
|
9
9
|
readonly analytics: Analytics;
|
|
10
10
|
readonly projectInfo: CredentialsContextProjectInfo | null;
|
|
11
|
-
readonly
|
|
11
|
+
readonly getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn;
|
|
12
12
|
private readonly flagPlatform?;
|
|
13
|
-
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null,
|
|
13
|
+
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn, flagPlatform?: string | undefined);
|
|
14
14
|
runAsync(): Promise<void>;
|
|
15
15
|
}
|
|
@@ -5,12 +5,12 @@ const platform_1 = require("../../platform");
|
|
|
5
5
|
const ManageAndroid_1 = require("./ManageAndroid");
|
|
6
6
|
const ManageIos_1 = require("./ManageIos");
|
|
7
7
|
class SelectPlatform {
|
|
8
|
-
constructor(actor, graphqlClient, analytics, projectInfo,
|
|
8
|
+
constructor(actor, graphqlClient, analytics, projectInfo, getDynamicPrivateProjectConfigAsync, flagPlatform) {
|
|
9
9
|
this.actor = actor;
|
|
10
10
|
this.graphqlClient = graphqlClient;
|
|
11
11
|
this.analytics = analytics;
|
|
12
12
|
this.projectInfo = projectInfo;
|
|
13
|
-
this.
|
|
13
|
+
this.getDynamicPrivateProjectConfigAsync = getDynamicPrivateProjectConfigAsync;
|
|
14
14
|
this.flagPlatform = flagPlatform;
|
|
15
15
|
}
|
|
16
16
|
async runAsync() {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Choice, PromptObject } from 'prompts';
|
|
2
|
+
import { MultiselectPrompt } from 'prompts/lib/elements';
|
|
3
|
+
export type Question<T extends string = string> = PromptObject<T> & {
|
|
4
|
+
selectionFormat?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Customized multiselect prompt.
|
|
8
|
+
*
|
|
9
|
+
* Additional parameters:
|
|
10
|
+
*
|
|
11
|
+
* @param selectionFormat
|
|
12
|
+
* String indicating number of selected options. Should contain `<num>` substring.
|
|
13
|
+
*
|
|
14
|
+
* Example:
|
|
15
|
+
* 'Selected <num> devices'
|
|
16
|
+
*
|
|
17
|
+
* Short format is used when more than one option is selected.
|
|
18
|
+
*
|
|
19
|
+
**/
|
|
20
|
+
export default class EasMultiselect extends MultiselectPrompt {
|
|
21
|
+
constructor(opts: Question);
|
|
22
|
+
renderDoneOrInstructions(): string;
|
|
23
|
+
}
|
|
24
|
+
export declare const easMultiselect: (args: Question) => Promise<Choice[]>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.easMultiselect = void 0;
|
|
4
|
+
const elements_1 = require("prompts/lib/elements");
|
|
5
|
+
const noop = () => { };
|
|
6
|
+
/**
|
|
7
|
+
* Customized multiselect prompt.
|
|
8
|
+
*
|
|
9
|
+
* Additional parameters:
|
|
10
|
+
*
|
|
11
|
+
* @param selectionFormat
|
|
12
|
+
* String indicating number of selected options. Should contain `<num>` substring.
|
|
13
|
+
*
|
|
14
|
+
* Example:
|
|
15
|
+
* 'Selected <num> devices'
|
|
16
|
+
*
|
|
17
|
+
* Short format is used when more than one option is selected.
|
|
18
|
+
*
|
|
19
|
+
**/
|
|
20
|
+
class EasMultiselect extends elements_1.MultiselectPrompt {
|
|
21
|
+
constructor(opts) {
|
|
22
|
+
super(opts);
|
|
23
|
+
this.selectionFormat = opts.selectionFormat;
|
|
24
|
+
}
|
|
25
|
+
renderDoneOrInstructions() {
|
|
26
|
+
if (this.done && this.selectionFormat && this.value) {
|
|
27
|
+
const selectedOptionsCount = this.value.filter(e => e.selected).length;
|
|
28
|
+
if (selectedOptionsCount > 1) {
|
|
29
|
+
return this.selectionFormat.replace('<num>', selectedOptionsCount.toString());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return super.renderDoneOrInstructions();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = EasMultiselect;
|
|
36
|
+
const easMultiselect = (args) => {
|
|
37
|
+
const toSelected = (items) => items.filter(item => item.selected).map(item => item.value);
|
|
38
|
+
return new Promise((res, rej) => {
|
|
39
|
+
const p = new EasMultiselect(args);
|
|
40
|
+
const onAbort = toSelected || noop;
|
|
41
|
+
const onSubmit = toSelected || noop;
|
|
42
|
+
p.on('submit', x => res(onSubmit(x)));
|
|
43
|
+
p.on('abort', x => rej(onAbort(x)));
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
exports.easMultiselect = easMultiselect;
|