@prisma/orm-toolchain 8.0.0-rc.18-dev.31 → 8.0.0-rc.18-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.
- package/dist/cli-telemetry.mjs +1 -1
- package/dist/cli.mjs +10 -10
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__migration-cli.mjs +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/{domain-type-generation-DpXuDGLd-CuADX8tA.mjs → domain-type-generation-B4m774CV-WAjyhZHw.mjs} +14 -8
- package/dist/domain-type-generation-B4m774CV-WAjyhZHw.mjs.map +1 -0
- package/dist/{domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts → domain-type-generation-DZjtzrbE-BpOOD3YV.d.mts} +9 -6
- package/dist/domain-type-generation-DZjtzrbE-BpOOD3YV.d.mts.map +1 -0
- package/dist/emitter.d.mts +2 -2
- package/dist/emitter.mjs +2 -2
- package/dist/emitter__domain-type-generation.d.mts +2 -2
- package/dist/emitter__domain-type-generation.mjs +2 -2
- package/dist/{exports-BLyT8ULG-C_kH8_9c.mjs → exports-BCIlMjIW-DkUBVDzl.mjs} +5 -16
- package/dist/exports-BCIlMjIW-DkUBVDzl.mjs.map +1 -0
- package/dist/{exports-DfSHy5Id.mjs → exports-BlYTE3-J.mjs} +2 -2
- package/dist/{exports-DfSHy5Id.mjs.map → exports-BlYTE3-J.mjs.map} +1 -1
- package/dist/{exports-CiTltjML.mjs → exports-CfQzEu2x.mjs} +2 -2
- package/dist/{exports-CiTltjML.mjs.map → exports-CfQzEu2x.mjs.map} +1 -1
- package/dist/{index-wUUMOC5E.d.mts → index-tAySVPvZ.d.mts} +4 -4
- package/dist/{index-wUUMOC5E.d.mts.map → index-tAySVPvZ.d.mts.map} +1 -1
- package/dist/quick-reference-mongo.md +1 -1
- package/dist/{ref-Bn3SzQ9Z-Cy3ftpv6.mjs → ref-Bn3SzQ9Z-DHi9xcRa.mjs} +3 -3
- package/dist/{ref-Bn3SzQ9Z-Cy3ftpv6.mjs.map → ref-Bn3SzQ9Z-DHi9xcRa.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +3 -3
- package/package.json +12 -12
- package/dist/domain-type-generation-BdSOXF3O-DGGiAaNs.d.mts.map +0 -1
- package/dist/domain-type-generation-DpXuDGLd-CuADX8tA.mjs.map +0 -1
- package/dist/exports-BLyT8ULG-C_kH8_9c.mjs.map +0 -1
package/dist/cli-telemetry.mjs
CHANGED
|
@@ -42,7 +42,7 @@ async function loadProjectConfig(projectRoot) {
|
|
|
42
42
|
const orm = config["orm"];
|
|
43
43
|
if (orm === null || typeof orm !== "object" || Array.isArray(orm)) return EMPTY_PROJECT_CONFIG;
|
|
44
44
|
config = blindCast(orm);
|
|
45
|
-
const { validateOrmSection } = await import("./exports-
|
|
45
|
+
const { validateOrmSection } = await import("./exports-BlYTE3-J.mjs").then((n) => n.o);
|
|
46
46
|
const validation = validateOrmSection(config, {
|
|
47
47
|
files: [],
|
|
48
48
|
keys: {}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as expandContractInputs, c as globContractInputMatching, d as loadConfigFiles, g as requireConfigSections, h as ormConfigSection, i as evaluateConfigModule, r as buildLoadedConfig } from "./exports-
|
|
1
|
+
import { a as expandContractInputs, c as globContractInputMatching, d as loadConfigFiles, g as requireConfigSections, h as ormConfigSection, i as evaluateConfigModule, r as buildLoadedConfig } from "./exports-BlYTE3-J.mjs";
|
|
2
2
|
import { t as MigrationToolsError } from "./errors-nnIQQvmN-oeANP4Yi.mjs";
|
|
3
3
|
import { t as contractSnapshotDir } from "./contract-snapshot-store-DwEs5EOp-3qAvnEf3.mjs";
|
|
4
4
|
import { s as readMigrationsDir } from "./io-QeCr3NPS-Bk-Rfef2.mjs";
|
|
5
5
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
6
6
|
import { c as spaceMigrationDirectory, l as spaceRefsDirectory } from "./verify-contract-spaces-BFH2o5RL-CI6uhB5B.mjs";
|
|
7
7
|
import { $ as errorTargetMismatch, A as errorMarkerMissing, C as errorDriverRequired, E as errorHashMismatch, H as errorRuntime, M as errorMigrationPlanningFailed, N as errorNoMigrations, O as errorLegendHumanOnly, P as errorPathUnreachable, Q as errorTargetMigrationNotSupported, S as errorDatabaseConnectionRequired, T as errorFromCaught, U as errorSignRefsNotWritten, V as errorRunnerFailed, Y as errorStatementNeedsMigrationFile, _ as errorConfigValidation$1, a as appRefsDirFor, at as printedPath, b as errorContractValidationFailed, c as cliCommand, ct as redactUrlCredentials, d as closeQuietly, ft as runCommandAction, gt as targetSupportsMigrations, h as errorAdvanceRefArgConflict, ht as statementFlag, i as appMigrationsDirFor, it as migrationsDirFor, j as errorMigrationPackageNotFound, lt as requireLiveDatabase, m as displayPath, mt as shellQuoted, n as CliStructuredError$1$1, o as baseDirFor, ot as printedPlanCommand, p as contractPathFor, pt as selfEmitCommand, rt as maskConnectionUrl, s as chooseAction, st as readContractEnvelope, t as ActionableCliError, u as cliInvocation, v as errorContractArgConflict, w as errorFileNotFound, x as errorConvertAndDelete, y as errorContractConfigMissing } from "./caught-errors-BJYT1ZZW-CJZWDvwc.mjs";
|
|
8
|
-
import { r as getEmittedArtifactPaths } from "./exports-
|
|
8
|
+
import { r as getEmittedArtifactPaths } from "./exports-BCIlMjIW-DkUBVDzl.mjs";
|
|
9
9
|
import { r as isInSpaceHistory } from "./graph-membership-ul46Kb0W-B8HahKEu.mjs";
|
|
10
10
|
import { d as writeRef, r as readRef } from "./refs-BIzM-guE-qMvITMOL.mjs";
|
|
11
11
|
import { a as contractHashAtMarker } from "./aggregate-C0qscKli.mjs";
|
|
12
12
|
import { i as createScaffoldSpecifierResolver } from "./import-roots-DXD7fung.mjs";
|
|
13
13
|
import { o as isLiveMarkerRef } from "./ref-resolution-CCIgrFwK.mjs";
|
|
14
|
-
import { $ as refuseMarkerOutsideGraph, B as loadAggregateIntegrityViolations, D as executeMigrateShowPlan, F as formatSourceDiagnostic, G as looksLikePath, H as loadContractSource, I as hasMigrationPath, J as migrationSpaceListEntriesFromAggregate, K as mapContractAtError, L as isStatementVerb, M as executeRefListCommand, N as executeRefSetCommand, O as executeMigrationNewCommand, P as findPackageByDirPath, R as listRefsByContractHash, S as executeContractEmit, U as loadContractSourceWithStack, V as loadContractRawSafely, W as loadContractSpaceAggregateForCli, X as readMigrationRefs, Y as preflightRefAdvancement, Z as refuseContractSpaceIntegrity, _ as createControlClient, _t as statusForMigrationHash, a as RECORDED_OR_EMPTY_CONTRACT_REF_FORMS, at as resolveContractRef$1, c as appliedHashesFromLedger, ct as resolveMigrationRef, d as buildReadAggregate, dt as retryCommandFor, et as refuseMissingInvariantPath, f as buildRefAdvancementFields, g as convertAndDelete, gt as sourceWarningDiagnostic, h as contractValidationMeta, ht as snapshotVerifierFor, i as RECORDED_CONTRACT_REF_FORMS, it as resolveAppTargetPath, j as executeRefDeleteCommand, k as executeMigrationPlanCommand, m as computeRefAdvancementName, mt as runMigrationList, n as DB_UPDATE_POLICY, nt as refuseUnknownInvariants, o as advanceRefSafely, ot as resolveContractRefToSnapshot, p as checkSingleTarget, pt as runMigrationCheck, r as NO_REF_ADVANCEMENT, rt as requireDatabaseForLiveMarkerUse, t as ALL_CONTRACT_REF_FORMS, tt as refusePackageCorruptionOnAggregate, u as buildMigrationSpaceGraphEntries, v as deriveStatusEdgeAnnotations, vt as toDeclaredExtensionsFromRaw, x as enumerateCheckSpaces, yt as validateLoadedContract, z as liveMarkerUse } from "./ref-Bn3SzQ9Z-
|
|
14
|
+
import { $ as refuseMarkerOutsideGraph, B as loadAggregateIntegrityViolations, D as executeMigrateShowPlan, F as formatSourceDiagnostic, G as looksLikePath, H as loadContractSource, I as hasMigrationPath, J as migrationSpaceListEntriesFromAggregate, K as mapContractAtError, L as isStatementVerb, M as executeRefListCommand, N as executeRefSetCommand, O as executeMigrationNewCommand, P as findPackageByDirPath, R as listRefsByContractHash, S as executeContractEmit, U as loadContractSourceWithStack, V as loadContractRawSafely, W as loadContractSpaceAggregateForCli, X as readMigrationRefs, Y as preflightRefAdvancement, Z as refuseContractSpaceIntegrity, _ as createControlClient, _t as statusForMigrationHash, a as RECORDED_OR_EMPTY_CONTRACT_REF_FORMS, at as resolveContractRef$1, c as appliedHashesFromLedger, ct as resolveMigrationRef, d as buildReadAggregate, dt as retryCommandFor, et as refuseMissingInvariantPath, f as buildRefAdvancementFields, g as convertAndDelete, gt as sourceWarningDiagnostic, h as contractValidationMeta, ht as snapshotVerifierFor, i as RECORDED_CONTRACT_REF_FORMS, it as resolveAppTargetPath, j as executeRefDeleteCommand, k as executeMigrationPlanCommand, m as computeRefAdvancementName, mt as runMigrationList, n as DB_UPDATE_POLICY, nt as refuseUnknownInvariants, o as advanceRefSafely, ot as resolveContractRefToSnapshot, p as checkSingleTarget, pt as runMigrationCheck, r as NO_REF_ADVANCEMENT, rt as requireDatabaseForLiveMarkerUse, t as ALL_CONTRACT_REF_FORMS, tt as refusePackageCorruptionOnAggregate, u as buildMigrationSpaceGraphEntries, v as deriveStatusEdgeAnnotations, vt as toDeclaredExtensionsFromRaw, x as enumerateCheckSpaces, yt as validateLoadedContract, z as liveMarkerUse } from "./ref-Bn3SzQ9Z-DHi9xcRa.mjs";
|
|
15
15
|
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";
|
|
16
16
|
import { createRequire } from "node:module";
|
|
17
17
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -40,7 +40,7 @@ import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
|
|
|
40
40
|
import stringWidth from "string-width";
|
|
41
41
|
import { bold, createColors, cyan, cyanBright, dim, green, yellow } from "colorette";
|
|
42
42
|
import { build } from "esbuild";
|
|
43
|
-
//#region ../../../1-framework/3-tooling/cli/dist/load-config-
|
|
43
|
+
//#region ../../../1-framework/3-tooling/cli/dist/load-config-DAQI6U-B.mjs
|
|
44
44
|
/**
|
|
45
45
|
* `isStructuredError` is the repo's own check, and it is the one that matters here: it holds the
|
|
46
46
|
* regular expression for a dotted `NAMESPACE.SUBCODE`, so only a code the protocol accepts
|
|
@@ -4316,7 +4316,7 @@ export const contract = defineContract(
|
|
|
4316
4316
|
User: model('User', {
|
|
4317
4317
|
collection: 'users',
|
|
4318
4318
|
fields: {
|
|
4319
|
-
|
|
4319
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4320
4320
|
email: field.string(),
|
|
4321
4321
|
username: field.string().optional(),
|
|
4322
4322
|
name: field.string().optional(),
|
|
@@ -4422,26 +4422,26 @@ export const contract = defineContract(
|
|
|
4422
4422
|
User: model('User', {
|
|
4423
4423
|
collection: 'users',
|
|
4424
4424
|
fields: {
|
|
4425
|
-
|
|
4425
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4426
4426
|
email: field.string(),
|
|
4427
4427
|
username: field.string().optional(),
|
|
4428
4428
|
name: field.string().optional(),
|
|
4429
4429
|
},
|
|
4430
4430
|
relations: {
|
|
4431
|
-
posts: rel.hasMany('Post', { from: '
|
|
4431
|
+
posts: rel.hasMany('Post', { from: 'id', to: 'authorId' }),
|
|
4432
4432
|
},
|
|
4433
4433
|
}),
|
|
4434
4434
|
|
|
4435
4435
|
Post: model('Post', {
|
|
4436
4436
|
collection: 'posts',
|
|
4437
4437
|
fields: {
|
|
4438
|
-
|
|
4438
|
+
id: field.objectId().mongo({ field: '_id' }),
|
|
4439
4439
|
title: field.string(),
|
|
4440
4440
|
content: field.string().optional(),
|
|
4441
4441
|
authorId: field.objectId(),
|
|
4442
4442
|
},
|
|
4443
4443
|
relations: {
|
|
4444
|
-
author: rel.belongsTo('User', { from: 'authorId', to: '
|
|
4444
|
+
author: rel.belongsTo('User', { from: 'authorId', to: 'id' }),
|
|
4445
4445
|
},
|
|
4446
4446
|
}),
|
|
4447
4447
|
},
|
|
@@ -7224,7 +7224,7 @@ const lspCommand = defineServerCommand({
|
|
|
7224
7224
|
} },
|
|
7225
7225
|
handler: async (args, io) => {
|
|
7226
7226
|
const exitCode = await withoutClientProcessIdInArgv(async () => {
|
|
7227
|
-
const { startServer } = await import("./exports-
|
|
7227
|
+
const { startServer } = await import("./exports-CfQzEu2x.mjs");
|
|
7228
7228
|
return startServer({
|
|
7229
7229
|
stdin: io.stdin,
|
|
7230
7230
|
stdout: io.stdout,
|