@prisma/orm-mongo 8.0.0-rc.25-dev.29 → 8.0.0-rc.27
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/README.md +6 -5
- package/dist/bson.d.mts +2 -1
- package/dist/components__runtime.d.mts +3 -1
- package/dist/config.d.mts +2 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/contract-builder.d.mts +11 -12
- package/dist/contract-builder.d.mts.map +1 -1
- package/dist/contract-types.d.mts +5 -3
- package/dist/contract__types.d.mts +3 -1
- package/dist/control.d.mts +2 -1
- package/dist/control.d.mts.map +1 -1
- package/dist/family-contract.d.mts +3 -1
- package/dist/family-runtime.d.mts +3 -1
- package/dist/family.d.mts +2 -1
- package/dist/family__control.d.mts +3 -1
- package/dist/init-quick-reference.md +1 -1
- package/dist/init.d.mts +2 -1
- package/dist/init.d.mts.map +1 -1
- package/dist/migration-tools__aggregate.d.mts +3 -1
- package/dist/migration-tools__hash.d.mts +3 -1
- package/dist/migration-tools__io.d.mts +3 -1
- package/dist/migration-tools__spaces.d.mts +3 -1
- package/dist/migration.d.mts +3 -1
- package/dist/{mongo-static-CZlnpepm-DnjIfx0L.mjs → mongo-static-Uk6OGD4r-BoKXE7a6.mjs} +4 -4
- package/dist/mongo-static-Uk6OGD4r-BoKXE7a6.mjs.map +1 -0
- package/dist/orm.d.mts +3 -1
- package/dist/query-ast__execution.d.mts +3 -1
- package/dist/query-builder.d.mts +3 -1
- package/dist/runtime.d.mts +3 -1
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +6 -6
- package/dist/runtime.mjs.map +1 -1
- package/dist/static.d.mts +2 -1
- package/dist/static.d.mts.map +1 -1
- package/dist/static.mjs +1 -1
- package/dist/target.d.mts +2 -1
- package/dist/target__codec-ids.d.mts +3 -1
- package/dist/target__codec-types.d.mts +3 -1
- package/dist/target__migration.d.mts +3 -1
- package/dist/target__runtime.d.mts +2 -1
- package/dist/value.d.mts +3 -1
- package/dist/vite-plugin-contract-emit.d.mts +3 -1
- package/package.json +12 -81
- package/skills/prisma-8/SKILL.md +8 -8
- package/skills/prisma-8/references/contract.md +9 -9
- package/skills/prisma-8/references/debug.md +11 -11
- package/skills/prisma-8/references/migration-model.md +17 -17
- package/skills/prisma-8/references/migration-review.md +21 -21
- package/skills/prisma-8/references/migrations.md +58 -42
- package/skills/prisma-8/references/queries-postgres.md +51 -8
- package/skills/prisma-8/references/queries.md +2 -2
- package/skills/prisma-8/references/quickstart.md +11 -11
- package/skills/prisma-8/references/runtime.md +3 -3
- package/skills/prisma-8/references/supabase.md +2 -2
- package/skills/prisma-8/references/upgrade-app.md +56 -23
- package/skills/prisma-8/references/upgrade-extension.md +35 -14
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/instructions.md +2478 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/contract-hash-inputs/contract-hash-inputs.ts +2125 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/contract-signature-names/contract-signature-names.ts +759 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/facade-paths-an-application-uses/facade-paths-an-application-uses.ts +689 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/platform-paths-an-extension-uses/platform-paths-an-extension-uses.ts +2053 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/stored-files-format-version/stored-files-format-version.ts +671 -0
- package/skills/prisma-8/upgrading/app/upgrades/8.0.0-rc.26-to-8.0.0-rc.27/instructions.md +100 -0
- package/skills/prisma-8/upgrading/extension/upgrades/0.11-to-0.12/instructions.md +1 -1
- package/skills/prisma-8/upgrading/extension/upgrades/0.8-to-0.9/instructions.md +1 -1
- package/skills/prisma-8/upgrading/extension/upgrades/0.9-to-0.10/instructions.md +1 -1
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/instructions.md +2057 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/contract-hash-inputs/contract-hash-inputs.ts +2125 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/contract-signature-names/contract-signature-names.ts +759 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/facade-paths-an-application-uses/facade-paths-an-application-uses.ts +689 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/platform-paths-an-extension-uses/platform-paths-an-extension-uses.ts +2053 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.25-to-8.0.0-rc.26/scripts/stored-files-format-version/stored-files-format-version.ts +671 -0
- package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.26-to-8.0.0-rc.27/instructions.md +56 -0
- package/dist/adapter.d.mts +0 -1
- package/dist/adapter.mjs +0 -2
- package/dist/adapter__control.d.mts +0 -3
- package/dist/adapter__control.mjs +0 -3
- package/dist/adapter__runtime.d.mts +0 -3
- package/dist/adapter__runtime.mjs +0 -3
- package/dist/components.d.mts +0 -1
- package/dist/components.mjs +0 -2
- package/dist/components__authoring.d.mts +0 -1
- package/dist/components__authoring.mjs +0 -2
- package/dist/components__codec.d.mts +0 -1
- package/dist/components__codec.mjs +0 -2
- package/dist/components__components.d.mts +0 -1
- package/dist/components__components.mjs +0 -2
- package/dist/components__control.d.mts +0 -1
- package/dist/components__control.mjs +0 -2
- package/dist/components__emission.d.mts +0 -1
- package/dist/components__emission.mjs +0 -2
- package/dist/components__execution.d.mts +0 -1
- package/dist/components__execution.mjs +0 -2
- package/dist/components__ir.d.mts +0 -1
- package/dist/components__ir.mjs +0 -2
- package/dist/components__psl-ast.d.mts +0 -1
- package/dist/components__psl-ast.mjs +0 -2
- package/dist/components__utils.d.mts +0 -1
- package/dist/components__utils.mjs +0 -2
- package/dist/contract.d.mts +0 -1
- package/dist/contract.mjs +0 -2
- package/dist/contract__apply-specifier-default-control-policy.d.mts +0 -1
- package/dist/contract__apply-specifier-default-control-policy.mjs +0 -2
- package/dist/contract__contract-validation-error.d.mts +0 -1
- package/dist/contract__contract-validation-error.mjs +0 -2
- package/dist/contract__default-namespace.d.mts +0 -1
- package/dist/contract__default-namespace.mjs +0 -2
- package/dist/contract__enum-accessor.d.mts +0 -1
- package/dist/contract__enum-accessor.mjs +0 -2
- package/dist/contract__format-version.d.mts +0 -1
- package/dist/contract__format-version.mjs +0 -2
- package/dist/contract__hashing-utils.d.mts +0 -1
- package/dist/contract__hashing-utils.mjs +0 -2
- package/dist/contract__hashing.d.mts +0 -1
- package/dist/contract__hashing.mjs +0 -2
- package/dist/contract__internal__format-version.d.mts +0 -1
- package/dist/contract__internal__format-version.mjs +0 -2
- package/dist/contract__is-plain-record.d.mts +0 -1
- package/dist/contract__is-plain-record.mjs +0 -2
- package/dist/contract__resolve-domain-model.d.mts +0 -1
- package/dist/contract__resolve-domain-model.mjs +0 -2
- package/dist/contract__validate-domain.d.mts +0 -1
- package/dist/contract__validate-domain.mjs +0 -2
- package/dist/contract__validate-once.d.mts +0 -1
- package/dist/contract__validate-once.mjs +0 -2
- package/dist/contract__validate-storage.d.mts +0 -1
- package/dist/contract__validate-storage.mjs +0 -2
- package/dist/driver.d.mts +0 -1
- package/dist/driver.mjs +0 -2
- package/dist/driver__control.d.mts +0 -3
- package/dist/driver__control.mjs +0 -3
- package/dist/driver__runtime.d.mts +0 -3
- package/dist/driver__runtime.mjs +0 -3
- package/dist/family-contract__canonicalization-hooks.d.mts +0 -1
- package/dist/family-contract__canonicalization-hooks.mjs +0 -2
- package/dist/family-contract__data-type.d.mts +0 -1
- package/dist/family-contract__data-type.mjs +0 -2
- package/dist/family-contract__entity-kinds.d.mts +0 -1
- package/dist/family-contract__entity-kinds.mjs +0 -2
- package/dist/family__control-adapter.d.mts +0 -1
- package/dist/family__control-adapter.mjs +0 -2
- package/dist/family__ir.d.mts +0 -1
- package/dist/family__ir.mjs +0 -2
- package/dist/family__migration.d.mts +0 -1
- package/dist/family__migration.mjs +0 -2
- package/dist/family__pack.d.mts +0 -3
- package/dist/family__pack.mjs +0 -3
- package/dist/family__runtime.d.mts +0 -1
- package/dist/family__runtime.mjs +0 -2
- package/dist/family__schema-verify.d.mts +0 -1
- package/dist/family__schema-verify.mjs +0 -2
- package/dist/migration-tools__contract-snapshot-store.d.mts +0 -1
- package/dist/migration-tools__contract-snapshot-store.mjs +0 -2
- package/dist/mongo-static-CZlnpepm-DnjIfx0L.mjs.map +0 -1
- package/dist/query-ast.d.mts +0 -1
- package/dist/query-ast.mjs +0 -2
- package/dist/query-ast__control.d.mts +0 -1
- package/dist/query-ast__control.mjs +0 -2
- package/dist/query-builder__contract-free.d.mts +0 -1
- package/dist/query-builder__contract-free.mjs +0 -2
- package/dist/target__codecs.d.mts +0 -1
- package/dist/target__codecs.mjs +0 -2
- package/dist/target__control.d.mts +0 -1
- package/dist/target__control.mjs +0 -2
- package/dist/target__data-types.d.mts +0 -1
- package/dist/target__data-types.mjs +0 -2
- package/dist/target__pack.d.mts +0 -3
- package/dist/target__pack.mjs +0 -3
- package/dist/target__server-version.d.mts +0 -1
- package/dist/target__server-version.mjs +0 -2
- package/dist/utils.d.mts +0 -1
- package/dist/utils.mjs +0 -2
- package/dist/utils__abortable.d.mts +0 -1
- package/dist/utils__abortable.mjs +0 -2
- package/dist/utils__array-equal.d.mts +0 -1
- package/dist/utils__array-equal.mjs +0 -2
- package/dist/utils__assertions.d.mts +0 -1
- package/dist/utils__assertions.mjs +0 -2
- package/dist/utils__canonical-stringify.d.mts +0 -1
- package/dist/utils__canonical-stringify.mjs +0 -2
- package/dist/utils__casts.d.mts +0 -1
- package/dist/utils__casts.mjs +0 -2
- package/dist/utils__defined.d.mts +0 -1
- package/dist/utils__defined.mjs +0 -2
- package/dist/utils__guards.d.mts +0 -1
- package/dist/utils__guards.mjs +0 -2
- package/dist/utils__hash-content.d.mts +0 -1
- package/dist/utils__hash-content.mjs +0 -2
- package/dist/utils__internal-error.d.mts +0 -1
- package/dist/utils__internal-error.mjs +0 -2
- package/dist/utils__json.d.mts +0 -1
- package/dist/utils__json.mjs +0 -2
- package/dist/utils__promise.d.mts +0 -1
- package/dist/utils__promise.mjs +0 -2
- package/dist/utils__redact-db-url.d.mts +0 -1
- package/dist/utils__redact-db-url.mjs +0 -2
- package/dist/utils__result.d.mts +0 -1
- package/dist/utils__result.mjs +0 -2
- package/dist/utils__simplify-deep.d.mts +0 -1
- package/dist/utils__simplify-deep.mjs +0 -2
- package/dist/utils__structured-error.d.mts +0 -1
- package/dist/utils__structured-error.mjs +0 -2
- package/dist/utils__suppress-idle-connection-errors.d.mts +0 -1
- package/dist/utils__suppress-idle-connection-errors.mjs +0 -2
- package/dist/utils__text.d.mts +0 -1
- package/dist/utils__text.mjs +0 -2
- package/dist/utils__types.d.mts +0 -1
- package/dist/utils__types.mjs +0 -2
- package/dist/utils__upgrade-guides.d.mts +0 -1
- package/dist/utils__upgrade-guides.mjs +0 -2
- package/dist/value__mongodb-types.d.mts +0 -1
- package/dist/value__mongodb-types.mjs +0 -2
package/skills/prisma-8/upgrading/extension/upgrades/8.0.0-rc.26-to-8.0.0-rc.27/instructions.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
from: "8.0.0-rc.26"
|
|
3
|
+
to: "8.0.0-rc.27"
|
|
4
|
+
changes:
|
|
5
|
+
- id: boolean-codec-type-takes-codec-types
|
|
6
|
+
summary: |
|
|
7
|
+
`BooleanCodecType` takes the contract's codec types, as `BooleanCodecType<CodecTypes>`; a use without type arguments no longer compiles.
|
|
8
|
+
detection:
|
|
9
|
+
glob: "**/*.{ts,tsx,mts,cts}"
|
|
10
|
+
matches:
|
|
11
|
+
- '(?<!\b(?:import|export)\s+(?:type\s+)?\{[^}]*)\bBooleanCodecType\b(?!\s*<)'
|
|
12
|
+
- id: function-condition-takes-codec-types
|
|
13
|
+
summary: |
|
|
14
|
+
`FunctionCondition` from the ORM client takes the contract's codec types; a use without type arguments no longer compiles.
|
|
15
|
+
detection:
|
|
16
|
+
glob: "**/*.{ts,tsx,mts,cts}"
|
|
17
|
+
matches:
|
|
18
|
+
- '(?<!\b(?:import|export)\s+(?:type\s+)?\{[^}]*)\bFunctionCondition\b(?!\s*<)'
|
|
19
|
+
- id: condition-codec-on-mysql-and-sqlite
|
|
20
|
+
summary: |
|
|
21
|
+
On MySQL, MariaDB and SQLite a condition from `fns` is an expression of the target's boolean codec, and a selected condition reads as a boolean, or `null` when its value is NULL.
|
|
22
|
+
- id: functions-builders-no-longer-published
|
|
23
|
+
summary: |
|
|
24
|
+
`createFunctions` and `createAggregateFunctions` are no longer published; a callback of the query builder receives the functions they built as its `fns` argument, and a callback of the ORM receives the ORM's functions, built from `createFunctions`.
|
|
25
|
+
detection:
|
|
26
|
+
glob: "**/*.{ts,tsx,mts,cts}"
|
|
27
|
+
matches:
|
|
28
|
+
- '\bcreate(?:Aggregate)?Functions\b'
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# Conditions from `fns` carry the contract's boolean codec
|
|
32
|
+
|
|
33
|
+
## `boolean-codec-type-takes-codec-types`
|
|
34
|
+
|
|
35
|
+
`BooleanCodecType`, exported by `@prisma/orm-family-sql/builder/types`, now takes the codec types of the contract and, optionally, a nullability. In code generic over a contract, pass the contract's codec types, such as `BooleanCodecType<ExtractCodecTypes<TContract>>` with `ExtractCodecTypes` from `@prisma/orm-family-sql/contract/types`; in a test against an emitted contract, pass its `CodecTypes`, as in `Expression<BooleanCodecType<CodecTypes>>`.
|
|
36
|
+
|
|
37
|
+
## `function-condition-takes-codec-types`
|
|
38
|
+
|
|
39
|
+
`FunctionCondition`, exported by `@prisma/orm-family-sql/orm-client`, takes the contract's codec types the same way: `FunctionCondition<ExtractCodecTypes<TContract>>`.
|
|
40
|
+
|
|
41
|
+
## `condition-codec-on-mysql-and-sqlite`
|
|
42
|
+
|
|
43
|
+
On MySQL, MariaDB and SQLite, a condition from `fns` is typed and built with the target's boolean codec, `mysql/boolean@1` on MySQL and MariaDB and `sqlite/boolean@1` on SQLite, where it was `pg/bool@1` on every target. An extension that runs on these targets and names `'pg/bool@1'` for a condition, in a type or in `fns.raw` with `.returns('pg/bool@1')`, names the target's boolean codec instead. A condition selected as a column on these targets now reads as `true` or `false`, or as `null` when one of its operands is nullable and its value is NULL. Before, it read as the text `'1'` or `'0'` on MySQL and MariaDB and as the number `1` or `0` on SQLite; code and tests that compare it with those values, or convert it with `Number(...)` or `Boolean(...)`, use the boolean instead. `Boolean('0')` is `true`, so such a conversion on MySQL and MariaDB was wrong before.
|
|
44
|
+
|
|
45
|
+
## `functions-builders-no-longer-published`
|
|
46
|
+
|
|
47
|
+
`@prisma/orm-family-sql/builder/runtime` no longer exports `createFunctions` and `createAggregateFunctions`, and no other published path exports them. They built the functions that a callback of the query builder receives as its `fns` argument, and the ORM builds the `fns` of its callbacks from `createFunctions`, so code that called them takes `fns` from such a callback instead:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// The query builder: the second argument of an expression callback, such as where, select, a join's on, orderBy, groupBy, having or the set of an update.
|
|
51
|
+
db.sql.public.user.select('id').where((f, fns) => fns.eq(f.id, 1));
|
|
52
|
+
// The ORM: the fns member of the second argument of a where or orderBy callback.
|
|
53
|
+
db.orm.public.User.where((user, { fns }) => fns.eq(user.id, 1));
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Code that called them to build a condition outside a query, such as in a test, builds a query with the query builder instead and reads the condition from the plan's syntax tree, such as the `where` of `db.sql.public.user.select('id').where((f, fns) => fns.eq(f.id, 1)).build().ast` after checking that its `kind` is `'select'`. That is a syntax-tree node, not the expression `createFunctions` returned.
|
package/dist/adapter.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/adapter";
|
package/dist/adapter.mjs
DELETED
package/dist/components.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components";
|
package/dist/components.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/authoring";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/codec";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/components";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/control";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/emission";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/execution";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/ir";
|
package/dist/components__ir.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/psl-ast";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/components/utils";
|
package/dist/contract.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract";
|
package/dist/contract.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/apply-specifier-default-control-policy";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/contract-validation-error";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/default-namespace";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/enum-accessor";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/format-version";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/hashing-utils";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/hashing";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/internal/format-version";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/is-plain-record";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/resolve-domain-model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/validate-domain";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/validate-once";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/contract/validate-storage";
|
package/dist/driver.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/driver";
|
package/dist/driver.mjs
DELETED
package/dist/driver__control.mjs
DELETED
package/dist/driver__runtime.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/contract/canonicalization-hooks";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/contract/data-type";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/contract/entity-kinds";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/family/control-adapter";
|
package/dist/family__ir.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/family/ir";
|
package/dist/family__ir.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/family/migration";
|
package/dist/family__pack.d.mts
DELETED
package/dist/family__pack.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/family/runtime";
|
package/dist/family__runtime.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/family/schema-verify";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-toolchain/migration-tools/contract-snapshot-store";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mongo-static-CZlnpepm-DnjIfx0L.mjs","names":[],"sources":["../../../../3-targets/mongo/9-facade/dist/mongo-static-CZlnpepm.mjs"],"sourcesContent":["import mongoRuntimeAdapter from \"@internal/adapter-mongo/runtime\";\nimport { mongoRaw } from \"@internal/mongo-orm\";\nimport { createMongoExecutionContext, createMongoExecutionStack, enumMemberCodecFor } from \"@internal/mongo-runtime\";\nimport mongoRuntimeTarget from \"@internal/target-mongo/runtime\";\nimport { isContractBuiltInMemory } from \"@internal/contract/internal/format-version\";\nimport { validateContractOnce } from \"@internal/contract/validate-once\";\nimport { MongoContractSerializer } from \"@internal/family-mongo/ir\";\nimport { buildNamespacedEnums } from \"@internal/contract/enum-accessor\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { mongoQuery } from \"@internal/mongo-query-builder\";\nimport { assertDefined } from \"@internal/utils/assertions\";\n//#region package.json\nvar version = \"8.0.0-rc.25-dev.29\";\n//#endregion\n//#region src/static/contract-from-json.ts\nconst serializer = new MongoContractSerializer();\nconst validator = `${mongoRuntimeTarget.targetId}@${version}`;\n/**\n* Validates an emitted Mongo `contract.json` and returns it as the contract type the application\n* names, ready to pass to `mongo({ contract })` and `mongoStatic({ contract })`. Clients built from\n* the result do not validate it again.\n*\n* The returned value's top level is frozen; its nested objects are not. Do not change `json` or the\n* returned value after the call: clients built from the value later do not validate it again.\n*\n* @example\n* ```ts\n* import type { Contract } from './contract.d';\n* import contractJson from './contract.json' with { type: 'json' };\n*\n* export const contract = contractFromJson<Contract>(contractJson);\n* ```\n*/\nfunction contractFromJson(json) {\n\treturn validateContractOnce(json, validator, (input) => serializer.deserializeContract(input));\n}\n/** Validates a contract value for a Mongo client, once per value. */\nfunction validateMongoContract(contract) {\n\treturn validateContractOnce(contract, validator, () => serializer.deserializeContract(isContractBuiltInMemory(contract) ? serializer.serializeContract(contract) : contract));\n}\n//#endregion\n//#region src/static/mongo-static.ts\nfunction buildMongoStaticContext(contract, stack) {\n\tconst context = createMongoExecutionContext({\n\t\tcontract,\n\t\tstack\n\t});\n\tconst enums = Object.freeze(buildNamespacedEnums(context.contract.domain, enumMemberCodecFor(context.codecs)))[UNBOUND_NAMESPACE_ID];\n\tassertDefined(enums, \"the unbound namespace always exists on a mongo builder output\");\n\treturn {\n\t\tcontext,\n\t\tcontract,\n\t\tenums,\n\t\tquery: mongoQuery({ context }),\n\t\traw: mongoRaw({ context })\n\t};\n}\n/**\n* The query surfaces of a Mongo client without a driver: `query`, `raw` and `enums`. Use it where\n* loading `mongodb` is not wanted.\n*\n* @example\n* ```ts\n* const { enums } = mongoStatic({ contract: contractFromJson<Contract>(contractJson) });\n* ```\n*/\nfunction mongoStatic(options) {\n\tconst stack = createMongoExecutionStack({\n\t\ttarget: mongoRuntimeTarget,\n\t\tadapter: mongoRuntimeAdapter,\n\t\textensions: options.extensions ?? []\n\t});\n\treturn buildMongoStaticContext(validateMongoContract(options.contract), stack);\n}\n//#endregion\nexport { validateMongoContract as i, mongoStatic as n, contractFromJson as r, buildMongoStaticContext as t };\n\n//# sourceMappingURL=mongo-static-CZlnpepm.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,IAAI,UAAU;AAGd,MAAM,aAAa,IAAI,wBAAwB;AAC/C,MAAM,YAAY,GAAG,mBAAmB,SAAS,GAAG;;;;;;;;;;;;;;;;;AAiBpD,SAAS,iBAAiB,MAAM;CAC/B,OAAO,qBAAqB,MAAM,YAAY,UAAU,WAAW,oBAAoB,KAAK,CAAC;AAC9F;;AAEA,SAAS,sBAAsB,UAAU;CACxC,OAAO,qBAAqB,UAAU,iBAAiB,WAAW,oBAAoB,wBAAwB,QAAQ,IAAI,WAAW,kBAAkB,QAAQ,IAAI,QAAQ,CAAC;AAC7K;AAGA,SAAS,wBAAwB,UAAU,OAAO;CACjD,MAAM,UAAU,4BAA4B;EAC3C;EACA;CACD,CAAC;CACD,MAAM,QAAQ,OAAO,OAAO,qBAAqB,QAAQ,SAAS,QAAQ,mBAAmB,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC;CAC/G,cAAc,OAAO,+DAA+D;CACpF,OAAO;EACN;EACA;EACA;EACA,OAAO,WAAW,EAAE,QAAQ,CAAC;EAC7B,KAAK,SAAS,EAAE,QAAQ,CAAC;CAC1B;AACD;;;;;;;;;;AAUA,SAAS,YAAY,SAAS;CAC7B,MAAM,QAAQ,0BAA0B;EACvC,QAAQ;EACR,SAAS;EACT,YAAY,QAAQ,cAAc,CAAC;CACpC,CAAC;CACD,OAAO,wBAAwB,sBAAsB,QAAQ,QAAQ,GAAG,KAAK;AAC9E"}
|
package/dist/query-ast.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/query-ast";
|
package/dist/query-ast.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/query-ast/control";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-family-mongo/query-builder/contract-free";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/target/codecs";
|
package/dist/target__codecs.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/target/control";
|
package/dist/target__control.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/target/data-types";
|
package/dist/target__pack.d.mts
DELETED
package/dist/target__pack.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-target-mongo/target/server-version";
|
package/dist/utils.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils";
|
package/dist/utils.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/abortable";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/array-equal";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/assertions";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/canonical-stringify";
|
package/dist/utils__casts.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/casts";
|
package/dist/utils__casts.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/defined";
|
package/dist/utils__defined.mjs
DELETED
package/dist/utils__guards.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/guards";
|
package/dist/utils__guards.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/hash-content";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/internal-error";
|
package/dist/utils__json.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/json";
|
package/dist/utils__json.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/promise";
|
package/dist/utils__promise.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/redact-db-url";
|
package/dist/utils__result.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/result";
|
package/dist/utils__result.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/simplify-deep";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/structured-error";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@prisma/orm-framework/utils/suppress-idle-connection-errors";
|