sfdx-git-delta 7.4.2 → 7.4.3
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 +15 -2
- package/lib/constant/metadataConstants.d.ts +2 -0
- package/lib/constant/metadataConstants.js +11 -1
- package/lib/constant/metadataConstants.js.map +1 -1
- package/lib/main.js +13 -0
- package/lib/main.js.map +1 -1
- package/lib/utils/changeSet.d.ts +4 -0
- package/lib/utils/changeSet.js +51 -5
- package/lib/utils/changeSet.js.map +1 -1
- package/lib/utils/ignoreHelper.js +0 -5
- package/lib/utils/ignoreHelper.js.map +1 -1
- package/lib/utils/renameResolver.d.ts +7 -3
- package/lib/utils/renameResolver.js +19 -7
- package/lib/utils/renameResolver.js.map +1 -1
- package/messages/delta.md +4 -0
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ FLAG DESCRIPTIONS
|
|
|
214
214
|
`--source-dir force-app` does not match `nested/force-app/...`.
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v7.4.
|
|
217
|
+
_See code: [src/commands/sgd/source/delta.ts](https://github.com/scolladon/sfdx-git-delta/blob/v7.4.3/src/commands/sgd/source/delta.ts)_
|
|
218
218
|
<!-- commandsstop -->
|
|
219
219
|
|
|
220
220
|
### Windows users
|
|
@@ -487,6 +487,12 @@ If SGD cannot read the file listing at `--to`, the move check is skipped, the de
|
|
|
487
487
|
|
|
488
488
|
Note: when only using the `--ignore-file [-i]` parameter (and not `--ignore-destructive-file [-D]`) the plugin will apply it to added/changed/deleted elements.
|
|
489
489
|
|
|
490
|
+
Independently of any ignore file, SGD also keeps components of a type the Metadata API cannot delete — today only `RecordType` — out of `destructiveChanges.xml` on every route: an ordinary deletion, a rename, and `--include-destructive-file` alike. A destructive entry for one of these is a component failure (`Cannot delete record type through API`) that fails the whole deployment. The component is not deleted anywhere; it is only omitted from the manifest SGD would otherwise emit, so it remains in the target org until you remove it by hand in Setup. SGD raises a warning naming the type and the affected members:
|
|
491
|
+
|
|
492
|
+
```
|
|
493
|
+
Warning: The Metadata API cannot delete 'RecordType' components, so destructiveChanges.xml omits 'Account.Alpha'. Remove them from the target org manually in Setup.
|
|
494
|
+
```
|
|
495
|
+
|
|
490
496
|
### Explicitly including specific files for inclusion or destruction regardless of diff
|
|
491
497
|
|
|
492
498
|
The `--include-file [-n]` parameter allows you to specify a file based on [gitignore glob matching](https://git-scm.com/docs/gitignore) to include specific files. Regardless whether they appears in the diff or not.
|
|
@@ -603,7 +609,14 @@ Produces (bare form example) `incremental/changes.manifest.json`. Setting `--cha
|
|
|
603
609
|
}
|
|
604
610
|
```
|
|
605
611
|
|
|
606
|
-
`package.xml` still lists `NewName` and `destructiveChanges.xml` still lists `OldName` for renames — the deployment contract is unchanged.
|
|
612
|
+
`package.xml` still lists `NewName` and `destructiveChanges.xml` still lists `OldName` for renames — the deployment contract is unchanged, and the manifests are identical whether or not `--changes-manifest` is set. Both sides of a rename still pass through the ignore files: a `from` path covered by `--ignore-destructive-file` keeps its member out of `destructiveChanges.xml`, a `to` path covered by `--ignore-file` keeps its member out of `package.xml`, and the change is then reported in `changes.manifest.json` as a plain addition or deletion rather than a rename: an ignored `from` leaves `to` in the `add` bucket, an ignored `to` leaves `from` in the `delete` bucket. When the move keeps the component name, the deletion is cancelled against the ignored addition and neither side is reported at all.
|
|
613
|
+
|
|
614
|
+
Two default-configuration behaviours changed with no dedicated changelog entry — the kind of thing you notice the first time you diff a JSON manifest across the upgrade:
|
|
615
|
+
|
|
616
|
+
- a **renamed** record type is still reported in the `rename` bucket, but its former name is no longer emitted into `destructiveChanges.xml` — that entry previously made the whole deployment fail;
|
|
617
|
+
- a **deleted** record type now appears in the `delete` bucket, where previously it appeared nowhere.
|
|
618
|
+
|
|
619
|
+
Both are consequences of the undeletable-component warning described above: `RecordType` (today's only such type) is kept out of `destructiveChanges.xml`, but still reported in `changes.manifest.json` for review.
|
|
607
620
|
|
|
608
621
|
Works for file-backed metadata, in-file sub-components (CustomLabels members, Workflow rules, etc.), decomposed metadata, in-resource bundles and in-folder metadata.
|
|
609
622
|
|
|
@@ -24,10 +24,12 @@ export declare const OBJECT_TRANSLATION_META_XML_SUFFIX = "objectTranslation-met
|
|
|
24
24
|
export declare const OBJECT_TRANSLATION_TYPE = "CustomObjectTranslation";
|
|
25
25
|
export declare const OBJECT_TYPE = "CustomObject";
|
|
26
26
|
export declare const PERMISSIONSET_TYPE = "PermissionSet";
|
|
27
|
+
export declare const RECORD_TYPE = "RecordType";
|
|
27
28
|
export declare const REPORT_TYPE = "Report";
|
|
28
29
|
export declare const FOLDER_MOVE_ON_DEPLOY_TYPES: ReadonlySet<string>;
|
|
29
30
|
export declare const SHARING_RULE_TYPE = "SharingRules";
|
|
30
31
|
export declare const SUB_OBJECT_TYPES: string[];
|
|
32
|
+
export declare const UNDELETABLE_TYPES: ReadonlySet<string>;
|
|
31
33
|
export declare const TRANSLATION_EXTENSION = "translation";
|
|
32
34
|
export declare const TRANSLATION_TYPE = "Translations";
|
|
33
35
|
export declare const VIRTUAL_BOT_TYPE = "VirtualBot";
|
|
@@ -40,6 +40,7 @@ export const OBJECT_TRANSLATION_META_XML_SUFFIX = `objectTranslation${METAFILE_S
|
|
|
40
40
|
export const OBJECT_TRANSLATION_TYPE = 'CustomObjectTranslation';
|
|
41
41
|
export const OBJECT_TYPE = 'CustomObject';
|
|
42
42
|
export const PERMISSIONSET_TYPE = 'PermissionSet';
|
|
43
|
+
export const RECORD_TYPE = 'RecordType';
|
|
43
44
|
export const REPORT_TYPE = 'Report';
|
|
44
45
|
// The Metadata API relocates these when the package lists them under a new
|
|
45
46
|
// folder, so their former path must not be destroyed alongside the move.
|
|
@@ -58,7 +59,7 @@ export const SUB_OBJECT_TYPES = [
|
|
|
58
59
|
'FieldSet',
|
|
59
60
|
'Index',
|
|
60
61
|
'ListView',
|
|
61
|
-
|
|
62
|
+
RECORD_TYPE,
|
|
62
63
|
'SharingCriteriaRule',
|
|
63
64
|
'SharingGuestRule',
|
|
64
65
|
'SharingOwnerRule',
|
|
@@ -76,6 +77,15 @@ export const SUB_OBJECT_TYPES = [
|
|
|
76
77
|
'WorkflowSend',
|
|
77
78
|
'WorkflowTask',
|
|
78
79
|
];
|
|
80
|
+
// The Metadata API cannot delete these, so a destructive entry for one is a
|
|
81
|
+
// component failure that fails the whole deploy: the destructive view omits
|
|
82
|
+
// them and a warning names them instead.
|
|
83
|
+
// See: https://github.com/scolladon/sfdx-git-delta/wiki/Metadata-Specificities#recordtype-destructive-changes
|
|
84
|
+
// Must stay disjoint from FOLDER_MOVE_ON_DEPLOY_TYPES, BOT_TYPE and
|
|
85
|
+
// BOT_VERSION_TYPE: undeletableDeletions() reports from the pre-suppressor
|
|
86
|
+
// view, so an overlap would let the warning name a member those suppressors
|
|
87
|
+
// drop anyway, and the manifest and the warning would disagree.
|
|
88
|
+
export const UNDELETABLE_TYPES = new Set([RECORD_TYPE]);
|
|
79
89
|
export const TRANSLATION_EXTENSION = 'translation';
|
|
80
90
|
export const TRANSLATION_TYPE = 'Translations';
|
|
81
91
|
export const VIRTUAL_BOT_TYPE = 'VirtualBot';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadataConstants.js","sourceRoot":"","sources":["../../src/constant/metadataConstants.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAA;AAC7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAA;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAC1C,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAA;AACzC,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,uB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AW;IACX,cAAc;CACf,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAA;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,iBAAiB;IACjB,eAAe;IACf,aAAa;IACb,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,SAAS;IACT,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,0BAA0B;IAC1B,yBAAyB;IACzB,cAAc;IACd,cAAc;IACd,cAAc;CACf,CAAA;AACD,4EAA4E;AAC5E,4EAA4E;AAC5E,yCAAyC;AACzC,8GAA8G;AAC9G,oEAAoE;AACpE,2EAA2E;AAC3E,4EAA4E;AAC5E,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAA;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAC5C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAA"}
|
package/lib/main.js
CHANGED
|
@@ -22,6 +22,18 @@ const collectLines = async (lines) => {
|
|
|
22
22
|
}
|
|
23
23
|
return materialized;
|
|
24
24
|
};
|
|
25
|
+
// The Metadata API refuses to delete these, so the destructive manifest
|
|
26
|
+
// omits them — but the components really are gone from the source and
|
|
27
|
+
// stay in the org, so the user has to remove them by hand. One warning
|
|
28
|
+
// per type, listing its members: fifty orphaned record types must not
|
|
29
|
+
// produce fifty lines.
|
|
30
|
+
const undeletableWarnings = (changes, messages) => [...changes.undeletableDeletions()].map(([type, members]) => new Error(messages.getMessage('warning.UndeletableComponentsOmitted', [
|
|
31
|
+
type,
|
|
32
|
+
// Sanitize each member before joining: the length cap in
|
|
33
|
+
// sanitizeForMessage applies per value, so a single long member
|
|
34
|
+
// name would otherwise silently elide every member after it.
|
|
35
|
+
[...members].map(sanitizeForMessage).join(', '),
|
|
36
|
+
])));
|
|
25
37
|
export default async (configInput) => {
|
|
26
38
|
// Stryker disable next-line StringLiteral -- equivalent: log content is observability only; tests assert on the returned Work, not lazy log lines
|
|
27
39
|
Logger.trace('main: entry');
|
|
@@ -127,6 +139,7 @@ export default async (configInput) => {
|
|
|
127
139
|
...sourceScopeWarnings,
|
|
128
140
|
...ignoredMoveWarnings,
|
|
129
141
|
...treeIndexWarnings,
|
|
142
|
+
...undeletableWarnings(changes, messages),
|
|
130
143
|
],
|
|
131
144
|
};
|
|
132
145
|
// Stryker disable next-line StringLiteral -- equivalent: log content is observability only
|
package/lib/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,OAAO,UAAU,MAAM,yBAAyB,CAAA;AAChD,OAAO,UAAU,MAAM,yBAAyB,CAAA;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,mBAAmB,MAAM,kCAAkC,CAAA;AAIlE,OAAO,SAAS,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,eAAe,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,c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AAG,MAAM,CAC9B,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAC7B,8BAA8B,EAC9B,GAAG,EAAE,CAAC,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CACxC,CAAA;QAED,MAAM,IAAI,GAAS;YACjB,MAAM;YACN,OAAO;YACP,QAAQ,EAAE;gBACR,GAAG,cAAc;gBACjB,GAAG,gBAAgB;gBACnB,GAAG,iBAAiB;gBACpB,GAAG,mBAAmB;gBACtB,GAAG,mBAAmB;gBACtB,GAAG,iBAAiB;gBACpB,GAAG,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC;aAC1C;SACF,CAAA;QACD,2FAA2F;QAC3F,MAAM,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,IAAI,EAAE,CAAC,CAAA;QACxC,2FAA2F;QAC3F,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QAC1B,OAAO,IAAI,CAAA;IACb,CAAC;YAAS,CAAC;QACT,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAA;IAC7B,CAAC;AACH,CAAC,CAAA"}
|
package/lib/utils/changeSet.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export default class ChangeSet {
|
|
|
39
39
|
private _recordRename;
|
|
40
40
|
forPackageManifest(): Manifest;
|
|
41
41
|
forDestructiveManifest(): Manifest;
|
|
42
|
+
private _orphanedDeletes;
|
|
43
|
+
private _stripUndeletableTypes;
|
|
44
|
+
undeletableDeletions(): Manifest;
|
|
45
|
+
private _withoutDeletedHolders;
|
|
42
46
|
private _suppressVersionsOfDeletedBots;
|
|
43
47
|
private _suppressMovedFolderMembers;
|
|
44
48
|
isEmpty(): boolean;
|
package/lib/utils/changeSet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { DOT, PATH_SEP } from '../constant/fsConstants.js';
|
|
3
|
-
import { BOT_TYPE, BOT_VERSION_TYPE, FOLDER_MOVE_ON_DEPLOY_TYPES, } from '../constant/metadataConstants.js';
|
|
3
|
+
import { BOT_TYPE, BOT_VERSION_TYPE, FOLDER_MOVE_ON_DEPLOY_TYPES, OBJECT_TYPE, UNDELETABLE_TYPES, } from '../constant/metadataConstants.js';
|
|
4
4
|
import { ChangeKind, ManifestTarget, } from '../types/handlerResult.js';
|
|
5
5
|
const KEY_SEPARATOR = '\0';
|
|
6
6
|
const MANIFEST_TARGETS = [
|
|
@@ -103,12 +103,58 @@ export default class ChangeSet {
|
|
|
103
103
|
]);
|
|
104
104
|
}
|
|
105
105
|
forDestructiveManifest() {
|
|
106
|
-
const
|
|
106
|
+
const packaged = this.forPackageManifest();
|
|
107
|
+
return this._suppressVersionsOfDeletedBots(this._suppressMovedFolderMembers(this._stripUndeletableTypes(this._orphanedDeletes(packaged)), packaged));
|
|
108
|
+
}
|
|
109
|
+
// Everything the destructive view would carry before any suppressor runs:
|
|
110
|
+
// the destructive-target members unioned with the rename sources, minus
|
|
111
|
+
// whatever the package view already covers. Extracted because the
|
|
112
|
+
// undeletable-type strip and its reporting query must agree on exactly
|
|
113
|
+
// this input.
|
|
114
|
+
_orphanedDeletes(packaged) {
|
|
115
|
+
return this._subtractByType(this._unionByType([
|
|
107
116
|
this.byTarget[ManifestTarget.DestructiveChanges],
|
|
108
117
|
this._renameSourcesByType(),
|
|
109
|
-
]);
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
]), packaged);
|
|
119
|
+
}
|
|
120
|
+
// The Metadata API refuses to delete these types, and one such member
|
|
121
|
+
// fails the whole deploy — so the destructive view drops the type
|
|
122
|
+
// wholesale. The review view (byChangeKind) deliberately keeps it,
|
|
123
|
+
// mirroring _suppressVersionsOfDeletedBots: the file really was deleted.
|
|
124
|
+
_stripUndeletableTypes(deletes) {
|
|
125
|
+
const result = new Map(deletes);
|
|
126
|
+
for (const type of UNDELETABLE_TYPES)
|
|
127
|
+
result.delete(type);
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
// Members omitted from the destructive view because their type cannot be
|
|
131
|
+
// deleted through the Metadata API, and which therefore need removing by
|
|
132
|
+
// hand. Reads the same input the strip consumes, so a member the package
|
|
133
|
+
// view already covers is neither stripped nor reported here. A query,
|
|
134
|
+
// never an emitter: main.ts turns the result into a warning.
|
|
135
|
+
undeletableDeletions() {
|
|
136
|
+
const orphaned = this._orphanedDeletes(this.forPackageManifest());
|
|
137
|
+
const deletedHolders = orphaned.get(OBJECT_TYPE);
|
|
138
|
+
const result = new Map();
|
|
139
|
+
for (const type of UNDELETABLE_TYPES) {
|
|
140
|
+
const members = orphaned.get(type);
|
|
141
|
+
if (!members)
|
|
142
|
+
continue;
|
|
143
|
+
const orphans = this._withoutDeletedHolders(members, deletedHolders);
|
|
144
|
+
if (orphans.size > 0)
|
|
145
|
+
result.set(type, orphans);
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
// A deleted CustomObject takes its record types with it, so a member whose
|
|
150
|
+
// holder the same deploy destroys needs no manual cleanup and must not be
|
|
151
|
+
// reported. Same shape as _suppressVersionsOfDeletedBots: the member is
|
|
152
|
+
// `<holder>.<name>` and an API name cannot contain a dot, so the segment
|
|
153
|
+
// before the first one names the holder.
|
|
154
|
+
_withoutDeletedHolders(members, deletedHolders) {
|
|
155
|
+
if (!deletedHolders?.size)
|
|
156
|
+
return new Set(members);
|
|
157
|
+
return new Set([...members].filter(member => !deletedHolders.has(member.split(DOT)[0])));
|
|
112
158
|
}
|
|
113
159
|
// A deleted Bot takes its versions with it, so a BotVersion listed beside
|
|
114
160
|
// its own deleted parent is redundant. A BotVersion member is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeSet.js","sourceRoot":"","sources":["../../src/utils/changeSet.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EACL,QAAQ,EACR,gBAAgB,EACh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e;QACrD,MAAM,MAAM,GAAa,IAAI,GAAG,EAAE,CAAA;QAClC,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAClC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAA;YACnC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC7B,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;gBACvB,CAAC;YACH,CAAC;YACD,IAAI,SAAS,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
|
@@ -8,10 +8,6 @@ import ignore from 'ignore';
|
|
|
8
8
|
import { ADDITION, DELETION, GIT_DIFF_TYPE_REGEX, MODIFICATION, } from '../constant/gitConstants.js';
|
|
9
9
|
import { readFile } from './fsUtils.js';
|
|
10
10
|
import { log } from './LoggingDecorator.js';
|
|
11
|
-
// RATIONALE: Why are recordTypes excluded from destructive changes?
|
|
12
|
-
// The Metadata API does not support deleting RecordType via destructiveChanges.xml.
|
|
13
|
-
// See: https://github.com/scolladon/sfdx-git-delta/wiki/Metadata-Specificities#recordtype-destructive-changes
|
|
14
|
-
const BASE_DESTRUCTIVE_IGNORE = ['recordTypes/'];
|
|
15
11
|
export class IgnoreHelper {
|
|
16
12
|
globalIgnore;
|
|
17
13
|
destructiveIgnore;
|
|
@@ -49,7 +45,6 @@ export class IgnoreHelper {
|
|
|
49
45
|
const destructiveIgnore = await _buildIgnore(
|
|
50
46
|
// Stryker disable next-line ConditionalExpression,LogicalOperator -- equivalent: ignoreDestructive falls back to the global ignorePath when not set; flipping || to && would only use the destructive path when global is also set, but the cached singleton observable behavior remains stable for the test surface that always provides one of the two
|
|
51
47
|
ignoreDestructive || ignorePath);
|
|
52
|
-
destructiveIgnore.add(BASE_DESTRUCTIVE_IGNORE);
|
|
53
48
|
IgnoreHelper.ignoreInstance = new IgnoreHelper(globalIgnore, destructiveIgnore);
|
|
54
49
|
}
|
|
55
50
|
return IgnoreHelper.ignoreInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignoreHelper.js","sourceRoot":"","sources":["../../src/utils/ignoreHelper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAkB,MAAM,QAAQ,CAAA;AAEvC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,YAAY,GACb,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAE3C,
|
|
1
|
+
{"version":3,"file":"ignoreHelper.js","sourceRoot":"","sources":["../../src/utils/ignoreHelper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAkB,MAAM,QAAQ,CAAA;AAEvC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,YAAY,GACb,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAE3C,MAAM,OAAO,YAAY;IAKL,YAAY;IACT,iBAAiB;IAL9B,MAAM,CAAC,cAAc,GAAwB,IAAI,CAAA;IACjD,MAAM,CAAC,eAAe,GAAwB,IAAI,CAAA;IAE1D,YACkB,YAAoB,EACjB,iBAAyB;4BAD5B,YAAY;iCACT,iBAAiB;IACnC,CAAC;IAGG,IAAI,CAAC,IAAY;QACtB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC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AAC,OAAO,CAAC,CAAA;YAChD,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC,kBAAkB,CAAC,CAAA;YAChE,YAAY,CAAC,eAAe,GAAG,IAAI,YAAY,CAC7C,YAAY,EACZ,iBAAiB,CAClB,CAAA;QACH,CAAC;QACD,OAAO,YAAY,CAAC,eAAe,CAAA;IACrC,CAAC;CACF;AA9DQ;IADN,GAAG;wCAcH;AAmDH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,MAAM,EAAE,UAAU,EAClB,iBAAiB,GAIlB,EAAyB,EAAE,CAC1B,YAAY,CAAC,WAAW,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA;AAEzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,OAAO,EACP,kBAAkB,GAInB,EAAyB,EAAE,CAC1B,YAAY,CAAC,YAAY,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;AAExD,MAAM,YAAY,GAAG,KAAK,EAAE,UAA8B,EAAE,EAAE;IAC5D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IACpB,wQAAwQ;IACxQ,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAA;QAC1C,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC7B,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
|
@@ -6,11 +6,15 @@ import type { RenamePathPair } from './repoGitDiff.js';
|
|
|
6
6
|
* `RenameTriple` values by re-using the handler machinery to resolve each
|
|
7
7
|
* side to its Salesforce (type, member).
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* the
|
|
11
|
-
*
|
|
9
|
+
* The `from` side is gated by the destructive ignore and the `to` side by
|
|
10
|
+
* the global ignore; a pair rejected on either side yields no triple,
|
|
11
|
+
* degrading to the add/delete shape the handler pipeline already produces.
|
|
12
|
+
* Pairs where metadata resolution fails (unknown type) or where the from/to
|
|
13
|
+
* side land on the same component are skipped too — those reduce to normal
|
|
14
|
+
* add/delete or no-ops already covered by the handler pipeline.
|
|
12
15
|
*/
|
|
13
16
|
export default class RenameResolver {
|
|
17
|
+
private readonly config;
|
|
14
18
|
private readonly factory;
|
|
15
19
|
constructor(ctx: RunContext);
|
|
16
20
|
resolve(pairs: readonly RenamePathPair[]): Promise<readonly RenameTriple[]>;
|
|
@@ -9,6 +9,7 @@ import { TAB } from '../constant/cliConstants.js';
|
|
|
9
9
|
import { ADDITION, DELETION } from '../constant/gitConstants.js';
|
|
10
10
|
import TypeHandlerFactory from '../service/typeHandlerFactory.js';
|
|
11
11
|
import { getErrorMessage } from './errorUtils.js';
|
|
12
|
+
import { buildIgnoreHelper } from './ignoreHelper.js';
|
|
12
13
|
import { log } from './LoggingDecorator.js';
|
|
13
14
|
import { Logger, lazy } from './LoggingService.js';
|
|
14
15
|
/**
|
|
@@ -16,28 +17,39 @@ import { Logger, lazy } from './LoggingService.js';
|
|
|
16
17
|
* `RenameTriple` values by re-using the handler machinery to resolve each
|
|
17
18
|
* side to its Salesforce (type, member).
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
* the
|
|
21
|
-
*
|
|
20
|
+
* The `from` side is gated by the destructive ignore and the `to` side by
|
|
21
|
+
* the global ignore; a pair rejected on either side yields no triple,
|
|
22
|
+
* degrading to the add/delete shape the handler pipeline already produces.
|
|
23
|
+
* Pairs where metadata resolution fails (unknown type) or where the from/to
|
|
24
|
+
* side land on the same component are skipped too — those reduce to normal
|
|
25
|
+
* add/delete or no-ops already covered by the handler pipeline.
|
|
22
26
|
*/
|
|
23
27
|
export default class RenameResolver {
|
|
28
|
+
config;
|
|
24
29
|
factory;
|
|
25
30
|
constructor(ctx) {
|
|
31
|
+
this.config = ctx.config;
|
|
26
32
|
this.factory = new TypeHandlerFactory(ctx);
|
|
27
33
|
}
|
|
28
34
|
async resolve(pairs) {
|
|
35
|
+
const ignoreHelper = await buildIgnoreHelper(this.config);
|
|
29
36
|
const triples = [];
|
|
30
37
|
for (const pair of pairs) {
|
|
31
|
-
const resolved = await this._resolve(pair);
|
|
38
|
+
const resolved = await this._resolve(pair, ignoreHelper);
|
|
32
39
|
if (resolved)
|
|
33
40
|
triples.push(resolved);
|
|
34
41
|
}
|
|
35
42
|
return triples;
|
|
36
43
|
}
|
|
37
|
-
async _resolve(pair) {
|
|
44
|
+
async _resolve(pair, ignoreHelper) {
|
|
38
45
|
try {
|
|
39
|
-
const
|
|
40
|
-
const
|
|
46
|
+
const fromLine = `${DELETION}${TAB}${pair.fromPath}`;
|
|
47
|
+
const toLine = `${ADDITION}${TAB}${pair.toPath}`;
|
|
48
|
+
if (!ignoreHelper.keep(fromLine) || !ignoreHelper.keep(toLine)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const fromHandler = await this.factory.getTypeHandler(fromLine);
|
|
52
|
+
const toHandler = await this.factory.getTypeHandler(toLine);
|
|
41
53
|
const from = fromHandler.getElementDescriptor();
|
|
42
54
|
const to = toHandler.getElementDescriptor();
|
|
43
55
|
if (from.type !== to.type)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renameResolver.js","sourceRoot":"","sources":["../../src/utils/renameResolver.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;AAEZ,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,kBAAkB,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"renameResolver.js","sourceRoot":"","sources":["../../src/utils/renameResolver.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;AAEZ,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;A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AAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC/D,OAAO,IAAI,CAAA;YACb,CAAC;YACD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC/D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;YAC3D,MAAM,IAAI,GAAG,WAAW,CAAC,oBAAoB,EAAE,CAAA;YAC/C,MAAM,EAAE,GAAG,SAAS,CAAC,oBAAoB,EAAE,CAAA;YAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAA;YACtC,gOAAgO;YAChO,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAA;YAC1C,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,CAAA;QAC9D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI;YACT,0IAA0I;YAC1I,IAAI,CAAA,qCAAqC,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAC5G,CAAA;YACD,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;CACF;AAtCc;IADZ,GAAG;6CAWH"}
|
package/messages/delta.md
CHANGED
|
@@ -186,3 +186,7 @@ Could not read the file list at '%s', so %s component(s) moved into an ignored d
|
|
|
186
186
|
# warning.TreeIndexUnavailable
|
|
187
187
|
|
|
188
188
|
Could not build the file tree index for '%s', so components that still exist there may be listed in destructiveChanges.xml as deleted. Check that the commit's tree objects are present locally (a partial clone created with --filter may not have them).
|
|
189
|
+
|
|
190
|
+
# warning.UndeletableComponentsOmitted
|
|
191
|
+
|
|
192
|
+
The Metadata API cannot delete '%s' components, so destructiveChanges.xml omits '%s'. Remove them from the target org manually in Setup.
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfdx-git-delta",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
4
4
|
"description": "Generate the sfdx content in source format and destructive change from two git commits",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salesforce",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@types/node": "26.6.1",
|
|
71
71
|
"@vitest/coverage-v8": "5.0.1",
|
|
72
72
|
"husky": "9.1.7",
|
|
73
|
-
"knip": "6.
|
|
73
|
+
"knip": "6.37.0",
|
|
74
74
|
"lint-staged": "17.5.1",
|
|
75
75
|
"ls-engines": "0.10.1",
|
|
76
76
|
"oclif": "6.0.0",
|