@prisma/orm-target-mongo 8.0.0-rc.21-dev.19 → 8.0.0-rc.21-dev.21
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/adapter__control.d.mts +3 -3
- package/dist/adapter__control.d.mts.map +1 -1
- package/dist/adapter__control.mjs +1 -1
- package/dist/{mongo-driver-CTyvKDUg-Bm9sBrfs.d.mts → control-4GDkJr5g.d.mts} +16 -6
- package/dist/control-4GDkJr5g.d.mts.map +1 -0
- package/dist/{control-DcJqXPIn.mjs → control-C9vIsjPG.mjs} +4 -4
- package/dist/{control-DcJqXPIn.mjs.map → control-C9vIsjPG.mjs.map} +1 -1
- package/dist/control-CZxDL43O.mjs +45 -0
- package/dist/control-CZxDL43O.mjs.map +1 -0
- package/dist/{control-CrFS8bqh.d.mts → control-kV8BDwKp.d.mts} +4 -4
- package/dist/{control-CrFS8bqh.d.mts.map → control-kV8BDwKp.d.mts.map} +1 -1
- package/dist/driver.d.mts +3 -2
- package/dist/driver.mjs +2 -2
- package/dist/driver__control.d.mts +2 -17
- package/dist/driver__control.mjs +1 -49
- package/dist/driver__runtime.d.mts +2 -0
- package/dist/driver__runtime.mjs +65 -0
- package/dist/driver__runtime.mjs.map +1 -0
- package/dist/{migration-C4m4Uj8E.d.mts → migration-CoPXNa95.d.mts} +3 -3
- package/dist/{migration-C4m4Uj8E.d.mts.map → migration-CoPXNa95.d.mts.map} +1 -1
- package/dist/{migration-factories-BqROEHRs-CfExMr9r.mjs → migration-factories-DImj1ZN5-BtCob_1N.mjs} +3 -3
- package/dist/migration-factories-DImj1ZN5-BtCob_1N.mjs.map +1 -0
- package/dist/{mongo-driver-C0tB6b4R-s41LzR-J.mjs → mongo-driver-CjqtuhuS-D-ggtKWS.mjs} +18 -8
- package/dist/mongo-driver-CjqtuhuS-D-ggtKWS.mjs.map +1 -0
- package/dist/{op-factory-call-BoYr7vvM-CjA8nx36.d.mts → op-factory-call-BoYr7vvM-CEACROK1.d.mts} +2 -2
- package/dist/{op-factory-call-BoYr7vvM-CjA8nx36.d.mts.map → op-factory-call-BoYr7vvM-CEACROK1.d.mts.map} +1 -1
- package/dist/runtime-DDkdv2wO.d.mts +22 -0
- package/dist/runtime-DDkdv2wO.d.mts.map +1 -0
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +2 -2
- package/dist/target__control.d.mts +2 -2
- package/dist/target__control.mjs +1 -1
- package/dist/target__migration.d.mts +1 -1
- package/dist/target__migration.mjs +1 -1
- package/package.json +10 -9
- package/dist/driver__control.d.mts.map +0 -1
- package/dist/driver__control.mjs.map +0 -1
- package/dist/migration-factories-BqROEHRs-CfExMr9r.mjs.map +0 -1
- package/dist/mongo-driver-C0tB6b4R-s41LzR-J.mjs.map +0 -1
- package/dist/mongo-driver-CTyvKDUg-Bm9sBrfs.d.mts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as createMongoAdapter } from "./mongo-adapter-wvK2fQOZ-FswLS-PJ.mjs";
|
|
2
|
-
import { MongoSchemaIR } from "@prisma/orm-family-mongo/schema-ir";
|
|
3
2
|
import { AnyMongoDdlCommand, ListCollectionsCommand, ListIndexesCommand, MongoInspectionCommandVisitor } from "@prisma/orm-family-mongo/query-ast/control";
|
|
4
3
|
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
5
4
|
import { ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
5
|
+
import { MongoSchemaIR } from "@prisma/orm-family-mongo/schema-ir";
|
|
6
6
|
import { Db, Document } from "mongodb";
|
|
7
|
-
import { MongoControlDriverInstance, MongoControlDriverInstance as MongoControlDriverInstance$1,
|
|
7
|
+
import { MongoControlDriverInstance, MongoControlDriverInstance as MongoControlDriverInstance$1, MongoQueryable } from "@prisma/orm-family-mongo/lowering";
|
|
8
8
|
import { MongoControlAdapter, MongoControlAdapterDescriptor, MongoRunnerDependencies } from "@prisma/orm-family-mongo/family/control-adapter";
|
|
9
9
|
//#region ../../../3-targets/mongo/2-adapter/dist/control.d.mts
|
|
10
10
|
//#region src/core/introspect-schema.d.ts
|
|
@@ -39,7 +39,7 @@ declare class MongoControlAdapterImpl implements MongoControlAdapter<'mongo'> {
|
|
|
39
39
|
readonly familyId: "mongo";
|
|
40
40
|
readonly targetId: "mongo";
|
|
41
41
|
readonly markerLocation = "_prisma_migrations";
|
|
42
|
-
executeDdl(driver:
|
|
42
|
+
executeDdl(driver: MongoQueryable, command: AnyMongoDdlCommand): Promise<void>;
|
|
43
43
|
readMarker(driver: ControlDriverInstance<'mongo', 'mongo'>, space: string): Promise<ContractMarkerRecord | null>;
|
|
44
44
|
readAllMarkers(driver: ControlDriverInstance<'mongo', 'mongo'>): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
|
|
45
45
|
initMarker(driver: ControlDriverInstance<'mongo', 'mongo'>, space: string, destination: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.d.mts","names":[],"sources":["../../../../3-targets/mongo/2-adapter/dist/control.d.mts"],"mappings":";;;;;;;;;;iBASiB,iBAAiB,IAAI,KAAK,QAAQ;;;;;;;;;cASrC,mCAAmC,8BAA8B,QAAQ;mBACpE;EACjB,YAAY,IAAI;EAChB,YAAY,KAAK,qBAAqB,QAAQ;EAC9C,gBAAgB,MAAM,yBAAyB,QAAQ;;;;;;;;;;;;;cAa3C,mCAAmC;;WAEtC;WACA;WACA;EACT,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"adapter__control.d.mts","names":[],"sources":["../../../../3-targets/mongo/2-adapter/dist/control.d.mts"],"mappings":";;;;;;;;;;iBASiB,iBAAiB,IAAI,KAAK,QAAQ;;;;;;;;;cASrC,mCAAmC,8BAA8B,QAAQ;mBACpE;EACjB,YAAY,IAAI;EAChB,YAAY,KAAK,qBAAqB,QAAQ;EAC9C,gBAAgB,MAAM,yBAAyB,QAAQ;;;;;;;;;;;;;cAa3C,mCAAmC;;WAEtC;WACA;WACA;EACT,WAAW,QAAQ,gBAAgB,SAAS,qBAAqB;EACjE,WAAW,QAAQ,yCAAyC,gBAAgB,QAAQ;EACpF,eAAe,QAAQ,0CAA0C,QAAQ,oBAAoB;EAC7F,WAAW,QAAQ,yCAAyC,eAAe;aAChE;aACA;aACA;MACP;EACJ,aAAa,QAAQ,yCAAyC,eAAe,sBAAsB;aACxF;aACA;aACA;MACP;EACJ,iBAAiB,QAAQ,yCAAyC,eAAe;aACtE;aACA;aACA;aACA;aACA;aACA;MACP;EACJ,WAAW,QAAQ,yCAAyC,iBAAiB,iBAAiB;EAC9F,iBAAiB,QAAQ,0CAA0C,QAAQ;EAC3E,yBAAyB,QAAQ,0CAA0C;;;;iBAI5D,qBAAqB,QAAQ,yCAAyC,UAAU;iBAChF,UAAU,QAAQ,0CAA0C;;;;;;cAM/D;WACH;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;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;WAGJ;aACE;aACA;aACA;eACE;;aAEF;eACE;;;;cAID,wBAAwB"}
|
|
@@ -3,11 +3,11 @@ import { t as createMongoAdapter } from "./mongo-adapter-Bo6ciURK-DIMJdC7y.mjs";
|
|
|
3
3
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
4
|
import { type } from "arktype";
|
|
5
5
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
6
|
-
import { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from "@prisma/orm-family-mongo/schema-ir";
|
|
7
6
|
import { MongoAggFieldRef, MongoAggLiteral, MongoAggOperator } from "@prisma/orm-family-mongo/query-ast/execution";
|
|
8
7
|
import { expr, fn } from "@prisma/orm-family-mongo/query-builder";
|
|
9
8
|
import { collection } from "@prisma/orm-family-mongo/query-builder/contract-free";
|
|
10
9
|
import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
|
|
10
|
+
import { MongoSchemaCollection, MongoSchemaCollectionOptions, MongoSchemaIR, MongoSchemaIndex, MongoSchemaValidator } from "@prisma/orm-family-mongo/schema-ir";
|
|
11
11
|
import { MongoServerError } from "mongodb";
|
|
12
12
|
import { parseMarkerRowSafely, withMarkerReadErrorHandling } from "@prisma/orm-framework/errors/execution";
|
|
13
13
|
import { ledgerOriginFromStored } from "@prisma/orm-toolchain/migration-tools/ledger-origin";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ControlDriverDescriptor } from "@prisma/orm-framework/components/control";
|
|
1
2
|
import { AggregateWireCommand, AnyMongoDdlWireCommand, AnyMongoDmlWireCommand, CollModWireCommand, CreateCollectionWireCommand, CreateIndexWireCommand, DeleteManyResult, DeleteManyWireCommand, DeleteOneResult, DeleteOneWireCommand, DropCollectionWireCommand, DropIndexWireCommand, FindOneAndDeleteWireCommand, FindOneAndUpdateWireCommand, InsertManyResult, InsertManyWireCommand, InsertOneResult, InsertOneWireCommand, RenameCollectionWireCommand, UpdateManyResult, UpdateManyWireCommand, UpdateOneResult, UpdateOneWireCommand } from "@prisma/orm-family-mongo/wire";
|
|
2
3
|
import { Db, Document, MongoClient } from "mongodb";
|
|
3
|
-
import {
|
|
4
|
-
//#region ../../../3-targets/mongo/3-driver/dist/
|
|
4
|
+
import { MongoControlDriverInstance, MongoQueryable } from "@prisma/orm-family-mongo/lowering";
|
|
5
|
+
//#region ../../../3-targets/mongo/3-driver/dist/control.d.mts
|
|
5
6
|
//#region src/mongo-driver.d.ts
|
|
6
|
-
declare class MongoDriverImpl implements
|
|
7
|
+
declare class MongoDriverImpl implements MongoQueryable {
|
|
7
8
|
protected readonly db: Db;
|
|
8
9
|
protected readonly client: MongoClient | undefined;
|
|
9
10
|
protected constructor(db: Db, client: MongoClient | undefined);
|
|
@@ -32,7 +33,16 @@ declare class MongoDriverImpl implements MongoDriver {
|
|
|
32
33
|
protected executeDropIndexCommand(cmd: DropIndexWireCommand): Promise<void>;
|
|
33
34
|
protected executeCollModCommand(cmd: CollModWireCommand): Promise<void>;
|
|
34
35
|
}
|
|
35
|
-
declare function createMongoDriver(uri: string, dbName: string): Promise<MongoDriver>;
|
|
36
36
|
//#endregion
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
//#region src/exports/control.d.ts
|
|
38
|
+
declare class MongoControlDriver extends MongoDriverImpl implements MongoControlDriverInstance {
|
|
39
|
+
readonly familyId: "mongo";
|
|
40
|
+
readonly targetId: "mongo";
|
|
41
|
+
readonly db: Db;
|
|
42
|
+
constructor(db: Db, mongoClient: MongoClient);
|
|
43
|
+
databaseName(): Promise<string>;
|
|
44
|
+
}
|
|
45
|
+
declare const mongoControlDriverDescriptor: ControlDriverDescriptor<'mongo', 'mongo', MongoControlDriver>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { mongoControlDriverDescriptor as n, MongoControlDriver as t };
|
|
48
|
+
//# sourceMappingURL=control-4GDkJr5g.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-4GDkJr5g.d.mts","names":[],"sources":["../../../../3-targets/mongo/3-driver/dist/control.d.mts"],"mappings":";;;;;;cAKc,2BAA2B;qBACpB,IAAI;qBACJ,QAAQ;YACjB,YAAY,IAAI,IAAI,QAAQ;SAC/B,eAAe,aAAa,iBAAiB,QAAQ;SACrD,OAAO,IAAI,KAAK;EACvB,QAAQ,MAAM,yBAAyB,aAAa,yBAAyB,cAAc;EAC3F,IAAI,aAAa,yBAAyB;EAC1C,SAAS;YACC,wBAAwB,KAAK,uBAAuB,cAAc;;;;YAIlE,OAAO,UAAU,WAAW;YAC5B,wBAAwB,KAAK,uBAAuB,cAAc;YAClE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,wBAAwB,KAAK,uBAAuB,cAAc;YAClE,yBAAyB,KAAK,wBAAwB,cAAc;YACpE,+BAA+B,KAAK,8BAA8B,cAAc;YAChF,+BAA+B,KAAK,8BAA8B,cAAc;YAChF,wBAAwB,KAAK,KAAK,uBAAuB,cAAc;YACvE,+BAA+B,KAAK,8BAA8B;YAClE,0BAA0B,KAAK,yBAAyB;YACxD,6BAA6B,KAAK,4BAA4B;YAC9D,+BAA+B,KAAK,8BAA8B;YAClE,wBAAwB,KAAK,uBAAuB;YACpD,sBAAsB,KAAK,qBAAqB;;;;cAI9C,2BAA2B,2BAA2B;WACzD;WACA;WACA,IAAI;EACb,YAAY,IAAI,IAAI,aAAa;EACjC,gBAAgB;;cAEJ,8BAA8B,0CAA0C"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as mongoTargetError } from "./mongo-target-errors-Btf3ML1w-QOtEG7EX.mjs";
|
|
2
2
|
import { t as mongoTargetDescriptorMeta } from "./descriptor-meta-DU1EhCii-BJ2e8_WL.mjs";
|
|
3
|
-
import { a as dropCollection, c as renameField, d as unsetField, n as createCollection, o as dropIndex, r as createIndex, s as renameCollection, t as collMod, u as unrewritableFieldNameReason } from "./migration-factories-
|
|
3
|
+
import { a as dropCollection, c as renameField, d as unsetField, n as createCollection, o as dropIndex, r as createIndex, s as renameCollection, t as collMod, u as unrewritableFieldNameReason } from "./migration-factories-DImj1ZN5-BtCob_1N.mjs";
|
|
4
4
|
import { type } from "arktype";
|
|
5
5
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
6
6
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
7
7
|
import { NamespaceBase, UNBOUND_NAMESPACE_ID, elementCoordinates, freezeNode, hydrateNamespaceEntities } from "@prisma/orm-framework/components/ir";
|
|
8
|
-
import {
|
|
8
|
+
import { MongoCollection, MongoStorage, canonicalize, collectionControlPoliciesOf, collectionControlPolicyOf, collectionRootModelsOf, hasOwnFieldStoredAs, indexLookupKey, modelAndBasesOf, mongoModelsOf, ownEmbedStoredNamesOf, ownStoredNameOf, ownStoredNamesOf, validatorFieldNamesOf, validatorRootShapesOf } from "@prisma/orm-family-mongo/contract";
|
|
9
9
|
import { CollModCommand, CreateCollectionCommand, CreateIndexCommand, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, MongoExistsExpr, MongoFieldFilter, MongoNotExpr, MongoOrExpr, RenameCollectionCommand, isMongoDmlOperation } from "@prisma/orm-family-mongo/query-ast/control";
|
|
10
10
|
import { AggregateCommand, MongoAddFieldsStage, MongoLimitStage, MongoLookupStage, MongoMatchStage, MongoMergeStage, MongoProjectStage, MongoSortStage, RawAggregateCommand, RawDeleteManyCommand, RawDeleteOneCommand, RawFindOneAndDeleteCommand, RawFindOneAndUpdateCommand, RawInsertManyCommand, RawInsertOneCommand, RawUpdateManyCommand, RawUpdateOneCommand } from "@prisma/orm-family-mongo/query-ast/execution";
|
|
11
11
|
import { canonicalizeSchemasForVerification, contractToMongoSchemaIR, diffMongoSchemas, fieldRewriteOf } from "@prisma/orm-family-mongo/family/control";
|
|
12
12
|
import { APP_SPACE_ID, VERIFY_CODE_SCHEMA_FAILURE, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, describeMigrationStatement, expectAbsent, expectPresent, failedPostcheckWhy, failedPrecheckWhy, issueOutcome, migrationRunnerFailure, modelDisplayName, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from "@prisma/orm-framework/components/control";
|
|
13
13
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
14
14
|
import { MongoContractSerializerBase, MongoSchemaVerifierBase } from "@prisma/orm-family-mongo/family/ir";
|
|
15
|
-
import { MongoCollection, MongoStorage, collectionControlPoliciesOf, collectionControlPolicyOf, collectionRootModelsOf, hasOwnFieldStoredAs, modelAndBasesOf, mongoModelsOf, ownEmbedStoredNamesOf, ownStoredNameOf, ownStoredNamesOf, validatorFieldNamesOf, validatorRootShapesOf } from "@prisma/orm-family-mongo/contract";
|
|
16
15
|
import { composeMongoEntityKinds } from "@prisma/orm-family-mongo/contract/entity-kinds";
|
|
17
16
|
import { asNamespaceId, governingControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
17
|
+
import { MongoSchemaCollection, MongoSchemaIR, deepEqual } from "@prisma/orm-family-mongo/schema-ir";
|
|
18
18
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
19
19
|
import { TsExpression, jsonToTsSource, renderImports } from "@prisma/orm-framework/ts-render";
|
|
20
20
|
import { Migration } from "@prisma/orm-toolchain/migration-tools/migration";
|
|
@@ -2419,4 +2419,4 @@ const mongoTargetDescriptor = {
|
|
|
2419
2419
|
//#endregion
|
|
2420
2420
|
export { schemaIndexToCreateIndexOptions as C, schemaCollectionToCreateCollectionOptions as S, deserializeMongoOp as _, DropIndexCall as a, renderCallsToTypeScript as b, MongoMigrationRunner as c, MongoTargetSchemaVerifier as d, MongoTargetUnboundDatabase as f, UnsetFieldCall as g, RenameFieldCall as h, DropCollectionCall as i, MongoTargetContractSerializer as l, RenameCollectionCall as m, CreateCollectionCall as n, FilterEvaluator as o, PlannerProducedMongoMigration as p, CreateIndexCall as r, MongoMigrationPlanner as s, CollModCall as t, MongoTargetDatabase as u, deserializeMongoOps as v, serializeMongoOps as w, renderOps as x, mongoTargetDescriptor as y };
|
|
2421
2421
|
|
|
2422
|
-
//# sourceMappingURL=control-
|
|
2422
|
+
//# sourceMappingURL=control-C9vIsjPG.mjs.map
|