eas-cli 0.43.0 → 0.45.1
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 +845 -1
- package/build/build/android/UpdatesModule.d.ts +0 -1
- package/build/build/android/UpdatesModule.js +4 -37
- package/build/build/android/build.js +3 -3
- package/build/build/android/graphql.js +1 -0
- package/build/build/android/prepareJob.js +3 -0
- package/build/build/android/{configure.d.ts → syncProjectConfiguration.d.ts} +2 -3
- package/build/build/android/{configure.js → syncProjectConfiguration.js} +22 -23
- package/build/build/build.d.ts +1 -1
- package/build/build/build.js +6 -8
- package/build/build/configure.d.ts +12 -7
- package/build/build/configure.js +25 -99
- package/build/build/context.d.ts +0 -12
- package/build/build/createContext.d.ts +1 -2
- package/build/build/createContext.js +1 -2
- package/build/build/ios/UpdatesModule.d.ts +0 -1
- package/build/build/ios/UpdatesModule.js +8 -39
- package/build/build/ios/build.js +3 -3
- package/build/build/ios/graphql.js +1 -0
- package/build/build/ios/prepareJob.js +3 -0
- package/build/build/ios/{configure.d.ts → syncProjectConfiguration.d.ts} +1 -3
- package/build/build/ios/{configure.js → syncProjectConfiguration.js} +3 -18
- package/build/build/local.d.ts +1 -0
- package/build/build/local.js +2 -1
- package/build/build/runBuildAndSubmit.d.ts +0 -1
- package/build/build/runBuildAndSubmit.js +8 -2
- package/build/commands/branch/view.d.ts +0 -2
- package/build/commands/branch/view.js +2 -46
- package/build/commands/build/configure.js +43 -25
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +12 -2
- package/build/commands/build/inspect.js +0 -1
- package/build/commands/device/delete.d.ts +17 -0
- package/build/commands/device/delete.js +181 -0
- package/build/commands/device/list.js +1 -1
- package/build/commands/update/index.js +2 -2
- package/build/commands/update/list.d.ts +10 -0
- package/build/commands/update/list.js +114 -0
- package/build/commands/webhook/update.js +1 -1
- package/build/credentials/ios/actions/DeviceUtils.d.ts +1 -0
- package/build/credentials/ios/actions/DeviceUtils.js +16 -1
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.d.ts +1 -0
- package/build/credentials/ios/api/graphql/mutations/AppleDeviceMutation.js +16 -0
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +0 -2
- package/build/credentials/ios/appstore/ensureAppExists.js +3 -1
- package/build/graphql/generated.d.ts +5838 -3523
- package/build/graphql/generated.js +223 -223
- package/build/graphql/queries/UpdateQuery.d.ts +7 -0
- package/build/graphql/queries/UpdateQuery.js +85 -0
- package/build/submit/ArchiveSource.js +0 -1
- package/build/vcs/local.js +5 -1
- package/oclif.manifest.json +1 -1
- package/package.json +44 -45
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const config_1 = require("@expo/config");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
|
|
7
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
8
|
+
const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
|
|
9
|
+
const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
|
|
10
|
+
const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
|
|
11
|
+
const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
|
|
12
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
|
+
const prompts_1 = require("../../prompts");
|
|
14
|
+
const utils_1 = require("../../update/utils");
|
|
15
|
+
const groupBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/groupBy"));
|
|
16
|
+
const json_1 = require("../../utils/json");
|
|
17
|
+
const vcs_1 = require("../../vcs");
|
|
18
|
+
class BranchView extends EasCommand_1.default {
|
|
19
|
+
async runAsync() {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const { flags: { branch: branchFlag, all, json: jsonFlag }, } = await this.parse(BranchView);
|
|
22
|
+
if (jsonFlag) {
|
|
23
|
+
(0, json_1.enableJsonOutput)();
|
|
24
|
+
}
|
|
25
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
26
|
+
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
27
|
+
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
28
|
+
let updateGroupDescriptions;
|
|
29
|
+
if (all) {
|
|
30
|
+
const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewAllAsync({ appId: projectId });
|
|
31
|
+
updateGroupDescriptions = getUpdateGroupDescriptions(branchesAndUpdates.app.byId.updateBranches);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
let branchInteractive;
|
|
35
|
+
if (!branchFlag) {
|
|
36
|
+
const validationMessage = 'Branch name may not be empty.';
|
|
37
|
+
if (jsonFlag) {
|
|
38
|
+
throw new Error(validationMessage);
|
|
39
|
+
}
|
|
40
|
+
({ name: branchInteractive } = await (0, prompts_1.promptAsync)({
|
|
41
|
+
type: 'text',
|
|
42
|
+
name: 'name',
|
|
43
|
+
message: 'Please enter the name of the branch whose updates you wish to view:',
|
|
44
|
+
initial: (_a = (await (0, vcs_1.getVcsClient)().getBranchNameAsync())) !== null && _a !== void 0 ? _a : undefined,
|
|
45
|
+
validate: (value) => (value ? true : validationMessage),
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
const branch = branchFlag !== null && branchFlag !== void 0 ? branchFlag : branchInteractive;
|
|
49
|
+
(0, assert_1.default)(branch, 'Branch name may not be empty.');
|
|
50
|
+
const branchesAndUpdates = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
|
|
51
|
+
appId: projectId,
|
|
52
|
+
name: branch,
|
|
53
|
+
});
|
|
54
|
+
const UpdateBranch = (_b = branchesAndUpdates.app) === null || _b === void 0 ? void 0 : _b.byId.updateBranchByName;
|
|
55
|
+
if (!UpdateBranch) {
|
|
56
|
+
throw new Error(`Could not find branch "${branch}"`);
|
|
57
|
+
}
|
|
58
|
+
updateGroupDescriptions = getUpdateGroupDescriptions([UpdateBranch]);
|
|
59
|
+
}
|
|
60
|
+
if (jsonFlag) {
|
|
61
|
+
(0, json_1.printJsonOnlyOutput)(updateGroupDescriptions);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
logAsTable(updateGroupDescriptions);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.default = BranchView;
|
|
69
|
+
BranchView.description = 'View the recent updates for a branch';
|
|
70
|
+
BranchView.flags = {
|
|
71
|
+
branch: core_1.Flags.string({
|
|
72
|
+
description: 'List all updates on this branch',
|
|
73
|
+
exclusive: ['all'],
|
|
74
|
+
}),
|
|
75
|
+
all: core_1.Flags.boolean({
|
|
76
|
+
description: 'List all updates associated with this project',
|
|
77
|
+
exclusive: ['branch'],
|
|
78
|
+
default: false,
|
|
79
|
+
}),
|
|
80
|
+
json: core_1.Flags.boolean({
|
|
81
|
+
description: `Return a json with all of the recent update groups.`,
|
|
82
|
+
default: false,
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
function getUpdateGroupDescriptions(branchesAndUpdates) {
|
|
86
|
+
const flattenedBranchesAndUpdates = branchesAndUpdates.flatMap(branch => branch.updates.map(update => {
|
|
87
|
+
return { branch: branch.name, ...update };
|
|
88
|
+
}));
|
|
89
|
+
const updateGroupDescriptions = Object.values((0, groupBy_1.default)(flattenedBranchesAndUpdates, update => update.group)).map(updateGroup => {
|
|
90
|
+
const platforms = updateGroup
|
|
91
|
+
.map(update => update.platform)
|
|
92
|
+
.sort()
|
|
93
|
+
.join(', ');
|
|
94
|
+
return { ...updateGroup[0], platforms };
|
|
95
|
+
});
|
|
96
|
+
updateGroupDescriptions.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
97
|
+
return updateGroupDescriptions;
|
|
98
|
+
}
|
|
99
|
+
function logAsTable(updateGroupDescriptions) {
|
|
100
|
+
const table = new cli_table3_1.default({
|
|
101
|
+
head: ['Branch', ...utils_1.UPDATE_COLUMNS],
|
|
102
|
+
wordWrap: true,
|
|
103
|
+
});
|
|
104
|
+
table.push(...updateGroupDescriptions.map(updateGroupDescription => [
|
|
105
|
+
updateGroupDescription.branch,
|
|
106
|
+
(0, utils_1.formatUpdate)(updateGroupDescription),
|
|
107
|
+
updateGroupDescription.runtimeVersion,
|
|
108
|
+
updateGroupDescription.group,
|
|
109
|
+
updateGroupDescription.platforms,
|
|
110
|
+
]));
|
|
111
|
+
log_1.default.addNewLineIfNone();
|
|
112
|
+
log_1.default.log(chalk_1.default.bold('Recently published update groups:'));
|
|
113
|
+
log_1.default.log(table.toString());
|
|
114
|
+
}
|
|
@@ -27,7 +27,7 @@ class WebhookUpdate extends EasCommand_1.default {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.default = WebhookUpdate;
|
|
30
|
-
WebhookUpdate.description = '
|
|
30
|
+
WebhookUpdate.description = 'Update a webhook on the current project.';
|
|
31
31
|
WebhookUpdate.flags = {
|
|
32
32
|
id: core_1.Flags.string({
|
|
33
33
|
description: 'Webhook ID',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { AppleDevice, AppleDeviceFragment } from '../../../graphql/generated';
|
|
2
2
|
export declare function chooseDevicesAsync(allDevices: AppleDeviceFragment[], preselectedDeviceIdentifiers?: string[]): Promise<AppleDevice[]>;
|
|
3
|
+
export declare function chooseDevicesToDeleteAsync(allDevices: AppleDeviceFragment[]): Promise<AppleDevice[]>;
|
|
3
4
|
export declare function formatDeviceLabel(device: AppleDeviceFragment): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatDeviceLabel = exports.chooseDevicesAsync = void 0;
|
|
3
|
+
exports.formatDeviceLabel = exports.chooseDevicesToDeleteAsync = exports.chooseDevicesAsync = void 0;
|
|
4
4
|
const AppleDevice_1 = require("../../../graphql/types/credentials/AppleDevice");
|
|
5
5
|
const prompts_1 = require("../.././../prompts");
|
|
6
6
|
async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = []) {
|
|
@@ -23,6 +23,21 @@ async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = [])
|
|
|
23
23
|
return devices;
|
|
24
24
|
}
|
|
25
25
|
exports.chooseDevicesAsync = chooseDevicesAsync;
|
|
26
|
+
async function chooseDevicesToDeleteAsync(allDevices) {
|
|
27
|
+
const { devices } = await (0, prompts_1.promptAsync)({
|
|
28
|
+
type: 'multiselect',
|
|
29
|
+
name: 'devices',
|
|
30
|
+
message: 'Which devices do you want to remove?',
|
|
31
|
+
choices: allDevices.map(device => ({
|
|
32
|
+
value: device,
|
|
33
|
+
title: formatDeviceLabel(device),
|
|
34
|
+
selected: false,
|
|
35
|
+
})),
|
|
36
|
+
instructions: false,
|
|
37
|
+
});
|
|
38
|
+
return devices;
|
|
39
|
+
}
|
|
40
|
+
exports.chooseDevicesToDeleteAsync = chooseDevicesToDeleteAsync;
|
|
26
41
|
function formatDeviceLabel(device) {
|
|
27
42
|
var _a;
|
|
28
43
|
const deviceDetails = formatDeviceDetails(device);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppleDeviceFragment, AppleDeviceInput } from '../../../../../graphql/generated';
|
|
2
2
|
export declare const AppleDeviceMutation: {
|
|
3
3
|
createAppleDeviceAsync(appleDeviceInput: AppleDeviceInput, accountId: string): Promise<AppleDeviceFragment>;
|
|
4
|
+
deleteAppleDeviceAsync(deviceId: string): Promise<string>;
|
|
4
5
|
};
|
|
@@ -29,4 +29,20 @@ exports.AppleDeviceMutation = {
|
|
|
29
29
|
.toPromise());
|
|
30
30
|
return data.appleDevice.createAppleDevice;
|
|
31
31
|
},
|
|
32
|
+
async deleteAppleDeviceAsync(deviceId) {
|
|
33
|
+
const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
|
|
34
|
+
.mutation((0, graphql_tag_1.default) `
|
|
35
|
+
mutation DeleteAppleDeviceMutation($deviceId: ID!) {
|
|
36
|
+
appleDevice {
|
|
37
|
+
deleteAppleDevice(id: $deviceId) {
|
|
38
|
+
id
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`, {
|
|
43
|
+
deviceId,
|
|
44
|
+
})
|
|
45
|
+
.toPromise());
|
|
46
|
+
return data.id;
|
|
47
|
+
},
|
|
32
48
|
};
|
|
@@ -126,10 +126,8 @@ function getCapabilitiesToDisable(bundleId, currentCapabilities, request) {
|
|
|
126
126
|
// Disable any extras that aren't present, this functionality is kinda unreliable because managed apps
|
|
127
127
|
// might be enabling capabilities in modifiers.
|
|
128
128
|
for (const existingCapability of currentCapabilities) {
|
|
129
|
-
// Special case APNS because it's always enabled in Expo,
|
|
130
129
|
// GC and IAP are always enabled in apps by default so we should avoid modifying them.
|
|
131
130
|
if (existingCapability.isType(apple_utils_1.CapabilityType.IN_APP_PURCHASE) ||
|
|
132
|
-
existingCapability.isType(apple_utils_1.CapabilityType.PUSH_NOTIFICATIONS) ||
|
|
133
131
|
existingCapability.isType(apple_utils_1.CapabilityType.GAME_CENTER)) {
|
|
134
132
|
continue;
|
|
135
133
|
}
|
|
@@ -41,7 +41,9 @@ async function ensureBundleIdExistsWithNameAsync(authCtx, { name, bundleIdentifi
|
|
|
41
41
|
else {
|
|
42
42
|
spinner.fail(`Failed to register bundle identifier ${chalk_1.default.dim(bundleIdentifier)}`);
|
|
43
43
|
// Assert contract errors for easier resolution when the user has an expired developer account.
|
|
44
|
-
if (err.message.match(/forbidden for security reasons/)
|
|
44
|
+
if (err.message.match(/forbidden for security reasons/) ||
|
|
45
|
+
// Unable to process request - PLA Update available - You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account.
|
|
46
|
+
err.message.match(/agree/)) {
|
|
45
47
|
await (0, contractMessages_1.assertContractMessagesAsync)(context);
|
|
46
48
|
}
|
|
47
49
|
}
|