@nextage/era-lib 1.0.197 → 1.0.198

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.
@@ -38,12 +38,19 @@ export declare function purgeDeadline(purgeValidity?: string | number, from?: Da
38
38
  * writes the outbox row - so it can only be archived from the document in hand,
39
39
  * before or after that call, never by reading it back.
40
40
  *
41
+ * ⚠️ IDEMPOTENT: a document whose `_id` is already archived for this
42
+ * `(tenantId, sourceCollection)` is skipped rather than filed twice. Redelivery is
43
+ * not hypothetical - `NatsListener` retries three times before the DLQ - and a
44
+ * duplicate entry is not harmless: {@link restoreDocuments} reinserts documents
45
+ * verbatim, `_id` included, so the second copy makes the RESTORE fail on a duplicate
46
+ * key, for the very tenant whose deletion already went wrong.
47
+ *
41
48
  * @param archive the shared `tenantArchive` store
42
49
  * @param sourceCollection where the documents came from, and where a restore puts them
43
50
  * @param documents the documents themselves, archived verbatim
44
51
  * @param tenantId the organization being deleted
45
52
  * @param purgeAt the shared deadline for the whole cascade
46
- * @returns how many entries were written
53
+ * @returns how many entries were written, and how many were already there
47
54
  */
48
55
  export declare function archiveEntries(archive: TenantArchiveStore, sourceCollection: string, documents: Record<string, unknown>[], tenantId: string, purgeAt: Date): Promise<ArchiveOutcome>;
49
56
  /**
@@ -58,6 +65,11 @@ export declare function archiveEntries(archive: TenantArchiveStore, sourceCollec
58
65
  * places, which the restore tolerates (it puts back what is already there, by `_id`)
59
66
  * whereas the opposite ordering would leave them in NEITHER.
60
67
  *
68
+ * ⚠️ The removal is driven by what was FOUND in the source, not by what was written
69
+ * to the archive: on a redelivery every document is already filed, so
70
+ * `archiveEntries` writes nothing, and gating the removal on that count would leave
71
+ * the source full forever - the retry could never converge.
72
+ *
61
73
  * The document is archived VERBATIM, `_id` included: relations across collections are
62
74
  * by `_id`, so regenerating one would restore a tenant whose relations no longer match.
63
75
  *
@@ -66,7 +78,7 @@ export declare function archiveEntries(archive: TenantArchiveStore, sourceCollec
66
78
  * @param filter which documents belong to the tenant, as only the caller knows
67
79
  * @param tenantId the organization being deleted
68
80
  * @param purgeAt the shared deadline for the whole cascade - see {@link purgeDeadline}
69
- * @returns how many documents were moved
81
+ * @returns how many documents were archived, and how many were already there
70
82
  */
71
83
  export declare function archiveDocuments(source: ArchivableModel, archive: TenantArchiveStore, filter: Record<string, unknown>, tenantId: string, purgeAt: Date): Promise<ArchiveOutcome>;
72
84
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tenant-archive.d.ts","sourceRoot":"","sources":["../../src/services/tenant-archive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;+FAc+F;AAI/F,OAAO,EAAE,eAAe,EAAE,MAAS,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAU,6BAA6B,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKjE;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,GAAE,IAAiB,GAAG,IAAI,CAG5F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAW,kBAAkB,EACpC,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC3C,QAAQ,EAAU,MAAM,EACxB,OAAO,EAAW,IAAI,GACrB,OAAO,CAAC,cAAc,CAAC,CAWzB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAI,eAAe,EACzB,OAAO,EAAG,kBAAkB,EAC5B,MAAM,EAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAG,IAAI,GACb,OAAO,CAAC,cAAc,CAAC,CAWzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAI,eAAe,EACzB,OAAO,EAAG,kBAAkB,EAC5B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC,CAYzB"}
1
+ {"version":3,"file":"tenant-archive.d.ts","sourceRoot":"","sources":["../../src/services/tenant-archive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;+FAc+F;AAI/F,OAAO,EAAE,eAAe,EAAE,MAAS,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAU,6BAA6B,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKjE;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,GAAE,IAAiB,GAAG,IAAI,CAG5F;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAW,kBAAkB,EACpC,gBAAgB,EAAE,MAAM,EACxB,SAAS,EAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC3C,QAAQ,EAAU,MAAM,EACxB,OAAO,EAAW,IAAI,GACrB,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAsDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAI,eAAe,EACzB,OAAO,EAAG,kBAAkB,EAC5B,MAAM,EAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAG,IAAI,GACb,OAAO,CAAC,cAAc,CAAC,CAWzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAI,eAAe,EACzB,OAAO,EAAG,kBAAkB,EAC5B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC,CAYzB"}
@@ -44,8 +44,20 @@ export interface TenantArchiveStore {
44
44
  }
45
45
  /** What a single archive or restore actually moved. */
46
46
  export interface ArchiveOutcome {
47
- /** Documents moved out of (or back into) the source collection. */
47
+ /** Entries actually written to (or read back from) the archive. */
48
48
  moved: number;
49
+ /**
50
+ * Documents NOT re-archived because an entry for the same `_id` was already
51
+ * there.
52
+ *
53
+ * Only ever non-zero on a REDELIVERY: a listener whose archive write succeeded
54
+ * and whose source removal did not gets the message again, finds the documents
55
+ * still in place, and would file a second copy of each. That copy is not
56
+ * harmless - the restore reinserts documents verbatim, `_id` included, so a
57
+ * duplicated entry makes the restore fail on a duplicate key, precisely for the
58
+ * tenant that already had trouble.
59
+ */
60
+ skipped: number;
49
61
  /** The source collection, echoed back so a caller can log the cascade. */
50
62
  sourceCollection: string;
51
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tenant-archive.interfaces.d.ts","sourceRoot":"","sources":["../../src/services/tenant-archive.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAE9B,OAAO,EAAE;QACP,UAAU,EAAE;YAAE,cAAc,EAAE,MAAM,CAAA;SAAE,CAAC;KACxC,CAAC;IAEF,UAAU,CAAG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;KAAE,CAAC;IACjG,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAIlF,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IAEjC,UA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CAAC;IAIlF,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IAEjC,UAAU,CAAO,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;KAAE,CAAC;IACrG,YAAY,CAAK,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtF,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AAED,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAE7B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;OAUG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,yFAAyF;AACzF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -46,20 +46,68 @@ function purgeDeadline(purgeValidity, from = new Date()) {
46
46
  * writes the outbox row - so it can only be archived from the document in hand,
47
47
  * before or after that call, never by reading it back.
48
48
  *
49
+ * ⚠️ IDEMPOTENT: a document whose `_id` is already archived for this
50
+ * `(tenantId, sourceCollection)` is skipped rather than filed twice. Redelivery is
51
+ * not hypothetical - `NatsListener` retries three times before the DLQ - and a
52
+ * duplicate entry is not harmless: {@link restoreDocuments} reinserts documents
53
+ * verbatim, `_id` included, so the second copy makes the RESTORE fail on a duplicate
54
+ * key, for the very tenant whose deletion already went wrong.
55
+ *
49
56
  * @param archive the shared `tenantArchive` store
50
57
  * @param sourceCollection where the documents came from, and where a restore puts them
51
58
  * @param documents the documents themselves, archived verbatim
52
59
  * @param tenantId the organization being deleted
53
60
  * @param purgeAt the shared deadline for the whole cascade
54
- * @returns how many entries were written
61
+ * @returns how many entries were written, and how many were already there
55
62
  */
56
63
  async function archiveEntries(archive, sourceCollection, documents, tenantId, purgeAt) {
57
64
  if (!documents.length)
58
- return { moved: 0, sourceCollection };
65
+ return { moved: 0, skipped: 0, sourceCollection };
66
+ const pending = await withoutAlreadyArchived(archive, sourceCollection, documents, tenantId);
67
+ const skipped = documents.length - pending.length;
68
+ if (!pending.length)
69
+ return { moved: 0, skipped, sourceCollection };
59
70
  const archivedAt = new Date();
60
- const entries = documents.map((doc) => ({ tenantId, sourceCollection, doc, archivedAt, purgeAt }));
71
+ const entries = pending.map((doc) => ({ tenantId, sourceCollection, doc, archivedAt, purgeAt }));
61
72
  await archive.insertManyNative(entries, {});
62
- return { moved: documents.length, sourceCollection };
73
+ return { moved: pending.length, skipped, sourceCollection };
74
+ }
75
+ /**
76
+ * Drops from `documents` the ones already filed for this tenant and collection.
77
+ *
78
+ * Asks the archive only about the `_id`s at hand, rather than reading every entry of
79
+ * the tenant: the cascade files whole collections, so the second form would grow with
80
+ * the tenant instead of with the batch.
81
+ */
82
+ async function withoutAlreadyArchived(archive, sourceCollection, documents, tenantId) {
83
+ const ids = documents.map(doc => doc._id).filter(id => id !== undefined && id !== null);
84
+ if (!ids.length)
85
+ return documents;
86
+ const filed = await archive.listNative({ tenantId, sourceCollection, 'doc._id': { $in: ids } }).toArray();
87
+ if (!filed.length)
88
+ return documents;
89
+ // Compared as strings: an `_id` is an ObjectId, and two ObjectId instances for
90
+ // the same value are never `===`. Keys that came out empty are dropped, so a
91
+ // document without an `_id` can never match one.
92
+ const already = new Set(filed.map(entry => idKey(entry.doc?._id)).filter(key => !!key));
93
+ return documents.filter(doc => !already.has(idKey(doc._id)));
94
+ }
95
+ /**
96
+ * The string form of an `_id`, used as a comparison key.
97
+ *
98
+ * Spelled out rather than left to `String(...)` because the documents are typed
99
+ * `Record<string, unknown>`: at runtime an `_id` is an ObjectId, whose `toString`
100
+ * yields the hex form we want, but nothing in the type says so. That gap is not
101
+ * cosmetic - a value stringifying to `'[object Object]'` would give EVERY document
102
+ * the same key, the set would report them all as already archived, and the archive
103
+ * would silently be skipped for the whole collection.
104
+ *
105
+ * @returns the key, or an empty string when there is no id to speak of
106
+ */
107
+ function idKey(id) {
108
+ if (id === undefined || id === null)
109
+ return '';
110
+ return typeof id === 'string' ? id : id.toString();
63
111
  }
64
112
  /**
65
113
  * Moves every document matching `filter` out of `source` and into the archive.
@@ -73,6 +121,11 @@ async function archiveEntries(archive, sourceCollection, documents, tenantId, pu
73
121
  * places, which the restore tolerates (it puts back what is already there, by `_id`)
74
122
  * whereas the opposite ordering would leave them in NEITHER.
75
123
  *
124
+ * ⚠️ The removal is driven by what was FOUND in the source, not by what was written
125
+ * to the archive: on a redelivery every document is already filed, so
126
+ * `archiveEntries` writes nothing, and gating the removal on that count would leave
127
+ * the source full forever - the retry could never converge.
128
+ *
76
129
  * The document is archived VERBATIM, `_id` included: relations across collections are
77
130
  * by `_id`, so regenerating one would restore a tenant whose relations no longer match.
78
131
  *
@@ -81,13 +134,13 @@ async function archiveEntries(archive, sourceCollection, documents, tenantId, pu
81
134
  * @param filter which documents belong to the tenant, as only the caller knows
82
135
  * @param tenantId the organization being deleted
83
136
  * @param purgeAt the shared deadline for the whole cascade - see {@link purgeDeadline}
84
- * @returns how many documents were moved
137
+ * @returns how many documents were archived, and how many were already there
85
138
  */
86
139
  async function archiveDocuments(source, archive, filter, tenantId, purgeAt) {
87
140
  const sourceCollection = source.mgModel.collection.collectionName;
88
141
  const documents = await source.listNative(filter).toArray();
89
142
  const outcome = await archiveEntries(archive, sourceCollection, documents, tenantId, purgeAt);
90
- if (outcome.moved)
143
+ if (documents.length)
91
144
  await source.removeNative(filter);
92
145
  return outcome;
93
146
  }
@@ -112,9 +165,9 @@ async function restoreDocuments(source, archive, tenantId) {
112
165
  const sourceCollection = source.mgModel.collection.collectionName;
113
166
  const entries = await archive.listNative({ tenantId, sourceCollection }).toArray();
114
167
  if (!entries.length)
115
- return { moved: 0, sourceCollection };
168
+ return { moved: 0, skipped: 0, sourceCollection };
116
169
  await source.insertManyNative(entries.map(entry => entry.doc), {});
117
170
  await archive.removeNative({ tenantId, sourceCollection });
118
- return { moved: entries.length, sourceCollection };
171
+ return { moved: entries.length, skipped: 0, sourceCollection };
119
172
  }
120
173
  //# sourceMappingURL=tenant-archive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tenant-archive.js","sourceRoot":"","sources":["../../src/services/tenant-archive.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+FAc+F;;AAwB/F,sCAGC;AAkBD,wCAiBC;AAwBD,4CAiBC;AAmBD,4CAgBC;AAxID,4CAAqD;AAOrD,mFAAmF;AACnF,MAAM,gBAAgB,GAAG,EAAE,GAAG,QAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,SAAgB,aAAa,CAAC,aAA+B,EAAE,OAAa,IAAI,IAAI,EAAE;IAEpF,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,IAAA,wBAAe,EAAC,aAAa,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC;AACzF,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,cAAc,CAClC,OAAoC,EACpC,gBAAwB,EACxB,SAA2C,EAC3C,QAAwB,EACxB,OAAsB;IAGtB,IAAI,CAAC,SAAS,CAAC,MAAM;QACnB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAExC,MAAM,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAM,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAqB,EAAE,CAAC,CAA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,EAAE,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAqB,CAAC;IAE/G,IAAI,CAAC,OAAO,CAAC,MAAM;QACjB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAEpD,MAAM,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAA8B,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9F,MAAM,OAAO,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAE3D,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,gBAAgB,EAAE,CAAC;AACjE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextage/era-lib",
3
- "version": "1.0.197",
3
+ "version": "1.0.198",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [