@prisma-next/target-mongo 0.3.0-dev.135 → 0.3.0-dev.147
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 +19 -5
- package/dist/codec-types.d.mts +34 -0
- package/dist/codec-types.d.mts.map +1 -0
- package/dist/codec-types.mjs +1 -0
- package/dist/pack.d.mts +9 -3
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +2 -1
- package/dist/pack.mjs.map +1 -1
- package/package.json +6 -5
- package/src/exports/codec-types.ts +12 -0
- package/src/exports/pack.ts +8 -1
package/README.md
CHANGED
|
@@ -4,10 +4,24 @@ MongoDB target pack for Prisma Next.
|
|
|
4
4
|
|
|
5
5
|
## Responsibilities
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **Target
|
|
7
|
+
- **Target pack assembly**: Exports the MongoDB target pack for authoring and family composition
|
|
8
|
+
- **Target metadata**: Defines the stable Mongo target identity (`kind`, `familyId`, `targetId`, `version`, `capabilities`)
|
|
9
|
+
- **Codec type surface**: Exposes the base Mongo codec type map used by authoring-time type composition
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Entrypoints
|
|
11
12
|
|
|
12
|
-
-
|
|
13
|
-
|
|
13
|
+
- `./pack`: pure target pack ref used by `@prisma-next/family-mongo` and `@prisma-next/mongo-contract-ts`
|
|
14
|
+
- `./codec-types`: base Mongo codec type map
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import mongoFamily from '@prisma-next/family-mongo/pack';
|
|
20
|
+
import { defineContract } from '@prisma-next/mongo-contract-ts/contract-builder';
|
|
21
|
+
import mongoTarget from '@prisma-next/target-mongo/pack';
|
|
22
|
+
|
|
23
|
+
const contract = defineContract({
|
|
24
|
+
family: mongoFamily,
|
|
25
|
+
target: mongoTarget,
|
|
26
|
+
});
|
|
27
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/exports/codec-types.d.ts
|
|
2
|
+
type CodecTypes = {
|
|
3
|
+
readonly 'mongo/objectId@1': {
|
|
4
|
+
readonly input: string;
|
|
5
|
+
readonly output: string;
|
|
6
|
+
};
|
|
7
|
+
readonly 'mongo/string@1': {
|
|
8
|
+
readonly input: string;
|
|
9
|
+
readonly output: string;
|
|
10
|
+
};
|
|
11
|
+
readonly 'mongo/double@1': {
|
|
12
|
+
readonly input: number;
|
|
13
|
+
readonly output: number;
|
|
14
|
+
};
|
|
15
|
+
readonly 'mongo/int32@1': {
|
|
16
|
+
readonly input: number;
|
|
17
|
+
readonly output: number;
|
|
18
|
+
};
|
|
19
|
+
readonly 'mongo/bool@1': {
|
|
20
|
+
readonly input: boolean;
|
|
21
|
+
readonly output: boolean;
|
|
22
|
+
};
|
|
23
|
+
readonly 'mongo/date@1': {
|
|
24
|
+
readonly input: Date;
|
|
25
|
+
readonly output: Date;
|
|
26
|
+
};
|
|
27
|
+
readonly 'mongo/vector@1': {
|
|
28
|
+
readonly input: readonly number[];
|
|
29
|
+
readonly output: readonly number[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { CodecTypes };
|
|
34
|
+
//# sourceMappingURL=codec-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-types.d.mts","names":[],"sources":["../src/exports/codec-types.ts"],"sourcesContent":[],"mappings":";KAAY,UAAA;EAAA,SAAA,kBAMiC,EAAA;;;;;;;;;;;;;;;;;;;;;oBAAA;qBAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/pack.d.mts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CodecTypes } from "./codec-types.mjs";
|
|
2
|
+
import { TargetPackRef } from "@prisma-next/framework-components/components";
|
|
3
|
+
|
|
4
|
+
//#region src/exports/pack.d.ts
|
|
5
|
+
declare const mongoTargetPack: {
|
|
3
6
|
readonly kind: "target";
|
|
4
7
|
readonly familyId: "mongo";
|
|
5
8
|
readonly targetId: "mongo";
|
|
@@ -7,6 +10,9 @@ declare const mongoTargetDescriptorMeta: {
|
|
|
7
10
|
readonly version: "0.0.1";
|
|
8
11
|
readonly capabilities: {};
|
|
9
12
|
};
|
|
13
|
+
declare const _default: typeof mongoTargetPack & TargetPackRef<"mongo", "mongo"> & {
|
|
14
|
+
readonly __codecTypes?: CodecTypes;
|
|
15
|
+
};
|
|
10
16
|
//#endregion
|
|
11
|
-
export {
|
|
17
|
+
export { _default as default };
|
|
12
18
|
//# sourceMappingURL=pack.d.mts.map
|
package/dist/pack.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"sourcesContent":[],"mappings":";;;;cAIM;;EAAA,SAAA,QAAA,EAA2C,OAAA;EAAA,SAAA,QAK9C,EAAA,OAAA;EAHsC,SAAA,EAAA,EAAA,OAAA;EACvC,SAAA,OAAA,EAAA,OAAA;EAC0B,SAAA,YAAA,EAAA,CAAA,CAAA;CAAU;cAJW,iBAER,kBACvC;0BAC0B"}
|
package/dist/pack.mjs
CHANGED
|
@@ -10,7 +10,8 @@ const mongoTargetDescriptorMeta = {
|
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/exports/pack.ts
|
|
13
|
-
|
|
13
|
+
const mongoTargetPack = mongoTargetDescriptorMeta;
|
|
14
|
+
var pack_default = mongoTargetPack;
|
|
14
15
|
|
|
15
16
|
//#endregion
|
|
16
17
|
export { pack_default as default };
|
package/dist/pack.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.mjs","names":[],"sources":["../src/core/descriptor-meta.ts","../src/exports/pack.ts"],"sourcesContent":["export const mongoTargetDescriptorMeta = {\n kind: 'target',\n familyId: 'mongo',\n targetId: 'mongo',\n id: 'mongo',\n version: '0.0.1',\n capabilities: {},\n} as const;\n","import { mongoTargetDescriptorMeta } from '../core/descriptor-meta';\n\nexport default
|
|
1
|
+
{"version":3,"file":"pack.mjs","names":[],"sources":["../src/core/descriptor-meta.ts","../src/exports/pack.ts"],"sourcesContent":["export const mongoTargetDescriptorMeta = {\n kind: 'target',\n familyId: 'mongo',\n targetId: 'mongo',\n id: 'mongo',\n version: '0.0.1',\n capabilities: {},\n} as const;\n","import type { TargetPackRef } from '@prisma-next/framework-components/components';\nimport { mongoTargetDescriptorMeta } from '../core/descriptor-meta';\nimport type { CodecTypes } from './codec-types';\n\nconst mongoTargetPack = mongoTargetDescriptorMeta;\n\nexport default mongoTargetPack as typeof mongoTargetPack &\n TargetPackRef<'mongo', 'mongo'> & {\n readonly __codecTypes?: CodecTypes;\n };\n"],"mappings":";AAAA,MAAa,4BAA4B;CACvC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE;CACjB;;;;ACHD,MAAM,kBAAkB;AAExB,mBAAe"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/target-mongo",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.147",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "MongoDB target pack for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/
|
|
8
|
+
"@prisma-next/framework-components": "0.3.0-dev.147"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"tsdown": "0.18.4",
|
|
12
12
|
"typescript": "5.9.3",
|
|
13
13
|
"vitest": "4.0.17",
|
|
14
|
-
"@prisma-next/
|
|
15
|
-
"@prisma-next/
|
|
14
|
+
"@prisma-next/tsconfig": "0.0.0",
|
|
15
|
+
"@prisma-next/tsdown": "0.0.0"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"exports": {
|
|
22
|
-
"
|
|
22
|
+
"./codec-types": "./dist/codec-types.mjs",
|
|
23
|
+
"./pack": "./dist/pack.mjs",
|
|
23
24
|
"./package.json": "./package.json"
|
|
24
25
|
},
|
|
25
26
|
"repository": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type CodecTypes = {
|
|
2
|
+
readonly 'mongo/objectId@1': { readonly input: string; readonly output: string };
|
|
3
|
+
readonly 'mongo/string@1': { readonly input: string; readonly output: string };
|
|
4
|
+
readonly 'mongo/double@1': { readonly input: number; readonly output: number };
|
|
5
|
+
readonly 'mongo/int32@1': { readonly input: number; readonly output: number };
|
|
6
|
+
readonly 'mongo/bool@1': { readonly input: boolean; readonly output: boolean };
|
|
7
|
+
readonly 'mongo/date@1': { readonly input: Date; readonly output: Date };
|
|
8
|
+
readonly 'mongo/vector@1': {
|
|
9
|
+
readonly input: readonly number[];
|
|
10
|
+
readonly output: readonly number[];
|
|
11
|
+
};
|
|
12
|
+
};
|
package/src/exports/pack.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { TargetPackRef } from '@prisma-next/framework-components/components';
|
|
1
2
|
import { mongoTargetDescriptorMeta } from '../core/descriptor-meta';
|
|
3
|
+
import type { CodecTypes } from './codec-types';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
const mongoTargetPack = mongoTargetDescriptorMeta;
|
|
6
|
+
|
|
7
|
+
export default mongoTargetPack as typeof mongoTargetPack &
|
|
8
|
+
TargetPackRef<'mongo', 'mongo'> & {
|
|
9
|
+
readonly __codecTypes?: CodecTypes;
|
|
10
|
+
};
|