eas-cli 5.3.1 → 5.5.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 +103 -55
- package/build/branch/utils.d.ts +2 -1
- package/build/branch/utils.js +2 -4
- package/build/build/android/build.js +5 -3
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.d.ts +3 -1
- package/build/build/android/syncProjectConfiguration.js +2 -2
- package/build/build/android/version.d.ts +4 -2
- package/build/build/android/version.js +4 -4
- package/build/build/build.d.ts +1 -3
- package/build/build/build.js +7 -58
- package/build/build/configure.d.ts +2 -0
- package/build/build/configure.js +9 -10
- package/build/build/context.d.ts +4 -0
- package/build/build/createContext.d.ts +3 -1
- package/build/build/createContext.js +7 -2
- package/build/build/ios/build.js +4 -0
- package/build/build/ios/prepareJob.js +1 -2
- package/build/build/ios/syncProjectConfiguration.d.ts +3 -1
- package/build/build/ios/syncProjectConfiguration.js +3 -3
- package/build/build/ios/version.d.ts +6 -4
- package/build/build/ios/version.js +10 -10
- package/build/build/metadata.js +7 -8
- package/build/build/runBuildAndSubmit.d.ts +2 -1
- package/build/build/runBuildAndSubmit.js +12 -8
- package/build/build/utils/devClient.d.ts +3 -1
- package/build/build/utils/devClient.js +6 -7
- package/build/build/utils/repository.d.ts +6 -5
- package/build/build/utils/repository.js +14 -15
- package/build/build/utils/resourceClass.js +3 -12
- package/build/build/validate.js +2 -3
- package/build/commandUtils/EasCommand.d.ts +4 -0
- package/build/commandUtils/EasCommand.js +4 -0
- package/build/commandUtils/context/VcsClientContextField.d.ts +5 -0
- package/build/commandUtils/context/VcsClientContextField.js +11 -0
- package/build/commands/branch/create.d.ts +1 -0
- package/build/commands/branch/create.js +3 -2
- package/build/commands/build/cancel.d.ts +1 -0
- package/build/commands/build/cancel.js +1 -0
- package/build/commands/build/configure.d.ts +1 -0
- package/build/commands/build/configure.js +8 -6
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +3 -2
- package/build/commands/build/inspect.d.ts +1 -0
- package/build/commands/build/inspect.js +5 -6
- package/build/commands/build/internal.d.ts +1 -0
- package/build/commands/build/internal.js +3 -2
- package/build/commands/build/list.d.ts +1 -0
- package/build/commands/build/list.js +1 -0
- package/build/commands/build/resign.d.ts +1 -0
- package/build/commands/build/resign.js +5 -3
- package/build/commands/build/run.d.ts +1 -0
- package/build/commands/build/run.js +1 -0
- package/build/commands/build/version/get.d.ts +1 -0
- package/build/commands/build/version/get.js +3 -1
- package/build/commands/build/version/set.d.ts +1 -0
- package/build/commands/build/version/set.js +3 -1
- package/build/commands/build/version/sync.d.ts +1 -0
- package/build/commands/build/version/sync.js +9 -4
- package/build/commands/build/view.d.ts +1 -0
- package/build/commands/build/view.js +1 -0
- package/build/commands/credentials.d.ts +1 -0
- package/build/commands/credentials.js +3 -2
- package/build/commands/diagnostics.d.ts +1 -0
- package/build/commands/diagnostics.js +6 -5
- package/build/commands/metadata/pull.d.ts +1 -0
- package/build/commands/metadata/pull.js +4 -2
- package/build/commands/metadata/push.d.ts +1 -0
- package/build/commands/metadata/push.js +4 -2
- package/build/commands/project/init.d.ts +1 -0
- package/build/commands/project/init.js +43 -11
- package/build/commands/submit.d.ts +1 -0
- package/build/commands/submit.js +3 -1
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +4 -3
- package/build/commands/update/index.d.ts +1 -0
- package/build/commands/update/index.js +17 -11
- package/build/commands/update/roll-back-to-embedded.d.ts +1 -1
- package/build/commands/update/roll-back-to-embedded.js +8 -6
- package/build/commands/update/rollback.d.ts +0 -1
- package/build/commands/update/rollback.js +0 -1
- package/build/credentials/android/actions/BuildCredentialsUtils.js +1 -1
- package/build/credentials/android/api/GraphqlClient.js +0 -1
- package/build/credentials/context.d.ts +3 -0
- package/build/credentials/context.js +1 -0
- package/build/credentials/credentialsJson/update.js +6 -8
- package/build/credentials/ios/actions/DeviceUtils.js +1 -1
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +7 -0
- package/build/credentials/manager/HelperActions.d.ts +2 -0
- package/build/credentials/manager/ManageAndroid.js +2 -1
- package/build/credentials/manager/ManageIos.js +3 -0
- package/build/credentials/manager/SelectPlatform.d.ts +3 -1
- package/build/credentials/manager/SelectPlatform.js +2 -1
- package/build/graphql/generated.d.ts +457 -4
- package/build/graphql/generated.js +7 -2
- package/build/graphql/types/Account.js +4 -0
- package/build/graphql/types/credentials/AppleDevice.js +1 -0
- package/build/metadata/auth.js +4 -4
- package/build/project/android/applicationId.d.ts +4 -2
- package/build/project/android/applicationId.js +5 -5
- package/build/project/android/gradle.d.ts +2 -1
- package/build/project/android/gradle.js +2 -2
- package/build/project/applicationIdentifier.d.ts +3 -1
- package/build/project/applicationIdentifier.js +10 -7
- package/build/project/ios/bundleIdentifier.d.ts +4 -2
- package/build/project/ios/bundleIdentifier.js +5 -5
- package/build/project/ios/entitlements.d.ts +2 -1
- package/build/project/ios/entitlements.js +2 -2
- package/build/project/ios/scheme.d.ts +3 -1
- package/build/project/ios/scheme.js +2 -2
- package/build/project/ios/target.d.ts +4 -2
- package/build/project/ios/target.js +10 -8
- package/build/project/projectUtils.d.ts +1 -0
- package/build/project/projectUtils.js +12 -1
- package/build/project/publish.d.ts +6 -4
- package/build/project/publish.js +10 -11
- package/build/project/workflow.d.ts +4 -3
- package/build/project/workflow.js +5 -8
- package/build/submit/android/AndroidSubmitCommand.js +1 -1
- package/build/submit/context.d.ts +3 -0
- package/build/submit/context.js +2 -1
- package/build/submit/ios/AppProduce.js +1 -1
- package/build/submit/ios/AscApiKeySource.js +1 -1
- package/build/update/configure.d.ts +3 -1
- package/build/update/configure.js +5 -5
- package/build/update/ios/UpdatesModule.d.ts +2 -1
- package/build/update/ios/UpdatesModule.js +4 -5
- package/build/uploads.d.ts +1 -1
- package/build/uploads.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
|
@@ -26,13 +26,12 @@ const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"))
|
|
|
26
26
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
27
27
|
const json_1 = require("../../utils/json");
|
|
28
28
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
29
|
-
const vcs_1 = require("../../vcs");
|
|
30
29
|
class UpdatePublish extends EasCommand_1.default {
|
|
31
30
|
async runAsync() {
|
|
32
31
|
const { flags: rawFlags } = await this.parse(UpdatePublish);
|
|
33
32
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
34
33
|
const { auto: autoFlag, platform: platformFlag, channelName: channelNameArg, dev, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
35
|
-
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdatePublish, {
|
|
34
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(UpdatePublish, {
|
|
36
35
|
nonInteractive,
|
|
37
36
|
});
|
|
38
37
|
if (jsonFlag) {
|
|
@@ -45,12 +44,14 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
45
44
|
platform: (0, publish_1.getRequestedPlatform)(platformFlag),
|
|
46
45
|
projectDir,
|
|
47
46
|
projectId,
|
|
47
|
+
vcsClient,
|
|
48
48
|
});
|
|
49
49
|
const { exp } = await getDynamicPublicProjectConfigAsync();
|
|
50
50
|
const { exp: expPrivate } = await getDynamicPrivateProjectConfigAsync();
|
|
51
51
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
52
52
|
const branchName = await (0, publish_1.getBranchNameForCommandAsync)({
|
|
53
53
|
graphqlClient,
|
|
54
|
+
vcsClient,
|
|
54
55
|
projectId,
|
|
55
56
|
channelNameArg,
|
|
56
57
|
branchNameArg,
|
|
@@ -58,7 +59,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
58
59
|
nonInteractive,
|
|
59
60
|
paginatedQueryOptions,
|
|
60
61
|
});
|
|
61
|
-
const updateMessage = await (0, publish_1.getUpdateMessageForCommandAsync)({
|
|
62
|
+
const updateMessage = await (0, publish_1.getUpdateMessageForCommandAsync)(vcsClient, {
|
|
62
63
|
updateMessageArg,
|
|
63
64
|
autoFlag,
|
|
64
65
|
nonInteractive,
|
|
@@ -88,29 +89,34 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
88
89
|
const assets = (0, publish_1.filterExportedPlatformsByFlag)(collectedAssets, platformFlag);
|
|
89
90
|
realizedPlatforms = Object.keys(assets);
|
|
90
91
|
// Timeout mechanism:
|
|
91
|
-
// - Start with
|
|
92
|
-
// uploaded assets has a timeout of 60 seconds.
|
|
93
|
-
// - Each time one or more assets reports as ready, reset the timeout
|
|
94
|
-
// -
|
|
92
|
+
// - Start with NO_ACTIVITY_TIMEOUT. 90 seconds is chosen because the cloud function that processes
|
|
93
|
+
// uploaded assets has a timeout of 60 seconds and uploading can take some time on a slow connection.
|
|
94
|
+
// - Each time one or more assets reports as ready, reset the timeout.
|
|
95
|
+
// - Each time an asset upload begins, reset the timeout. This includes retries.
|
|
96
|
+
// - Start upload. Internally, uploadAssetsAsync uploads them all first and then checks for successful
|
|
95
97
|
// processing every (5 + n) seconds with a linear backoff of n + 1 second.
|
|
96
98
|
// - At the same time as upload is started, start timeout checker which checks every 1 second to see
|
|
97
99
|
// if timeout has been reached. When timeout expires, send a cancellation signal to currently running
|
|
98
100
|
// upload function call to instruct it to stop uploading or checking for successful processing.
|
|
101
|
+
const NO_ACTIVITY_TIMEOUT = 90 * 1000; // 90 seconds
|
|
99
102
|
let lastUploadedStorageKeys = new Set();
|
|
100
103
|
let lastAssetUploadResults = [];
|
|
101
|
-
let timeAtWhichToTimeout = Date.now() +
|
|
104
|
+
let timeAtWhichToTimeout = Date.now() + NO_ACTIVITY_TIMEOUT;
|
|
102
105
|
const cancelationToken = { isCanceledOrFinished: false };
|
|
103
106
|
const uploadResults = await Promise.race([
|
|
104
107
|
(0, publish_1.uploadAssetsAsync)(graphqlClient, assets, projectId, cancelationToken, assetUploadResults => {
|
|
105
108
|
const currentUploadedStorageKeys = new Set(assetUploadResults.filter(r => r.finished).map(r => r.asset.storageKey));
|
|
106
109
|
if (!(0, areSetsEqual_1.default)(currentUploadedStorageKeys, lastUploadedStorageKeys)) {
|
|
107
|
-
timeAtWhichToTimeout = Date.now() +
|
|
110
|
+
timeAtWhichToTimeout = Date.now() + NO_ACTIVITY_TIMEOUT; // reset timeout to NO_ACTIVITY_TIMEOUT
|
|
108
111
|
lastUploadedStorageKeys = currentUploadedStorageKeys;
|
|
109
112
|
lastAssetUploadResults = assetUploadResults;
|
|
110
113
|
}
|
|
111
114
|
const totalAssets = assetUploadResults.length;
|
|
112
115
|
const missingAssetCount = assetUploadResults.filter(a => !a.finished).length;
|
|
113
116
|
assetSpinner.text = `Uploading (${totalAssets - missingAssetCount}/${totalAssets})`;
|
|
117
|
+
}, () => {
|
|
118
|
+
// when an upload is retried, reset the timeout as we know this will now need more time
|
|
119
|
+
timeAtWhichToTimeout = Date.now() + NO_ACTIVITY_TIMEOUT; // reset timeout to NO_ACTIVITY_TIMEOUT
|
|
114
120
|
}),
|
|
115
121
|
(async () => {
|
|
116
122
|
while (Date.now() < timeAtWhichToTimeout) {
|
|
@@ -164,7 +170,7 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
164
170
|
assetSpinner.fail('Failed to upload');
|
|
165
171
|
throw e;
|
|
166
172
|
}
|
|
167
|
-
const runtimeVersions = await (0, publish_1.getRuntimeVersionObjectAsync)(exp, realizedPlatforms, projectDir);
|
|
173
|
+
const runtimeVersions = await (0, publish_1.getRuntimeVersionObjectAsync)(exp, realizedPlatforms, projectDir, vcsClient);
|
|
168
174
|
const runtimeToPlatformMapping = (0, publish_1.getRuntimeToPlatformMappingFromRuntimeVersions)(runtimeVersions);
|
|
169
175
|
const { branchId, createdBranch } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
170
176
|
appId: projectId,
|
|
@@ -178,7 +184,6 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
178
184
|
});
|
|
179
185
|
log_1.default.withTick(`Channel: ${chalk_1.default.bold(branchName)} pointed at branch: ${chalk_1.default.bold(branchName)}`);
|
|
180
186
|
}
|
|
181
|
-
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
182
187
|
const gitCommitHash = await vcsClient.getCommitHashAsync();
|
|
183
188
|
const isGitWorkingTreeDirty = await vcsClient.hasUncommittedChangesAsync();
|
|
184
189
|
// Sort the updates into different groups based on their platform specific runtime versions
|
|
@@ -388,4 +393,5 @@ UpdatePublish.flags = {
|
|
|
388
393
|
UpdatePublish.contextDefinition = {
|
|
389
394
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
390
395
|
..._a.ContextOptions.LoggedIn,
|
|
396
|
+
..._a.ContextOptions.Vcs,
|
|
391
397
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
2
|
export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
3
|
-
static hidden: boolean;
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
5
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -13,6 +12,7 @@ export default class UpdateRollBackToEmbedded extends EasCommand {
|
|
|
13
12
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
14
13
|
};
|
|
15
14
|
static contextDefinition: {
|
|
15
|
+
vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
|
|
16
16
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
17
17
|
getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
18
18
|
getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
@@ -25,13 +25,12 @@ const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"))
|
|
|
25
25
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
26
26
|
const json_1 = require("../../utils/json");
|
|
27
27
|
const statuspageService_1 = require("../../utils/statuspageService");
|
|
28
|
-
const vcs_1 = require("../../vcs");
|
|
29
28
|
class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
30
29
|
async runAsync() {
|
|
31
30
|
const { flags: rawFlags } = await this.parse(UpdateRollBackToEmbedded);
|
|
32
31
|
const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(rawFlags);
|
|
33
32
|
const { auto: autoFlag, platform: platformFlag, channelName: channelNameArg, updateMessage: updateMessageArg, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, } = this.sanitizeFlags(rawFlags);
|
|
34
|
-
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(UpdateRollBackToEmbedded, {
|
|
33
|
+
const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(UpdateRollBackToEmbedded, {
|
|
35
34
|
nonInteractive,
|
|
36
35
|
});
|
|
37
36
|
if (jsonFlag) {
|
|
@@ -44,12 +43,16 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
44
43
|
platform: (0, publish_1.getRequestedPlatform)(platformFlag),
|
|
45
44
|
projectDir,
|
|
46
45
|
projectId,
|
|
46
|
+
vcsClient,
|
|
47
47
|
});
|
|
48
|
+
// check that the expo-updates package version supports roll back to embedded
|
|
49
|
+
await (0, projectUtils_1.enforceRollBackToEmbeddedUpdateSupportAsync)(projectDir);
|
|
48
50
|
const { exp } = await getDynamicPublicProjectConfigAsync();
|
|
49
51
|
const { exp: expPrivate } = await getDynamicPrivateProjectConfigAsync();
|
|
50
52
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
51
53
|
const branchName = await (0, publish_1.getBranchNameForCommandAsync)({
|
|
52
54
|
graphqlClient,
|
|
55
|
+
vcsClient,
|
|
53
56
|
projectId,
|
|
54
57
|
channelNameArg,
|
|
55
58
|
branchNameArg,
|
|
@@ -57,7 +60,7 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
57
60
|
nonInteractive,
|
|
58
61
|
paginatedQueryOptions,
|
|
59
62
|
});
|
|
60
|
-
const updateMessage = await (0, publish_1.getUpdateMessageForCommandAsync)({
|
|
63
|
+
const updateMessage = await (0, publish_1.getUpdateMessageForCommandAsync)(vcsClient, {
|
|
61
64
|
updateMessageArg,
|
|
62
65
|
autoFlag,
|
|
63
66
|
nonInteractive,
|
|
@@ -76,10 +79,9 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
log_1.default.withTick(`Channel: ${chalk_1.default.bold(branchName)} pointed at branch: ${chalk_1.default.bold(branchName)}`);
|
|
79
|
-
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
80
82
|
const gitCommitHash = await vcsClient.getCommitHashAsync();
|
|
81
83
|
const isGitWorkingTreeDirty = await vcsClient.hasUncommittedChangesAsync();
|
|
82
|
-
const runtimeVersions = await (0, publish_1.getRuntimeVersionObjectAsync)(exp, realizedPlatforms, projectDir);
|
|
84
|
+
const runtimeVersions = await (0, publish_1.getRuntimeVersionObjectAsync)(exp, realizedPlatforms, projectDir, vcsClient);
|
|
83
85
|
let newUpdates;
|
|
84
86
|
const publishSpinner = (0, ora_1.ora)('Publishing...').start();
|
|
85
87
|
try {
|
|
@@ -212,7 +214,6 @@ class UpdateRollBackToEmbedded extends EasCommand_1.default {
|
|
|
212
214
|
}
|
|
213
215
|
exports.default = UpdateRollBackToEmbedded;
|
|
214
216
|
_a = UpdateRollBackToEmbedded;
|
|
215
|
-
UpdateRollBackToEmbedded.hidden = true; // until we launch
|
|
216
217
|
UpdateRollBackToEmbedded.description = 'roll back to the embedded update';
|
|
217
218
|
UpdateRollBackToEmbedded.flags = {
|
|
218
219
|
branch: core_1.Flags.string({
|
|
@@ -250,4 +251,5 @@ UpdateRollBackToEmbedded.flags = {
|
|
|
250
251
|
UpdateRollBackToEmbedded.contextDefinition = {
|
|
251
252
|
..._a.ContextOptions.DynamicProjectConfig,
|
|
252
253
|
..._a.ContextOptions.LoggedIn,
|
|
254
|
+
..._a.ContextOptions.Vcs,
|
|
253
255
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
2
|
export default class UpdateRollback extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
|
-
static hidden: boolean;
|
|
5
4
|
static flags: {
|
|
6
5
|
'private-key-path': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
6
|
};
|
|
@@ -31,7 +31,6 @@ class UpdateRollback extends EasCommand_1.default {
|
|
|
31
31
|
}
|
|
32
32
|
exports.default = UpdateRollback;
|
|
33
33
|
UpdateRollback.description = 'roll back to an embedded update or an existing update';
|
|
34
|
-
UpdateRollback.hidden = true;
|
|
35
34
|
UpdateRollback.flags = {
|
|
36
35
|
'private-key-path': core_1.Flags.string({
|
|
37
36
|
description: `File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named "private-key.pem" in the certificate's directory.`,
|
|
@@ -66,7 +66,7 @@ async function getAppLookupParamsFromContextAsync(ctx, gradleContext) {
|
|
|
66
66
|
const projectName = ctx.exp.slug;
|
|
67
67
|
const projectId = ctx.projectId;
|
|
68
68
|
const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(ctx.graphqlClient, projectId);
|
|
69
|
-
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, gradleContext);
|
|
69
|
+
const androidApplicationIdentifier = await (0, applicationId_1.getApplicationIdAsync)(ctx.projectDir, ctx.exp, ctx.vcsClient, gradleContext);
|
|
70
70
|
if (!androidApplicationIdentifier) {
|
|
71
71
|
throw new errors_1.AndroidPackageNotDefinedError(`android.package needs to be defined in your ${(0, projectUtils_1.getProjectConfigDescription)(ctx.projectDir)} file`);
|
|
72
72
|
}
|
|
@@ -116,7 +116,6 @@ async function createKeystoreAsync(graphqlClient, account, keystore) {
|
|
|
116
116
|
keystorePassword: keystore.keystorePassword,
|
|
117
117
|
keyAlias: keystore.keyAlias,
|
|
118
118
|
keyPassword: keystore.keyPassword,
|
|
119
|
-
type: keystore.type,
|
|
120
119
|
}, account.id);
|
|
121
120
|
}
|
|
122
121
|
exports.createKeystoreAsync = createKeystoreAsync;
|
|
@@ -4,6 +4,7 @@ import { EasJson } from '@expo/eas-json';
|
|
|
4
4
|
import { Analytics } from '../analytics/AnalyticsManager';
|
|
5
5
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
6
6
|
import { Actor } from '../user/User';
|
|
7
|
+
import { Client } from '../vcs/vcs';
|
|
7
8
|
import * as AndroidGraphqlClient from './android/api/GraphqlClient';
|
|
8
9
|
import * as IosGraphqlClient from './ios/api/GraphqlClient';
|
|
9
10
|
import AppStoreApi from './ios/appstore/AppStoreApi';
|
|
@@ -21,6 +22,7 @@ export declare class CredentialsContext {
|
|
|
21
22
|
readonly user: Actor;
|
|
22
23
|
readonly graphqlClient: ExpoGraphqlClient;
|
|
23
24
|
readonly analytics: Analytics;
|
|
25
|
+
readonly vcsClient: Client;
|
|
24
26
|
readonly easJsonCliConfig?: EasJson['cli'];
|
|
25
27
|
private shouldAskAuthenticateAppStore;
|
|
26
28
|
private projectInfo;
|
|
@@ -32,6 +34,7 @@ export declare class CredentialsContext {
|
|
|
32
34
|
user: Actor;
|
|
33
35
|
graphqlClient: ExpoGraphqlClient;
|
|
34
36
|
analytics: Analytics;
|
|
37
|
+
vcsClient: Client;
|
|
35
38
|
env?: Env;
|
|
36
39
|
});
|
|
37
40
|
get hasProjectContext(): boolean;
|
|
@@ -23,6 +23,7 @@ class CredentialsContext {
|
|
|
23
23
|
this.user = options.user;
|
|
24
24
|
this.graphqlClient = options.graphqlClient;
|
|
25
25
|
this.analytics = options.analytics;
|
|
26
|
+
this.vcsClient = options.vcsClient;
|
|
26
27
|
this.nonInteractive = (_a = options.nonInteractive) !== null && _a !== void 0 ? _a : false;
|
|
27
28
|
this.projectInfo = options.projectInfo;
|
|
28
29
|
}
|
|
@@ -8,7 +8,6 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
8
8
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
9
|
const target_1 = require("../../project/ios/target");
|
|
10
10
|
const zipObject_1 = tslib_1.__importDefault(require("../../utils/expodash/zipObject"));
|
|
11
|
-
const vcs_1 = require("../../vcs");
|
|
12
11
|
const git_1 = tslib_1.__importDefault(require("../../vcs/clients/git"));
|
|
13
12
|
const read_1 = require("./read");
|
|
14
13
|
const utils_1 = require("./utils");
|
|
@@ -26,7 +25,7 @@ async function updateAndroidCredentialsAsync(ctx, buildCredentials) {
|
|
|
26
25
|
const keystorePath = (_d = (_c = (_b = rawCredentialsJson === null || rawCredentialsJson === void 0 ? void 0 : rawCredentialsJson.android) === null || _b === void 0 ? void 0 : _b.keystore) === null || _c === void 0 ? void 0 : _c.keystorePath) !== null && _d !== void 0 ? _d : 'credentials/android/keystore.jks';
|
|
27
26
|
log_1.default.log(`Writing Keystore to ${keystorePath}`);
|
|
28
27
|
await updateFileAsync(ctx.projectDir, keystorePath, keystore.keystore);
|
|
29
|
-
const shouldWarnKeystore = await isFileUntrackedAsync(keystorePath);
|
|
28
|
+
const shouldWarnKeystore = await isFileUntrackedAsync(keystorePath, ctx.vcsClient);
|
|
30
29
|
const androidCredentials = {
|
|
31
30
|
keystore: {
|
|
32
31
|
keystorePath,
|
|
@@ -39,7 +38,7 @@ async function updateAndroidCredentialsAsync(ctx, buildCredentials) {
|
|
|
39
38
|
await fs_extra_1.default.writeJson((0, utils_1.getCredentialsJsonPath)(ctx.projectDir), rawCredentialsJson, {
|
|
40
39
|
spaces: 2,
|
|
41
40
|
});
|
|
42
|
-
const shouldWarnCredentialsJson = await isFileUntrackedAsync('credentials.json');
|
|
41
|
+
const shouldWarnCredentialsJson = await isFileUntrackedAsync('credentials.json', ctx.vcsClient);
|
|
43
42
|
const newFilePaths = [];
|
|
44
43
|
if (shouldWarnKeystore) {
|
|
45
44
|
newFilePaths.push(keystorePath);
|
|
@@ -101,14 +100,14 @@ async function updateIosCredentialsAsync(ctx, app, targets, distributionType) {
|
|
|
101
100
|
});
|
|
102
101
|
const newFilePaths = [];
|
|
103
102
|
for (const [, targetCredentials] of Object.entries(iosCredentials)) {
|
|
104
|
-
if (await isFileUntrackedAsync(targetCredentials.distributionCertificate.path)) {
|
|
103
|
+
if (await isFileUntrackedAsync(targetCredentials.distributionCertificate.path, ctx.vcsClient)) {
|
|
105
104
|
newFilePaths.push(targetCredentials.distributionCertificate.path);
|
|
106
105
|
}
|
|
107
|
-
if (await isFileUntrackedAsync(targetCredentials.provisioningProfilePath)) {
|
|
106
|
+
if (await isFileUntrackedAsync(targetCredentials.provisioningProfilePath, ctx.vcsClient)) {
|
|
108
107
|
newFilePaths.push(targetCredentials.provisioningProfilePath);
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
|
-
if (await isFileUntrackedAsync('credentials.json')) {
|
|
110
|
+
if (await isFileUntrackedAsync('credentials.json', ctx.vcsClient)) {
|
|
112
111
|
newFilePaths.push('credentials.json');
|
|
113
112
|
}
|
|
114
113
|
displayUntrackedFilesWarning(newFilePaths);
|
|
@@ -196,8 +195,7 @@ async function updateFileAsync(projectDir, filePath, base64Data) {
|
|
|
196
195
|
await fs_extra_1.default.writeFile(filePath, Buffer.from(base64Data, 'base64'));
|
|
197
196
|
}
|
|
198
197
|
}
|
|
199
|
-
async function isFileUntrackedAsync(path) {
|
|
200
|
-
const vcsClient = (0, vcs_1.getVcsClient)();
|
|
198
|
+
async function isFileUntrackedAsync(path, vcsClient) {
|
|
201
199
|
if (vcsClient instanceof git_1.default) {
|
|
202
200
|
return await vcsClient.isFileUntrackedAsync(path);
|
|
203
201
|
}
|
|
@@ -26,7 +26,7 @@ async function chooseDevicesAsync(allDevices, preselectedDeviceIdentifiers = [])
|
|
|
26
26
|
exports.chooseDevicesAsync = chooseDevicesAsync;
|
|
27
27
|
function formatDeviceLabel(device) {
|
|
28
28
|
const deviceDetails = formatDeviceDetails(device);
|
|
29
|
-
return `${device.identifier}${deviceDetails !== '' ? ` ${deviceDetails}` : ''}${device.name ? ` (${device.name})` : ''}`;
|
|
29
|
+
return `${device.identifier}${deviceDetails !== '' ? ` ${deviceDetails}` : ''}${device.name ? ` (${device.name})` : ''}${device.createdAt ? ` (created at: ${device.createdAt})` : ''}`;
|
|
30
30
|
}
|
|
31
31
|
exports.formatDeviceLabel = formatDeviceLabel;
|
|
32
32
|
function formatDeviceDetails(device) {
|
|
@@ -621,6 +621,13 @@ exports.CapabilityMapping = [
|
|
|
621
621
|
validateOptions: validateBooleanOptions,
|
|
622
622
|
getOptions: getBooleanOptions,
|
|
623
623
|
},
|
|
624
|
+
{
|
|
625
|
+
entitlement: 'com.apple.developer.proximity-reader.payment.acceptance',
|
|
626
|
+
name: 'Tap to Pay on iPhone',
|
|
627
|
+
capability: apple_utils_1.CapabilityType.TAP_TO_PAY_ON_IPHONE,
|
|
628
|
+
validateOptions: validateBooleanOptions,
|
|
629
|
+
getOptions: getBooleanOptions,
|
|
630
|
+
},
|
|
624
631
|
{
|
|
625
632
|
entitlement: 'com.apple.developer.matter.allow-setup-payload',
|
|
626
633
|
name: 'Matter Allow Setup Payload',
|
|
@@ -2,11 +2,13 @@ import { Analytics } from '../../analytics/AnalyticsManager';
|
|
|
2
2
|
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
|
|
3
3
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
4
|
import { Actor } from '../../user/User';
|
|
5
|
+
import { Client } from '../../vcs/vcs';
|
|
5
6
|
import { CredentialsContext, CredentialsContextProjectInfo } from '../context';
|
|
6
7
|
export interface Action<T = void> {
|
|
7
8
|
actor: Actor;
|
|
8
9
|
graphqlClient: ExpoGraphqlClient;
|
|
9
10
|
analytics: Analytics;
|
|
11
|
+
vcsClient: Client;
|
|
10
12
|
projectInfo: CredentialsContextProjectInfo | null;
|
|
11
13
|
getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn;
|
|
12
14
|
runAsync(ctx: CredentialsContext): Promise<T>;
|
|
@@ -55,6 +55,7 @@ class ManageAndroid {
|
|
|
55
55
|
analytics: this.callingAction.analytics,
|
|
56
56
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
57
57
|
nonInteractive: false,
|
|
58
|
+
vcsClient: this.callingAction.vcsClient,
|
|
58
59
|
});
|
|
59
60
|
let gradleContext;
|
|
60
61
|
if (ctx.hasProjectContext) {
|
|
@@ -134,7 +135,7 @@ class ManageAndroid {
|
|
|
134
135
|
}
|
|
135
136
|
async createProjectContextAsync(ctx, buildProfile) {
|
|
136
137
|
(0, assert_1.default)(ctx.hasProjectContext, 'createProjectContextAsync: must have project context.');
|
|
137
|
-
return await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile);
|
|
138
|
+
return await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile, ctx.vcsClient);
|
|
138
139
|
}
|
|
139
140
|
async runProjectSpecificActionAsync(ctx, action, gradleContext) {
|
|
140
141
|
(0, assert_1.default)(ctx.hasProjectContext, 'You must be in your project directory in order to perform this action');
|
|
@@ -63,6 +63,7 @@ class ManageIos {
|
|
|
63
63
|
analytics: this.callingAction.analytics,
|
|
64
64
|
env: buildProfile === null || buildProfile === void 0 ? void 0 : buildProfile.env,
|
|
65
65
|
nonInteractive: false,
|
|
66
|
+
vcsClient: this.callingAction.vcsClient,
|
|
66
67
|
});
|
|
67
68
|
const buildCredentialsActions = (0, IosActions_1.getBuildCredentialsActions)(ctx);
|
|
68
69
|
const pushKeyActions = (0, IosActions_1.getPushKeyActions)(ctx);
|
|
@@ -160,12 +161,14 @@ class ManageIos {
|
|
|
160
161
|
projectDir: ctx.projectDir,
|
|
161
162
|
nonInteractive: ctx.nonInteractive,
|
|
162
163
|
exp: ctx.exp,
|
|
164
|
+
vcsClient: ctx.vcsClient,
|
|
163
165
|
}, buildProfile);
|
|
164
166
|
const targets = await (0, target_1.resolveTargetsAsync)({
|
|
165
167
|
exp: ctx.exp,
|
|
166
168
|
projectDir: ctx.projectDir,
|
|
167
169
|
xcodeBuildContext,
|
|
168
170
|
env: buildProfile.env,
|
|
171
|
+
vcsClient: ctx.vcsClient,
|
|
169
172
|
});
|
|
170
173
|
return {
|
|
171
174
|
app,
|
|
@@ -2,14 +2,16 @@ import { Analytics } from '../../analytics/AnalyticsManager';
|
|
|
2
2
|
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
|
|
3
3
|
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
4
4
|
import { Actor } from '../../user/User';
|
|
5
|
+
import { Client } from '../../vcs/vcs';
|
|
5
6
|
import { CredentialsContextProjectInfo } from '../context';
|
|
6
7
|
export declare class SelectPlatform {
|
|
7
8
|
readonly actor: Actor;
|
|
8
9
|
readonly graphqlClient: ExpoGraphqlClient;
|
|
10
|
+
readonly vcsClient: Client;
|
|
9
11
|
readonly analytics: Analytics;
|
|
10
12
|
readonly projectInfo: CredentialsContextProjectInfo | null;
|
|
11
13
|
readonly getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn;
|
|
12
14
|
private readonly flagPlatform?;
|
|
13
|
-
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn, flagPlatform?: string | undefined);
|
|
15
|
+
constructor(actor: Actor, graphqlClient: ExpoGraphqlClient, vcsClient: Client, analytics: Analytics, projectInfo: CredentialsContextProjectInfo | null, getDynamicPrivateProjectConfigAsync: DynamicConfigContextFn, flagPlatform?: string | undefined);
|
|
14
16
|
runAsync(): Promise<void>;
|
|
15
17
|
}
|
|
@@ -5,9 +5,10 @@ const platform_1 = require("../../platform");
|
|
|
5
5
|
const ManageAndroid_1 = require("./ManageAndroid");
|
|
6
6
|
const ManageIos_1 = require("./ManageIos");
|
|
7
7
|
class SelectPlatform {
|
|
8
|
-
constructor(actor, graphqlClient, analytics, projectInfo, getDynamicPrivateProjectConfigAsync, flagPlatform) {
|
|
8
|
+
constructor(actor, graphqlClient, vcsClient, analytics, projectInfo, getDynamicPrivateProjectConfigAsync, flagPlatform) {
|
|
9
9
|
this.actor = actor;
|
|
10
10
|
this.graphqlClient = graphqlClient;
|
|
11
|
+
this.vcsClient = vcsClient;
|
|
11
12
|
this.analytics = analytics;
|
|
12
13
|
this.projectInfo = projectInfo;
|
|
13
14
|
this.getDynamicPrivateProjectConfigAsync = getDynamicPrivateProjectConfigAsync;
|