@prisma/orm-target-mongo 8.0.0-rc.23-dev.1 → 8.0.0-rc.23-dev.2

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.
@@ -0,0 +1,433 @@
1
+ import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes } from "./codec-types-oKxM85p-.mjs";
2
+ import { AnyCodecDescriptor } from "@prisma/orm-framework/components/codec";
3
+ import { ControlMutationDefaults } from "@prisma/orm-framework/components/control";
4
+ //#region ../../../3-targets/mongo/1-target/dist/pack.d.mts
5
+ //#region src/core/authoring.d.ts
6
+ declare const mongoAuthoringTypes: {
7
+ readonly temporal: {
8
+ readonly CreatedAt: {
9
+ readonly kind: "typeAlias";
10
+ readonly documentation: `A timestamp the client sets to now when a row is created. Its value is ${string}.`;
11
+ readonly output: {
12
+ readonly type: {
13
+ readonly codecId: "mongo/date@1";
14
+ };
15
+ readonly onCreate: {
16
+ readonly name: "now";
17
+ readonly args: {};
18
+ };
19
+ };
20
+ };
21
+ readonly UpdatedAt: {
22
+ readonly kind: "typeAlias";
23
+ readonly documentation: `A timestamp the client sets to now when a row is created and every time it is updated. Its value is ${string}.`;
24
+ readonly output: {
25
+ readonly type: {
26
+ readonly codecId: "mongo/date@1";
27
+ };
28
+ readonly onCreate: {
29
+ readonly name: "now";
30
+ readonly args: {};
31
+ };
32
+ readonly onUpdate: {
33
+ readonly name: "now";
34
+ readonly args: {};
35
+ };
36
+ };
37
+ };
38
+ };
39
+ readonly String: {
40
+ readonly kind: "typeConstructor";
41
+ readonly documentation: "Text, stored as BSON string.";
42
+ readonly output: {
43
+ readonly codecId: "mongo/string@1";
44
+ };
45
+ };
46
+ readonly Int32: {
47
+ readonly kind: "typeConstructor";
48
+ readonly documentation: "A signed 32-bit integer, stored as BSON int.";
49
+ readonly output: {
50
+ readonly codecId: "mongo/int32@1";
51
+ };
52
+ };
53
+ readonly Bool: {
54
+ readonly kind: "typeConstructor";
55
+ readonly documentation: "A true or false value, stored as BSON bool.";
56
+ readonly output: {
57
+ readonly codecId: "mongo/bool@1";
58
+ };
59
+ };
60
+ readonly Date: {
61
+ readonly kind: "typeConstructor";
62
+ readonly documentation: "A date and time with millisecond precision, stored as BSON date.";
63
+ readonly output: {
64
+ readonly codecId: "mongo/date@1";
65
+ };
66
+ };
67
+ readonly ObjectId: {
68
+ readonly kind: "typeConstructor";
69
+ readonly documentation: "A 12-byte MongoDB identifier, stored as BSON objectId.";
70
+ readonly output: {
71
+ readonly codecId: "mongo/objectId@1";
72
+ };
73
+ };
74
+ readonly Double: {
75
+ readonly kind: "typeConstructor";
76
+ readonly documentation: "A double-precision floating-point number, stored as BSON double.";
77
+ readonly output: {
78
+ readonly codecId: "mongo/double@1";
79
+ };
80
+ };
81
+ readonly Int64: {
82
+ readonly kind: "typeConstructor";
83
+ readonly documentation: "A signed 64-bit integer read as a bigint, stored as BSON long.";
84
+ readonly output: {
85
+ readonly codecId: "mongo/int64@1";
86
+ };
87
+ };
88
+ readonly Int64Number: {
89
+ readonly kind: "typeConstructor";
90
+ readonly documentation: "A signed 64-bit integer read as a JavaScript number within its safe integer range, stored as BSON long.";
91
+ readonly output: {
92
+ readonly codecId: "mongo/int64Number@1";
93
+ };
94
+ };
95
+ readonly Decimal128: {
96
+ readonly kind: "typeConstructor";
97
+ readonly documentation: "A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.";
98
+ readonly output: {
99
+ readonly codecId: "mongo/decimal128@1";
100
+ };
101
+ };
102
+ readonly Binary: {
103
+ readonly kind: "typeConstructor";
104
+ readonly documentation: "Bytes read as a Uint8Array, stored as BSON binData.";
105
+ readonly output: {
106
+ readonly codecId: "mongo/binary@1";
107
+ };
108
+ };
109
+ readonly Json: {
110
+ readonly kind: "typeConstructor";
111
+ readonly documentation: "A JSON value, stored as BSON object, array, string, double, int, long, bool or null; the collection validator admits only those types at the top level, and the codec refuses anything else at any depth.";
112
+ readonly output: {
113
+ readonly codecId: "mongo/json@1";
114
+ };
115
+ };
116
+ readonly Bson: {
117
+ readonly kind: "typeConstructor";
118
+ readonly documentation: "Any BSON value, read as BsonValue; the collection validator does not constrain it.";
119
+ readonly output: {
120
+ readonly codecId: "mongo/bson@1";
121
+ };
122
+ };
123
+ readonly Vector: {
124
+ readonly kind: "typeConstructor";
125
+ readonly documentation: "A list of finite numbers, stored as BSON array, as a vector search index reads it. With a length, it is read as Vector<length>.";
126
+ readonly args: readonly [{
127
+ readonly kind: "value";
128
+ readonly dataType: "mongo/int32";
129
+ readonly name: "length";
130
+ readonly optional: true;
131
+ }];
132
+ readonly output: {
133
+ readonly codecId: "mongo/vector@1";
134
+ readonly typeParams: {
135
+ readonly length: {
136
+ readonly kind: "arg";
137
+ readonly index: 0;
138
+ };
139
+ };
140
+ };
141
+ };
142
+ readonly Int: {
143
+ readonly kind: "typeConstructor";
144
+ readonly documentation: "Deprecated: use Int32. A signed 32-bit integer, stored as BSON int.";
145
+ readonly output: {
146
+ readonly codecId: "mongo/int32@1";
147
+ };
148
+ readonly deprecated: {
149
+ readonly replacement: "Int32";
150
+ };
151
+ };
152
+ readonly Float: {
153
+ readonly kind: "typeConstructor";
154
+ readonly documentation: "Deprecated: use Double. A double-precision floating-point number, stored as BSON double.";
155
+ readonly output: {
156
+ readonly codecId: "mongo/double@1";
157
+ };
158
+ readonly deprecated: {
159
+ readonly replacement: "Double";
160
+ };
161
+ };
162
+ readonly Boolean: {
163
+ readonly kind: "typeConstructor";
164
+ readonly documentation: "Deprecated: use Bool. A true or false value, stored as BSON bool.";
165
+ readonly output: {
166
+ readonly codecId: "mongo/bool@1";
167
+ };
168
+ readonly deprecated: {
169
+ readonly replacement: "Bool";
170
+ };
171
+ };
172
+ readonly DateTime: {
173
+ readonly kind: "typeConstructor";
174
+ readonly documentation: "Deprecated: use Date. A date and time with millisecond precision, stored as BSON date.";
175
+ readonly output: {
176
+ readonly codecId: "mongo/date@1";
177
+ };
178
+ readonly deprecated: {
179
+ readonly replacement: "Date";
180
+ };
181
+ };
182
+ };
183
+ //#endregion
184
+ //#region src/core/descriptor-meta.d.ts
185
+ declare const mongoTargetDescriptorMetaBase: {
186
+ readonly authoring: {
187
+ readonly type: {
188
+ readonly temporal: {
189
+ readonly CreatedAt: {
190
+ readonly kind: "typeAlias";
191
+ readonly documentation: `A timestamp the client sets to now when a row is created. Its value is ${string}.`;
192
+ readonly output: {
193
+ readonly type: {
194
+ readonly codecId: "mongo/date@1";
195
+ };
196
+ readonly onCreate: {
197
+ readonly name: "now";
198
+ readonly args: {};
199
+ };
200
+ };
201
+ };
202
+ readonly UpdatedAt: {
203
+ readonly kind: "typeAlias";
204
+ readonly documentation: `A timestamp the client sets to now when a row is created and every time it is updated. Its value is ${string}.`;
205
+ readonly output: {
206
+ readonly type: {
207
+ readonly codecId: "mongo/date@1";
208
+ };
209
+ readonly onCreate: {
210
+ readonly name: "now";
211
+ readonly args: {};
212
+ };
213
+ readonly onUpdate: {
214
+ readonly name: "now";
215
+ readonly args: {};
216
+ };
217
+ };
218
+ };
219
+ };
220
+ readonly String: {
221
+ readonly kind: "typeConstructor";
222
+ readonly documentation: "Text, stored as BSON string.";
223
+ readonly output: {
224
+ readonly codecId: "mongo/string@1";
225
+ };
226
+ };
227
+ readonly Int32: {
228
+ readonly kind: "typeConstructor";
229
+ readonly documentation: "A signed 32-bit integer, stored as BSON int.";
230
+ readonly output: {
231
+ readonly codecId: "mongo/int32@1";
232
+ };
233
+ };
234
+ readonly Bool: {
235
+ readonly kind: "typeConstructor";
236
+ readonly documentation: "A true or false value, stored as BSON bool.";
237
+ readonly output: {
238
+ readonly codecId: "mongo/bool@1";
239
+ };
240
+ };
241
+ readonly Date: {
242
+ readonly kind: "typeConstructor";
243
+ readonly documentation: "A date and time with millisecond precision, stored as BSON date.";
244
+ readonly output: {
245
+ readonly codecId: "mongo/date@1";
246
+ };
247
+ };
248
+ readonly ObjectId: {
249
+ readonly kind: "typeConstructor";
250
+ readonly documentation: "A 12-byte MongoDB identifier, stored as BSON objectId.";
251
+ readonly output: {
252
+ readonly codecId: "mongo/objectId@1";
253
+ };
254
+ };
255
+ readonly Double: {
256
+ readonly kind: "typeConstructor";
257
+ readonly documentation: "A double-precision floating-point number, stored as BSON double.";
258
+ readonly output: {
259
+ readonly codecId: "mongo/double@1";
260
+ };
261
+ };
262
+ readonly Int64: {
263
+ readonly kind: "typeConstructor";
264
+ readonly documentation: "A signed 64-bit integer read as a bigint, stored as BSON long.";
265
+ readonly output: {
266
+ readonly codecId: "mongo/int64@1";
267
+ };
268
+ };
269
+ readonly Int64Number: {
270
+ readonly kind: "typeConstructor";
271
+ readonly documentation: "A signed 64-bit integer read as a JavaScript number within its safe integer range, stored as BSON long.";
272
+ readonly output: {
273
+ readonly codecId: "mongo/int64Number@1";
274
+ };
275
+ };
276
+ readonly Decimal128: {
277
+ readonly kind: "typeConstructor";
278
+ readonly documentation: "A 128-bit decimal read as decimal text without an exponent, stored as BSON decimal.";
279
+ readonly output: {
280
+ readonly codecId: "mongo/decimal128@1";
281
+ };
282
+ };
283
+ readonly Binary: {
284
+ readonly kind: "typeConstructor";
285
+ readonly documentation: "Bytes read as a Uint8Array, stored as BSON binData.";
286
+ readonly output: {
287
+ readonly codecId: "mongo/binary@1";
288
+ };
289
+ };
290
+ readonly Json: {
291
+ readonly kind: "typeConstructor";
292
+ readonly documentation: "A JSON value, stored as BSON object, array, string, double, int, long, bool or null; the collection validator admits only those types at the top level, and the codec refuses anything else at any depth.";
293
+ readonly output: {
294
+ readonly codecId: "mongo/json@1";
295
+ };
296
+ };
297
+ readonly Bson: {
298
+ readonly kind: "typeConstructor";
299
+ readonly documentation: "Any BSON value, read as BsonValue; the collection validator does not constrain it.";
300
+ readonly output: {
301
+ readonly codecId: "mongo/bson@1";
302
+ };
303
+ };
304
+ readonly Vector: {
305
+ readonly kind: "typeConstructor";
306
+ readonly documentation: "A list of finite numbers, stored as BSON array, as a vector search index reads it. With a length, it is read as Vector<length>.";
307
+ readonly args: readonly [{
308
+ readonly kind: "value";
309
+ readonly dataType: "mongo/int32";
310
+ readonly name: "length";
311
+ readonly optional: true;
312
+ }];
313
+ readonly output: {
314
+ readonly codecId: "mongo/vector@1";
315
+ readonly typeParams: {
316
+ readonly length: {
317
+ readonly kind: "arg";
318
+ readonly index: 0;
319
+ };
320
+ };
321
+ };
322
+ };
323
+ readonly Int: {
324
+ readonly kind: "typeConstructor";
325
+ readonly documentation: "Deprecated: use Int32. A signed 32-bit integer, stored as BSON int.";
326
+ readonly output: {
327
+ readonly codecId: "mongo/int32@1";
328
+ };
329
+ readonly deprecated: {
330
+ readonly replacement: "Int32";
331
+ };
332
+ };
333
+ readonly Float: {
334
+ readonly kind: "typeConstructor";
335
+ readonly documentation: "Deprecated: use Double. A double-precision floating-point number, stored as BSON double.";
336
+ readonly output: {
337
+ readonly codecId: "mongo/double@1";
338
+ };
339
+ readonly deprecated: {
340
+ readonly replacement: "Double";
341
+ };
342
+ };
343
+ readonly Boolean: {
344
+ readonly kind: "typeConstructor";
345
+ readonly documentation: "Deprecated: use Bool. A true or false value, stored as BSON bool.";
346
+ readonly output: {
347
+ readonly codecId: "mongo/bool@1";
348
+ };
349
+ readonly deprecated: {
350
+ readonly replacement: "Bool";
351
+ };
352
+ };
353
+ readonly DateTime: {
354
+ readonly kind: "typeConstructor";
355
+ readonly documentation: "Deprecated: use Date. A date and time with millisecond precision, stored as BSON date.";
356
+ readonly output: {
357
+ readonly codecId: "mongo/date@1";
358
+ };
359
+ readonly deprecated: {
360
+ readonly replacement: "Date";
361
+ };
362
+ };
363
+ };
364
+ readonly dataTypes: Readonly<Record<string, import("@prisma/orm-framework/components/authoring").DataTypeAuthoringEntry>>;
365
+ readonly textDataTypes: readonly import("@prisma/orm-framework/components/codec").DataTypeId[];
366
+ };
367
+ readonly controlMutationDefaults: {
368
+ readonly defaultFunctionRegistry: Map<any, any>;
369
+ readonly generatorDescriptors: readonly [{
370
+ readonly id: "timestampNow";
371
+ }];
372
+ };
373
+ readonly generatorFunctions: readonly [{
374
+ readonly name: "now";
375
+ readonly signature: {
376
+ readonly documentation: "Writes the current time.";
377
+ };
378
+ readonly bindings: readonly [import("@prisma/orm-framework/components/components").GeneratorFunctionBinding];
379
+ }];
380
+ readonly kind: "target";
381
+ readonly familyId: "mongo";
382
+ readonly targetId: "mongo";
383
+ readonly id: "mongo";
384
+ readonly version: "0.0.1";
385
+ readonly capabilities: {};
386
+ readonly defaultNamespaceId: "__unbound__";
387
+ readonly supportsNamespaces: true;
388
+ readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
389
+ readonly types: {
390
+ readonly codecTypes: {
391
+ readonly codecDescriptors: readonly import("@prisma/orm-framework/components/codec").CodecDescriptor<void>[];
392
+ };
393
+ };
394
+ readonly __codecTypes?: CodecTypes;
395
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
396
+ };
397
+ declare const mongoTargetDescriptorMeta: typeof mongoTargetDescriptorMetaBase & {
398
+ readonly __codecTypes?: CodecTypes;
399
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
400
+ readonly __dataTypeArguments?: {
401
+ readonly 'mongo/int32': {
402
+ readonly argument: number;
403
+ readonly parameter: number;
404
+ };
405
+ };
406
+ };
407
+ //#endregion
408
+ //#region src/exports/pack.d.ts
409
+ declare const mongoTargetPack: {
410
+ readonly kind: 'target';
411
+ readonly familyId: 'mongo';
412
+ readonly targetId: 'mongo';
413
+ readonly id: 'mongo';
414
+ readonly version: '0.0.1';
415
+ readonly capabilities: Record<string, never>;
416
+ readonly defaultNamespaceId: '__unbound__';
417
+ readonly types: {
418
+ readonly codecTypes: {
419
+ readonly codecDescriptors: ReadonlyArray<AnyCodecDescriptor>;
420
+ };
421
+ };
422
+ readonly authoring: {
423
+ readonly type: typeof mongoAuthoringTypes;
424
+ };
425
+ readonly controlMutationDefaults: ControlMutationDefaults;
426
+ readonly generatorFunctions: typeof mongoTargetDescriptorMeta.generatorFunctions;
427
+ readonly __codecTypes?: CodecTypes;
428
+ readonly __parameterizedOutputTypes?: ParameterizedOutputTypesForTypeParams;
429
+ readonly __dataTypeArguments?: (typeof mongoTargetDescriptorMeta)['__dataTypeArguments'];
430
+ };
431
+ //#endregion
432
+ export { mongoTargetPack as t };
433
+ //# sourceMappingURL=pack-BJLQkv5o.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-BJLQkv5o.d.mts","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.d.mts"],"mappings":";;;;;cAIc;WACH;aACE;eACE;eACA;eACA;iBACE;mBACE;;iBAEF;mBACE;mBACA;;;;aAIN;eACE;eACA;eACA;iBACE;mBACE;;iBAEF;mBACE;mBACA;;iBAEF;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;;WAGJ;aACE;aACA;aACA;eACE;eACA;eACA;eACA;;aAEF;eACE;eACA;iBACE;mBACE;mBACA;;;;;WAKR;aACE;aACA;aACA;eACE;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;;;;cAMD;WACH;aACE;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;;qBAEF;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;;qBAEF;uBACE;uBACA;;qBAEF;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;;iBAEF;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;iBAEF;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;iBAEF;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;iBAEF;mBACE;;;;aAIN,WAAW,SAAS,kEAAkE;aACtF,uEAAuE;;WAEzE;aACE,yBAAyB;aACzB;eACE;;;WAGJ;aACE;aACA;eACE;;aAEF,wEAAwE;;WAE1E;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;eACE,0EAA0E;;;WAG9E,eAAe;WACf,6BAA6B;;cAE1B,kCAAkC;WACrC,eAAe;WACf,6BAA6B;WAC7B;aACE;eACE;eACA;;;;;;cAMD;WACH;WACA;WACA;WACA;WACA;WACA,cAAc;WACd;WACA;aACE;eACE,kBAAkB,cAAc;;;WAGpC;aACE,aAAa;;WAEf,yBAAyB;WACzB,2BAA2B,0BAA0B;WACrD,eAAe;WACf,6BAA6B;WAC7B,8BAA8B"}
package/dist/target.d.mts CHANGED
@@ -5,7 +5,7 @@ import { a as DropCollectionCall, c as OpFactoryCall$1, d as UnsetFieldCall, f a
5
5
  import { _ as deserializeMongoOps, a as MongoMigrationRunnerExecuteOptions, b as renderOps, c as MongoTargetContract, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as deserializeMongoOp, h as RenderMigrationMeta, i as MongoMigrationRunnerErrorCode, l as MongoTargetContractSerializer, m as PlannerProducedMongoMigration, n as MongoMigrationPlanner, o as MongoMigrationRunnerFailure, p as PlanCallsResult, r as MongoMigrationRunner, s as MongoMigrationRunnerResult, t as FilterEvaluator, u as MongoTargetDatabase, v as mongoTargetDescriptor, x as serializeMongoOps, y as renderCallsToTypeScript } from "./control-1-RnMe4V.mjs";
6
6
  import { a as mongoDate, c as mongoInt32, d as mongoObjectId, f as mongoString, h as mongoVectorParams, i as mongoDataTypes, l as mongoInt64, m as mongoVector, n as mongoBool, o as mongoDecimal128, p as mongoTextDataTypes, r as mongoBson, s as mongoDouble, t as mongoBinary, u as mongoJson } from "./data-types-LShlnAUM.mjs";
7
7
  import { a as createIndex, c as dropIndex, d as renameField, f as setValidation, i as createCollection, l as placeholder, m as validatedCollection, n as MigrationCLI, o as dataTransform, p as unsetField, r as collMod, s as dropCollection, t as Migration, u as renameCollection } from "./migration-BMUh33vn.mjs";
8
- import "./pack-xD2XwjJr.mjs";
8
+ import "./pack-BJLQkv5o.mjs";
9
9
  import { t as prisma6MongoBinding } from "./prisma6-binding-DhnqslLT.mjs";
10
10
  import { t as MongoRuntimeTargetInstance } from "./runtime-DeUjc8oy.mjs";
11
11
  export { type BsonInputValue, type BsonScalar, type BsonValue, CodecTypes, CollModCall, type CollModMeta, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, type IndexCallOptions, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, type MongoMigrationRunnerErrorCode, type MongoMigrationRunnerExecuteOptions, type MongoMigrationRunnerFailure, type MongoMigrationRunnerResult, MongoRuntimeTargetInstance, type MongoTargetContract, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, type OpFactoryCall$1 as OpFactoryCall, ParameterizedOutputTypesForTypeParams, type PlanCallsResult, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, type RenderMigrationMeta, UnsetFieldCall, Vector, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
package/dist/target.mjs CHANGED
@@ -2,7 +2,7 @@ import { a as MONGO_DECIMAL128_CODEC_ID, c as MONGO_INT64_CODEC_ID, d as MONGO_O
2
2
  import { B as mongoInt32, F as mongoBson, G as mongoTextDataTypes, H as mongoJson, I as mongoDataTypes, K as mongoVector, L as mongoDate, N as mongoBinary, P as mongoBool, R as mongoDecimal128, U as mongoObjectId, V as mongoInt64, W as mongoString, q as mongoVectorParams, z as mongoDouble } from "./data-types-hoKLBrYZ-h9cAgbOy.mjs";
3
3
  import { n as mongoDescriptorById, t as mongoCodecDescriptors } from "./codecs-_QYfn0YT-BWZI19N1.mjs";
4
4
  import { a as dropCollection, c as renameField, d as unsetField, f as validatedCollection, i as dataTransform, l as setValidation, n as createCollection, o as dropIndex, r as createIndex, s as renameCollection, t as collMod } from "./migration-factories-CUyEIo5p-CXTwpgxe.mjs";
5
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BSgJpq4Q.mjs";
5
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-CdHPs2QG.mjs";
6
6
  import { n as MigrationCLI, r as placeholder, t as Migration } from "./migration-C-jfTsGU.mjs";
7
7
  import { t as prisma6MongoBinding } from "./prisma6-binding-BuMRLaNZ.mjs";
8
8
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MONGO_BINARY_CODEC_ID, MONGO_BOOLEAN_CODEC_ID, MONGO_BSON_CODEC_ID, MONGO_DATE_CODEC_ID, MONGO_DECIMAL128_CODEC_ID, MONGO_DOUBLE_CODEC_ID, MONGO_INT32_CODEC_ID, MONGO_INT64_CODEC_ID, MONGO_INT64_NUMBER_CODEC_ID, MONGO_JSON_CODEC_ID, MONGO_OBJECTID_CODEC_ID, MONGO_STRING_CODEC_ID, MONGO_VECTOR_CODEC_ID, Migration, MigrationCLI, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, collMod, createCollection, createIndex, dataTransform, deserializeMongoOp, deserializeMongoOps, dropCollection, dropIndex, mongoBinary, mongoBool, mongoBson, mongoCodecDescriptors, mongoDataTypes, mongoDate, mongoDecimal128, mongoDescriptorById, mongoDouble, mongoInt32, mongoInt64, mongoJson, mongoObjectId, mongoString, mongoTargetDescriptor, mongoTextDataTypes, mongoVector, mongoVectorParams, placeholder, prisma6MongoBinding, renameCollection, renameField, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps, setValidation, unsetField, validatedCollection };
@@ -1,2 +1,2 @@
1
- import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-BSgJpq4Q.mjs";
1
+ import { C as schemaIndexToCreateIndexOptions, S as schemaCollectionToCreateCollectionOptions, _ as deserializeMongoOp, a as DropIndexCall, b as renderCallsToTypeScript, c as MongoMigrationRunner, d as MongoTargetSchemaVerifier, f as MongoTargetUnboundDatabase, g as UnsetFieldCall, h as RenameFieldCall, i as DropCollectionCall, l as MongoTargetContractSerializer, m as RenameCollectionCall, n as CreateCollectionCall, o as FilterEvaluator, p as PlannerProducedMongoMigration, r as CreateIndexCall, s as MongoMigrationPlanner, t as CollModCall, u as MongoTargetDatabase, v as deserializeMongoOps, w as serializeMongoOps, x as renderOps, y as mongoTargetDescriptor } from "./control-CdHPs2QG.mjs";
2
2
  export { CollModCall, CreateCollectionCall, CreateIndexCall, DropCollectionCall, DropIndexCall, FilterEvaluator, MongoMigrationPlanner, MongoMigrationRunner, MongoTargetContractSerializer, MongoTargetDatabase, MongoTargetSchemaVerifier, MongoTargetUnboundDatabase, PlannerProducedMongoMigration, RenameCollectionCall, RenameFieldCall, UnsetFieldCall, deserializeMongoOp, deserializeMongoOps, mongoTargetDescriptor, renderCallsToTypeScript, renderOps, schemaCollectionToCreateCollectionOptions, schemaIndexToCreateIndexOptions, serializeMongoOps };
@@ -1,3 +1,3 @@
1
1
  import { a as ParameterizedOutputTypesForTypeParams, i as CodecTypes, o as Vector } from "./codec-types-oKxM85p-.mjs";
2
- import { t as mongoTargetPack } from "./pack-xD2XwjJr.mjs";
2
+ import { t as mongoTargetPack } from "./pack-BJLQkv5o.mjs";
3
3
  export { type CodecTypes, type ParameterizedOutputTypesForTypeParams, type Vector, mongoTargetPack as default };
@@ -1,4 +1,4 @@
1
- import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DdTdXKXe-BTdDXEpH.mjs";
1
+ import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-_vnrMWD4-CXzRuo6u.mjs";
2
2
  //#region ../../../3-targets/mongo/1-target/dist/pack.mjs
3
3
  const mongoTargetPack = mongoTargetDescriptorMeta;
4
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-DdTdXKXe.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
1
+ {"version":3,"file":"target__pack.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/pack.mjs"],"sourcesContent":["import { t as mongoTargetDescriptorMeta } from \"./descriptor-meta-_vnrMWD4.mjs\";\n//#region src/exports/pack.ts\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n//#endregion\nexport { mongoTargetPack as default };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;AAEA,MAAM,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-mongo",
3
- "version": "8.0.0-rc.23-dev.1",
3
+ "version": "8.0.0-rc.23-dev.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,18 +9,18 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-mongo": "8.0.0-rc.23-dev.1",
13
- "@prisma/orm-framework": "8.0.0-rc.23-dev.1",
14
- "@prisma/orm-toolchain": "8.0.0-rc.23-dev.1",
12
+ "@prisma/orm-family-mongo": "8.0.0-rc.23-dev.2",
13
+ "@prisma/orm-framework": "8.0.0-rc.23-dev.2",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.23-dev.2",
15
15
  "arktype": "^2.2.2",
16
16
  "bson": "^7.2.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@internal/adapter-mongo": "8.0.0-rc.23-dev.1",
20
- "@internal/driver-mongo": "8.0.0-rc.23-dev.1",
21
- "@internal/target-mongo": "8.0.0-rc.23-dev.1",
22
- "@repo/tsconfig": "8.0.0-rc.23-dev.1",
23
- "@repo/tsdown": "8.0.0-rc.23-dev.1",
19
+ "@internal/adapter-mongo": "8.0.0-rc.23-dev.2",
20
+ "@internal/driver-mongo": "8.0.0-rc.23-dev.2",
21
+ "@internal/target-mongo": "8.0.0-rc.23-dev.2",
22
+ "@repo/tsconfig": "8.0.0-rc.23-dev.2",
23
+ "@repo/tsdown": "8.0.0-rc.23-dev.2",
24
24
  "tsdown": "0.22.14",
25
25
  "typescript": "5.9.3"
26
26
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-DdTdXKXe-BTdDXEpH.mjs","names":[],"sources":["../../../../3-targets/mongo/1-target/dist/descriptor-meta-DdTdXKXe.mjs"],"sourcesContent":["import { i as MONGO_DATE_CODEC_ID } from \"./codec-ids-WdrumsYA.mjs\";\nimport { L as decimal128HoldsExactly, Y as isBase64Text, a as mongoDate, c as mongoInt32, f as mongoString, l as mongoInt64, n as mongoBool, o as mongoDecimal128, p as mongoTextDataTypes, s as mongoDouble, t as mongoBinary, u as mongoJson } from \"./data-types-hoKLBrYZ.mjs\";\nimport { t as mongoTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-M_DCE9pk.mjs\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { createNumberClassifier, isoDateStringText, numeralText, parseJsonText, printJsonText, signedRange } from \"@internal/framework-components/codec\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/core/authoring.ts\nconst mongoAuthoringTypes = { temporal: temporalTypeAliases({ codecId: MONGO_DATE_CODEC_ID }, \"a JavaScript Date\") };\n//#endregion\n//#region src/core/data-type-entries.ts\nconst classifyAsDecimal = createNumberClassifier({\n\tintegers: [{\n\t\ttype: mongoInt32.id,\n\t\tform: \"number\",\n\t\t...signedRange(32)\n\t}, {\n\t\ttype: mongoInt64.id,\n\t\tform: \"text\",\n\t\t...signedRange(64)\n\t}],\n\tlargerWhole: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\tfraction: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t},\n\twords: {\n\t\ttype: mongoDecimal128.id,\n\t\tform: \"text\"\n\t}\n});\n/** The type of a written number: a `decimal` only when a Decimal128 holds it exactly, else the `double` nearest it. */\nfunction classifyMongoNumber(text) {\n\tconst classified = classifyAsDecimal(text);\n\tif (classified?.type !== mongoDecimal128.id || decimal128HoldsExactly(String(classified.value))) return classified;\n\tconst double = Number(text);\n\treturn Number.isFinite(double) ? {\n\t\ttype: mongoDouble.id,\n\t\tvalue: double\n\t} : void 0;\n}\nfunction printNumber(value) {\n\treturn typeof value === \"number\" ? numeralText(value) : String(value);\n}\nfunction base64Text(text) {\n\tif (isBase64Text(text)) return text;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not base64 text: write the bytes in base64, as in binary\\`aGVsbG8=\\`.`, {\n\t\twhy: \"The binary tag reads bytes as base64, as MongoDB prints them.\",\n\t\tfix: \"Write the bytes in base64, as in binary`aGVsbG8=`.\"\n\t});\n}\nfunction mongoDataTypeEntries() {\n\treturn {\n\t\t[mongoString.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"string\",\n\t\t\t\tparse: (text) => text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Text.\"\n\t\t},\n\t\t[mongoBool.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"boolean\",\n\t\t\t\tparse: (text) => text === \"true\"\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"A boolean, written true or false.\"\n\t\t},\n\t\t[mongoDouble.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"plain\",\n\t\t\t\tsyntax: \"number\",\n\t\t\t\ttypes: [\n\t\t\t\t\tmongoInt32.id,\n\t\t\t\t\tmongoInt64.id,\n\t\t\t\t\tmongoDecimal128.id,\n\t\t\t\t\tmongoDouble.id\n\t\t\t\t],\n\t\t\t\tclassify: classifyMongoNumber\n\t\t\t},\n\t\t\tprint: printNumber,\n\t\t\tdocumentation: \"A number: an int in 32 bits, a long in 64, a decimal when a Decimal128 holds it exactly, NaN and the infinities included, and a double otherwise.\"\n\t\t},\n\t\t[mongoDate.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"date\",\n\t\t\t\tparse: (text) => isoDateStringText(text, mongoDate.id)\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"An instant, as in date`2024-01-01T00:00:00Z`. Reads ISO 8601 with a UTC offset and stores the instant in UTC with three fraction digits, as Date.toISOString() writes it.\"\n\t\t},\n\t\t[mongoBinary.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"binary\",\n\t\t\t\tparse: base64Text\n\t\t\t},\n\t\t\tprint: (value) => String(value),\n\t\t\tdocumentation: \"Bytes, written in base64 as MongoDB prints them, as in binary`aGVsbG8=`.\"\n\t\t},\n\t\t[mongoJson.id]: {\n\t\t\twritten: {\n\t\t\t\tkind: \"tag\",\n\t\t\t\ttag: \"json\",\n\t\t\t\tparse: parseJsonText\n\t\t\t},\n\t\t\tprint: printJsonText,\n\t\t\tdocumentation: \"Reads the text as a JSON document and stores it as the value.\"\n\t\t}\n\t};\n}\nconst mongoTargetDescriptorMeta = {\n\t...mongoTargetDescriptorMetaRuntime,\n\tauthoring: {\n\t\ttype: mongoAuthoringTypes,\n\t\tdataTypes: mongoDataTypeEntries(),\n\t\ttextDataTypes: mongoTextDataTypes\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: [{ id: TIMESTAMP_NOW_GENERATOR_ID }]\n\t},\n\tgeneratorFunctions: [{\n\t\tname: \"now\",\n\t\tsignature: { documentation: \"Writes the current time.\" },\n\t\tbindings: [singleGeneratorBinding({\n\t\t\tcodecIds: [MONGO_DATE_CODEC_ID],\n\t\t\tgeneratorId: TIMESTAMP_NOW_GENERATOR_ID\n\t\t})]\n\t}]\n};\n//#endregion\nexport { mongoTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DdTdXKXe.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,sBAAsB,EAAE,UAAU,oBAAoB,EAAE,SAAS,oBAAoB,GAAG,mBAAmB,EAAE;AAGnH,MAAM,oBAAoB,uBAAuB;CAChD,UAAU,CAAC;EACV,MAAM,WAAW;EACjB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,GAAG;EACF,MAAM,WAAW;EACjB,MAAM;EACN,GAAG,YAAY,EAAE;CAClB,CAAC;CACD,aAAa;EACZ,MAAM,gBAAgB;EACtB,MAAM;CACP;CACA,UAAU;EACT,MAAM,gBAAgB;EACtB,MAAM;CACP;CACA,OAAO;EACN,MAAM,gBAAgB;EACtB,MAAM;CACP;AACD,CAAC;;AAED,SAAS,oBAAoB,MAAM;CAClC,MAAM,aAAa,kBAAkB,IAAI;CACzC,IAAI,YAAY,SAAS,gBAAgB,MAAM,uBAAuB,OAAO,WAAW,KAAK,CAAC,GAAG,OAAO;CACxG,MAAM,SAAS,OAAO,IAAI;CAC1B,OAAO,OAAO,SAAS,MAAM,IAAI;EAChC,MAAM,YAAY;EAClB,OAAO;CACR,IAAI,KAAK;AACV;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI,OAAO,KAAK;AACrE;AACA,SAAS,WAAW,MAAM;CACzB,IAAI,aAAa,IAAI,GAAG,OAAO;CAC/B,MAAM,gBAAgB,yBAAyB,IAAI,KAAK,6EAA6E;EACpI,KAAK;EACL,KAAK;CACN,CAAC;AACF;AACA,SAAS,uBAAuB;CAC/B,OAAO;GACL,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS;GAClB;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,QAAQ;IACR,QAAQ,SAAS,SAAS;GAC3B;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,QAAQ;IACR,OAAO;KACN,WAAW;KACX,WAAW;KACX,gBAAgB;KAChB,YAAY;IACb;IACA,UAAU;GACX;GACA,OAAO;GACP,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,KAAK;IACL,QAAQ,SAAS,kBAAkB,MAAM,UAAU,EAAE;GACtD;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,YAAY,KAAK;GACjB,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,QAAQ,UAAU,OAAO,KAAK;GAC9B,eAAe;EAChB;GACC,UAAU,KAAK;GACf,SAAS;IACR,MAAM;IACN,KAAK;IACL,OAAO;GACR;GACA,OAAO;GACP,eAAe;EAChB;CACD;AACD;AACA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,WAAW,qBAAqB;EAChC,eAAe;CAChB;CACA,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB,CAAC,EAAE,IAAI,2BAA2B,CAAC;CAC1D;CACA,oBAAoB,CAAC;EACpB,MAAM;EACN,WAAW,EAAE,eAAe,2BAA2B;EACvD,UAAU,CAAC,uBAAuB;GACjC,UAAU,CAAC,mBAAmB;GAC9B,aAAa;EACd,CAAC,CAAC;CACH,CAAC;AACF"}