You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instructions](https://help.github.com/articles/creating-a-pull-request/). See [pull request samples](https://github.com/scolladon/sfdx-git-delta/pulls) for reference.
@@ -158,7 +158,7 @@ The `resolveHandler()` method applies these tiers in order, returning the first
158
158
159
159
This design means most new SDR metadata types are handled automatically without code changes. Only types requiring specialized behavior need explicit overrides in `handlerMap`.
160
160
161
-
`MetadataBoundaryResolver` creates a `MetadataElement` — a value object capturing the parsed identity of the diff line: base path, extension, parent folder, component name, and path segments after the type directory. It may scan the git tree to find the component root when the directory name isn't present in the path.
161
+
`MetadataBoundaryResolver` creates a `MetadataElement` — a value object capturing the parsed identity of the diff line: base path, extension, parent folder, component name, and path segments after the type directory. Resolution follows a tiered strategy to minimize git I/O: (1) flat paths (single segment after the type directory) use `MetadataElement.fromPath()` directly; (2) types with no suffix (LWC, Aura) use `fromPath()` since the scan cannot identify them; (3) depth-2 paths where the file contains the metadata suffix extract the component name directly from the file name without git I/O; (4) deeper paths delegate to `scanAndCreateElement()` which calls `getFilesPath(typeDir)` — a single recursive `git ls-tree -r` per type directory, cached hierarchically — then builds a Set of component names from meta files and matches path segments inner-to-outer. This handles intermediate folders between the type directory and the component (e.g., `permissionsets/marketing/Admin/...` where `marketing` is an organizational folder, not the component). For paths where the type directory is not in the path, a fallback walk-up strategy lists directory siblings via `listDirAtRevision` and matches against known metadata suffixes, with results cached per revision via `dirCache`.
162
162
163
163
### Handler Hierarchy
164
164
@@ -303,7 +303,7 @@ Like DecomposedHandler but the parent copy is conditional: only copies the paren
303
303
**Extends**: StandardHandler
304
304
**Used by**: PermissionSet
305
305
306
-
Handles types that can exist in either monolithic format (single file) or decomposed format (folder with sub-files). Detects the format at construction time. On deletion in decomposed format, checks if the holder folder still has content before treating as a true deletion.
306
+
Handles types that can exist in either monolithic format (single file) or decomposed format (folder with sub-files). Detects the format at construction time. Locates the PermissionSet directory using a fixed offset from the file path's end, supporting arbitrary nesting depth (e.g., `permissionsets/marketing/Admin/fieldPermissions/...`). On deletion in decomposed format, checks if the holder folder still has content — if yes, treats as modification (redeploy the PS); if no, treats as true deletion.
307
307
308
308
#### CustomObjectHandler
309
309
@@ -377,10 +377,10 @@ Each processor is wrapped in error isolation — failures produce warnings rathe
377
377
378
378
Executes the accumulated copy operations with concurrency bounded by `getConcurrencyThreshold()`. Two operation kinds:
379
379
380
-
| Kind | Description |
381
-
|------|-------------|
382
-
|`GitCopy`| Reads a file from a specific git revision via `git show <rev>:<path>` and writes it to the output directory |
383
-
|`ComputedContent`| Writes a string (typically pruned XML from InFile/ObjectTranslation handlers) directly to the output directory |
|`GitCopy`| Reads a file from a specific git revision via `git show <rev>:<path>` and writes it to the output directory|
383
+
|`ComputedContent`| Writes a string (typically pruned XML from InFile/ObjectTranslation handlers) directly to the output directory |
384
384
385
385
`GitAdapter.getBufferContent()` handles LFS detection: if the buffer starts with an LFS pointer signature, it reads the actual object from the local LFS cache instead.
386
386
@@ -393,7 +393,7 @@ Executes the accumulated copy operations with concurrency bounded by `getConcurr
393
393
SGD follows a **warnings-not-exceptions** philosophy for per-file errors:
| New metadata type handler | Most types are auto-resolved via SDR registry attributes (`adapter`, `decomposition`, `inFolder`, `xmlTag`+`key`). Only add an explicit entry to `handlerMap` in `TypeHandlerFactory` when a type needs behavior that differs from what SDR signals would select. |
450
450
| New post-processor | Add a `BaseProcessor` subclass to `registeredProcessors` in `postProcessorManager.ts`|
451
451
| Metadata type override | Add definition to `internalRegistry.ts` with special flags (`pruneOnly`, `excluded`, `xmlTag`, etc.) |
0 commit comments