eas-cli 9.0.3 → 9.0.4
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 +59 -59
- package/build/analytics/AnalyticsManager.js +4 -5
- package/build/api.js +1 -2
- package/build/branch/actions/SelectBranch.js +2 -3
- package/build/branch/queries.js +3 -5
- package/build/branch/utils.js +1 -1
- package/build/build/android/build.js +3 -5
- package/build/build/android/graphql.js +1 -2
- package/build/build/android/prepareJob.js +1 -2
- package/build/build/android/syncProjectConfiguration.js +1 -1
- package/build/build/android/version.js +14 -16
- package/build/build/build.js +8 -10
- package/build/build/createContext.js +7 -8
- package/build/build/ios/build.js +2 -4
- package/build/build/ios/credentials.js +1 -2
- package/build/build/ios/graphql.js +4 -6
- package/build/build/ios/prepareJob.js +5 -6
- package/build/build/ios/syncProjectConfiguration.js +1 -1
- package/build/build/ios/version.js +17 -20
- package/build/build/local.js +2 -3
- package/build/build/metadata.js +9 -10
- package/build/build/queries.js +6 -9
- package/build/build/runBuildAndSubmit.d.ts +3 -1
- package/build/build/runBuildAndSubmit.js +19 -13
- package/build/build/utils/appJson.js +1 -2
- package/build/build/utils/formatBuild.js +5 -8
- package/build/build/utils/printBuildInfo.js +1 -2
- package/build/build/utils/resourceClass.js +3 -4
- package/build/build/utils/url.js +1 -2
- package/build/build/validate.js +8 -11
- package/build/channel/actions/SelectChannel.js +2 -3
- package/build/channel/errors.js +1 -1
- package/build/channel/queries.js +6 -10
- package/build/channel/utils.js +1 -1
- package/build/commandUtils/EasCommand.js +7 -6
- package/build/commandUtils/builds.js +3 -3
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +2 -2
- package/build/commandUtils/context/LoggedInContextField.js +1 -2
- package/build/commandUtils/context/MaybeLoggedInContextField.js +2 -3
- package/build/commandUtils/context/VcsClientContextField.js +1 -1
- package/build/commandUtils/context/contextUtils/createGraphqlClient.js +1 -1
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +4 -6
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +2 -4
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -2
- package/build/commandUtils/pagination.js +3 -4
- package/build/commands/account/view.js +1 -2
- package/build/commands/branch/delete.js +1 -2
- package/build/commands/build/configure.js +1 -2
- package/build/commands/build/index.js +1 -2
- package/build/commands/build/internal.js +1 -2
- package/build/commands/build/resign.js +7 -7
- package/build/commands/build/run.js +2 -3
- package/build/commands/build/version/get.js +3 -4
- package/build/commands/build/version/set.js +5 -6
- package/build/commands/build/version/sync.js +5 -7
- package/build/commands/channel/rollout.js +1 -2
- package/build/commands/config.js +16 -14
- package/build/commands/credentials/configure-build.js +3 -3
- package/build/commands/credentials/index.js +1 -1
- package/build/commands/device/create.js +1 -1
- package/build/commands/device/rename.js +1 -1
- package/build/commands/diagnostics.js +6 -2
- package/build/commands/project/init.js +11 -9
- package/build/commands/project/onboarding.js +192 -20
- package/build/commands/secret/delete.js +5 -5
- package/build/commands/update/index.js +5 -6
- package/build/commands/update/republish.js +1 -2
- package/build/commands/update/roll-back-to-embedded.js +3 -4
- package/build/credentials/android/AndroidCredentialsProvider.js +4 -5
- package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -3
- package/build/credentials/android/actions/DownloadKeystore.js +2 -3
- package/build/credentials/android/actions/RemoveFcm.js +1 -1
- package/build/credentials/android/actions/SetUpBuildCredentials.js +3 -5
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +3 -3
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +3 -3
- package/build/credentials/android/api/GraphqlClient.js +4 -8
- package/build/credentials/android/api/graphql/queries/AndroidAppCredentialsQuery.js +1 -2
- package/build/credentials/android/utils/printCredentials.js +4 -4
- package/build/credentials/context.js +2 -3
- package/build/credentials/credentialsJson/update.js +14 -16
- package/build/credentials/errors.js +7 -5
- package/build/credentials/ios/IosCredentialsProvider.js +3 -4
- package/build/credentials/ios/actions/AscApiKeyUtils.js +5 -9
- package/build/credentials/ios/actions/AssignAscApiKey.js +2 -3
- package/build/credentials/ios/actions/AssignPushKey.js +2 -3
- package/build/credentials/ios/actions/BuildCredentialsUtils.js +3 -5
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/DistributionCertificateUtils.js +3 -4
- package/build/credentials/ios/actions/ProvisioningProfileUtils.js +2 -3
- package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +3 -4
- package/build/credentials/ios/actions/SetUpAscApiKey.js +1 -1
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -4
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +1 -2
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +2 -3
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +2 -3
- package/build/credentials/ios/api/GraphqlClient.js +11 -15
- package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +2 -2
- package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +2 -4
- package/build/credentials/ios/api/graphql/queries/IosAppBuildCredentialsQuery.js +1 -2
- package/build/credentials/ios/api/graphql/queries/IosAppCredentialsQuery.js +2 -4
- package/build/credentials/ios/appstore/AppStoreApi.js +1 -2
- package/build/credentials/ios/appstore/ascApiKey.js +6 -8
- package/build/credentials/ios/appstore/authenticate.js +2 -4
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +1 -1
- package/build/credentials/ios/appstore/contractMessages.js +3 -5
- package/build/credentials/ios/appstore/distributionCertificate.js +2 -3
- package/build/credentials/ios/appstore/ensureAppExists.js +1 -2
- package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +5 -7
- package/build/credentials/ios/appstore/pushKey.js +2 -3
- package/build/credentials/ios/appstore/resolveCredentials.js +8 -9
- package/build/credentials/ios/errors.js +1 -1
- package/build/credentials/ios/utils/p12Certificate.js +1 -2
- package/build/credentials/ios/utils/provisioningProfile.js +1 -2
- package/build/credentials/ios/validators/validateProvisioningProfile.js +5 -7
- package/build/credentials/manager/ManageAndroid.js +2 -2
- package/build/credentials/manager/ManageIos.js +3 -4
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -2
- package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -1
- package/build/credentials/manager/SetUpAndroidBuildCredentials.js +2 -2
- package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
- package/build/credentials/utils/promptForCredentials.js +2 -3
- package/build/devices/actions/create/currentMachineMethod.js +4 -5
- package/build/devices/actions/create/developerPortalMethod.js +1 -2
- package/build/devices/actions/create/inputMethod.js +1 -1
- package/build/devices/context.js +1 -1
- package/build/devices/queries.js +3 -6
- package/build/devices/utils/errors.js +2 -2
- package/build/devices/utils/formatDevice.js +4 -6
- package/build/graphql/client.js +5 -8
- package/build/graphql/generated.d.ts +42 -0
- package/build/graphql/mutations/AppMutation.js +1 -2
- package/build/graphql/mutations/AppVersionMutation.js +1 -2
- package/build/graphql/mutations/BuildMutation.js +4 -8
- package/build/graphql/mutations/UserPreferencesMutation.js +2 -3
- package/build/graphql/queries/AppVersionQuery.js +1 -2
- package/build/graphql/queries/BranchQuery.js +1 -2
- package/build/graphql/queries/BuildQuery.js +1 -2
- package/build/graphql/queries/EnvironmentSecretsQuery.js +2 -3
- package/build/graphql/queries/SubmissionQuery.js +1 -2
- package/build/graphql/queries/WebhookQuery.js +1 -2
- package/build/graphql/types/App.js +1 -0
- package/build/log.js +2 -2
- package/build/metadata/apple/config/reader.js +26 -32
- package/build/metadata/apple/config/writer.js +35 -39
- package/build/metadata/apple/rules/infoKeywordLength.js +2 -4
- package/build/metadata/apple/rules/infoRestrictedWords.js +2 -4
- package/build/metadata/apple/tasks/app-review-detail.js +1 -2
- package/build/metadata/apple/tasks/app-version.js +6 -8
- package/build/metadata/auth.js +1 -2
- package/build/metadata/config/resolve.js +2 -3
- package/build/metadata/config/validate.js +2 -4
- package/build/metadata/errors.js +3 -5
- package/build/metadata/upload.js +1 -2
- package/build/metadata/utils/retry.js +1 -2
- package/build/metadata/utils/telemetry.js +8 -11
- package/build/onboarding/runCommand.js +2 -2
- package/build/ora.js +1 -1
- package/build/project/android/applicationId.js +3 -4
- package/build/project/android/gradle.js +3 -4
- package/build/project/android/gradleUtils.js +4 -5
- package/build/project/expoConfig.js +3 -4
- package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +3 -5
- package/build/project/ios/bundleIdentifier.js +7 -8
- package/build/project/ios/entitlements.js +1 -2
- package/build/project/ios/scheme.js +7 -6
- package/build/project/ios/target.js +17 -23
- package/build/project/metroConfig.js +1 -2
- package/build/project/projectUtils.js +5 -7
- package/build/project/publish.js +18 -27
- package/build/project/remoteVersionSource.js +6 -7
- package/build/project/resolveRuntimeVersionAsync.d.ts +2 -1
- package/build/project/resolveRuntimeVersionAsync.js +3 -4
- package/build/prompts.js +5 -7
- package/build/rollout/actions/CreateRollout.js +4 -5
- package/build/rollout/actions/EditRollout.js +1 -2
- package/build/rollout/actions/EndRollout.js +2 -4
- package/build/rollout/actions/ManageRollout.js +1 -2
- package/build/rollout/actions/NonInteractiveRollout.js +1 -2
- package/build/rollout/actions/SelectRuntime.js +2 -4
- package/build/rollout/utils.js +4 -5
- package/build/run/android/adb.js +4 -7
- package/build/run/ios/xcode.js +1 -2
- package/build/run/ios/xcrun.js +1 -2
- package/build/run/utils.js +2 -4
- package/build/submit/ArchiveSource.js +1 -1
- package/build/submit/android/AndroidSubmitCommand.js +3 -5
- package/build/submit/android/AndroidSubmitter.js +3 -3
- package/build/submit/android/ServiceAccountSource.js +1 -2
- package/build/submit/ios/AppProduce.js +5 -4
- package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
- package/build/submit/ios/AscApiKeySource.js +5 -3
- package/build/submit/ios/IosSubmitCommand.js +2 -3
- package/build/submit/ios/IosSubmitter.js +1 -1
- package/build/submit/ios/utils/language.js +3 -4
- package/build/submit/submit.js +2 -3
- package/build/submit/utils/errors.js +1 -2
- package/build/submit/utils/wait.js +1 -1
- package/build/update/android/UpdatesModule.js +1 -2
- package/build/update/configure.js +11 -14
- package/build/update/ios/UpdatesModule.js +2 -4
- package/build/update/queries.js +6 -10
- package/build/update/utils.js +28 -39
- package/build/user/SessionManager.js +5 -8
- package/build/user/User.js +2 -2
- package/build/user/expoSsoLauncher.js +1 -2
- package/build/utils/code-signing.js +4 -7
- package/build/utils/expoCli.js +1 -2
- package/build/utils/expoUpdatesCli.d.ts +1 -0
- package/build/utils/expoUpdatesCli.js +3 -2
- package/build/utils/profiles.js +3 -3
- package/build/utils/progress.js +2 -2
- package/build/utils/relay.js +10 -14
- package/build/utils/timer.js +1 -2
- package/build/vcs/clients/git.d.ts +1 -1
- package/build/vcs/clients/git.js +24 -20
- package/build/vcs/git.d.ts +1 -1
- package/build/vcs/git.js +4 -2
- package/build/vcs/local.js +1 -2
- package/build/webhooks/input.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -15,11 +15,11 @@ class ExpoUpdatesCLICommandFailedError extends Error {
|
|
|
15
15
|
}
|
|
16
16
|
exports.ExpoUpdatesCLICommandFailedError = ExpoUpdatesCLICommandFailedError;
|
|
17
17
|
async function expoUpdatesCommandAsync(projectDir, args, options) {
|
|
18
|
-
var _a;
|
|
19
18
|
let expoUpdatesCli;
|
|
20
19
|
try {
|
|
21
20
|
expoUpdatesCli =
|
|
22
|
-
(
|
|
21
|
+
(0, resolve_from_1.silent)(projectDir, 'expo-updates/bin/cli') ??
|
|
22
|
+
(0, resolve_from_1.default)(projectDir, 'expo-updates/bin/cli.js');
|
|
23
23
|
}
|
|
24
24
|
catch (e) {
|
|
25
25
|
if (e.code === 'MODULE_NOT_FOUND') {
|
|
@@ -31,6 +31,7 @@ async function expoUpdatesCommandAsync(projectDir, args, options) {
|
|
|
31
31
|
return (await (0, spawn_async_1.default)(expoUpdatesCli, args, {
|
|
32
32
|
stdio: 'pipe',
|
|
33
33
|
env: { ...process.env, ...options.env },
|
|
34
|
+
cwd: options.cwd,
|
|
34
35
|
})).stdout;
|
|
35
36
|
}
|
|
36
37
|
catch (e) {
|
package/build/utils/profiles.js
CHANGED
|
@@ -17,7 +17,7 @@ async function getProfilesAsync({ easJsonAccessor, platforms, profileName, type,
|
|
|
17
17
|
});
|
|
18
18
|
return {
|
|
19
19
|
profile,
|
|
20
|
-
profileName: profileName
|
|
20
|
+
profileName: profileName ?? 'production',
|
|
21
21
|
platform,
|
|
22
22
|
};
|
|
23
23
|
});
|
|
@@ -25,7 +25,7 @@ async function getProfilesAsync({ easJsonAccessor, platforms, profileName, type,
|
|
|
25
25
|
}
|
|
26
26
|
exports.getProfilesAsync = getProfilesAsync;
|
|
27
27
|
async function maybeSetNodeVersionFromFileAsync(projectDir, profile) {
|
|
28
|
-
if (profile
|
|
28
|
+
if (profile?.node) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
const nodeVersion = await getNodeVersionFromFileAsync(projectDir);
|
|
@@ -71,7 +71,7 @@ async function maybePrintBuildProfileDeprecationWarningsAsync(easJsonAccessor, p
|
|
|
71
71
|
if (hasPrintedDeprecationWarnings) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const deprecationWarnings = await eas_json_1.EasJsonUtils.getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName
|
|
74
|
+
const deprecationWarnings = await eas_json_1.EasJsonUtils.getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName ?? 'production');
|
|
75
75
|
if (deprecationWarnings.length === 0) {
|
|
76
76
|
return;
|
|
77
77
|
}
|
package/build/utils/progress.js
CHANGED
|
@@ -7,7 +7,7 @@ const timer_1 = require("./timer");
|
|
|
7
7
|
const ora_1 = require("../ora");
|
|
8
8
|
function createProgressTracker({ total, message, completedMessage, }) {
|
|
9
9
|
let bar = null;
|
|
10
|
-
let calcTotal = total
|
|
10
|
+
let calcTotal = total ?? 0;
|
|
11
11
|
let transferredSoFar = 0;
|
|
12
12
|
let current = 0;
|
|
13
13
|
const timerLabel = String(Date.now());
|
|
@@ -21,7 +21,7 @@ function createProgressTracker({ total, message, completedMessage, }) {
|
|
|
21
21
|
return ({ progress, isComplete, error }) => {
|
|
22
22
|
if (progress) {
|
|
23
23
|
if (!bar && (progress.total !== undefined || total !== undefined)) {
|
|
24
|
-
calcTotal = (total
|
|
24
|
+
calcTotal = (total ?? progress.total);
|
|
25
25
|
bar = (0, ora_1.ora)(getMessage(0, calcTotal)).start();
|
|
26
26
|
(0, timer_1.startTimer)(timerLabel);
|
|
27
27
|
}
|
package/build/utils/relay.js
CHANGED
|
@@ -59,7 +59,6 @@ class FilterPagination {
|
|
|
59
59
|
return 'last' in connectionArgs;
|
|
60
60
|
}
|
|
61
61
|
static async getFirstItemsAsync({ first, after }, { internalBatchSize, maxNodesFetched, filterPredicate, queryAsync, beforeEachQuery, afterEachQuery, }) {
|
|
62
|
-
var _a, _b, _c, _d, _e;
|
|
63
62
|
const limit = first + 1;
|
|
64
63
|
const dataset = [];
|
|
65
64
|
let hasMore = true;
|
|
@@ -75,7 +74,7 @@ class FilterPagination {
|
|
|
75
74
|
const nodesRemaining = limit - dataset.length;
|
|
76
75
|
dataset.push(...batch.slice(0, nodesRemaining));
|
|
77
76
|
hasMore = pageInfo.hasNextPage;
|
|
78
|
-
afterInternal =
|
|
77
|
+
afterInternal = pageInfo.endCursor ?? undefined;
|
|
79
78
|
totalNodesFetched += batchEdges.length;
|
|
80
79
|
if (afterEachQuery) {
|
|
81
80
|
afterEachQuery({ first, after }, totalNodesFetched, dataset, hasMore && dataset.length < limit);
|
|
@@ -90,13 +89,12 @@ class FilterPagination {
|
|
|
90
89
|
pageInfo: {
|
|
91
90
|
hasNextPage: dataset.length > first,
|
|
92
91
|
hasPreviousPage: false, // cannot be computed efficiently
|
|
93
|
-
startCursor:
|
|
94
|
-
endCursor:
|
|
92
|
+
startCursor: edges[0]?.cursor ?? null,
|
|
93
|
+
endCursor: edges[edges.length - 1]?.cursor ?? null,
|
|
95
94
|
},
|
|
96
95
|
};
|
|
97
96
|
}
|
|
98
97
|
static async getLastItemsAsync({ last, before }, { internalBatchSize, maxNodesFetched, filterPredicate, queryAsync, beforeEachQuery, afterEachQuery, }) {
|
|
99
|
-
var _a, _b, _c, _d, _e;
|
|
100
98
|
const limit = last + 1;
|
|
101
99
|
const dataset = [];
|
|
102
100
|
let hasMore = true;
|
|
@@ -114,7 +112,7 @@ class FilterPagination {
|
|
|
114
112
|
const nodesChosen = batch.reverse().slice(0, nodesRemaining);
|
|
115
113
|
dataset.push(...nodesChosen);
|
|
116
114
|
hasMore = pageInfo.hasPreviousPage;
|
|
117
|
-
beforeInternal =
|
|
115
|
+
beforeInternal = pageInfo.startCursor ?? undefined;
|
|
118
116
|
totalNodesFetched += batchEdges.length;
|
|
119
117
|
if (afterEachQuery) {
|
|
120
118
|
afterEachQuery({ last, before }, totalNodesFetched, dataset, hasMore && dataset.length < limit);
|
|
@@ -130,8 +128,8 @@ class FilterPagination {
|
|
|
130
128
|
pageInfo: {
|
|
131
129
|
hasNextPage: false, // cannot be computed efficiently,
|
|
132
130
|
hasPreviousPage: dataset.length > last,
|
|
133
|
-
startCursor:
|
|
134
|
-
endCursor:
|
|
131
|
+
startCursor: edges[0]?.cursor ?? null,
|
|
132
|
+
endCursor: edges[edges.length - 1]?.cursor ?? null,
|
|
135
133
|
},
|
|
136
134
|
};
|
|
137
135
|
}
|
|
@@ -155,8 +153,7 @@ exports.NEXT_PAGE_OPTION = {
|
|
|
155
153
|
title: '⬇️ Next page',
|
|
156
154
|
};
|
|
157
155
|
async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printedType, queryParams, }) {
|
|
158
|
-
|
|
159
|
-
const limit = (_a = queryParams.first) !== null && _a !== void 0 ? _a : queryParams.last;
|
|
156
|
+
const limit = queryParams.first ?? queryParams.last;
|
|
160
157
|
(0, assert_1.default)(limit, 'queryParams must have either first or last');
|
|
161
158
|
const connection = await queryAsync(queryParams);
|
|
162
159
|
const { edges, pageInfo } = connection;
|
|
@@ -197,7 +194,7 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
|
|
|
197
194
|
return await selectPaginatedInternalAsync({
|
|
198
195
|
queryParams: {
|
|
199
196
|
last: limit,
|
|
200
|
-
before: startCursor
|
|
197
|
+
before: startCursor ?? undefined,
|
|
201
198
|
},
|
|
202
199
|
queryAsync,
|
|
203
200
|
getTitleAsync,
|
|
@@ -208,7 +205,7 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
|
|
|
208
205
|
return await selectPaginatedInternalAsync({
|
|
209
206
|
queryParams: {
|
|
210
207
|
first: limit,
|
|
211
|
-
after: endCursor
|
|
208
|
+
after: endCursor ?? undefined,
|
|
212
209
|
},
|
|
213
210
|
queryAsync,
|
|
214
211
|
getTitleAsync,
|
|
@@ -221,7 +218,6 @@ async function selectPaginatedInternalAsync({ queryAsync, getTitleAsync, printed
|
|
|
221
218
|
}
|
|
222
219
|
exports.PAGE_SIZE = 20;
|
|
223
220
|
async function fetchEntireDatasetAsync({ paginatedGetterAsync, progressBarLabel, }) {
|
|
224
|
-
var _a;
|
|
225
221
|
// No way to know the total count of items beforehand
|
|
226
222
|
let totalEstimatedWork = 10;
|
|
227
223
|
const queueProgressBar = new cli_progress_1.default.SingleBar({ format: `|{bar}| ${progressBarLabel}` }, cli_progress_1.default.Presets.rect);
|
|
@@ -237,7 +233,7 @@ async function fetchEntireDatasetAsync({ paginatedGetterAsync, progressBarLabel,
|
|
|
237
233
|
if (!hasNextPage) {
|
|
238
234
|
break;
|
|
239
235
|
}
|
|
240
|
-
cursor =
|
|
236
|
+
cursor = connection.pageInfo.endCursor ?? undefined;
|
|
241
237
|
if (!didStartProgressBar) {
|
|
242
238
|
// only show the progress bar if user has more than 1 page of items
|
|
243
239
|
queueProgressBar.start(totalEstimatedWork, 0);
|
package/build/utils/timer.js
CHANGED
|
@@ -4,8 +4,7 @@ exports.formatMilliseconds = exports.endTimer = exports.startTimer = exports.has
|
|
|
4
4
|
const LABEL = 'DEFAULT';
|
|
5
5
|
const startTimes = {};
|
|
6
6
|
function hasTimer(label) {
|
|
7
|
-
|
|
8
|
-
return (_a = startTimes[label]) !== null && _a !== void 0 ? _a : null;
|
|
7
|
+
return startTimes[label] ?? null;
|
|
9
8
|
}
|
|
10
9
|
exports.hasTimer = hasTimer;
|
|
11
10
|
function startTimer(label = LABEL) {
|
|
@@ -28,4 +28,4 @@ export default class GitClient extends Client {
|
|
|
28
28
|
* - boolean - is git case sensitive
|
|
29
29
|
* - undefined - case sensitivity is not configured and git is using default behavior
|
|
30
30
|
*/
|
|
31
|
-
export declare function isGitCaseSensitiveAsync(): Promise<boolean | undefined>;
|
|
31
|
+
export declare function isGitCaseSensitiveAsync(cwd: string | undefined): Promise<boolean | undefined>;
|
package/build/vcs/clients/git.js
CHANGED
|
@@ -18,7 +18,6 @@ class GitClient extends vcs_1.Client {
|
|
|
18
18
|
this.maybeCwdOverride = maybeCwdOverride;
|
|
19
19
|
}
|
|
20
20
|
async ensureRepoExistsAsync() {
|
|
21
|
-
var _a, _b, _c;
|
|
22
21
|
try {
|
|
23
22
|
if (!(await (0, git_1.isGitInstalledAsync)())) {
|
|
24
23
|
log_1.default.error(`${chalk_1.default.bold('git')} command not found. Install it before proceeding or set ${chalk_1.default.bold('EAS_NO_VCS=1')} to use EAS CLI without Git (or any other version control system).`);
|
|
@@ -27,28 +26,28 @@ class GitClient extends vcs_1.Client {
|
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
catch (error) {
|
|
30
|
-
log_1.default.error(`${chalk_1.default.bold('git')} found, but ${chalk_1.default.bold('git --help')} exited with status ${error
|
|
31
|
-
if (error
|
|
32
|
-
log_1.default.error(error
|
|
29
|
+
log_1.default.error(`${chalk_1.default.bold('git')} found, but ${chalk_1.default.bold('git --help')} exited with status ${error?.status}${error?.stderr ? `:` : '.'}`);
|
|
30
|
+
if (error?.stderr) {
|
|
31
|
+
log_1.default.error(error?.stderr);
|
|
33
32
|
}
|
|
34
33
|
log_1.default.error(`Repair your Git installation, or set ${chalk_1.default.bold('EAS_NO_VCS=1')} to use EAS CLI without Git (or any other version control system).`);
|
|
35
34
|
log_1.default.error((0, log_1.learnMore)('https://expo.fyi/eas-vcs-workflow'));
|
|
36
35
|
core_1.Errors.exit(1);
|
|
37
36
|
}
|
|
38
|
-
if (await (0, git_1.doesGitRepoExistAsync)()) {
|
|
37
|
+
if (await (0, git_1.doesGitRepoExistAsync)(this.maybeCwdOverride)) {
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
41
40
|
log_1.default.warn("It looks like you haven't initialized the git repository yet.");
|
|
42
41
|
log_1.default.warn('EAS requires you to use a git repository for your project.');
|
|
43
42
|
const cwd = process.cwd();
|
|
44
|
-
const repoRoot =
|
|
43
|
+
const repoRoot = PackageManagerUtils.findWorkspaceRoot(cwd) ?? cwd;
|
|
45
44
|
const confirmInit = await (0, prompts_1.confirmAsync)({
|
|
46
|
-
message: `Would you like us to run 'git init' in ${
|
|
45
|
+
message: `Would you like us to run 'git init' in ${this.maybeCwdOverride ?? repoRoot} for you?`,
|
|
47
46
|
});
|
|
48
47
|
if (!confirmInit) {
|
|
49
48
|
throw new Error('A git repository is required for building your project. Initialize it and run this command again.');
|
|
50
49
|
}
|
|
51
|
-
await (0, spawn_async_1.default)('git', ['init'], { cwd:
|
|
50
|
+
await (0, spawn_async_1.default)('git', ['init'], { cwd: this.maybeCwdOverride ?? repoRoot });
|
|
52
51
|
log_1.default.log("We're going to make an initial commit for your repository.");
|
|
53
52
|
const { message } = await (0, prompts_1.promptAsync)({
|
|
54
53
|
type: 'text',
|
|
@@ -75,10 +74,10 @@ class GitClient extends vcs_1.Client {
|
|
|
75
74
|
});
|
|
76
75
|
}
|
|
77
76
|
catch (err) {
|
|
78
|
-
if (err
|
|
77
|
+
if (err?.stdout) {
|
|
79
78
|
log_1.default.error(err.stdout);
|
|
80
79
|
}
|
|
81
|
-
if (err
|
|
80
|
+
if (err?.stderr) {
|
|
82
81
|
log_1.default.error(err.stderr);
|
|
83
82
|
}
|
|
84
83
|
throw err;
|
|
@@ -120,8 +119,8 @@ class GitClient extends vcs_1.Client {
|
|
|
120
119
|
// file:/// so only file:// needs to be prepended
|
|
121
120
|
gitRepoUri = `file://${await this.getRootPathAsync()}`;
|
|
122
121
|
}
|
|
123
|
-
const isCaseSensitive = await isGitCaseSensitiveAsync();
|
|
124
|
-
await setGitCaseSensitivityAsync(true);
|
|
122
|
+
const isCaseSensitive = await isGitCaseSensitiveAsync(this.maybeCwdOverride);
|
|
123
|
+
await setGitCaseSensitivityAsync(true, this.maybeCwdOverride);
|
|
125
124
|
try {
|
|
126
125
|
if (await this.hasUncommittedChangesAsync()) {
|
|
127
126
|
log_1.default.error('Detected inconsistent filename casing between your local filesystem and git.');
|
|
@@ -139,7 +138,7 @@ class GitClient extends vcs_1.Client {
|
|
|
139
138
|
});
|
|
140
139
|
}
|
|
141
140
|
finally {
|
|
142
|
-
await setGitCaseSensitivityAsync(isCaseSensitive);
|
|
141
|
+
await setGitCaseSensitivityAsync(isCaseSensitive, this.maybeCwdOverride);
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
async getCommitHashAsync() {
|
|
@@ -192,10 +191,9 @@ class GitClient extends vcs_1.Client {
|
|
|
192
191
|
!trackedFiles.includes(pathWithoutLeadingDot));
|
|
193
192
|
}
|
|
194
193
|
async isFileIgnoredAsync(filePath) {
|
|
195
|
-
var _a;
|
|
196
194
|
try {
|
|
197
195
|
await (0, spawn_async_1.default)('git', ['check-ignore', '-q', filePath], {
|
|
198
|
-
cwd:
|
|
196
|
+
cwd: this.maybeCwdOverride ?? path_1.default.normalize(await this.getRootPathAsync()),
|
|
199
197
|
});
|
|
200
198
|
return true;
|
|
201
199
|
}
|
|
@@ -278,12 +276,14 @@ async function ensureGitConfiguredAsync({ nonInteractive, }) {
|
|
|
278
276
|
* - boolean - is git case sensitive
|
|
279
277
|
* - undefined - case sensitivity is not configured and git is using default behavior
|
|
280
278
|
*/
|
|
281
|
-
async function isGitCaseSensitiveAsync() {
|
|
279
|
+
async function isGitCaseSensitiveAsync(cwd) {
|
|
282
280
|
if (process.platform !== 'darwin') {
|
|
283
281
|
return undefined;
|
|
284
282
|
}
|
|
285
283
|
try {
|
|
286
|
-
const result = await (0, spawn_async_1.default)('git', ['config', '--get', 'core.ignorecase']
|
|
284
|
+
const result = await (0, spawn_async_1.default)('git', ['config', '--get', 'core.ignorecase'], {
|
|
285
|
+
cwd,
|
|
286
|
+
});
|
|
287
287
|
const isIgnoreCaseEnabled = result.stdout.trim();
|
|
288
288
|
if (isIgnoreCaseEnabled === '') {
|
|
289
289
|
return undefined;
|
|
@@ -300,16 +300,20 @@ async function isGitCaseSensitiveAsync() {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
exports.isGitCaseSensitiveAsync = isGitCaseSensitiveAsync;
|
|
303
|
-
async function setGitCaseSensitivityAsync(enable) {
|
|
303
|
+
async function setGitCaseSensitivityAsync(enable, cwd) {
|
|
304
304
|
// we are assuming that if someone sets that on non-macos device then
|
|
305
305
|
// they know what they are doing
|
|
306
306
|
if (process.platform !== 'darwin') {
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
if (enable === undefined) {
|
|
310
|
-
await (0, spawn_async_1.default)('git', ['config', '--unset', 'core.ignorecase']
|
|
310
|
+
await (0, spawn_async_1.default)('git', ['config', '--unset', 'core.ignorecase'], {
|
|
311
|
+
cwd,
|
|
312
|
+
});
|
|
311
313
|
}
|
|
312
314
|
else {
|
|
313
|
-
await (0, spawn_async_1.default)('git', ['config', 'core.ignorecase', String(!enable)]
|
|
315
|
+
await (0, spawn_async_1.default)('git', ['config', 'core.ignorecase', String(!enable)], {
|
|
316
|
+
cwd,
|
|
317
|
+
});
|
|
314
318
|
}
|
|
315
319
|
}
|
package/build/vcs/git.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function isGitInstalledAsync(): Promise<boolean>;
|
|
2
|
-
export declare function doesGitRepoExistAsync(): Promise<boolean>;
|
|
2
|
+
export declare function doesGitRepoExistAsync(cwd: string | undefined): Promise<boolean>;
|
|
3
3
|
interface GitStatusOptions {
|
|
4
4
|
showUntracked: boolean;
|
|
5
5
|
cwd: string | undefined;
|
package/build/vcs/git.js
CHANGED
|
@@ -16,9 +16,11 @@ async function isGitInstalledAsync() {
|
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
exports.isGitInstalledAsync = isGitInstalledAsync;
|
|
19
|
-
async function doesGitRepoExistAsync() {
|
|
19
|
+
async function doesGitRepoExistAsync(cwd) {
|
|
20
20
|
try {
|
|
21
|
-
await (0, spawn_async_1.default)('git', ['rev-parse', '--git-dir']
|
|
21
|
+
await (0, spawn_async_1.default)('git', ['rev-parse', '--git-dir'], {
|
|
22
|
+
cwd,
|
|
23
|
+
});
|
|
22
24
|
return true;
|
|
23
25
|
}
|
|
24
26
|
catch {
|
package/build/vcs/local.js
CHANGED
|
@@ -13,8 +13,7 @@ const DEFAULT_IGNORE = `
|
|
|
13
13
|
node_modules
|
|
14
14
|
`;
|
|
15
15
|
function getRootPath() {
|
|
16
|
-
|
|
17
|
-
const rootPath = (_a = process.env.EAS_PROJECT_ROOT) !== null && _a !== void 0 ? _a : process.cwd();
|
|
16
|
+
const rootPath = process.env.EAS_PROJECT_ROOT ?? process.cwd();
|
|
18
17
|
if (!path_1.default.isAbsolute(rootPath)) {
|
|
19
18
|
return path_1.default.resolve(process.cwd(), rootPath);
|
|
20
19
|
}
|
package/build/webhooks/input.js
CHANGED
|
@@ -24,7 +24,7 @@ async function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secre
|
|
|
24
24
|
name: 'event',
|
|
25
25
|
message: 'Webhook event type:',
|
|
26
26
|
choices,
|
|
27
|
-
initial:
|
|
27
|
+
initial: existingWebhook?.event
|
|
28
28
|
? choices.findIndex(choice => choice.value === existingWebhook.event)
|
|
29
29
|
: undefined,
|
|
30
30
|
}));
|
|
@@ -41,7 +41,7 @@ async function prepareInputParamsAsync({ event: maybeEvent, url: maybeUrl, secre
|
|
|
41
41
|
type: 'text',
|
|
42
42
|
name: 'url',
|
|
43
43
|
message: 'Webhook URL:',
|
|
44
|
-
initial: url ? undefined : existingWebhook
|
|
44
|
+
initial: url ? undefined : existingWebhook?.url,
|
|
45
45
|
validate: (value) => validateURL(value) || urlValidationMessage,
|
|
46
46
|
}));
|
|
47
47
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eas-cli",
|
|
3
3
|
"description": "EAS command line tool",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.4",
|
|
5
5
|
"author": "Expo <support@expo.dev>",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eas": "./bin/run"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@expo/config-plugins": "7.8.4",
|
|
15
15
|
"@expo/config-types": "50.0.0",
|
|
16
16
|
"@expo/eas-build-job": "1.0.108",
|
|
17
|
-
"@expo/eas-json": "9.0.
|
|
17
|
+
"@expo/eas-json": "9.0.4",
|
|
18
18
|
"@expo/json-file": "8.2.37",
|
|
19
19
|
"@expo/logger": "1.0.57",
|
|
20
20
|
"@expo/multipart-body-parser": "1.1.0",
|
|
@@ -223,5 +223,5 @@
|
|
|
223
223
|
"node": "20.11.0",
|
|
224
224
|
"yarn": "1.22.21"
|
|
225
225
|
},
|
|
226
|
-
"gitHead": "
|
|
226
|
+
"gitHead": "675c36a157d9352700f6758f2a03209c760ef114"
|
|
227
227
|
}
|