@prisma-next/operations 0.5.0-dev.65 → 0.5.0-dev.67
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/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";UAAiB,SAAA;EAAA,SACN,OAAA;EAAA,SACA,MAAA;EAAA,SACA,QAAA;AAAA;AAAA,UAGM,UAAA;EAAA,SACN,OAAA;EAAA,SACA,QAAA;AAAA;AAAA,KAGC,QAAA;EAAA,SACG,OAAA;EAAA,SAA0B,MAAA;AAAA;EAAA,SAC1B,MAAA;EAAA,SAAoC,OAAA;AAAA;AAAA,UAElC,cAAA;EAAA,SACN,IAAA,GAAO,QAAA;EAAA,SACP,IAAA,MAAU,IAAA;AAAA;AAAA,KAGT,mBAAA,WAA8B,cAAA,GAAiB,cAAA,IAAkB,CAAA;EAAA,SAClE,MAAA;AAAA;AAAA,UAGM,iBAAA,WAA4B,cAAA,GAAiB,cAAA;EAC5D,QAAA,CAAS,UAAA,EAAY,mBAAA,CAAoB,CAAA;EACzC,OAAA,IAAW,QAAA,CAAS,MAAA,SAAe,CAAA;AAAA;AAAA,iBAGrB,uBAAA,WACJ,cAAA,GAAiB,cAAA,CAAA,CAAA,GACxB,iBAAA,CAAkB,CAAA"}
|
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export interface ParamSpec {\n readonly codecId?: string;\n readonly traits?: readonly string[];\n readonly nullable: boolean;\n}\n\nexport interface ReturnSpec {\n readonly codecId: string;\n readonly nullable: boolean;\n}\n\nexport type SelfSpec =\n | { readonly codecId: string; readonly traits?: never }\n | { readonly traits: readonly string[]; readonly codecId?: never };\n\nexport interface OperationEntry {\n readonly self?: SelfSpec;\n readonly impl: (...args: never[]) => unknown;\n}\n\nexport type OperationDescriptor<T extends OperationEntry = OperationEntry> = T & {\n readonly method: string;\n};\n\nexport interface OperationRegistry<T extends OperationEntry = OperationEntry> {\n register(descriptor: OperationDescriptor<T>): void;\n entries(): Readonly<Record<string, T>>;\n}\n\nexport function createOperationRegistry<\n T extends OperationEntry = OperationEntry,\n>(): OperationRegistry<T> {\n const operations: Record<string, T> = Object.create(null);\n\n return {\n register(descriptor: OperationDescriptor<T>) {\n if (descriptor.method in operations) {\n throw new Error(`Operation \"${descriptor.method}\" is already registered`);\n }\n if (descriptor.self) {\n const hasCodecId = descriptor.self.codecId !== undefined;\n const hasTraits = descriptor.self.traits !== undefined && descriptor.self.traits.length > 0;\n if (!hasCodecId && !hasTraits) {\n throw new Error(`Operation \"${descriptor.method}\" self has neither codecId nor traits`);\n }\n if (hasCodecId && hasTraits) {\n throw new Error(`Operation \"${descriptor.method}\" self has both codecId and traits`);\n }\n }\n const { method: _method, ...entry } = descriptor;\n // OperationDescriptor<T> = T & { method }, so stripping method yields T.\n // TypeScript can't prove Omit<T & { method }, 'method'> = T for generic T.\n operations[descriptor.method] = entry as unknown as T;\n },\n entries() {\n return Object.freeze({ ...operations });\n },\n };\n}\n"],"mappings":";AA6BA,SAAgB,0BAEU;CACxB,MAAM,aAAgC,OAAO,OAAO,KAAK;CAEzD,OAAO;EACL,SAAS,YAAoC;GAC3C,IAAI,WAAW,UAAU,YACvB,MAAM,IAAI,MAAM,cAAc,WAAW,OAAO,yBAAyB;GAE3E,IAAI,WAAW,MAAM;IACnB,MAAM,aAAa,WAAW,KAAK,YAAY,KAAA;IAC/C,MAAM,YAAY,WAAW,KAAK,WAAW,KAAA,KAAa,WAAW,KAAK,OAAO,SAAS;IAC1F,IAAI,CAAC,cAAc,CAAC,WAClB,MAAM,IAAI,MAAM,cAAc,WAAW,OAAO,uCAAuC;IAEzF,IAAI,cAAc,WAChB,MAAM,IAAI,MAAM,cAAc,WAAW,OAAO,oCAAoC;;GAGxF,MAAM,EAAE,QAAQ,SAAS,GAAG,UAAU;GAGtC,WAAW,WAAW,UAAU;;EAElC,UAAU;GACR,OAAO,OAAO,OAAO,EAAE,GAAG,YAAY,CAAC;;EAE1C"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/operations",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.67",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "Target-neutral operation registry and capability helpers for Prisma Next",
|
|
8
8
|
"dependencies": {},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"tsdown": "0.
|
|
10
|
+
"tsdown": "0.22.0",
|
|
11
11
|
"typescript": "5.9.3",
|
|
12
|
-
"vitest": "4.
|
|
13
|
-
"@prisma-next/tsconfig": "0.0.0",
|
|
12
|
+
"vitest": "4.1.5",
|
|
14
13
|
"@prisma-next/tsdown": "0.0.0",
|
|
15
|
-
"@prisma-next/test-utils": "0.0.1"
|
|
14
|
+
"@prisma-next/test-utils": "0.0.1",
|
|
15
|
+
"@prisma-next/tsconfig": "0.0.0"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|