eas-cli 2.5.1 → 2.7.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 +8 -1095
- package/build/branch/queries.d.ts +8 -1
- package/build/branch/queries.js +53 -23
- package/build/build/android/build.js +1 -0
- package/build/build/ios/build.js +1 -0
- package/build/build/local.js +1 -1
- package/build/build/queries.d.ts +11 -1
- package/build/build/queries.js +39 -1
- package/build/build/validate.d.ts +1 -0
- package/build/build/validate.js +121 -1
- package/build/channel/queries.d.ts +11 -0
- package/build/channel/queries.js +51 -9
- package/build/channel/utils.js +22 -22
- package/build/commandUtils/context/LoggedInContextField.d.ts +3 -0
- package/build/commandUtils/context/LoggedInContextField.js +9 -1
- package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +3 -0
- package/build/commandUtils/context/MaybeLoggedInContextField.js +9 -1
- package/build/commandUtils/context/contextUtils/createGraphqlClient.d.ts +2 -2
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +1 -1
- package/build/commandUtils/gating/FeatureGateEnvOverrides.d.ts +7 -0
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +35 -0
- package/build/commandUtils/gating/FeatureGateKey.d.ts +4 -0
- package/build/commandUtils/gating/FeatureGateKey.js +11 -0
- package/build/commandUtils/gating/FeatureGateTestOverrides.d.ts +5 -0
- package/build/commandUtils/gating/FeatureGateTestOverrides.js +17 -0
- package/build/commandUtils/gating/FeatureGating.d.ts +16 -0
- package/build/commandUtils/gating/FeatureGating.js +55 -0
- package/build/commandUtils/pagination.d.ts +4 -3
- package/build/commands/branch/create.d.ts +0 -3
- package/build/commands/branch/create.js +2 -27
- package/build/commands/branch/list.d.ts +1 -1
- package/build/commands/branch/view.d.ts +1 -1
- package/build/commands/build/configure.d.ts +1 -1
- package/build/commands/build/index.d.ts +2 -2
- package/build/commands/build/list.d.ts +4 -4
- package/build/commands/build/list.js +2 -15
- package/build/commands/build/run.d.ts +21 -0
- package/build/commands/build/run.js +149 -0
- package/build/commands/build/version/set.d.ts +1 -1
- package/build/commands/build/version/sync.d.ts +1 -1
- package/build/commands/channel/create.d.ts +0 -7
- package/build/commands/channel/create.js +4 -31
- package/build/commands/channel/list.d.ts +1 -1
- package/build/commands/channel/view.d.ts +1 -1
- package/build/commands/config.d.ts +1 -1
- package/build/commands/credentials.d.ts +1 -1
- package/build/commands/device/list.d.ts +1 -1
- package/build/commands/metadata/lint.d.ts +12 -0
- package/build/commands/metadata/lint.js +72 -0
- package/build/commands/metadata/pull.js +20 -9
- package/build/commands/metadata/push.js +20 -9
- package/build/commands/secret/create.d.ts +1 -1
- package/build/commands/secret/list.js +12 -17
- package/build/commands/submit.d.ts +1 -1
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +10 -216
- package/build/commands/update/index.d.ts +3 -9
- package/build/commands/update/index.js +136 -143
- package/build/commands/update/list.d.ts +1 -1
- package/build/commands/webhook/create.d.ts +1 -1
- package/build/commands/webhook/list.d.ts +1 -1
- package/build/commands/webhook/update.d.ts +1 -1
- package/build/devices/actions/create/inputMethod.js +2 -15
- package/build/devices/utils/formatDevice.d.ts +2 -0
- package/build/devices/utils/formatDevice.js +32 -7
- package/build/env.d.ts +8 -0
- package/build/env.js +8 -0
- package/build/graphql/generated.d.ts +100 -23
- package/build/graphql/generated.js +10 -2
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +1 -1
- package/build/graphql/queries/UserQuery.js +2 -2
- package/build/graphql/types/Build.js +2 -0
- package/build/log.d.ts +1 -0
- package/build/log.js +3 -0
- package/build/metadata/apple/rules/index.d.ts +1 -0
- package/build/metadata/apple/rules/index.js +6 -0
- package/build/metadata/apple/rules/infoKeywordLength.d.ts +6 -0
- package/build/metadata/apple/rules/infoKeywordLength.js +35 -0
- package/build/metadata/apple/rules/infoRestrictedWords.d.ts +6 -0
- package/build/metadata/apple/rules/infoRestrictedWords.js +57 -0
- package/build/metadata/apple/tasks/index.d.ts +1 -2
- package/build/metadata/apple/tasks/index.js +1 -1
- package/build/metadata/auth.d.ts +21 -0
- package/build/metadata/auth.js +33 -0
- package/build/metadata/config/issue.d.ts +21 -0
- package/build/metadata/config/issue.js +9 -0
- package/build/metadata/config/resolve.d.ts +27 -0
- package/build/metadata/{config.js → config/resolve.js} +24 -25
- package/build/metadata/config/schema.d.ts +7 -0
- package/build/metadata/config/schema.js +2 -0
- package/build/metadata/config/validate.d.ts +3 -0
- package/build/metadata/config/validate.js +47 -0
- package/build/metadata/download.d.ts +11 -2
- package/build/metadata/download.js +14 -9
- package/build/metadata/errors.d.ts +3 -3
- package/build/metadata/errors.js +3 -1
- package/build/metadata/upload.d.ts +11 -2
- package/build/metadata/upload.js +16 -11
- package/build/metadata/utils/ajv.d.ts +10 -0
- package/build/metadata/utils/ajv.js +30 -0
- package/build/metadata/utils/telemetry.js +6 -6
- package/build/project/projectUtils.d.ts +3 -1
- package/build/project/projectUtils.js +10 -3
- package/build/project/publish.d.ts +13 -10
- package/build/project/publish.js +68 -38
- package/build/project/workflow.d.ts +1 -0
- package/build/project/workflow.js +9 -1
- package/build/run/android/run.d.ts +1 -0
- package/build/run/android/run.js +9 -0
- package/build/run/ios/run.d.ts +1 -0
- package/build/run/ios/run.js +31 -0
- package/build/run/ios/simctl.d.ts +2 -0
- package/build/run/ios/simctl.js +8 -0
- package/build/run/ios/simulator.d.ts +21 -0
- package/build/run/ios/simulator.js +161 -0
- package/build/run/ios/systemRequirements.d.ts +1 -0
- package/build/run/ios/systemRequirements.js +82 -0
- package/build/run/ios/xcode.d.ts +4 -0
- package/build/run/ios/xcode.js +41 -0
- package/build/run/ios/xcrun.d.ts +4 -0
- package/build/run/ios/xcrun.js +68 -0
- package/build/run/run.d.ts +8 -0
- package/build/run/run.js +15 -0
- package/build/submit/ArchiveSource.js +12 -16
- package/build/submit/utils/summary.d.ts +1 -1
- package/build/update/configure.d.ts +22 -0
- package/build/update/configure.js +200 -0
- package/build/update/queries.js +30 -39
- package/build/update/utils.d.ts +8 -1
- package/build/update/utils.js +35 -1
- package/build/utils/buildDistribution.d.ts +3 -0
- package/build/utils/buildDistribution.js +20 -0
- package/build/utils/download.d.ts +2 -0
- package/build/utils/download.js +114 -0
- package/build/utils/expoCli.d.ts +6 -0
- package/build/utils/expoCli.js +46 -1
- package/build/utils/expodash/filter.d.ts +2 -0
- package/build/utils/expodash/filter.js +8 -0
- package/build/utils/expodash/memoize.d.ts +2 -0
- package/build/utils/expodash/memoize.js +17 -0
- package/build/utils/formatFields.d.ts +3 -2
- package/build/utils/image.d.ts +6 -0
- package/build/utils/image.js +107 -0
- package/build/utils/statuspageService.js +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +36 -30
- package/schema/metadata-0.json +1 -1
- package/build/metadata/config.d.ts +0 -41
- package/build/metadata/context.d.ts +0 -50
- package/build/metadata/context.js +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.defaultPublishPlatforms = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
@@ -9,125 +9,76 @@ const core_1 = require("@oclif/core");
|
|
|
9
9
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
10
10
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
11
11
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
12
|
-
const api_1 = require("../../api");
|
|
13
12
|
const queries_1 = require("../../branch/queries");
|
|
14
13
|
const utils_1 = require("../../branch/utils");
|
|
15
14
|
const url_1 = require("../../build/utils/url");
|
|
15
|
+
const queries_2 = require("../../channel/queries");
|
|
16
16
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
17
17
|
const flags_1 = require("../../commandUtils/flags");
|
|
18
18
|
const pagination_1 = require("../../commandUtils/pagination");
|
|
19
19
|
const fetch_1 = tslib_1.__importDefault(require("../../fetch"));
|
|
20
20
|
const generated_1 = require("../../graphql/generated");
|
|
21
21
|
const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
|
|
22
|
-
const BranchQuery_1 = require("../../graphql/queries/BranchQuery");
|
|
23
22
|
const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
|
|
24
23
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
25
24
|
const ora_1 = require("../../ora");
|
|
25
|
+
const platform_1 = require("../../platform");
|
|
26
26
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
27
27
|
const publish_1 = require("../../project/publish");
|
|
28
28
|
const workflow_1 = require("../../project/workflow");
|
|
29
29
|
const prompts_1 = require("../../prompts");
|
|
30
|
-
const
|
|
30
|
+
const configure_1 = require("../../update/configure");
|
|
31
|
+
const queries_3 = require("../../update/queries");
|
|
31
32
|
const utils_2 = require("../../update/utils");
|
|
32
33
|
const code_signing_1 = require("../../utils/code-signing");
|
|
34
|
+
const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"));
|
|
33
35
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
34
36
|
const json_1 = require("../../utils/json");
|
|
35
37
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
36
38
|
const vcs_1 = require("../../vcs");
|
|
37
|
-
const create_1 = require("../branch/create");
|
|
38
|
-
const create_2 = require("../channel/create");
|
|
39
39
|
exports.defaultPublishPlatforms = ['android', 'ios'];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
e.graphQLErrors[0].extensions.errorCode === 'CHANNEL_ALREADY_EXISTS';
|
|
53
|
-
if (!isIgnorableError) {
|
|
54
|
-
throw e;
|
|
55
|
-
}
|
|
40
|
+
function getRequestedPlatform(platform) {
|
|
41
|
+
switch (platform) {
|
|
42
|
+
case 'android':
|
|
43
|
+
return platform_1.RequestedPlatform.Android;
|
|
44
|
+
case 'ios':
|
|
45
|
+
return platform_1.RequestedPlatform.Ios;
|
|
46
|
+
case 'web':
|
|
47
|
+
return null;
|
|
48
|
+
case 'all':
|
|
49
|
+
return platform_1.RequestedPlatform.All;
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
|
-
async function ensureBranchExistsAsync(graphqlClient, { appId, name: branchName }) {
|
|
59
|
-
try {
|
|
60
|
-
const updateBranch = await BranchQuery_1.BranchQuery.getBranchByNameAsync(graphqlClient, {
|
|
61
|
-
appId,
|
|
62
|
-
name: branchName,
|
|
63
|
-
});
|
|
64
|
-
const { id } = updateBranch;
|
|
65
|
-
await ensureChannelExistsAsync(graphqlClient, { appId, branchId: id, channelName: branchName });
|
|
66
|
-
return { branchId: id };
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
if (error instanceof utils_1.BranchNotFoundError) {
|
|
70
|
-
const newUpdateBranch = await (0, create_1.createUpdateBranchOnAppAsync)(graphqlClient, {
|
|
71
|
-
appId,
|
|
72
|
-
name: branchName,
|
|
73
|
-
});
|
|
74
|
-
log_1.default.withTick(`Created branch: ${chalk_1.default.bold(branchName)}`);
|
|
75
|
-
await ensureChannelExistsAsync(graphqlClient, {
|
|
76
|
-
appId,
|
|
77
|
-
branchId: newUpdateBranch.id,
|
|
78
|
-
channelName: branchName,
|
|
79
|
-
});
|
|
80
|
-
return { branchId: newUpdateBranch.id };
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.ensureBranchExistsAsync = ensureBranchExistsAsync;
|
|
88
54
|
class UpdatePublish extends EasCommand_1.default {
|
|
89
55
|
async runAsync() {
|
|
90
56
|
var _b, _c, _d;
|
|
91
|
-
const { flags } = await this.parse(UpdatePublish);
|
|
92
|
-
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(
|
|
93
|
-
let {
|
|
57
|
+
const { flags: rawFlags } = await this.parse(UpdatePublish);
|
|
58
|
+
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
59
|
+
let { auto: autoFlag, platform: platformFlag, branchName, updateMessage, republish, groupId, inputDir, skipBundler, privateKeyPath, json: jsonFlag, nonInteractive, } = this.sanitizeFlags(rawFlags);
|
|
94
60
|
const { getDynamicProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdatePublish, {
|
|
95
61
|
nonInteractive,
|
|
96
62
|
});
|
|
97
63
|
if (jsonFlag) {
|
|
98
64
|
(0, json_1.enableJsonOutput)();
|
|
99
65
|
}
|
|
100
|
-
const
|
|
101
|
-
// If a group was specified, that means we are republishing it.
|
|
102
|
-
republish = republish || !!group;
|
|
103
|
-
const { exp, projectId, projectDir } = await getDynamicProjectConfigAsync({
|
|
66
|
+
const { exp: expPossiblyWithoutEasUpdateConfigured, projectId, projectDir, } = await getDynamicProjectConfigAsync({
|
|
104
67
|
isPublicConfig: true,
|
|
105
68
|
});
|
|
106
69
|
const { exp: expPrivate } = await getDynamicProjectConfigAsync({
|
|
107
70
|
isPublicConfig: false,
|
|
108
71
|
});
|
|
109
72
|
await (0, statuspageService_1.maybeWarnAboutEasOutagesAsync)(graphqlClient, [generated_1.StatuspageServiceName.EasUpdate]);
|
|
73
|
+
await (0, configure_1.ensureEASUpdatesIsConfiguredAsync)(graphqlClient, {
|
|
74
|
+
exp: expPossiblyWithoutEasUpdateConfigured,
|
|
75
|
+
platform: getRequestedPlatform(platformFlag),
|
|
76
|
+
projectDir,
|
|
77
|
+
projectId,
|
|
78
|
+
});
|
|
79
|
+
const { exp } = await getDynamicProjectConfigAsync();
|
|
110
80
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
111
|
-
|
|
112
|
-
if (!hasExpoUpdates && nonInteractive) {
|
|
113
|
-
core_1.Errors.error(`${chalk_1.default.bold('expo-updates')} must already be installed when executing in non-interactive mode`, { exit: 1 });
|
|
114
|
-
}
|
|
115
|
-
if (!hasExpoUpdates) {
|
|
116
|
-
const install = await (0, prompts_1.confirmAsync)({
|
|
117
|
-
message: (0, chalk_1.default) `The module {cyan expo-updates} must be installed to load EAS updates in-app. Install?`,
|
|
118
|
-
instructions: 'The command will abort unless you agree.',
|
|
119
|
-
});
|
|
120
|
-
if (install) {
|
|
121
|
-
await (0, projectUtils_1.installExpoUpdatesAsync)(projectDir);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
core_1.Errors.error(`Install ${chalk_1.default.bold('expo-updates')} and try again.`, {
|
|
125
|
-
exit: 1,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const runtimeVersions = await getRuntimeVersionObjectAsync(exp, platformFlag, projectDir);
|
|
130
|
-
await checkEASUpdateURLIsSetAsync(exp, projectId);
|
|
81
|
+
let realizedPlatforms = [];
|
|
131
82
|
if (!branchName) {
|
|
132
83
|
if (autoFlag) {
|
|
133
84
|
branchName = await (0, utils_1.getDefaultBranchNameAsync)();
|
|
@@ -166,9 +117,9 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
166
117
|
// If we are republishing, we don't need to worry about building the bundle or uploading the assets.
|
|
167
118
|
// Instead we get the `updateInfoGroup` from the update we wish to republish.
|
|
168
119
|
let updatesToRepublish;
|
|
169
|
-
if (
|
|
120
|
+
if (groupId) {
|
|
170
121
|
const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync(graphqlClient, {
|
|
171
|
-
groupId
|
|
122
|
+
groupId,
|
|
172
123
|
});
|
|
173
124
|
updatesToRepublish = updatesByGroup;
|
|
174
125
|
}
|
|
@@ -176,7 +127,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
176
127
|
if (nonInteractive) {
|
|
177
128
|
throw new Error('Must supply --group when in non-interactive mode');
|
|
178
129
|
}
|
|
179
|
-
updatesToRepublish = await (0,
|
|
130
|
+
updatesToRepublish = await (0, queries_3.selectUpdateGroupOnBranchAsync)(graphqlClient, {
|
|
180
131
|
projectId,
|
|
181
132
|
branchName,
|
|
182
133
|
paginatedQueryOptions,
|
|
@@ -186,14 +137,14 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
186
137
|
// Only republish to the specified platforms
|
|
187
138
|
update => platformFlag === 'all' || update.platform === platformFlag);
|
|
188
139
|
if (updatesToRepublishFilteredByPlatform.length === 0) {
|
|
189
|
-
throw new Error(`There are no updates on branch "${branchName}" published for the platform(s) "${platformFlag}" with group ID "${
|
|
140
|
+
throw new Error(`There are no updates on branch "${branchName}" published for the platform(s) "${platformFlag}" with group ID "${groupId ? groupId : updatesToRepublish[0].group}". Did you mean to publish a new update instead?`);
|
|
190
141
|
}
|
|
191
142
|
let publicationPlatformMessage;
|
|
192
143
|
if (platformFlag === 'all') {
|
|
193
|
-
if (updatesToRepublishFilteredByPlatform.length
|
|
144
|
+
if (updatesToRepublishFilteredByPlatform.length < exports.defaultPublishPlatforms.length) {
|
|
194
145
|
log_1.default.warn(`You are republishing an update that wasn't published for all platforms.`);
|
|
195
146
|
}
|
|
196
|
-
publicationPlatformMessage = `The republished update will appear on the same
|
|
147
|
+
publicationPlatformMessage = `The republished update will appear on the same platforms it was originally published on: ${updatesToRepublishFilteredByPlatform
|
|
197
148
|
.map(update => update.platform)
|
|
198
149
|
.join(', ')}`;
|
|
199
150
|
}
|
|
@@ -206,11 +157,12 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
206
157
|
const platform = update.platform;
|
|
207
158
|
unsortedUpdateInfoGroups[platform] = JSON.parse(manifestFragment);
|
|
208
159
|
}
|
|
160
|
+
realizedPlatforms = updatesToRepublishFilteredByPlatform.map(update => update.platform);
|
|
209
161
|
// These are the same for each member of an update group
|
|
210
|
-
|
|
162
|
+
groupId = updatesToRepublishFilteredByPlatform[0].group;
|
|
211
163
|
oldMessage = (_b = updatesToRepublishFilteredByPlatform[0].message) !== null && _b !== void 0 ? _b : '';
|
|
212
164
|
oldRuntimeVersion = updatesToRepublishFilteredByPlatform[0].runtimeVersion;
|
|
213
|
-
if (!
|
|
165
|
+
if (!updateMessage) {
|
|
214
166
|
if (nonInteractive) {
|
|
215
167
|
throw new Error('Must supply --message when in non-interactive mode');
|
|
216
168
|
}
|
|
@@ -218,20 +170,20 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
218
170
|
if (jsonFlag) {
|
|
219
171
|
throw new Error(validationMessage);
|
|
220
172
|
}
|
|
221
|
-
({
|
|
173
|
+
({ updateMessage } = await (0, prompts_1.promptAsync)({
|
|
222
174
|
type: 'text',
|
|
223
|
-
name: '
|
|
175
|
+
name: 'updateMessage',
|
|
224
176
|
message: `Provide an update message.`,
|
|
225
|
-
initial: `Republish "${oldMessage}" - group: ${
|
|
177
|
+
initial: `Republish "${oldMessage}" - group: ${groupId}`,
|
|
226
178
|
validate: (value) => (value ? true : validationMessage),
|
|
227
179
|
}));
|
|
228
180
|
}
|
|
229
181
|
}
|
|
230
182
|
else {
|
|
231
|
-
if (!
|
|
232
|
-
|
|
183
|
+
if (!updateMessage && autoFlag) {
|
|
184
|
+
updateMessage = (_c = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _c === void 0 ? void 0 : _c.trim();
|
|
233
185
|
}
|
|
234
|
-
if (!
|
|
186
|
+
if (!updateMessage) {
|
|
235
187
|
if (nonInteractive) {
|
|
236
188
|
throw new Error('Must supply --message or use --auto when in non-interactive mode');
|
|
237
189
|
}
|
|
@@ -239,9 +191,9 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
239
191
|
if (jsonFlag) {
|
|
240
192
|
throw new Error(validationMessage);
|
|
241
193
|
}
|
|
242
|
-
({
|
|
194
|
+
({ updateMessage } = await (0, prompts_1.promptAsync)({
|
|
243
195
|
type: 'text',
|
|
244
|
-
name: '
|
|
196
|
+
name: 'updateMessage',
|
|
245
197
|
message: `Provide an update message.`,
|
|
246
198
|
initial: (_d = (await (0, vcs_1.getVcsClient)().getLastCommitMessageAsync())) === null || _d === void 0 ? void 0 : _d.trim(),
|
|
247
199
|
validate: (value) => (value ? true : validationMessage),
|
|
@@ -249,49 +201,66 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
249
201
|
}
|
|
250
202
|
// build bundle and upload assets for a new publish
|
|
251
203
|
if (!skipBundler) {
|
|
252
|
-
const bundleSpinner = (0, ora_1.ora)().start('
|
|
204
|
+
const bundleSpinner = (0, ora_1.ora)().start('Exporting...');
|
|
253
205
|
try {
|
|
254
|
-
await (0, publish_1.buildBundlesAsync)({ projectDir, inputDir });
|
|
255
|
-
bundleSpinner.succeed('
|
|
206
|
+
await (0, publish_1.buildBundlesAsync)({ projectDir, inputDir, exp, platformFlag });
|
|
207
|
+
bundleSpinner.succeed('Exported bundle(s)');
|
|
256
208
|
}
|
|
257
209
|
catch (e) {
|
|
258
|
-
bundleSpinner.fail('
|
|
210
|
+
bundleSpinner.fail('Export failed');
|
|
259
211
|
throw e;
|
|
260
212
|
}
|
|
261
213
|
}
|
|
262
|
-
|
|
214
|
+
// After possibly bundling, assert that the input directory can be found.
|
|
215
|
+
const distRoot = await (0, publish_1.resolveInputDirectoryAsync)(inputDir, { skipBundler });
|
|
216
|
+
const assetSpinner = (0, ora_1.ora)().start('Uploading...');
|
|
263
217
|
try {
|
|
264
|
-
const
|
|
265
|
-
const assets =
|
|
218
|
+
const collectedAssets = await (0, publish_1.collectAssetsAsync)(distRoot);
|
|
219
|
+
const assets = (0, publish_1.filterExportedPlatformsByFlag)(collectedAssets, platformFlag);
|
|
220
|
+
realizedPlatforms = Object.keys(assets);
|
|
266
221
|
const uploadResults = await (0, publish_1.uploadAssetsAsync)(graphqlClient, assets, projectId, (totalAssets, missingAssets) => {
|
|
267
|
-
assetSpinner.text = `Uploading
|
|
222
|
+
assetSpinner.text = `Uploading (${totalAssets - missingAssets}/${totalAssets})`;
|
|
268
223
|
});
|
|
269
224
|
uploadedAssetCount = uploadResults.uniqueUploadedAssetCount;
|
|
270
225
|
assetLimitPerUpdateGroup = uploadResults.assetLimitPerUpdateGroup;
|
|
271
226
|
unsortedUpdateInfoGroups = await (0, publish_1.buildUnsortedUpdateInfoGroupAsync)(assets, exp);
|
|
272
227
|
const uploadAssetSuccessMessage = uploadedAssetCount
|
|
273
|
-
? `Uploaded ${uploadedAssetCount} ${uploadedAssetCount === 1 ? '
|
|
274
|
-
: `
|
|
228
|
+
? `Uploaded ${uploadedAssetCount} ${uploadedAssetCount === 1 ? 'platform' : 'platforms'}`
|
|
229
|
+
: `Uploaded: No changes detected`;
|
|
275
230
|
assetSpinner.succeed(uploadAssetSuccessMessage);
|
|
276
231
|
}
|
|
277
232
|
catch (e) {
|
|
278
|
-
assetSpinner.fail('Failed to upload
|
|
233
|
+
assetSpinner.fail('Failed to upload');
|
|
279
234
|
throw e;
|
|
280
235
|
}
|
|
281
236
|
}
|
|
282
|
-
const truncatedMessage = (0,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
runtimeToPlatformMapping[runtime] = Object.entries(runtimeVersions)
|
|
286
|
-
.filter(pair => pair[1] === runtime)
|
|
287
|
-
.map(pair => pair[0]);
|
|
237
|
+
const truncatedMessage = (0, utils_2.truncateString)(updateMessage, 1024);
|
|
238
|
+
if (truncatedMessage !== updateMessage) {
|
|
239
|
+
log_1.default.warn('Update message exceeds the allowed 1024 character limit. Truncating message...');
|
|
288
240
|
}
|
|
289
|
-
const
|
|
241
|
+
const runtimeVersions = await getRuntimeVersionObjectAsync(exp, realizedPlatforms, projectDir);
|
|
242
|
+
const runtimeToPlatformMapping = [];
|
|
243
|
+
for (const runtime of runtimeVersions) {
|
|
244
|
+
const platforms = runtimeVersions
|
|
245
|
+
.filter(({ runtimeVersion }) => runtimeVersion === runtime.runtimeVersion)
|
|
246
|
+
.map(({ platform }) => platform);
|
|
247
|
+
if (!runtimeToPlatformMapping.find(item => item.runtimeVersion === runtime.runtimeVersion)) {
|
|
248
|
+
runtimeToPlatformMapping.push({ runtimeVersion: runtime.runtimeVersion, platforms });
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
const { branchId } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
290
252
|
appId: projectId,
|
|
291
|
-
|
|
253
|
+
branchName,
|
|
292
254
|
});
|
|
255
|
+
await (0, queries_2.ensureChannelExistsAsync)(graphqlClient, {
|
|
256
|
+
appId: projectId,
|
|
257
|
+
branchId,
|
|
258
|
+
channelName: branchName,
|
|
259
|
+
});
|
|
260
|
+
log_1.default.withTick(`Channel: ${chalk_1.default.bold(branchName)} pointed at branch: ${chalk_1.default.bold(branchName)}`);
|
|
261
|
+
const gitCommitHash = await (0, vcs_1.getVcsClient)().getCommitHashAsync();
|
|
293
262
|
// Sort the updates into different groups based on their platform specific runtime versions
|
|
294
|
-
const updateGroups =
|
|
263
|
+
const updateGroups = runtimeToPlatformMapping.map(({ runtimeVersion, platforms }) => {
|
|
295
264
|
const localUpdateInfoGroup = Object.fromEntries(platforms.map(platform => [
|
|
296
265
|
platform,
|
|
297
266
|
unsortedUpdateInfoGroups[platform],
|
|
@@ -302,8 +271,9 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
302
271
|
return {
|
|
303
272
|
branchId,
|
|
304
273
|
updateInfoGroup: localUpdateInfoGroup,
|
|
305
|
-
runtimeVersion: republish ? oldRuntimeVersion :
|
|
274
|
+
runtimeVersion: republish ? oldRuntimeVersion : runtimeVersion,
|
|
306
275
|
message: truncatedMessage,
|
|
276
|
+
gitCommitHash,
|
|
307
277
|
awaitingCodeSigningInfo: !!codeSigningInfo,
|
|
308
278
|
};
|
|
309
279
|
});
|
|
@@ -353,10 +323,10 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
353
323
|
log_1.default.log('👉 Since multiple runtime versions are defined, multiple update groups have been published.');
|
|
354
324
|
}
|
|
355
325
|
log_1.default.addNewLineIfNone();
|
|
356
|
-
for (const runtime of
|
|
357
|
-
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.runtimeVersion === runtime);
|
|
326
|
+
for (const runtime of (0, uniqBy_1.default)(runtimeVersions, version => version.runtimeVersion)) {
|
|
327
|
+
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.runtimeVersion === runtime.runtimeVersion);
|
|
358
328
|
if (newUpdatesForRuntimeVersion.length === 0) {
|
|
359
|
-
throw new Error(`Publish response is missing updates with runtime ${runtime}.`);
|
|
329
|
+
throw new Error(`Publish response is missing updates with runtime ${runtime.runtimeVersion}.`);
|
|
360
330
|
}
|
|
361
331
|
const platforms = newUpdatesForRuntimeVersion.map(update => update.platform);
|
|
362
332
|
const newAndroidUpdate = newUpdatesForRuntimeVersion.find(update => update.platform === 'android');
|
|
@@ -368,7 +338,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
368
338
|
const updateGroupLink = (0, log_1.link)(updateGroupUrl, { dim: false });
|
|
369
339
|
log_1.default.log((0, formatFields_1.default)([
|
|
370
340
|
{ label: 'Branch', value: branchName },
|
|
371
|
-
{ label: 'Runtime version', value: runtime },
|
|
341
|
+
{ label: 'Runtime version', value: runtime.runtimeVersion },
|
|
372
342
|
{ label: 'Platform', value: platforms.join(', ') },
|
|
373
343
|
{ label: 'Update group ID', value: updateGroupId },
|
|
374
344
|
...(newAndroidUpdate
|
|
@@ -376,6 +346,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
376
346
|
: []),
|
|
377
347
|
...(newIosUpdate ? [{ label: 'iOS update ID', value: newIosUpdate.id }] : []),
|
|
378
348
|
{ label: 'Message', value: truncatedMessage },
|
|
349
|
+
...(gitCommitHash ? [{ label: 'Commit', value: gitCommitHash }] : []),
|
|
379
350
|
{ label: 'Website link', value: updateGroupLink },
|
|
380
351
|
]));
|
|
381
352
|
log_1.default.addNewLineIfNone();
|
|
@@ -390,6 +361,32 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
390
361
|
}
|
|
391
362
|
}
|
|
392
363
|
}
|
|
364
|
+
sanitizeFlags(flags) {
|
|
365
|
+
var _b, _c;
|
|
366
|
+
const nonInteractive = (_b = flags['non-interactive']) !== null && _b !== void 0 ? _b : false;
|
|
367
|
+
const { auto, branch: branchName, message: updateMessage } = flags;
|
|
368
|
+
if (nonInteractive && !auto && !(branchName && updateMessage)) {
|
|
369
|
+
core_1.Errors.error('--auto or both --branch and --message are required when updating in non-interactive mode', { exit: 1 });
|
|
370
|
+
}
|
|
371
|
+
const groupId = flags.group;
|
|
372
|
+
const republish = flags.republish || !!groupId; // When --group is defined, we are republishing
|
|
373
|
+
if (nonInteractive && republish && !groupId) {
|
|
374
|
+
core_1.Errors.error(`--group is required when updating in non-interactive mode`, { exit: 1 });
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
auto,
|
|
378
|
+
branchName,
|
|
379
|
+
updateMessage,
|
|
380
|
+
groupId,
|
|
381
|
+
republish,
|
|
382
|
+
inputDir: flags['input-dir'],
|
|
383
|
+
skipBundler: flags['skip-bundler'],
|
|
384
|
+
platform: flags.platform,
|
|
385
|
+
privateKeyPath: flags['private-key-path'],
|
|
386
|
+
nonInteractive,
|
|
387
|
+
json: (_c = flags.json) !== null && _c !== void 0 ? _c : false,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
393
390
|
}
|
|
394
391
|
exports.default = UpdatePublish;
|
|
395
392
|
_a = UpdatePublish;
|
|
@@ -422,7 +419,11 @@ UpdatePublish.flags = {
|
|
|
422
419
|
}),
|
|
423
420
|
platform: core_1.Flags.enum({
|
|
424
421
|
char: 'p',
|
|
425
|
-
options: [
|
|
422
|
+
options: [
|
|
423
|
+
// TODO: Add web when it's fully supported
|
|
424
|
+
...exports.defaultPublishPlatforms,
|
|
425
|
+
'all',
|
|
426
|
+
],
|
|
426
427
|
default: 'all',
|
|
427
428
|
required: false,
|
|
428
429
|
}),
|
|
@@ -440,10 +441,13 @@ UpdatePublish.contextDefinition = {
|
|
|
440
441
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
441
442
|
..._a.ContextOptions.LoggedIn,
|
|
442
443
|
};
|
|
443
|
-
|
|
444
|
+
/** Get runtime versions grouped by platform. Runtime version is always `null` on web where the platform is always backwards compatible. */
|
|
445
|
+
async function getRuntimeVersionObjectAsync(exp, platforms, projectDir) {
|
|
444
446
|
var _b, _c;
|
|
445
|
-
const platforms = (platformFlag === 'all' ? ['android', 'ios'] : [platformFlag]);
|
|
446
447
|
for (const platform of platforms) {
|
|
448
|
+
if (platform === 'web') {
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
447
451
|
const isPolicy = typeof ((_c = (_b = exp[platform]) === null || _b === void 0 ? void 0 : _b.runtimeVersion) !== null && _c !== void 0 ? _c : exp.runtimeVersion) === 'object';
|
|
448
452
|
if (isPolicy) {
|
|
449
453
|
const isManaged = (await (0, workflow_1.resolveWorkflowAsync)(projectDir, platform)) === eas_build_job_1.Workflow.MANAGED;
|
|
@@ -452,24 +456,13 @@ async function getRuntimeVersionObjectAsync(exp, platformFlag, projectDir) {
|
|
|
452
456
|
}
|
|
453
457
|
}
|
|
454
458
|
}
|
|
455
|
-
return
|
|
456
|
-
platform
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
if (configuredURL !== expectedURL) {
|
|
465
|
-
throw new Error(`The update URL is incorrectly configured for EAS Update. Set updates.url to ${expectedURL} in your ${chalk_1.default.bold('app.json')}.`);
|
|
466
|
-
}
|
|
459
|
+
return [...new Set(platforms)].map(platform => {
|
|
460
|
+
if (platform === 'web') {
|
|
461
|
+
return { platform: 'web', runtimeVersion: 'UNVERSIONED' };
|
|
462
|
+
}
|
|
463
|
+
return {
|
|
464
|
+
platform,
|
|
465
|
+
runtimeVersion: (0, nullthrows_1.default)(config_plugins_1.Updates.getRuntimeVersion(exp, platform), `Unable to determine runtime version for ${platform_1.requestedPlatformDisplayNames[platform]}. ${(0, log_1.learnMore)('https://docs.expo.dev/eas-update/runtime-versions/')}`),
|
|
466
|
+
};
|
|
467
|
+
});
|
|
467
468
|
}
|
|
468
|
-
const truncatePublishUpdateMessage = (originalMessage) => {
|
|
469
|
-
if (originalMessage.length > 1024) {
|
|
470
|
-
log_1.default.warn('Update message exceeds the allowed 1024 character limit. Truncating message...');
|
|
471
|
-
return originalMessage.substring(0, 1021) + '...';
|
|
472
|
-
}
|
|
473
|
-
return originalMessage;
|
|
474
|
-
};
|
|
475
|
-
exports.truncatePublishUpdateMessage = truncatePublishUpdateMessage;
|
|
@@ -4,7 +4,7 @@ export default class UpdateList extends EasCommand {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
6
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
limit:
|
|
7
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
8
8
|
offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
|
|
9
9
|
branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
10
|
all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -4,7 +4,7 @@ export default class WebhookCreate extends EasCommand {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
6
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
7
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType | undefined>;
|
|
8
8
|
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
9
9
|
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ import { WebhookType } from '../../graphql/generated';
|
|
|
3
3
|
export default class WebhookList extends EasCommand {
|
|
4
4
|
static description: string;
|
|
5
5
|
static flags: {
|
|
6
|
-
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
6
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType | undefined>;
|
|
7
7
|
};
|
|
8
8
|
static contextDefinition: {
|
|
9
9
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -5,7 +5,7 @@ export default class WebhookUpdate extends EasCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
-
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
|
|
8
|
+
event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType | undefined>;
|
|
9
9
|
url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
10
10
|
secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
11
|
};
|
|
@@ -3,17 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.promptForUDIDAsync = exports.runInputMethodAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
-
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
7
6
|
const AppleDeviceMutation_1 = require("../../../credentials/ios/api/graphql/mutations/AppleDeviceMutation");
|
|
8
7
|
const generated_1 = require("../../../graphql/generated");
|
|
9
8
|
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
10
9
|
const ora_1 = require("../../../ora");
|
|
11
10
|
const prompts_1 = require("../../../prompts");
|
|
12
11
|
const udids_1 = require("../../udids");
|
|
13
|
-
const
|
|
14
|
-
[generated_1.AppleDeviceClass.Iphone]: 'iPhone',
|
|
15
|
-
[generated_1.AppleDeviceClass.Ipad]: 'iPad',
|
|
16
|
-
};
|
|
12
|
+
const formatDevice_1 = require("../../utils/formatDevice");
|
|
17
13
|
async function runInputMethodAsync(graphqlClient, accountId, appleTeam) {
|
|
18
14
|
log_1.default.newLine();
|
|
19
15
|
log_1.default.log(chalk_1.default.yellow('This is an advanced option. Use at your own risk.'));
|
|
@@ -58,7 +54,7 @@ async function collectDeviceDataAsync(appleTeam, initialValues = {}) {
|
|
|
58
54
|
log_1.default.log(`We are going to register the following device in our database.
|
|
59
55
|
This will ${chalk_1.default.bold('not')} register the device on the Apple Developer Portal yet.`);
|
|
60
56
|
log_1.default.newLine();
|
|
61
|
-
|
|
57
|
+
log_1.default.log((0, formatDevice_1.formatNewDevice)({ ...deviceData, identifier: deviceData.udid }, appleTeam));
|
|
62
58
|
log_1.default.newLine();
|
|
63
59
|
const registrationConfirmed = await (0, prompts_1.confirmAsync)({
|
|
64
60
|
message: 'Is this what you want to register?',
|
|
@@ -123,12 +119,3 @@ async function promptForDeviceClassAsync(initial) {
|
|
|
123
119
|
});
|
|
124
120
|
return deviceClass;
|
|
125
121
|
}
|
|
126
|
-
function printDeviceDataSummary({ udid, name, deviceClass }, appleTeam) {
|
|
127
|
-
var _a;
|
|
128
|
-
const deviceSummary = new cli_table3_1.default({
|
|
129
|
-
colWidths: [25, 55],
|
|
130
|
-
wordWrap: true,
|
|
131
|
-
});
|
|
132
|
-
deviceSummary.push(['Apple Team ID', appleTeam.appleTeamIdentifier], ['Apple Team Name', (_a = appleTeam.appleTeamName) !== null && _a !== void 0 ? _a : '(unknown)'], ['Device UDID', udid], ['Device Name', name !== null && name !== void 0 ? name : '(empty)'], ['Device Class', deviceClass ? DEVICE_CLASS_DISPLAY_NAMES[deviceClass] : '(unknown)']);
|
|
133
|
-
log_1.default.log(deviceSummary.toString());
|
|
134
|
-
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AppleDevice, AppleTeam } from '../../graphql/generated';
|
|
2
2
|
declare type Device = Pick<AppleDevice, 'id' | 'identifier' | 'name' | 'deviceClass' | 'enabled' | 'model'>;
|
|
3
|
+
declare type NewDevice = Pick<AppleDevice, 'identifier' | 'name' | 'deviceClass'>;
|
|
3
4
|
export declare type AppleTeamIdAndName = Pick<AppleTeam, 'appleTeamIdentifier' | 'appleTeamName'>;
|
|
4
5
|
export default function formatDevice(device: Device, team?: AppleTeamIdAndName): string;
|
|
6
|
+
export declare function formatNewDevice(device: NewDevice, team?: AppleTeamIdAndName): string;
|
|
5
7
|
export {};
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatNewDevice = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const generated_1 = require("../../graphql/generated");
|
|
4
6
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
7
|
+
const DEVICE_CLASS_DISPLAY_NAMES = {
|
|
8
|
+
[generated_1.AppleDeviceClass.Iphone]: 'iPhone',
|
|
9
|
+
[generated_1.AppleDeviceClass.Ipad]: 'iPad',
|
|
10
|
+
};
|
|
11
|
+
function formatDeviceClass(device) {
|
|
12
|
+
if (!device.deviceClass || !DEVICE_CLASS_DISPLAY_NAMES[device.deviceClass]) {
|
|
13
|
+
return 'Unknown';
|
|
14
|
+
}
|
|
15
|
+
return [DEVICE_CLASS_DISPLAY_NAMES[device.deviceClass], 'model' in device ? device.model : '']
|
|
16
|
+
.filter(value => !!value)
|
|
17
|
+
.join(' ');
|
|
18
|
+
}
|
|
5
19
|
function formatDevice(device, team) {
|
|
6
20
|
var _a, _b;
|
|
7
21
|
const fields = [
|
|
@@ -9,18 +23,29 @@ function formatDevice(device, team) {
|
|
|
9
23
|
{ label: 'Name', value: (_a = device.name) !== null && _a !== void 0 ? _a : 'Unknown' },
|
|
10
24
|
{
|
|
11
25
|
label: 'Class',
|
|
12
|
-
value: device
|
|
13
|
-
? `${device.deviceClass}${device.model ? ` ${device.model}` : ''}`
|
|
14
|
-
: 'Unknown',
|
|
26
|
+
value: formatDeviceClass(device),
|
|
15
27
|
},
|
|
16
28
|
{ label: 'UDID', value: device.identifier },
|
|
17
29
|
];
|
|
18
30
|
if (team) {
|
|
19
|
-
fields.push(
|
|
20
|
-
{ label: 'Apple Team ID', value: team.appleTeamIdentifier },
|
|
21
|
-
{ label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' },
|
|
22
|
-
]);
|
|
31
|
+
fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' });
|
|
23
32
|
}
|
|
24
33
|
return (0, formatFields_1.default)(fields);
|
|
25
34
|
}
|
|
26
35
|
exports.default = formatDevice;
|
|
36
|
+
function formatNewDevice(device, team) {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const fields = [
|
|
39
|
+
{ label: 'Name', value: (_a = device.name) !== null && _a !== void 0 ? _a : '(empty)' },
|
|
40
|
+
{
|
|
41
|
+
label: 'Class',
|
|
42
|
+
value: formatDeviceClass(device),
|
|
43
|
+
},
|
|
44
|
+
{ label: 'UDID', value: device.identifier },
|
|
45
|
+
];
|
|
46
|
+
if (team) {
|
|
47
|
+
fields.push({ label: 'Apple Team ID', value: team.appleTeamIdentifier }, { label: 'Apple Team Name', value: (_b = team.appleTeamName) !== null && _b !== void 0 ? _b : 'Unknown' });
|
|
48
|
+
}
|
|
49
|
+
return (0, formatFields_1.default)(fields);
|
|
50
|
+
}
|
|
51
|
+
exports.formatNewDevice = formatNewDevice;
|
package/build/env.d.ts
CHANGED
|
@@ -7,5 +7,13 @@ declare const _default: {
|
|
|
7
7
|
* ignore failures when parsing build.gradle.
|
|
8
8
|
*/
|
|
9
9
|
overrideAndroidApplicationId: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Comma separated list of feature gate keys of feature gates to evaluate override to true.
|
|
12
|
+
*/
|
|
13
|
+
featureGateEnable: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Comma separated list of feature gate keys of feature gates to evaluate override to false.
|
|
16
|
+
*/
|
|
17
|
+
featureGateDisable: string | undefined;
|
|
10
18
|
};
|
|
11
19
|
export default _default;
|