@prisma/orm-toolchain 8.0.0-rc.24-dev.32 → 8.0.0-rc.24-dev.33

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.
@@ -5,9 +5,10 @@
5
5
  * to stdout (FR1.5). The same shape backs the human-readable outro
6
6
  * renderer (FR10), so the two output modes carry identical information.
7
7
  *
8
- * `target` is the short name of the target package, the value `--target`
9
- * takes, so consumers can round-trip the document straight into a
10
- * follow-up `--target` invocation.
8
+ * `target` is the value `--target` takes for the target package: its short
9
+ * name when it is listed, otherwise its package name, so consumers can
10
+ * round-trip the document straight into a follow-up `--target` invocation.
11
+ * `package` is the name of the target package.
11
12
  *
12
13
  * The `ok: true` literal is the documented success/error discriminator —
13
14
  * see [Style Guide § JSON Semantics](../../../../../../../docs/CLI%20Style%20Guide.md#json-semantics).
@@ -16,7 +17,8 @@
16
17
  */
17
18
  declare const InitOutputSchema: import("arktype/internal/variants/object.ts").ObjectType<{
18
19
  ok: true;
19
- target: "postgres" | "mongodb";
20
+ target: string;
21
+ package: string;
20
22
  authoring: "prisma7" | "psl" | "typescript";
21
23
  schemaPath: string;
22
24
  filesWritten: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"cli__init-output.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/init-output.d.mts"],"mappings":";;;;;;;;;;;;;;;;cAec,gEAAgE;EAC5E;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;IACA;;EAEF;EACA;;KAEG,oBAAoB,iBAAiB"}
1
+ {"version":3,"file":"cli__init-output.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/init-output.d.mts"],"mappings":";;;;;;;;;;;;;;;;;cAgBc,gEAAgE;EAC5E;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;EACA;IACE;IACA;IACA;IACA;;EAEF;EACA;;KAEG,oBAAoB,iBAAiB"}
@@ -1,2 +1,2 @@
1
- import { n as InitOutputSchema } from "./output-E6F4-EMc-CqlzGlv-.mjs";
1
+ import { n as InitOutputSchema } from "./output-BV7p64ql-nFpstc7l.mjs";
2
2
  export { InitOutputSchema };
@@ -1,53 +1,14 @@
1
1
  import { type } from "arktype";
2
- //#region ../../../1-framework/3-tooling/cli/dist/output-E6F4-EMc.mjs
3
- const KNOWN_TARGET_PACKAGES = [{
4
- shortName: "postgres",
5
- aliases: ["postgresql"],
6
- packageName: "@prisma/orm-postgres",
7
- workspacePackageName: "@internal/postgres",
8
- label: "PostgreSQL",
9
- provider: {
10
- name: "postgresql",
11
- writtenBy: 7
12
- },
13
- peerPackages: ["pg"]
14
- }, {
15
- shortName: "mongodb",
16
- aliases: ["mongo"],
17
- packageName: "@prisma/orm-mongo",
18
- workspacePackageName: "@internal/mongo",
19
- label: "MongoDB",
20
- provider: {
21
- name: "mongodb",
22
- writtenBy: 6
23
- },
24
- peerPackages: ["mongodb"]
25
- }];
26
- const TARGET_SHORT_NAMES = KNOWN_TARGET_PACKAGES.map((entry) => entry.shortName);
27
- /** The entry `--target` names by its short name or an alias, in any case. */
28
- function findTargetByName(value) {
29
- const name = value.toLowerCase();
30
- return KNOWN_TARGET_PACKAGES.find((entry) => entry.shortName === name || entry.aliases.some((alias) => alias === name));
31
- }
32
- /**
33
- * The entry a `datasource` provider names, matched exactly: the provider itself, or the short
34
- * name or an alias.
35
- */
36
- function findTargetByProvider(provider) {
37
- return KNOWN_TARGET_PACKAGES.find((entry) => entry.provider.name === provider || entry.shortName === provider || entry.aliases.some((alias) => alias === provider));
38
- }
39
- /** The entry whose provider only Prisma 6 and earlier wrote; such a schema is a Prisma 6 schema. */
40
- function findPrisma6OnlyTarget(provider) {
41
- return KNOWN_TARGET_PACKAGES.find((entry) => entry.provider.writtenBy === 6 && entry.provider.name === provider);
42
- }
2
+ //#region ../../../1-framework/3-tooling/cli/dist/output-BV7p64ql.mjs
43
3
  /**
44
4
  * arktype schema for the structured success document `init --json` writes
45
5
  * to stdout (FR1.5). The same shape backs the human-readable outro
46
6
  * renderer (FR10), so the two output modes carry identical information.
47
7
  *
48
- * `target` is the short name of the target package, the value `--target`
49
- * takes, so consumers can round-trip the document straight into a
50
- * follow-up `--target` invocation.
8
+ * `target` is the value `--target` takes for the target package: its short
9
+ * name when it is listed, otherwise its package name, so consumers can
10
+ * round-trip the document straight into a follow-up `--target` invocation.
11
+ * `package` is the name of the target package.
51
12
  *
52
13
  * The `ok: true` literal is the documented success/error discriminator —
53
14
  * see [Style Guide § JSON Semantics](../../../../../../../docs/CLI%20Style%20Guide.md#json-semantics).
@@ -56,7 +17,8 @@ function findPrisma6OnlyTarget(provider) {
56
17
  */
57
18
  const InitOutputSchema = type({
58
19
  ok: "true",
59
- target: type.enumerated(...TARGET_SHORT_NAMES),
20
+ target: "string",
21
+ package: "string",
60
22
  /** `prisma7` when an existing Prisma 7 schema is the contract source. */
61
23
  authoring: "'psl'|'typescript'|'prisma7'",
62
24
  /** The starter schema init wrote, or the Prisma 7 schema it points the config at. */
@@ -165,6 +127,6 @@ function pushPrisma7Steps(push, options) {
165
127
  push(AGENT_SKILLS_STEP);
166
128
  }
167
129
  //#endregion
168
- export { PRISMA7_LOOP_STEP as a, buildNextSteps as c, findTargetByProvider as d, NEXT_STEPS_BEFORE_SCAFFOLD as i, findPrisma6OnlyTarget as l, InitOutputSchema as n, PRISMA7_QUICK_REFERENCE_STEP as o, KNOWN_TARGET_PACKAGES as r, TARGET_SHORT_NAMES as s, DB_SIGN_STEP as t, findTargetByName as u };
130
+ export { PRISMA7_QUICK_REFERENCE_STEP as a, PRISMA7_LOOP_STEP as i, InitOutputSchema as n, buildNextSteps as o, NEXT_STEPS_BEFORE_SCAFFOLD as r, DB_SIGN_STEP as t };
169
131
 
170
- //# sourceMappingURL=output-E6F4-EMc-CqlzGlv-.mjs.map
132
+ //# sourceMappingURL=output-BV7p64ql-nFpstc7l.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-BV7p64ql-nFpstc7l.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/output-BV7p64ql.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 the value `--target` takes for the target package: its short\n* name when it is listed, otherwise its package name, so consumers can\n* round-trip the document straight into a follow-up `--target` invocation.\n* `package` is the name of the target package.\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: \"string\",\n\tpackage: \"string\",\n\t/** `prisma7` when an existing Prisma 7 schema is the contract source. */\n\tauthoring: \"'psl'|'typescript'|'prisma7'\",\n\t/** The starter schema init wrote, or the Prisma 7 schema it points the config at. */\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/** The Prisma 7 config moved out of Prisma 8's way; empty on a normal run. */\n\tfilesRenamed: type({\n\t\tfrom: \"string\",\n\t\tto: \"string\"\n\t}).array(),\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: under `skipped`, and under a `failed`\n\t* first install, both are empty; when a later install fails, `deps` holds\n\t* what the first install, before the questions, put in place.\n\t*/\n\tpackagesInstalled: {\n\t\tstatus: \"'installed'|'skipped'|'failed'\",\n\t\tdeps: \"string[]\",\n\t\tdevDeps: \"string[]\"\n\t},\n\tcontractEmitted: \"boolean\",\n\t/**\n\t* What the Prisma 7 path did beyond a normal run: the schema adopted, the\n\t* config renamed (or `null` when it was already `prisma7.config.*`), the\n\t* `package.json` scripts now invoking `prisma7`, and the Prisma 7 package\n\t* specs installed or listed to install. `null` on a normal run.\n\t*/\n\tprisma7: type({\n\t\tschemaPath: \"string\",\n\t\tconfigRenamedTo: \"string | null\",\n\t\tscriptsRewritten: \"string[]\",\n\t\tpackagesMoved: \"string[]\"\n\t}).or(\"null\"),\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.prisma7 !== null) {\n\t\tpushPrisma7Steps(push, {\n\t\t\t...options,\n\t\t\tprisma7: options.prisma7\n\t\t});\n\t\treturn steps;\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-8.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/** The install that precedes the Prisma 7 check failed, so nothing was written. */\nconst NEXT_STEPS_BEFORE_SCAFFOLD = [\"1. Install the project dependencies with your package manager. The install this run attempted failed before anything was written.\", \"2. Run `prisma orm init` again.\"];\nconst DB_SIGN_STEP = \"Adopt your existing database: `prisma db sign` verifies it against the contract and records the signing marker and the `db` ref. It makes no change to the database schema.\";\nconst PRISMA7_ROUTES_STEP = \"Move your routes one at a time to the Prisma 8 client in src/prisma/db.ts.\";\nconst PRISMA7_LOOP_STEP = \"After each `prisma7 migrate dev`, run `prisma contract emit` and then `prisma db sign`.\";\nconst PRISMA7_GENERATE_STEP = \"Run `prisma7 generate` so the Prisma 7 client matches the Prisma 7 CLI.\";\nconst PRISMA7_QUICK_REFERENCE_STEP = \"Open prisma-8.md for a quick reference on the transition loop and your first typed query.\";\nconst AGENT_SKILLS_STEP = \"Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.\";\n/**\n* The transition routine, project requirement 7: init set Prisma 8 up beside\n* Prisma 7 and stopped, so every database action here is one the user runs.\n*/\nfunction pushPrisma7Steps(push, options) {\n\tconst moved = options.prisma7.packagesMoved;\n\tconst including = moved.length === 0 ? \"\" : ` That includes ${moved.join(\", \")}.`;\n\tpush(\"Set DATABASE_URL in your environment (export it or add it to .env).\");\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.${including}`);\n\tif (options.packagesInstalled === \"skipped\") push(`Install the project dependencies with your package manager (this run skipped them)${moved.length === 0 ? \"\" : `, including ${moved.join(\", \")}`}.`);\n\tif (!options.contractEmitted) push(`Emit the contract: \\`${options.emitCommand}\\``);\n\tpush(DB_SIGN_STEP);\n\tpush(PRISMA7_ROUTES_STEP);\n\tpush(PRISMA7_LOOP_STEP);\n\tif (options.prisma7.clientMoved) push(PRISMA7_GENERATE_STEP);\n\tpush(PRISMA7_QUICK_REFERENCE_STEP);\n\tpush(AGENT_SKILLS_STEP);\n}\n//#endregion\nexport { PRISMA7_QUICK_REFERENCE_STEP as a, PRISMA7_LOOP_STEP as i, InitOutputSchema as n, buildNextSteps as o, NEXT_STEPS_BEFORE_SCAFFOLD as r, DB_SIGN_STEP as t };\n\n//# sourceMappingURL=output-BV7p64ql.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,mBAAmB,KAAK;CAC7B,IAAI;CACJ,QAAQ;CACR,SAAS;;CAET,WAAW;;CAEX,YAAY;CACZ,cAAc;;;;;;;CAOd,cAAc;;CAEd,cAAc,KAAK;EAClB,MAAM;EACN,IAAI;CACL,CAAC,CAAC,CAAC,MAAM;;;;;;;;;CAST,mBAAmB;EAClB,QAAQ;EACR,MAAM;EACN,SAAS;CACV;CACA,iBAAiB;;;;;;;CAOjB,SAAS,KAAK;EACb,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;CAChB,CAAC,CAAC,CAAC,GAAG,MAAM;CACZ,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,YAAY,MAAM;EAC7B,iBAAiB,MAAM;GACtB,GAAG;GACH,SAAS,QAAQ;EAClB,CAAC;EACD,OAAO;CACR;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,gFAAgF;CACrF,KAAK,mGAAmG;CACxG,OAAO;AACR;;AAEA,MAAM,6BAA6B,CAAC,qIAAqI,iCAAiC;AAC1M,MAAM,eAAe;AACrB,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAC9B,MAAM,+BAA+B;AACrC,MAAM,oBAAoB;;;;;AAK1B,SAAS,iBAAiB,MAAM,SAAS;CACxC,MAAM,QAAQ,QAAQ,QAAQ;CAC9B,MAAM,YAAY,MAAM,WAAW,IAAI,KAAK,kBAAkB,MAAM,KAAK,IAAI,EAAE;CAC/E,KAAK,qEAAqE;CAC1E,IAAI,QAAQ,sBAAsB,UAAU,KAAK,0IAA0I,WAAW;CACtM,IAAI,QAAQ,sBAAsB,WAAW,KAAK,qFAAqF,MAAM,WAAW,IAAI,KAAK,eAAe,MAAM,KAAK,IAAI,IAAI,EAAE;CACrM,IAAI,CAAC,QAAQ,iBAAiB,KAAK,wBAAwB,QAAQ,YAAY,GAAG;CAClF,KAAK,YAAY;CACjB,KAAK,mBAAmB;CACxB,KAAK,iBAAiB;CACtB,IAAI,QAAQ,QAAQ,aAAa,KAAK,qBAAqB;CAC3D,KAAK,4BAA4B;CACjC,KAAK,iBAAiB;AACvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-toolchain",
3
- "version": "8.0.0-rc.24-dev.32",
3
+ "version": "8.0.0-rc.24-dev.33",
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.24-dev.32",
12
+ "@prisma/orm-framework": "8.0.0-rc.24-dev.33",
13
13
  "@vercel/detect-agent": "^1.2.4",
14
14
  "arktype": "^2.2.9",
15
15
  "c12": "^3.3.4",
@@ -25,20 +25,21 @@
25
25
  "string-width": "^8.3.0",
26
26
  "strip-ansi": "^7.2.0",
27
27
  "tinyglobby": "^0.2.17",
28
+ "validate-npm-package-name": "^7.0.2",
28
29
  "vscode-languageserver": "10.1.2",
29
30
  "vscode-languageserver-textdocument": "1.0.16",
30
31
  "wrap-ansi": "^10.0.2"
31
32
  },
32
33
  "devDependencies": {
33
- "@internal/cli": "8.0.0-rc.24-dev.32",
34
- "@internal/cli-telemetry": "8.0.0-rc.24-dev.32",
35
- "@internal/config-loader": "8.0.0-rc.24-dev.32",
36
- "@internal/emitter": "8.0.0-rc.24-dev.32",
37
- "@internal/language-server": "8.0.0-rc.24-dev.32",
38
- "@internal/migration-tools": "8.0.0-rc.24-dev.32",
39
- "@repo/tsconfig": "8.0.0-rc.24-dev.32",
40
- "@repo/tsdown": "8.0.0-rc.24-dev.32",
41
- "@internal/vite-plugin-contract-emit": "8.0.0-rc.24-dev.32",
34
+ "@internal/cli": "8.0.0-rc.24-dev.33",
35
+ "@internal/cli-telemetry": "8.0.0-rc.24-dev.33",
36
+ "@internal/config-loader": "8.0.0-rc.24-dev.33",
37
+ "@internal/emitter": "8.0.0-rc.24-dev.33",
38
+ "@internal/language-server": "8.0.0-rc.24-dev.33",
39
+ "@internal/migration-tools": "8.0.0-rc.24-dev.33",
40
+ "@repo/tsconfig": "8.0.0-rc.24-dev.33",
41
+ "@repo/tsdown": "8.0.0-rc.24-dev.33",
42
+ "@internal/vite-plugin-contract-emit": "8.0.0-rc.24-dev.33",
42
43
  "tsdown": "0.22.14",
43
44
  "typescript": "5.9.3"
44
45
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"output-E6F4-EMc-CqlzGlv-.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/output-E6F4-EMc.mjs"],"sourcesContent":["import { type } from \"arktype\";\n//#region src/commands/init/target-packages.ts\nconst KNOWN_TARGET_PACKAGES = [{\n\tshortName: \"postgres\",\n\taliases: [\"postgresql\"],\n\tpackageName: \"@prisma/orm-postgres\",\n\tworkspacePackageName: \"@internal/postgres\",\n\tlabel: \"PostgreSQL\",\n\tprovider: {\n\t\tname: \"postgresql\",\n\t\twrittenBy: 7\n\t},\n\tpeerPackages: [\"pg\"]\n}, {\n\tshortName: \"mongodb\",\n\taliases: [\"mongo\"],\n\tpackageName: \"@prisma/orm-mongo\",\n\tworkspacePackageName: \"@internal/mongo\",\n\tlabel: \"MongoDB\",\n\tprovider: {\n\t\tname: \"mongodb\",\n\t\twrittenBy: 6\n\t},\n\tpeerPackages: [\"mongodb\"]\n}];\nconst TARGET_SHORT_NAMES = KNOWN_TARGET_PACKAGES.map((entry) => entry.shortName);\n/** The entry `--target` names by its short name or an alias, in any case. */\nfunction findTargetByName(value) {\n\tconst name = value.toLowerCase();\n\treturn KNOWN_TARGET_PACKAGES.find((entry) => entry.shortName === name || entry.aliases.some((alias) => alias === name));\n}\n/**\n* The entry a `datasource` provider names, matched exactly: the provider itself, or the short\n* name or an alias.\n*/\nfunction findTargetByProvider(provider) {\n\treturn KNOWN_TARGET_PACKAGES.find((entry) => entry.provider.name === provider || entry.shortName === provider || entry.aliases.some((alias) => alias === provider));\n}\n/** The entry whose provider only Prisma 6 and earlier wrote; such a schema is a Prisma 6 schema. */\nfunction findPrisma6OnlyTarget(provider) {\n\treturn KNOWN_TARGET_PACKAGES.find((entry) => entry.provider.writtenBy === 6 && entry.provider.name === provider);\n}\n//#endregion\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 the short name of the target package, the value `--target`\n* takes, so consumers can round-trip the document straight into a\n* 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: type.enumerated(...TARGET_SHORT_NAMES),\n\t/** `prisma7` when an existing Prisma 7 schema is the contract source. */\n\tauthoring: \"'psl'|'typescript'|'prisma7'\",\n\t/** The starter schema init wrote, or the Prisma 7 schema it points the config at. */\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/** The Prisma 7 config moved out of Prisma 8's way; empty on a normal run. */\n\tfilesRenamed: type({\n\t\tfrom: \"string\",\n\t\tto: \"string\"\n\t}).array(),\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: under `skipped`, and under a `failed`\n\t* first install, both are empty; when a later install fails, `deps` holds\n\t* what the first install, before the questions, put in place.\n\t*/\n\tpackagesInstalled: {\n\t\tstatus: \"'installed'|'skipped'|'failed'\",\n\t\tdeps: \"string[]\",\n\t\tdevDeps: \"string[]\"\n\t},\n\tcontractEmitted: \"boolean\",\n\t/**\n\t* What the Prisma 7 path did beyond a normal run: the schema adopted, the\n\t* config renamed (or `null` when it was already `prisma7.config.*`), the\n\t* `package.json` scripts now invoking `prisma7`, and the Prisma 7 package\n\t* specs installed or listed to install. `null` on a normal run.\n\t*/\n\tprisma7: type({\n\t\tschemaPath: \"string\",\n\t\tconfigRenamedTo: \"string | null\",\n\t\tscriptsRewritten: \"string[]\",\n\t\tpackagesMoved: \"string[]\"\n\t}).or(\"null\"),\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.prisma7 !== null) {\n\t\tpushPrisma7Steps(push, {\n\t\t\t...options,\n\t\t\tprisma7: options.prisma7\n\t\t});\n\t\treturn steps;\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-8.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/** The install that precedes the Prisma 7 check failed, so nothing was written. */\nconst NEXT_STEPS_BEFORE_SCAFFOLD = [\"1. Install the project dependencies with your package manager. The install this run attempted failed before anything was written.\", \"2. Run `prisma orm init` again.\"];\nconst DB_SIGN_STEP = \"Adopt your existing database: `prisma db sign` verifies it against the contract and records the signing marker and the `db` ref. It makes no change to the database schema.\";\nconst PRISMA7_ROUTES_STEP = \"Move your routes one at a time to the Prisma 8 client in src/prisma/db.ts.\";\nconst PRISMA7_LOOP_STEP = \"After each `prisma7 migrate dev`, run `prisma contract emit` and then `prisma db sign`.\";\nconst PRISMA7_GENERATE_STEP = \"Run `prisma7 generate` so the Prisma 7 client matches the Prisma 7 CLI.\";\nconst PRISMA7_QUICK_REFERENCE_STEP = \"Open prisma-8.md for a quick reference on the transition loop and your first typed query.\";\nconst AGENT_SKILLS_STEP = \"Working with a coding agent? Run `prisma init` in this project to set up the Prisma agent skills.\";\n/**\n* The transition routine, project requirement 7: init set Prisma 8 up beside\n* Prisma 7 and stopped, so every database action here is one the user runs.\n*/\nfunction pushPrisma7Steps(push, options) {\n\tconst moved = options.prisma7.packagesMoved;\n\tconst including = moved.length === 0 ? \"\" : ` That includes ${moved.join(\", \")}.`;\n\tpush(\"Set DATABASE_URL in your environment (export it or add it to .env).\");\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.${including}`);\n\tif (options.packagesInstalled === \"skipped\") push(`Install the project dependencies with your package manager (this run skipped them)${moved.length === 0 ? \"\" : `, including ${moved.join(\", \")}`}.`);\n\tif (!options.contractEmitted) push(`Emit the contract: \\`${options.emitCommand}\\``);\n\tpush(DB_SIGN_STEP);\n\tpush(PRISMA7_ROUTES_STEP);\n\tpush(PRISMA7_LOOP_STEP);\n\tif (options.prisma7.clientMoved) push(PRISMA7_GENERATE_STEP);\n\tpush(PRISMA7_QUICK_REFERENCE_STEP);\n\tpush(AGENT_SKILLS_STEP);\n}\n//#endregion\nexport { PRISMA7_QUICK_REFERENCE_STEP as a, TARGET_SHORT_NAMES as c, findTargetByProvider as d, PRISMA7_LOOP_STEP as i, findPrisma6OnlyTarget as l, InitOutputSchema as n, buildNextSteps as o, NEXT_STEPS_BEFORE_SCAFFOLD as r, KNOWN_TARGET_PACKAGES as s, DB_SIGN_STEP as t, findTargetByName as u };\n\n//# sourceMappingURL=output-E6F4-EMc.mjs.map"],"mappings":";;AAEA,MAAM,wBAAwB,CAAC;CAC9B,WAAW;CACX,SAAS,CAAC,YAAY;CACtB,aAAa;CACb,sBAAsB;CACtB,OAAO;CACP,U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