@memberjunction/metadata-sync 6.2.0-edge.6 → 6.2.0-edge.7

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.
Files changed (50) hide show
  1. package/README.md +146 -1
  2. package/dist/config.d.ts +24 -0
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js.map +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/RecordProcessor.d.ts +16 -0
  9. package/dist/lib/RecordProcessor.d.ts.map +1 -1
  10. package/dist/lib/RecordProcessor.js +51 -4
  11. package/dist/lib/RecordProcessor.js.map +1 -1
  12. package/dist/lib/collection-promotion.d.ts +89 -0
  13. package/dist/lib/collection-promotion.d.ts.map +1 -0
  14. package/dist/lib/collection-promotion.js +154 -0
  15. package/dist/lib/collection-promotion.js.map +1 -0
  16. package/dist/lib/deletion-prescan.d.ts +26 -0
  17. package/dist/lib/deletion-prescan.d.ts.map +1 -0
  18. package/dist/lib/deletion-prescan.js +56 -0
  19. package/dist/lib/deletion-prescan.js.map +1 -0
  20. package/dist/lib/lookup-sql.d.ts +3 -2
  21. package/dist/lib/lookup-sql.d.ts.map +1 -1
  22. package/dist/lib/lookup-sql.js +16 -4
  23. package/dist/lib/lookup-sql.js.map +1 -1
  24. package/dist/lib/natural-key-preflight.d.ts.map +1 -1
  25. package/dist/lib/natural-key-preflight.js +1 -0
  26. package/dist/lib/natural-key-preflight.js.map +1 -1
  27. package/dist/lib/record-dependency-analyzer.d.ts +5 -1
  28. package/dist/lib/record-dependency-analyzer.d.ts.map +1 -1
  29. package/dist/lib/record-dependency-analyzer.js +11 -1
  30. package/dist/lib/record-dependency-analyzer.js.map +1 -1
  31. package/dist/lib/sql-log-filters.d.ts +31 -0
  32. package/dist/lib/sql-log-filters.d.ts.map +1 -0
  33. package/dist/lib/sql-log-filters.js +41 -0
  34. package/dist/lib/sql-log-filters.js.map +1 -0
  35. package/dist/lib/sync-engine.d.ts.map +1 -1
  36. package/dist/lib/sync-engine.js +35 -4
  37. package/dist/lib/sync-engine.js.map +1 -1
  38. package/dist/services/PullService.d.ts +2 -0
  39. package/dist/services/PullService.d.ts.map +1 -1
  40. package/dist/services/PullService.js +20 -2
  41. package/dist/services/PullService.js.map +1 -1
  42. package/dist/services/PushService.d.ts +21 -0
  43. package/dist/services/PushService.d.ts.map +1 -1
  44. package/dist/services/PushService.js +80 -38
  45. package/dist/services/PushService.js.map +1 -1
  46. package/dist/services/ValidationService.d.ts +31 -0
  47. package/dist/services/ValidationService.d.ts.map +1 -1
  48. package/dist/services/ValidationService.js +135 -9
  49. package/dist/services/ValidationService.js.map +1 -1
  50. package/package.json +15 -15
package/README.md CHANGED
@@ -197,6 +197,12 @@ The tool is intended for managing business-level metadata such as:
197
197
 
198
198
  For more information about how CodeGen reflects system-level data from the database into the MJ metadata layer, see the [CodeGen documentation](../CodeGenLib/README.md).
199
199
 
200
+ ### Entity fields and entity relationships
201
+
202
+ **Entity field rows (`MJ: Entity Fields`) belong to CodeGen.** The generated `spCreateEntityField` procedure has no `EntityID`, `Name`, `Sequence`, `Type` or `IsVirtual` parameter, so push cannot create a field row; it can only update the business-level columns of one that exists. If a host database built from migrations is missing a field, such as a virtual field from a view, re-run CodeGen against a database with the schema change and fold its full output into the migration, so every install gets the row.
203
+
204
+ **Entity relationship rows (`MJ: Entity Relationships`) can be created by push.** `spCreateEntityRelationship` takes `EntityID`, `RelatedEntityID` and `RelatedEntityJoinField`, so an app can carry the relationships CodeGen does not infer in its own metadata folder (for example `entity-relationships/`) and push creates them.
205
+
200
206
  ## Performance: Preloading and Caching During Push
201
207
 
202
208
  The `push` command preloads existing records and caches files/lookups so the
@@ -715,12 +721,138 @@ An entity folder's `.mj-sync.json` can gate the whole folder on an environment v
715
721
  - `mj sync push` does not validate a folder it will skip. `mj sync validate` validates every folder, and warns about a `pushWhen` in a nested folder.
716
722
  - `mj sync watch` reads `pushWhen` too. See [Watch](#watch-mj-sync-watch).
717
723
 
724
+ ### A later folder that changes the same records (`overrides`)
725
+ Some records need two passes. A score model can only be Active once its factors exist, so one folder saves it as Draft and a later folder sets it to Active. Validation reports two entries that set a field of one record to different values, so the later folder lists the fields it changes on purpose:
726
+
727
+ ```json
728
+ {
729
+ "entity": "MJ_BizApps_Sonar: Score Models",
730
+ "overrides": [{ "folder": "sonar-score-models", "fields": ["Status"] }]
731
+ }
732
+ ```
733
+
734
+ - `folder` is the earlier folder, by its name under the metadata root, as in `directoryOrder`. Push must run it before the folder that lists it.
735
+ - `fields` are fields of the folder's entity. Names match without regard to case.
736
+ - Only the listed fields, and only against the named folder, are exempt. Two entries in the later folder that disagree, or a third folder that sets the field again without its own `overrides`, are still errors.
737
+ - Push needs no setting for this: it runs the folders in `directoryOrder`, so the later folder's value is the one saved.
738
+ - Validation reports an entry that is not `{ "folder", "fields" }`, a field the entity does not have, a folder that is not an entity folder under the root, the folder itself, and a folder that push runs later. When `--dir` names one entity folder, the folder checks are skipped.
739
+
718
740
  ### First-Class Composition Axes (`collections`, `embeds`, `extension`)
719
741
  MetadataSync natively supports three composition axes directly within `RecordData`, persisted in a single `Save()` call on the root entity graph:
720
742
  - **`collections`**: Declared `RelatedRecordCollection` sets (e.g. `Lines`, `AgendaItems`). Supports `upsert` mode (default: match by PK, leaves unmentioned items intact) and `authoritative` mode (configured in `.mj-sync.json`: computes deletion set, enforced with a 20% max implied delete safety rail unless `--allow-bulk-delete` is passed).
721
743
  - **`embeds`**: 1:1 peer record embeds keyed by foreign key field name (e.g. `ShipToAddressID`). Peer records are ensured and assigned before parent entity save.
722
744
  - **`extension`**: 1:1 IsA subtype extensions (e.g. `Event Order Lines` extending `Order Lines`). Leaf fields only (parent fields in leaf extensions are rejected during validation). Resolved automatically via prospective subtype resolution (`EnsureISAChild()`).
723
745
 
746
+ A collection can come from the entity's relationships or be declared in code by the entity class (`DeclareRelatedRecords`). `mj sync validate` accepts both.
747
+
748
+ #### Declared query children (`MJ: Queries`)
749
+
750
+ The `MJ: Queries` entity class declares three collections:
751
+
752
+ | Collection | Child entity | Join field |
753
+ |---|---|---|
754
+ | `Parameters` | `MJ: Query Parameters` | `QueryID` |
755
+ | `Fields` | `MJ: Query Fields` | `QueryID` |
756
+ | `Entities` | `MJ: Query Entities` | `QueryID` |
757
+
758
+ A query and the child rows it declares in these collections are saved as one graph, in one transaction: the query row first, then the declared children. When a query is saved, the server extracts its parameters, fields and entities from the SQL. That extraction runs after the declared children are written, so it sees them. A declared row wins over extraction for the same name (for an entity link, the same entity):
759
+
760
+ - In the save that writes it, extraction does not add a row with the same name, change the declared row, or remove it.
761
+ - If extraction created a row with that name earlier, that row is deleted in the same save and the declared row keeps the `primaryKey` the file gives it. A stored row whose `DetectionMethod` is `Manual` is never deleted this way.
762
+
763
+ Items in a collection leave out the join field (`QueryID`); the collection sets it from the parent. A shipped query, trimmed:
764
+
765
+ ```json
766
+ {
767
+ "fields": {
768
+ "Name": "AIUsageHourly",
769
+ "CategoryID": "@lookup:MJ: Query Categories.Name=AI",
770
+ "SQL": "@file:SQL/ai-usage-hourly.sql",
771
+ "Status": "Approved",
772
+ "UsesTemplate": true
773
+ },
774
+ "relatedEntities": {
775
+ "MJ: Query SQLs": [
776
+ {
777
+ "fields": {
778
+ "QueryID": "@parent:ID",
779
+ "SQLDialectID": "@lookup:MJ: SQL Dialects.PlatformKey=postgresql",
780
+ "SQL": "@file:SQL/ai-usage-hourly.pg.sql"
781
+ },
782
+ "primaryKey": { "ID": "FA5D47DB-CDAF-4338-86B7-29266623CBE4" }
783
+ }
784
+ ]
785
+ },
786
+ "collections": {
787
+ "Parameters": [
788
+ {
789
+ "fields": {
790
+ "Name": "start",
791
+ "Type": "date",
792
+ "IsRequired": false,
793
+ "SampleValue": "2024-01-01",
794
+ "Description": "Start UTC date/time boundary for filtering AI usage runs.",
795
+ "DetectionMethod": "Manual"
796
+ },
797
+ "primaryKey": { "ID": "673BA86F-96B3-4B7A-A568-0860413146E1" }
798
+ }
799
+ ],
800
+ "Fields": [
801
+ {
802
+ "fields": {
803
+ "Name": "HourBucket",
804
+ "Description": "The start of the hourly bucket as a DATETIME",
805
+ "IsSummary": false,
806
+ "DetectionMethod": "Manual"
807
+ },
808
+ "primaryKey": { "ID": "A10488B3-75FF-4E21-8C51-A3C70EE16A6D" }
809
+ }
810
+ ]
811
+ }
812
+ }
813
+ ```
814
+
815
+ `MJ: Query SQLs` (the dialect variants) has no declared collection, so it stays under `relatedEntities` and is saved after the query.
816
+
817
+ #### `relatedEntities` saved through a declared collection
818
+
819
+ The older `relatedEntities` format keeps working, and push never rewrites a file into another format. This form of the same parameter is still valid:
820
+
821
+ ```json
822
+ {
823
+ "fields": {
824
+ "Name": "AIUsageHourly",
825
+ "SQL": "@file:SQL/ai-usage-hourly.sql"
826
+ },
827
+ "relatedEntities": {
828
+ "MJ: Query Parameters": [
829
+ {
830
+ "fields": {
831
+ "QueryID": "@parent:ID",
832
+ "Name": "start",
833
+ "Type": "date",
834
+ "DetectionMethod": "Manual"
835
+ },
836
+ "primaryKey": { "ID": "673BA86F-96B3-4B7A-A568-0860413146E1" }
837
+ }
838
+ ]
839
+ }
840
+ }
841
+ ```
842
+
843
+ On `mj sync push`, when the parent entity declares a collection for the child entity of a `relatedEntities` group, the group's items are saved through that collection, in the parent's graph save, exactly as if the file had used `collections`. Otherwise push keeps the old behaviour: the children are saved separately, after the parent. A group is saved through the collection only when all of these hold:
844
+
845
+ - The record is a top-level record in its file (not itself a `relatedEntities` child).
846
+ - The parent declares exactly one collection for that child entity, and the collection is writable, can load, and does not number its items automatically (`SequenceOptions`).
847
+ - No item in the group has `deleteRecord` or its own nested `relatedEntities`.
848
+ - Each item either leaves the join field out or sets it to `@parent:<the parent's key field>`, for example `"QueryID": "@parent:ID"`.
849
+
850
+ New items saved this way get their keys written back into the file, the same as separately saved related records. A record with a group saved this way is always compared against the database, even with `--incremental`, because its stored checksum does not cover those items.
851
+
852
+ `mj sync pull` keeps each record's existing format: a record that holds the group under `relatedEntities` keeps it there, and one that holds it under `collections` keeps that. A record new to the file is written in the `collections` format whenever the parent declares a collection for the configured related entity on the configured foreign key; the join field is left out of each item. The queries folder pulls `MJ: Query Parameters` through `relatedEntities` in `.mj-sync.json`, so new query records are written with `collections.Parameters`.
853
+
854
+ A record's checksum covers its `collections` but not its `relatedEntities`. A record whose children move into `collections` therefore gets a different checksum once, and the next push treats it as changed one time.
855
+
724
856
 
725
857
  ### Primary Key Handling
726
858
  The tool automatically detects primary key fields from entity metadata:
@@ -1353,12 +1485,22 @@ SQL logging captures all database operations during push commands for creating m
1353
1485
  | `escapeFlywaySyntax` | boolean | false | Escape `${...}` in captured string data so Flyway does not read it as a placeholder. Always on with `formatAsMigration` |
1354
1486
  | `filterPatterns` | string[] | undefined | Patterns to filter SQL statements |
1355
1487
  | `filterType` | "exclude" or "include" | "exclude" | How to apply filter patterns |
1488
+ | `excludeTransactionalDefaults` | boolean | true | Leave out the built-in run and log statements listed below. Applies in exclude mode only |
1356
1489
  | `variableBatchThreshold` | number | 200 | Number of `DECLARE @...` variables to accumulate before emitting a batch separator (avoids SQL Server's 10,000-variable batch limit). `0` emits a separator per statement |
1357
1490
 
1358
1491
  **Filter Pattern Types:**
1359
1492
  - **Regex patterns**: Start with `/` and optionally end with flags (e.g., `/spCreate.*Run/i`)
1360
1493
  - **Simple wildcards**: Use `*` as a wildcard (e.g., `*AIPrompt*`)
1361
1494
 
1495
+ **Built-in exclusions:** while a push runs, the server can write run and log records of its own. These rows are activity records, not metadata, so a migration built from the log should not carry them. In exclude mode (the default) push adds patterns that leave out the `spCreate` and `spUpdate` calls for these entities, on top of your own `filterPatterns`:
1496
+
1497
+ - `MJ: AI Prompt Runs` (`spCreateAIPromptRun`, `spUpdateAIPromptRun`)
1498
+ - `MJ: AI Agent Runs` (`spCreateAIAgentRun`, `spUpdateAIAgentRun`)
1499
+ - `MJ: AI Agent Run Steps` (`spCreateAIAgentRunStep`, `spUpdateAIAgentRunStep`)
1500
+ - `MJ: Action Execution Logs` (`spCreateActionExecutionLog`, `spUpdateActionExecutionLog`)
1501
+
1502
+ Each pattern matches the whole procedure name, so related entities such as `MJ: AI Agent Run Medias` are still logged. Set `"excludeTransactionalDefaults": false` to log these statements. With `"filterType": "include"` the built-in patterns are never added: the log already holds only what your patterns match.
1503
+
1362
1504
  ### User Role Validation
1363
1505
 
1364
1506
  Validates UserID fields against specific roles in the MemberJunction system:
@@ -1577,6 +1719,8 @@ Benefits:
1577
1719
  - **Cleaner Organization**: Fewer files to manage
1578
1720
  - **Relationship Clarity**: Visual representation of data relationships
1579
1721
 
1722
+ When the parent entity declares a collection for a child entity (for example `MJ: Queries` declares `Parameters`, `Fields` and `Entities`), push saves that `relatedEntities` group through the collection, in the parent's graph save, and pull writes new records with `collections`. See [`relatedEntities` saved through a declared collection](#relatedentities-saved-through-a-declared-collection).
1723
+
1580
1724
  ## Recursive Patterns
1581
1725
 
1582
1726
  The tool supports automatic recursive patterns for self-referencing entities, eliminating the need to manually define each nesting level for hierarchical data structures.
@@ -1761,6 +1905,7 @@ mj sync pull --entity="AI Prompts" --no-validate
1761
1905
  **Record Conflicts:**
1762
1906
  - Several entries (in one file or in several files) can describe the same record: the same entity and `primaryKey`. This is allowed when they do not disagree.
1763
1907
  - Two such entries that set the same field to different raw values are an error. The message names the entity, the `primaryKey` and the field, and gives the full path and start line (`path:line`) of each entry.
1908
+ - A later folder can change listed fields of records an earlier folder sets. See [`overrides`](#a-later-folder-that-changes-the-same-records-overrides).
1764
1909
  - Entries whose `primaryKey` holds an `@parent:`, `@owner:` or `@root:` reference (also inside a `@lookup:`), or an object value, are not compared, because the same text can name different records.
1765
1910
 
1766
1911
  **Reference Validation:**
@@ -1833,7 +1978,7 @@ Errors
1833
1978
  | `Lookup not found` | No matching record | Verify lookup value or use ?create |
1834
1979
  | `Circular dependency` | A -> B -> A references | Restructure to avoid cycles |
1835
1980
  | `Required field missing` | Missing required field | Add field with appropriate value |
1836
- | `Conflicting values for <entity> record …` | Two entries for one record set a field to different values | Set the same value in both entries, or set the field in one entry only |
1981
+ | `Conflicting values for <entity> record …` | Two entries for one record set a field to different values | Set the same value in both entries, or set the field in one entry only. If a later folder changes the field on purpose, list it in that folder's [`overrides`](#a-later-folder-that-changes-the-same-records-overrides) |
1837
1982
  | `@template: is not supported by mj sync push` | A field value starts with `@template:` | Use `@file:` instead |
1838
1983
 
1839
1984
  ## Programmatic Usage
package/dist/config.d.ts CHANGED
@@ -135,6 +135,13 @@ export interface SyncConfig {
135
135
  * - 'include': If ANY pattern matches, the SQL IS logged
136
136
  */
137
137
  filterType?: 'exclude' | 'include';
138
+ /**
139
+ * Whether push also leaves out the create and update calls for run and log records the server
140
+ * writes during a push: AI prompt runs, AI agent runs, AI agent run steps and action execution
141
+ * logs. Defaults to true. These patterns are added to `filterPatterns` in exclude mode only;
142
+ * with `filterType: 'include'` they are never added. Set to false to log those statements.
143
+ */
144
+ excludeTransactionalDefaults?: boolean;
138
145
  /** Whether to output verbose debug information to console (default: false) */
139
146
  verboseOutput?: boolean;
140
147
  /**
@@ -228,6 +235,17 @@ export interface RelatedEntityConfig {
228
235
  /** Nested related entities for deep object graphs */
229
236
  relatedEntities?: Record<string, RelatedEntityConfig>;
230
237
  }
238
+ /**
239
+ * One entry of an entity folder's `overrides`: the fields this folder sets again, to a different
240
+ * value, on records that an earlier folder also sets. For example, a folder that saves models as
241
+ * Draft and a later folder that sets them to Active once their children exist.
242
+ */
243
+ export interface FolderOverride {
244
+ /** The earlier folder, by its name under the metadata root, as in `directoryOrder` */
245
+ folder: string;
246
+ /** The entity fields this folder may set to a different value than that folder */
247
+ fields: string[];
248
+ }
231
249
  /**
232
250
  * Entity-specific configuration
233
251
  *
@@ -254,6 +272,12 @@ export interface EntityConfig {
254
272
  * for example "@env:DEMO_AGENTS_ENABLED". Otherwise push skips the folder and logs it.
255
273
  */
256
274
  pushWhen?: string;
275
+ /**
276
+ * Fields this folder sets on purpose to a different value than an earlier folder sets for the
277
+ * same record. Validation does not report those fields as conflicting. Each `folder` is a sibling
278
+ * folder under the same metadata root that push runs earlier.
279
+ */
280
+ overrides?: FolderOverride[];
257
281
  /**
258
282
  * Declarative collection configuration for composition axes.
259
283
  * Key is collection property name (e.g. "Lines", "Payments").
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,mGAAmG;IACnG,UAAU,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IACxC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;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gB,CAAC,GAAW;IAChD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAW;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAErD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,gDAAgD;AAChD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAW;IAChD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -52,7 +52,7 @@ export { WatchService } from './services/WatchService.js';
52
52
  export type { WatchOptions, WatchCallbacks, WatchResult } from './services/WatchService.js';
53
53
  export { ValidationService } from './services/ValidationService.js';
54
54
  export { FormattingService } from './services/FormattingService.js';
55
- export { LoadMJConfig, loadMJConfig, LoadSyncConfig, loadSyncConfig, LoadEntityConfig, loadEntityConfig, LoadFolderConfig, loadFolderConfig, type EntityConfig, type FolderConfig, type RelatedEntityConfig } from './config.js';
55
+ export { LoadMJConfig, loadMJConfig, LoadSyncConfig, loadSyncConfig, LoadEntityConfig, loadEntityConfig, LoadFolderConfig, loadFolderConfig, type EntityConfig, type FolderConfig, type FolderOverride, type RelatedEntityConfig } from './config.js';
56
56
  export { InitializeProvider, initializeProvider, CleanupProvider, cleanupProvider, GetSystemUser, getSystemUser, FindEntityDirectories, findEntityDirectories, GetDataProvider, getDataProvider } from './lib/provider-utils.js';
57
57
  export type { ValidationResult, ValidationError, ValidationWarning, EntityDependency, FileValidationResult, ValidationOptions, ReferenceType, ParsedReference } from './types/validation.js';
58
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,8DAA8D,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,Y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iBAAiB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAGpH,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,sBAAsB;AACtB,OAAO,EACL,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAKnC,MAAM,UAAU,CAAC;AAElB,qBAAqB;AACrB,OAAO,EACL,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,EAC5C,eAAe,EAAE,eAAe,EACjC,MAAM,sBAAsB,CAAC"}
@@ -183,6 +183,17 @@ export declare class RecordProcessor {
183
183
  * Calculates sync metadata including checksum and last modified timestamp
184
184
  */
185
185
  private calculateSyncMetadata;
186
+ /**
187
+ * The declared collection a configured related entity is written as on pull, or `undefined` to
188
+ * write it under `relatedEntities` as before.
189
+ *
190
+ * Pull keeps the format the author chose: a record whose file holds the group under
191
+ * `relatedEntities` keeps it there, and one that holds it under `collections` keeps that. A record
192
+ * new to the file is written in the `collections` format whenever the parent declares a collection
193
+ * for the related entity on the configured foreign key, since push saves it through that collection
194
+ * either way. A collection another step of the pull already wrote is left as it is.
195
+ */
196
+ private collectionFormatFor;
186
197
  /**
187
198
  * Processes first-class collections on pull (§6)
188
199
  */
@@ -211,4 +222,9 @@ export declare class RecordProcessor {
211
222
  */
212
223
  private convertGuidToLookup;
213
224
  }
225
+ /**
226
+ * A pulled related record without its join field, for writing as a collection item: the collection
227
+ * sets the join field to the parent's key when it saves.
228
+ */
229
+ export declare function WithoutJoinField(child: RecordData, joinField: string): RecordData;
214
230
  //# sourceMappingURL=RecordProcessor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecordProcessor.d.ts","sourceRoot":"","sources":["../../src/lib/RecordProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA+C,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIzG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAWzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AA+BhD;;GAEG;AACH,qBAAa,eAAe;IAWxB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,WAAW;IAXrB,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,oBAAoB,CAAuB;IAEnD,wEAAwE;IACjE,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAC9D,gHAAgH;IAChH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkD;gBAGzE,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,QAAQ;IAO/B;;;OAGG;IACG,4BAA4B,CAChC,iBAAiB,EAAE,MAAM,EAAE,EAC3B,cAAc,EAAE,mBAAmB,EACnC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAIrC,4DAA4D;IACtD,4BAA4B,CAChC,iBAAiB,EAAE,MAAM,EAAE,EAC3B,cAAc,EAAE,mBAAmB,EACnC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAIrC;;OAEG;IACG,aAAa,CAC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CAAC,mBAAmB;IAY3B,wGAAwG;IACxG,OAAO,CAAC,uBAAuB;IAe/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAO7B;;OAEG;YACW,mBAAmB;CAwClC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAQjF"}
@@ -7,6 +7,7 @@ import { JsonWriteHelper } from './json-write-helper.js';
7
7
  import { EntityPropertyExtractor } from './EntityPropertyExtractor.js';
8
8
  import { FieldExternalizer } from './FieldExternalizer.js';
9
9
  import { RelatedEntityHandler } from './RelatedEntityHandler.js';
10
+ import { DeclaredCollectionsOf } from './collection-promotion.js';
10
11
  import { FindSubPropertyExternalizations, ExternalizeSubProperties, FieldExternalizerAdapter, } from './json-subproperty-externalization.js';
11
12
  import { METADATA_KEYWORDS, ExtractKeywordValue, createKeywordReference, IsMetadataKeyword } from '../constants/metadata-keywords.js';
12
13
  import { HasNestedEnvReference, IsJsonContainer, KeepEnvReference, KeepNestedEnvReferences, ParseEnvReference, } from './env-reference.js';
@@ -91,7 +92,7 @@ export class RecordProcessor {
91
92
  // Process embeds if present (§6)
92
93
  await this.processEmbeds(record, targetDir, entityConfig, embeds, currentDepth, ancestryPath, verbose, existingRecordData);
93
94
  // Process related entities if configured
94
- await this.processRelatedEntities(record, entityConfig, existingRecordData, currentDepth, ancestryPath, relatedEntities, verbose, batchedRelatedData);
95
+ await this.processRelatedEntities(record, entityConfig, existingRecordData, currentDepth, ancestryPath, relatedEntities, verbose, batchedRelatedData, collections);
95
96
  return {
96
97
  fields,
97
98
  ...(Object.keys(collections).length > 0 ? { collections } : {}),
@@ -637,13 +638,17 @@ export class RecordProcessor {
637
638
  /**
638
639
  * Processes related entities for the record
639
640
  */
640
- async processRelatedEntities(record, entityConfig, existingRecordData, currentDepth, ancestryPath, relatedEntities, verbose, batchedRelatedData) {
641
+ async processRelatedEntities(record, entityConfig, existingRecordData, currentDepth, ancestryPath, relatedEntities, verbose, batchedRelatedData, collections = {}) {
641
642
  if (!entityConfig.pull?.relatedEntities) {
642
643
  return;
643
644
  }
645
+ const declared = record.HasCompanions ? DeclaredCollectionsOf(record) : new Map();
644
646
  for (const [relationKey, relationConfig] of Object.entries(entityConfig.pull.relatedEntities)) {
645
647
  try {
646
- const existingRelated = existingRecordData?.relatedEntities?.[relationKey] || [];
648
+ const promotion = this.collectionFormatFor(declared, relationConfig, relationKey, existingRecordData, collections);
649
+ const existingRelated = promotion
650
+ ? existingRecordData?.collections?.[promotion.CollectionName] ?? []
651
+ : existingRecordData?.relatedEntities?.[relationKey] || [];
647
652
  let relatedRecords;
648
653
  if (batchedRelatedData && batchedRelatedData.has(relationKey)) {
649
654
  // Use pre-fetched batch data — avoids per-parent queries
@@ -653,7 +658,10 @@ export class RecordProcessor {
653
658
  // Fall back to per-record loading (original behavior)
654
659
  relatedRecords = await this.relatedEntityHandler.loadRelatedEntities(record, relationConfig, entityConfig, existingRelated, this.ProcessRecord.bind(this), currentDepth, ancestryPath, verbose);
655
660
  }
656
- if (relatedRecords.length > 0) {
661
+ if (relatedRecords.length > 0 && promotion) {
662
+ collections[promotion.CollectionName] = relatedRecords.map((child) => WithoutJoinField(child, promotion.JoinField));
663
+ }
664
+ else if (relatedRecords.length > 0) {
657
665
  relatedEntities[relationKey] = relatedRecords;
658
666
  }
659
667
  }
@@ -710,6 +718,32 @@ export class RecordProcessor {
710
718
  };
711
719
  }
712
720
  }
721
+ /**
722
+ * The declared collection a configured related entity is written as on pull, or `undefined` to
723
+ * write it under `relatedEntities` as before.
724
+ *
725
+ * Pull keeps the format the author chose: a record whose file holds the group under
726
+ * `relatedEntities` keeps it there, and one that holds it under `collections` keeps that. A record
727
+ * new to the file is written in the `collections` format whenever the parent declares a collection
728
+ * for the related entity on the configured foreign key, since push saves it through that collection
729
+ * either way. A collection another step of the pull already wrote is left as it is.
730
+ */
731
+ collectionFormatFor(declared, relationConfig, relationKey, existingRecordData, collections) {
732
+ const promotion = declared.get(relationConfig.entity.trim().toLowerCase());
733
+ if (!promotion || promotion.JoinField.toLowerCase() !== relationConfig.foreignKey.toLowerCase()) {
734
+ return undefined;
735
+ }
736
+ if (collections[promotion.CollectionName] !== undefined) {
737
+ return undefined;
738
+ }
739
+ if (!existingRecordData) {
740
+ return promotion;
741
+ }
742
+ if (existingRecordData.relatedEntities?.[relationKey] !== undefined) {
743
+ return undefined;
744
+ }
745
+ return existingRecordData.collections?.[promotion.CollectionName] !== undefined ? promotion : undefined;
746
+ }
713
747
  /**
714
748
  * Processes first-class collections on pull (§6)
715
749
  */
@@ -920,4 +954,17 @@ export class RecordProcessor {
920
954
  }
921
955
  }
922
956
  }
957
+ /**
958
+ * A pulled related record without its join field, for writing as a collection item: the collection
959
+ * sets the join field to the parent's key when it saves.
960
+ */
961
+ export function WithoutJoinField(child, joinField) {
962
+ const fields = {};
963
+ for (const [name, value] of Object.entries(child.fields ?? {})) {
964
+ if (name.toLowerCase() !== joinField.toLowerCase()) {
965
+ fields[name] = value;
966
+ }
967
+ }
968
+ return { ...child, fields };
969
+ }
923
970
  //# sourceMappingURL=RecordProcessor.js.map