@prisma/orm-toolchain 8.0.0-rc.7-dev.3 → 8.0.0-rc.7-dev.4
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/cli.mjs +3 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +2 -2
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/{db-verify-BRDzImLV-3eI346zy.d.mts → db-verify-BRDzImLV-e7n1L4Vk.d.mts} +2 -2
- package/dist/{db-verify-BRDzImLV-3eI346zy.d.mts.map → db-verify-BRDzImLV-e7n1L4Vk.d.mts.map} +1 -1
- package/dist/migration-tools.d.mts +1 -1
- package/dist/migration-tools.mjs +1 -1
- package/dist/migration-tools__ref-resolution.d.mts +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/{ref-XdaDN3GF-Io-mSVS6.mjs → ref-knkpu_zy-B5bc9JJw.mjs} +50 -8
- package/dist/ref-knkpu_zy-B5bc9JJw.mjs.map +1 -0
- package/dist/{ref-resolution-D77jPigU.mjs → ref-resolution-BWpwb8_b.mjs} +8 -1
- package/dist/ref-resolution-BWpwb8_b.mjs.map +1 -0
- package/dist/{ref-resolution-COGOSL57.d.mts → ref-resolution-CaHQJXE0.d.mts} +11 -1
- package/dist/ref-resolution-CaHQJXE0.d.mts.map +1 -0
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/ref-XdaDN3GF-Io-mSVS6.mjs.map +0 -1
- package/dist/ref-resolution-COGOSL57.d.mts.map +0 -1
- package/dist/ref-resolution-D77jPigU.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
1
2
|
import { l as validateRefName } from "./refs-BpSpzdYB-BcDelHGt.mjs";
|
|
2
3
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
3
4
|
//#region ../../../1-framework/3-tooling/migration/dist/exports/ref-resolution.mjs
|
|
@@ -22,6 +23,8 @@ function findEdgeByDirName(graph, dirName) {
|
|
|
22
23
|
* - `@db` — the live database marker (connection-required); callers MUST
|
|
23
24
|
* check `result.value.provenance.kind === 'reserved-db'` and resolve the
|
|
24
25
|
* actual hash via `readAllMarkers()` before using `result.value.hash`
|
|
26
|
+
* - `@empty` — the empty contract (offline; resolves to
|
|
27
|
+
* `EMPTY_CONTRACT_HASH`, the origin with no prior storage state)
|
|
25
28
|
* - Full storage hash (64 hex chars or `empty`)
|
|
26
29
|
* - Hex prefix (6+ hex chars, must uniquely identify one contract)
|
|
27
30
|
* - Ref name (looked up in the refs index)
|
|
@@ -49,6 +52,10 @@ function parseContractRef(input, ctx) {
|
|
|
49
52
|
hash: "",
|
|
50
53
|
provenance: { kind: "reserved-db" }
|
|
51
54
|
});
|
|
55
|
+
if (input === "@empty") return ok({
|
|
56
|
+
hash: EMPTY_CONTRACT_HASH,
|
|
57
|
+
provenance: { kind: "reserved-empty" }
|
|
58
|
+
});
|
|
52
59
|
if (isFullHash(input)) {
|
|
53
60
|
if (ctx.graph.nodes.has(input)) return ok({
|
|
54
61
|
hash: input,
|
|
@@ -247,4 +254,4 @@ function parseMigrationRef(input, ctx) {
|
|
|
247
254
|
//#endregion
|
|
248
255
|
export { parseContractRef as n, parseMigrationRef as r, findEdgeByDirName as t };
|
|
249
256
|
|
|
250
|
-
//# sourceMappingURL=ref-resolution-
|
|
257
|
+
//# sourceMappingURL=ref-resolution-BWpwb8_b.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref-resolution-BWpwb8_b.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/ref-resolution.mjs"],"sourcesContent":["import { t as EMPTY_CONTRACT_HASH } from \"../constants-CM-w38DQ.mjs\";\nimport { l as validateRefName } from \"../refs-BpSpzdYB.mjs\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/refs/types.ts\nconst FULL_HASH_PATTERN = /^([0-9a-f]{64}|empty)$/;\nconst HEX_PREFIX_PATTERN = /^[0-9a-f]{6,}$/;\nfunction isFullHash(input) {\n\treturn FULL_HASH_PATTERN.test(input);\n}\nfunction isHexPrefix(input) {\n\treturn HEX_PREFIX_PATTERN.test(input);\n}\nfunction findEdgeByDirName(graph, dirName) {\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) if (edge.dirName === dirName) return edge;\n}\n//#endregion\n//#region src/refs/contract-ref.ts\n/**\n* Resolve a user-supplied string to a contract hash using the unified\n* contract-reference grammar.\n*\n* Accepted forms:\n* - `@contract` — the on-disk working contract hash (offline; requires\n* `ctx.contractHash` to be set)\n* - `@db` — the live database marker (connection-required); callers MUST\n* check `result.value.provenance.kind === 'reserved-db'` and resolve the\n* actual hash via `readAllMarkers()` before using `result.value.hash`\n* - `@empty` — the empty contract (offline; resolves to\n* `EMPTY_CONTRACT_HASH`, the origin with no prior storage state)\n* - Full storage hash (64 hex chars or `empty`)\n* - Hex prefix (6+ hex chars, must uniquely identify one contract)\n* - Ref name (looked up in the refs index)\n* - Migration directory name (resolves to the migration's `to`-contract)\n* - `<dir>^` (resolves to the migration's `from`-contract)\n*/\nfunction parseContractRef(input, ctx) {\n\tif (!input) return notOk({\n\t\tkind: \"invalid-format\",\n\t\tinput,\n\t\treason: \"Reference cannot be empty\"\n\t});\n\tif (input === \"@contract\") {\n\t\tif (ctx.contractHash === void 0) return notOk({\n\t\t\tkind: \"not-found\",\n\t\t\tinput,\n\t\t\tgrammar: \"contract\"\n\t\t});\n\t\treturn ok({\n\t\t\thash: ctx.contractHash,\n\t\t\tprovenance: { kind: \"reserved-contract\" }\n\t\t});\n\t}\n\tif (input === \"@db\") return ok({\n\t\thash: \"\",\n\t\tprovenance: { kind: \"reserved-db\" }\n\t});\n\tif (input === \"@empty\") return ok({\n\t\thash: EMPTY_CONTRACT_HASH,\n\t\tprovenance: { kind: \"reserved-empty\" }\n\t});\n\tif (isFullHash(input)) {\n\t\tif (ctx.graph.nodes.has(input)) return ok({\n\t\t\thash: input,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"hash\",\n\t\t\t\tinput\n\t\t\t}\n\t\t});\n\t\treturn notOk({\n\t\t\tkind: \"not-found\",\n\t\t\tinput,\n\t\t\tgrammar: \"contract\"\n\t\t});\n\t}\n\tif (input.endsWith(\"^\")) {\n\t\tconst dirName = input.slice(0, -1);\n\t\tif (!dirName) return notOk({\n\t\t\tkind: \"invalid-format\",\n\t\t\tinput,\n\t\t\treason: \"Missing directory name before ^\"\n\t\t});\n\t\tconst edge = findEdgeByDirName(ctx.graph, dirName);\n\t\tif (edge) return ok({\n\t\t\thash: edge.from,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"migration-from\",\n\t\t\t\tdirName\n\t\t\t}\n\t\t});\n\t\treturn notOk({\n\t\t\tkind: \"not-found\",\n\t\t\tinput,\n\t\t\tgrammar: \"contract\"\n\t\t});\n\t}\n\tconst candidates = [];\n\tif (validateRefName(input) && Object.hasOwn(ctx.refs, input)) {\n\t\tconst ref = ctx.refs[input];\n\t\tif (ref) candidates.push({\n\t\t\thash: ref.hash,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"ref\",\n\t\t\t\trefName: input\n\t\t\t},\n\t\t\tlabel: `ref \"${input}\"`\n\t\t});\n\t}\n\tconst edge = findEdgeByDirName(ctx.graph, input);\n\tif (edge) candidates.push({\n\t\thash: edge.to,\n\t\tprovenance: {\n\t\t\tkind: \"migration-to\",\n\t\t\tdirName: input\n\t\t},\n\t\tlabel: `migration directory \"${input}\"`\n\t});\n\tif (isHexPrefix(input)) {\n\t\tconst matches = [...ctx.graph.nodes].filter((n) => n.startsWith(input));\n\t\tconst [firstMatch] = matches;\n\t\tif (matches.length === 1 && firstMatch !== void 0) candidates.push({\n\t\t\thash: firstMatch,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"hash\",\n\t\t\t\tinput\n\t\t\t},\n\t\t\tlabel: `hash prefix \"${input}\"`\n\t\t});\n\t\telse if (matches.length > 1) return notOk({\n\t\t\tkind: \"ambiguous\",\n\t\t\tinput,\n\t\t\tcandidates: matches,\n\t\t\tgrammar: \"contract\"\n\t\t});\n\t}\n\tconst [firstCandidate] = candidates;\n\tif (candidates.length === 1 && firstCandidate !== void 0) return ok({\n\t\thash: firstCandidate.hash,\n\t\tprovenance: firstCandidate.provenance\n\t});\n\tif (candidates.length > 1) return notOk({\n\t\tkind: \"ambiguous\",\n\t\tinput,\n\t\tcandidates: candidates.map((c) => c.label),\n\t\tgrammar: \"contract\"\n\t});\n\treturn notOk({\n\t\tkind: \"not-found\",\n\t\tinput,\n\t\tgrammar: \"contract\"\n\t});\n}\n//#endregion\n//#region src/refs/migration-ref.ts\n/**\n* Resolve a user-supplied string to a migration using the migration-reference\n* grammar.\n*\n* Accepted forms:\n* - Migration directory name (e.g. `20260101-add-users`)\n* - Migration hash (full or 6+ hex prefix)\n*\n* Wrong-grammar diagnostics are produced when the input matches a\n* contract-grammar form (ref name, `<dir>^`, contract-only hash) so the\n* user gets a targeted hint rather than a generic \"not found\".\n*/\nfunction parseMigrationRef(input, ctx) {\n\tif (!input) return notOk({\n\t\tkind: \"invalid-format\",\n\t\tinput,\n\t\treason: \"Reference cannot be empty\"\n\t});\n\tif (input.endsWith(\"^\")) return notOk({\n\t\tkind: \"wrong-grammar\",\n\t\tinput,\n\t\texpectedGrammar: \"migration\",\n\t\tmessage: \"`^` syntax addresses contracts, not migrations\",\n\t\tfix: \"Pass the migration directory name without `^`, or use a contract-accepting flag like `--to` or `--from`.\"\n\t});\n\tif (validateRefName(input) && Object.hasOwn(ctx.refs, input)) return notOk({\n\t\tkind: \"wrong-grammar\",\n\t\tinput,\n\t\texpectedGrammar: \"migration\",\n\t\tmessage: `\"${input}\" is a ref name, not a migration`,\n\t\tfix: \"Refs point at contracts, not migrations. Use a migration directory name or migration hash.\"\n\t});\n\tconst edge = findEdgeByDirName(ctx.graph, input);\n\tif (edge) return ok({\n\t\tdirName: edge.dirName,\n\t\tmigrationHash: edge.migrationHash,\n\t\tfrom: edge.from,\n\t\tto: edge.to,\n\t\tprovenance: {\n\t\t\tkind: \"dir-name\",\n\t\t\tdirName: input\n\t\t}\n\t});\n\tif (isFullHash(input)) {\n\t\tconst migEdge = ctx.graph.migrationByHash.get(input);\n\t\tif (migEdge) return ok({\n\t\t\tdirName: migEdge.dirName,\n\t\t\tmigrationHash: migEdge.migrationHash,\n\t\t\tfrom: migEdge.from,\n\t\t\tto: migEdge.to,\n\t\t\tprovenance: {\n\t\t\t\tkind: \"hash\",\n\t\t\t\tinput\n\t\t\t}\n\t\t});\n\t\tif (ctx.graph.nodes.has(input)) return notOk({\n\t\t\tkind: \"wrong-grammar\",\n\t\t\tinput,\n\t\t\texpectedGrammar: \"migration\",\n\t\t\tmessage: \"Hash matched a contract but not a migration\",\n\t\t\tfix: \"Use a contract-accepting flag like `--to` or `--from` to reference contracts by hash. Pass `migration show <dir>` for a specific migration.\"\n\t\t});\n\t\treturn notOk({\n\t\t\tkind: \"not-found\",\n\t\t\tinput,\n\t\t\tgrammar: \"migration\"\n\t\t});\n\t}\n\tif (isHexPrefix(input)) {\n\t\tconst migMatches = [...ctx.graph.migrationByHash.entries()].filter(([hash]) => hash.startsWith(input));\n\t\tconst [firstMigMatch] = migMatches;\n\t\tif (migMatches.length === 1 && firstMigMatch !== void 0) {\n\t\t\tconst [, matchedEdge] = firstMigMatch;\n\t\t\treturn ok({\n\t\t\t\tdirName: matchedEdge.dirName,\n\t\t\t\tmigrationHash: matchedEdge.migrationHash,\n\t\t\t\tfrom: matchedEdge.from,\n\t\t\t\tto: matchedEdge.to,\n\t\t\t\tprovenance: {\n\t\t\t\t\tkind: \"hash\",\n\t\t\t\t\tinput\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (migMatches.length > 1) return notOk({\n\t\t\tkind: \"ambiguous\",\n\t\t\tinput,\n\t\t\tcandidates: migMatches.map(([hash]) => hash),\n\t\t\tgrammar: \"migration\"\n\t\t});\n\t\tif ([...ctx.graph.nodes].filter((n) => n.startsWith(input)).length > 0) return notOk({\n\t\t\tkind: \"wrong-grammar\",\n\t\t\tinput,\n\t\t\texpectedGrammar: \"migration\",\n\t\t\tmessage: \"Hash matched a contract but not a migration\",\n\t\t\tfix: \"Use a contract-accepting flag like `--to` or `--from` to reference contracts by hash. Pass `migration show <dir>` for a specific migration.\"\n\t\t});\n\t}\n\treturn notOk({\n\t\tkind: \"not-found\",\n\t\tinput,\n\t\tgrammar: \"migration\"\n\t});\n}\n//#endregion\nexport { findEdgeByDirName, parseContractRef, parseMigrationRef };\n\n//# sourceMappingURL=ref-resolution.mjs.map"],"mappings":";;;;AAIA,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAC3B,SAAS,WAAW,OAAO;CAC1B,OAAO,kBAAkB,KAAK,KAAK;AACpC;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO,mBAAmB,KAAK,KAAK;AACrC;AACA,SAAS,kBAAkB,OAAO,SAAS;CAC1C,KAAK,MAAM,SAAS,MAAM,aAAa,OAAO,GAAG,KAAK,MAAM,QAAQ,OAAO,IAAI,KAAK,YAAY,SAAS,OAAO;AACjH;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,iBAAiB,OAAO,KAAK;CACrC,IAAI,CAAC,OAAO,OAAO,MAAM;EACxB,MAAM;EACN;EACA,QAAQ;CACT,CAAC;CACD,IAAI,UAAU,aAAa;EAC1B,IAAI,IAAI,iBAAiB,KAAK,GAAG,OAAO,MAAM;GAC7C,MAAM;GACN;GACA,SAAS;EACV,CAAC;EACD,OAAO,GAAG;GACT,MAAM,IAAI;GACV,YAAY,EAAE,MAAM,oBAAoB;EACzC,CAAC;CACF;CACA,IAAI,UAAU,OAAO,OAAO,GAAG;EAC9B,MAAM;EACN,YAAY,EAAE,MAAM,cAAc;CACnC,CAAC;CACD,IAAI,UAAU,UAAU,OAAO,GAAG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;GACvB,MAAM,QAAQ;GACd,IAAI,QAAQ;GACZ,YAAY;IACX,MAAM;IACN;GACD;EACD,CAAC;EACD,IAAI,IAAI,MAAM,MAAM,IAAI,KAAK,GAAG,OAAO,MAAM;GAC5C,MAAM;GACN;GACA,iBAAiB;GACjB,SAAS;GACT,KAAK;EACN,CAAC;EACD,OAAO,MAAM;GACZ,MAAM;GACN;GACA,SAAS;EACV,CAAC;CACF;CACA,IAAI,YAAY,KAAK,GAAG;EACvB,MAAM,aAAa,CAAC,GAAG,IAAI,MAAM,gBAAgB,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,WAAW,KAAK,CAAC;EACrG,MAAM,CAAC,iBAAiB;EACxB,IAAI,WAAW,WAAW,KAAK,kBAAkB,KAAK,GAAG;GACxD,MAAM,GAAG,eAAe;GACxB,OAAO,GAAG;IACT,SAAS,YAAY;IACrB,eAAe,YAAY;IAC3B,MAAM,YAAY;IAClB,IAAI,YAAY;IAChB,YAAY;KACX,MAAM;KACN;IACD;GACD,CAAC;EACF;EACA,IAAI,WAAW,SAAS,GAAG,OAAO,MAAM;GACvC,MAAM;GACN;GACA,YAAY,WAAW,KAAK,CAAC,UAAU,IAAI;GAC3C,SAAS;EACV,CAAC;EACD,IAAI,CAAC,GAAG,IAAI,MAAM,KAAK,CAAC,CAAC,QAAQ,MAAM,EAAE,WAAW,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,OAAO,MAAM;GACpF,MAAM;GACN;GACA,iBAAiB;GACjB,SAAS;GACT,KAAK;EACN,CAAC;CACF;CACA,OAAO,MAAM;EACZ,MAAM;EACN;EACA,SAAS;CACV,CAAC;AACF"}
|
|
@@ -42,6 +42,14 @@ type ContractRefProvenance = {
|
|
|
42
42
|
*/
|
|
43
43
|
{
|
|
44
44
|
readonly kind: 'reserved-db';
|
|
45
|
+
} |
|
|
46
|
+
/**
|
|
47
|
+
* Resolved from the `@empty` reserved token — the empty contract
|
|
48
|
+
* (`EMPTY_CONTRACT_HASH`), the origin with no prior storage state.
|
|
49
|
+
* Offline-resolvable.
|
|
50
|
+
*/
|
|
51
|
+
{
|
|
52
|
+
readonly kind: 'reserved-empty';
|
|
45
53
|
};
|
|
46
54
|
/** A resolved contract reference: the target hash and how it was derived. */
|
|
47
55
|
interface ContractRef {
|
|
@@ -100,6 +108,8 @@ declare function findEdgeByDirName(graph: MigrationGraph, dirName: string): Migr
|
|
|
100
108
|
* - `@db` — the live database marker (connection-required); callers MUST
|
|
101
109
|
* check `result.value.provenance.kind === 'reserved-db'` and resolve the
|
|
102
110
|
* actual hash via `readAllMarkers()` before using `result.value.hash`
|
|
111
|
+
* - `@empty` — the empty contract (offline; resolves to
|
|
112
|
+
* `EMPTY_CONTRACT_HASH`, the origin with no prior storage state)
|
|
103
113
|
* - Full storage hash (64 hex chars or `empty`)
|
|
104
114
|
* - Hex prefix (6+ hex chars, must uniquely identify one contract)
|
|
105
115
|
* - Ref name (looked up in the refs index)
|
|
@@ -124,4 +134,4 @@ declare function parseContractRef(input: string, ctx: RefResolutionContext): Res
|
|
|
124
134
|
declare function parseMigrationRef(input: string, ctx: RefResolutionContext): Result<MigrationRef, RefResolutionError>;
|
|
125
135
|
//#endregion
|
|
126
136
|
export { RefResolutionAmbiguous as a, RefResolutionInvalidFormat as c, findEdgeByDirName as d, parseContractRef as f, MigrationRefProvenance as i, RefResolutionNotFound as l, ContractRefProvenance as n, RefResolutionContext as o, parseMigrationRef as p, MigrationRef as r, RefResolutionError as s, ContractRef as t, RefResolutionWrongGrammar as u };
|
|
127
|
-
//# sourceMappingURL=ref-resolution-
|
|
137
|
+
//# sourceMappingURL=ref-resolution-CaHQJXE0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref-resolution-CaHQJXE0.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/ref-resolution.d.mts"],"mappings":";;;;;;UAKU;WACC,OAAO;WACP,MAAM;;;;;;WAMN;;KAEN;WACM;WACA;;WAEA;WACA;;WAEA;WACA;;WAEA;WACA;;;;;;;WAOA;;;;;;;;;WASA;;;;;;;;WAQA;;;UAGD;WACC;WACA,YAAY;;KAElB;WACM;WACA;;WAEA;WACA;;;UAGD;WACC;WACA;WACA;WACA;WACA,YAAY;;UAEb;WACC;WACA;WACA;;UAED;WACC;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;;KAEN,qBAAqB,wBAAwB,yBAAyB,4BAA4B;iBACtF,kBAAkB,OAAO,gBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;iBAqB3D,iBAAiB,eAAe,KAAK,uBAAuB,OAAO,aAAa;;;;;;;;;;;;;;;iBAehF,kBAAkB,eAAe,KAAK,uBAAuB,OAAO,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as getEmittedArtifactPaths } from "./exports-Dw2WIX63-CQgI2e_L.mjs";
|
|
2
|
-
import { R as executeContractEmit, h as disposeEmitQueue } from "./ref-
|
|
2
|
+
import { R as executeContractEmit, h as disposeEmitQueue } from "./ref-knkpu_zy-B5bc9JJw.mjs";
|
|
3
3
|
import { a as loadConfigForSections } from "./exports-Cv8nMmBT.mjs";
|
|
4
4
|
import { extname, resolve } from "pathe";
|
|
5
5
|
//#region ../../../1-framework/3-tooling/vite-plugin-contract-emit/dist/index.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-toolchain",
|
|
3
|
-
"version": "8.0.0-rc.7-dev.
|
|
3
|
+
"version": "8.0.0-rc.7-dev.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-framework": "8.0.0-rc.7-dev.
|
|
12
|
+
"@prisma/orm-framework": "8.0.0-rc.7-dev.4",
|
|
13
13
|
"@vercel/detect-agent": "^1.2.4",
|
|
14
14
|
"arktype": "^2.2.2",
|
|
15
15
|
"c12": "^3.3.4",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"wrap-ansi": "^10.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@internal/cli": "8.0.0-rc.7-dev.
|
|
33
|
-
"@internal/cli-telemetry": "8.0.0-rc.7-dev.
|
|
34
|
-
"@internal/config-loader": "8.0.0-rc.7-dev.
|
|
35
|
-
"@internal/emitter": "8.0.0-rc.7-dev.
|
|
36
|
-
"@internal/language-server": "8.0.0-rc.7-dev.
|
|
37
|
-
"@internal/migration-tools": "8.0.0-rc.7-dev.
|
|
38
|
-
"@internal/publish-surface": "8.0.0-rc.7-dev.
|
|
39
|
-
"@repo/tsconfig": "8.0.0-rc.7-dev.
|
|
40
|
-
"@repo/tsdown": "8.0.0-rc.7-dev.
|
|
41
|
-
"@internal/vite-plugin-contract-emit": "8.0.0-rc.7-dev.
|
|
32
|
+
"@internal/cli": "8.0.0-rc.7-dev.4",
|
|
33
|
+
"@internal/cli-telemetry": "8.0.0-rc.7-dev.4",
|
|
34
|
+
"@internal/config-loader": "8.0.0-rc.7-dev.4",
|
|
35
|
+
"@internal/emitter": "8.0.0-rc.7-dev.4",
|
|
36
|
+
"@internal/language-server": "8.0.0-rc.7-dev.4",
|
|
37
|
+
"@internal/migration-tools": "8.0.0-rc.7-dev.4",
|
|
38
|
+
"@internal/publish-surface": "8.0.0-rc.7-dev.4",
|
|
39
|
+
"@repo/tsconfig": "8.0.0-rc.7-dev.4",
|
|
40
|
+
"@repo/tsdown": "8.0.0-rc.7-dev.4",
|
|
41
|
+
"@internal/vite-plugin-contract-emit": "8.0.0-rc.7-dev.4",
|
|
42
42
|
"tsdown": "0.22.14",
|
|
43
43
|
"typescript": "5.9.3"
|
|
44
44
|
},
|