@prisma/orm-toolchain 8.0.0-rc.12-dev.1 → 8.0.0-rc.12-dev.3
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 +4 -17
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/{ref-BK7yr-IT-Dk0sxEcL.mjs → ref-J_U8k_jN-BbJ39q0M.mjs} +79 -13
- package/dist/ref-J_U8k_jN-BbJ39q0M.mjs.map +1 -0
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/ref-BK7yr-IT-Dk0sxEcL.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
|
5
5
|
import { r as readRef } from "./refs-qwvw4_dV-Bk9tl756.mjs";
|
|
6
6
|
import { c as spaceMigrationDirectory } from "./verify-contract-spaces-CYjc343k-9_2GpPRg.mjs";
|
|
7
7
|
import { i as createScaffoldSpecifierResolver } from "./import-roots-CYpOz1XZ.mjs";
|
|
8
|
-
import { $ as formatSourceDiagnostic, A as errorLegendHumanOnly, B as errorUnexpected, C as errorContractArgConflict, Ct as
|
|
8
|
+
import { $ as formatSourceDiagnostic, A as errorLegendHumanOnly, At as runCommandAction, B as errorUnexpected, C as errorContractArgConflict, Ct as requireLiveDatabase, D as errorDriverRequired, E as errorDestructiveChanges, Et as resolveContractRefToSnapshot, F as errorPathUnreachable, Ft as snapshotVerifierFor, G as executeMigrateShowPlan, I as errorRunnerFailed, It as statusForMigrationHash, K as executeMigrationNewCommand, L as errorRuntime, Lt as targetSupportsMigrations, M as errorMigrationPackageNotFound, Mt as runMigrationCheck, N as errorMigrationPlanningFailed, Nt as runMigrationList, O as errorFileNotFound, Ot as resolveMigrationRef, P as errorNoMigrations, Pt as sanitizeErrorMessage, Q as findPackageByDirPath, R as errorTargetMigrationNotSupported, Rt as toDeclaredExtensionsFromRaw, S as errorConsentPlanMismatch, St as refuseUnknownInvariants, T as errorDatabaseConnectionRequired, Tt as resolveContractRef$1, V as executeContractEmit, X as executeRefListCommand, Y as executeRefDeleteCommand, Z as executeRefSetCommand, _t as refuseContractSpaceIntegrity, at as loadContractSpaceAggregateForCli, b as errorAdvanceRefArgConflict, bt as refuseMissingInvariantPath, c as buildMigrationSpaceGraphEntries, ct as mapContractAtError, d as checkSingleTarget, dt as migrationSpaceListEntriesFromAggregate, et as hasMigrationPath, f as chooseAction, ft as originHashForStatus, g as deriveStatusEdgeAnnotations, gt as redactUrlCredentials, h as createControlClient, ht as readMigrationRefs, i as advanceRefSafely, it as loadContractSource, j as errorMarkerMissing, k as errorHashMismatch, l as buildReadAggregate, m as computeRefAdvancementName, mt as readContractEnvelope, n as ERROR_CODE_DESTRUCTIVE_CHANGES, nt as loadAggregateIntegrityViolations, o as appliedHashesFromLedger, ot as looksLikePath, p as closeQuietly, pt as preflightRefAdvancement, q as executeMigrationPlanCommand, r as NO_REF_ADVANCEMENT, rt as loadContractRawSafely, st as mapCaughtMigrationError, t as CliStructuredError$1$1, tt as listRefsByContractHash, u as buildRefAdvancementFields, ut as maskConnectionUrl, w as errorContractValidationFailed, wt as resolveAppTargetPath, x as errorConfigValidation$1, xt as refusePackageCorruptionOnAggregate, y as enumerateCheckSpaces, yt as refuseMarkerOutsideGraph, z as errorTargetMismatch } from "./ref-J_U8k_jN-BbJ39q0M.mjs";
|
|
9
9
|
import { a as PRISMA7_QUICK_REFERENCE_STEP, i as PRISMA7_LOOP_STEP, n as InitOutputSchema, o as buildNextSteps, r as NEXT_STEPS_BEFORE_SCAFFOLD, t as DB_SIGN_STEP } from "./output-BcC8eB0h-C5bRd-aC.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -34,7 +34,7 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
|
34
34
|
import stringWidth from "string-width";
|
|
35
35
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
36
36
|
import { build } from "esbuild";
|
|
37
|
-
//#region ../../../1-framework/3-tooling/cli/dist/load-config-
|
|
37
|
+
//#region ../../../1-framework/3-tooling/cli/dist/load-config-LqnlFw0l.mjs
|
|
38
38
|
/**
|
|
39
39
|
* `isStructuredError` is the repo's own check, and it is the one that matters here: it holds the
|
|
40
40
|
* regular expression for a dotted `NAMESPACE.SUBCODE`, so only a code the protocol accepts
|
|
@@ -3202,7 +3202,7 @@ async function probeServerVersion(ctx, overrides = {}) {
|
|
|
3202
3202
|
cause: err.message,
|
|
3203
3203
|
message: `Skipped --probe-db: ${err.message}. (Run with install enabled, or install the driver yourself, then re-run \`prisma orm init --probe-db\`.)`
|
|
3204
3204
|
};
|
|
3205
|
-
const cause =
|
|
3205
|
+
const cause = redactUrlCredentials(causeMessage$2(err));
|
|
3206
3206
|
return {
|
|
3207
3207
|
kind: "connection-failed",
|
|
3208
3208
|
minVersion,
|
|
@@ -3261,19 +3261,6 @@ function causeMessage$2(err) {
|
|
|
3261
3261
|
if (err instanceof Error) return err.message;
|
|
3262
3262
|
return String(err);
|
|
3263
3263
|
}
|
|
3264
|
-
/**
|
|
3265
|
-
* Strips `user:password@` userinfo from any URL-shaped substring before
|
|
3266
|
-
* we surface the cause to the user. Mirrors `redactSecrets` in
|
|
3267
|
-
* `init.ts` — the probe path has its own redactor because the inputs
|
|
3268
|
-
* here include the raw connection string by construction (driver
|
|
3269
|
-
* errors echo the URL back).
|
|
3270
|
-
*
|
|
3271
|
-
* Exported for unit tests.
|
|
3272
|
-
*/
|
|
3273
|
-
function redactDatabaseUrlSecrets(text) {
|
|
3274
|
-
if (!text) return text;
|
|
3275
|
-
return text.replace(/([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^/@\s]+)@/g, "$1***@");
|
|
3276
|
-
}
|
|
3277
3264
|
async function defaultProbePostgres(databaseUrl, baseDir, overrides) {
|
|
3278
3265
|
const client = suppressIdleConnectionErrors(new (requirePeer("pg", baseDir, overrides)).Client({ connectionString: databaseUrl }));
|
|
3279
3266
|
try {
|
|
@@ -3897,7 +3884,7 @@ function initPresentations(inputs) {
|
|
|
3897
3884
|
* while trusting another layer to have done it is not.
|
|
3898
3885
|
*/
|
|
3899
3886
|
function redactSecrets(stderr) {
|
|
3900
|
-
return stderr
|
|
3887
|
+
return redactUrlCredentials(stderr).replace(/(\b_(?:authToken|auth|password)=)\S+/gi, "$1***");
|
|
3901
3888
|
}
|
|
3902
3889
|
/**
|
|
3903
3890
|
* Emits the contract for the project `init` has just scaffolded, by spawning
|