eas-cli 2.1.0 → 2.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 +6 -1047
- package/build/branch/queries.d.ts +10 -2
- package/build/branch/queries.js +30 -30
- package/build/branch/utils.d.ts +4 -0
- package/build/branch/utils.js +15 -0
- package/build/build/android/build.js +3 -3
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.d.ts +2 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/build.js +15 -4
- package/build/build/configure.js +2 -2
- package/build/build/createContext.d.ts +5 -1
- package/build/build/createContext.js +8 -14
- package/build/build/ios/build.js +2 -1
- package/build/build/ios/credentials.js +1 -1
- package/build/build/ios/prepareJob.js +1 -2
- package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
- package/build/build/ios/syncProjectConfiguration.js +2 -2
- package/build/build/local.js +1 -1
- package/build/build/metadata.js +1 -2
- package/build/build/queries.d.ts +9 -0
- package/build/build/queries.js +51 -0
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +15 -7
- package/build/build/utils/repository.js +5 -1
- package/build/channel/queries.d.ts +17 -0
- package/build/channel/queries.js +137 -0
- package/build/channel/utils.d.ts +22 -0
- package/build/channel/utils.js +87 -0
- package/build/commandUtils/EasCommand.d.ts +68 -7
- package/build/commandUtils/EasCommand.js +60 -79
- package/build/commandUtils/context/ActorContextField.d.ts +5 -0
- package/build/commandUtils/context/ActorContextField.js +11 -0
- package/build/commandUtils/context/ContextField.d.ts +6 -0
- package/build/commandUtils/context/ContextField.js +5 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
- package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
- package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
- package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
- package/build/commandUtils/context/ProjectDirContextField.js +11 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
- package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
- package/build/commandUtils/flags.d.ts +10 -0
- package/build/commandUtils/flags.js +23 -0
- package/build/commandUtils/pagination.d.ts +7 -4
- package/build/commandUtils/pagination.js +11 -15
- package/build/commands/account/login.d.ts +0 -2
- package/build/commands/account/login.js +2 -7
- package/build/commands/account/logout.d.ts +0 -2
- package/build/commands/account/logout.js +0 -5
- package/build/commands/account/view.d.ts +0 -2
- package/build/commands/account/view.js +0 -5
- package/build/commands/analytics.d.ts +0 -1
- package/build/commands/analytics.js +0 -4
- package/build/commands/branch/create.d.ts +4 -0
- package/build/commands/branch/create.js +18 -18
- package/build/commands/branch/delete.d.ts +4 -0
- package/build/commands/branch/delete.js +29 -26
- package/build/commands/branch/list.d.ts +5 -2
- package/build/commands/branch/list.js +13 -8
- package/build/commands/branch/rename.d.ts +5 -1
- package/build/commands/branch/rename.js +15 -13
- package/build/commands/branch/view.d.ts +5 -2
- package/build/commands/branch/view.js +31 -13
- package/build/commands/build/cancel.d.ts +7 -0
- package/build/commands/build/cancel.js +50 -23
- package/build/commands/build/configure.d.ts +3 -0
- package/build/commands/build/configure.js +12 -7
- package/build/commands/build/index.d.ts +7 -2
- package/build/commands/build/index.js +31 -23
- package/build/commands/build/inspect.d.ts +5 -0
- package/build/commands/build/inspect.js +12 -3
- package/build/commands/build/list.d.ts +7 -2
- package/build/commands/build/list.js +36 -59
- package/build/commands/build/version/set.d.ts +5 -0
- package/build/commands/build/version/set.js +22 -14
- package/build/commands/build/version/sync.d.ts +5 -0
- package/build/commands/build/version/sync.js +22 -13
- package/build/commands/build/view.d.ts +3 -0
- package/build/commands/build/view.js +20 -14
- package/build/commands/channel/create.d.ts +4 -0
- package/build/commands/channel/create.js +32 -25
- package/build/commands/channel/delete.d.ts +3 -0
- package/build/commands/channel/delete.js +36 -59
- package/build/commands/channel/edit.d.ts +7 -7
- package/build/commands/channel/edit.js +39 -72
- package/build/commands/channel/list.d.ts +6 -0
- package/build/commands/channel/list.js +20 -76
- package/build/commands/channel/rollout.d.ts +5 -1
- package/build/commands/channel/rollout.js +34 -35
- package/build/commands/channel/view.d.ts +6 -33
- package/build/commands/channel/view.js +31 -132
- package/build/commands/config.d.ts +6 -2
- package/build/commands/config.js +22 -13
- package/build/commands/credentials.d.ts +4 -0
- package/build/commands/credentials.js +10 -1
- package/build/commands/device/create.d.ts +4 -0
- package/build/commands/device/create.js +15 -3
- package/build/commands/device/delete.d.ts +13 -8
- package/build/commands/device/delete.js +81 -130
- package/build/commands/device/list.d.ts +7 -0
- package/build/commands/device/list.js +42 -63
- package/build/commands/device/view.d.ts +3 -0
- package/build/commands/device/view.js +10 -5
- package/build/commands/diagnostics.d.ts +3 -1
- package/build/commands/diagnostics.js +10 -8
- package/build/commands/metadata/pull.d.ts +4 -0
- package/build/commands/metadata/pull.js +13 -8
- package/build/commands/metadata/push.d.ts +4 -0
- package/build/commands/metadata/push.js +13 -8
- package/build/commands/open.d.ts +3 -0
- package/build/commands/open.js +11 -9
- package/build/commands/project/info.d.ts +3 -0
- package/build/commands/project/info.js +9 -6
- package/build/commands/project/init.d.ts +12 -0
- package/build/commands/project/init.js +155 -8
- package/build/commands/secret/create.d.ts +6 -0
- package/build/commands/secret/create.js +87 -30
- package/build/commands/secret/delete.d.ts +4 -0
- package/build/commands/secret/delete.js +28 -19
- package/build/commands/secret/list.d.ts +3 -0
- package/build/commands/secret/list.js +19 -13
- package/build/commands/submit.d.ts +5 -0
- package/build/commands/submit.js +16 -7
- package/build/commands/update/configure.d.ts +3 -0
- package/build/commands/update/configure.js +22 -16
- package/build/commands/update/delete.d.ts +1 -0
- package/build/commands/update/delete.js +4 -7
- package/build/commands/update/index.d.ts +8 -12
- package/build/commands/update/index.js +90 -166
- package/build/commands/update/list.d.ts +8 -2
- package/build/commands/update/list.js +51 -81
- package/build/commands/update/view.d.ts +0 -4
- package/build/commands/update/view.js +14 -51
- package/build/commands/webhook/create.d.ts +4 -0
- package/build/commands/webhook/create.js +10 -5
- package/build/commands/webhook/delete.d.ts +6 -0
- package/build/commands/webhook/delete.js +26 -14
- package/build/commands/webhook/list.d.ts +3 -0
- package/build/commands/webhook/list.js +13 -9
- package/build/commands/webhook/update.d.ts +1 -0
- package/build/commands/webhook/update.js +3 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
- package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
- package/build/credentials/android/actions/CreateKeystore.js +1 -2
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
- package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
- package/build/credentials/context.d.ts +8 -4
- package/build/credentials/context.js +8 -23
- package/build/credentials/ios/IosCredentialsProvider.js +11 -6
- package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
- package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
- package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
- package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
- package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
- package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
- package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
- package/build/credentials/ios/actions/DeviceUtils.js +3 -19
- package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
- package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
- package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
- package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
- package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +1 -1
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
- package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
- package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
- package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
- package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
- package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
- package/build/credentials/ios/types.d.ts +2 -3
- package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +1 -1
- package/build/credentials/manager/HelperActions.d.ts +4 -1
- package/build/credentials/manager/ManageAndroid.js +4 -14
- package/build/credentials/manager/ManageIos.js +12 -15
- package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
- package/build/credentials/manager/SelectPlatform.d.ts +5 -1
- package/build/credentials/manager/SelectPlatform.js +5 -3
- package/build/devices/actions/create/action.d.ts +2 -3
- package/build/devices/context.d.ts +3 -5
- package/build/devices/context.js +2 -11
- package/build/devices/manager.d.ts +4 -5
- package/build/devices/manager.js +9 -16
- package/build/devices/queries.d.ts +21 -0
- package/build/devices/queries.js +121 -0
- package/build/devices/utils/errors.d.ts +3 -0
- package/build/devices/utils/errors.js +9 -0
- package/build/devices/utils/formatDevice.d.ts +3 -3
- package/build/devices/utils/formatDevice.js +8 -3
- package/build/graphql/generated.d.ts +1101 -191
- package/build/graphql/generated.js +13 -2
- package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
- package/build/graphql/queries/AppQuery.d.ts +1 -0
- package/build/graphql/queries/AppQuery.js +19 -0
- package/build/graphql/queries/BranchQuery.d.ts +5 -6
- package/build/graphql/queries/BranchQuery.js +44 -3
- package/build/graphql/queries/BuildQuery.d.ts +2 -20
- package/build/graphql/queries/BuildQuery.js +2 -2
- package/build/graphql/queries/ChannelQuery.d.ts +5 -2
- package/build/graphql/queries/ChannelQuery.js +45 -19
- package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
- package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
- package/build/graphql/queries/UpdateQuery.d.ts +4 -6
- package/build/graphql/queries/UpdateQuery.js +59 -50
- package/build/graphql/queries/UserQuery.js +8 -1
- package/build/graphql/types/Account.d.ts +1 -0
- package/build/graphql/types/Account.js +17 -0
- package/build/graphql/types/App.js +7 -0
- package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
- package/build/graphql/types/EnvironmentSecret.js +16 -1
- package/build/graphql/types/Update.d.ts +1 -0
- package/build/graphql/types/Update.js +30 -0
- package/build/graphql/types/UpdateBranch.js +4 -15
- package/build/metadata/context.d.ts +1 -1
- package/build/metadata/context.js +7 -9
- package/build/project/android/applicationId.d.ts +2 -1
- package/build/project/android/applicationId.js +7 -7
- package/build/project/android/versions.js +1 -1
- package/build/project/applicationIdentifier.d.ts +2 -1
- package/build/project/applicationIdentifier.js +2 -2
- package/build/project/expoConfig.d.ts +3 -3
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
- package/build/project/ios/bundleIdentifier.d.ts +2 -1
- package/build/project/ios/bundleIdentifier.js +7 -7
- package/build/project/ios/scheme.d.ts +1 -1
- package/build/project/projectUtils.d.ts +4 -31
- package/build/project/projectUtils.js +13 -123
- package/build/project/remoteVersionSource.d.ts +2 -2
- package/build/project/remoteVersionSource.js +8 -7
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/context.d.ts +3 -1
- package/build/submit/context.js +12 -14
- package/build/submit/ios/CredentialsServiceSource.js +1 -2
- package/build/submit/utils/builds.js +3 -1
- package/build/update/android/UpdatesModule.d.ts +1 -1
- package/build/update/android/UpdatesModule.js +2 -3
- package/build/update/ios/UpdatesModule.d.ts +1 -1
- package/build/update/ios/UpdatesModule.js +2 -3
- package/build/update/queries.d.ts +16 -1
- package/build/update/queries.js +96 -30
- package/build/update/utils.d.ts +21 -8
- package/build/update/utils.js +75 -14
- package/build/user/actions.d.ts +2 -8
- package/build/user/actions.js +4 -63
- package/build/utils/profiles.d.ts +3 -3
- package/build/utils/profiles.js +6 -5
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +1 -1
- package/build/vcs/vcs.d.ts +1 -1
- package/build/webhooks/input.d.ts +2 -1
- package/build/webhooks/input.js +10 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
- package/build/project/ensureProjectExists.d.ts +0 -21
- package/build/project/ensureProjectExists.js +0 -88
- package/build/user/Account.d.ts +0 -3
- package/build/user/Account.js +0 -7
|
@@ -1,72 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.viewUpdateAsync = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
4
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
5
|
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
7
|
-
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
8
6
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
|
-
const
|
|
7
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
8
|
+
const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
|
|
10
9
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
11
10
|
const utils_1 = require("../../update/utils");
|
|
11
|
+
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
12
12
|
const json_1 = require("../../utils/json");
|
|
13
|
-
async function viewUpdateAsync({ groupId, }) {
|
|
14
|
-
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
15
|
-
.query((0, graphql_tag_1.default) `
|
|
16
|
-
query UpdatesByGroup($groupId: ID!) {
|
|
17
|
-
updatesByGroup(group: $groupId) {
|
|
18
|
-
id
|
|
19
|
-
group
|
|
20
|
-
runtimeVersion
|
|
21
|
-
platform
|
|
22
|
-
message
|
|
23
|
-
actor {
|
|
24
|
-
id
|
|
25
|
-
... on User {
|
|
26
|
-
username
|
|
27
|
-
}
|
|
28
|
-
... on Robot {
|
|
29
|
-
firstName
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
createdAt
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`, {
|
|
36
|
-
groupId,
|
|
37
|
-
}, { additionalTypenames: ['Update'] })
|
|
38
|
-
.toPromise());
|
|
39
|
-
if (data.updatesByGroup.length === 0) {
|
|
40
|
-
throw new Error(`Could not find any updates with group ID: "${groupId}"`);
|
|
41
|
-
}
|
|
42
|
-
return data;
|
|
43
|
-
}
|
|
44
|
-
exports.viewUpdateAsync = viewUpdateAsync;
|
|
45
13
|
class UpdateView extends EasCommand_1.default {
|
|
46
14
|
async runAsync() {
|
|
47
|
-
var _a;
|
|
48
15
|
const { args: { groupId }, flags: { json: jsonFlag }, } = await this.parse(UpdateView);
|
|
49
16
|
if (jsonFlag) {
|
|
50
17
|
(0, json_1.enableJsonOutput)();
|
|
51
18
|
}
|
|
52
|
-
const
|
|
19
|
+
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync({ groupId });
|
|
20
|
+
const [updateGroupDescription] = (0, utils_1.getUpdateGroupDescriptions)([updatesByGroup]);
|
|
53
21
|
if (jsonFlag) {
|
|
54
|
-
(0, json_1.printJsonOnlyOutput)(
|
|
22
|
+
(0, json_1.printJsonOnlyOutput)(updateGroupDescription);
|
|
55
23
|
}
|
|
56
24
|
else {
|
|
57
25
|
const groupTable = new cli_table3_1.default({
|
|
58
26
|
head: [...utils_1.UPDATE_COLUMNS],
|
|
59
27
|
wordWrap: true,
|
|
60
28
|
});
|
|
61
|
-
|
|
29
|
+
log_1.default.log(chalk_1.default.bold('Update group:'));
|
|
30
|
+
log_1.default.log((0, formatFields_1.default)([{ label: 'ID', value: updateGroupDescription.group }]));
|
|
62
31
|
groupTable.push([
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
updates: updatesByGroup,
|
|
68
|
-
group: (_a = updatesByGroup[0]) === null || _a === void 0 ? void 0 : _a.group,
|
|
69
|
-
}),
|
|
32
|
+
updateGroupDescription.message,
|
|
33
|
+
updateGroupDescription.runtimeVersion,
|
|
34
|
+
updateGroupDescription.group,
|
|
35
|
+
updateGroupDescription.platforms,
|
|
70
36
|
]);
|
|
71
37
|
log_1.default.log(groupTable.toString());
|
|
72
38
|
}
|
|
@@ -82,8 +48,5 @@ UpdateView.args = [
|
|
|
82
48
|
},
|
|
83
49
|
];
|
|
84
50
|
UpdateView.flags = {
|
|
85
|
-
|
|
86
|
-
description: `Return a json with the updates belonging to the group.`,
|
|
87
|
-
default: false,
|
|
88
|
-
}),
|
|
51
|
+
...flags_1.EasJsonOnlyFlag,
|
|
89
52
|
};
|
|
@@ -3,9 +3,13 @@ import { WebhookType } from '../../graphql/generated';
|
|
|
3
3
|
export default class WebhookCreate extends EasCommand {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
7
|
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
7
8
|
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
8
9
|
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
10
|
};
|
|
11
|
+
static contextDefinition: {
|
|
12
|
+
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
13
|
+
};
|
|
10
14
|
runAsync(): Promise<void>;
|
|
11
15
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
5
6
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
6
8
|
const generated_1 = require("../../graphql/generated");
|
|
7
9
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
8
10
|
const ora_1 = require("../../ora");
|
|
9
|
-
const expoConfig_1 = require("../../project/expoConfig");
|
|
10
|
-
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
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 { projectConfig: { projectId }, } = await this.getContextAsync(WebhookCreate, {
|
|
16
|
+
nonInteractive: flags['non-interactive'],
|
|
17
|
+
});
|
|
15
18
|
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)(flags);
|
|
16
|
-
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
17
|
-
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
18
|
-
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
19
19
|
const spinner = (0, ora_1.ora)('Creating a webhook').start();
|
|
20
20
|
try {
|
|
21
21
|
await WebhookMutation_1.WebhookMutation.createWebhookAsync(projectId, webhookInputParams);
|
|
@@ -28,6 +28,7 @@ class WebhookCreate extends EasCommand_1.default {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.default = WebhookCreate;
|
|
31
|
+
_a = WebhookCreate;
|
|
31
32
|
WebhookCreate.description = 'create a webhook';
|
|
32
33
|
WebhookCreate.flags = {
|
|
33
34
|
event: core_1.Flags.enum({
|
|
@@ -40,4 +41,8 @@ WebhookCreate.flags = {
|
|
|
40
41
|
secret: core_1.Flags.string({
|
|
41
42
|
description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
|
|
42
43
|
}),
|
|
44
|
+
...flags_1.EASNonInteractiveFlag,
|
|
45
|
+
};
|
|
46
|
+
WebhookCreate.contextDefinition = {
|
|
47
|
+
..._a.ContextOptions.ProjectConfig,
|
|
43
48
|
};
|
|
@@ -6,5 +6,11 @@ export default class WebhookDelete extends EasCommand {
|
|
|
6
6
|
required: boolean;
|
|
7
7
|
description: string;
|
|
8
8
|
}[];
|
|
9
|
+
static flags: {
|
|
10
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
};
|
|
12
|
+
static contextDefinition: {
|
|
13
|
+
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
14
|
+
};
|
|
9
15
|
runAsync(): Promise<void>;
|
|
10
16
|
}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
5
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
7
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
7
8
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
8
10
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
9
11
|
const WebhookQuery_1 = require("../../graphql/queries/WebhookQuery");
|
|
10
12
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
11
13
|
const ora_1 = require("../../ora");
|
|
12
|
-
const expoConfig_1 = require("../../project/expoConfig");
|
|
13
|
-
const projectUtils_1 = require("../../project/projectUtils");
|
|
14
14
|
const prompts_1 = require("../../prompts");
|
|
15
15
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
16
16
|
class WebhookDelete extends EasCommand_1.default {
|
|
17
17
|
async runAsync() {
|
|
18
|
-
let { args: { ID: webhookId }, } = await this.parse(WebhookDelete);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
let { args: { ID: webhookId }, flags: { 'non-interactive': nonInteractive }, } = await this.parse(WebhookDelete);
|
|
19
|
+
const { projectConfig: { projectId }, } = await this.getContextAsync(WebhookDelete, {
|
|
20
|
+
nonInteractive,
|
|
21
|
+
});
|
|
22
22
|
let webhook = webhookId && (await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId));
|
|
23
23
|
if (!webhookId) {
|
|
24
24
|
const webhooks = await fetchWebhooksByAppIdAsync(projectId);
|
|
25
25
|
if (webhooks.length === 0) {
|
|
26
26
|
process.exit(1);
|
|
27
27
|
}
|
|
28
|
+
if (nonInteractive) {
|
|
29
|
+
throw new Error('Must supply ID argument in non-interactive mode');
|
|
30
|
+
}
|
|
28
31
|
({ webhook } = await (0, prompts_1.promptAsync)({
|
|
29
32
|
type: 'autocomplete',
|
|
30
33
|
name: 'webhook',
|
|
@@ -40,14 +43,16 @@ class WebhookDelete extends EasCommand_1.default {
|
|
|
40
43
|
log_1.default.addNewLineIfNone();
|
|
41
44
|
log_1.default.log((0, formatWebhook_1.formatWebhook)(webhook));
|
|
42
45
|
log_1.default.newLine();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
if (!nonInteractive) {
|
|
47
|
+
log_1.default.warn(`You are about to permanently delete this webhook.\nThis action is irreversible.`);
|
|
48
|
+
log_1.default.newLine();
|
|
49
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({
|
|
50
|
+
message: 'Are you sure you wish to proceed?',
|
|
51
|
+
});
|
|
52
|
+
if (!confirmed) {
|
|
53
|
+
log_1.default.error(`Canceled deletion of the webhook`);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
51
56
|
}
|
|
52
57
|
const spinner = (0, ora_1.ora)('Deleting the webhook').start();
|
|
53
58
|
try {
|
|
@@ -61,6 +66,7 @@ class WebhookDelete extends EasCommand_1.default {
|
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
exports.default = WebhookDelete;
|
|
69
|
+
_a = WebhookDelete;
|
|
64
70
|
WebhookDelete.description = 'delete a webhook';
|
|
65
71
|
WebhookDelete.args = [
|
|
66
72
|
{
|
|
@@ -69,6 +75,12 @@ WebhookDelete.args = [
|
|
|
69
75
|
description: 'ID of the webhook to delete',
|
|
70
76
|
},
|
|
71
77
|
];
|
|
78
|
+
WebhookDelete.flags = {
|
|
79
|
+
...flags_1.EASNonInteractiveFlag,
|
|
80
|
+
};
|
|
81
|
+
WebhookDelete.contextDefinition = {
|
|
82
|
+
..._a.ContextOptions.ProjectConfig,
|
|
83
|
+
};
|
|
72
84
|
async function fetchWebhooksByAppIdAsync(appId) {
|
|
73
85
|
const spinner = (0, ora_1.ora)('Fetching webhooks').start();
|
|
74
86
|
try {
|
|
@@ -5,5 +5,8 @@ export default class WebhookList extends EasCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
7
7
|
};
|
|
8
|
+
static contextDefinition: {
|
|
9
|
+
projectConfig: import("../../commandUtils/context/ProjectConfigContextField").default;
|
|
10
|
+
};
|
|
8
11
|
runAsync(): Promise<void>;
|
|
9
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@oclif/core");
|
|
@@ -8,24 +9,23 @@ const generated_1 = require("../../graphql/generated");
|
|
|
8
9
|
const WebhookQuery_1 = require("../../graphql/queries/WebhookQuery");
|
|
9
10
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
11
|
const ora_1 = require("../../ora");
|
|
11
|
-
const expoConfig_1 = require("../../project/expoConfig");
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
14
14
|
class WebhookList extends EasCommand_1.default {
|
|
15
15
|
async runAsync() {
|
|
16
16
|
const { flags: { event }, } = await this.parse(WebhookList);
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const spinner = (0, ora_1.ora)(`Fetching the list of webhook on project ${
|
|
17
|
+
const { projectConfig: { projectId }, } = await this.getContextAsync(WebhookList, {
|
|
18
|
+
nonInteractive: true,
|
|
19
|
+
});
|
|
20
|
+
const projectDisplayName = await (0, projectUtils_1.getDisplayNameForProjectIdAsync)(projectId);
|
|
21
|
+
const spinner = (0, ora_1.ora)(`Fetching the list of webhook on project ${projectDisplayName}`).start();
|
|
22
22
|
try {
|
|
23
23
|
const webhooks = await WebhookQuery_1.WebhookQuery.byAppIdAsync(projectId, event && { event });
|
|
24
24
|
if (webhooks.length === 0) {
|
|
25
|
-
spinner.fail(`There are no webhooks on project ${
|
|
25
|
+
spinner.fail(`There are no webhooks on project ${projectDisplayName}`);
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
spinner.succeed(`Found ${webhooks.length} webhooks on project ${
|
|
28
|
+
spinner.succeed(`Found ${webhooks.length} webhooks on project ${projectDisplayName}`);
|
|
29
29
|
const list = webhooks
|
|
30
30
|
.map(webhook => (0, formatWebhook_1.formatWebhook)(webhook))
|
|
31
31
|
.join(`\n\n${chalk_1.default.dim('———')}\n\n`);
|
|
@@ -33,12 +33,13 @@ class WebhookList extends EasCommand_1.default {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
catch (err) {
|
|
36
|
-
spinner.fail(`Something went wrong and we couldn't fetch the webhook list for the project ${
|
|
36
|
+
spinner.fail(`Something went wrong and we couldn't fetch the webhook list for the project ${projectDisplayName}`);
|
|
37
37
|
throw err;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.default = WebhookList;
|
|
42
|
+
_a = WebhookList;
|
|
42
43
|
WebhookList.description = 'list webhooks';
|
|
43
44
|
WebhookList.flags = {
|
|
44
45
|
event: core_1.Flags.enum({
|
|
@@ -46,3 +47,6 @@ WebhookList.flags = {
|
|
|
46
47
|
options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
|
|
47
48
|
}),
|
|
48
49
|
};
|
|
50
|
+
WebhookList.contextDefinition = {
|
|
51
|
+
..._a.ContextOptions.ProjectConfig,
|
|
52
|
+
};
|
|
@@ -3,6 +3,7 @@ import { WebhookType } from '../../graphql/generated';
|
|
|
3
3
|
export default class WebhookUpdate extends EasCommand {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
7
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
7
8
|
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
8
9
|
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
6
7
|
const generated_1 = require("../../graphql/generated");
|
|
7
8
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
8
9
|
const WebhookQuery_1 = require("../../graphql/queries/WebhookQuery");
|
|
@@ -14,7 +15,7 @@ class WebhookUpdate extends EasCommand_1.default {
|
|
|
14
15
|
const { flags } = await this.parse(WebhookUpdate);
|
|
15
16
|
const webhookId = flags.id;
|
|
16
17
|
const webhook = await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId);
|
|
17
|
-
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)((0, pick_1.default)(flags, ['event', 'url', 'secret']), webhook);
|
|
18
|
+
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)((0, pick_1.default)(flags, ['event', 'url', 'secret', 'non-interactive']), webhook);
|
|
18
19
|
const spinner = (0, ora_1.ora)('Updating a webhook').start();
|
|
19
20
|
try {
|
|
20
21
|
await WebhookMutation_1.WebhookMutation.updateWebhookAsync(webhookId, webhookInputParams);
|
|
@@ -43,4 +44,5 @@ WebhookUpdate.flags = {
|
|
|
43
44
|
secret: core_1.Flags.string({
|
|
44
45
|
description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
|
|
45
46
|
}),
|
|
47
|
+
...flags_1.EASNonInteractiveFlag,
|
|
46
48
|
};
|
|
@@ -8,7 +8,6 @@ const ora_1 = require("../../../ora");
|
|
|
8
8
|
const applicationId_1 = require("../../../project/android/applicationId");
|
|
9
9
|
const projectUtils_1 = require("../../../project/projectUtils");
|
|
10
10
|
const prompts_1 = require("../../../prompts");
|
|
11
|
-
const Account_1 = require("../../../user/Account");
|
|
12
11
|
/**
|
|
13
12
|
* Legacy credentials can be copied over to EAS if the user does not have
|
|
14
13
|
* EAS credentials set up yet
|
|
@@ -64,11 +63,8 @@ exports.promptUserAndCopyLegacyCredentialsAsync = promptUserAndCopyLegacyCredent
|
|
|
64
63
|
async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
|
|
65
64
|
ctx.ensureProjectContext();
|
|
66
65
|
const projectName = ctx.exp.slug;
|
|
67
|
-
const
|
|
68
|
-
const account = (0,
|
|
69
|
-
if (!account) {
|
|
70
|
-
throw new Error(`You do not have access to account: ${accountName}`);
|
|
71
|
-
}
|
|
66
|
+
const projectId = ctx.projectId;
|
|
67
|
+
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(projectId);
|
|
72
68
|
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
73
69
|
if (!androidApplicationIdentifier) {
|
|
74
70
|
throw new Error(`android.package needs to be defined in your ${(0, projectUtils_1.getProjectConfigDescription)(ctx.projectDir)} file`);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { AndroidFcmFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, AndroidFcmFragment } from '../../../graphql/generated';
|
|
3
2
|
import { CredentialsContext } from '../../context';
|
|
4
3
|
export declare class CreateFcm {
|
|
5
4
|
private account;
|
|
6
|
-
constructor(account:
|
|
5
|
+
constructor(account: AccountFragment);
|
|
7
6
|
runAsync(ctx: CredentialsContext): Promise<AndroidFcmFragment>;
|
|
8
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
3
2
|
import { CredentialsContext } from '../../context';
|
|
4
3
|
export declare class CreateGoogleServiceAccountKey {
|
|
5
4
|
private account;
|
|
6
|
-
constructor(account:
|
|
5
|
+
constructor(account: AccountFragment);
|
|
7
6
|
runAsync(ctx: CredentialsContext): Promise<GoogleServiceAccountKeyFragment>;
|
|
8
7
|
private provideAsync;
|
|
9
8
|
private provideKeyJsonPathAsync;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AndroidKeystoreFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, AndroidKeystoreFragment } from '../../../graphql/generated';
|
|
3
2
|
import { CredentialsContext } from '../../context';
|
|
4
3
|
export declare class CreateKeystore {
|
|
5
4
|
private account;
|
|
6
|
-
constructor(account:
|
|
5
|
+
constructor(account: AccountFragment);
|
|
7
6
|
runAsync(ctx: CredentialsContext): Promise<AndroidKeystoreFragment>;
|
|
8
7
|
private provideOrGenerateAsync;
|
|
9
8
|
}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreateKeystore = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
6
|
-
const projectUtils_1 = require("../../../project/projectUtils");
|
|
7
6
|
const promptForCredentials_1 = require("../../utils/promptForCredentials");
|
|
8
7
|
const credentials_1 = require("../credentials");
|
|
9
8
|
const keystore_1 = require("../utils/keystore");
|
|
@@ -16,7 +15,7 @@ class CreateKeystore {
|
|
|
16
15
|
if (ctx.nonInteractive) {
|
|
17
16
|
throw new Error(`New keystore cannot be created in non-interactive mode.`);
|
|
18
17
|
}
|
|
19
|
-
const projectId =
|
|
18
|
+
const projectId = ctx.projectId;
|
|
20
19
|
const keystore = await this.provideOrGenerateAsync(projectId);
|
|
21
20
|
const keystoreFragment = await ctx.android.createKeystoreAsync(this.account, keystore);
|
|
22
21
|
log_1.default.succeed('Created keystore');
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
3
2
|
import { CredentialsContext } from '../../context';
|
|
4
3
|
export declare class SelectAndRemoveGoogleServiceAccountKey {
|
|
5
4
|
private account;
|
|
6
|
-
constructor(account:
|
|
5
|
+
constructor(account: AccountFragment);
|
|
7
6
|
runAsync(ctx: CredentialsContext): Promise<void>;
|
|
8
7
|
}
|
|
9
8
|
export declare class RemoveGoogleServiceAccountKey {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
3
2
|
import { CredentialsContext } from '../../context';
|
|
4
3
|
export declare class UseExistingGoogleServiceAccountKey {
|
|
5
4
|
private account;
|
|
6
|
-
constructor(account:
|
|
5
|
+
constructor(account: AccountFragment);
|
|
7
6
|
runAsync(ctx: CredentialsContext): Promise<GoogleServiceAccountKeyFragment | null>;
|
|
8
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { AndroidAppBuildCredentialsFragment, AndroidFcmFragment, AndroidFcmVersion, AndroidKeystoreFragment, CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
2
|
-
import { Account } from '../../../user/Account';
|
|
1
|
+
import { AccountFragment, AndroidAppBuildCredentialsFragment, AndroidFcmFragment, AndroidFcmVersion, AndroidKeystoreFragment, CommonAndroidAppCredentialsFragment, GoogleServiceAccountKeyFragment } from '../../../graphql/generated';
|
|
3
2
|
import { GoogleServiceAccountKey, KeystoreWithType } from '../credentials';
|
|
4
3
|
export interface AppLookupParams {
|
|
5
|
-
account:
|
|
4
|
+
account: AccountFragment;
|
|
6
5
|
projectName: string;
|
|
7
6
|
androidApplicationIdentifier: string;
|
|
8
7
|
}
|
|
@@ -29,11 +28,11 @@ export declare function createOrUpdateAndroidAppBuildCredentialsByNameAsync(appL
|
|
|
29
28
|
androidKeystoreId: string;
|
|
30
29
|
}): Promise<AndroidAppBuildCredentialsFragment>;
|
|
31
30
|
export declare function createOrUpdateDefaultIosAppBuildCredentialsAsync(): Promise<void>;
|
|
32
|
-
export declare function createKeystoreAsync(account:
|
|
31
|
+
export declare function createKeystoreAsync(account: AccountFragment, keystore: KeystoreWithType): Promise<AndroidKeystoreFragment>;
|
|
33
32
|
export declare function deleteKeystoreAsync(keystore: AndroidKeystoreFragment): Promise<void>;
|
|
34
|
-
export declare function createFcmAsync(account:
|
|
33
|
+
export declare function createFcmAsync(account: AccountFragment, fcmApiKey: string, version: AndroidFcmVersion): Promise<AndroidFcmFragment>;
|
|
35
34
|
export declare function deleteFcmAsync(fcm: AndroidFcmFragment): Promise<void>;
|
|
36
|
-
export declare function createGoogleServiceAccountKeyAsync(account:
|
|
35
|
+
export declare function createGoogleServiceAccountKeyAsync(account: AccountFragment, jsonKey: GoogleServiceAccountKey): Promise<GoogleServiceAccountKeyFragment>;
|
|
37
36
|
export declare function deleteGoogleServiceAccountKeyAsync(googleServiceAccountKey: GoogleServiceAccountKeyFragment): Promise<void>;
|
|
38
|
-
export declare function getGoogleServiceAccountKeysForAccountAsync(account:
|
|
37
|
+
export declare function getGoogleServiceAccountKeysForAccountAsync(account: AccountFragment): Promise<GoogleServiceAccountKeyFragment[]>;
|
|
39
38
|
export declare const formatProjectFullName: ({ account, projectName }: AppLookupParams) => string;
|
|
@@ -5,6 +5,10 @@ import { Actor } from '../user/User';
|
|
|
5
5
|
import * as AndroidGraphqlClient from './android/api/GraphqlClient';
|
|
6
6
|
import * as IosGraphqlClient from './ios/api/GraphqlClient';
|
|
7
7
|
import AppStoreApi from './ios/appstore/AppStoreApi';
|
|
8
|
+
export declare type CredentialsContextProjectInfo = {
|
|
9
|
+
exp: ExpoConfig;
|
|
10
|
+
projectId: string;
|
|
11
|
+
};
|
|
8
12
|
export declare class CredentialsContext {
|
|
9
13
|
private options;
|
|
10
14
|
readonly android: typeof AndroidGraphqlClient;
|
|
@@ -15,11 +19,11 @@ export declare class CredentialsContext {
|
|
|
15
19
|
readonly user: Actor;
|
|
16
20
|
readonly easJsonCliConfig?: EasJson['cli'];
|
|
17
21
|
private shouldAskAuthenticateAppStore;
|
|
18
|
-
private
|
|
22
|
+
private projectInfo;
|
|
19
23
|
constructor(options: {
|
|
20
|
-
|
|
24
|
+
projectInfo: CredentialsContextProjectInfo | null;
|
|
21
25
|
easJsonCliConfig?: EasJson['cli'];
|
|
22
|
-
nonInteractive
|
|
26
|
+
nonInteractive: boolean;
|
|
23
27
|
projectDir: string;
|
|
24
28
|
user: Actor;
|
|
25
29
|
env?: Env;
|
|
@@ -29,7 +33,7 @@ export declare class CredentialsContext {
|
|
|
29
33
|
}): ExpoConfig | null;
|
|
30
34
|
get hasProjectContext(): boolean;
|
|
31
35
|
get exp(): ExpoConfig;
|
|
36
|
+
get projectId(): string;
|
|
32
37
|
ensureProjectContext(): void;
|
|
33
|
-
logOwnerAndProject(): void;
|
|
34
38
|
bestEffortAppStoreAuthenticateAsync(): Promise<void>;
|
|
35
39
|
}
|
|
@@ -5,16 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
6
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
7
7
|
const expoConfig_1 = require("../project/expoConfig");
|
|
8
|
-
const projectUtils_1 = require("../project/projectUtils");
|
|
9
8
|
const prompts_1 = require("../prompts");
|
|
10
|
-
const User_1 = require("../user/User");
|
|
11
9
|
const AndroidGraphqlClient = tslib_1.__importStar(require("./android/api/GraphqlClient"));
|
|
12
10
|
const IosGraphqlClient = tslib_1.__importStar(require("./ios/api/GraphqlClient"));
|
|
13
11
|
const AppStoreApi_1 = tslib_1.__importDefault(require("./ios/appstore/AppStoreApi"));
|
|
14
12
|
const authenticateTypes_1 = require("./ios/appstore/authenticateTypes");
|
|
15
13
|
class CredentialsContext {
|
|
16
14
|
constructor(options) {
|
|
17
|
-
var _a
|
|
15
|
+
var _a;
|
|
18
16
|
this.options = options;
|
|
19
17
|
this.android = AndroidGraphqlClient;
|
|
20
18
|
this.appStore = new AppStoreApi_1.default();
|
|
@@ -24,11 +22,7 @@ class CredentialsContext {
|
|
|
24
22
|
this.projectDir = options.projectDir;
|
|
25
23
|
this.user = options.user;
|
|
26
24
|
this.nonInteractive = (_a = options.nonInteractive) !== null && _a !== void 0 ? _a : false;
|
|
27
|
-
this.
|
|
28
|
-
if (!this.resolvedExp) {
|
|
29
|
-
this.resolvedExp =
|
|
30
|
-
(_b = CredentialsContext.getExpoConfigInProject(this.projectDir, { env: options.env })) !== null && _b !== void 0 ? _b : undefined;
|
|
31
|
-
}
|
|
25
|
+
this.projectInfo = options.projectInfo;
|
|
32
26
|
}
|
|
33
27
|
static getExpoConfigInProject(projectDir, { env } = {}) {
|
|
34
28
|
try {
|
|
@@ -40,11 +34,15 @@ class CredentialsContext {
|
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
36
|
get hasProjectContext() {
|
|
43
|
-
return !!this.
|
|
37
|
+
return !!this.projectInfo;
|
|
44
38
|
}
|
|
45
39
|
get exp() {
|
|
46
40
|
this.ensureProjectContext();
|
|
47
|
-
return this.
|
|
41
|
+
return this.projectInfo.exp;
|
|
42
|
+
}
|
|
43
|
+
get projectId() {
|
|
44
|
+
this.ensureProjectContext();
|
|
45
|
+
return this.projectInfo.projectId;
|
|
48
46
|
}
|
|
49
47
|
ensureProjectContext() {
|
|
50
48
|
if (this.hasProjectContext) {
|
|
@@ -53,19 +51,6 @@ class CredentialsContext {
|
|
|
53
51
|
// trigger getConfig error
|
|
54
52
|
(0, expoConfig_1.getExpoConfig)(this.options.projectDir);
|
|
55
53
|
}
|
|
56
|
-
logOwnerAndProject() {
|
|
57
|
-
var _a;
|
|
58
|
-
const { user } = this.options;
|
|
59
|
-
if (this.hasProjectContext) {
|
|
60
|
-
const owner = (0, projectUtils_1.getProjectAccountName)(this.exp, user);
|
|
61
|
-
// Figure out if User A is configuring credentials as admin for User B's project
|
|
62
|
-
const isProxyUser = user.__typename === 'Robot' || owner !== user.username;
|
|
63
|
-
log_1.default.log(`Accessing credentials ${isProxyUser ? 'on behalf of' : 'for'} ${owner} in project ${this.exp.slug}`);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
log_1.default.log(`Accessing credentials for ${(_a = this.exp.owner) !== null && _a !== void 0 ? _a : (0, User_1.getActorDisplayName)(user)}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
54
|
async bestEffortAppStoreAuthenticateAsync() {
|
|
70
55
|
if (this.appStore.authCtx || !this.shouldAskAuthenticateAppStore) {
|
|
71
56
|
// skip prompts if already have apple ctx or already asked about it
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
5
5
|
const eas_json_1 = require("@expo/eas-json");
|
|
6
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
7
6
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
7
|
const target_1 = require("../../project/ios/target");
|
|
9
8
|
const prompts_1 = require("../../prompts");
|
|
@@ -59,7 +58,7 @@ class IosCredentialsProvider {
|
|
|
59
58
|
return null;
|
|
60
59
|
}
|
|
61
60
|
const applicationTarget = (0, target_1.findApplicationTarget)(targets);
|
|
62
|
-
const app = (0, BuildCredentialsUtils_1.
|
|
61
|
+
const app = await (0, BuildCredentialsUtils_1.getAppFromContextAsync)(ctx);
|
|
63
62
|
const appLookupParams = {
|
|
64
63
|
...app,
|
|
65
64
|
bundleIdentifier: applicationTarget.bundleIdentifier,
|
|
@@ -93,10 +92,16 @@ class IosCredentialsProvider {
|
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
94
|
async disablePushNotificationsSetupInEasJsonAsync(ctx) {
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
const easJsonAccessor = new eas_json_1.EasJsonAccessor(ctx.projectDir);
|
|
96
|
+
await easJsonAccessor.readRawJsonAsync();
|
|
97
|
+
easJsonAccessor.patch(easJsonRawObject => {
|
|
98
|
+
easJsonRawObject.cli = {
|
|
99
|
+
...easJsonRawObject === null || easJsonRawObject === void 0 ? void 0 : easJsonRawObject.cli,
|
|
100
|
+
promptToConfigurePushNotifications: false,
|
|
101
|
+
};
|
|
102
|
+
return easJsonRawObject;
|
|
103
|
+
});
|
|
104
|
+
await easJsonAccessor.writeAsync();
|
|
100
105
|
log_1.default.withTick('Updated eas.json');
|
|
101
106
|
}
|
|
102
107
|
assertProvisioningProfileType(provisioningProfile, targetName) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatAppleTeam = void 0;
|
|
4
|
+
function formatAppleTeam({ appleTeamIdentifier, appleTeamName, }) {
|
|
5
|
+
return `Team ID: ${appleTeamIdentifier}${appleTeamName ? `, Team name: ${appleTeamName}` : ''}`;
|
|
6
|
+
}
|
|
7
|
+
exports.formatAppleTeam = formatAppleTeam;
|