sfdx-git-delta 6.41.1 → 6.42.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 +35 -3
- package/lib/adapter/GitAdapter.d.ts +4 -1
- package/lib/adapter/GitAdapter.js +113 -59
- package/lib/adapter/GitAdapter.js.map +1 -1
- package/lib/adapter/gitBatchCatFile.d.ts +4 -1
- package/lib/adapter/gitBatchCatFile.js +30 -8
- package/lib/adapter/gitBatchCatFile.js.map +1 -1
- package/lib/adapter/treeIndex.d.ts +18 -0
- package/lib/adapter/treeIndex.js +75 -0
- package/lib/adapter/treeIndex.js.map +1 -0
- package/lib/commands/sgd/source/delta.d.ts +2 -0
- package/lib/commands/sgd/source/delta.js +31 -1
- package/lib/commands/sgd/source/delta.js.map +1 -1
- package/lib/constant/cliConstants.d.ts +2 -0
- package/lib/constant/cliConstants.js +4 -0
- package/lib/constant/cliConstants.js.map +1 -1
- package/lib/constant/gitConstants.d.ts +1 -0
- package/lib/constant/gitConstants.js +4 -0
- package/lib/constant/gitConstants.js.map +1 -1
- package/lib/main.js +14 -4
- package/lib/main.js.map +1 -1
- package/lib/metadata/MetadataRepository.d.ts +1 -0
- package/lib/metadata/MetadataRepositoryImpl.d.ts +1 -0
- package/lib/metadata/MetadataRepositoryImpl.js +13 -12
- package/lib/metadata/MetadataRepositoryImpl.js.map +1 -1
- package/lib/metadata/metadataManager.js +22 -14
- package/lib/metadata/metadataManager.js.map +1 -1
- package/lib/post-processor/changesManifestProcessor.d.ts +15 -0
- package/lib/post-processor/changesManifestProcessor.js +50 -0
- package/lib/post-processor/changesManifestProcessor.js.map +1 -0
- package/lib/post-processor/flowTranslationProcessor.d.ts +2 -1
- package/lib/post-processor/flowTranslationProcessor.js +12 -4
- package/lib/post-processor/flowTranslationProcessor.js.map +1 -1
- package/lib/post-processor/packageGenerator.d.ts +0 -2
- package/lib/post-processor/packageGenerator.js +7 -18
- package/lib/post-processor/packageGenerator.js.map +1 -1
- package/lib/post-processor/postProcessorManager.js +6 -1
- package/lib/post-processor/postProcessorManager.js.map +1 -1
- package/lib/service/botHandler.js +1 -0
- package/lib/service/botHandler.js.map +1 -1
- package/lib/service/inBundleHandler.js +7 -1
- package/lib/service/inBundleHandler.js.map +1 -1
- package/lib/service/inFileHandler.d.ts +2 -2
- package/lib/service/inFileHandler.js +7 -5
- package/lib/service/inFileHandler.js.map +1 -1
- package/lib/service/inResourceHandler.js +9 -1
- package/lib/service/inResourceHandler.js.map +1 -1
- package/lib/service/reportingFolderHandler.d.ts +5 -2
- package/lib/service/reportingFolderHandler.js +5 -2
- package/lib/service/reportingFolderHandler.js.map +1 -1
- package/lib/service/sharedFolderHandler.d.ts +5 -2
- package/lib/service/sharedFolderHandler.js +5 -2
- package/lib/service/sharedFolderHandler.js.map +1 -1
- package/lib/service/standardHandler.d.ts +8 -2
- package/lib/service/standardHandler.js +21 -3
- package/lib/service/standardHandler.js.map +1 -1
- package/lib/service/typeHandlerFactory.d.ts +1 -2
- package/lib/service/typeHandlerFactory.js +8 -9
- package/lib/service/typeHandlerFactory.js.map +1 -1
- package/lib/types/config.d.ts +1 -0
- package/lib/types/handlerResult.d.ts +8 -0
- package/lib/types/handlerResult.js +7 -0
- package/lib/types/handlerResult.js.map +1 -1
- package/lib/types/work.d.ts +2 -5
- package/lib/utils/LoggingDecorator.d.ts +1 -1
- package/lib/utils/LoggingDecorator.js +26 -10
- package/lib/utils/LoggingDecorator.js.map +1 -1
- package/lib/utils/changeSet.d.ts +48 -0
- package/lib/utils/changeSet.js +173 -0
- package/lib/utils/changeSet.js.map +1 -0
- package/lib/utils/configValidator.d.ts +1 -0
- package/lib/utils/configValidator.js +43 -7
- package/lib/utils/configValidator.js.map +1 -1
- package/lib/utils/fsHelper.d.ts +1 -0
- package/lib/utils/fsHelper.js +3 -0
- package/lib/utils/fsHelper.js.map +1 -1
- package/lib/utils/ignoreHelper.d.ts +2 -0
- package/lib/utils/ignoreHelper.js +21 -19
- package/lib/utils/ignoreHelper.js.map +1 -1
- package/lib/utils/metadataDiff.d.ts +1 -0
- package/lib/utils/metadataDiff.js +24 -9
- package/lib/utils/metadataDiff.js.map +1 -1
- package/lib/utils/metadataElement.js +1 -3
- package/lib/utils/metadataElement.js.map +1 -1
- package/lib/utils/packageHelper.js +7 -3
- package/lib/utils/packageHelper.js.map +1 -1
- package/lib/utils/renameResolver.d.ts +19 -0
- package/lib/utils/renameResolver.js +52 -0
- package/lib/utils/renameResolver.js.map +1 -0
- package/lib/utils/repoGitDiff.d.ts +7 -0
- package/lib/utils/repoGitDiff.js +37 -8
- package/lib/utils/repoGitDiff.js.map +1 -1
- package/lib/utils/xmlHelper.js +7 -5
- package/lib/utils/xmlHelper.js.map +1 -1
- package/messages/delta.md +12 -0
- package/npm-shrinkwrap.json +482 -498
- package/oclif.manifest.json +9 -1
- package/package.json +19 -16
- package/lib/utils/manifestAggregator.d.ts +0 -3
- package/lib/utils/manifestAggregator.js +0 -22
- package/lib/utils/manifestAggregator.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[](https://badgen.net/npm/v/sfdx-git-delta)
|
|
5
5
|
[](https://codeclimate.com/github/scolladon/sfdx-git-delta/maintainability)
|
|
6
6
|
[](https://codecov.io/gh/scolladon/sfdx-git-delta)
|
|
7
|
-
[](https://snyk.io//test/github/scolladon/sfdx-git-delta?targetFile=package.json)
|
|
8
7
|
[](https://badgen.net/npm/dw/sfdx-git-delta)
|
|
9
8
|

|
|
10
9
|
|
|
@@ -150,7 +149,7 @@ Generate incremental package manifest and source content
|
|
|
150
149
|
```
|
|
151
150
|
USAGE
|
|
152
151
|
$ sf sgd source delta -f <value> [--json] [--flags-dir <value>] [-t <value>] [-d] [-o <value>] [-r <value>] [-s
|
|
153
|
-
<value>...] [-i <value>] [-D <value>] [-n <value>] [-N <value>] [-M <value>] [-W] [-a <value>]
|
|
152
|
+
<value>...] [-i <value>] [-D <value>] [-n <value>] [-N <value>] [-M <value>] [-c <value>] [-W] [-a <value>]
|
|
154
153
|
|
|
155
154
|
FLAGS
|
|
156
155
|
-D, --ignore-destructive-file=<value> file listing paths to explicitly ignore for any destructive actions
|
|
@@ -159,6 +158,8 @@ FLAGS
|
|
|
159
158
|
-W, --ignore-whitespace ignore git diff whitespace (space, tab, eol) changes
|
|
160
159
|
-a, --api-version=<value> salesforce metadata API version, default to sfdx-project.json
|
|
161
160
|
"sourceApiVersion" attribute or latest version
|
|
161
|
+
-c, --changes-manifest=<value> path to a JSON file grouping changed components by kind (add, modify,
|
|
162
|
+
delete, rename); setting this flag also enables git rename detection
|
|
162
163
|
-d, --generate-delta generate delta files in [--output-dir] folder
|
|
163
164
|
-f, --from=<value> (required) commit sha from where the diff is done
|
|
164
165
|
-i, --ignore-file=<value> file listing paths to explicitly ignore for any diff actions
|
|
@@ -201,7 +202,7 @@ FLAG DESCRIPTIONS
|
|
|
201
202
|
of a diff, in which case changes may still be picked up.
|
|
202
203
|
```
|
|
203
204
|
|
|
204
|
-
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v6.
|
|
205
|
+
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v6.42.0/src/commands/sgd/source/delta.ts)_
|
|
205
206
|
<!-- commandsstop -->
|
|
206
207
|
|
|
207
208
|
### Windows users
|
|
@@ -519,6 +520,37 @@ To cover this need, parse the content of the package.xml file produced by SGD us
|
|
|
519
520
|
|
|
520
521
|
`xq . < package/package.xml | jq '.Package.types | [.] | flatten | map(select(.name=="ApexClass")) | .[] | .members | [.] | flatten | map(select(. | index("*") | not)) | unique | join(",")'`
|
|
521
522
|
|
|
523
|
+
### Review-centric: list components by change kind
|
|
524
|
+
|
|
525
|
+
Package managers (1GP, unlocked, managed) and release reviewers often need to distinguish **newly added** components from **modified** ones — adding a new component to a managed package is a 1-way door that binds all subscribers. SGD groups `git diff` into Salesforce components, but its `package.xml` bundles additions and modifications together (as required for deployment).
|
|
526
|
+
|
|
527
|
+
Use `--changes-manifest [-c]` to emit an additional JSON file that groups components by change kind. The file is written alongside `package.xml` / `destructiveChanges.xml` (no changes to the deployment manifests themselves).
|
|
528
|
+
|
|
529
|
+
Two forms:
|
|
530
|
+
|
|
531
|
+
```sh
|
|
532
|
+
# Bare flag: writes to <output-dir>/changes.manifest.json
|
|
533
|
+
sf sgd source delta --from "origin/development" --to HEAD --output-dir incremental --changes-manifest
|
|
534
|
+
|
|
535
|
+
# Explicit path: resolved against cwd (or used as-is when absolute), same as --ignore-file
|
|
536
|
+
sf sgd source delta --from "origin/development" --to HEAD --changes-manifest reports/changes.json
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Produces (bare form example) `incremental/changes.manifest.json`. Setting `--changes-manifest` also turns on git's `-M` rename detection for this run, so components renamed at the file level show up in their own bucket instead of being split into a fake delete+add pair. Default sgd runs (without the flag) keep the pre-feature behaviour — renames still appear as a delete on the old path + an add on the new path.
|
|
540
|
+
|
|
541
|
+
```json
|
|
542
|
+
{
|
|
543
|
+
"add": { "ApexClass": ["BrandNewClass"], "CustomObject": ["NewObject__c"] },
|
|
544
|
+
"modify": { "ApexClass": ["ExistingClass"], "CustomLabels": ["MyApp.Label1"] },
|
|
545
|
+
"delete": { "ApexTrigger": ["OldTrigger"] },
|
|
546
|
+
"rename": { "ApexClass": [{ "from": "OldName", "to": "NewName" }] }
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
`package.xml` still lists `NewName` and `destructiveChanges.xml` still lists `OldName` for renames — the deployment contract is unchanged.
|
|
551
|
+
|
|
552
|
+
Works for file-backed metadata, in-file sub-components (CustomLabels members, Workflow rules, etc.), decomposed metadata, in-resource bundles and in-folder metadata.
|
|
553
|
+
|
|
522
554
|
### Condition deployment on package.xml and destructiveChange content
|
|
523
555
|
|
|
524
556
|
SGD does not always generate content in the package.xml (or destructiveChanges.xml). Sometimes the commit range contains changes only within files to ignore (using .sgdignore and `--i` parameter).
|
|
@@ -2,12 +2,14 @@ import { SimpleGit } from 'simple-git';
|
|
|
2
2
|
import type { Config } from '../types/config.js';
|
|
3
3
|
import type { FileGitRef } from '../types/git.js';
|
|
4
4
|
import { GitBatchCatFile } from './gitBatchCatFile.js';
|
|
5
|
+
import { TreeIndex } from './treeIndex.js';
|
|
5
6
|
export default class GitAdapter {
|
|
6
7
|
protected readonly config: Config;
|
|
7
8
|
private static instances;
|
|
9
|
+
private static keyFor;
|
|
8
10
|
static getInstance(config: Config): GitAdapter;
|
|
9
11
|
protected readonly simpleGit: SimpleGit;
|
|
10
|
-
protected readonly treeIndex: Map<string,
|
|
12
|
+
protected readonly treeIndex: Map<string, TreeIndex>;
|
|
11
13
|
protected batchCatFile: GitBatchCatFile | null;
|
|
12
14
|
private constructor();
|
|
13
15
|
protected getBatchCatFile(): GitBatchCatFile;
|
|
@@ -26,4 +28,5 @@ export default class GitAdapter {
|
|
|
26
28
|
listDirAtRevision(dir: string, revision: string): Promise<string[]>;
|
|
27
29
|
gitGrep(pattern: string, path: string | string[], revision?: string): Promise<string[]>;
|
|
28
30
|
getDiffLines(): Promise<string[]>;
|
|
31
|
+
protected _getNumstatLines(changeType: string, detectRenames: boolean): Promise<string[]>;
|
|
29
32
|
}
|
|
@@ -2,8 +2,9 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path/posix';
|
|
4
4
|
import { simpleGit } from 'simple-git';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { TAB } from '../constant/cliConstants.js';
|
|
6
|
+
import { UTF8_ENCODING } from '../constant/fsConstants.js';
|
|
7
|
+
import { ADDITION, DELETION, HEAD, IGNORE_WHITESPACE_PARAMS, MODIFICATION, NUM_STAT_CHANGE_INFORMATION, RENAMED, } from '../constant/gitConstants.js';
|
|
7
8
|
import { pushAll } from '../utils/arrayUtils.js';
|
|
8
9
|
import { getErrorMessage } from '../utils/errorUtils.js';
|
|
9
10
|
import { treatPathSep } from '../utils/fsUtils.js';
|
|
@@ -11,17 +12,24 @@ import { getLFSObjectContentPath, isLFS } from '../utils/gitLfsHelper.js';
|
|
|
11
12
|
import { log } from '../utils/LoggingDecorator.js';
|
|
12
13
|
import { Logger, lazy } from '../utils/LoggingService.js';
|
|
13
14
|
import { GitBatchCatFile } from './gitBatchCatFile.js';
|
|
14
|
-
|
|
15
|
+
import { TreeIndex } from './treeIndex.js';
|
|
16
|
+
const EOL = /\r?\n/;
|
|
15
17
|
const ROOT_PATHS = new Set(['', '.', './']);
|
|
16
18
|
export default class GitAdapter {
|
|
17
19
|
config;
|
|
18
20
|
static instances = new Map();
|
|
21
|
+
// Keyed by repo+to so spread copies of the same config (e.g. ioExecutor's
|
|
22
|
+
// per-revision {...config, to: rev}) share one adapter instead of spawning
|
|
23
|
+
// a fresh git cat-file subprocess per call.
|
|
24
|
+
static keyFor(config) {
|
|
25
|
+
return `${config.repo}\0${config.to}`;
|
|
26
|
+
}
|
|
19
27
|
static getInstance(config) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
GitAdapter.instances.set(
|
|
28
|
+
const key = GitAdapter.keyFor(config);
|
|
29
|
+
if (!GitAdapter.instances.has(key)) {
|
|
30
|
+
GitAdapter.instances.set(key, new GitAdapter(config));
|
|
23
31
|
}
|
|
24
|
-
return GitAdapter.instances.get(
|
|
32
|
+
return GitAdapter.instances.get(key);
|
|
25
33
|
}
|
|
26
34
|
simpleGit;
|
|
27
35
|
treeIndex;
|
|
@@ -64,31 +72,24 @@ export default class GitAdapter {
|
|
|
64
72
|
args.push('--', ...scopePaths);
|
|
65
73
|
}
|
|
66
74
|
const output = await this.simpleGit.raw(args);
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
const index = new TreeIndex();
|
|
76
|
+
for (const line of output.split(EOL)) {
|
|
77
|
+
if (line)
|
|
78
|
+
index.add(treatPathSep(line));
|
|
79
|
+
}
|
|
80
|
+
this.treeIndex.set(revision, index);
|
|
72
81
|
}
|
|
73
82
|
catch (error) {
|
|
74
83
|
Logger.debug(lazy `preBuildTreeIndex: scoped ls-tree for '${revision}' failed: ${() => getErrorMessage(error)}`);
|
|
75
84
|
}
|
|
76
85
|
}
|
|
77
86
|
pathExistsImpl(path, revision) {
|
|
78
|
-
const index = this.treeIndex.get(revision)
|
|
79
|
-
if (
|
|
87
|
+
const index = this.treeIndex.get(revision);
|
|
88
|
+
if (!index)
|
|
89
|
+
return false;
|
|
90
|
+
if (ROOT_PATHS.has(path))
|
|
80
91
|
return index.size > 0;
|
|
81
|
-
|
|
82
|
-
if (index.has(path)) {
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
const dirPrefix = `${path}${PATH_SEP}`;
|
|
86
|
-
for (const filePath of index) {
|
|
87
|
-
if (filePath.startsWith(dirPrefix)) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
+
return index.hasPath(path);
|
|
92
93
|
}
|
|
93
94
|
async pathExists(path, revision = this.config.to) {
|
|
94
95
|
return this.pathExistsImpl(path, revision);
|
|
@@ -109,21 +110,14 @@ export default class GitAdapter {
|
|
|
109
110
|
return content.toString(UTF8_ENCODING);
|
|
110
111
|
}
|
|
111
112
|
getFilesPathCached(path, revision) {
|
|
112
|
-
const index = this.treeIndex.get(revision)
|
|
113
|
-
if (
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
const index = this.treeIndex.get(revision);
|
|
114
|
+
if (!index)
|
|
115
|
+
return [];
|
|
116
|
+
if (ROOT_PATHS.has(path))
|
|
117
|
+
return index.allPaths();
|
|
118
|
+
if (index.has(path))
|
|
117
119
|
return [path];
|
|
118
|
-
|
|
119
|
-
const dirPrefix = `${path}${PATH_SEP}`;
|
|
120
|
-
const result = [];
|
|
121
|
-
for (const filePath of index) {
|
|
122
|
-
if (filePath.startsWith(dirPrefix)) {
|
|
123
|
-
result.push(filePath);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return result;
|
|
120
|
+
return index.getFilesUnder(path);
|
|
127
121
|
}
|
|
128
122
|
async getFilesPath(paths, revision = this.config.to) {
|
|
129
123
|
if (typeof paths === 'string') {
|
|
@@ -131,23 +125,15 @@ export default class GitAdapter {
|
|
|
131
125
|
}
|
|
132
126
|
const result = [];
|
|
133
127
|
for (const path of paths) {
|
|
134
|
-
|
|
135
|
-
pushAll(result, filesPath);
|
|
128
|
+
pushAll(result, this.getFilesPathCached(path, revision));
|
|
136
129
|
}
|
|
137
130
|
return result;
|
|
138
131
|
}
|
|
139
132
|
async listDirAtRevision(dir, revision) {
|
|
140
|
-
const index = this.treeIndex.get(revision)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (filePath.startsWith(dirPrefix)) {
|
|
145
|
-
const rest = filePath.slice(dirPrefix.length);
|
|
146
|
-
const firstSegment = rest.split(PATH_SEP)[0];
|
|
147
|
-
children.add(firstSegment);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return Array.from(children);
|
|
133
|
+
const index = this.treeIndex.get(revision);
|
|
134
|
+
if (!index)
|
|
135
|
+
return [];
|
|
136
|
+
return index.listChildren(dir);
|
|
151
137
|
}
|
|
152
138
|
async gitGrep(pattern, path, revision = this.config.to) {
|
|
153
139
|
try {
|
|
@@ -170,14 +156,35 @@ export default class GitAdapter {
|
|
|
170
156
|
return [];
|
|
171
157
|
}
|
|
172
158
|
}
|
|
159
|
+
// Fast path (no whitespace ignore): one `git diff --name-status` call.
|
|
160
|
+
// Rename detection (`-M` + `R` filter) is gated behind
|
|
161
|
+
// `config.changesManifest` so the default sgd pipeline emits the same
|
|
162
|
+
// A/M/D line shape as before this feature. When enabled, renames surface
|
|
163
|
+
// as `R<score>\tfrom\tto` lines that RepoGitDiff splits into synthetic
|
|
164
|
+
// A/D while recording the rename pair for ChangeSet.
|
|
165
|
+
//
|
|
166
|
+
// Whitespace path: three (or four, when rename detection is on) parallel
|
|
167
|
+
// `git diff --numstat` calls, one per --diff-filter. `--name-status` does
|
|
168
|
+
// NOT honor `--ignore-all-space` (git decides A/M/D from blob SHAs for
|
|
169
|
+
// that mode, so a whitespace-only change still appears as `M`). Only
|
|
170
|
+
// `--numstat` computes a real content diff under the whitespace flags,
|
|
171
|
+
// so files with 0/0 line changes drop out naturally. When rename
|
|
172
|
+
// detection is enabled the R call uses `-z` so it can sidestep numstat's
|
|
173
|
+
// brace/arrow rename-path encoding.
|
|
174
|
+
//
|
|
175
|
+
// The Promise.all fans out to 4 items with rename detection on. That's a
|
|
176
|
+
// localised exception to the CLAUDE.local.md ≤3 bounded-Promise.all
|
|
177
|
+
// guideline: the four `--diff-filter`s are the canonical per-kind split,
|
|
178
|
+
// so hiding R as an out-of-band sequential await just obscures the real
|
|
179
|
+
// symmetric fan-out without changing the resource footprint.
|
|
173
180
|
async getDiffLines() {
|
|
174
|
-
const
|
|
181
|
+
const detectRenames = Boolean(this.config.changesManifest);
|
|
182
|
+
if (!this.config.ignoreWhitespace) {
|
|
175
183
|
const output = await this.simpleGit.raw([
|
|
176
184
|
'diff',
|
|
177
|
-
'--
|
|
178
|
-
'--no-renames',
|
|
179
|
-
|
|
180
|
-
`--diff-filter=${changeType}`,
|
|
185
|
+
'--name-status',
|
|
186
|
+
...(detectRenames ? ['-M'] : ['--no-renames']),
|
|
187
|
+
`--diff-filter=${detectRenames ? 'AMDR' : 'AMD'}`,
|
|
181
188
|
this.config.from,
|
|
182
189
|
this.config.to,
|
|
183
190
|
'--',
|
|
@@ -186,10 +193,57 @@ export default class GitAdapter {
|
|
|
186
193
|
return output
|
|
187
194
|
.split(EOL)
|
|
188
195
|
.filter(Boolean)
|
|
189
|
-
.map(line => treatPathSep(line
|
|
190
|
-
}
|
|
196
|
+
.map(line => treatPathSep(line));
|
|
197
|
+
}
|
|
198
|
+
// When rename detection is on, the A/M/D filters also run with -M so
|
|
199
|
+
// renamed files drop out (reclassified to R by git), and the dedicated
|
|
200
|
+
// R call is the single source of rename lines — no dedup needed.
|
|
201
|
+
// Without rename detection, A/M/D keep their pre-feature line shape via
|
|
202
|
+
// --no-renames.
|
|
203
|
+
const filters = detectRenames
|
|
204
|
+
? [ADDITION, MODIFICATION, DELETION, RENAMED]
|
|
205
|
+
: [ADDITION, MODIFICATION, DELETION];
|
|
206
|
+
const results = await Promise.all(filters.map(changeType => this._getNumstatLines(changeType, detectRenames)));
|
|
191
207
|
return results.flat();
|
|
192
208
|
}
|
|
209
|
+
// Per-filter numstat call. The R branch uses `-z` because numstat
|
|
210
|
+
// otherwise encodes rename paths in three format variants within the
|
|
211
|
+
// path column (`{a => b}`, `a/{b => c}/d`, or bare `old => new`). `-z`
|
|
212
|
+
// emits `N<TAB>M<TAB>\0<src>\0<dst>\0` for each rename, so we can
|
|
213
|
+
// stride-3 over the NUL-split tokens and synthesise
|
|
214
|
+
// `R<TAB><src><TAB><dst>` lines that RepoGitDiff._expandRenames
|
|
215
|
+
// already understands. A/M/D use the default output and rewrite the
|
|
216
|
+
// leading `N\tM\t` counts into the status prefix.
|
|
217
|
+
async _getNumstatLines(changeType, detectRenames) {
|
|
218
|
+
const isRename = changeType === RENAMED;
|
|
219
|
+
const output = await this.simpleGit.raw([
|
|
220
|
+
'diff',
|
|
221
|
+
'--numstat',
|
|
222
|
+
...(isRename ? ['-M', '-z'] : detectRenames ? ['-M'] : ['--no-renames']),
|
|
223
|
+
...IGNORE_WHITESPACE_PARAMS,
|
|
224
|
+
`--diff-filter=${changeType}`,
|
|
225
|
+
this.config.from,
|
|
226
|
+
this.config.to,
|
|
227
|
+
'--',
|
|
228
|
+
...this.config.source,
|
|
229
|
+
]);
|
|
230
|
+
if (isRename) {
|
|
231
|
+
const tokens = output.split('\0');
|
|
232
|
+
const lines = [];
|
|
233
|
+
for (let i = 0; i + 2 < tokens.length; i += 3) {
|
|
234
|
+
const src = tokens[i + 1];
|
|
235
|
+
const dst = tokens[i + 2];
|
|
236
|
+
if (!src || !dst)
|
|
237
|
+
continue;
|
|
238
|
+
lines.push(treatPathSep(`${RENAMED}${TAB}${src}${TAB}${dst}`));
|
|
239
|
+
}
|
|
240
|
+
return lines;
|
|
241
|
+
}
|
|
242
|
+
return output
|
|
243
|
+
.split(EOL)
|
|
244
|
+
.filter(Boolean)
|
|
245
|
+
.map(line => treatPathSep(line.replace(NUM_STAT_CHANGE_INFORMATION, `${changeType}\t`)));
|
|
246
|
+
}
|
|
193
247
|
}
|
|
194
248
|
__decorate([
|
|
195
249
|
log
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitAdapter.js","sourceRoot":"","sources":["../../src/adapter/GitAdapter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GitAdapter.js","sourceRoot":"","sources":["../../src/adapter/GitAdapter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,wBAAwB,EACxB,YAAY,EACZ,2BAA2B,EAC3B,OAAO,GACR,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,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
|
|
|
6
6
|
export declare class GitBatchCatFile {
|
|
7
7
|
protected process: ChildProcessWithoutNullStreams;
|
|
8
8
|
protected queue: PendingRequest[];
|
|
9
|
-
protected
|
|
9
|
+
protected chunks: Buffer[];
|
|
10
|
+
protected totalLength: number;
|
|
10
11
|
protected pendingSize: number;
|
|
11
12
|
constructor(cwd: string);
|
|
12
13
|
getContent(revision: string, path: string): Promise<Buffer>;
|
|
13
14
|
protected _onData(chunk: Buffer): void;
|
|
15
|
+
protected _materializeBuffer(): Buffer;
|
|
16
|
+
protected _advance(buffer: Buffer, consumed: number): Buffer;
|
|
14
17
|
protected _processBuffer(): void;
|
|
15
18
|
close(): void;
|
|
16
19
|
}
|
|
@@ -5,7 +5,8 @@ import { Logger, lazy } from '../utils/LoggingService.js';
|
|
|
5
5
|
export class GitBatchCatFile {
|
|
6
6
|
process;
|
|
7
7
|
queue = [];
|
|
8
|
-
|
|
8
|
+
chunks = [];
|
|
9
|
+
totalLength = 0;
|
|
9
10
|
pendingSize = -1;
|
|
10
11
|
constructor(cwd) {
|
|
11
12
|
this.process = spawn('git', ['cat-file', '--batch'], {
|
|
@@ -36,17 +37,38 @@ export class GitBatchCatFile {
|
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
_onData(chunk) {
|
|
39
|
-
this.
|
|
40
|
+
this.chunks.push(chunk);
|
|
41
|
+
this.totalLength += chunk.length;
|
|
40
42
|
this._processBuffer();
|
|
41
43
|
}
|
|
44
|
+
_materializeBuffer() {
|
|
45
|
+
if (this.chunks.length === 1)
|
|
46
|
+
return this.chunks[0];
|
|
47
|
+
const merged = Buffer.concat(this.chunks, this.totalLength);
|
|
48
|
+
this.chunks = [merged];
|
|
49
|
+
return merged;
|
|
50
|
+
}
|
|
51
|
+
_advance(buffer, consumed) {
|
|
52
|
+
const rest = buffer.subarray(consumed);
|
|
53
|
+
if (rest.length === 0) {
|
|
54
|
+
this.chunks = [];
|
|
55
|
+
this.totalLength = 0;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.chunks = [rest];
|
|
59
|
+
this.totalLength = rest.length;
|
|
60
|
+
}
|
|
61
|
+
return rest;
|
|
62
|
+
}
|
|
42
63
|
_processBuffer() {
|
|
64
|
+
let buffer = this._materializeBuffer();
|
|
43
65
|
while (this.queue.length > 0) {
|
|
44
66
|
if (this.pendingSize === -1) {
|
|
45
|
-
const newlineIdx =
|
|
67
|
+
const newlineIdx = buffer.indexOf(0x0a);
|
|
46
68
|
if (newlineIdx === -1)
|
|
47
69
|
return;
|
|
48
|
-
const header =
|
|
49
|
-
|
|
70
|
+
const header = buffer.subarray(0, newlineIdx).toString();
|
|
71
|
+
buffer = this._advance(buffer, newlineIdx + 1);
|
|
50
72
|
if (header.endsWith('missing')) {
|
|
51
73
|
this.queue.shift().reject(new Error(`Object not found: ${header}`));
|
|
52
74
|
continue;
|
|
@@ -59,10 +81,10 @@ export class GitBatchCatFile {
|
|
|
59
81
|
continue;
|
|
60
82
|
}
|
|
61
83
|
}
|
|
62
|
-
if (
|
|
84
|
+
if (buffer.length < this.pendingSize + 1)
|
|
63
85
|
return;
|
|
64
|
-
const content = Buffer.from(
|
|
65
|
-
|
|
86
|
+
const content = Buffer.from(buffer.subarray(0, this.pendingSize));
|
|
87
|
+
buffer = this._advance(buffer, this.pendingSize + 1);
|
|
66
88
|
this.pendingSize = -1;
|
|
67
89
|
this.queue.shift().resolve(content);
|
|
68
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitBatchCatFile.js","sourceRoot":"","sources":["../../src/adapter/gitBatchCatFile.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,OAAO,EAAuC,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAOzD,MAAM,OAAO,eAAe;IAChB,OAAO,CAAgC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,KAAK,GAAG,EAAE,CAAA;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type TrieNode = {
|
|
2
|
+
children: Map<string, TrieNode>;
|
|
3
|
+
isFile: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class TreeIndex {
|
|
6
|
+
protected readonly root: TrieNode;
|
|
7
|
+
protected fileCount: number;
|
|
8
|
+
add(path: string): void;
|
|
9
|
+
has(path: string): boolean;
|
|
10
|
+
hasPath(path: string): boolean;
|
|
11
|
+
listChildren(dir: string): string[];
|
|
12
|
+
getFilesUnder(dir: string): string[];
|
|
13
|
+
allPaths(): string[];
|
|
14
|
+
get size(): number;
|
|
15
|
+
protected navigate(path: string): TrieNode | undefined;
|
|
16
|
+
protected collectFiles(node: TrieNode, prefix: string, out: string[]): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import { PATH_SEP } from '../constant/fsConstants.js';
|
|
3
|
+
const createNode = () => ({
|
|
4
|
+
children: new Map(),
|
|
5
|
+
isFile: false,
|
|
6
|
+
});
|
|
7
|
+
export class TreeIndex {
|
|
8
|
+
root = createNode();
|
|
9
|
+
fileCount = 0;
|
|
10
|
+
add(path) {
|
|
11
|
+
const parts = path.split(PATH_SEP);
|
|
12
|
+
let node = this.root;
|
|
13
|
+
for (const part of parts) {
|
|
14
|
+
let child = node.children.get(part);
|
|
15
|
+
if (!child) {
|
|
16
|
+
child = createNode();
|
|
17
|
+
node.children.set(part, child);
|
|
18
|
+
}
|
|
19
|
+
node = child;
|
|
20
|
+
}
|
|
21
|
+
if (!node.isFile) {
|
|
22
|
+
node.isFile = true;
|
|
23
|
+
this.fileCount++;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
has(path) {
|
|
27
|
+
return this.navigate(path)?.isFile === true;
|
|
28
|
+
}
|
|
29
|
+
hasPath(path) {
|
|
30
|
+
return this.navigate(path) !== undefined;
|
|
31
|
+
}
|
|
32
|
+
listChildren(dir) {
|
|
33
|
+
const node = this.navigate(dir);
|
|
34
|
+
return node ? Array.from(node.children.keys()) : [];
|
|
35
|
+
}
|
|
36
|
+
getFilesUnder(dir) {
|
|
37
|
+
const node = this.navigate(dir);
|
|
38
|
+
if (!node)
|
|
39
|
+
return [];
|
|
40
|
+
const result = [];
|
|
41
|
+
this.collectFiles(node, dir, result);
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
allPaths() {
|
|
45
|
+
const result = [];
|
|
46
|
+
this.collectFiles(this.root, '', result);
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
get size() {
|
|
50
|
+
return this.fileCount;
|
|
51
|
+
}
|
|
52
|
+
navigate(path) {
|
|
53
|
+
if (!path)
|
|
54
|
+
return this.root;
|
|
55
|
+
const parts = path.split(PATH_SEP);
|
|
56
|
+
let node = this.root;
|
|
57
|
+
for (const part of parts) {
|
|
58
|
+
node = node.children.get(part);
|
|
59
|
+
if (!node)
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
return node;
|
|
63
|
+
}
|
|
64
|
+
// Recursion depth is bounded by path segment count, not file count.
|
|
65
|
+
// Worst case under OS PATH_MAX (~4096 bytes) is well under V8's stack limit.
|
|
66
|
+
collectFiles(node, prefix, out) {
|
|
67
|
+
if (node.isFile)
|
|
68
|
+
out.push(prefix);
|
|
69
|
+
for (const [segment, child] of node.children) {
|
|
70
|
+
const childPath = prefix ? `${prefix}${PATH_SEP}${segment}` : segment;
|
|
71
|
+
this.collectFiles(child, childPath, out);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=treeIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeIndex.js","sourceRoot":"","sources":["../../src/adapter/treeIndex.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,OAAO,EAAE,QAAQ,EAAE,MAA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CAAC,QAAQ,EAAE,CAAC;YAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;YACrE,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -16,8 +16,10 @@ export default class SourceDeltaGenerate extends SfCommand<SgdResult> {
|
|
|
16
16
|
'include-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
'include-destructive-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
'additional-metadata-registry': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'changes-manifest': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
'ignore-whitespace': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
22
|
};
|
|
23
|
+
protected static _expandBareChangesManifest(argv: string[]): string[];
|
|
22
24
|
run(): Promise<SgdResult>;
|
|
23
25
|
}
|