@teambit/merge-lanes 1.0.228 → 1.0.230
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/schema.json +360 -80
- package/dist/exceptions/missing-comps-to-merge.d.ts +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/last-merged.d.ts +33 -0
- package/dist/merge-abort.cmd.d.ts +22 -0
- package/dist/merge-lane-from-scope.cmd.d.ts +60 -0
- package/dist/merge-lane.cmd.d.ts +41 -0
- package/dist/merge-lanes.aspect.d.ts +2 -0
- package/dist/merge-lanes.main.runtime.d.ts +103 -0
- package/package.json +15 -15
- package/tsconfig.json +1 -40
- /package/dist/{preview-1712805335812.js → preview-1712891953391.js} +0 -0
package/dist/index.d.ts
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import { ScopeMain } from '@teambit/scope';
|
2
|
+
import { Lane } from '@teambit/legacy/dist/scope/models';
|
3
|
+
import { Consumer } from '@teambit/legacy/dist/consumer';
|
4
|
+
import { Logger } from '@teambit/logger';
|
5
|
+
import { MergeAbortOpts } from './merge-abort.cmd';
|
6
|
+
type Snapshot = {
|
7
|
+
copyOfCurrentLane?: Lane;
|
8
|
+
copyOfBitmap: string;
|
9
|
+
copyOfWorkspaceJsonc: string;
|
10
|
+
copyOfStagedSnaps?: string;
|
11
|
+
copyOfStagedConfig?: string;
|
12
|
+
};
|
13
|
+
export declare class LastMerged {
|
14
|
+
private scope;
|
15
|
+
private consumer;
|
16
|
+
private logger;
|
17
|
+
constructor(scope: ScopeMain, consumer: Consumer, logger: Logger);
|
18
|
+
get path(): string;
|
19
|
+
takeSnapshot(currentLane?: Lane | null): Promise<Snapshot>;
|
20
|
+
persistSnapshot(snapshot: Snapshot): Promise<void>;
|
21
|
+
restoreFromLastMerged(mergeAbortOpts: MergeAbortOpts, currentLane?: Lane | null): Promise<{
|
22
|
+
compDirsToRemove: string[];
|
23
|
+
}>;
|
24
|
+
private mergeAbortPrompt;
|
25
|
+
private getLastMergedLaneContentIfExists;
|
26
|
+
private getFileContentIfExist;
|
27
|
+
private getLastMergedBitmapPath;
|
28
|
+
private getLastMergedWorkspacePath;
|
29
|
+
private getLastMergedLanePath;
|
30
|
+
private getLastMergedStagedSnapsPath;
|
31
|
+
private getLastMergedStagedConfigPath;
|
32
|
+
}
|
33
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
2
|
+
import { MergeLanesMain } from './merge-lanes.main.runtime';
|
3
|
+
export type MergeAbortOpts = {
|
4
|
+
silent?: boolean;
|
5
|
+
};
|
6
|
+
export declare class MergeAbortLaneCmd implements Command {
|
7
|
+
private mergeLanes;
|
8
|
+
name: string;
|
9
|
+
description: string;
|
10
|
+
extendedDescription: string;
|
11
|
+
alias: string;
|
12
|
+
options: CommandOptions;
|
13
|
+
loader: boolean;
|
14
|
+
private: boolean;
|
15
|
+
remoteOp: boolean;
|
16
|
+
constructor(mergeLanes: MergeLanesMain);
|
17
|
+
report(_: any, { skipDependencyInstallation, verbose, silent, }: {
|
18
|
+
skipDependencyInstallation?: boolean;
|
19
|
+
verbose?: boolean;
|
20
|
+
silent?: boolean;
|
21
|
+
}): Promise<string>;
|
22
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
2
|
+
import { MergeLanesMain } from './merge-lanes.main.runtime';
|
3
|
+
type Flags = {
|
4
|
+
pattern?: string;
|
5
|
+
push?: boolean;
|
6
|
+
keepReadme?: boolean;
|
7
|
+
noSquash: boolean;
|
8
|
+
includeDeps?: boolean;
|
9
|
+
title?: string;
|
10
|
+
titleBase64?: string;
|
11
|
+
reMerge?: boolean;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* private command. the underscore prefix is intended.
|
15
|
+
*/
|
16
|
+
export declare class MergeLaneFromScopeCmd implements Command {
|
17
|
+
private mergeLanes;
|
18
|
+
name: string;
|
19
|
+
description: string;
|
20
|
+
extendedDescription: string;
|
21
|
+
arguments: {
|
22
|
+
name: string;
|
23
|
+
description: string;
|
24
|
+
}[];
|
25
|
+
alias: string;
|
26
|
+
options: CommandOptions;
|
27
|
+
loader: boolean;
|
28
|
+
private: boolean;
|
29
|
+
remoteOp: boolean;
|
30
|
+
constructor(mergeLanes: MergeLanesMain);
|
31
|
+
report([fromLane, toLane]: [string, string], { pattern, push, keepReadme, noSquash, includeDeps, title, titleBase64, reMerge, }: Flags): Promise<string>;
|
32
|
+
json([fromLane, toLane]: [string, string], { pattern, push, keepReadme, noSquash, includeDeps, reMerge }: Flags): Promise<{
|
33
|
+
code: number;
|
34
|
+
data: {
|
35
|
+
mergedNow: string[];
|
36
|
+
mergedPreviously: string[];
|
37
|
+
exportedIds: string[];
|
38
|
+
unmerged: {
|
39
|
+
id: string;
|
40
|
+
reason: string;
|
41
|
+
}[];
|
42
|
+
conflicts: {
|
43
|
+
files: string[];
|
44
|
+
config?: boolean | undefined;
|
45
|
+
id: string;
|
46
|
+
}[] | undefined;
|
47
|
+
snappedIds: string[] | undefined;
|
48
|
+
mergeSnapError: {
|
49
|
+
message: string;
|
50
|
+
stack: string | undefined;
|
51
|
+
} | undefined;
|
52
|
+
};
|
53
|
+
error?: undefined;
|
54
|
+
} | {
|
55
|
+
code: number;
|
56
|
+
error: any;
|
57
|
+
data?: undefined;
|
58
|
+
}>;
|
59
|
+
}
|
60
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
2
|
+
import { GlobalConfigMain } from '@teambit/global-config';
|
3
|
+
import { MergeLanesMain } from './merge-lanes.main.runtime';
|
4
|
+
export declare class MergeLaneCmd implements Command {
|
5
|
+
private mergeLanes;
|
6
|
+
private globalConfig;
|
7
|
+
name: string;
|
8
|
+
description: string;
|
9
|
+
extendedDescription: string;
|
10
|
+
arguments: {
|
11
|
+
name: string;
|
12
|
+
description: string;
|
13
|
+
}[];
|
14
|
+
alias: string;
|
15
|
+
options: CommandOptions;
|
16
|
+
loader: boolean;
|
17
|
+
private: boolean;
|
18
|
+
remoteOp: boolean;
|
19
|
+
constructor(mergeLanes: MergeLanesMain, globalConfig: GlobalConfigMain);
|
20
|
+
report([name, pattern]: [string, string], { ours, theirs, manual, autoMergeResolve, build, workspace: existingOnWorkspaceOnly, squash, noSnap, tag, message: snapMessage, keepReadme, noSquash, skipDependencyInstallation, skipFetch, includeDeps, resolveUnrelated, ignoreConfigChanges, verbose, excludeNonLaneComps, }: {
|
21
|
+
ours?: boolean;
|
22
|
+
theirs?: boolean;
|
23
|
+
manual?: boolean;
|
24
|
+
autoMergeResolve?: string;
|
25
|
+
workspace?: boolean;
|
26
|
+
build?: boolean;
|
27
|
+
noSnap: boolean;
|
28
|
+
tag: boolean;
|
29
|
+
message: string;
|
30
|
+
keepReadme?: boolean;
|
31
|
+
squash?: boolean;
|
32
|
+
noSquash: boolean;
|
33
|
+
skipDependencyInstallation?: boolean;
|
34
|
+
skipFetch: boolean;
|
35
|
+
includeDeps?: boolean;
|
36
|
+
resolveUnrelated?: string | boolean;
|
37
|
+
ignoreConfigChanges?: boolean;
|
38
|
+
verbose?: boolean;
|
39
|
+
excludeNonLaneComps?: boolean;
|
40
|
+
}): Promise<string>;
|
41
|
+
}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { CLIMain } from '@teambit/cli';
|
2
|
+
import { ImporterMain } from '@teambit/importer';
|
3
|
+
import { LanesMain } from '@teambit/lanes';
|
4
|
+
import { MergingMain, ApplyVersionResults } from '@teambit/merging';
|
5
|
+
import { Workspace } from '@teambit/workspace';
|
6
|
+
import { ComponentID } from '@teambit/component-id';
|
7
|
+
import { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';
|
8
|
+
import { ScopeMain } from '@teambit/scope';
|
9
|
+
import { LaneId } from '@teambit/lane-id';
|
10
|
+
import { ConfigMergeResult } from '@teambit/config-merger';
|
11
|
+
import { Logger, LoggerMain } from '@teambit/logger';
|
12
|
+
import { CheckoutMain, CheckoutProps } from '@teambit/checkout';
|
13
|
+
import { RemoveMain } from '@teambit/remove';
|
14
|
+
import { ExportMain } from '@teambit/export';
|
15
|
+
import { GlobalConfigMain } from '@teambit/global-config';
|
16
|
+
import { MergeAbortOpts } from './merge-abort.cmd';
|
17
|
+
export type MergeLaneOptions = {
|
18
|
+
mergeStrategy: MergeStrategy;
|
19
|
+
ours?: boolean;
|
20
|
+
theirs?: boolean;
|
21
|
+
noSnap: boolean;
|
22
|
+
snapMessage: string;
|
23
|
+
existingOnWorkspaceOnly: boolean;
|
24
|
+
build: boolean;
|
25
|
+
keepReadme: boolean;
|
26
|
+
squash?: boolean;
|
27
|
+
noSquash: boolean;
|
28
|
+
tag?: boolean;
|
29
|
+
pattern?: string;
|
30
|
+
includeDeps?: boolean;
|
31
|
+
skipDependencyInstallation?: boolean;
|
32
|
+
resolveUnrelated?: MergeStrategy;
|
33
|
+
ignoreConfigChanges?: boolean;
|
34
|
+
skipFetch?: boolean;
|
35
|
+
excludeNonLaneComps?: boolean;
|
36
|
+
shouldIncludeUpdateDependents?: boolean;
|
37
|
+
};
|
38
|
+
export type MergeFromScopeResult = {
|
39
|
+
mergedNow: ComponentID[];
|
40
|
+
exportedIds: ComponentID[];
|
41
|
+
unmerged: {
|
42
|
+
id: ComponentID;
|
43
|
+
reason: string;
|
44
|
+
}[];
|
45
|
+
conflicts?: Array<{
|
46
|
+
id: ComponentID;
|
47
|
+
files: string[];
|
48
|
+
config?: boolean;
|
49
|
+
}>;
|
50
|
+
snappedIds?: ComponentID[];
|
51
|
+
mergedPreviously: ComponentID[];
|
52
|
+
mergeSnapError?: Error;
|
53
|
+
};
|
54
|
+
export declare class MergeLanesMain {
|
55
|
+
private workspace;
|
56
|
+
private merging;
|
57
|
+
private lanes;
|
58
|
+
readonly logger: Logger;
|
59
|
+
private remove;
|
60
|
+
private scope;
|
61
|
+
private exporter;
|
62
|
+
private importer;
|
63
|
+
private checkout;
|
64
|
+
constructor(workspace: Workspace | undefined, merging: MergingMain, lanes: LanesMain, logger: Logger, remove: RemoveMain, scope: ScopeMain, exporter: ExportMain, importer: ImporterMain, checkout: CheckoutMain);
|
65
|
+
mergeLaneByCLI(laneName: string, options: MergeLaneOptions): Promise<{
|
66
|
+
mergeResults: ApplyVersionResults;
|
67
|
+
deleteResults: any;
|
68
|
+
configMergeResults: ConfigMergeResult[];
|
69
|
+
}>;
|
70
|
+
mergeLane(otherLaneId: LaneId, currentLaneId: LaneId, options: MergeLaneOptions): Promise<{
|
71
|
+
mergeResults: ApplyVersionResults;
|
72
|
+
deleteResults: any;
|
73
|
+
configMergeResults: ConfigMergeResult[];
|
74
|
+
}>;
|
75
|
+
abortLaneMerge(checkoutProps: CheckoutProps, mergeAbortOpts: MergeAbortOpts): Promise<{
|
76
|
+
checkoutResults: ApplyVersionResults | undefined;
|
77
|
+
restoredItems: string[];
|
78
|
+
checkoutError: Error | undefined;
|
79
|
+
}>;
|
80
|
+
private getMainIdsToMerge;
|
81
|
+
mergeFromScope(fromLane: string, toLane: string, options: Partial<MergeLaneOptions> & {
|
82
|
+
push?: boolean;
|
83
|
+
reMerge?: boolean;
|
84
|
+
}): Promise<MergeFromScopeResult>;
|
85
|
+
private throwIfNotUpToDate;
|
86
|
+
static slots: never[];
|
87
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
88
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
89
|
+
static provider([lanes, cli, workspace, merging, loggerMain, remove, scope, exporter, importer, checkout, globalConfig,]: [
|
90
|
+
LanesMain,
|
91
|
+
CLIMain,
|
92
|
+
Workspace,
|
93
|
+
MergingMain,
|
94
|
+
LoggerMain,
|
95
|
+
RemoveMain,
|
96
|
+
ScopeMain,
|
97
|
+
ExportMain,
|
98
|
+
ImporterMain,
|
99
|
+
CheckoutMain,
|
100
|
+
GlobalConfigMain
|
101
|
+
]): Promise<MergeLanesMain>;
|
102
|
+
}
|
103
|
+
export default MergeLanesMain;
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/merge-lanes",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.230",
|
4
4
|
"homepage": "https://bit.cloud/teambit/lanes/merge-lanes",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.lanes",
|
8
8
|
"name": "merge-lanes",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.230"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -19,25 +19,25 @@
|
|
19
19
|
"@teambit/lane-id": "0.0.311",
|
20
20
|
"@teambit/harmony": "0.4.6",
|
21
21
|
"@teambit/component-id": "1.2.0",
|
22
|
-
"@teambit/logger": "0.0.
|
23
|
-
"@teambit/scope": "1.0.
|
24
|
-
"@teambit/checkout": "1.0.
|
25
|
-
"@teambit/cli": "0.0.
|
26
|
-
"@teambit/global-config": "0.0.
|
27
|
-
"@teambit/merging": "1.0.
|
28
|
-
"@teambit/remove": "1.0.
|
29
|
-
"@teambit/config-merger": "0.0.
|
30
|
-
"@teambit/export": "1.0.
|
31
|
-
"@teambit/importer": "1.0.
|
32
|
-
"@teambit/lanes": "1.0.
|
33
|
-
"@teambit/workspace": "1.0.
|
22
|
+
"@teambit/logger": "0.0.955",
|
23
|
+
"@teambit/scope": "1.0.230",
|
24
|
+
"@teambit/checkout": "1.0.230",
|
25
|
+
"@teambit/cli": "0.0.862",
|
26
|
+
"@teambit/global-config": "0.0.865",
|
27
|
+
"@teambit/merging": "1.0.230",
|
28
|
+
"@teambit/remove": "1.0.230",
|
29
|
+
"@teambit/config-merger": "0.0.97",
|
30
|
+
"@teambit/export": "1.0.230",
|
31
|
+
"@teambit/importer": "1.0.230",
|
32
|
+
"@teambit/lanes": "1.0.230",
|
33
|
+
"@teambit/workspace": "1.0.230"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
36
|
"@types/fs-extra": "9.0.7",
|
37
37
|
"@types/lodash": "4.14.165",
|
38
38
|
"@types/mocha": "9.1.0",
|
39
39
|
"chai": "4.3.0",
|
40
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
40
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
43
|
"@teambit/legacy": "1.0.624"
|
package/tsconfig.json
CHANGED
@@ -20,8 +20,7 @@
|
|
20
20
|
"emitDeclarationOnly": true,
|
21
21
|
"strict": true,
|
22
22
|
"strictPropertyInitialization": false,
|
23
|
-
"noImplicitAny": false
|
24
|
-
"composite": true
|
23
|
+
"noImplicitAny": false
|
25
24
|
},
|
26
25
|
"exclude": [
|
27
26
|
"artifacts",
|
@@ -36,43 +35,5 @@
|
|
36
35
|
"include": [
|
37
36
|
"**/*",
|
38
37
|
"**/*.json"
|
39
|
-
],
|
40
|
-
"references": [
|
41
|
-
{
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.954"
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.228"
|
46
|
-
},
|
47
|
-
{
|
48
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_checkout@1.0.228"
|
49
|
-
},
|
50
|
-
{
|
51
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
|
52
|
-
},
|
53
|
-
{
|
54
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_global-config@0.0.864"
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_merging@1.0.228"
|
58
|
-
},
|
59
|
-
{
|
60
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_remove@1.0.228"
|
61
|
-
},
|
62
|
-
{
|
63
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_config-merger@0.0.95"
|
64
|
-
},
|
65
|
-
{
|
66
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_export@1.0.228"
|
67
|
-
},
|
68
|
-
{
|
69
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.228"
|
70
|
-
},
|
71
|
-
{
|
72
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@1.0.228"
|
73
|
-
},
|
74
|
-
{
|
75
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.228"
|
76
|
-
}
|
77
38
|
]
|
78
39
|
}
|
File without changes
|