@prisma-next/contract 0.3.0-dev.4 → 0.3.0-dev.40
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 +26 -5
- package/dist/{exports/framework-components.d.ts → framework-components.d.mts} +215 -98
- package/dist/framework-components.d.mts.map +1 -0
- package/dist/framework-components.mjs +70 -0
- package/dist/framework-components.mjs.map +1 -0
- package/dist/ir-C9rRU5WS.d.mts +84 -0
- package/dist/ir-C9rRU5WS.d.mts.map +1 -0
- package/dist/ir.d.mts +2 -0
- package/dist/ir.mjs +51 -0
- package/dist/ir.mjs.map +1 -0
- package/dist/types-BJr2H3qm.d.mts +377 -0
- package/dist/types-BJr2H3qm.d.mts.map +1 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +17 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +25 -28
- package/schemas/data-contract-document-v1.json +9 -4
- package/src/exports/framework-components.ts +35 -0
- package/src/exports/ir.ts +1 -0
- package/src/exports/types.ts +36 -0
- package/src/framework-components.ts +658 -0
- package/src/ir.ts +129 -0
- package/src/types.ts +440 -0
- package/dist/exports/framework-components.js +0 -24
- package/dist/exports/framework-components.js.map +0 -1
- package/dist/exports/ir.d.ts +0 -77
- package/dist/exports/ir.js +0 -35
- package/dist/exports/ir.js.map +0 -1
- package/dist/exports/pack-manifest-types.d.ts +0 -3
- package/dist/exports/pack-manifest-types.js +0 -1
- package/dist/exports/pack-manifest-types.js.map +0 -1
- package/dist/exports/types.d.ts +0 -224
- package/dist/exports/types.js +0 -8
- package/dist/exports/types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,50 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/contract",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Data contract type definitions and JSON schema for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/operations": "0.3.0-dev.
|
|
8
|
+
"@prisma-next/operations": "0.3.0-dev.40"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"
|
|
12
|
-
"tsup": "8.5.1",
|
|
11
|
+
"tsdown": "0.18.4",
|
|
13
12
|
"typescript": "5.9.3",
|
|
14
|
-
"vitest": "4.0.
|
|
15
|
-
"@prisma-next/test-utils": "0.0.1"
|
|
13
|
+
"vitest": "4.0.17",
|
|
14
|
+
"@prisma-next/test-utils": "0.0.1",
|
|
15
|
+
"@prisma-next/tsconfig": "0.0.0",
|
|
16
|
+
"@prisma-next/tsdown": "0.0.0"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"dist",
|
|
20
|
+
"src",
|
|
19
21
|
"schemas"
|
|
20
22
|
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20"
|
|
25
|
+
},
|
|
21
26
|
"exports": {
|
|
22
|
-
"./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"types": "./dist/exports/ir.d.ts",
|
|
32
|
-
"import": "./dist/exports/ir.js"
|
|
33
|
-
},
|
|
34
|
-
"./framework-components": {
|
|
35
|
-
"types": "./dist/exports/framework-components.d.ts",
|
|
36
|
-
"import": "./dist/exports/framework-components.js"
|
|
37
|
-
},
|
|
38
|
-
"./schema-document": "./schemas/data-contract-document-v1.json"
|
|
27
|
+
"./framework-components": "./dist/framework-components.mjs",
|
|
28
|
+
"./ir": "./dist/ir.mjs",
|
|
29
|
+
"./types": "./dist/types.mjs",
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/prisma/prisma-next.git",
|
|
35
|
+
"directory": "packages/1-framework/1-core/shared/contract"
|
|
39
36
|
},
|
|
40
37
|
"scripts": {
|
|
41
|
-
"build": "
|
|
38
|
+
"build": "tsdown",
|
|
42
39
|
"test": "vitest run --passWithNoTests",
|
|
43
40
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
44
41
|
"typecheck": "tsc --project tsconfig.json --noEmit",
|
|
45
|
-
"lint": "biome check . --
|
|
46
|
-
"lint:fix": "biome check --write .
|
|
47
|
-
"lint:fix:unsafe": "biome check --write --unsafe .
|
|
48
|
-
"clean": "
|
|
42
|
+
"lint": "biome check . --error-on-warnings",
|
|
43
|
+
"lint:fix": "biome check --write .",
|
|
44
|
+
"lint:fix:unsafe": "biome check --write --unsafe .",
|
|
45
|
+
"clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
|
|
49
46
|
}
|
|
50
47
|
}
|
|
@@ -24,10 +24,15 @@
|
|
|
24
24
|
"enum": ["document"],
|
|
25
25
|
"description": "Target family classification"
|
|
26
26
|
},
|
|
27
|
-
"
|
|
27
|
+
"storageHash": {
|
|
28
28
|
"type": "string",
|
|
29
29
|
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
30
|
-
"description": "SHA-256 hash of the
|
|
30
|
+
"description": "SHA-256 hash of the storage section (DB-satisfied expectations)"
|
|
31
|
+
},
|
|
32
|
+
"executionHash": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
35
|
+
"description": "SHA-256 hash of the execution section (client-side behavior)"
|
|
31
36
|
},
|
|
32
37
|
"profileHash": {
|
|
33
38
|
"type": "string",
|
|
@@ -85,7 +90,7 @@
|
|
|
85
90
|
"required": ["document"]
|
|
86
91
|
}
|
|
87
92
|
},
|
|
88
|
-
"required": ["schemaVersion", "target", "targetFamily", "
|
|
93
|
+
"required": ["schemaVersion", "target", "targetFamily", "storageHash", "storage"],
|
|
89
94
|
"$defs": {
|
|
90
95
|
"DocCollection": {
|
|
91
96
|
"type": "object",
|
|
@@ -103,7 +108,7 @@
|
|
|
103
108
|
"properties": {
|
|
104
109
|
"strategy": {
|
|
105
110
|
"type": "string",
|
|
106
|
-
"enum": ["auto", "client", "uuid", "
|
|
111
|
+
"enum": ["auto", "client", "uuid", "objectId"],
|
|
107
112
|
"description": "ID generation strategy"
|
|
108
113
|
}
|
|
109
114
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
// Descriptors
|
|
3
|
+
AdapterDescriptor,
|
|
4
|
+
// Instances
|
|
5
|
+
AdapterInstance,
|
|
6
|
+
AdapterPackRef,
|
|
7
|
+
ComponentDescriptor,
|
|
8
|
+
ComponentMetadata,
|
|
9
|
+
ContractComponentRequirementsCheckInput,
|
|
10
|
+
ContractComponentRequirementsCheckResult,
|
|
11
|
+
DriverDescriptor,
|
|
12
|
+
DriverInstance,
|
|
13
|
+
DriverPackRef,
|
|
14
|
+
ExtensionDescriptor,
|
|
15
|
+
ExtensionInstance,
|
|
16
|
+
ExtensionPackRef,
|
|
17
|
+
FamilyDescriptor,
|
|
18
|
+
FamilyInstance,
|
|
19
|
+
// Type renderers for parameterized codec emission
|
|
20
|
+
NormalizedTypeRenderer,
|
|
21
|
+
PackRefBase,
|
|
22
|
+
TargetBoundComponentDescriptor,
|
|
23
|
+
TargetDescriptor,
|
|
24
|
+
TargetInstance,
|
|
25
|
+
TargetPackRef,
|
|
26
|
+
TypeRenderer,
|
|
27
|
+
TypeRendererFunction,
|
|
28
|
+
TypeRendererTemplate,
|
|
29
|
+
} from '../framework-components';
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
checkContractComponentRequirements,
|
|
33
|
+
interpolateTypeTemplate,
|
|
34
|
+
normalizeRenderer,
|
|
35
|
+
} from '../framework-components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../ir';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
$,
|
|
3
|
+
Brand,
|
|
4
|
+
ColumnDefault,
|
|
5
|
+
ContractBase,
|
|
6
|
+
ContractMarkerRecord,
|
|
7
|
+
DocCollection,
|
|
8
|
+
DocIndex,
|
|
9
|
+
DocumentContract,
|
|
10
|
+
DocumentStorage,
|
|
11
|
+
ExecutionHashBase,
|
|
12
|
+
ExecutionMutationDefault,
|
|
13
|
+
ExecutionMutationDefaultValue,
|
|
14
|
+
ExecutionPlan,
|
|
15
|
+
ExecutionSection,
|
|
16
|
+
Expr,
|
|
17
|
+
FieldType,
|
|
18
|
+
GenerateContractTypesOptions,
|
|
19
|
+
GeneratedValueSpec,
|
|
20
|
+
ParamDescriptor,
|
|
21
|
+
ParameterizedCodecDescriptor,
|
|
22
|
+
PlanMeta,
|
|
23
|
+
PlanRefs,
|
|
24
|
+
ProfileHashBase,
|
|
25
|
+
RenderTypeContext,
|
|
26
|
+
ResultType,
|
|
27
|
+
Source,
|
|
28
|
+
StorageHashBase,
|
|
29
|
+
TargetFamilyHook,
|
|
30
|
+
TypeRenderContext,
|
|
31
|
+
TypeRenderEntry,
|
|
32
|
+
TypeRenderer,
|
|
33
|
+
TypesImportSpec,
|
|
34
|
+
ValidationContext,
|
|
35
|
+
} from '../types';
|
|
36
|
+
export { coreHash, isDocumentContract, profileHash } from '../types';
|