eas-cli 13.4.2 → 14.0.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 +73 -73
- package/build/ApiV2Error.js +5 -1
- package/build/analytics/AnalyticsManager.js +5 -4
- package/build/api.js +1 -0
- package/build/branch/actions/SelectBranch.js +1 -0
- package/build/branch/queries.d.ts +3 -3
- package/build/branch/queries.js +7 -5
- package/build/build/validate.js +6 -3
- package/build/channel/actions/SelectChannel.js +1 -0
- package/build/channel/queries.d.ts +0 -1
- package/build/channel/queries.js +11 -16
- package/build/commandUtils/EasCommand.js +100 -90
- package/build/commandUtils/builds.d.ts +1 -0
- package/build/commandUtils/builds.js +3 -0
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +1 -1
- package/build/commandUtils/gating/FeatureGating.js +2 -0
- package/build/commands/account/login.js +16 -18
- package/build/commands/account/logout.js +6 -8
- package/build/commands/account/view.js +8 -10
- package/build/commands/analytics.js +2 -2
- package/build/commands/branch/create.js +18 -20
- package/build/commands/branch/delete.js +17 -19
- package/build/commands/branch/list.js +11 -13
- package/build/commands/branch/publish.js +2 -2
- package/build/commands/branch/rename.js +18 -20
- package/build/commands/branch/view.js +19 -21
- package/build/commands/build/cancel.js +22 -24
- package/build/commands/build/configure.js +15 -17
- package/build/commands/build/delete.js +22 -24
- package/build/commands/build/index.js +81 -83
- package/build/commands/build/inspect.js +42 -44
- package/build/commands/build/internal.js +32 -34
- package/build/commands/build/list.js +58 -60
- package/build/commands/build/resign.js +36 -38
- package/build/commands/build/run.js +36 -38
- package/build/commands/build/version/get.js +21 -23
- package/build/commands/build/version/set.js +20 -22
- package/build/commands/build/version/sync.js +20 -22
- package/build/commands/build/view.js +12 -14
- package/build/commands/channel/create.js +17 -19
- package/build/commands/channel/delete.js +18 -20
- package/build/commands/channel/edit.js +20 -22
- package/build/commands/channel/list.js +12 -14
- package/build/commands/channel/pause.js +20 -22
- package/build/commands/channel/resume.js +20 -22
- package/build/commands/channel/rollout.js +74 -76
- package/build/commands/channel/view.js +18 -20
- package/build/commands/config.js +21 -23
- package/build/commands/credentials/configure-build.js +21 -23
- package/build/commands/credentials/index.js +13 -15
- package/build/commands/device/create.js +6 -8
- package/build/commands/device/delete.js +12 -14
- package/build/commands/device/list.js +12 -14
- package/build/commands/device/rename.js +13 -15
- package/build/commands/device/view.js +8 -10
- package/build/commands/diagnostics.js +6 -8
- package/build/commands/env/create.js +39 -41
- package/build/commands/env/delete.js +25 -27
- package/build/commands/env/exec.js +22 -24
- package/build/commands/env/get.js +26 -28
- package/build/commands/env/link.js +27 -29
- package/build/commands/env/list.js +27 -29
- package/build/commands/env/pull.js +23 -25
- package/build/commands/env/push.js +21 -23
- package/build/commands/env/unlink.js +23 -25
- package/build/commands/env/update.js +38 -40
- package/build/commands/fingerprint/compare.d.ts +28 -0
- package/build/commands/fingerprint/compare.js +324 -0
- package/build/commands/metadata/lint.js +18 -20
- package/build/commands/metadata/pull.js +15 -17
- package/build/commands/metadata/push.js +15 -17
- package/build/commands/open.js +6 -8
- package/build/commands/project/info.js +6 -8
- package/build/commands/project/init.js +26 -28
- package/build/commands/project/onboarding.js +10 -12
- package/build/commands/secret/create.js +30 -32
- package/build/commands/secret/delete.js +14 -16
- package/build/commands/secret/list.js +7 -9
- package/build/commands/secret/push.js +23 -25
- package/build/commands/submit/internal.js +23 -25
- package/build/commands/submit.js +54 -56
- package/build/commands/update/configure.js +18 -20
- package/build/commands/update/delete.js +16 -18
- package/build/commands/update/edit.js +25 -27
- package/build/commands/update/index.js +65 -67
- package/build/commands/update/list.js +21 -23
- package/build/commands/update/republish.js +45 -47
- package/build/commands/update/roll-back-to-embedded.d.ts +2 -1
- package/build/commands/update/roll-back-to-embedded.js +92 -84
- package/build/commands/update/rollback.js +7 -7
- package/build/commands/update/view.js +16 -18
- package/build/commands/webhook/create.js +20 -22
- package/build/commands/webhook/delete.js +17 -19
- package/build/commands/webhook/list.js +14 -16
- package/build/commands/webhook/update.js +23 -25
- package/build/commands/webhook/view.js +13 -15
- package/build/commands/worker/alias.js +30 -32
- package/build/commands/worker/deploy.js +38 -40
- package/build/commands/workflow/create.js +16 -18
- package/build/commands/workflow/run.js +13 -15
- package/build/commands/workflow/validate.js +18 -20
- package/build/credentials/android/AndroidCredentialsProvider.js +3 -1
- package/build/credentials/android/actions/AssignFcm.js +1 -0
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForFcmV1.js +1 -0
- package/build/credentials/android/actions/AssignGoogleServiceAccountKeyForSubmissions.js +1 -0
- package/build/credentials/android/actions/CreateFcm.js +1 -0
- package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +1 -0
- package/build/credentials/android/actions/CreateKeystore.js +1 -0
- package/build/credentials/android/actions/DownloadKeystore.js +2 -0
- package/build/credentials/android/actions/RemoveFcm.js +1 -0
- package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.js +2 -0
- package/build/credentials/android/actions/RemoveKeystore.js +1 -0
- package/build/credentials/android/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/android/actions/SetUpBuildCredentialsFromCredentialsJson.js +1 -0
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForFcmV1.js +1 -0
- package/build/credentials/android/actions/SetUpGoogleServiceAccountKeyForSubmissions.js +1 -0
- package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.js +1 -0
- package/build/credentials/context.js +14 -5
- package/build/credentials/errors.js +1 -0
- package/build/credentials/ios/IosCredentialsProvider.js +3 -1
- package/build/credentials/ios/actions/AssignAscApiKey.js +1 -0
- package/build/credentials/ios/actions/AssignPushKey.js +1 -0
- package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +4 -0
- package/build/credentials/ios/actions/CreateAscApiKey.js +1 -0
- package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -0
- package/build/credentials/ios/actions/CreateProvisioningProfile.js +3 -0
- package/build/credentials/ios/actions/CreatePushKey.js +1 -0
- package/build/credentials/ios/actions/RemoveAscApiKey.js +2 -0
- package/build/credentials/ios/actions/RemoveDistributionCertificate.js +3 -0
- package/build/credentials/ios/actions/RemoveProvisioningProfile.js +2 -0
- package/build/credentials/ios/actions/RemovePushKey.js +2 -0
- package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -0
- package/build/credentials/ios/actions/SetUpAscApiKey.js +9 -7
- package/build/credentials/ios/actions/SetUpBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpBuildCredentialsFromCredentialsJson.js +3 -0
- package/build/credentials/ios/actions/SetUpDistributionCertificate.js +3 -0
- package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.js +1 -0
- package/build/credentials/ios/actions/SetUpProvisioningProfile.js +3 -0
- package/build/credentials/ios/actions/SetUpPushKey.js +1 -0
- package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +1 -0
- package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.js +3 -0
- package/build/credentials/ios/actions/UpdateCredentialsJson.js +3 -0
- package/build/credentials/ios/appstore/AppStoreApi.js +2 -0
- package/build/credentials/manager/CheckBuildProfileFlagAgainstEasJson.js +3 -0
- package/build/credentials/manager/CreateAndroidBuildCredentials.js +1 -0
- package/build/credentials/manager/ManageAndroid.js +2 -0
- package/build/credentials/manager/ManageIos.js +2 -0
- package/build/credentials/manager/SelectAndroidBuildCredentials.js +2 -0
- package/build/credentials/manager/SelectBuildProfileFromEasJson.js +2 -0
- package/build/credentials/manager/SelectIosDistributionTypeGraphqlFromBuildProfile.js +1 -0
- package/build/credentials/manager/SelectPlatform.js +7 -0
- package/build/credentials/manager/SetDefaultAndroidKeystore.js +1 -0
- package/build/credentials/manager/SetUpAndroidBuildCredentials.js +1 -0
- package/build/credentials/manager/SetUpBuildCredentialsCommandAction.js +9 -0
- package/build/credentials/manager/SetUpIosBuildCredentials.js +1 -0
- package/build/devices/actions/create/action.js +4 -0
- package/build/devices/manager.js +4 -0
- package/build/fetch.js +1 -0
- package/build/graphql/generated.d.ts +175 -0
- package/build/graphql/generated.js +8 -3
- package/build/graphql/queries/BuildQuery.d.ts +4 -1
- package/build/graphql/queries/BuildQuery.js +19 -0
- package/build/graphql/types/Build.d.ts +1 -0
- package/build/graphql/types/Build.js +15 -1
- package/build/graphql/types/Fingerprint.d.ts +1 -0
- package/build/graphql/types/Fingerprint.js +12 -0
- package/build/log.js +2 -2
- package/build/metadata/apple/config/reader.js +1 -0
- package/build/metadata/apple/config/writer.js +1 -0
- package/build/metadata/apple/tasks/age-rating.js +1 -4
- package/build/metadata/apple/tasks/app-info.js +1 -4
- package/build/metadata/apple/tasks/app-review-detail.js +1 -4
- package/build/metadata/apple/tasks/app-version.js +2 -1
- package/build/metadata/errors.js +5 -0
- package/build/rollout/actions/CreateRollout.d.ts +9 -10
- package/build/rollout/actions/CreateRollout.js +2 -0
- package/build/rollout/actions/EditRollout.d.ts +2 -3
- package/build/rollout/actions/EditRollout.js +2 -0
- package/build/rollout/actions/EndRollout.d.ts +4 -6
- package/build/rollout/actions/EndRollout.js +2 -0
- package/build/rollout/actions/ManageRollout.d.ts +2 -3
- package/build/rollout/actions/ManageRollout.js +2 -0
- package/build/rollout/actions/NonInteractiveRollout.d.ts +6 -27
- package/build/rollout/actions/NonInteractiveRollout.js +1 -0
- package/build/rollout/actions/RolloutMainMenu.d.ts +6 -7
- package/build/rollout/actions/RolloutMainMenu.js +1 -0
- package/build/rollout/actions/SelectRuntime.d.ts +6 -20
- package/build/rollout/actions/SelectRuntime.js +3 -0
- package/build/submit/BaseSubmitter.js +4 -0
- package/build/submit/android/AndroidSubmitCommand.js +1 -0
- package/build/submit/ios/IosSubmitCommand.js +1 -0
- package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js +3 -3
- package/build/user/SessionManager.js +2 -0
- package/build/utils/fingerprint.d.ts +97 -0
- package/build/utils/fingerprint.js +5 -0
- package/build/utils/fingerprintCli.d.ts +5 -7
- package/build/utils/fingerprintCli.js +11 -1
- package/build/utils/fingerprintDiff.d.ts +33 -0
- package/build/utils/fingerprintDiff.js +122 -0
- package/build/vcs/clients/git.js +1 -0
- package/build/vcs/local.js +2 -1
- package/oclif.manifest.json +51 -7
- package/package.json +9 -7
|
@@ -3,20 +3,6 @@ import { NonInteractiveOptions as EditRolloutNonInteractiveOptions } from './Edi
|
|
|
3
3
|
import { GeneralOptions as EndRolloutGeneralOptions, NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
|
|
4
4
|
import { RolloutActions } from './RolloutMainMenu';
|
|
5
5
|
import { EASUpdateAction, EASUpdateContext } from '../../eas-update/utils';
|
|
6
|
-
import { UpdateChannelBasicInfoFragment } from '../../graphql/generated';
|
|
7
|
-
import { UpdateBranchObject, UpdateChannelObject } from '../../graphql/queries/ChannelQuery';
|
|
8
|
-
type JSONRolloutOutput = {
|
|
9
|
-
defaultBranch: UpdateBranchObject;
|
|
10
|
-
rolledOutBranch: UpdateBranchObject;
|
|
11
|
-
percentRolledOut: number;
|
|
12
|
-
runtimeVersion?: string;
|
|
13
|
-
updatedAt: Date;
|
|
14
|
-
};
|
|
15
|
-
type JSONOutput = {
|
|
16
|
-
hasRollout: boolean;
|
|
17
|
-
originalRolloutInfo?: JSONRolloutOutput;
|
|
18
|
-
currentRolloutInfo?: JSONRolloutOutput;
|
|
19
|
-
};
|
|
20
6
|
/**
|
|
21
7
|
* Control a rollout in non interactive mode.
|
|
22
8
|
*/
|
|
@@ -28,17 +14,10 @@ export declare class NonInteractiveRollout implements EASUpdateAction<void> {
|
|
|
28
14
|
action?: RolloutActions;
|
|
29
15
|
} & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & EndRolloutGeneralOptions & Partial<CreateRolloutNonInteractiveOptions>);
|
|
30
16
|
runAsync(ctx: EASUpdateContext): Promise<void>;
|
|
31
|
-
runActionAsync
|
|
32
|
-
viewRollout
|
|
33
|
-
getJsonAsync
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
getRolloutJsonAsync(channelObject: UpdateChannelObject): Promise<JSONRolloutOutput>;
|
|
38
|
-
getRuntimeVersion(channelInfo: UpdateChannelBasicInfoFragment): string | undefined;
|
|
39
|
-
getChannelObjectAsync(ctx: EASUpdateContext, { channelName, runtimeVersion }: {
|
|
40
|
-
channelName: string;
|
|
41
|
-
runtimeVersion?: string;
|
|
42
|
-
}): Promise<UpdateChannelObject>;
|
|
17
|
+
private runActionAsync;
|
|
18
|
+
private viewRollout;
|
|
19
|
+
private getJsonAsync;
|
|
20
|
+
private getRolloutJsonAsync;
|
|
21
|
+
private getRuntimeVersion;
|
|
22
|
+
private getChannelObjectAsync;
|
|
43
23
|
}
|
|
44
|
-
export {};
|
|
@@ -3,7 +3,6 @@ import { NonInteractiveOptions as EditRolloutNonInteractiveOptions } from './Edi
|
|
|
3
3
|
import { GeneralOptions as EndRolloutGeneralOptions, NonInteractiveOptions as EndRolloutNonInteractiveOptions } from './EndRollout';
|
|
4
4
|
import { ManageRolloutActions } from './ManageRollout';
|
|
5
5
|
import { EASUpdateAction, EASUpdateContext } from '../../eas-update/utils';
|
|
6
|
-
import { UpdateChannelBasicInfoFragment } from '../../graphql/generated';
|
|
7
6
|
export declare enum MainMenuActions {
|
|
8
7
|
CREATE_NEW = "Create a new rollout",
|
|
9
8
|
MANAGE_EXISTING = "Manage an existing rollout"
|
|
@@ -19,10 +18,10 @@ export declare class RolloutMainMenu implements EASUpdateAction<void> {
|
|
|
19
18
|
action?: RolloutActions;
|
|
20
19
|
} & Partial<EditRolloutNonInteractiveOptions> & Partial<EndRolloutNonInteractiveOptions> & EndRolloutGeneralOptions & Partial<CreateRolloutNonInteractiveOptions>);
|
|
21
20
|
runAsync(ctx: EASUpdateContext): Promise<void>;
|
|
22
|
-
runActionAsync
|
|
23
|
-
selectRolloutAsync
|
|
24
|
-
selectChannelToRolloutAsync
|
|
25
|
-
resolveChannelNameAsync
|
|
26
|
-
toMainMenuAction
|
|
27
|
-
promptMenuActionAsync
|
|
21
|
+
private runActionAsync;
|
|
22
|
+
private selectRolloutAsync;
|
|
23
|
+
private selectChannelToRolloutAsync;
|
|
24
|
+
private resolveChannelNameAsync;
|
|
25
|
+
private toMainMenuAction;
|
|
26
|
+
private promptMenuActionAsync;
|
|
28
27
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
1
|
import { EASUpdateAction, EASUpdateContext } from '../../eas-update/utils';
|
|
3
|
-
import {
|
|
4
|
-
import { Connection } from '../../utils/relay';
|
|
2
|
+
import { UpdateBranchBasicInfoFragment } from '../../graphql/generated';
|
|
5
3
|
/**
|
|
6
4
|
* Select a runtime from a branch
|
|
7
5
|
*/
|
|
@@ -12,22 +10,10 @@ export declare class SelectRuntime implements EASUpdateAction<string | null> {
|
|
|
12
10
|
constructor(branchInfo: UpdateBranchBasicInfoFragment, options?: {
|
|
13
11
|
anotherBranchToIntersectRuntimesBy?: UpdateBranchBasicInfoFragment;
|
|
14
12
|
});
|
|
15
|
-
warnNoRuntime
|
|
16
|
-
formatCantFindRuntime
|
|
13
|
+
private warnNoRuntime;
|
|
14
|
+
private formatCantFindRuntime;
|
|
17
15
|
runAsync(ctx: EASUpdateContext): Promise<string | null>;
|
|
18
|
-
getNewestRuntimeAsync
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
anotherBranchIdToIntersectRuntimesBy?: string;
|
|
22
|
-
}): Promise<Connection<RuntimeFragment>>;
|
|
23
|
-
displayLatestUpdateGroupAsync({ graphqlClient, appId, branchName, runtime, }: {
|
|
24
|
-
graphqlClient: ExpoGraphqlClient;
|
|
25
|
-
appId: string;
|
|
26
|
-
branchName: string;
|
|
27
|
-
runtime: RuntimeFragment;
|
|
28
|
-
}): Promise<string>;
|
|
29
|
-
selectRuntimesAsync(graphqlClient: ExpoGraphqlClient, { appId, batchSize, }: {
|
|
30
|
-
appId: string;
|
|
31
|
-
batchSize?: number;
|
|
32
|
-
}): Promise<RuntimeFragment | null>;
|
|
16
|
+
private getNewestRuntimeAsync;
|
|
17
|
+
private displayLatestUpdateGroupAsync;
|
|
18
|
+
private selectRuntimesAsync;
|
|
33
19
|
}
|
|
@@ -10,6 +10,10 @@ const log_1 = tslib_1.__importDefault(require("../log"));
|
|
|
10
10
|
const ora_1 = require("../ora");
|
|
11
11
|
const platform_1 = require("../platform");
|
|
12
12
|
class BaseSubmitter {
|
|
13
|
+
ctx;
|
|
14
|
+
options;
|
|
15
|
+
sourceOptionResolver;
|
|
16
|
+
sourceOptionAnalytics;
|
|
13
17
|
constructor(ctx, options, sourceOptionResolver, sourceOptionAnalytics) {
|
|
14
18
|
this.ctx = ctx;
|
|
15
19
|
this.options = options;
|
|
@@ -13,6 +13,7 @@ const capitalize_1 = tslib_1.__importDefault(require("../../utils/expodash/capit
|
|
|
13
13
|
const ArchiveSource_1 = require("../ArchiveSource");
|
|
14
14
|
const commons_1 = require("../commons");
|
|
15
15
|
class AndroidSubmitCommand {
|
|
16
|
+
ctx;
|
|
16
17
|
constructor(ctx) {
|
|
17
18
|
this.ctx = ctx;
|
|
18
19
|
}
|
|
@@ -27,19 +27,19 @@ async function getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync(graphqlC
|
|
|
27
27
|
if (!(error instanceof errors_1.ChannelNotFoundError)) {
|
|
28
28
|
throw error;
|
|
29
29
|
}
|
|
30
|
-
const {
|
|
30
|
+
const { branch } = await (0, queries_1.ensureBranchExistsAsync)(graphqlClient, {
|
|
31
31
|
appId: projectId,
|
|
32
32
|
branchName: channelName,
|
|
33
33
|
});
|
|
34
34
|
const { updateChannel: { createUpdateChannelForApp: newChannel }, } = await (0, queries_2.createChannelOnAppAsync)(graphqlClient, {
|
|
35
35
|
appId: projectId,
|
|
36
36
|
channelName,
|
|
37
|
-
branchId,
|
|
37
|
+
branchId: branch.id,
|
|
38
38
|
});
|
|
39
39
|
if (!newChannel) {
|
|
40
40
|
throw new Error(`Could not create channel with name ${channelName} on project with id ${projectId}`);
|
|
41
41
|
}
|
|
42
|
-
branchInfo = { branchId, branchName: channelName };
|
|
42
|
+
branchInfo = { branchId: branch.id, branchName: channelName };
|
|
43
43
|
}
|
|
44
44
|
return branchInfo;
|
|
45
45
|
}
|
|
@@ -22,6 +22,8 @@ var UserSecondFactorDeviceMethod;
|
|
|
22
22
|
UserSecondFactorDeviceMethod["SMS"] = "sms";
|
|
23
23
|
})(UserSecondFactorDeviceMethod || (exports.UserSecondFactorDeviceMethod = UserSecondFactorDeviceMethod = {}));
|
|
24
24
|
class SessionManager {
|
|
25
|
+
analytics;
|
|
26
|
+
currentActor;
|
|
25
27
|
constructor(analytics) {
|
|
26
28
|
this.analytics = analytics;
|
|
27
29
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT EDIT unless the same change is made in `@expo/fingerprint`
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
export interface HashSourceFile {
|
|
6
|
+
type: 'file';
|
|
7
|
+
filePath: string;
|
|
8
|
+
/**
|
|
9
|
+
* Reasons of this source coming from
|
|
10
|
+
*/
|
|
11
|
+
reasons: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface HashSourceDir {
|
|
14
|
+
type: 'dir';
|
|
15
|
+
filePath: string;
|
|
16
|
+
/**
|
|
17
|
+
* Reasons of this source coming from
|
|
18
|
+
*/
|
|
19
|
+
reasons: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface HashSourceContents {
|
|
22
|
+
type: 'contents';
|
|
23
|
+
id: string;
|
|
24
|
+
contents: string | Buffer;
|
|
25
|
+
/**
|
|
26
|
+
* Reasons of this source coming from
|
|
27
|
+
*/
|
|
28
|
+
reasons: string[];
|
|
29
|
+
}
|
|
30
|
+
export type HashSource = HashSourceFile | HashSourceDir | HashSourceContents;
|
|
31
|
+
export interface Fingerprint {
|
|
32
|
+
/**
|
|
33
|
+
* Sources and their hash values to generate a fingerprint
|
|
34
|
+
*/
|
|
35
|
+
sources: FingerprintSource[];
|
|
36
|
+
/**
|
|
37
|
+
* The final hash value of the whole fingerprint
|
|
38
|
+
*/
|
|
39
|
+
hash: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DebugInfoFile {
|
|
42
|
+
path: string;
|
|
43
|
+
hash: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DebugInfoDir {
|
|
46
|
+
path: string;
|
|
47
|
+
hash: string;
|
|
48
|
+
children: (DebugInfoFile | DebugInfoDir | undefined)[];
|
|
49
|
+
}
|
|
50
|
+
export interface DebugInfoContents {
|
|
51
|
+
hash: string;
|
|
52
|
+
}
|
|
53
|
+
export type DebugInfo = DebugInfoFile | DebugInfoDir | DebugInfoContents;
|
|
54
|
+
export type FingerprintSource = HashSource & {
|
|
55
|
+
/**
|
|
56
|
+
* Hash value of the `source`.
|
|
57
|
+
* If the source is excluding by `Options.dirExcludes`, the value will be null.
|
|
58
|
+
*/
|
|
59
|
+
hash: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Debug info from the hashing process. Differs based on source type. Designed to be consumed by humans
|
|
62
|
+
* as opposed to programmatically.
|
|
63
|
+
*/
|
|
64
|
+
debugInfo?: DebugInfo;
|
|
65
|
+
};
|
|
66
|
+
export type FingerprintDiffItem = {
|
|
67
|
+
/**
|
|
68
|
+
* The operation type of the diff item.
|
|
69
|
+
*/
|
|
70
|
+
op: 'added';
|
|
71
|
+
/**
|
|
72
|
+
* The added source.
|
|
73
|
+
*/
|
|
74
|
+
addedSource: FingerprintSource;
|
|
75
|
+
} | {
|
|
76
|
+
/**
|
|
77
|
+
* The operation type of the diff item.
|
|
78
|
+
*/
|
|
79
|
+
op: 'removed';
|
|
80
|
+
/**
|
|
81
|
+
* The removed source.
|
|
82
|
+
*/
|
|
83
|
+
removedSource: FingerprintSource;
|
|
84
|
+
} | {
|
|
85
|
+
/**
|
|
86
|
+
* The operation type of the diff item.
|
|
87
|
+
*/
|
|
88
|
+
op: 'changed';
|
|
89
|
+
/**
|
|
90
|
+
* The source before.
|
|
91
|
+
*/
|
|
92
|
+
beforeSource: FingerprintSource;
|
|
93
|
+
/**
|
|
94
|
+
* The source after.
|
|
95
|
+
*/
|
|
96
|
+
afterSource: FingerprintSource;
|
|
97
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Env, Workflow } from '@expo/eas-build-job';
|
|
2
|
+
import { Fingerprint, FingerprintDiffItem } from './fingerprint';
|
|
2
3
|
export type FingerprintOptions = {
|
|
3
4
|
workflow: Workflow;
|
|
4
5
|
platforms: string[];
|
|
@@ -6,11 +7,10 @@ export type FingerprintOptions = {
|
|
|
6
7
|
env: Env | undefined;
|
|
7
8
|
cwd?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
sources: object[];
|
|
10
|
+
export declare function diffFingerprint(projectDir: string, fingerprint1: Fingerprint, fingerprint2: Fingerprint): FingerprintDiffItem[] | null;
|
|
11
|
+
export declare function createFingerprintAsync(projectDir: string, options: FingerprintOptions): Promise<(Fingerprint & {
|
|
12
12
|
isDebugSource: boolean;
|
|
13
|
-
} | null>;
|
|
13
|
+
}) | null>;
|
|
14
14
|
/**
|
|
15
15
|
* Computes project fingerprints based on provided options and returns a map of fingerprint data keyed by a string.
|
|
16
16
|
*
|
|
@@ -23,8 +23,6 @@ export declare function createFingerprintAsync(projectDir: string, options: Fing
|
|
|
23
23
|
*
|
|
24
24
|
* @throws Will throw an error if fingerprint computation fails.
|
|
25
25
|
*/
|
|
26
|
-
export declare function createFingerprintsByKeyAsync(projectDir: string, fingerprintOptionsByKey: Map<string, FingerprintOptions>): Promise<Map<string, {
|
|
27
|
-
hash: string;
|
|
28
|
-
sources: object[];
|
|
26
|
+
export declare function createFingerprintsByKeyAsync(projectDir: string, fingerprintOptionsByKey: Map<string, FingerprintOptions>): Promise<Map<string, Fingerprint & {
|
|
29
27
|
isDebugSource: boolean;
|
|
30
28
|
}>>;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFingerprintsByKeyAsync = exports.createFingerprintAsync = void 0;
|
|
3
|
+
exports.createFingerprintsByKeyAsync = exports.createFingerprintAsync = exports.diffFingerprint = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
6
6
|
const resolve_from_1 = require("resolve-from");
|
|
7
7
|
const mapMapAsync_1 = tslib_1.__importDefault(require("./expodash/mapMapAsync"));
|
|
8
8
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
9
9
|
const ora_1 = require("../ora");
|
|
10
|
+
function diffFingerprint(projectDir, fingerprint1, fingerprint2) {
|
|
11
|
+
// @expo/fingerprint is exported in the expo package for SDK 52+
|
|
12
|
+
const fingerprintPath = (0, resolve_from_1.silent)(projectDir, 'expo/fingerprint');
|
|
13
|
+
if (!fingerprintPath) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const Fingerprint = require(fingerprintPath);
|
|
17
|
+
return Fingerprint.diffFingerprints(fingerprint1, fingerprint2);
|
|
18
|
+
}
|
|
19
|
+
exports.diffFingerprint = diffFingerprint;
|
|
10
20
|
async function createFingerprintAsync(projectDir, options) {
|
|
11
21
|
// @expo/fingerprint is exported in the expo package for SDK 52+
|
|
12
22
|
const fingerprintPath = (0, resolve_from_1.silent)(projectDir, 'expo/fingerprint');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes and prints a line-based diff between two strings, displaying changes as chunks.
|
|
3
|
+
*
|
|
4
|
+
* Each chunk contains lines that were added or removed, prefixed with contextual lines
|
|
5
|
+
* from the unchanged parts of the strings. The output is styled similarly to `git diff`
|
|
6
|
+
* with headers indicating line ranges for the changes in the original and modified strings.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} str1 - The original string to compare.
|
|
9
|
+
* @param {string} str2 - The modified string to compare against the original.
|
|
10
|
+
* @param {number} [contextLines=2] - The number of unchanged lines to display before and after each chunk of changes.
|
|
11
|
+
*
|
|
12
|
+
* ### Output:
|
|
13
|
+
* - Each chunk begins with a header in the format `@@ -<original range> +<modified range> @@`.
|
|
14
|
+
* - Removed lines are prefixed with a red `-` and the original line number.
|
|
15
|
+
* - Added lines are prefixed with a green `+` and the modified line number.
|
|
16
|
+
* - Context lines are displayed in gray without a `+` or `-` prefix.
|
|
17
|
+
*
|
|
18
|
+
* ### Notes:
|
|
19
|
+
* - Consecutive changes are grouped into a single chunk if separated by no more than the specified number of context lines.
|
|
20
|
+
*
|
|
21
|
+
* ### Example:
|
|
22
|
+
* ```typescript
|
|
23
|
+
* abridgedDiff("Line1\nLine2\nLine3", "Line1\nLineX\nLine3", 1);
|
|
24
|
+
*
|
|
25
|
+
* Output:
|
|
26
|
+
* `@@ -2,1 +2,1 @@`
|
|
27
|
+
* Line1
|
|
28
|
+
* -Line2
|
|
29
|
+
* +LineX
|
|
30
|
+
* Line3
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function abridgedDiff(str1: string, str2: string, contextLines?: number): void;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.abridgedDiff = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
+
const diff_1 = require("diff");
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
8
|
+
/**
|
|
9
|
+
* Computes and prints a line-based diff between two strings, displaying changes as chunks.
|
|
10
|
+
*
|
|
11
|
+
* Each chunk contains lines that were added or removed, prefixed with contextual lines
|
|
12
|
+
* from the unchanged parts of the strings. The output is styled similarly to `git diff`
|
|
13
|
+
* with headers indicating line ranges for the changes in the original and modified strings.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} str1 - The original string to compare.
|
|
16
|
+
* @param {string} str2 - The modified string to compare against the original.
|
|
17
|
+
* @param {number} [contextLines=2] - The number of unchanged lines to display before and after each chunk of changes.
|
|
18
|
+
*
|
|
19
|
+
* ### Output:
|
|
20
|
+
* - Each chunk begins with a header in the format `@@ -<original range> +<modified range> @@`.
|
|
21
|
+
* - Removed lines are prefixed with a red `-` and the original line number.
|
|
22
|
+
* - Added lines are prefixed with a green `+` and the modified line number.
|
|
23
|
+
* - Context lines are displayed in gray without a `+` or `-` prefix.
|
|
24
|
+
*
|
|
25
|
+
* ### Notes:
|
|
26
|
+
* - Consecutive changes are grouped into a single chunk if separated by no more than the specified number of context lines.
|
|
27
|
+
*
|
|
28
|
+
* ### Example:
|
|
29
|
+
* ```typescript
|
|
30
|
+
* abridgedDiff("Line1\nLine2\nLine3", "Line1\nLineX\nLine3", 1);
|
|
31
|
+
*
|
|
32
|
+
* Output:
|
|
33
|
+
* `@@ -2,1 +2,1 @@`
|
|
34
|
+
* Line1
|
|
35
|
+
* -Line2
|
|
36
|
+
* +LineX
|
|
37
|
+
* Line3
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function abridgedDiff(str1, str2, contextLines = 2) {
|
|
41
|
+
const changes = (0, diff_1.diffLines)(str1, str2);
|
|
42
|
+
const output = [];
|
|
43
|
+
let lineNumberOriginal = 1;
|
|
44
|
+
let lineNumberModified = 1;
|
|
45
|
+
let currentChunk = [];
|
|
46
|
+
let currentChunkPriorContext = [];
|
|
47
|
+
let currentChunkAfterContext = [];
|
|
48
|
+
let startOriginal = null; // Start line in the original for the current chunk
|
|
49
|
+
let startModified = null; // Start line in the modified for the current chunk
|
|
50
|
+
let addedLines = 0;
|
|
51
|
+
let removedLines = 0;
|
|
52
|
+
const flushChunk = () => {
|
|
53
|
+
if (currentChunk.length > 0) {
|
|
54
|
+
const originalRange = `${startOriginal},${removedLines || 0}`;
|
|
55
|
+
const modifiedRange = `${startModified},${addedLines || 0}`;
|
|
56
|
+
// `git diff` style header
|
|
57
|
+
output.push(chalk_1.default.cyan(`@@ -${originalRange} +${modifiedRange} @@`));
|
|
58
|
+
output.push(...currentChunkPriorContext);
|
|
59
|
+
output.push(...currentChunk);
|
|
60
|
+
output.push(...currentChunkAfterContext);
|
|
61
|
+
currentChunk = [];
|
|
62
|
+
currentChunkPriorContext = [];
|
|
63
|
+
currentChunkAfterContext = [];
|
|
64
|
+
addedLines = 0;
|
|
65
|
+
removedLines = 0;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
for (const change of changes) {
|
|
69
|
+
const lines = change.value.split('\n').filter(line => line);
|
|
70
|
+
if (change.added || change.removed) {
|
|
71
|
+
// Initialize start lines for the chunk if not already set
|
|
72
|
+
if (startOriginal === null) {
|
|
73
|
+
startOriginal = lineNumberOriginal;
|
|
74
|
+
}
|
|
75
|
+
if (startModified === null) {
|
|
76
|
+
startModified = lineNumberModified;
|
|
77
|
+
}
|
|
78
|
+
if (change.removed) {
|
|
79
|
+
lines.forEach(line => {
|
|
80
|
+
currentChunk.push(`${chalk_1.default.red(`-${line}`)}`);
|
|
81
|
+
lineNumberOriginal++;
|
|
82
|
+
removedLines++;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (change.added) {
|
|
86
|
+
lines.forEach(line => {
|
|
87
|
+
currentChunk.push(`${chalk_1.default.green(`+${line}`)}`);
|
|
88
|
+
lineNumberModified++;
|
|
89
|
+
addedLines++;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// Unchanged lines (context)
|
|
95
|
+
lines.forEach((line, i) => {
|
|
96
|
+
if (currentChunk.length > 0) {
|
|
97
|
+
// Add leading context after a change
|
|
98
|
+
if (i < contextLines) {
|
|
99
|
+
currentChunkAfterContext.push(` ${chalk_1.default.gray(line)}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
// Add trailing context before a change
|
|
104
|
+
if (lines.length - 1 - contextLines < i) {
|
|
105
|
+
currentChunkPriorContext.push(` ${chalk_1.default.gray(line)}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const isFinalLineOfAfterContext = i === contextLines - 1 || i === lines.length - 1;
|
|
109
|
+
if (currentChunk.length > 0 && isFinalLineOfAfterContext) {
|
|
110
|
+
flushChunk();
|
|
111
|
+
}
|
|
112
|
+
lineNumberOriginal++;
|
|
113
|
+
lineNumberModified++;
|
|
114
|
+
});
|
|
115
|
+
startOriginal = null;
|
|
116
|
+
startModified = null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
flushChunk(); // Flush any remaining chunk
|
|
120
|
+
log_1.default.log(output.join('\n'));
|
|
121
|
+
}
|
|
122
|
+
exports.abridgedDiff = abridgedDiff;
|
package/build/vcs/clients/git.js
CHANGED
|
@@ -13,6 +13,7 @@ const prompts_1 = require("../../prompts");
|
|
|
13
13
|
const git_1 = require("../git");
|
|
14
14
|
const vcs_1 = require("../vcs");
|
|
15
15
|
class GitClient extends vcs_1.Client {
|
|
16
|
+
maybeCwdOverride;
|
|
16
17
|
constructor(maybeCwdOverride) {
|
|
17
18
|
super();
|
|
18
19
|
this.maybeCwdOverride = maybeCwdOverride;
|
package/build/vcs/local.js
CHANGED
|
@@ -31,9 +31,10 @@ exports.getRootPath = getRootPath;
|
|
|
31
31
|
* - if .easignore exists, .gitignore files are not used.
|
|
32
32
|
*/
|
|
33
33
|
class Ignore {
|
|
34
|
+
rootDir;
|
|
35
|
+
ignoreMapping = [];
|
|
34
36
|
constructor(rootDir) {
|
|
35
37
|
this.rootDir = rootDir;
|
|
36
|
-
this.ignoreMapping = [];
|
|
37
38
|
}
|
|
38
39
|
async initIgnoreAsync() {
|
|
39
40
|
const easIgnorePath = path_1.default.join(this.rootDir, EASIGNORE_FILENAME);
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "14.0.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"analytics": {
|
|
5
5
|
"id": "analytics",
|
|
@@ -2567,6 +2567,49 @@
|
|
|
2567
2567
|
"loggedIn": {}
|
|
2568
2568
|
}
|
|
2569
2569
|
},
|
|
2570
|
+
"fingerprint:compare": {
|
|
2571
|
+
"id": "fingerprint:compare",
|
|
2572
|
+
"description": "compare fingerprints of the current project, builds and updates",
|
|
2573
|
+
"strict": true,
|
|
2574
|
+
"pluginName": "eas-cli",
|
|
2575
|
+
"pluginAlias": "eas-cli",
|
|
2576
|
+
"pluginType": "core",
|
|
2577
|
+
"hidden": true,
|
|
2578
|
+
"aliases": [],
|
|
2579
|
+
"flags": {
|
|
2580
|
+
"build-id": {
|
|
2581
|
+
"name": "build-id",
|
|
2582
|
+
"type": "option",
|
|
2583
|
+
"description": "Compare the fingerprint with the build with the specified ID",
|
|
2584
|
+
"multiple": false,
|
|
2585
|
+
"aliases": [
|
|
2586
|
+
"buildId"
|
|
2587
|
+
]
|
|
2588
|
+
},
|
|
2589
|
+
"json": {
|
|
2590
|
+
"name": "json",
|
|
2591
|
+
"type": "boolean",
|
|
2592
|
+
"description": "Enable JSON output, non-JSON messages will be printed to stderr.",
|
|
2593
|
+
"allowNo": false,
|
|
2594
|
+
"dependsOn": [
|
|
2595
|
+
"non-interactive"
|
|
2596
|
+
]
|
|
2597
|
+
},
|
|
2598
|
+
"non-interactive": {
|
|
2599
|
+
"name": "non-interactive",
|
|
2600
|
+
"type": "boolean",
|
|
2601
|
+
"description": "Run the command in non-interactive mode.",
|
|
2602
|
+
"allowNo": false
|
|
2603
|
+
}
|
|
2604
|
+
},
|
|
2605
|
+
"args": {},
|
|
2606
|
+
"contextDefinition": {
|
|
2607
|
+
"projectId": {},
|
|
2608
|
+
"loggedIn": {},
|
|
2609
|
+
"privateProjectConfig": {},
|
|
2610
|
+
"vcsClient": {}
|
|
2611
|
+
}
|
|
2612
|
+
},
|
|
2570
2613
|
"metadata:lint": {
|
|
2571
2614
|
"id": "metadata:lint",
|
|
2572
2615
|
"description": "validate the local store configuration",
|
|
@@ -3374,6 +3417,13 @@
|
|
|
3374
3417
|
"required": false,
|
|
3375
3418
|
"multiple": false
|
|
3376
3419
|
},
|
|
3420
|
+
"runtime-version": {
|
|
3421
|
+
"name": "runtime-version",
|
|
3422
|
+
"type": "option",
|
|
3423
|
+
"description": "Runtime version that the rollback to embedded update should target",
|
|
3424
|
+
"required": false,
|
|
3425
|
+
"multiple": false
|
|
3426
|
+
},
|
|
3377
3427
|
"message": {
|
|
3378
3428
|
"name": "message",
|
|
3379
3429
|
"type": "option",
|
|
@@ -3395,12 +3445,6 @@
|
|
|
3395
3445
|
],
|
|
3396
3446
|
"default": "all"
|
|
3397
3447
|
},
|
|
3398
|
-
"auto": {
|
|
3399
|
-
"name": "auto",
|
|
3400
|
-
"type": "boolean",
|
|
3401
|
-
"description": "Use the current git branch and commit message for the EAS branch and update message",
|
|
3402
|
-
"allowNo": false
|
|
3403
|
-
},
|
|
3404
3448
|
"private-key-path": {
|
|
3405
3449
|
"name": "private-key-path",
|
|
3406
3450
|
"type": "option",
|