sf-git-merge-driver 1.2.1-dev-137.18912696828-1 → 1.2.1-dev-148.20575858150-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 +10 -4
- package/lib/constant/gitConstant.d.ts +1 -0
- package/lib/constant/gitConstant.js +1 -0
- package/lib/constant/gitConstant.js.map +1 -1
- package/lib/service/uninstallService.js +6 -5
- package/lib/service/uninstallService.js.map +1 -1
- package/npm-shrinkwrap.json +1153 -1121
- package/oclif.manifest.json +1 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
An intelligent Git merge driver specifically designed for Salesforce metadata files. **Eliminates hours** of manual merge conflicts resolution.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Demo
|
|
9
|
+
|
|
10
|
+
### Without sf-git-merge-driver
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
### With sf-git-merge-driver
|
|
14
|
+

|
|
9
15
|
|
|
10
16
|
## Why use this plugin?
|
|
11
17
|
|
|
@@ -188,7 +194,7 @@ EXAMPLES
|
|
|
188
194
|
$ sf git merge driver install
|
|
189
195
|
```
|
|
190
196
|
|
|
191
|
-
_See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-
|
|
197
|
+
_See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-148.20575858150-1/src/commands/git/merge/driver/install.ts)_
|
|
192
198
|
|
|
193
199
|
## `sf git merge driver run`
|
|
194
200
|
|
|
@@ -232,7 +238,7 @@ EXAMPLES
|
|
|
232
238
|
- output-file is the path to the file where the merged content will be written
|
|
233
239
|
```
|
|
234
240
|
|
|
235
|
-
_See code: [src/commands/git/merge/driver/run.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-
|
|
241
|
+
_See code: [src/commands/git/merge/driver/run.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-148.20575858150-1/src/commands/git/merge/driver/run.ts)_
|
|
236
242
|
|
|
237
243
|
## `sf git merge driver uninstall`
|
|
238
244
|
|
|
@@ -259,7 +265,7 @@ EXAMPLES
|
|
|
259
265
|
$ sf git merge driver uninstall
|
|
260
266
|
```
|
|
261
267
|
|
|
262
|
-
_See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-
|
|
268
|
+
_See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.2.1-dev-148.20575858150-1/src/commands/git/merge/driver/uninstall.ts)_
|
|
263
269
|
<!-- commandsstop -->
|
|
264
270
|
## Changelog
|
|
265
271
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitConstant.js","sourceRoot":"","sources":["../../src/constant/gitConstant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"gitConstant.js","sourceRoot":"","sources":["../../src/constant/gitConstant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAA;AACzD,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA"}
|
|
@@ -2,26 +2,27 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { simpleGit } from 'simple-git';
|
|
4
4
|
import { DRIVER_NAME } from '../constant/driverConstant.js';
|
|
5
|
+
import { GIT_EOL } from '../constant/gitConstant.js';
|
|
5
6
|
import { getGitAttributesPath } from '../utils/gitUtils.js';
|
|
6
7
|
import { log } from '../utils/LoggingDecorator.js';
|
|
7
8
|
import { Logger } from '../utils/LoggingService.js';
|
|
8
9
|
// This match lines like: "*.profile-meta.xml merge=sf-git-merge-driver"
|
|
9
|
-
const MERGE_DRIVER_CONFIG = new RegExp(`.*\s+merge\s*=\s*${DRIVER_NAME}
|
|
10
|
+
const MERGE_DRIVER_CONFIG = new RegExp(String.raw `.*\s+merge\s*=\s*${DRIVER_NAME}\s*$`);
|
|
10
11
|
export class UninstallService {
|
|
11
12
|
async uninstallMergeDriver() {
|
|
12
13
|
const git = simpleGit();
|
|
13
14
|
try {
|
|
14
|
-
//
|
|
15
|
+
// Throws when the merge driver is not installed
|
|
15
16
|
await git.raw(['config', '--remove-section', `merge.${DRIVER_NAME}`]);
|
|
16
17
|
const gitAttributesPath = await getGitAttributesPath();
|
|
17
|
-
//
|
|
18
|
+
// Throws when the file does not exist
|
|
18
19
|
const gitAttributes = await readFile(gitAttributesPath, {
|
|
19
20
|
encoding: 'utf8',
|
|
20
21
|
});
|
|
21
22
|
const filteredAttributes = gitAttributes
|
|
22
|
-
.split(
|
|
23
|
+
.split(GIT_EOL)
|
|
23
24
|
.filter(line => !MERGE_DRIVER_CONFIG.test(line));
|
|
24
|
-
await writeFile(gitAttributesPath, filteredAttributes.join(
|
|
25
|
+
await writeFile(gitAttributesPath, filteredAttributes.join(GIT_EOL));
|
|
25
26
|
}
|
|
26
27
|
catch (error) {
|
|
27
28
|
Logger.error('Merge driver uninstallation failed', error);
|
|
@@ -1 +1 @@
|
|
|
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;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEnD,wEAAwE;AACxE,MAAM,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