@prisma/orm-toolchain 8.0.0-rc.5 → 8.0.0-rc.5-dev.2
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 +72 -259
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__init-output.mjs +1 -1
- package/dist/{output-CovTDY14-CUoAqLML.mjs → output-D87bBeOF-DWlKHmk9.mjs} +3 -3
- package/dist/{output-CovTDY14-CUoAqLML.mjs.map → output-D87bBeOF-DWlKHmk9.mjs.map} +1 -1
- package/dist/quick-reference-mongo.md +2 -2
- package/dist/quick-reference-postgres.md +2 -2
- package/package.json +12 -12
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InitOutputSchema } from "./output-
|
|
1
|
+
import { t as InitOutputSchema } from "./output-D87bBeOF-DWlKHmk9.mjs";
|
|
2
2
|
export { InitOutputSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
|
-
//#region ../../../1-framework/3-tooling/cli/dist/output-
|
|
2
|
+
//#region ../../../1-framework/3-tooling/cli/dist/output-D87bBeOF.mjs
|
|
3
3
|
/**
|
|
4
4
|
* arktype schema for the structured success document `init --json` writes
|
|
5
5
|
* to stdout (FR1.5). The same shape backs the human-readable outro
|
|
@@ -68,10 +68,10 @@ function buildNextSteps(options) {
|
|
|
68
68
|
push(`Edit your schema at ${options.schemaPath}, then re-run the emit command.`);
|
|
69
69
|
} else push(`Edit your schema at ${options.schemaPath}, then re-run \`${options.emitCommand}\`.`);
|
|
70
70
|
push("Open prisma-next.md for a quick reference on how to write your first typed query.");
|
|
71
|
-
|
|
71
|
+
push("Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.");
|
|
72
72
|
return steps;
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
75
|
export { buildNextSteps as n, InitOutputSchema as t };
|
|
76
76
|
|
|
77
|
-
//# sourceMappingURL=output-
|
|
77
|
+
//# sourceMappingURL=output-D87bBeOF-DWlKHmk9.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-
|
|
1
|
+
{"version":3,"file":"output-D87bBeOF-DWlKHmk9.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/output-D87bBeOF.mjs"],"sourcesContent":["import { type } from \"arktype\";\n//#region src/commands/init/output.ts\n/**\n* arktype schema for the structured success document `init --json` writes\n* to stdout (FR1.5). The same shape backs the human-readable outro\n* renderer (FR10), so the two output modes carry identical information.\n*\n* `target` is normalised to the user-facing flag value (`mongodb` rather\n* than the internal `mongo`) so consumers can round-trip the document\n* straight into a follow-up `--target` invocation.\n*\n* The `ok: true` literal is the documented success/error discriminator —\n* see [Style Guide § JSON Semantics](../../../../../../../docs/CLI%20Style%20Guide.md#json-semantics).\n* Error envelopes (`CliErrorEnvelope`) carry `ok: false` so consumers can\n* branch with `if (doc.ok)` without inspecting the rest of the structure.\n*/\nconst InitOutputSchema = type({\n\tok: \"true\",\n\ttarget: \"'postgres'|'mongodb'\",\n\tauthoring: \"'psl'|'typescript'\",\n\tschemaPath: \"string\",\n\tfilesWritten: \"string[]\",\n\t/**\n\t* FR9.1 — paths removed from disk during this run: contract artifacts\n\t* (`contract.json`, `contract.d.ts`, `ops.json`, `migration.json`) an\n\t* earlier run left behind, which only a re-init has, and the retired\n\t* agent-skill directories, which every run removes when it finds them.\n\t*/\n\tfilesDeleted: \"string[]\",\n\t/**\n\t* What became of the dependency install. `skipped` is the deliberate\n\t* `--skip-install`; `failed` is an install that ran and did not succeed,\n\t* which leaves a scaffolded project that cannot run yet. `deps` and\n\t* `devDeps` list what was installed, so both non-`installed` states\n\t* carry them empty.\n\t*/\n\tpackagesInstalled: {\n\t\tstatus: \"'installed'|'skipped'|'failed'\",\n\t\tdeps: \"string[]\",\n\t\tdevDeps: \"string[]\"\n\t},\n\tcontractEmitted: \"boolean\",\n\tnextSteps: \"string[]\",\n\twarnings: \"string[]\"\n});\n/**\n* Builds the `nextSteps` array from the resolved scaffold state. Steps are\n* ordered by the workflow a user needs to follow: install what is missing →\n* configure connection → (emit if not yet done) → run a starter query →\n* docs / agent skill.\n*\n* The strings are stable and human-readable; agents wanting to act on them\n* should match on substrings (e.g. \"DATABASE_URL\") rather than exact text,\n* since copy may evolve.\n*/\nfunction buildNextSteps(options) {\n\tconst steps = [];\n\tlet stepNumber = 1;\n\tconst push = (text) => {\n\t\tsteps.push(`${stepNumber}. ${text}`);\n\t\tstepNumber += 1;\n\t};\n\tif (options.packagesInstalled === \"failed\") push(\"Install the project dependencies with your package manager — the install this run attempted failed, so nothing else here will work yet.\");\n\tif (options.packagesInstalled === \"skipped\") push(\"Install the project dependencies with your package manager (this run skipped them).\");\n\tpush(\"Set DATABASE_URL in your environment (export it or add it to .env).\");\n\tif (!options.contractEmitted) {\n\t\tpush(`Emit the contract: \\`${options.emitCommand}\\``);\n\t\tpush(`Edit your schema at ${options.schemaPath}, then re-run the emit command.`);\n\t} else push(`Edit your schema at ${options.schemaPath}, then re-run \\`${options.emitCommand}\\`.`);\n\tpush(\"Open prisma-next.md for a quick reference on how to write your first typed query.\");\n\tpush(\"Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.\");\n\treturn steps;\n}\n//#endregion\nexport { buildNextSteps as n, InitOutputSchema as t };\n\n//# sourceMappingURL=output-D87bBeOF.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,mBAAmB,KAAK;CAC7B,IAAI;CACJ,QAAQ;CACR,WAAW;CACX,YAAY;CACZ,cAAc;;;;;;;CAOd,cAAc;;;;;;;;CAQd,mBAAmB;EAClB,QAAQ;EACR,MAAM;EACN,SAAS;CACV;CACA,iBAAiB;CACjB,WAAW;CACX,UAAU;AACX,CAAC;;;;;;;;;;;AAWD,SAAS,eAAe,SAAS;CAChC,MAAM,QAAQ,CAAC;CACf,IAAI,aAAa;CACjB,MAAM,QAAQ,SAAS;EACtB,MAAM,KAAK,GAAG,WAAW,IAAI,MAAM;EACnC,cAAc;CACf;CACA,IAAI,QAAQ,sBAAsB,UAAU,KAAK,yIAAyI;CAC1L,IAAI,QAAQ,sBAAsB,WAAW,KAAK,qFAAqF;CACvI,KAAK,qEAAqE;CAC1E,IAAI,CAAC,QAAQ,iBAAiB;EAC7B,KAAK,wBAAwB,QAAQ,YAAY,GAAG;EACpD,KAAK,uBAAuB,QAAQ,WAAW,gCAAgC;CAChF,OAAO,KAAK,uBAAuB,QAAQ,WAAW,kBAAkB,QAAQ,YAAY,IAAI;CAChG,KAAK,mFAAmF;CACxF,KAAK,mGAAmG;CACxG,OAAO;AACR"}
|
|
@@ -112,6 +112,6 @@ The ORM covers the common cases. For the rest, two escape hatches are designed i
|
|
|
112
112
|
|
|
113
113
|
If this project lives inside a pnpm workspace, a few things are worth knowing:
|
|
114
114
|
|
|
115
|
-
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for
|
|
116
|
-
- **`pnpm dlx`.** `pnpm dlx
|
|
115
|
+
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`.
|
|
116
|
+
- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than `latest`.
|
|
117
117
|
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma Next with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`.
|
|
@@ -91,6 +91,6 @@ You can customize how your environment variables are loaded by changing or remov
|
|
|
91
91
|
|
|
92
92
|
If this project lives inside a pnpm workspace, a few things are worth knowing:
|
|
93
93
|
|
|
94
|
-
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for
|
|
95
|
-
- **`pnpm dlx`.** `pnpm dlx
|
|
94
|
+
- **Catalogs.** When the workspace's `pnpm-workspace.yaml` defines a `catalogs` entry for `prisma` or `{{pkg}}`, pnpm uses the catalog version everywhere — `init` does too. If you wanted the published `latest` instead, update or remove the catalog entry, then re-run `pnpm install`.
|
|
95
|
+
- **`pnpm dlx`.** `pnpm dlx prisma@next orm init …` works in any directory. Inside a workspace, pnpm still resolves dependencies through the workspace's catalog/overrides rather than the registry; expect the installed Prisma Next packages to reflect the workspace's catalog rather than `latest`.
|
|
96
96
|
- **`pnpm` → `npm` fallback.** If `pnpm` ever fails to install Prisma Next with a `workspace:*` or `catalog:` resolution error (a leak in a published artefact), `init` falls back to `npm install` and surfaces a warning. Once the offending package republishes a clean version you can switch back with `pnpm install`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-toolchain",
|
|
3
|
-
"version": "8.0.0-rc.5",
|
|
3
|
+
"version": "8.0.0-rc.5-dev.2",
|
|
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.5",
|
|
12
|
+
"@prisma/orm-framework": "8.0.0-rc.5-dev.2",
|
|
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.5",
|
|
33
|
-
"@internal/cli-telemetry": "8.0.0-rc.5",
|
|
34
|
-
"@internal/config-loader": "8.0.0-rc.5",
|
|
35
|
-
"@internal/emitter": "8.0.0-rc.5",
|
|
36
|
-
"@internal/language-server": "8.0.0-rc.5",
|
|
37
|
-
"@internal/migration-tools": "8.0.0-rc.5",
|
|
38
|
-
"@internal/publish-surface": "8.0.0-rc.5",
|
|
39
|
-
"@repo/tsconfig": "8.0.0-rc.5",
|
|
40
|
-
"@repo/tsdown": "8.0.0-rc.5",
|
|
41
|
-
"@internal/vite-plugin-contract-emit": "8.0.0-rc.5",
|
|
32
|
+
"@internal/cli": "8.0.0-rc.5-dev.2",
|
|
33
|
+
"@internal/cli-telemetry": "8.0.0-rc.5-dev.2",
|
|
34
|
+
"@internal/config-loader": "8.0.0-rc.5-dev.2",
|
|
35
|
+
"@internal/emitter": "8.0.0-rc.5-dev.2",
|
|
36
|
+
"@internal/language-server": "8.0.0-rc.5-dev.2",
|
|
37
|
+
"@internal/migration-tools": "8.0.0-rc.5-dev.2",
|
|
38
|
+
"@internal/publish-surface": "8.0.0-rc.5-dev.2",
|
|
39
|
+
"@repo/tsconfig": "8.0.0-rc.5-dev.2",
|
|
40
|
+
"@repo/tsdown": "8.0.0-rc.5-dev.2",
|
|
41
|
+
"@internal/vite-plugin-contract-emit": "8.0.0-rc.5-dev.2",
|
|
42
42
|
"tsdown": "0.22.14",
|
|
43
43
|
"typescript": "5.9.3"
|
|
44
44
|
},
|