sf-git-merge-driver 1.0.0-dev-3.13716013381-1 → 1.0.0-dev-3.13729918030-1
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 +41 -2
- package/lib/commands/git/merge/driver/run.d.ts +13 -0
- package/lib/commands/git/merge/driver/run.js +42 -0
- package/lib/commands/git/merge/driver/run.js.map +1 -0
- package/lib/constant/driverConstant.d.ts +1 -0
- package/lib/constant/driverConstant.js +1 -0
- package/lib/constant/driverConstant.js.map +1 -1
- package/lib/service/installService.js +3 -12
- package/lib/service/installService.js.map +1 -1
- package/lib/service/uninstallService.js +1 -8
- package/lib/service/uninstallService.js.map +1 -1
- package/messages/run.md +36 -0
- package/npm-shrinkwrap.json +10 -24
- package/oclif.manifest.json +108 -1
- package/package.json +2 -6
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -18
- package/lib/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ sf plugins install sf-git-merge-driver
|
|
|
19
19
|
|
|
20
20
|
<!-- commands -->
|
|
21
21
|
* [`sf git merge driver install`](#sf-git-merge-driver-install)
|
|
22
|
+
* [`sf git merge driver run`](#sf-git-merge-driver-run)
|
|
22
23
|
* [`sf git merge driver uninstall`](#sf-git-merge-driver-uninstall)
|
|
23
24
|
|
|
24
25
|
## `sf git merge driver install`
|
|
@@ -46,7 +47,45 @@ EXAMPLES
|
|
|
46
47
|
$ sf git merge driver install
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
_See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.
|
|
50
|
+
_See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.13729918030-1/src/commands/git/merge/driver/install.ts)_
|
|
51
|
+
|
|
52
|
+
## `sf git merge driver run`
|
|
53
|
+
|
|
54
|
+
Runs the merge driver for the specified files.
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
USAGE
|
|
58
|
+
$ sf git merge driver run -a <value> -o <value> -t <value> -p <value> [--json] [--flags-dir <value>]
|
|
59
|
+
|
|
60
|
+
FLAGS
|
|
61
|
+
-a, --ancestor-file=<value> (required) path to the common ancestor version of the file
|
|
62
|
+
-o, --our-file=<value> (required) path to our version of the file
|
|
63
|
+
-p, --output-file=<value> (required) path to the file where the merged content will be written
|
|
64
|
+
-t, --theirs-file=<value> (required) path to their version of the file
|
|
65
|
+
|
|
66
|
+
GLOBAL FLAGS
|
|
67
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
68
|
+
--json Format output as json.
|
|
69
|
+
|
|
70
|
+
DESCRIPTION
|
|
71
|
+
Runs the merge driver for the specified files.
|
|
72
|
+
|
|
73
|
+
Runs the merge driver for the specified files, handling the merge conflict resolution using Salesforce-specific merge
|
|
74
|
+
strategies. This command is typically called automatically by Git when a merge conflict is detected.
|
|
75
|
+
|
|
76
|
+
EXAMPLES
|
|
77
|
+
Run the merge driver for conflicting files:
|
|
78
|
+
|
|
79
|
+
$ sf git merge driver run --ancestor-file=<value> --our-file=<value> --theirs-file=<value> --output-file=<value>
|
|
80
|
+
|
|
81
|
+
Where:
|
|
82
|
+
- ancestor-file is the path to the common ancestor version of the file
|
|
83
|
+
- our-file is the path to our version of the file
|
|
84
|
+
- their-file is the path to their version of the file
|
|
85
|
+
- output-file is the path to the file where the merged content will be written
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
_See code: [src/commands/git/merge/driver/run.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.13729918030-1/src/commands/git/merge/driver/run.ts)_
|
|
50
89
|
|
|
51
90
|
## `sf git merge driver uninstall`
|
|
52
91
|
|
|
@@ -73,7 +112,7 @@ EXAMPLES
|
|
|
73
112
|
$ sf git merge driver uninstall
|
|
74
113
|
```
|
|
75
114
|
|
|
76
|
-
_See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.
|
|
115
|
+
_See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.13729918030-1/src/commands/git/merge/driver/uninstall.ts)_
|
|
77
116
|
<!-- commandsstop -->
|
|
78
117
|
|
|
79
118
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class Run extends SfCommand<void> {
|
|
3
|
+
static readonly summary: string;
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
'ancestor-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'our-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'theirs-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'output-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Messages } from '@salesforce/core';
|
|
2
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { MergeDriver } from '../../../../driver/MergeDriver.js';
|
|
4
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
5
|
+
const messages = Messages.loadMessages('sf-git-merge-driver', 'run');
|
|
6
|
+
export default class Run extends SfCommand {
|
|
7
|
+
static summary = messages.getMessage('summary');
|
|
8
|
+
static description = messages.getMessage('description');
|
|
9
|
+
static examples = messages.getMessages('examples');
|
|
10
|
+
static flags = {
|
|
11
|
+
'ancestor-file': Flags.string({
|
|
12
|
+
char: 'a',
|
|
13
|
+
summary: messages.getMessage('flags.ancestor-file.summary'),
|
|
14
|
+
required: true,
|
|
15
|
+
exists: true,
|
|
16
|
+
}),
|
|
17
|
+
'our-file': Flags.string({
|
|
18
|
+
char: 'o',
|
|
19
|
+
summary: messages.getMessage('flags.our-file.summary'),
|
|
20
|
+
required: true,
|
|
21
|
+
exists: true,
|
|
22
|
+
}),
|
|
23
|
+
'theirs-file': Flags.string({
|
|
24
|
+
char: 't',
|
|
25
|
+
summary: messages.getMessage('flags.theirs-file.summary'),
|
|
26
|
+
required: true,
|
|
27
|
+
exists: true,
|
|
28
|
+
}),
|
|
29
|
+
'output-file': Flags.string({
|
|
30
|
+
char: 'p',
|
|
31
|
+
summary: messages.getMessage('flags.output-file.summary'),
|
|
32
|
+
required: true,
|
|
33
|
+
exists: true,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
async run() {
|
|
37
|
+
const { flags } = await this.parse(Run);
|
|
38
|
+
const mergeDriver = new MergeDriver();
|
|
39
|
+
await mergeDriver.mergeFiles(flags['ancestor-file'], flags['our-file'], flags['theirs-file'], flags['output-file']);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../../src/commands/git/merge/driver/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAE/D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC5D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAA;AAEpE,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,SAAe;IACvC,MAAM,CAAmB,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IACjE,MAAM,CAAmB,WAAW,GACzC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;IAC7B,MAAM,CAAmB,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;IAEpE,MAAM,CAAmB,KAAK,GAAG;QACtC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC;YAC5B,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;YAC3D,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI;SACb,CAAC;QACF,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC;YACvB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;YACtD,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI;SACb,CAAC;QACF,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC;YAC1B,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;YACzD,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI;SACb,CAAC;QACF,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC;YAC1B,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;YACzD,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI;SACb,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACvC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;QACrC,MAAM,WAAW,CAAC,UAAU,CAC1B,KAAK,CAAC,eAAe,CAAC,EACtB,KAAK,CAAC,UAAU,CAAC,EACjB,KAAK,CAAC,aAAa,CAAC,EACpB,KAAK,CAAC,aAAa,CAAC,CACrB,CAAA;IACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverConstant.js","sourceRoot":"","sources":["../../src/constant/driverConstant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"driverConstant.js","sourceRoot":"","sources":["../../src/constant/driverConstant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAC9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAA"}
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import { appendFile
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
1
|
+
import { appendFile } from 'node:fs/promises';
|
|
4
2
|
import { simpleGit } from 'simple-git';
|
|
5
|
-
import { DRIVER_NAME } from '../constant/driverConstant.js';
|
|
6
|
-
const currentDir = fileURLToPath(new URL('.', import.meta.url));
|
|
7
|
-
const libIndexPath = join(currentDir, '../../lib/index.js');
|
|
8
|
-
const binaryPath = 'node_modules/.bin';
|
|
9
|
-
const localBinPath = `${binaryPath}/sf-git-merge-driver`;
|
|
3
|
+
import { DRIVER_NAME, RUN_PLUGIN_COMMAND } from '../constant/driverConstant.js';
|
|
10
4
|
export class InstallService {
|
|
11
5
|
async installMergeDriver() {
|
|
12
|
-
await mkdir(binaryPath, { recursive: true });
|
|
13
|
-
await copyFile(libIndexPath, localBinPath);
|
|
14
|
-
await chmod(localBinPath, 0o755);
|
|
15
6
|
const git = simpleGit();
|
|
16
7
|
await git.addConfig(`merge.${DRIVER_NAME}.name`, 'Salesforce source merge driver');
|
|
17
|
-
await git.addConfig(`merge.${DRIVER_NAME}.driver`, `${
|
|
8
|
+
await git.addConfig(`merge.${DRIVER_NAME}.driver`, `${RUN_PLUGIN_COMMAND} --ancestor-file %O --our-file %A --theirs-file %B --output-file %P`);
|
|
18
9
|
await git.addConfig(`merge.${DRIVER_NAME}.recursive`, 'true');
|
|
19
10
|
const content = ['*.xml'].map(pattern => `${pattern} merge=${DRIVER_NAME}`).join('\n') +
|
|
20
11
|
'\n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installService.js","sourceRoot":"","sources":["../../src/service/installService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"installService.js","sourceRoot":"","sources":["../../src/service/installService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAE/E,MAAM,OAAO,cAAc;IAClB,KAAK,CAAC,kBAAkB;QAC7B,MAAM,GAAG,GAAG,SAAS,EAAE,CAAA;QACvB,MAAM,GAAG,CAAC,SAAS,CACjB,SAAS,WAAW,OAAO,EAC3B,gCAAgC,CACjC,CAAA;QACD,MAAM,GAAG,CAAC,SAAS,CACjB,SAAS,WAAW,SAAS,EAC7B,GAAG,kBAAkB,qEAAqE,CAC3F,CAAA;QACD,MAAM,GAAG,CAAC,SAAS,CAAC,SAAS,WAAW,YAAY,EAAE,MAAM,CAAC,CAAA;QAE7D,MAAM,OAAO,GACX,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,UAAU,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACtE,IAAI,CAAA;QAEN,MAAM,UAAU,CAAC,gBAAgB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;IAC5D,CAAC;CACF"}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { readFile,
|
|
2
|
-
import { join } from 'node:path';
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
2
|
import { simpleGit } from 'simple-git';
|
|
4
3
|
import { DRIVER_NAME } from '../constant/driverConstant.js';
|
|
5
4
|
const MERGE_DRIVER_CONFIG = new RegExp(`.* merge\\s*=\\s*${DRIVER_NAME}$`);
|
|
6
|
-
const localBinPath = join(process.cwd(), 'node_modules/.bin/sf-git-merge-driver');
|
|
7
5
|
export class UninstallService {
|
|
8
6
|
async uninstallMergeDriver() {
|
|
9
|
-
try {
|
|
10
|
-
await unlink(localBinPath);
|
|
11
|
-
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
|
12
|
-
}
|
|
13
|
-
catch { }
|
|
14
7
|
const git = simpleGit();
|
|
15
8
|
try {
|
|
16
9
|
await git.raw(['config', '--remove-section', `merge.${DRIVER_NAME}`]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstallService.js","sourceRoot":"","sources":["../../src/service/uninstallService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"uninstallService.js","sourceRoot":"","sources":["../../src/service/uninstallService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAE3D,MAAM,mBAAmB,GAAG,IAAI,MAAM,CAAC,oBAAoB,WAAW,GAAG,CAAC,CAAA;AAE1E,MAAM,OAAO,gBAAgB;IACpB,KAAK,CAAC,oBAAoB;QAC/B,MAAM,GAAG,GAAG,SAAS,EAAE,CAAA;QACvB,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,kBAAkB,EAAE,SAAS,WAAW,EAAE,CAAC,CAAC,CAAA;YACrE,qEAAqE;QACvE,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QAEV,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,gBAAgB,EAAE;YACrD,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAA;QACF,MAAM,kBAAkB,GAAG,aAAa;aACrC,KAAK,CAAC,IAAI,CAAC;aACX,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QAClD,MAAM,SAAS,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAClE,CAAC;CACF"}
|
package/messages/run.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Runs the merge driver for the specified files.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Runs the merge driver for the specified files, handling the merge conflict resolution using Salesforce-specific merge strategies. This command is typically called automatically by Git when a merge conflict is detected.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- Run the merge driver for conflicting files:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --ancestor-file=<value> --our-file=<value> --theirs-file=<value> --output-file=<value>
|
|
14
|
+
|
|
15
|
+
- Where:
|
|
16
|
+
- ancestor-file is the path to the common ancestor version of the file
|
|
17
|
+
- our-file is the path to our version of the file
|
|
18
|
+
- their-file is the path to their version of the file
|
|
19
|
+
- output-file is the path to the file where the merged content will be written
|
|
20
|
+
|
|
21
|
+
# flags.ancestor-file.summary
|
|
22
|
+
|
|
23
|
+
path to the common ancestor version of the file
|
|
24
|
+
|
|
25
|
+
# flags.our-file.summary
|
|
26
|
+
|
|
27
|
+
path to our version of the file
|
|
28
|
+
|
|
29
|
+
# flags.theirs-file.summary
|
|
30
|
+
|
|
31
|
+
path to their version of the file
|
|
32
|
+
|
|
33
|
+
# flags.output-file.summary
|
|
34
|
+
|
|
35
|
+
path to the file where the merged content will be written
|
|
36
|
+
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-git-merge-driver",
|
|
3
|
-
"version": "1.0.0-dev-3.
|
|
3
|
+
"version": "1.0.0-dev-3.13729918030-1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "sf-git-merge-driver",
|
|
9
|
-
"version": "1.0.0-dev-3.
|
|
9
|
+
"version": "1.0.0-dev-3.13729918030-1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^4.2.8",
|
|
@@ -15,12 +15,9 @@
|
|
|
15
15
|
"fast-xml-parser": "^5.0.8",
|
|
16
16
|
"simple-git": "^3.27.0"
|
|
17
17
|
},
|
|
18
|
-
"bin": {
|
|
19
|
-
"sf-git-merge-driver": "lib/index.js"
|
|
20
|
-
},
|
|
21
18
|
"devDependencies": {
|
|
22
19
|
"@biomejs/biome": "1.9.4",
|
|
23
|
-
"@commitlint/config-conventional": "^19.
|
|
20
|
+
"@commitlint/config-conventional": "^19.8.0",
|
|
24
21
|
"@oclif/plugin-help": "^6.2.26",
|
|
25
22
|
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
26
23
|
"@salesforce/dev-config": "^4.3.1",
|
|
@@ -35,7 +32,6 @@
|
|
|
35
32
|
"oclif": "^4.17.34",
|
|
36
33
|
"shx": "^0.3.4",
|
|
37
34
|
"ts-jest": "^29.2.6",
|
|
38
|
-
"ts-jest-mock-import-meta": "^1.2.1",
|
|
39
35
|
"ts-node": "^10.9.2",
|
|
40
36
|
"tslib": "^2.8.1",
|
|
41
37
|
"typescript": "^5.8.2",
|
|
@@ -1741,13 +1737,13 @@
|
|
|
1741
1737
|
}
|
|
1742
1738
|
},
|
|
1743
1739
|
"node_modules/@commitlint/config-conventional": {
|
|
1744
|
-
"version": "19.
|
|
1745
|
-
"resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.
|
|
1746
|
-
"integrity": "sha512-
|
|
1740
|
+
"version": "19.8.0",
|
|
1741
|
+
"resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.8.0.tgz",
|
|
1742
|
+
"integrity": "sha512-9I2kKJwcAPwMoAj38hwqFXG0CzS2Kj+SAByPUQ0SlHTfb7VUhYVmo7G2w2tBrqmOf7PFd6MpZ/a1GQJo8na8kw==",
|
|
1747
1743
|
"dev": true,
|
|
1748
1744
|
"license": "MIT",
|
|
1749
1745
|
"dependencies": {
|
|
1750
|
-
"@commitlint/types": "^19.
|
|
1746
|
+
"@commitlint/types": "^19.8.0",
|
|
1751
1747
|
"conventional-changelog-conventionalcommits": "^7.0.2"
|
|
1752
1748
|
},
|
|
1753
1749
|
"engines": {
|
|
@@ -1755,9 +1751,9 @@
|
|
|
1755
1751
|
}
|
|
1756
1752
|
},
|
|
1757
1753
|
"node_modules/@commitlint/types": {
|
|
1758
|
-
"version": "19.
|
|
1759
|
-
"resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.
|
|
1760
|
-
"integrity": "sha512-
|
|
1754
|
+
"version": "19.8.0",
|
|
1755
|
+
"resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.8.0.tgz",
|
|
1756
|
+
"integrity": "sha512-LRjP623jPyf3Poyfb0ohMj8I3ORyBDOwXAgxxVPbSD0unJuW2mJWeiRfaQinjtccMqC5Wy1HOMfa4btKjbNxbg==",
|
|
1761
1757
|
"dev": true,
|
|
1762
1758
|
"license": "MIT",
|
|
1763
1759
|
"dependencies": {
|
|
@@ -13364,16 +13360,6 @@
|
|
|
13364
13360
|
}
|
|
13365
13361
|
}
|
|
13366
13362
|
},
|
|
13367
|
-
"node_modules/ts-jest-mock-import-meta": {
|
|
13368
|
-
"version": "1.2.1",
|
|
13369
|
-
"resolved": "https://registry.npmjs.org/ts-jest-mock-import-meta/-/ts-jest-mock-import-meta-1.2.1.tgz",
|
|
13370
|
-
"integrity": "sha512-+qh8ZijpFnh7nMNdw1yYrvmnhe3Rctau5a3AFtgBAtps46RSiC8SHr3Z0S9sNqCU3cNOGumCAVO7Ac65fstxRA==",
|
|
13371
|
-
"dev": true,
|
|
13372
|
-
"license": "MIT",
|
|
13373
|
-
"peerDependencies": {
|
|
13374
|
-
"ts-jest": ">=20.0.0"
|
|
13375
|
-
}
|
|
13376
|
-
},
|
|
13377
13363
|
"node_modules/ts-node": {
|
|
13378
13364
|
"version": "10.9.2",
|
|
13379
13365
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
package/oclif.manifest.json
CHANGED
|
@@ -70,6 +70,113 @@
|
|
|
70
70
|
"install:driver:merge:git"
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
|
+
"git:merge:driver:run": {
|
|
74
|
+
"aliases": [],
|
|
75
|
+
"args": {},
|
|
76
|
+
"description": "Runs the merge driver for the specified files, handling the merge conflict resolution using Salesforce-specific merge strategies. This command is typically called automatically by Git when a merge conflict is detected.",
|
|
77
|
+
"examples": [
|
|
78
|
+
"Run the merge driver for conflicting files:\n<%= config.bin %> <%= command.id %> --ancestor-file=<value> --our-file=<value> --theirs-file=<value> --output-file=<value>",
|
|
79
|
+
"Where:\n- ancestor-file is the path to the common ancestor version of the file\n- our-file is the path to our version of the file\n- their-file is the path to their version of the file\n- output-file is the path to the file where the merged content will be written"
|
|
80
|
+
],
|
|
81
|
+
"flags": {
|
|
82
|
+
"json": {
|
|
83
|
+
"description": "Format output as json.",
|
|
84
|
+
"helpGroup": "GLOBAL",
|
|
85
|
+
"name": "json",
|
|
86
|
+
"allowNo": false,
|
|
87
|
+
"type": "boolean"
|
|
88
|
+
},
|
|
89
|
+
"flags-dir": {
|
|
90
|
+
"helpGroup": "GLOBAL",
|
|
91
|
+
"name": "flags-dir",
|
|
92
|
+
"summary": "Import flag values from a directory.",
|
|
93
|
+
"hasDynamicHelp": false,
|
|
94
|
+
"multiple": false,
|
|
95
|
+
"type": "option"
|
|
96
|
+
},
|
|
97
|
+
"ancestor-file": {
|
|
98
|
+
"char": "a",
|
|
99
|
+
"name": "ancestor-file",
|
|
100
|
+
"required": true,
|
|
101
|
+
"summary": "path to the common ancestor version of the file",
|
|
102
|
+
"hasDynamicHelp": false,
|
|
103
|
+
"multiple": false,
|
|
104
|
+
"type": "option"
|
|
105
|
+
},
|
|
106
|
+
"our-file": {
|
|
107
|
+
"char": "o",
|
|
108
|
+
"name": "our-file",
|
|
109
|
+
"required": true,
|
|
110
|
+
"summary": "path to our version of the file",
|
|
111
|
+
"hasDynamicHelp": false,
|
|
112
|
+
"multiple": false,
|
|
113
|
+
"type": "option"
|
|
114
|
+
},
|
|
115
|
+
"theirs-file": {
|
|
116
|
+
"char": "t",
|
|
117
|
+
"name": "theirs-file",
|
|
118
|
+
"required": true,
|
|
119
|
+
"summary": "path to their version of the file",
|
|
120
|
+
"hasDynamicHelp": false,
|
|
121
|
+
"multiple": false,
|
|
122
|
+
"type": "option"
|
|
123
|
+
},
|
|
124
|
+
"output-file": {
|
|
125
|
+
"char": "p",
|
|
126
|
+
"name": "output-file",
|
|
127
|
+
"required": true,
|
|
128
|
+
"summary": "path to the file where the merged content will be written",
|
|
129
|
+
"hasDynamicHelp": false,
|
|
130
|
+
"multiple": false,
|
|
131
|
+
"type": "option"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"hasDynamicHelp": false,
|
|
135
|
+
"hiddenAliases": [],
|
|
136
|
+
"id": "git:merge:driver:run",
|
|
137
|
+
"pluginAlias": "sf-git-merge-driver",
|
|
138
|
+
"pluginName": "sf-git-merge-driver",
|
|
139
|
+
"pluginType": "core",
|
|
140
|
+
"strict": true,
|
|
141
|
+
"summary": "Runs the merge driver for the specified files.",
|
|
142
|
+
"enableJsonFlag": true,
|
|
143
|
+
"isESM": true,
|
|
144
|
+
"relativePath": [
|
|
145
|
+
"lib",
|
|
146
|
+
"commands",
|
|
147
|
+
"git",
|
|
148
|
+
"merge",
|
|
149
|
+
"driver",
|
|
150
|
+
"run.js"
|
|
151
|
+
],
|
|
152
|
+
"aliasPermutations": [],
|
|
153
|
+
"permutations": [
|
|
154
|
+
"git:merge:driver:run",
|
|
155
|
+
"merge:git:driver:run",
|
|
156
|
+
"merge:driver:git:run",
|
|
157
|
+
"merge:driver:run:git",
|
|
158
|
+
"git:driver:merge:run",
|
|
159
|
+
"driver:git:merge:run",
|
|
160
|
+
"driver:merge:git:run",
|
|
161
|
+
"driver:merge:run:git",
|
|
162
|
+
"git:driver:run:merge",
|
|
163
|
+
"driver:git:run:merge",
|
|
164
|
+
"driver:run:git:merge",
|
|
165
|
+
"driver:run:merge:git",
|
|
166
|
+
"git:merge:run:driver",
|
|
167
|
+
"merge:git:run:driver",
|
|
168
|
+
"merge:run:git:driver",
|
|
169
|
+
"merge:run:driver:git",
|
|
170
|
+
"git:run:merge:driver",
|
|
171
|
+
"run:git:merge:driver",
|
|
172
|
+
"run:merge:git:driver",
|
|
173
|
+
"run:merge:driver:git",
|
|
174
|
+
"git:run:driver:merge",
|
|
175
|
+
"run:git:driver:merge",
|
|
176
|
+
"run:driver:git:merge",
|
|
177
|
+
"run:driver:merge:git"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
73
180
|
"git:merge:driver:uninstall": {
|
|
74
181
|
"aliases": [],
|
|
75
182
|
"args": {},
|
|
@@ -141,5 +248,5 @@
|
|
|
141
248
|
]
|
|
142
249
|
}
|
|
143
250
|
},
|
|
144
|
-
"version": "1.0.0-dev-3.
|
|
251
|
+
"version": "1.0.0-dev-3.13729918030-1"
|
|
145
252
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-git-merge-driver",
|
|
3
3
|
"description": "git remote add origin git@github.com:scolladon/sf-git-merge-driver.git",
|
|
4
|
-
"version": "1.0.0-dev-3.
|
|
4
|
+
"version": "1.0.0-dev-3.13729918030-1",
|
|
5
5
|
"exports": "./lib/driver/MergeDriver.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"sf-git-merge-driver": "./lib/index.js"
|
|
8
|
-
},
|
|
9
6
|
"type": "module",
|
|
10
7
|
"author": "Sébastien Colladon (colladonsebastien@gmail.com)",
|
|
11
8
|
"repository": {
|
|
@@ -21,7 +18,7 @@
|
|
|
21
18
|
},
|
|
22
19
|
"devDependencies": {
|
|
23
20
|
"@biomejs/biome": "1.9.4",
|
|
24
|
-
"@commitlint/config-conventional": "^19.
|
|
21
|
+
"@commitlint/config-conventional": "^19.8.0",
|
|
25
22
|
"@oclif/plugin-help": "^6.2.26",
|
|
26
23
|
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
27
24
|
"@salesforce/dev-config": "^4.3.1",
|
|
@@ -36,7 +33,6 @@
|
|
|
36
33
|
"oclif": "^4.17.34",
|
|
37
34
|
"shx": "^0.3.4",
|
|
38
35
|
"ts-jest": "^29.2.6",
|
|
39
|
-
"ts-jest-mock-import-meta": "^1.2.1",
|
|
40
36
|
"ts-node": "^10.9.2",
|
|
41
37
|
"tslib": "^2.8.1",
|
|
42
38
|
"typescript": "^5.8.2",
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S NODE_OPTIONS="--no-warnings=ExperimentalWarning" npx ts-node --project tsconfig.json --esm
|
|
2
|
-
import { MergeDriver } from './driver/MergeDriver.js';
|
|
3
|
-
if (process.argv.length >= 6) {
|
|
4
|
-
const [, , ancestorFile, ourFile, theirFile, outputFile] = process.argv;
|
|
5
|
-
const mergeDriver = new MergeDriver();
|
|
6
|
-
mergeDriver
|
|
7
|
-
.mergeFiles(ancestorFile, ourFile, theirFile, outputFile)
|
|
8
|
-
.then(() => process.exit(0));
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
console.error('Usage: sf-git-merge-driver %O %A %B %P');
|
|
12
|
-
console.error(' %O: ancestor file');
|
|
13
|
-
console.error(' %A: our file');
|
|
14
|
-
console.error(' %B: their file');
|
|
15
|
-
console.error(' %P: output file path');
|
|
16
|
-
process.exit(1);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,AAAD,EAAG,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;IACvE,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;IACrC,WAAW;SACR,UAAU,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;SACxD,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACvD,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACpC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IACjC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC"}
|