@prisma/orm-target-mongo 8.0.0-rc.12-dev.9 → 8.0.0-rc.12-dev.10

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 (95) hide show
  1. package/dist/adapter.d.mts +1 -1
  2. package/dist/adapter.mjs +2 -2
  3. package/dist/adapter.mjs.map +1 -1
  4. package/dist/adapter__control.d.mts +208 -3
  5. package/dist/adapter__control.d.mts.map +1 -0
  6. package/dist/adapter__control.mjs +516 -3
  7. package/dist/adapter__control.mjs.map +1 -0
  8. package/dist/adapter__runtime.mjs +2 -2
  9. package/dist/adapter__runtime.mjs.map +1 -1
  10. package/dist/codec-ids-Bz230VLx-Dbi_KV7J.mjs +16 -0
  11. package/dist/codec-ids-Bz230VLx-Dbi_KV7J.mjs.map +1 -0
  12. package/dist/codec-ids-Ck-Z63jY.d.mts +16 -0
  13. package/dist/codec-ids-Ck-Z63jY.d.mts.map +1 -0
  14. package/dist/{adapter__codec-types.d.mts → codec-types-KM2ikqd7.d.mts} +20 -3
  15. package/dist/codec-types-KM2ikqd7.d.mts.map +1 -0
  16. package/dist/codecs-ChbLv6Rd-BmoC4ktF.mjs +393 -0
  17. package/dist/codecs-ChbLv6Rd-BmoC4ktF.mjs.map +1 -0
  18. package/dist/codecs-DsyGq31F.d.mts +33 -0
  19. package/dist/codecs-DsyGq31F.d.mts.map +1 -0
  20. package/dist/{control-CDO-vU3z.d.mts → control-Cfov50jX.d.mts} +82 -82
  21. package/dist/control-Cfov50jX.d.mts.map +1 -0
  22. package/dist/{control-BD0vuF-d.mjs → control-DESRWr7S.mjs} +140 -145
  23. package/dist/control-DESRWr7S.mjs.map +1 -0
  24. package/dist/{data-types-CxW7xs7P-Dxj3sc0T.mjs → data-types-B2WnpO9e-D97kwz96.mjs} +12 -4
  25. package/dist/data-types-B2WnpO9e-D97kwz96.mjs.map +1 -0
  26. package/dist/data-types-Kd9NIobH.d.mts +18 -0
  27. package/dist/data-types-Kd9NIobH.d.mts.map +1 -0
  28. package/dist/{descriptor-meta-BQRniVcn-8meGwEZr.mjs → descriptor-meta-CSm-03KE-DDeX4NIT.mjs} +4 -4
  29. package/dist/descriptor-meta-CSm-03KE-DDeX4NIT.mjs.map +1 -0
  30. package/dist/driver.mjs +1 -1
  31. package/dist/driver__control.d.mts +1 -1
  32. package/dist/driver__control.mjs +2 -2
  33. package/dist/driver__control.mjs.map +1 -1
  34. package/dist/{migration-BkqcE2Uv.d.mts → migration-DeZyk0tl.d.mts} +3 -3
  35. package/dist/{migration-BkqcE2Uv.d.mts.map → migration-DeZyk0tl.d.mts.map} +1 -1
  36. package/dist/{migration-factories-CqjDpXHw-fxXh_wY1.mjs → migration-factories-BwvR6Mvk-Ba1ywTUZ.mjs} +2 -2
  37. package/dist/migration-factories-BwvR6Mvk-Ba1ywTUZ.mjs.map +1 -0
  38. package/dist/{mongo-adapter-NKwUwPku-Bqm1kySe.mjs → mongo-adapter-Dx9Gs2Lj-CA6H_zbI.mjs} +10 -5
  39. package/dist/mongo-adapter-Dx9Gs2Lj-CA6H_zbI.mjs.map +1 -0
  40. package/dist/{mongo-adapter-CjJU3S9o-BIJruFYW.d.mts → mongo-adapter-wvK2fQOZ-BXo5NxEB.d.mts} +2 -2
  41. package/dist/mongo-adapter-wvK2fQOZ-BXo5NxEB.d.mts.map +1 -0
  42. package/dist/{mongo-driver-rOqx7iOY-PzNY9sC9.mjs → mongo-driver-CZDo4GWY-CDmclLXI.mjs} +3 -3
  43. package/dist/mongo-driver-CZDo4GWY-CDmclLXI.mjs.map +1 -0
  44. package/dist/{op-factory-call-B7EKa4Ri-B2Lb6W68.d.mts → op-factory-call-DV0hKDUc-DHt1CB5L.d.mts} +3 -3
  45. package/dist/{op-factory-call-B7EKa4Ri-B2Lb6W68.d.mts.map → op-factory-call-DV0hKDUc-DHt1CB5L.d.mts.map} +1 -1
  46. package/dist/{pack-MK8ZQfrL.d.mts → pack-CPxA9byH.d.mts} +2 -2
  47. package/dist/{pack-MK8ZQfrL.d.mts.map → pack-CPxA9byH.d.mts.map} +1 -1
  48. package/dist/target.d.mts +9 -7
  49. package/dist/target.mjs +6 -3
  50. package/dist/target__codec-ids.d.mts +2 -0
  51. package/dist/target__codec-ids.mjs +2 -0
  52. package/dist/target__codec-types.d.mts +2 -2
  53. package/dist/target__codecs.d.mts +2 -0
  54. package/dist/target__codecs.mjs +2 -0
  55. package/dist/target__control.d.mts +3 -4
  56. package/dist/target__control.mjs +1 -1
  57. package/dist/target__data-types.d.mts +2 -0
  58. package/dist/target__data-types.mjs +2 -0
  59. package/dist/target__migration.d.mts +1 -1
  60. package/dist/target__migration.mjs +1 -1
  61. package/dist/target__pack.d.mts +1 -1
  62. package/dist/target__pack.mjs +1 -1
  63. package/dist/target__pack.mjs.map +1 -1
  64. package/dist/target__runtime.mjs +1 -1
  65. package/dist/target__runtime.mjs.map +1 -1
  66. package/package.json +13 -14
  67. package/dist/adapter__codec-ids.d.mts +0 -12
  68. package/dist/adapter__codec-ids.d.mts.map +0 -1
  69. package/dist/adapter__codec-ids.mjs +0 -2
  70. package/dist/adapter__codec-types.d.mts.map +0 -1
  71. package/dist/adapter__codec-types.mjs +0 -1
  72. package/dist/adapter__codecs.d.mts +0 -14
  73. package/dist/adapter__codecs.d.mts.map +0 -1
  74. package/dist/adapter__codecs.mjs +0 -2
  75. package/dist/adapter__data-types.d.mts +0 -14
  76. package/dist/adapter__data-types.d.mts.map +0 -1
  77. package/dist/adapter__data-types.mjs +0 -2
  78. package/dist/codec-ids-BennPcpQ-Btzz3ILV.mjs +0 -12
  79. package/dist/codec-ids-BennPcpQ-Btzz3ILV.mjs.map +0 -1
  80. package/dist/codec-types-Bx2fHyq_.d.mts +0 -35
  81. package/dist/codec-types-Bx2fHyq_.d.mts.map +0 -1
  82. package/dist/codecs-0ilNxnkk-P6rdFjk0.mjs +0 -179
  83. package/dist/codecs-0ilNxnkk-P6rdFjk0.mjs.map +0 -1
  84. package/dist/control-BD0vuF-d.mjs.map +0 -1
  85. package/dist/control-BDevch6o.mjs +0 -443
  86. package/dist/control-BDevch6o.mjs.map +0 -1
  87. package/dist/control-CDO-vU3z.d.mts.map +0 -1
  88. package/dist/control-CbxqWOJS.d.mts +0 -176
  89. package/dist/control-CbxqWOJS.d.mts.map +0 -1
  90. package/dist/data-types-CxW7xs7P-Dxj3sc0T.mjs.map +0 -1
  91. package/dist/descriptor-meta-BQRniVcn-8meGwEZr.mjs.map +0 -1
  92. package/dist/migration-factories-CqjDpXHw-fxXh_wY1.mjs.map +0 -1
  93. package/dist/mongo-adapter-CjJU3S9o-BIJruFYW.d.mts.map +0 -1
  94. package/dist/mongo-adapter-NKwUwPku-Bqm1kySe.mjs.map +0 -1
  95. package/dist/mongo-driver-rOqx7iOY-PzNY9sC9.mjs.map +0 -1
@@ -1,443 +0,0 @@
1
- import { n as describeReceivedValue, r as mongoAdapterError } from "./codecs-0ilNxnkk-P6rdFjk0.mjs";
2
- import { t as createMongoAdapter } from "./mongo-adapter-NKwUwPku-Bqm1kySe.mjs";
3
- import { blindCast } from "@prisma/orm-framework/utils/casts";
4
- import { expr, fn } from "@prisma/orm-family-mongo/query-builder";
5
- import { collection } from "@prisma/orm-family-mongo/query-builder/contract-free";
6
- import { MongoAggFieldRef, MongoAggLiteral, MongoAggOperator } from "@prisma/orm-family-mongo/query-ast/execution";
7
- import { MongoServerError } from "mongodb";
8
- import { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from "@prisma/orm-family-mongo/schema-ir";
9
- import { parseMarkerRowSafely, withMarkerReadErrorHandling } from "@prisma/orm-framework/errors/execution";
10
- import { ledgerOriginFromStored } from "@prisma/orm-toolchain/migration-tools/ledger-origin";
11
- import { type } from "arktype";
12
- //#region ../../../3-mongo-target/2-mongo-adapter/dist/control.mjs
13
- /**
14
- * Executes the read-only catalog inspections (`listCollections` / `listIndexes`)
15
- * that migration prechecks/postchecks and operation preview evaluate, directly
16
- * against `db`. Routing these checks through the adapter's lowering seam is
17
- * deferred to the `typed-migration-verification-queries` slice.
18
- */
19
- var MongoInspectionExecutor = class {
20
- db;
21
- constructor(db) {
22
- this.db = db;
23
- }
24
- async listIndexes(cmd) {
25
- try {
26
- return await this.db.collection(cmd.collection).listIndexes().toArray();
27
- } catch (error) {
28
- if (error instanceof MongoServerError && error.code === 26) return [];
29
- throw error;
30
- }
31
- }
32
- async listCollections(_cmd) {
33
- return this.db.listCollections().toArray();
34
- }
35
- };
36
- const PRISMA_MIGRATIONS_COLLECTION = "_prisma_migrations";
37
- function parseIndexKeys(keySpec) {
38
- const keys = [];
39
- for (const [field, direction] of Object.entries(keySpec)) keys.push({
40
- field,
41
- direction
42
- });
43
- return keys;
44
- }
45
- /**
46
- * Exported for unit tests to exercise the defensive `!key` guard; not part of
47
- * the public API. Callers in this package use it via the `introspectSchema`
48
- * pipeline only.
49
- */
50
- function isDefaultIdIndex(doc) {
51
- const key = doc["key"];
52
- if (!key) return false;
53
- const entries = Object.entries(key);
54
- return entries.length === 1 && entries[0]?.[0] === "_id" && entries[0]?.[1] === 1;
55
- }
56
- function parseIndex(doc) {
57
- const keySpec = doc["key"];
58
- return new MongoSchemaIndex({
59
- keys: parseIndexKeys(keySpec),
60
- unique: doc["unique"],
61
- sparse: doc["sparse"],
62
- expireAfterSeconds: doc["expireAfterSeconds"],
63
- partialFilterExpression: doc["partialFilterExpression"],
64
- wildcardProjection: doc["wildcardProjection"],
65
- collation: doc["collation"] ? blindCast(doc["collation"]) : void 0,
66
- weights: doc["weights"],
67
- default_language: doc["default_language"],
68
- language_override: doc["language_override"]
69
- });
70
- }
71
- function parseValidator(options) {
72
- const validator = options["validator"];
73
- if (!validator) return void 0;
74
- const jsonSchema = validator["$jsonSchema"];
75
- if (!jsonSchema) return void 0;
76
- return new MongoSchemaValidator({
77
- jsonSchema,
78
- validationLevel: options["validationLevel"] ?? "strict",
79
- validationAction: options["validationAction"] ?? "error"
80
- });
81
- }
82
- function parseCollectionOptions(info) {
83
- const options = info["options"];
84
- if (!options) return void 0;
85
- const capped = options["capped"];
86
- const size = options["size"];
87
- const max = options["max"];
88
- const timeseries = options["timeseries"];
89
- const collation = options["collation"] ? blindCast(options["collation"]) : void 0;
90
- const changeStreamPreAndPostImages = options["changeStreamPreAndPostImages"];
91
- const clusteredIndex = options["clusteredIndex"];
92
- if (!(capped || timeseries || collation || changeStreamPreAndPostImages || clusteredIndex)) return void 0;
93
- return new MongoSchemaCollectionOptions({
94
- ...capped ? { capped: {
95
- size: size ?? 0,
96
- ...max != null ? { max } : {}
97
- } } : {},
98
- ...timeseries ? { timeseries } : {},
99
- ...collation ? { collation } : {},
100
- ...changeStreamPreAndPostImages ? { changeStreamPreAndPostImages } : {},
101
- ...clusteredIndex ? { clusteredIndex } : {}
102
- });
103
- }
104
- async function introspectSchema(db) {
105
- const collectionInfos = await db.listCollections().toArray();
106
- const collections = [];
107
- for (const info of collectionInfos) {
108
- const name = info["name"];
109
- const type = info["type"];
110
- if (name === PRISMA_MIGRATIONS_COLLECTION) continue;
111
- if (name.startsWith("system.")) continue;
112
- if (type === "view") continue;
113
- const indexes = (await db.collection(name).listIndexes().toArray()).filter((doc) => !isDefaultIdIndex(doc)).map(parseIndex);
114
- const validator = parseValidator("options" in info ? info["options"] : {});
115
- const options = parseCollectionOptions(info);
116
- collections.push(new MongoSchemaCollection({
117
- name,
118
- indexes,
119
- ...validator ? { validator } : {},
120
- ...options ? { options } : {}
121
- }));
122
- }
123
- return new MongoSchemaIR(collections);
124
- }
125
- const COLLECTION = "_prisma_migrations";
126
- const MONGO_MARKER_COLLECTION = `_prisma_migrations marker documents in ${COLLECTION}`;
127
- const MONGO_LEDGER_COLLECTION = `_prisma_migrations ledger documents in ${COLLECTION}`;
128
- const MongoMarkerDocSchema = type({
129
- space: "string",
130
- storageHash: "string",
131
- profileHash: "string",
132
- "contractJson?": "unknown | null",
133
- "canonicalVersion?": "number | null",
134
- "updatedAt?": "Date",
135
- "appTag?": "string | null",
136
- "meta?": type({ "[string]": "unknown" }).or("null"),
137
- "invariants?": type("string").array(),
138
- "+": "delete"
139
- });
140
- function parseMongoMarkerDoc(doc) {
141
- const result = MongoMarkerDocSchema(doc);
142
- if (result instanceof type.errors) throw mongoAdapterError("CONTRACT.MARKER_ROW_CORRUPT", `Invalid marker doc on ${COLLECTION}: ${result.summary}`, { meta: {
143
- collection: COLLECTION,
144
- detail: result.summary
145
- } });
146
- return {
147
- storageHash: result.storageHash,
148
- profileHash: result.profileHash,
149
- contractJson: result.contractJson ?? null,
150
- canonicalVersion: result.canonicalVersion ?? null,
151
- updatedAt: result.updatedAt ?? /* @__PURE__ */ new Date(),
152
- appTag: result.appTag ?? null,
153
- meta: result.meta ?? {},
154
- invariants: result.invariants ?? []
155
- };
156
- }
157
- function parseMongoMarkerDocSafely(doc, space) {
158
- return parseMarkerRowSafely(doc, parseMongoMarkerDoc, {
159
- space,
160
- markerLocation: MONGO_MARKER_COLLECTION
161
- });
162
- }
163
- const MARKER_LEDGER_COLLECTION = "_prisma_migrations";
164
- function isMongoControlDriver(driver) {
165
- return driver.familyId === "mongo" && driver.targetId === "mongo" && "execute" in driver && typeof driver.execute === "function";
166
- }
167
- function extractDb(driver) {
168
- if (!isMongoControlDriver(driver)) throw mongoAdapterError("CONFIG.VALIDATION_FAILED", "Expected a Mongo control driver created by mongoControlDriver.create() from `@internal/driver-mongo/control`.", { meta: { received: describeReceivedValue(driver) } });
169
- return driver.db;
170
- }
171
- /**
172
- * Build the runner-dependencies envelope. `controlAdapter` is the
173
- * dispatch surface for wire-level Mongo CAS operations (marker reads,
174
- * marker advances, ledger appends, introspection); the envelope's
175
- * `markerOps` shim simply forwards each call through it. When the
176
- * caller already has a `MongoControlAdapter` on the control stack it
177
- * can pass it in; otherwise a default `MongoControlAdapterImpl` is
178
- * constructed locally.
179
- */
180
- function createMongoRunnerDeps(controlDriver, driver, _family, controlAdapter = new MongoControlAdapterImpl()) {
181
- const adapter = createMongoAdapter();
182
- return {
183
- inspectionExecutor: new MongoInspectionExecutor(extractDb(controlDriver)),
184
- adapter,
185
- driver,
186
- executeDdl: (command) => adapter.lower({ command }, {}).then((wire) => driver.run(wire)),
187
- markerOps: {
188
- readMarker: (space) => controlAdapter.readMarker(controlDriver, space),
189
- initMarker: (space, dest) => controlAdapter.initMarker(controlDriver, space, dest),
190
- updateMarker: (space, expectedFrom, dest) => controlAdapter.updateMarker(controlDriver, space, expectedFrom, dest),
191
- writeLedgerEntry: (space, entry) => controlAdapter.writeLedgerEntry(controlDriver, space, entry)
192
- },
193
- introspectSchema: () => controlAdapter.introspectSchema(controlDriver)
194
- };
195
- }
196
- /**
197
- * Mongo control adapter for control-plane operations like introspection
198
- * and marker-ledger CAS. Implements the family-level `MongoControlAdapter`
199
- * SPI. Every marker/ledger operation builds a canonical command inline via
200
- * the contract-free fluent builder and dispatches it through the family
201
- * adapter's lowering path (`createMongoAdapter().lower(plan, {})`) onto the
202
- * Mongo wire transport (`driver.execute(wireCommand)`) — the same route SQL
203
- * marker/ledger ops take through `adapter.lower()` → `driver.query()`.
204
- */
205
- var MongoControlAdapterImpl = class {
206
- familyId = "mongo";
207
- targetId = "mongo";
208
- #adapter = createMongoAdapter();
209
- #markerLedgerCollection = collection(MARKER_LEDGER_COLLECTION);
210
- async #execute(driver, command) {
211
- const plan = {
212
- collection: MARKER_LEDGER_COLLECTION,
213
- command,
214
- meta: {
215
- target: "mongo",
216
- targetFamily: "mongo",
217
- storageHash: "",
218
- lane: "control"
219
- }
220
- };
221
- const wireCommand = await this.#adapter.lower(plan, {});
222
- if (!isMongoControlDriver(driver)) throw mongoAdapterError("CONFIG.VALIDATION_FAILED", "Mongo control adapter requires a Mongo control driver with an execute() transport. Provide a MongoControlDriver from `@internal/driver-mongo/control`.", { meta: { received: describeReceivedValue(driver) } });
223
- const rows = [];
224
- for await (const row of driver.execute(wireCommand)) rows.push(row);
225
- return rows;
226
- }
227
- async executeDdl(driver, command) {
228
- const wire = await this.#adapter.lower({ command }, {});
229
- await driver.run(wire);
230
- }
231
- /**
232
- * Server-side invariant-merge aggregation expression:
233
- * `$sortArray({ input: $setUnion([$ifNull('$invariants', []), incoming]), sortBy: 1 })`.
234
- *
235
- * Built through the typed agg-expr layer — `fn.setUnion` plus the generic
236
- * `MongoAggOperator` for `$ifNull` / `$sortArray` (neither has a named `fn`
237
- * helper). Returns a `MongoAggOperator` that is passed directly to
238
- * `f.stage.set({ invariants: ... })` in the update pipeline.
239
- */
240
- #invariantMergeExpr(incoming) {
241
- const existingOrEmpty = MongoAggOperator.of("$ifNull", [MongoAggFieldRef.of("invariants"), MongoAggLiteral.of([])]);
242
- const merged = fn.setUnion({
243
- _field: {
244
- codecId: "mongo/array@1",
245
- nullable: false
246
- },
247
- node: existingOrEmpty
248
- }, {
249
- _field: {
250
- codecId: "mongo/array@1",
251
- nullable: false
252
- },
253
- node: MongoAggLiteral.of([...incoming])
254
- });
255
- return MongoAggOperator.of("$sortArray", {
256
- input: merged.node,
257
- sortBy: MongoAggLiteral.of(1)
258
- });
259
- }
260
- async readMarker(driver, space) {
261
- const doc = (await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).limit(1).build()), {
262
- space,
263
- markerLocation: MONGO_MARKER_COLLECTION
264
- }))[0];
265
- if (!doc) return null;
266
- return parseMongoMarkerDocSafely(doc, space);
267
- }
268
- async readAllMarkers(driver) {
269
- const docs = await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.type("string")).match((f) => f.space.type("string")).match((f) => expr(fn.eq(f._id, f.space))).build()), {
270
- space: "app",
271
- markerLocation: MONGO_MARKER_COLLECTION
272
- });
273
- const out = /* @__PURE__ */ new Map();
274
- for (const doc of docs) {
275
- const space = doc["space"];
276
- /* v8 ignore next -- @preserve type-narrowing guard: the $match stage above filters on `space: { $type: 'string' }`, so this branch is unreachable at runtime. The check exists so the `out.set(space, ...)` call below can accept `string`. */
277
- if (typeof space !== "string") continue;
278
- out.set(space, parseMongoMarkerDocSafely(doc, space));
279
- }
280
- return out;
281
- }
282
- async initMarker(driver, space, destination) {
283
- const document = {
284
- _id: space,
285
- space,
286
- storageHash: destination.storageHash,
287
- profileHash: destination.profileHash,
288
- contractJson: null,
289
- canonicalVersion: null,
290
- updatedAt: /* @__PURE__ */ new Date(),
291
- appTag: null,
292
- meta: {},
293
- invariants: [...destination.invariants ?? []]
294
- };
295
- await this.#execute(driver, this.#markerLedgerCollection.insertOne(document));
296
- }
297
- async updateMarker(driver, space, expectedFrom, destination) {
298
- const { invariants } = destination;
299
- return (await this.#execute(driver, this.#markerLedgerCollection.match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).match((f) => f.storageHash.eq(expectedFrom)).findOneAndUpdate((f) => [f.stage.set(invariants === void 0 ? {
300
- storageHash: MongoAggLiteral.of(destination.storageHash),
301
- profileHash: MongoAggLiteral.of(destination.profileHash),
302
- updatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date())
303
- } : {
304
- storageHash: MongoAggLiteral.of(destination.storageHash),
305
- profileHash: MongoAggLiteral.of(destination.profileHash),
306
- updatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date()),
307
- invariants: this.#invariantMergeExpr(invariants)
308
- })], { upsert: false }))).length > 0;
309
- }
310
- async writeLedgerEntry(driver, space, entry) {
311
- const document = {
312
- type: "ledger",
313
- space,
314
- edgeId: entry.edgeId,
315
- from: entry.from,
316
- to: entry.to,
317
- migrationName: entry.migrationName,
318
- migrationHash: entry.migrationHash,
319
- operations: blindCast(entry.operations),
320
- appliedAt: /* @__PURE__ */ new Date()
321
- };
322
- await this.#execute(driver, this.#markerLedgerCollection.insertOne(document));
323
- }
324
- async readLedger(driver, space) {
325
- const ledgerContext = {
326
- space: space ?? "*",
327
- markerLocation: MONGO_LEDGER_COLLECTION
328
- };
329
- const chain = this.#markerLedgerCollection.aggregate().match((f) => f.type.eq("ledger"));
330
- const command = space === void 0 ? chain.sort({ _id: 1 }).build() : chain.match((f) => f.space.eq(space)).sort({ _id: 1 }).build();
331
- const docs = await withMarkerReadErrorHandling(() => this.#execute(driver, command), ledgerContext);
332
- const entries = [];
333
- for (const doc of docs) {
334
- const migrationName = doc["migrationName"];
335
- const migrationHash = doc["migrationHash"];
336
- const from = doc["from"];
337
- const to = doc["to"];
338
- const docSpace = doc["space"];
339
- if (typeof migrationName !== "string" || typeof migrationHash !== "string") continue;
340
- if (typeof from !== "string" || typeof to !== "string") continue;
341
- if (typeof docSpace !== "string") continue;
342
- const appliedAt = doc["appliedAt"];
343
- const appliedAtDate = appliedAt instanceof Date ? appliedAt : appliedAt !== void 0 ? new Date(String(appliedAt)) : /* @__PURE__ */ new Date();
344
- const operations = doc["operations"];
345
- const opList = Array.isArray(operations) ? operations : [];
346
- entries.push({
347
- space: docSpace,
348
- migrationName,
349
- migrationHash,
350
- from: ledgerOriginFromStored(from),
351
- to,
352
- appliedAt: appliedAtDate,
353
- operationCount: opList.length
354
- });
355
- }
356
- return entries;
357
- }
358
- async introspectSchema(driver) {
359
- return introspectSchema(extractDb(driver));
360
- }
361
- };
362
- /**
363
- * The base PSL scalars as zero-arg type constructors in the unified authoring
364
- * channel, with explicit `nativeType` values pinned to the codec manifests
365
- * (`codecLookup.targetTypesFor(codecId)[0]`).
366
- */
367
- const mongoScalarAuthoringTypes = {
368
- String: {
369
- kind: "typeConstructor",
370
- documentation: "Text stored as a BSON string.",
371
- output: {
372
- codecId: "mongo/string@1",
373
- nativeType: "string"
374
- }
375
- },
376
- Int: {
377
- kind: "typeConstructor",
378
- documentation: "A signed 32-bit integer stored as BSON int.",
379
- output: {
380
- codecId: "mongo/int32@1",
381
- nativeType: "int"
382
- }
383
- },
384
- Boolean: {
385
- kind: "typeConstructor",
386
- documentation: "A true or false value stored as BSON bool.",
387
- output: {
388
- codecId: "mongo/bool@1",
389
- nativeType: "bool"
390
- }
391
- },
392
- DateTime: {
393
- kind: "typeConstructor",
394
- documentation: "A date and time stored as BSON date with millisecond precision.",
395
- output: {
396
- codecId: "mongo/date@1",
397
- nativeType: "date"
398
- }
399
- },
400
- ObjectId: {
401
- kind: "typeConstructor",
402
- documentation: "A 12-byte MongoDB identifier stored as BSON ObjectId.",
403
- output: {
404
- codecId: "mongo/objectId@1",
405
- nativeType: "objectId"
406
- }
407
- },
408
- Float: {
409
- kind: "typeConstructor",
410
- documentation: "A double-precision floating-point number stored as BSON double.",
411
- output: {
412
- codecId: "mongo/double@1",
413
- nativeType: "double"
414
- }
415
- }
416
- };
417
- const mongoAdapterDescriptor = {
418
- kind: "adapter",
419
- id: "mongo",
420
- familyId: "mongo",
421
- targetId: "mongo",
422
- version: "0.0.1",
423
- authoring: { type: mongoScalarAuthoringTypes },
424
- types: { codecTypes: {
425
- import: {
426
- package: "@internal/adapter-mongo/codec-types",
427
- named: "CodecTypes",
428
- alias: "MongoCodecTypes"
429
- },
430
- typeImports: [{
431
- package: "@internal/adapter-mongo/codec-types",
432
- named: "Vector",
433
- alias: "Vector"
434
- }]
435
- } },
436
- create(_stack) {
437
- return new MongoControlAdapterImpl();
438
- }
439
- };
440
- //#endregion
441
- export { introspectSchema as a, mongoScalarAuthoringTypes as c, extractDb as i, MongoInspectionExecutor as n, isMongoControlDriver as o, createMongoRunnerDeps as r, mongoAdapterDescriptor as s, MongoControlAdapterImpl as t };
442
-
443
- //# sourceMappingURL=control-BDevch6o.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-BDevch6o.mjs","names":["#execute","#adapter","#markerLedgerCollection","#invariantMergeExpr"],"sources":["../../../../3-mongo-target/2-mongo-adapter/dist/control.mjs"],"sourcesContent":["import { t as createMongoAdapter } from \"./mongo-adapter-NKwUwPku.mjs\";\nimport { a as mongoAdapterError, i as describeReceivedValue } from \"./codecs-0ilNxnkk.mjs\";\nimport { MongoAggFieldRef, MongoAggLiteral, MongoAggOperator } from \"@internal/mongo-query-ast/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { MongoServerError } from \"mongodb\";\nimport { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from \"@internal/mongo-schema-ir\";\nimport { parseMarkerRowSafely, withMarkerReadErrorHandling } from \"@internal/errors/execution\";\nimport { ledgerOriginFromStored } from \"@internal/migration-tools/ledger-origin\";\nimport { expr, fn } from \"@internal/mongo-query-builder\";\nimport { collection } from \"@internal/mongo-query-builder/contract-free\";\nimport { type } from \"arktype\";\n//#region src/core/inspection-executor.ts\n/**\n* Executes the read-only catalog inspections (`listCollections` / `listIndexes`)\n* that migration prechecks/postchecks and operation preview evaluate, directly\n* against `db`. Routing these checks through the adapter's lowering seam is\n* deferred to the `typed-migration-verification-queries` slice.\n*/\nvar MongoInspectionExecutor = class {\n\tdb;\n\tconstructor(db) {\n\t\tthis.db = db;\n\t}\n\tasync listIndexes(cmd) {\n\t\ttry {\n\t\t\treturn await this.db.collection(cmd.collection).listIndexes().toArray();\n\t\t} catch (error) {\n\t\t\tif (error instanceof MongoServerError && error.code === 26) return [];\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync listCollections(_cmd) {\n\t\treturn this.db.listCollections().toArray();\n\t}\n};\n//#endregion\n//#region src/core/introspect-schema.ts\nconst PRISMA_MIGRATIONS_COLLECTION = \"_prisma_migrations\";\nfunction parseIndexKeys(keySpec) {\n\tconst keys = [];\n\tfor (const [field, direction] of Object.entries(keySpec)) keys.push({\n\t\tfield,\n\t\tdirection\n\t});\n\treturn keys;\n}\n/**\n* Exported for unit tests to exercise the defensive `!key` guard; not part of\n* the public API. Callers in this package use it via the `introspectSchema`\n* pipeline only.\n*/\nfunction isDefaultIdIndex(doc) {\n\tconst key = doc[\"key\"];\n\tif (!key) return false;\n\tconst entries = Object.entries(key);\n\treturn entries.length === 1 && entries[0]?.[0] === \"_id\" && entries[0]?.[1] === 1;\n}\nfunction parseIndex(doc) {\n\tconst keySpec = doc[\"key\"];\n\treturn new MongoSchemaIndex({\n\t\tkeys: parseIndexKeys(keySpec),\n\t\tunique: doc[\"unique\"],\n\t\tsparse: doc[\"sparse\"],\n\t\texpireAfterSeconds: doc[\"expireAfterSeconds\"],\n\t\tpartialFilterExpression: doc[\"partialFilterExpression\"],\n\t\twildcardProjection: doc[\"wildcardProjection\"],\n\t\tcollation: doc[\"collation\"] ? blindCast(doc[\"collation\"]) : void 0,\n\t\tweights: doc[\"weights\"],\n\t\tdefault_language: doc[\"default_language\"],\n\t\tlanguage_override: doc[\"language_override\"]\n\t});\n}\nfunction parseValidator(options) {\n\tconst validator = options[\"validator\"];\n\tif (!validator) return void 0;\n\tconst jsonSchema = validator[\"$jsonSchema\"];\n\tif (!jsonSchema) return void 0;\n\treturn new MongoSchemaValidator({\n\t\tjsonSchema,\n\t\tvalidationLevel: options[\"validationLevel\"] ?? \"strict\",\n\t\tvalidationAction: options[\"validationAction\"] ?? \"error\"\n\t});\n}\nfunction parseCollectionOptions(info) {\n\tconst options = info[\"options\"];\n\tif (!options) return void 0;\n\tconst capped = options[\"capped\"];\n\tconst size = options[\"size\"];\n\tconst max = options[\"max\"];\n\tconst timeseries = options[\"timeseries\"];\n\tconst collation = options[\"collation\"] ? blindCast(options[\"collation\"]) : void 0;\n\tconst changeStreamPreAndPostImages = options[\"changeStreamPreAndPostImages\"];\n\tconst clusteredIndex = options[\"clusteredIndex\"];\n\tif (!(capped || timeseries || collation || changeStreamPreAndPostImages || clusteredIndex)) return void 0;\n\treturn new MongoSchemaCollectionOptions({\n\t\t...capped ? { capped: {\n\t\t\tsize: size ?? 0,\n\t\t\t...max != null ? { max } : {}\n\t\t} } : {},\n\t\t...timeseries ? { timeseries } : {},\n\t\t...collation ? { collation } : {},\n\t\t...changeStreamPreAndPostImages ? { changeStreamPreAndPostImages } : {},\n\t\t...clusteredIndex ? { clusteredIndex } : {}\n\t});\n}\nasync function introspectSchema(db) {\n\tconst collectionInfos = await db.listCollections().toArray();\n\tconst collections = [];\n\tfor (const info of collectionInfos) {\n\t\tconst name = info[\"name\"];\n\t\tconst type = info[\"type\"];\n\t\tif (name === PRISMA_MIGRATIONS_COLLECTION) continue;\n\t\tif (name.startsWith(\"system.\")) continue;\n\t\tif (type === \"view\") continue;\n\t\tconst indexes = (await db.collection(name).listIndexes().toArray()).filter((doc) => !isDefaultIdIndex(doc)).map(parseIndex);\n\t\tconst validator = parseValidator(\"options\" in info ? info[\"options\"] : {});\n\t\tconst options = parseCollectionOptions(info);\n\t\tcollections.push(new MongoSchemaCollection({\n\t\t\tname,\n\t\t\tindexes,\n\t\t\t...validator ? { validator } : {},\n\t\t\t...options ? { options } : {}\n\t\t}));\n\t}\n\treturn new MongoSchemaIR(collections);\n}\n//#endregion\n//#region src/core/marker-ledger.ts\nconst COLLECTION = \"_prisma_migrations\";\nconst MONGO_MARKER_COLLECTION = `_prisma_migrations marker documents in ${COLLECTION}`;\nconst MONGO_LEDGER_COLLECTION = `_prisma_migrations ledger documents in ${COLLECTION}`;\nconst MongoMarkerDocSchema = type({\n\tspace: \"string\",\n\tstorageHash: \"string\",\n\tprofileHash: \"string\",\n\t\"contractJson?\": \"unknown | null\",\n\t\"canonicalVersion?\": \"number | null\",\n\t\"updatedAt?\": \"Date\",\n\t\"appTag?\": \"string | null\",\n\t\"meta?\": type({ \"[string]\": \"unknown\" }).or(\"null\"),\n\t\"invariants?\": type(\"string\").array(),\n\t\"+\": \"delete\"\n});\nfunction parseMongoMarkerDoc(doc) {\n\tconst result = MongoMarkerDocSchema(doc);\n\tif (result instanceof type.errors) throw mongoAdapterError(\"CONTRACT.MARKER_ROW_CORRUPT\", `Invalid marker doc on ${COLLECTION}: ${result.summary}`, { meta: {\n\t\tcollection: COLLECTION,\n\t\tdetail: result.summary\n\t} });\n\treturn {\n\t\tstorageHash: result.storageHash,\n\t\tprofileHash: result.profileHash,\n\t\tcontractJson: result.contractJson ?? null,\n\t\tcanonicalVersion: result.canonicalVersion ?? null,\n\t\tupdatedAt: result.updatedAt ?? /* @__PURE__ */ new Date(),\n\t\tappTag: result.appTag ?? null,\n\t\tmeta: result.meta ?? {},\n\t\tinvariants: result.invariants ?? []\n\t};\n}\nfunction parseMongoMarkerDocSafely(doc, space) {\n\treturn parseMarkerRowSafely(doc, parseMongoMarkerDoc, {\n\t\tspace,\n\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t});\n}\n//#endregion\n//#region src/core/marker-ledger-collection.ts\nconst MARKER_LEDGER_COLLECTION = \"_prisma_migrations\";\n//#endregion\n//#region src/core/mongo-control-driver.ts\nfunction isMongoControlDriver(driver) {\n\treturn driver.familyId === \"mongo\" && driver.targetId === \"mongo\" && \"execute\" in driver && typeof driver.execute === \"function\";\n}\n//#endregion\n//#region src/core/runner-deps.ts\nfunction extractDb(driver) {\n\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Expected a Mongo control driver created by mongoControlDriver.create() from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\treturn driver.db;\n}\n/**\n* Build the runner-dependencies envelope. `controlAdapter` is the\n* dispatch surface for wire-level Mongo CAS operations (marker reads,\n* marker advances, ledger appends, introspection); the envelope's\n* `markerOps` shim simply forwards each call through it. When the\n* caller already has a `MongoControlAdapter` on the control stack it\n* can pass it in; otherwise a default `MongoControlAdapterImpl` is\n* constructed locally.\n*/\nfunction createMongoRunnerDeps(controlDriver, driver, _family, controlAdapter = new MongoControlAdapterImpl()) {\n\tconst adapter = createMongoAdapter();\n\treturn {\n\t\tinspectionExecutor: new MongoInspectionExecutor(extractDb(controlDriver)),\n\t\tadapter,\n\t\tdriver,\n\t\texecuteDdl: (command) => adapter.lower({ command }, {}).then((wire) => driver.run(wire)),\n\t\tmarkerOps: {\n\t\t\treadMarker: (space) => controlAdapter.readMarker(controlDriver, space),\n\t\t\tinitMarker: (space, dest) => controlAdapter.initMarker(controlDriver, space, dest),\n\t\t\tupdateMarker: (space, expectedFrom, dest) => controlAdapter.updateMarker(controlDriver, space, expectedFrom, dest),\n\t\t\twriteLedgerEntry: (space, entry) => controlAdapter.writeLedgerEntry(controlDriver, space, entry)\n\t\t},\n\t\tintrospectSchema: () => controlAdapter.introspectSchema(controlDriver)\n\t};\n}\n//#endregion\n//#region src/core/mongo-control-adapter.ts\n/**\n* Mongo control adapter for control-plane operations like introspection\n* and marker-ledger CAS. Implements the family-level `MongoControlAdapter`\n* SPI. Every marker/ledger operation builds a canonical command inline via\n* the contract-free fluent builder and dispatches it through the family\n* adapter's lowering path (`createMongoAdapter().lower(plan, {})`) onto the\n* Mongo wire transport (`driver.execute(wireCommand)`) — the same route SQL\n* marker/ledger ops take through `adapter.lower()` → `driver.query()`.\n*/\nvar MongoControlAdapterImpl = class {\n\tfamilyId = \"mongo\";\n\ttargetId = \"mongo\";\n\t#adapter = createMongoAdapter();\n\t#markerLedgerCollection = collection(MARKER_LEDGER_COLLECTION);\n\tasync #execute(driver, command) {\n\t\tconst plan = {\n\t\t\tcollection: MARKER_LEDGER_COLLECTION,\n\t\t\tcommand,\n\t\t\tmeta: {\n\t\t\t\ttarget: \"mongo\",\n\t\t\t\ttargetFamily: \"mongo\",\n\t\t\t\tstorageHash: \"\",\n\t\t\t\tlane: \"control\"\n\t\t\t}\n\t\t};\n\t\tconst wireCommand = await this.#adapter.lower(plan, {});\n\t\tif (!isMongoControlDriver(driver)) throw mongoAdapterError(\"CONFIG.VALIDATION_FAILED\", \"Mongo control adapter requires a Mongo control driver with an execute() transport. Provide a MongoControlDriver from `@internal/driver-mongo/control`.\", { meta: { received: describeReceivedValue(driver) } });\n\t\tconst rows = [];\n\t\tfor await (const row of driver.execute(wireCommand)) rows.push(row);\n\t\treturn rows;\n\t}\n\tasync executeDdl(driver, command) {\n\t\tconst wire = await this.#adapter.lower({ command }, {});\n\t\tawait driver.run(wire);\n\t}\n\t/**\n\t* Server-side invariant-merge aggregation expression:\n\t* `$sortArray({ input: $setUnion([$ifNull('$invariants', []), incoming]), sortBy: 1 })`.\n\t*\n\t* Built through the typed agg-expr layer — `fn.setUnion` plus the generic\n\t* `MongoAggOperator` for `$ifNull` / `$sortArray` (neither has a named `fn`\n\t* helper). Returns a `MongoAggOperator` that is passed directly to\n\t* `f.stage.set({ invariants: ... })` in the update pipeline.\n\t*/\n\t#invariantMergeExpr(incoming) {\n\t\tconst existingOrEmpty = MongoAggOperator.of(\"$ifNull\", [MongoAggFieldRef.of(\"invariants\"), MongoAggLiteral.of([])]);\n\t\tconst merged = fn.setUnion({\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: existingOrEmpty\n\t\t}, {\n\t\t\t_field: {\n\t\t\t\tcodecId: \"mongo/array@1\",\n\t\t\t\tnullable: false\n\t\t\t},\n\t\t\tnode: MongoAggLiteral.of([...incoming])\n\t\t});\n\t\treturn MongoAggOperator.of(\"$sortArray\", {\n\t\t\tinput: merged.node,\n\t\t\tsortBy: MongoAggLiteral.of(1)\n\t\t});\n\t}\n\tasync readMarker(driver, space) {\n\t\tconst doc = (await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).limit(1).build()), {\n\t\t\tspace,\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t}))[0];\n\t\tif (!doc) return null;\n\t\treturn parseMongoMarkerDocSafely(doc, space);\n\t}\n\tasync readAllMarkers(driver) {\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, this.#markerLedgerCollection.aggregate().match((f) => f._id.type(\"string\")).match((f) => f.space.type(\"string\")).match((f) => expr(fn.eq(f._id, f.space))).build()), {\n\t\t\tspace: \"app\",\n\t\t\tmarkerLocation: MONGO_MARKER_COLLECTION\n\t\t});\n\t\tconst out = /* @__PURE__ */ new Map();\n\t\tfor (const doc of docs) {\n\t\t\tconst space = doc[\"space\"];\n\t\t\t/* v8 ignore next -- @preserve type-narrowing guard: the $match stage above filters on `space: { $type: 'string' }`, so this branch is unreachable at runtime. The check exists so the `out.set(space, ...)` call below can accept `string`. */\n\t\t\tif (typeof space !== \"string\") continue;\n\t\t\tout.set(space, parseMongoMarkerDocSafely(doc, space));\n\t\t}\n\t\treturn out;\n\t}\n\tasync initMarker(driver, space, destination) {\n\t\tconst document = {\n\t\t\t_id: space,\n\t\t\tspace,\n\t\t\tstorageHash: destination.storageHash,\n\t\t\tprofileHash: destination.profileHash,\n\t\t\tcontractJson: null,\n\t\t\tcanonicalVersion: null,\n\t\t\tupdatedAt: /* @__PURE__ */ new Date(),\n\t\t\tappTag: null,\n\t\t\tmeta: {},\n\t\t\tinvariants: [...destination.invariants ?? []]\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync updateMarker(driver, space, expectedFrom, destination) {\n\t\tconst { invariants } = destination;\n\t\treturn (await this.#execute(driver, this.#markerLedgerCollection.match((f) => f._id.eq(space)).match((f) => f.space.eq(space)).match((f) => f.storageHash.eq(expectedFrom)).findOneAndUpdate((f) => [f.stage.set(invariants === void 0 ? {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date())\n\t\t} : {\n\t\t\tstorageHash: MongoAggLiteral.of(destination.storageHash),\n\t\t\tprofileHash: MongoAggLiteral.of(destination.profileHash),\n\t\t\tupdatedAt: MongoAggLiteral.of(/* @__PURE__ */ new Date()),\n\t\t\tinvariants: this.#invariantMergeExpr(invariants)\n\t\t})], { upsert: false }))).length > 0;\n\t}\n\tasync writeLedgerEntry(driver, space, entry) {\n\t\tconst document = {\n\t\t\ttype: \"ledger\",\n\t\t\tspace,\n\t\t\tedgeId: entry.edgeId,\n\t\t\tfrom: entry.from,\n\t\t\tto: entry.to,\n\t\t\tmigrationName: entry.migrationName,\n\t\t\tmigrationHash: entry.migrationHash,\n\t\t\toperations: blindCast(entry.operations),\n\t\t\tappliedAt: /* @__PURE__ */ new Date()\n\t\t};\n\t\tawait this.#execute(driver, this.#markerLedgerCollection.insertOne(document));\n\t}\n\tasync readLedger(driver, space) {\n\t\tconst ledgerContext = {\n\t\t\tspace: space ?? \"*\",\n\t\t\tmarkerLocation: MONGO_LEDGER_COLLECTION\n\t\t};\n\t\tconst chain = this.#markerLedgerCollection.aggregate().match((f) => f.type.eq(\"ledger\"));\n\t\tconst command = space === void 0 ? chain.sort({ _id: 1 }).build() : chain.match((f) => f.space.eq(space)).sort({ _id: 1 }).build();\n\t\tconst docs = await withMarkerReadErrorHandling(() => this.#execute(driver, command), ledgerContext);\n\t\tconst entries = [];\n\t\tfor (const doc of docs) {\n\t\t\tconst migrationName = doc[\"migrationName\"];\n\t\t\tconst migrationHash = doc[\"migrationHash\"];\n\t\t\tconst from = doc[\"from\"];\n\t\t\tconst to = doc[\"to\"];\n\t\t\tconst docSpace = doc[\"space\"];\n\t\t\tif (typeof migrationName !== \"string\" || typeof migrationHash !== \"string\") continue;\n\t\t\tif (typeof from !== \"string\" || typeof to !== \"string\") continue;\n\t\t\tif (typeof docSpace !== \"string\") continue;\n\t\t\tconst appliedAt = doc[\"appliedAt\"];\n\t\t\tconst appliedAtDate = appliedAt instanceof Date ? appliedAt : appliedAt !== void 0 ? new Date(String(appliedAt)) : /* @__PURE__ */ new Date();\n\t\t\tconst operations = doc[\"operations\"];\n\t\t\tconst opList = Array.isArray(operations) ? operations : [];\n\t\t\tentries.push({\n\t\t\t\tspace: docSpace,\n\t\t\t\tmigrationName,\n\t\t\t\tmigrationHash,\n\t\t\t\tfrom: ledgerOriginFromStored(from),\n\t\t\t\tto,\n\t\t\t\tappliedAt: appliedAtDate,\n\t\t\t\toperationCount: opList.length\n\t\t\t});\n\t\t}\n\t\treturn entries;\n\t}\n\tasync introspectSchema(driver) {\n\t\treturn introspectSchema(extractDb(driver));\n\t}\n};\n//#endregion\n//#region src/exports/control.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel, with explicit `nativeType` values pinned to the codec manifests\n* (`codecLookup.targetTypesFor(codecId)[0]`).\n*/\nconst mongoScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Text stored as a BSON string.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/string@1\",\n\t\t\tnativeType: \"string\"\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A signed 32-bit integer stored as BSON int.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/int32@1\",\n\t\t\tnativeType: \"int\"\n\t\t}\n\t},\n\tBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A true or false value stored as BSON bool.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/bool@1\",\n\t\t\tnativeType: \"bool\"\n\t\t}\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as BSON date with millisecond precision.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/date@1\",\n\t\t\tnativeType: \"date\"\n\t\t}\n\t},\n\tObjectId: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A 12-byte MongoDB identifier stored as BSON ObjectId.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/objectId@1\",\n\t\t\tnativeType: \"objectId\"\n\t\t}\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A double-precision floating-point number stored as BSON double.\",\n\t\toutput: {\n\t\t\tcodecId: \"mongo/double@1\",\n\t\t\tnativeType: \"double\"\n\t\t}\n\t}\n};\nconst mongoAdapterDescriptor = {\n\tkind: \"adapter\",\n\tid: \"mongo\",\n\tfamilyId: \"mongo\",\n\ttargetId: \"mongo\",\n\tversion: \"0.0.1\",\n\tauthoring: { type: mongoScalarAuthoringTypes },\n\ttypes: { codecTypes: {\n\t\timport: {\n\t\t\tpackage: \"@internal/adapter-mongo/codec-types\",\n\t\t\tnamed: \"CodecTypes\",\n\t\t\talias: \"MongoCodecTypes\"\n\t\t},\n\t\ttypeImports: [{\n\t\t\tpackage: \"@internal/adapter-mongo/codec-types\",\n\t\t\tnamed: \"Vector\",\n\t\t\talias: \"Vector\"\n\t\t}]\n\t} },\n\tcreate(_stack) {\n\t\treturn new MongoControlAdapterImpl();\n\t}\n};\n//#endregion\nexport { MongoControlAdapterImpl, MongoInspectionExecutor, createMongoAdapter, createMongoRunnerDeps, mongoAdapterDescriptor as default, mongoAdapterDescriptor, extractDb, introspectSchema, isMongoControlDriver, mongoScalarAuthoringTypes };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAI,0BAA0B,MAAM;CACnC;CACA,YAAY,IAAI;EACf,KAAK,KAAK;CACX;CACA,MAAM,YAAY,KAAK;EACtB,IAAI;GACH,OAAO,MAAM,KAAK,GAAG,WAAW,IAAI,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ;EACvE,SAAS,OAAO;GACf,IAAI,iBAAiB,oBAAoB,MAAM,SAAS,IAAI,OAAO,CAAC;GACpE,MAAM;EACP;CACD;CACA,MAAM,gBAAgB,MAAM;EAC3B,OAAO,KAAK,GAAG,gBAAgB,CAAC,CAAC,QAAQ;CAC1C;AACD;AAGA,MAAM,+BAA+B;AACrC,SAAS,eAAe,SAAS;CAChC,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,OAAO,cAAc,OAAO,QAAQ,OAAO,GAAG,KAAK,KAAK;EACnE;EACA;CACD,CAAC;CACD,OAAO;AACR;;;;;;AAMA,SAAS,iBAAiB,KAAK;CAC9B,MAAM,MAAM,IAAI;CAChB,IAAI,CAAC,KAAK,OAAO;CACjB,MAAM,UAAU,OAAO,QAAQ,GAAG;CAClC,OAAO,QAAQ,WAAW,KAAK,QAAQ,EAAE,GAAG,OAAO,SAAS,QAAQ,EAAE,GAAG,OAAO;AACjF;AACA,S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;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;CACA,OAAO;EACN,MAAM;EACN,eAAe;EACf,QAAQ;GACP,SAAS;GACT,YAAY;EACb;CACD;AACD;AACA,MAAM,yBAAyB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,WAAW,EAAE,MAAM,0BAA0B;CAC7C,OAAO,EAAE,YAAY;EACpB,QAAQ;GACP,SAAS;GACT,OAAO;GACP,OAAO;EACR;EACA,aAAa,CAAC;GACb,SAAS;GACT,OAAO;GACP,OAAO;EACR,CAAC;CACF,EAAE;CACF,OAAO,QAAQ;EACd,OAAO,IAAI,wBAAwB;CACpC;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-CDO-vU3z.d.mts","names":[],"sources":["../../../../3-mongo-target/1-mongo-target/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BK,sBAAsB,KAAK;WACrB,SAAS;;;;;;;;;;;;;;cAcN,uBAAuB,6BAA6B;;;cAGpD,2BAA2B;UAC/B;EACR,SAAS,QAAQ,iBAAiB,KAAK;EACvC,MAAM,MAAM;EACZ,IAAI,MAAM;EACV,GAAG,MAAM;EACT,IAAI,MAAM;EACV,OAAO,MAAM;EACb,KAAK,OAAO;;;;iBAIG,mBAAmB,gBAAgB;iBACnC,oBAAoB,2BAA2B;iBAC/C,kBAAkB,cAAc;;;KAG5C;WACM;WACA,OAAO;;WAEP;WACA,WAAW;;cAER,iCAAiC;EAC7C,UAAU;aACC;aACA;aACA,QAAQ;aACR,qBAAqB,cAAc;MAC1C;EACJ,KAAK;aACM;aACA;aACA,QAAQ;;;;;;aAMR,cAAc;aACd,qBAAqB,cAAc;;;;;;aAMnC;MACP;;;;;;;;;;EAUJ,eAAe,SAAS,2BAA2B;;;;UAI3C;WACC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