@prisma/orm-toolchain 8.0.0-rc.8-dev.9 → 8.0.0-rc.8-dev.11
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.d.mts +1 -1
- package/dist/cli.mjs +15 -15
- 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-e7n1L4Vk.d.mts → db-verify-Yih5kWtB-B1kv76ec.d.mts} +3 -3
- package/dist/{db-verify-BRDzImLV-e7n1L4Vk.d.mts.map → db-verify-Yih5kWtB-B1kv76ec.d.mts.map} +1 -1
- package/dist/quick-reference-mongo.md +8 -8
- package/dist/quick-reference-postgres.md +6 -6
- package/dist/readme-mongo.md +5 -5
- package/dist/readme-postgres.md +5 -5
- package/dist/{ref-knkpu_zy-B5bc9JJw.mjs → ref-CUMSMd2D-BUVY_EPC.mjs} +3 -3
- package/dist/ref-CUMSMd2D-BUVY_EPC.mjs.map +1 -0
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/ref-knkpu_zy-B5bc9JJw.mjs.map +0 -1
package/dist/cli.d.mts
CHANGED
|
@@ -48,7 +48,7 @@ interface LoadOrmConfigOptions {
|
|
|
48
48
|
* The engine ships its own synchronous loader, but the bin owns the load: the
|
|
49
49
|
* ORM's c12 loader evaluates the module asynchronously and finalizes paths
|
|
50
50
|
* against the config file's own directory. It reads the same shape the engine
|
|
51
|
-
* does — defineConfig from `@prisma/cli-engine` with the whole Prisma
|
|
51
|
+
* does — defineConfig from `@prisma/cli-engine` with the whole Prisma ORM
|
|
52
52
|
* configuration nested as the single `orm` section.
|
|
53
53
|
*
|
|
54
54
|
* Only failures that prevent evaluation entirely are diagnostics here, and
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { r as getEmittedArtifactPaths } from "./exports-Dw2WIX63-CQgI2e_L.mjs";
|
|
|
2
2
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
3
3
|
import { c as spaceMigrationDirectory } from "./verify-contract-spaces-CrxvgpwD-D5LLXGci.mjs";
|
|
4
4
|
import { i as createScaffoldSpecifierResolver } from "./import-roots-kw_vAdpJ.mjs";
|
|
5
|
-
import { $ as loadContractRawSafely, A as errorMigrationPlanningFailed, At as statusForMigrationHash, C as errorDestructiveChanges, Ct as resolveRefAdvancementFields, D as errorLegendHumanOnly, Dt as runMigrationCheck, E as errorHashMismatch, F as errorTargetMigrationNotSupported, H as executeMigrateShowPlan, I as errorTargetMismatch, J as executeRefSetCommand, K as executeRefDeleteCommand, L as errorUnexpected, M as errorPathUnreachable, Mt as toDeclaredExtensionsFromRaw, N as errorRunnerFailed, O as errorMarkerMissing, Ot as runMigrationList, P as errorRuntime, Q as loadAggregateIntegrityViolations, R as executeContractEmit, S as errorDatabaseConnectionRequired, St as resolveMigrationRef, T as errorFileNotFound, Tt as runCommandAction, U as executeMigrationNewCommand, W as executeMigrationPlanCommand, X as hasMigrationPath, Y as findPackageByDirPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, _t as requireLiveDatabase, at as maskConnectionUrl, b as errorContractArgConflict, bt as resolveContractRefToSnapshot, ct as readContractEnvelope, d as closeQuietly, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, gt as refuseUnknownInvariants, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, j as errorNoMigrations, jt as targetSupportsMigrations, k as errorMigrationPackageNotFound, kt as sanitizeErrorMessage, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, t as CliStructuredError$1$1, tt as looksLikePath, u as chooseAction, ut as readMigrationRefs, v as errorConfigValidation$1, vt as resolveAppTargetPath, w as errorDriverRequired, x as errorContractValidationFailed, y as errorConsentPlanMismatch, yt as resolveContractRef$1 } from "./ref-
|
|
5
|
+
import { $ as loadContractRawSafely, A as errorMigrationPlanningFailed, At as statusForMigrationHash, C as errorDestructiveChanges, Ct as resolveRefAdvancementFields, D as errorLegendHumanOnly, Dt as runMigrationCheck, E as errorHashMismatch, F as errorTargetMigrationNotSupported, H as executeMigrateShowPlan, I as errorTargetMismatch, J as executeRefSetCommand, K as executeRefDeleteCommand, L as errorUnexpected, M as errorPathUnreachable, Mt as toDeclaredExtensionsFromRaw, N as errorRunnerFailed, O as errorMarkerMissing, Ot as runMigrationList, P as errorRuntime, Q as loadAggregateIntegrityViolations, R as executeContractEmit, S as errorDatabaseConnectionRequired, St as resolveMigrationRef, T as errorFileNotFound, Tt as runCommandAction, U as executeMigrationNewCommand, W as executeMigrationPlanCommand, X as hasMigrationPath, Y as findPackageByDirPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, _t as requireLiveDatabase, at as maskConnectionUrl, b as errorContractArgConflict, bt as resolveContractRefToSnapshot, ct as readContractEnvelope, d as closeQuietly, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, gt as refuseUnknownInvariants, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, j as errorNoMigrations, jt as targetSupportsMigrations, k as errorMigrationPackageNotFound, kt as sanitizeErrorMessage, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, t as CliStructuredError$1$1, tt as looksLikePath, u as chooseAction, ut as readMigrationRefs, v as errorConfigValidation$1, vt as resolveAppTargetPath, w as errorDriverRequired, x as errorContractValidationFailed, y as errorConsentPlanMismatch, yt as resolveContractRef$1 } from "./ref-CUMSMd2D-BUVY_EPC.mjs";
|
|
6
6
|
import { n as buildNextSteps, t as InitOutputSchema } from "./output-D87bBeOF-DWlKHmk9.mjs";
|
|
7
7
|
import { r as loadConfig, t as finalizeConfig } from "./exports-Cv8nMmBT.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
@@ -33,7 +33,7 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
|
33
33
|
import stringWidth from "string-width";
|
|
34
34
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
35
35
|
import { build } from "esbuild";
|
|
36
|
-
//#region ../../../1-framework/3-tooling/cli/dist/load-config-
|
|
36
|
+
//#region ../../../1-framework/3-tooling/cli/dist/load-config-BmEzNaqt.mjs
|
|
37
37
|
const MISSING_CONFIG_ACTION = {
|
|
38
38
|
kind: "run-command",
|
|
39
39
|
label: "Create a config file",
|
|
@@ -62,7 +62,7 @@ function sectionAbsentDiagnostic() {
|
|
|
62
62
|
return {
|
|
63
63
|
code: "CONFIG.FILE_NOT_FOUND",
|
|
64
64
|
severity: "error",
|
|
65
|
-
summary: "No Prisma
|
|
65
|
+
summary: "No Prisma ORM configuration was loaded",
|
|
66
66
|
why: `The orm config section is absent, so prisma.config.ts was never evaluated.`,
|
|
67
67
|
nextActions: [MISSING_CONFIG_ACTION]
|
|
68
68
|
};
|
|
@@ -71,7 +71,7 @@ function notAnObjectDiagnostic() {
|
|
|
71
71
|
return {
|
|
72
72
|
code: "CONFIG.VALIDATION_FAILED",
|
|
73
73
|
severity: "error",
|
|
74
|
-
summary: "Prisma
|
|
74
|
+
summary: "Prisma ORM configuration must be an object",
|
|
75
75
|
why: `The orm config section is not an object, so no section can be read from it.`,
|
|
76
76
|
nextActions: [{
|
|
77
77
|
kind: "edit-file",
|
|
@@ -83,7 +83,7 @@ function unreadableDiagnostic(error) {
|
|
|
83
83
|
return {
|
|
84
84
|
code: "CONFIG.VALIDATION_FAILED",
|
|
85
85
|
severity: "error",
|
|
86
|
-
summary: "Prisma
|
|
86
|
+
summary: "Prisma ORM configuration could not be inspected",
|
|
87
87
|
why: error instanceof Error ? error.message : String(error),
|
|
88
88
|
nextActions: [{
|
|
89
89
|
kind: "edit-file",
|
|
@@ -246,7 +246,7 @@ function normalizeError(error) {
|
|
|
246
246
|
*
|
|
247
247
|
* An `InternalError` is the one thing this boundary does not convert. Its own contract says never
|
|
248
248
|
* to catch it outside the outermost boundary: it means an invariant broke, which is a bug in
|
|
249
|
-
* Prisma
|
|
249
|
+
* Prisma ORM rather than something the user did. Re-throwing lets the engine settle it as a bug
|
|
250
250
|
* at exit 1, where converting it would report the same number as a bad connection string.
|
|
251
251
|
*/
|
|
252
252
|
function isRecord(value) {
|
|
@@ -3712,7 +3712,7 @@ function mergeGitattributes(existing, required) {
|
|
|
3712
3712
|
return `${existing}${existing.length === 0 || existing.endsWith("\n") ? "" : "\n"}${missing.join("\n")}\n`;
|
|
3713
3713
|
}
|
|
3714
3714
|
/**
|
|
3715
|
-
* The minimal `.gitignore` lines a Prisma
|
|
3715
|
+
* The minimal `.gitignore` lines a Prisma ORM scaffold needs (FR3.3).
|
|
3716
3716
|
* Order matches what Node tooling typically writes today.
|
|
3717
3717
|
*
|
|
3718
3718
|
* `node_modules/` first because it's the byte-largest miss; `dist/`
|
|
@@ -4220,7 +4220,7 @@ const ENV_EXAMPLE_FILE = ".env.example";
|
|
|
4220
4220
|
* one of these is the destructive act consent is asked for.
|
|
4221
4221
|
*
|
|
4222
4222
|
* `.env.example` is written the same way but deliberately left out: it is a
|
|
4223
|
-
* conventional filename in projects that have never seen Prisma
|
|
4223
|
+
* conventional filename in projects that have never seen Prisma ORM, and a
|
|
4224
4224
|
* consent token demanded for it would fire on first runs. The scaffold warns
|
|
4225
4225
|
* when it replaces one instead.
|
|
4226
4226
|
*/
|
|
@@ -4325,7 +4325,7 @@ function planScaffold(ctx) {
|
|
|
4325
4325
|
content: envExampleContent(inputs.target)
|
|
4326
4326
|
}
|
|
4327
4327
|
];
|
|
4328
|
-
if (existsSync(join(cwd, ENV_EXAMPLE_FILE))) warnings.push(`${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma
|
|
4328
|
+
if (existsSync(join(cwd, ENV_EXAMPLE_FILE))) warnings.push(`${ENV_EXAMPLE_FILE} already existed and was replaced with the Prisma ORM template.`);
|
|
4329
4329
|
const filesToDelete = inputs.reinit ? [...findStaleArtifacts(cwd, schemaDir)] : [];
|
|
4330
4330
|
const dirsToDelete = legacySkillDirs().filter((rel) => existsSync(join(cwd, rel)));
|
|
4331
4331
|
if (inputs.writeEnv) if (existsSync(join(cwd, ".env"))) warnings.push(".env already exists; leaving it untouched. Compare with .env.example for any new keys.");
|
|
@@ -4663,7 +4663,7 @@ function pnpmLeakedASpecifier(failure) {
|
|
|
4663
4663
|
function fallbackWarning(failure) {
|
|
4664
4664
|
const firstLine = redactSecrets(metaString(failure, "stderrTail")).trim().split("\n")[0] ?? "";
|
|
4665
4665
|
return [
|
|
4666
|
-
"pnpm could not install: a published Prisma
|
|
4666
|
+
"pnpm could not install: a published Prisma ORM dependency leaked a `workspace:*` or `catalog:` specifier.",
|
|
4667
4667
|
"Falling back to npm so init can complete.",
|
|
4668
4668
|
firstLine === "" ? "" : ` pnpm error: ${firstLine}`,
|
|
4669
4669
|
"Both installs ran under npm, which writes a package-lock.json beside the pnpm lockfile — delete whichever of the two you do not want to keep.",
|
|
@@ -4773,7 +4773,7 @@ function causeMessage(error) {
|
|
|
4773
4773
|
}
|
|
4774
4774
|
const createInitCommand = (injected) => defineOrmCommand({
|
|
4775
4775
|
help: {
|
|
4776
|
-
summary: "Initialize a new Prisma
|
|
4776
|
+
summary: "Initialize a new Prisma ORM project",
|
|
4777
4777
|
description: "Scaffolds config, schema, and runtime files, installs dependencies,\nand emits the contract. Gets you from zero to typed queries in one step.\n\nRun it interactively for a guided setup, or supply --target and --authoring\nfor a fully scriptable run (CI, AI coding agents, automation).",
|
|
4778
4778
|
examples: [
|
|
4779
4779
|
"orm init",
|
|
@@ -4868,7 +4868,7 @@ const createInitCommand = (injected) => defineOrmCommand({
|
|
|
4868
4868
|
const validated = InitOutputSchema(document);
|
|
4869
4869
|
if (validated instanceof type.errors) return notOk$1(new CliStructuredError$1("CLI.INIT_INVALID_OUTPUT_DOCUMENT", "Init produced an invalid output document", {
|
|
4870
4870
|
why: `The success document failed schema validation: ${String(validated)}`,
|
|
4871
|
-
nextActions: [chooseAction("This is a bug in Prisma
|
|
4871
|
+
nextActions: [chooseAction("This is a bug in Prisma ORM. Please report it with `-v` output.")],
|
|
4872
4872
|
docsUrl: docsUrlFor("CLI.INIT_INVALID_OUTPUT_DOCUMENT")
|
|
4873
4873
|
}));
|
|
4874
4874
|
return ok$1(ctx.present({
|
|
@@ -4966,8 +4966,8 @@ function signalExitCode(reason) {
|
|
|
4966
4966
|
}
|
|
4967
4967
|
const lspCommand = defineServerCommand({
|
|
4968
4968
|
help: {
|
|
4969
|
-
summary: "Start the Prisma
|
|
4970
|
-
description: "Launches a Language Server Protocol server that publishes PSL parse diagnostics\nand handles whole-document PSL formatting for the schema inputs declared in\nyour config (contract.source.inputs). Formatting uses the Prisma
|
|
4969
|
+
summary: "Start the Prisma ORM language server",
|
|
4970
|
+
description: "Launches a Language Server Protocol server that publishes PSL parse diagnostics\nand handles whole-document PSL formatting for the schema inputs declared in\nyour config (contract.source.inputs). Formatting uses the Prisma ORM PSL\nformatter and the formatter block from the project config.\nCommunicates over stdio; intended to be spawned by an\neditor, not run interactively. The server keeps running until the editor client\ndisconnects.",
|
|
4971
4971
|
examples: ["lsp"]
|
|
4972
4972
|
},
|
|
4973
4973
|
args: { flags: {
|
|
@@ -9414,7 +9414,7 @@ const ORM_CONFIG_FILENAME = "prisma.config.ts";
|
|
|
9414
9414
|
* The engine ships its own synchronous loader, but the bin owns the load: the
|
|
9415
9415
|
* ORM's c12 loader evaluates the module asynchronously and finalizes paths
|
|
9416
9416
|
* against the config file's own directory. It reads the same shape the engine
|
|
9417
|
-
* does — defineConfig from `@prisma/cli-engine` with the whole Prisma
|
|
9417
|
+
* does — defineConfig from `@prisma/cli-engine` with the whole Prisma ORM
|
|
9418
9418
|
* configuration nested as the single `orm` section.
|
|
9419
9419
|
*
|
|
9420
9420
|
* Only failures that prevent evaluation entirely are diagnostics here, and
|