@rpcbase/db 0.137.0 → 0.139.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/dist/ensureMongooseConnection.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -8
- package/dist/index.js.map +1 -1
- package/dist/migrations/20260814090000-baseline-global.d.ts +3 -0
- package/dist/migrations/20260814090000-baseline-global.d.ts.map +1 -0
- package/dist/migrations/20260814090100-baseline-tenant.d.ts +3 -0
- package/dist/migrations/20260814090100-baseline-tenant.d.ts.map +1 -0
- package/dist/migrations/20260816090000-runtime-rts-retention.d.ts +3 -0
- package/dist/migrations/20260816090000-runtime-rts-retention.d.ts.map +1 -0
- package/dist/migrations/baselineResources.d.ts +2 -0
- package/dist/migrations/baselineResources.d.ts.map +1 -0
- package/dist/migrations/currentResources.d.ts +2 -0
- package/dist/migrations/currentResources.d.ts.map +1 -0
- package/dist/migrations/index.d.ts +5 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +543 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/resources.d.ts +2 -0
- package/dist/migrations/resources.d.ts.map +1 -0
- package/dist/migrations/rtsChanges.d.ts +2 -0
- package/dist/migrations/rtsChanges.d.ts.map +1 -0
- package/dist/migrations/runtimeRtsRetentionResources.d.ts +2 -0
- package/dist/migrations/runtimeRtsRetentionResources.d.ts.map +1 -0
- package/dist/models/RBRtsChange.d.ts.map +1 -1
- package/dist/models/RBTenant.d.ts +8 -0
- package/dist/models/RBTenant.d.ts.map +1 -1
- package/dist/models/RBTenantSubscriptionEvent.d.ts +11 -11
- package/dist/models/RBTenantSubscriptionProjection.d.ts +1 -1
- package/dist/modelsApi.d.ts.map +1 -1
- package/dist/mongoResources.d.ts +7 -0
- package/dist/mongoResources.d.ts.map +1 -0
- package/dist/registerModels.d.ts +6 -1
- package/dist/registerModels.d.ts.map +1 -1
- package/dist/rtsChanges-xIGFCLGa.js +7 -0
- package/dist/rtsChanges-xIGFCLGa.js.map +1 -0
- package/dist/tenantProvisioning.d.ts +18 -0
- package/dist/tenantProvisioning.d.ts.map +1 -0
- package/package.json +13 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260814090000-baseline-global.d.ts","sourceRoot":"","sources":["../../src/migrations/20260814090000-baseline-global.ts"],"names":[],"mappings":";AAGA,wBA+BE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260814090100-baseline-tenant.d.ts","sourceRoot":"","sources":["../../src/migrations/20260814090100-baseline-tenant.ts"],"names":[],"mappings":";AAGA,wBA+BE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260816090000-runtime-rts-retention.d.ts","sourceRoot":"","sources":["../../src/migrations/20260816090000-runtime-rts-retention.ts"],"names":[],"mappings":";AAGA,wBAqBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baselineResources.d.ts","sourceRoot":"","sources":["../../src/migrations/baselineResources.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,8CAqTxC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currentResources.d.ts","sourceRoot":"","sources":["../../src/migrations/currentResources.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,+BAA+B,oDAyB3C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAInD,OAAO,EAAE,qBAAqB,EAAE,CAAA;AAEhC,eAAO,MAAM,sBAAsB,+CAajC,CAAA;AAEF,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { t as rtsChangesTtlSeconds } from "../rtsChanges-xIGFCLGa.js";
|
|
2
|
+
import { defineMigration, defineMigrationSource, defineMongoResources } from "@rpcbase/migrations";
|
|
3
|
+
//#region src/migrations/20260814090000-baseline-global.ts
|
|
4
|
+
var _20260814090000_baseline_global_default = defineMigration({
|
|
5
|
+
__rpcbaseIntegrity: "1e3bb48e914f377136a22d79a78ba4164eb457be097003a675cfb8864df8baf2",
|
|
6
|
+
id: "20260814090000-baseline-global",
|
|
7
|
+
scope: "global",
|
|
8
|
+
mode: "online",
|
|
9
|
+
rollback: "compatible",
|
|
10
|
+
resources: {
|
|
11
|
+
before: null,
|
|
12
|
+
after: "62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816"
|
|
13
|
+
},
|
|
14
|
+
async up({ helpers, resources }) {
|
|
15
|
+
if (!resources) throw new Error("Missing baseline resource snapshot");
|
|
16
|
+
for (const index of resources.after.indexes) {
|
|
17
|
+
if (index.options?.unique !== true) continue;
|
|
18
|
+
const sparseFilter = index.options.sparse === true ? { $or: Object.keys(index.key).map((field) => ({ [field]: { $exists: true } })) } : void 0;
|
|
19
|
+
const partialFilter = index.options.partialFilterExpression;
|
|
20
|
+
const filter = sparseFilter && partialFilter ? { $and: [partialFilter, sparseFilter] } : partialFilter ?? sparseFilter;
|
|
21
|
+
const duplicates = await helpers.findDuplicateKeys(index.collection, index.key, {
|
|
22
|
+
...filter ? { filter } : {},
|
|
23
|
+
...index.options.collation ? { collation: index.options.collation } : {}
|
|
24
|
+
});
|
|
25
|
+
if (duplicates.length > 0) throw new Error(`Cannot create unique index ${index.collection}.${index.name}: ${JSON.stringify(duplicates)}`);
|
|
26
|
+
}
|
|
27
|
+
await helpers.reconcileResources(resources.after);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/migrations/20260814090100-baseline-tenant.ts
|
|
32
|
+
var _20260814090100_baseline_tenant_default = defineMigration({
|
|
33
|
+
__rpcbaseIntegrity: "0a4fed8912aa300fdd36d7a783e2c00cf5db9a84057d1287340b236edfcd89e4",
|
|
34
|
+
id: "20260814090100-baseline-tenant",
|
|
35
|
+
scope: "tenant",
|
|
36
|
+
mode: "online",
|
|
37
|
+
rollback: "compatible",
|
|
38
|
+
resources: {
|
|
39
|
+
before: null,
|
|
40
|
+
after: "62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816"
|
|
41
|
+
},
|
|
42
|
+
async up({ helpers, resources }) {
|
|
43
|
+
if (!resources) throw new Error("Missing baseline resource snapshot");
|
|
44
|
+
for (const index of resources.after.indexes) {
|
|
45
|
+
if (index.options?.unique !== true) continue;
|
|
46
|
+
const sparseFilter = index.options.sparse === true ? { $or: Object.keys(index.key).map((field) => ({ [field]: { $exists: true } })) } : void 0;
|
|
47
|
+
const partialFilter = index.options.partialFilterExpression;
|
|
48
|
+
const filter = sparseFilter && partialFilter ? { $and: [partialFilter, sparseFilter] } : partialFilter ?? sparseFilter;
|
|
49
|
+
const duplicates = await helpers.findDuplicateKeys(index.collection, index.key, {
|
|
50
|
+
...filter ? { filter } : {},
|
|
51
|
+
...index.options.collation ? { collation: index.options.collation } : {}
|
|
52
|
+
});
|
|
53
|
+
if (duplicates.length > 0) throw new Error(`Cannot create unique index ${index.collection}.${index.name}: ${JSON.stringify(duplicates)}`);
|
|
54
|
+
}
|
|
55
|
+
await helpers.reconcileResources(resources.after);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/migrations/20260816090000-runtime-rts-retention.ts
|
|
60
|
+
var _20260816090000_runtime_rts_retention_default = defineMigration({
|
|
61
|
+
__rpcbaseIntegrity: "b9d2b856d968898563ec9089c6a77c9dab1c5ba02d0f7a0502324937fda9f999",
|
|
62
|
+
id: "20260816090000-runtime-rts-retention",
|
|
63
|
+
scope: "tenant",
|
|
64
|
+
mode: "online",
|
|
65
|
+
rollback: "compatible",
|
|
66
|
+
resources: {
|
|
67
|
+
before: "62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816",
|
|
68
|
+
after: "d2f715097972b5e8d5c444a84441e80672e2d7e8d052c0f4947b739f995511cf"
|
|
69
|
+
},
|
|
70
|
+
async up({ db, resources }) {
|
|
71
|
+
if (!resources) throw new Error("Missing RTS retention resource snapshot");
|
|
72
|
+
const retention = resources.after.indexes.find((index) => index.collection === "rbrtschanges" && index.name === "ts_1")?.runtimeOptions?.expireAfterSeconds;
|
|
73
|
+
if (typeof retention !== "number") throw new Error("Missing RTS retention value");
|
|
74
|
+
await db.command({
|
|
75
|
+
collMod: "rbrtschanges",
|
|
76
|
+
index: {
|
|
77
|
+
name: "ts_1",
|
|
78
|
+
expireAfterSeconds: retention
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/migrations/baselineResources.ts
|
|
85
|
+
var global = "global";
|
|
86
|
+
var tenant = "tenant";
|
|
87
|
+
var owner = "@rpcbase/db";
|
|
88
|
+
var rpcbaseBaselineMongoResources = defineMongoResources({
|
|
89
|
+
collections: [
|
|
90
|
+
{
|
|
91
|
+
scope: global,
|
|
92
|
+
name: "rboauthrequests",
|
|
93
|
+
owner
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
scope: global,
|
|
97
|
+
name: "rbtenants",
|
|
98
|
+
owner
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
scope: global,
|
|
102
|
+
name: "rbusers",
|
|
103
|
+
owner
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
scope: tenant,
|
|
107
|
+
name: "rbnotificationdeliveries",
|
|
108
|
+
owner
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
scope: tenant,
|
|
112
|
+
name: "rbnotifications",
|
|
113
|
+
owner
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
scope: tenant,
|
|
117
|
+
name: "rbnotificationsettings",
|
|
118
|
+
owner
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
scope: tenant,
|
|
122
|
+
name: "rbrtschanges",
|
|
123
|
+
owner
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
scope: tenant,
|
|
127
|
+
name: "rbrtscounters",
|
|
128
|
+
owner
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
scope: tenant,
|
|
132
|
+
name: "rbtenantsubscriptionevents",
|
|
133
|
+
owner
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
scope: tenant,
|
|
137
|
+
name: "rbtenantsubscriptionprojections",
|
|
138
|
+
owner
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
scope: tenant,
|
|
142
|
+
name: "rbuploadchunks",
|
|
143
|
+
owner
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
scope: tenant,
|
|
147
|
+
name: "rbuploadsessions",
|
|
148
|
+
owner
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
indexes: [
|
|
152
|
+
{
|
|
153
|
+
scope: global,
|
|
154
|
+
collection: "rboauthrequests",
|
|
155
|
+
name: "expiresAt_1",
|
|
156
|
+
key: { expiresAt: 1 },
|
|
157
|
+
options: { expireAfterSeconds: 0 },
|
|
158
|
+
owner
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
scope: global,
|
|
162
|
+
collection: "rboauthrequests",
|
|
163
|
+
name: "providerId_1",
|
|
164
|
+
key: { providerId: 1 },
|
|
165
|
+
owner
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
scope: global,
|
|
169
|
+
collection: "rbtenants",
|
|
170
|
+
name: "tenantId_1",
|
|
171
|
+
key: { tenantId: 1 },
|
|
172
|
+
options: { unique: true },
|
|
173
|
+
owner
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
scope: global,
|
|
177
|
+
collection: "rbusers",
|
|
178
|
+
name: "email_1",
|
|
179
|
+
key: { email: 1 },
|
|
180
|
+
options: {
|
|
181
|
+
unique: true,
|
|
182
|
+
sparse: true
|
|
183
|
+
},
|
|
184
|
+
owner
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
scope: global,
|
|
188
|
+
collection: "rbusers",
|
|
189
|
+
name: "phone_1",
|
|
190
|
+
key: { phone: 1 },
|
|
191
|
+
options: {
|
|
192
|
+
unique: true,
|
|
193
|
+
sparse: true
|
|
194
|
+
},
|
|
195
|
+
owner
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
scope: global,
|
|
199
|
+
collection: "rbusers",
|
|
200
|
+
name: "tenants_1",
|
|
201
|
+
key: { tenants: 1 },
|
|
202
|
+
owner
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
scope: tenant,
|
|
206
|
+
collection: "rbnotificationdeliveries",
|
|
207
|
+
name: "createdAt_1",
|
|
208
|
+
key: { createdAt: 1 },
|
|
209
|
+
options: { expireAfterSeconds: 7776e3 },
|
|
210
|
+
owner
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
scope: tenant,
|
|
214
|
+
collection: "rbnotificationdeliveries",
|
|
215
|
+
name: "deliveryId_1",
|
|
216
|
+
key: { deliveryId: 1 },
|
|
217
|
+
options: { unique: true },
|
|
218
|
+
owner
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
scope: tenant,
|
|
222
|
+
collection: "rbnotificationdeliveries",
|
|
223
|
+
name: "userId_1",
|
|
224
|
+
key: { userId: 1 },
|
|
225
|
+
owner
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
scope: tenant,
|
|
229
|
+
collection: "rbnotificationdeliveries",
|
|
230
|
+
name: "userId_1_createdAt_-1",
|
|
231
|
+
key: {
|
|
232
|
+
userId: 1,
|
|
233
|
+
createdAt: -1
|
|
234
|
+
},
|
|
235
|
+
owner
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
scope: tenant,
|
|
239
|
+
collection: "rbnotifications",
|
|
240
|
+
name: "archivedAt_1",
|
|
241
|
+
key: { archivedAt: 1 },
|
|
242
|
+
options: { expireAfterSeconds: 7776e3 },
|
|
243
|
+
owner
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
scope: tenant,
|
|
247
|
+
collection: "rbnotifications",
|
|
248
|
+
name: "createdAt_1",
|
|
249
|
+
key: { createdAt: 1 },
|
|
250
|
+
owner
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
scope: tenant,
|
|
254
|
+
collection: "rbnotifications",
|
|
255
|
+
name: "readAt_1",
|
|
256
|
+
key: { readAt: 1 },
|
|
257
|
+
owner
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
scope: tenant,
|
|
261
|
+
collection: "rbnotifications",
|
|
262
|
+
name: "seenAt_1",
|
|
263
|
+
key: { seenAt: 1 },
|
|
264
|
+
owner
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
scope: tenant,
|
|
268
|
+
collection: "rbnotifications",
|
|
269
|
+
name: "topic_1",
|
|
270
|
+
key: { topic: 1 },
|
|
271
|
+
owner
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
scope: tenant,
|
|
275
|
+
collection: "rbnotifications",
|
|
276
|
+
name: "userId_1",
|
|
277
|
+
key: { userId: 1 },
|
|
278
|
+
owner
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
scope: tenant,
|
|
282
|
+
collection: "rbnotifications",
|
|
283
|
+
name: "userId_1_archivedAt_1_createdAt_-1",
|
|
284
|
+
key: {
|
|
285
|
+
userId: 1,
|
|
286
|
+
archivedAt: 1,
|
|
287
|
+
createdAt: -1
|
|
288
|
+
},
|
|
289
|
+
owner
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
scope: tenant,
|
|
293
|
+
collection: "rbnotifications",
|
|
294
|
+
name: "userId_1_readAt_1_archivedAt_1_createdAt_-1",
|
|
295
|
+
key: {
|
|
296
|
+
userId: 1,
|
|
297
|
+
readAt: 1,
|
|
298
|
+
archivedAt: 1,
|
|
299
|
+
createdAt: -1
|
|
300
|
+
},
|
|
301
|
+
owner
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
scope: tenant,
|
|
305
|
+
collection: "rbnotifications",
|
|
306
|
+
name: "userId_1_seenAt_1_archivedAt_1_createdAt_-1",
|
|
307
|
+
key: {
|
|
308
|
+
userId: 1,
|
|
309
|
+
seenAt: 1,
|
|
310
|
+
archivedAt: 1,
|
|
311
|
+
createdAt: -1
|
|
312
|
+
},
|
|
313
|
+
owner
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
scope: tenant,
|
|
317
|
+
collection: "rbnotifications",
|
|
318
|
+
name: "userId_1_tag_1",
|
|
319
|
+
key: {
|
|
320
|
+
userId: 1,
|
|
321
|
+
tag: 1
|
|
322
|
+
},
|
|
323
|
+
options: {
|
|
324
|
+
unique: true,
|
|
325
|
+
partialFilterExpression: {
|
|
326
|
+
tag: { $exists: true },
|
|
327
|
+
drawerActive: true
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
owner
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
scope: tenant,
|
|
334
|
+
collection: "rbnotificationsettings",
|
|
335
|
+
name: "userId_1",
|
|
336
|
+
key: { userId: 1 },
|
|
337
|
+
options: { unique: true },
|
|
338
|
+
owner
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
scope: tenant,
|
|
342
|
+
collection: "rbnotificationsettings",
|
|
343
|
+
name: "userId_1_topicPreferences.topic_1",
|
|
344
|
+
key: {
|
|
345
|
+
userId: 1,
|
|
346
|
+
"topicPreferences.topic": 1
|
|
347
|
+
},
|
|
348
|
+
owner
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
scope: tenant,
|
|
352
|
+
collection: "rbrtschanges",
|
|
353
|
+
name: "modelName_1",
|
|
354
|
+
key: { modelName: 1 },
|
|
355
|
+
owner
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
scope: tenant,
|
|
359
|
+
collection: "rbrtschanges",
|
|
360
|
+
name: "seq_1",
|
|
361
|
+
key: { seq: 1 },
|
|
362
|
+
options: { unique: true },
|
|
363
|
+
owner
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
scope: tenant,
|
|
367
|
+
collection: "rbrtschanges",
|
|
368
|
+
name: "ts_1",
|
|
369
|
+
key: { ts: 1 },
|
|
370
|
+
options: { expireAfterSeconds: 60 },
|
|
371
|
+
owner
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
scope: tenant,
|
|
375
|
+
collection: "rbtenantsubscriptionevents",
|
|
376
|
+
name: "provider_1_providerEventId_1",
|
|
377
|
+
key: {
|
|
378
|
+
provider: 1,
|
|
379
|
+
providerEventId: 1
|
|
380
|
+
},
|
|
381
|
+
options: {
|
|
382
|
+
unique: true,
|
|
383
|
+
partialFilterExpression: {
|
|
384
|
+
provider: { $type: "string" },
|
|
385
|
+
providerEventId: { $type: "string" }
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
owner
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
scope: tenant,
|
|
392
|
+
collection: "rbtenantsubscriptionevents",
|
|
393
|
+
name: "subscriptionId_1",
|
|
394
|
+
key: { subscriptionId: 1 },
|
|
395
|
+
owner
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
scope: tenant,
|
|
399
|
+
collection: "rbtenantsubscriptionevents",
|
|
400
|
+
name: "tenantId_1",
|
|
401
|
+
key: { tenantId: 1 },
|
|
402
|
+
owner
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
scope: tenant,
|
|
406
|
+
collection: "rbtenantsubscriptionevents",
|
|
407
|
+
name: "tenantId_1_idempotencyKey_1",
|
|
408
|
+
key: {
|
|
409
|
+
tenantId: 1,
|
|
410
|
+
idempotencyKey: 1
|
|
411
|
+
},
|
|
412
|
+
options: { unique: true },
|
|
413
|
+
owner
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
scope: tenant,
|
|
417
|
+
collection: "rbtenantsubscriptionevents",
|
|
418
|
+
name: "tenantId_1_subscriptionId_1_effectiveAt_1_occurredAt_1",
|
|
419
|
+
key: {
|
|
420
|
+
tenantId: 1,
|
|
421
|
+
subscriptionId: 1,
|
|
422
|
+
effectiveAt: 1,
|
|
423
|
+
occurredAt: 1
|
|
424
|
+
},
|
|
425
|
+
owner
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
scope: tenant,
|
|
429
|
+
collection: "rbtenantsubscriptionprojections",
|
|
430
|
+
name: "tenantId_1",
|
|
431
|
+
key: { tenantId: 1 },
|
|
432
|
+
owner
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
scope: tenant,
|
|
436
|
+
collection: "rbtenantsubscriptionprojections",
|
|
437
|
+
name: "tenantId_1_scope_1_scopeId_1",
|
|
438
|
+
key: {
|
|
439
|
+
tenantId: 1,
|
|
440
|
+
scope: 1,
|
|
441
|
+
scopeId: 1
|
|
442
|
+
},
|
|
443
|
+
owner
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
scope: tenant,
|
|
447
|
+
collection: "rbtenantsubscriptionprojections",
|
|
448
|
+
name: "tenantId_1_subscriptionId_1",
|
|
449
|
+
key: {
|
|
450
|
+
tenantId: 1,
|
|
451
|
+
subscriptionId: 1
|
|
452
|
+
},
|
|
453
|
+
options: { unique: true },
|
|
454
|
+
owner
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
scope: tenant,
|
|
458
|
+
collection: "rbuploadchunks",
|
|
459
|
+
name: "expiresAt_1",
|
|
460
|
+
key: { expiresAt: 1 },
|
|
461
|
+
options: { expireAfterSeconds: 0 },
|
|
462
|
+
owner
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
scope: tenant,
|
|
466
|
+
collection: "rbuploadchunks",
|
|
467
|
+
name: "uploadId_1",
|
|
468
|
+
key: { uploadId: 1 },
|
|
469
|
+
owner
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
scope: tenant,
|
|
473
|
+
collection: "rbuploadchunks",
|
|
474
|
+
name: "uploadId_1_index_1",
|
|
475
|
+
key: {
|
|
476
|
+
uploadId: 1,
|
|
477
|
+
index: 1
|
|
478
|
+
},
|
|
479
|
+
options: { unique: true },
|
|
480
|
+
owner
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
scope: tenant,
|
|
484
|
+
collection: "rbuploadsessions",
|
|
485
|
+
name: "expiresAt_1",
|
|
486
|
+
key: { expiresAt: 1 },
|
|
487
|
+
options: { expireAfterSeconds: 0 },
|
|
488
|
+
owner
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
scope: tenant,
|
|
492
|
+
collection: "rbuploadsessions",
|
|
493
|
+
name: "userId_1",
|
|
494
|
+
key: { userId: 1 },
|
|
495
|
+
owner
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
});
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region src/migrations/runtimeRtsRetentionResources.ts
|
|
501
|
+
var rpcbaseRuntimeRtsRetentionMongoResources = defineMongoResources({
|
|
502
|
+
collections: [...rpcbaseBaselineMongoResources.collections],
|
|
503
|
+
indexes: rpcbaseBaselineMongoResources.indexes.map((index) => {
|
|
504
|
+
if (index.collection !== "rbrtschanges" || index.name !== "ts_1") return index;
|
|
505
|
+
const { options: indexOptions, ...resource } = index;
|
|
506
|
+
const { expireAfterSeconds: _baselineTtl, ...options } = indexOptions ?? {};
|
|
507
|
+
return {
|
|
508
|
+
...resource,
|
|
509
|
+
...Object.keys(options).length > 0 ? { options } : {},
|
|
510
|
+
runtimeOptions: { expireAfterSeconds: rtsChangesTtlSeconds }
|
|
511
|
+
};
|
|
512
|
+
}),
|
|
513
|
+
searchIndexes: [...rpcbaseBaselineMongoResources.searchIndexes],
|
|
514
|
+
collectionValidators: [...rpcbaseBaselineMongoResources.collectionValidators]
|
|
515
|
+
});
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/migrations/resources.ts
|
|
518
|
+
var rpcbaseMongoResources = defineMongoResources({
|
|
519
|
+
collections: [...rpcbaseRuntimeRtsRetentionMongoResources.collections],
|
|
520
|
+
indexes: [...rpcbaseRuntimeRtsRetentionMongoResources.indexes],
|
|
521
|
+
searchIndexes: [...rpcbaseRuntimeRtsRetentionMongoResources.searchIndexes],
|
|
522
|
+
collectionValidators: [...rpcbaseRuntimeRtsRetentionMongoResources.collectionValidators]
|
|
523
|
+
});
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/migrations/index.ts
|
|
526
|
+
var rpcbaseMigrationSource = defineMigrationSource({
|
|
527
|
+
name: "@rpcbase/db",
|
|
528
|
+
migrations: [
|
|
529
|
+
_20260814090000_baseline_global_default,
|
|
530
|
+
_20260814090100_baseline_tenant_default,
|
|
531
|
+
_20260816090000_runtime_rts_retention_default
|
|
532
|
+
],
|
|
533
|
+
resources: rpcbaseMongoResources,
|
|
534
|
+
resourceSnapshots: [
|
|
535
|
+
rpcbaseBaselineMongoResources,
|
|
536
|
+
rpcbaseRuntimeRtsRetentionMongoResources,
|
|
537
|
+
rpcbaseMongoResources
|
|
538
|
+
]
|
|
539
|
+
});
|
|
540
|
+
//#endregion
|
|
541
|
+
export { rpcbaseMigrationSource as default, rpcbaseMigrationSource, rpcbaseMongoResources };
|
|
542
|
+
|
|
543
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["defineMigration","__rpcbaseIntegrity","id","scope","mode","rollback","resources","before","after","up","helpers","Error","index","indexes","options","unique","sparseFilter","sparse","$or","Object","keys","key","map","field","$exists","undefined","partialFilter","partialFilterExpression","filter","$and","duplicates","findDuplicateKeys","collection","collation","length","name","JSON","stringify","reconcileResources","defineMigration","__rpcbaseIntegrity","id","scope","mode","rollback","resources","before","after","up","helpers","Error","index","indexes","options","unique","sparseFilter","sparse","$or","Object","keys","key","map","field","$exists","undefined","partialFilter","partialFilterExpression","filter","$and","duplicates","findDuplicateKeys","collection","collation","length","name","JSON","stringify","reconcileResources","defineMigration","__rpcbaseIntegrity","id","scope","mode","rollback","resources","before","after","up","db","Error","retention","indexes","find","index","collection","name","runtimeOptions","expireAfterSeconds","command","collMod","defineMongoResources","global","const","tenant","owner","rpcbaseBaselineMongoResources","collections","scope","name","indexes","collection","key","expiresAt","options","expireAfterSeconds","providerId","tenantId","unique","email","sparse","phone","tenants","createdAt","deliveryId","userId","archivedAt","readAt","seenAt","topic","tag","partialFilterExpression","$exists","drawerActive","modelName","seq","ts","provider","providerEventId","$type","subscriptionId","idempotencyKey","effectiveAt","occurredAt","scopeId","uploadId","index","defineMongoResources","rpcbaseBaselineMongoResources","rtsChangesTtlSeconds","rpcbaseRuntimeRtsRetentionMongoResources","collections","indexes","map","index","collection","name","options","indexOptions","resource","expireAfterSeconds","_baselineTtl","Object","keys","length","runtimeOptions","searchIndexes","collectionValidators","defineMongoResources","rpcbaseRuntimeRtsRetentionMongoResources","rpcbaseMongoResources","collections","indexes","searchIndexes","collectionValidators","defineMigrationSource","baselineGlobal","baselineTenant","runtimeRtsRetention","rpcbaseBaselineMongoResources","rpcbaseMongoResources","rpcbaseRuntimeRtsRetentionMongoResources","rpcbaseMigrationSource","name","migrations","resources","resourceSnapshots"],"sources":["../../src/migrations/20260814090000-baseline-global.ts","../../src/migrations/20260814090100-baseline-tenant.ts","../../src/migrations/20260816090000-runtime-rts-retention.ts","../../src/migrations/baselineResources.ts","../../src/migrations/runtimeRtsRetentionResources.ts","../../src/migrations/resources.ts","../../src/migrations/index.ts"],"sourcesContent":["import { defineMigration } from \"@rpcbase/migrations\"\n\n\nexport default defineMigration({\n __rpcbaseIntegrity: \"1e3bb48e914f377136a22d79a78ba4164eb457be097003a675cfb8864df8baf2\",\n id: \"20260814090000-baseline-global\",\n scope: \"global\",\n mode: \"online\",\n rollback: \"compatible\",\n resources: {\n before: null,\n after: \"62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816\",\n },\n\n async up({ helpers, resources }) {\n if (!resources) throw new Error(\"Missing baseline resource snapshot\")\n for (const index of resources.after.indexes) {\n if (index.options?.unique !== true) continue\n const sparseFilter = index.options.sparse === true\n ? { $or: Object.keys(index.key).map((field) => ({ [field]: { $exists: true } })) }\n : undefined\n const partialFilter = index.options.partialFilterExpression\n const filter = sparseFilter && partialFilter\n ? { $and: [partialFilter, sparseFilter] }\n : partialFilter ?? sparseFilter\n const duplicates = await helpers.findDuplicateKeys(index.collection, index.key, {\n ...(filter ? { filter } : {}),\n ...(index.options.collation ? { collation: index.options.collation } : {}),\n })\n if (duplicates.length > 0) {\n throw new Error(`Cannot create unique index ${index.collection}.${index.name}: ${JSON.stringify(duplicates)}`)\n }\n }\n await helpers.reconcileResources(resources.after)\n },\n})\n","import { defineMigration } from \"@rpcbase/migrations\"\n\n\nexport default defineMigration({\n __rpcbaseIntegrity: \"0a4fed8912aa300fdd36d7a783e2c00cf5db9a84057d1287340b236edfcd89e4\",\n id: \"20260814090100-baseline-tenant\",\n scope: \"tenant\",\n mode: \"online\",\n rollback: \"compatible\",\n resources: {\n before: null,\n after: \"62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816\",\n },\n\n async up({ helpers, resources }) {\n if (!resources) throw new Error(\"Missing baseline resource snapshot\")\n for (const index of resources.after.indexes) {\n if (index.options?.unique !== true) continue\n const sparseFilter = index.options.sparse === true\n ? { $or: Object.keys(index.key).map((field) => ({ [field]: { $exists: true } })) }\n : undefined\n const partialFilter = index.options.partialFilterExpression\n const filter = sparseFilter && partialFilter\n ? { $and: [partialFilter, sparseFilter] }\n : partialFilter ?? sparseFilter\n const duplicates = await helpers.findDuplicateKeys(index.collection, index.key, {\n ...(filter ? { filter } : {}),\n ...(index.options.collation ? { collation: index.options.collation } : {}),\n })\n if (duplicates.length > 0) {\n throw new Error(`Cannot create unique index ${index.collection}.${index.name}: ${JSON.stringify(duplicates)}`)\n }\n }\n await helpers.reconcileResources(resources.after)\n },\n})\n","import { defineMigration } from \"@rpcbase/migrations\"\n\n\nexport default defineMigration({\n __rpcbaseIntegrity: \"b9d2b856d968898563ec9089c6a77c9dab1c5ba02d0f7a0502324937fda9f999\",\n id: \"20260816090000-runtime-rts-retention\",\n scope: \"tenant\",\n mode: \"online\",\n rollback: \"compatible\",\n resources: {\n before: \"62e2e625d7af99bec6bb635ae75aeb3654db151a2162ec375f039664a9638816\",\n after: \"d2f715097972b5e8d5c444a84441e80672e2d7e8d052c0f4947b739f995511cf\",\n },\n\n async up({ db, resources }) {\n if (!resources) throw new Error(\"Missing RTS retention resource snapshot\")\n const retention = resources.after.indexes\n .find((index) => index.collection === \"rbrtschanges\" && index.name === \"ts_1\")\n ?.runtimeOptions?.expireAfterSeconds\n if (typeof retention !== \"number\") throw new Error(\"Missing RTS retention value\")\n await db.command({\n collMod: \"rbrtschanges\",\n index: { name: \"ts_1\", expireAfterSeconds: retention },\n })\n },\n})\n","import { defineMongoResources } from \"@rpcbase/migrations\"\n\n\nconst global = \"global\" as const\nconst tenant = \"tenant\" as const\nconst owner = \"@rpcbase/db\"\n\nexport const rpcbaseBaselineMongoResources = defineMongoResources({\n collections: [\n { scope: global, name: \"rboauthrequests\", owner },\n { scope: global, name: \"rbtenants\", owner },\n { scope: global, name: \"rbusers\", owner },\n { scope: tenant, name: \"rbnotificationdeliveries\", owner },\n { scope: tenant, name: \"rbnotifications\", owner },\n { scope: tenant, name: \"rbnotificationsettings\", owner },\n { scope: tenant, name: \"rbrtschanges\", owner },\n { scope: tenant, name: \"rbrtscounters\", owner },\n { scope: tenant, name: \"rbtenantsubscriptionevents\", owner },\n { scope: tenant, name: \"rbtenantsubscriptionprojections\", owner },\n { scope: tenant, name: \"rbuploadchunks\", owner },\n { scope: tenant, name: \"rbuploadsessions\", owner },\n ],\n indexes: [\n {\n scope: global,\n collection: \"rboauthrequests\",\n name: \"expiresAt_1\",\n key: { expiresAt: 1 },\n options: { expireAfterSeconds: 0 },\n owner,\n },\n {\n scope: global,\n collection: \"rboauthrequests\",\n name: \"providerId_1\",\n key: { providerId: 1 },\n owner,\n },\n {\n scope: global,\n collection: \"rbtenants\",\n name: \"tenantId_1\",\n key: { tenantId: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: global,\n collection: \"rbusers\",\n name: \"email_1\",\n key: { email: 1 },\n options: { unique: true, sparse: true },\n owner,\n },\n {\n scope: global,\n collection: \"rbusers\",\n name: \"phone_1\",\n key: { phone: 1 },\n options: { unique: true, sparse: true },\n owner,\n },\n {\n scope: global,\n collection: \"rbusers\",\n name: \"tenants_1\",\n key: { tenants: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationdeliveries\",\n name: \"createdAt_1\",\n key: { createdAt: 1 },\n options: { expireAfterSeconds: 7_776_000 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationdeliveries\",\n name: \"deliveryId_1\",\n key: { deliveryId: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationdeliveries\",\n name: \"userId_1\",\n key: { userId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationdeliveries\",\n name: \"userId_1_createdAt_-1\",\n key: { userId: 1, createdAt: -1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"archivedAt_1\",\n key: { archivedAt: 1 },\n options: { expireAfterSeconds: 7_776_000 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"createdAt_1\",\n key: { createdAt: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"readAt_1\",\n key: { readAt: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"seenAt_1\",\n key: { seenAt: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"topic_1\",\n key: { topic: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"userId_1\",\n key: { userId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"userId_1_archivedAt_1_createdAt_-1\",\n key: { userId: 1, archivedAt: 1, createdAt: -1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"userId_1_readAt_1_archivedAt_1_createdAt_-1\",\n key: { userId: 1, readAt: 1, archivedAt: 1, createdAt: -1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"userId_1_seenAt_1_archivedAt_1_createdAt_-1\",\n key: { userId: 1, seenAt: 1, archivedAt: 1, createdAt: -1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotifications\",\n name: \"userId_1_tag_1\",\n key: { userId: 1, tag: 1 },\n options: {\n unique: true,\n partialFilterExpression: { tag: { $exists: true }, drawerActive: true },\n },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationsettings\",\n name: \"userId_1\",\n key: { userId: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbnotificationsettings\",\n name: \"userId_1_topicPreferences.topic_1\",\n key: { userId: 1, \"topicPreferences.topic\": 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbrtschanges\",\n name: \"modelName_1\",\n key: { modelName: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbrtschanges\",\n name: \"seq_1\",\n key: { seq: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbrtschanges\",\n name: \"ts_1\",\n key: { ts: 1 },\n options: { expireAfterSeconds: 60 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionevents\",\n name: \"provider_1_providerEventId_1\",\n key: { provider: 1, providerEventId: 1 },\n options: {\n unique: true,\n partialFilterExpression: {\n provider: { $type: \"string\" },\n providerEventId: { $type: \"string\" },\n },\n },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionevents\",\n name: \"subscriptionId_1\",\n key: { subscriptionId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionevents\",\n name: \"tenantId_1\",\n key: { tenantId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionevents\",\n name: \"tenantId_1_idempotencyKey_1\",\n key: { tenantId: 1, idempotencyKey: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionevents\",\n name: \"tenantId_1_subscriptionId_1_effectiveAt_1_occurredAt_1\",\n key: { tenantId: 1, subscriptionId: 1, effectiveAt: 1, occurredAt: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionprojections\",\n name: \"tenantId_1\",\n key: { tenantId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionprojections\",\n name: \"tenantId_1_scope_1_scopeId_1\",\n key: { tenantId: 1, scope: 1, scopeId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbtenantsubscriptionprojections\",\n name: \"tenantId_1_subscriptionId_1\",\n key: { tenantId: 1, subscriptionId: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbuploadchunks\",\n name: \"expiresAt_1\",\n key: { expiresAt: 1 },\n options: { expireAfterSeconds: 0 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbuploadchunks\",\n name: \"uploadId_1\",\n key: { uploadId: 1 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbuploadchunks\",\n name: \"uploadId_1_index_1\",\n key: { uploadId: 1, index: 1 },\n options: { unique: true },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbuploadsessions\",\n name: \"expiresAt_1\",\n key: { expiresAt: 1 },\n options: { expireAfterSeconds: 0 },\n owner,\n },\n {\n scope: tenant,\n collection: \"rbuploadsessions\",\n name: \"userId_1\",\n key: { userId: 1 },\n owner,\n },\n ],\n})\n","import { defineMongoResources } from \"@rpcbase/migrations\"\n\nimport { rpcbaseBaselineMongoResources } from \"./baselineResources\"\nimport { rtsChangesTtlSeconds } from \"./rtsChanges\"\n\n\nexport const rpcbaseRuntimeRtsRetentionMongoResources = defineMongoResources({\n collections: [...rpcbaseBaselineMongoResources.collections],\n indexes: rpcbaseBaselineMongoResources.indexes.map((index) => {\n if (index.collection !== \"rbrtschanges\" || index.name !== \"ts_1\") return index\n const { options: indexOptions, ...resource } = index\n const { expireAfterSeconds: _baselineTtl, ...options } = indexOptions ?? {}\n return {\n ...resource,\n ...(Object.keys(options).length > 0 ? { options } : {}),\n runtimeOptions: { expireAfterSeconds: rtsChangesTtlSeconds },\n }\n }),\n searchIndexes: [...rpcbaseBaselineMongoResources.searchIndexes],\n collectionValidators: [...rpcbaseBaselineMongoResources.collectionValidators],\n})\n","import { defineMongoResources } from \"@rpcbase/migrations\"\n\nimport { rpcbaseRuntimeRtsRetentionMongoResources } from \"./runtimeRtsRetentionResources\"\n\n\nexport const rpcbaseMongoResources = defineMongoResources({\n collections: [...rpcbaseRuntimeRtsRetentionMongoResources.collections],\n indexes: [...rpcbaseRuntimeRtsRetentionMongoResources.indexes],\n searchIndexes: [...rpcbaseRuntimeRtsRetentionMongoResources.searchIndexes],\n collectionValidators: [...rpcbaseRuntimeRtsRetentionMongoResources.collectionValidators],\n})\n","import { defineMigrationSource } from \"@rpcbase/migrations\"\n\nimport baselineGlobal from \"./20260814090000-baseline-global\"\nimport baselineTenant from \"./20260814090100-baseline-tenant\"\nimport runtimeRtsRetention from \"./20260816090000-runtime-rts-retention\"\nimport { rpcbaseBaselineMongoResources } from \"./baselineResources\"\nimport { rpcbaseMongoResources } from \"./resources\"\nimport { rpcbaseRuntimeRtsRetentionMongoResources } from \"./runtimeRtsRetentionResources\"\n\n\nexport { rpcbaseMongoResources }\n\nexport const rpcbaseMigrationSource = defineMigrationSource({\n name: \"@rpcbase/db\",\n migrations: [\n baselineGlobal,\n baselineTenant,\n runtimeRtsRetention,\n ],\n resources: rpcbaseMongoResources,\n resourceSnapshots: [\n rpcbaseBaselineMongoResources,\n rpcbaseRuntimeRtsRetentionMongoResources,\n rpcbaseMongoResources,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,sBAAsB;CAC1DQ,MAAM;CACNC,YAAY;EACVR;EACAC;EACAC;CAAmB;CAErBO,WAAWL;CACXM,mBAAmB;EACjBP;EACAE;EACAD;CAAqB;AAEzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/migrations/resources.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,8CAKhC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtsChanges.d.ts","sourceRoot":"","sources":["../../src/migrations/rtsChanges.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,QAEZ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeRtsRetentionResources.d.ts","sourceRoot":"","sources":["../../src/migrations/runtimeRtsRetentionResources.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wCAAwC,8CAcnD,CAAA"}
|