@prisma-next/mongo-contract 0.11.0-dev.49 → 0.11.0-dev.50
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/canonicalization-hooks.d.mts +9 -0
- package/dist/canonicalization-hooks.d.mts.map +1 -0
- package/dist/canonicalization-hooks.mjs +17 -0
- package/dist/canonicalization-hooks.mjs.map +1 -0
- package/package.json +8 -7
- package/src/canonicalization-hooks.ts +19 -0
- package/src/exports/canonicalization-hooks.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PreserveEmptyPredicate } from "@prisma-next/contract/hashing";
|
|
2
|
+
|
|
3
|
+
//#region src/canonicalization-hooks.d.ts
|
|
4
|
+
declare const mongoContractCanonicalizationHooks: {
|
|
5
|
+
readonly shouldPreserveEmpty: PreserveEmptyPredicate;
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { mongoContractCanonicalizationHooks };
|
|
9
|
+
//# sourceMappingURL=canonicalization-hooks.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalization-hooks.d.mts","names":[],"sources":["../src/canonicalization-hooks.ts"],"mappings":";;;cAca,kCAAA;EAAA,SACF,mBAAA,EAAqB,sBAAsB;AAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createPreserveEmptyPredicate } from "@prisma-next/contract/hashing-utils";
|
|
2
|
+
const mongoContractCanonicalizationHooks = { shouldPreserveEmpty: createPreserveEmptyPredicate([[
|
|
3
|
+
"storage",
|
|
4
|
+
"namespaces",
|
|
5
|
+
"*",
|
|
6
|
+
"collections"
|
|
7
|
+
], [
|
|
8
|
+
"storage",
|
|
9
|
+
"namespaces",
|
|
10
|
+
"*",
|
|
11
|
+
"collections",
|
|
12
|
+
"*"
|
|
13
|
+
]]) };
|
|
14
|
+
//#endregion
|
|
15
|
+
export { mongoContractCanonicalizationHooks };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=canonicalization-hooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalization-hooks.mjs","names":[],"sources":["../src/canonicalization-hooks.ts"],"sourcesContent":["import type { PreserveEmptyPredicate } from '@prisma-next/contract/hashing';\nimport {\n createPreserveEmptyPredicate,\n type PathPattern,\n} from '@prisma-next/contract/hashing-utils';\n\nconst preserveEmptyPatterns = [\n ['storage', 'namespaces', '*', 'collections'],\n ['storage', 'namespaces', '*', 'collections', '*'],\n] as const satisfies readonly PathPattern[];\n\nconst shouldPreserveEmpty: PreserveEmptyPredicate =\n createPreserveEmptyPredicate(preserveEmptyPatterns);\n\nexport const mongoContractCanonicalizationHooks: {\n readonly shouldPreserveEmpty: PreserveEmptyPredicate;\n} = {\n shouldPreserveEmpty,\n};\n"],"mappings":";AAcA,MAAa,qCAET,EACF,qBALA,6BAA6B,CAL7B;CAAC;CAAW;CAAc;CAAK;AAAa,GAC5C;CAAC;CAAW;CAAc;CAAK;CAAe;AAAG,CAIA,CAKjD,EACF"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/mongo-contract",
|
|
3
|
-
"version": "0.11.0-dev.
|
|
3
|
+
"version": "0.11.0-dev.50",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "Contract types and validation for Prisma Next MongoDB support",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@prisma-next/contract": "0.11.0-dev.
|
|
10
|
-
"@prisma-next/framework-components": "0.11.0-dev.
|
|
11
|
-
"@prisma-next/utils": "0.11.0-dev.
|
|
9
|
+
"@prisma-next/contract": "0.11.0-dev.50",
|
|
10
|
+
"@prisma-next/framework-components": "0.11.0-dev.50",
|
|
11
|
+
"@prisma-next/utils": "0.11.0-dev.50",
|
|
12
12
|
"arktype": "^2.2.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@prisma-next/test-utils": "0.11.0-dev.
|
|
16
|
-
"@prisma-next/tsconfig": "0.11.0-dev.
|
|
17
|
-
"@prisma-next/tsdown": "0.11.0-dev.
|
|
15
|
+
"@prisma-next/test-utils": "0.11.0-dev.50",
|
|
16
|
+
"@prisma-next/tsconfig": "0.11.0-dev.50",
|
|
17
|
+
"@prisma-next/tsdown": "0.11.0-dev.50",
|
|
18
18
|
"tsdown": "0.22.0",
|
|
19
19
|
"typescript": "5.9.3",
|
|
20
20
|
"vitest": "4.1.6"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"exports": {
|
|
27
27
|
".": "./dist/index.mjs",
|
|
28
|
+
"./canonicalization-hooks": "./dist/canonicalization-hooks.mjs",
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
30
31
|
"types": "./dist/index.d.mts",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PreserveEmptyPredicate } from '@prisma-next/contract/hashing';
|
|
2
|
+
import {
|
|
3
|
+
createPreserveEmptyPredicate,
|
|
4
|
+
type PathPattern,
|
|
5
|
+
} from '@prisma-next/contract/hashing-utils';
|
|
6
|
+
|
|
7
|
+
const preserveEmptyPatterns = [
|
|
8
|
+
['storage', 'namespaces', '*', 'collections'],
|
|
9
|
+
['storage', 'namespaces', '*', 'collections', '*'],
|
|
10
|
+
] as const satisfies readonly PathPattern[];
|
|
11
|
+
|
|
12
|
+
const shouldPreserveEmpty: PreserveEmptyPredicate =
|
|
13
|
+
createPreserveEmptyPredicate(preserveEmptyPatterns);
|
|
14
|
+
|
|
15
|
+
export const mongoContractCanonicalizationHooks: {
|
|
16
|
+
readonly shouldPreserveEmpty: PreserveEmptyPredicate;
|
|
17
|
+
} = {
|
|
18
|
+
shouldPreserveEmpty,
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { mongoContractCanonicalizationHooks } from '../canonicalization-hooks';
|