@prisma-next/cli 0.16.0-dev.2 → 0.16.0-dev.20
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/README.md +31 -32
- package/dist/cli.mjs +13 -13
- package/dist/{client-KuBQftxz.mjs → client-DeJvLD2h.mjs} +4 -5
- package/dist/{client-KuBQftxz.mjs.map → client-DeJvLD2h.mjs.map} +1 -1
- package/dist/{command-helpers-Cpq44aVa.mjs → command-helpers-CVn3U9Uz.mjs} +12 -4
- package/dist/command-helpers-CVn3U9Uz.mjs.map +1 -0
- package/dist/commands/contract-emit.mjs +1 -1
- package/dist/commands/contract-infer.mjs +1 -1
- package/dist/commands/db-init.d.mts.map +1 -1
- package/dist/commands/db-init.mjs +5 -4
- package/dist/commands/db-init.mjs.map +1 -1
- package/dist/commands/db-schema.mjs +3 -3
- package/dist/commands/db-sign.d.mts.map +1 -1
- package/dist/commands/db-sign.mjs +8 -10
- package/dist/commands/db-sign.mjs.map +1 -1
- package/dist/commands/db-update.d.mts.map +1 -1
- package/dist/commands/db-update.mjs +11 -13
- package/dist/commands/db-update.mjs.map +1 -1
- package/dist/commands/db-verify.mjs +1 -1
- package/dist/commands/migrate.d.mts.map +1 -1
- package/dist/commands/migrate.mjs +9 -9
- package/dist/commands/migrate.mjs.map +1 -1
- package/dist/commands/migration-check.d.mts +3 -1
- package/dist/commands/migration-check.d.mts.map +1 -1
- package/dist/commands/migration-check.mjs +1 -1
- package/dist/commands/migration-graph.mjs +4 -4
- package/dist/commands/migration-list.d.mts.map +1 -1
- package/dist/commands/migration-list.mjs +1 -1
- package/dist/commands/migration-log.mjs +1 -1
- package/dist/commands/migration-new.d.mts.map +1 -1
- package/dist/commands/migration-new.mjs +15 -39
- package/dist/commands/migration-new.mjs.map +1 -1
- package/dist/commands/migration-plan.d.mts +3 -4
- package/dist/commands/migration-plan.d.mts.map +1 -1
- package/dist/commands/migration-plan.mjs +1 -1
- package/dist/commands/migration-show.mjs +4 -4
- package/dist/commands/migration-show.mjs.map +1 -1
- package/dist/commands/migration-status.d.mts.map +1 -1
- package/dist/commands/migration-status.mjs +1 -1
- package/dist/commands/ref.d.mts.map +1 -1
- package/dist/commands/ref.mjs +13 -18
- package/dist/commands/ref.mjs.map +1 -1
- package/dist/commands/telemetry/index.mjs +1 -1
- package/dist/contract-at-errors-C-l4-JEY.mjs +36 -0
- package/dist/contract-at-errors-C-l4-JEY.mjs.map +1 -0
- package/dist/{contract-emit-CgnXSANN.mjs → contract-emit-BMJiefhy.mjs} +3 -3
- package/dist/{contract-emit-CgnXSANN.mjs.map → contract-emit-BMJiefhy.mjs.map} +1 -1
- package/dist/{contract-emit-cJQBlvGb.mjs → contract-emit-DJ8SRI7L.mjs} +3 -4
- package/dist/{contract-emit-cJQBlvGb.mjs.map → contract-emit-DJ8SRI7L.mjs.map} +1 -1
- package/dist/{contract-infer-Cg8evbeg.mjs → contract-infer-_tstfy3k.mjs} +3 -3
- package/dist/{contract-infer-Cg8evbeg.mjs.map → contract-infer-_tstfy3k.mjs.map} +1 -1
- package/dist/{contract-space-aggregate-loader-D_3VeHVb.mjs → contract-space-aggregate-loader-hPVymNLw.mjs} +2 -2
- package/dist/{contract-space-aggregate-loader-D_3VeHVb.mjs.map → contract-space-aggregate-loader-hPVymNLw.mjs.map} +1 -1
- package/dist/{db-verify-BEclUzki.mjs → db-verify-3WM8y323.mjs} +4 -4
- package/dist/{db-verify-BEclUzki.mjs.map → db-verify-3WM8y323.mjs.map} +1 -1
- package/dist/exports/control-api.mjs +2 -2
- package/dist/exports/index.mjs +2 -2
- package/dist/exports/init-output.d.mts.map +1 -1
- package/dist/exports/init-output.mjs +1 -1
- package/dist/{format-DAUAZqPt.mjs → format-CFLZv_zU.mjs} +6 -5
- package/dist/format-CFLZv_zU.mjs.map +1 -0
- package/dist/{framework-components-CnbUbiJw.mjs → framework-components-VMQJbAwl.mjs} +2 -2
- package/dist/{framework-components-CnbUbiJw.mjs.map → framework-components-VMQJbAwl.mjs.map} +1 -1
- package/dist/{init-C3JhkHg-.mjs → init-XycYREvA.mjs} +55 -47
- package/dist/init-XycYREvA.mjs.map +1 -0
- package/dist/{inspect-live-schema-CX7EA5C3.mjs → inspect-live-schema-xS6VqjHE.mjs} +3 -3
- package/dist/{inspect-live-schema-CX7EA5C3.mjs.map → inspect-live-schema-xS6VqjHE.mjs.map} +1 -1
- package/dist/{migration-check-VqN-iTcx.mjs → migration-check-C_4gozCn.mjs} +53 -26
- package/dist/migration-check-C_4gozCn.mjs.map +1 -0
- package/dist/{migration-command-scaffold-CRyYrHZ9.mjs → migration-command-scaffold-D9JkLq_M.mjs} +3 -3
- package/dist/{migration-command-scaffold-CRyYrHZ9.mjs.map → migration-command-scaffold-D9JkLq_M.mjs.map} +1 -1
- package/dist/{migration-graph-command-render-B83xrnNy.mjs → migration-graph-command-render-DgQg5App.mjs} +3 -3
- package/dist/migration-graph-command-render-DgQg5App.mjs.map +1 -0
- package/dist/{migration-list-BAKujUjh.mjs → migration-list-BwEwRv25.mjs} +6 -6
- package/dist/migration-list-BwEwRv25.mjs.map +1 -0
- package/dist/{migration-log-C_xam2HZ.mjs → migration-log-C3RMIsUI.mjs} +4 -4
- package/dist/{migration-log-C_xam2HZ.mjs.map → migration-log-C3RMIsUI.mjs.map} +1 -1
- package/dist/{migration-path-target-DpPTsRCg.mjs → migration-path-target-C0TQuV5n.mjs} +2 -2
- package/dist/{migration-path-target-DpPTsRCg.mjs.map → migration-path-target-C0TQuV5n.mjs.map} +1 -1
- package/dist/{migration-plan-CreSVtWZ.mjs → migration-plan-BzxmK_do.mjs} +58 -68
- package/dist/migration-plan-BzxmK_do.mjs.map +1 -0
- package/dist/{migration-status-DYErXpyF.mjs → migration-status-ChQKA6Jf.mjs} +11 -11
- package/dist/migration-status-ChQKA6Jf.mjs.map +1 -0
- package/dist/{output-mEQ74_nd.mjs → output-DWNYqZGc.mjs} +5 -6
- package/dist/output-DWNYqZGc.mjs.map +1 -0
- package/dist/{ref-advancement-BkXlikCA.mjs → ref-advancement-BCz7X7qJ.mjs} +13 -6
- package/dist/ref-advancement-BCz7X7qJ.mjs.map +1 -0
- package/dist/{telemetry-DVr6RFnq.mjs → telemetry-BEyNMfco.mjs} +2 -2
- package/dist/{telemetry-DVr6RFnq.mjs.map → telemetry-BEyNMfco.mjs.map} +1 -1
- package/dist/{verify-CgDVZjhc.mjs → verify-C4RazDE1.mjs} +2 -2
- package/dist/{verify-CgDVZjhc.mjs.map → verify-C4RazDE1.mjs.map} +1 -1
- package/package.json +21 -21
- package/src/commands/db-init.ts +1 -0
- package/src/commands/db-sign.ts +6 -4
- package/src/commands/db-update.ts +14 -6
- package/src/commands/init/hygiene-gitattributes.ts +37 -21
- package/src/commands/init/init.ts +6 -6
- package/src/commands/init/output.ts +4 -5
- package/src/commands/init/reinit-cleanup.ts +16 -17
- package/src/commands/migrate.ts +2 -1
- package/src/commands/migration-check.ts +71 -33
- package/src/commands/migration-list.ts +1 -5
- package/src/commands/migration-new.ts +16 -40
- package/src/commands/migration-plan.ts +59 -83
- package/src/commands/migration-show.ts +1 -1
- package/src/commands/migration-status.ts +5 -6
- package/src/commands/ref.ts +19 -14
- package/src/control-api/client.ts +0 -1
- package/src/control-api/operations/contract-emit.ts +0 -1
- package/src/control-api/operations/format.ts +4 -3
- package/src/utils/cli-errors.ts +13 -5
- package/src/utils/contract-at-errors.ts +13 -22
- package/src/utils/contract-space-seed-phase.ts +8 -6
- package/src/utils/formatters/migration-graph-labels.ts +1 -2
- package/src/utils/formatters/migration-list-data-column.ts +1 -2
- package/src/utils/plan-resolution.ts +7 -10
- package/src/utils/ref-advancement.ts +22 -3
- package/dist/command-helpers-Cpq44aVa.mjs.map +0 -1
- package/dist/contract-at-errors-D9gEjYtg.mjs +0 -42
- package/dist/contract-at-errors-D9gEjYtg.mjs.map +0 -1
- package/dist/format-DAUAZqPt.mjs.map +0 -1
- package/dist/init-C3JhkHg-.mjs.map +0 -1
- package/dist/migration-check-VqN-iTcx.mjs.map +0 -1
- package/dist/migration-graph-command-render-B83xrnNy.mjs.map +0 -1
- package/dist/migration-list-BAKujUjh.mjs.map +0 -1
- package/dist/migration-plan-CreSVtWZ.mjs.map +0 -1
- package/dist/migration-status-DYErXpyF.mjs.map +0 -1
- package/dist/output-mEQ74_nd.mjs.map +0 -1
- package/dist/ref-advancement-BkXlikCA.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -210,16 +210,16 @@ Success:
|
|
|
210
210
|
```text
|
|
211
211
|
✔ Database marker and schema match contract
|
|
212
212
|
verification: marker + schema
|
|
213
|
-
storageHash:
|
|
214
|
-
profileHash:
|
|
213
|
+
storageHash: abc123...
|
|
214
|
+
profileHash: def456...
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
Marker-only success:
|
|
218
218
|
```text
|
|
219
219
|
✔ Database marker matches contract
|
|
220
220
|
verification: marker only (--marker-only)
|
|
221
|
-
storageHash:
|
|
222
|
-
profileHash:
|
|
221
|
+
storageHash: abc123...
|
|
222
|
+
profileHash: def456...
|
|
223
223
|
|
|
224
224
|
⚠ Schema verification skipped because --marker-only was provided
|
|
225
225
|
```
|
|
@@ -242,12 +242,12 @@ Schema drift failure:
|
|
|
242
242
|
"summary": "Database marker and schema match contract",
|
|
243
243
|
"mode": "full",
|
|
244
244
|
"contract": {
|
|
245
|
-
"storageHash": "
|
|
246
|
-
"profileHash": "
|
|
245
|
+
"storageHash": "abc123...",
|
|
246
|
+
"profileHash": "def456..."
|
|
247
247
|
},
|
|
248
248
|
"marker": {
|
|
249
|
-
"storageHash": "
|
|
250
|
-
"profileHash": "
|
|
249
|
+
"storageHash": "abc123...",
|
|
250
|
+
"profileHash": "def456..."
|
|
251
251
|
},
|
|
252
252
|
"target": {
|
|
253
253
|
"expected": "postgres"
|
|
@@ -584,25 +584,25 @@ export default defineConfig({
|
|
|
584
584
|
Success (new marker):
|
|
585
585
|
```
|
|
586
586
|
✔ Database signed (marker created)
|
|
587
|
-
storageHash:
|
|
588
|
-
profileHash:
|
|
587
|
+
storageHash: abc123...
|
|
588
|
+
profileHash: def456...
|
|
589
589
|
Total time: 42ms
|
|
590
590
|
```
|
|
591
591
|
|
|
592
592
|
Success (updated marker):
|
|
593
593
|
```
|
|
594
|
-
✔ Database signed (marker updated from
|
|
595
|
-
storageHash:
|
|
596
|
-
profileHash:
|
|
597
|
-
previous storageHash:
|
|
594
|
+
✔ Database signed (marker updated from old-hash)
|
|
595
|
+
storageHash: abc123...
|
|
596
|
+
profileHash: def456...
|
|
597
|
+
previous storageHash: old-hash
|
|
598
598
|
Total time: 42ms
|
|
599
599
|
```
|
|
600
600
|
|
|
601
601
|
Success (already up-to-date):
|
|
602
602
|
```
|
|
603
603
|
✔ Database already signed with this contract
|
|
604
|
-
storageHash:
|
|
605
|
-
profileHash:
|
|
604
|
+
storageHash: abc123...
|
|
605
|
+
profileHash: def456...
|
|
606
606
|
Total time: 42ms
|
|
607
607
|
```
|
|
608
608
|
|
|
@@ -619,8 +619,8 @@ Failure (schema mismatch):
|
|
|
619
619
|
"ok": true,
|
|
620
620
|
"summary": "Database signed (marker created)",
|
|
621
621
|
"contract": {
|
|
622
|
-
"storageHash": "
|
|
623
|
-
"profileHash": "
|
|
622
|
+
"storageHash": "abc123...",
|
|
623
|
+
"profileHash": "def456..."
|
|
624
624
|
},
|
|
625
625
|
"target": {
|
|
626
626
|
"expected": "postgres",
|
|
@@ -644,10 +644,10 @@ For updated markers:
|
|
|
644
644
|
```json
|
|
645
645
|
{
|
|
646
646
|
"ok": true,
|
|
647
|
-
"summary": "Database signed (marker updated from
|
|
647
|
+
"summary": "Database signed (marker updated from old-hash)",
|
|
648
648
|
"contract": {
|
|
649
|
-
"storageHash": "
|
|
650
|
-
"profileHash": "
|
|
649
|
+
"storageHash": "abc123...",
|
|
650
|
+
"profileHash": "def456..."
|
|
651
651
|
},
|
|
652
652
|
"target": {
|
|
653
653
|
"expected": "postgres",
|
|
@@ -657,8 +657,8 @@ For updated markers:
|
|
|
657
657
|
"created": false,
|
|
658
658
|
"updated": true,
|
|
659
659
|
"previous": {
|
|
660
|
-
"storageHash": "
|
|
661
|
-
"profileHash": "
|
|
660
|
+
"storageHash": "old-hash",
|
|
661
|
+
"profileHash": "old-profile-hash"
|
|
662
662
|
}
|
|
663
663
|
},
|
|
664
664
|
"meta": {
|
|
@@ -803,7 +803,7 @@ prisma-next db init ➜ Bootstrap a database to match the current contract
|
|
|
803
803
|
├─ Create index user_email_idx on user [additive]
|
|
804
804
|
└─ Add foreign key post_userId_fkey on post [additive]
|
|
805
805
|
|
|
806
|
-
Destination hash:
|
|
806
|
+
Destination hash: abc123...
|
|
807
807
|
|
|
808
808
|
This is a dry run. No changes were applied.
|
|
809
809
|
Run without --dry-run to apply changes.
|
|
@@ -822,7 +822,7 @@ Applying migration plan and verifying schema...
|
|
|
822
822
|
→ Create index user_email_idx on user...
|
|
823
823
|
→ Add foreign key post_userId_fkey on post...
|
|
824
824
|
✔ Applied 4 operation(s)
|
|
825
|
-
Marker written:
|
|
825
|
+
Marker written: abc123...
|
|
826
826
|
```
|
|
827
827
|
|
|
828
828
|
**Output Format (JSON):**
|
|
@@ -834,7 +834,7 @@ Applying migration plan and verifying schema...
|
|
|
834
834
|
"plan": {
|
|
835
835
|
"targetId": "postgres",
|
|
836
836
|
"destination": {
|
|
837
|
-
"storageHash": "
|
|
837
|
+
"storageHash": "abc123..."
|
|
838
838
|
},
|
|
839
839
|
"operations": [
|
|
840
840
|
{
|
|
@@ -849,7 +849,7 @@ Applying migration plan and verifying schema...
|
|
|
849
849
|
"operationsExecuted": 4
|
|
850
850
|
},
|
|
851
851
|
"marker": {
|
|
852
|
-
"storageHash": "
|
|
852
|
+
"storageHash": "abc123..."
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
```
|
|
@@ -952,15 +952,14 @@ prisma-next migration plan [--config <path>] [--name <slug>] [--from <contract>]
|
|
|
952
952
|
2. Reads existing migrations from `config.migrations.dir` (default: `migrations/`)
|
|
953
953
|
3. Determines the starting point: `--from <contract>` if provided, otherwise the `db` ref (greenfield when absent)
|
|
954
954
|
4. Diffs the starting contract against the destination using the target's migration planner
|
|
955
|
-
5. Scaffolds a new migration package: `migration.ts` (containing `placeholder(...)` lambdas for any data transforms), `migration.json` (with a content-addressed `migrationHash` over the planned ops, or over `[]` when the planner could not lower any calls because of placeholders), `ops.json` (the planned ops, or `[]` in the placeholder-blocked case)
|
|
955
|
+
5. Scaffolds a new migration package: `migration.ts` (containing `placeholder(...)` lambdas for any data transforms), `migration.json` (with a content-addressed `migrationHash` over the planned ops, or over `[]` when the planner could not lower any calls because of placeholders), and `ops.json` (the planned ops, or `[]` in the placeholder-blocked case). The bookend contracts are written write-if-absent into the shared snapshot store at `migrations/snapshots/<hex>/contract.{json,d.ts}`. The package is **always** fully attested — there is no draft state on disk.
|
|
956
956
|
6. If the plan has unfilled `placeholder(...)` slots, the command returns a successful `pendingPlaceholders` envelope (a warning, not a failure) asking the developer to fill in the slots before re-emitting. The on-disk `ops.json` is `[]` and `migrationHash` is the hash of `(metadata, [])`, so applying the migration as-written will not advance the storage hash to the intended destination — the runner's destination-hash post-check surfaces this as a state mismatch. After filling in the placeholders, run `node migrations/<dir>/migration.ts` to re-emit `ops.json` and the corresponding `migrationHash`. `PN-MIG-2001` is raised only at self-emit time when a slot is still unfilled.
|
|
957
957
|
|
|
958
958
|
**Outputs:**
|
|
959
959
|
- `migrations/<dir>/migration.ts` — editable migration source (with `placeholder(...)` slots when the planner inserted them)
|
|
960
960
|
- `migrations/<dir>/migration.json` — fully attested metadata (`migrationHash: string`, never null)
|
|
961
961
|
- `migrations/<dir>/ops.json` — planned operations (empty list `[]` if placeholders blocked the planner)
|
|
962
|
-
- `migrations/<
|
|
963
|
-
- `migrations/<dir>/end-contract.{json,d.ts}` — bookend from the "to" side
|
|
962
|
+
- `migrations/snapshots/<hex>/contract.{json,d.ts}` — bookend contracts, written write-if-absent, keyed by each contract's storage hash (one entry for `from` when applicable, one for `to`)
|
|
964
963
|
|
|
965
964
|
**Branching with `--from` and `--to`:** Use `--from` to create a migration edge from a specific contract hash instead of the default starting point. Use `--to` to plan toward any resolved contract — including a rollback via `<migration-dir>^` — instead of the emitted contract. This enables branched migration graphs and arbitrary-target (including reverse) edges without editing contract source.
|
|
966
965
|
|
|
@@ -1028,7 +1027,7 @@ prisma-next migrate [--db <url>] [--to <contract>] [--config <path>] [--json] [-
|
|
|
1028
1027
|
|
|
1029
1028
|
**Options:**
|
|
1030
1029
|
- `--db <url>`: Database connection string (optional; defaults to `config.db.connection`)
|
|
1031
|
-
- `--to <contract>`: Target contract reference (hash, prefix, ref name, migration directory, `<dir>^`, or filesystem path). When omitted, applies toward the emitted `contract.json`. When `--to` resolves to an on-disk graph node, verification and apply use that
|
|
1030
|
+
- `--to <contract>`: Target contract reference (hash, prefix, ref name, migration directory, `<dir>^`, or filesystem path). When omitted, applies toward the emitted `contract.json`. When `--to` resolves to an on-disk graph node, verification and apply use the snapshot store entry for that node's hash — so a planned rollback or other arbitrary-target edge applies without editing contract source.
|
|
1032
1031
|
- `--ref <name>`: Target a named ref from `migrations/refs.json` instead of the current contract hash
|
|
1033
1032
|
- `--config <path>`: Path to `prisma-next.config.ts`
|
|
1034
1033
|
- `--json`: Output as JSON object
|
|
@@ -1085,7 +1084,7 @@ prisma-next ref delete <name> # Delete a ref
|
|
|
1085
1084
|
|
|
1086
1085
|
**Ref naming rules:** Lowercase alphanumeric with hyphens or forward slashes (e.g., `staging`, `prod/us-east`). No `.` or `..` segments.
|
|
1087
1086
|
|
|
1088
|
-
**Ref values:** Must be valid contract hashes (
|
|
1087
|
+
**Ref values:** Must be valid contract hashes (64 lowercase hex chars, or the `empty` sentinel).
|
|
1089
1088
|
|
|
1090
1089
|
**Atomic writes:** `refs.json` is written atomically via temp file + rename to prevent corruption from concurrent writes.
|
|
1091
1090
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as isCI, O as formatCommandHelp, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, k as formatRootHelp, l as setCommandDescriptions, m as deriveCanPrompt, t as addGlobalOptions, u as setCommandExamples, v as installShutdownHandlers } from "./command-helpers-
|
|
3
|
-
import { t as createContractEmitCommand } from "./contract-emit-
|
|
4
|
-
import { t as createContractInferCommand } from "./contract-infer-
|
|
2
|
+
import { D as isCI, O as formatCommandHelp, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, k as formatRootHelp, l as setCommandDescriptions, m as deriveCanPrompt, t as addGlobalOptions, u as setCommandExamples, v as installShutdownHandlers } from "./command-helpers-CVn3U9Uz.mjs";
|
|
3
|
+
import { t as createContractEmitCommand } from "./contract-emit-BMJiefhy.mjs";
|
|
4
|
+
import { t as createContractInferCommand } from "./contract-infer-_tstfy3k.mjs";
|
|
5
5
|
import { createDbInitCommand } from "./commands/db-init.mjs";
|
|
6
6
|
import { createDbSchemaCommand } from "./commands/db-schema.mjs";
|
|
7
7
|
import { createDbSignCommand } from "./commands/db-sign.mjs";
|
|
8
8
|
import { createDbUpdateCommand } from "./commands/db-update.mjs";
|
|
9
|
-
import { t as createDbVerifyCommand } from "./db-verify-
|
|
10
|
-
import { t as createFormatCommand } from "./format-
|
|
11
|
-
import { t as createMigrationListCommand } from "./migration-list-
|
|
9
|
+
import { t as createDbVerifyCommand } from "./db-verify-3WM8y323.mjs";
|
|
10
|
+
import { t as createFormatCommand } from "./format-CFLZv_zU.mjs";
|
|
11
|
+
import { t as createMigrationListCommand } from "./migration-list-BwEwRv25.mjs";
|
|
12
12
|
import { createMigrateCommand } from "./commands/migrate.mjs";
|
|
13
|
-
import { t as createMigrationCheckCommand } from "./migration-check-
|
|
13
|
+
import { t as createMigrationCheckCommand } from "./migration-check-C_4gozCn.mjs";
|
|
14
14
|
import { createMigrationGraphCommand } from "./commands/migration-graph.mjs";
|
|
15
|
-
import { t as createMigrationLogCommand } from "./migration-log-
|
|
15
|
+
import { t as createMigrationLogCommand } from "./migration-log-C3RMIsUI.mjs";
|
|
16
16
|
import { createMigrationNewCommand } from "./commands/migration-new.mjs";
|
|
17
|
-
import { t as createMigrationPlanCommand } from "./migration-plan-
|
|
17
|
+
import { t as createMigrationPlanCommand } from "./migration-plan-BzxmK_do.mjs";
|
|
18
18
|
import { createMigrationShowCommand } from "./commands/migration-show.mjs";
|
|
19
|
-
import { r as createMigrationStatusCommand } from "./migration-status-
|
|
19
|
+
import { r as createMigrationStatusCommand } from "./migration-status-ChQKA6Jf.mjs";
|
|
20
20
|
import { createRefCommand } from "./commands/ref.mjs";
|
|
21
|
-
import { t as createTelemetryCommand } from "./telemetry-
|
|
21
|
+
import { t as createTelemetryCommand } from "./telemetry-BEyNMfco.mjs";
|
|
22
22
|
import { Command } from "commander";
|
|
23
23
|
import { DEFAULT_CONTRACT_SOURCE_DIR } from "@prisma-next/config/config-types";
|
|
24
24
|
import { ensureInstallationId, readUserConfig, resolveGating, runTelemetry, userConfigPath } from "@prisma-next/cli-telemetry";
|
|
25
25
|
import { distance } from "closest-match";
|
|
26
26
|
import { fileURLToPath } from "node:url";
|
|
27
27
|
//#region package.json
|
|
28
|
-
var version = "0.16.0-dev.
|
|
28
|
+
var version = "0.16.0-dev.20";
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/commands/init/templates/code-templates.ts
|
|
31
31
|
function targetPackageName(target) {
|
|
@@ -294,7 +294,7 @@ Exit codes (see CLI Style Guide § Exit Codes):
|
|
|
294
294
|
"prisma-next init --no-skill # skip the skills install (air-gapped / restricted env)"
|
|
295
295
|
]);
|
|
296
296
|
return addGlobalOptions(command).option("--target <db>", "Database target: postgres or mongodb").option("--authoring <style>", "Schema authoring style: psl or typescript").option("--schema-path <path>", `Where to write the starter schema (default: ${defaultSchemaPath("psl")})`).option("--force", "Overwrite an existing scaffold without prompting").option("--write-env", "Write a .env file from .env.example (gitignored; default: only .env.example)").option("--probe-db", "Connect to DATABASE_URL once and check the server version against the target minimum (opt-in; off by default)").option("--strict-probe", "Treat a failed --probe-db as fatal (no-op without --probe-db; init is offline-by-default)").option("--no-install", "Skip dependency installation and contract emission").option("--no-skill", "Skip Prisma Next skills install (air-gapped CI, restricted registries, etc.)").action(async (options) => {
|
|
297
|
-
const { runInit } = await import("./init-
|
|
297
|
+
const { runInit } = await import("./init-XycYREvA.mjs");
|
|
298
298
|
const flags = parseGlobalFlagsOrExit(options);
|
|
299
299
|
const canPrompt = deriveCanPrompt({
|
|
300
300
|
flagsInteractive: flags.interactive,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as CliStructuredError } from "./command-helpers-
|
|
2
|
-
import { t as assertFrameworkComponentsCompatible } from "./framework-components-
|
|
1
|
+
import { F as CliStructuredError } from "./command-helpers-CVn3U9Uz.mjs";
|
|
2
|
+
import { t as assertFrameworkComponentsCompatible } from "./framework-components-VMQJbAwl.mjs";
|
|
3
3
|
import { t as enrichContract } from "./contract-enrichment-gn9sWbPw.mjs";
|
|
4
|
-
import { t as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-
|
|
4
|
+
import { t as buildContractSpaceAggregate } from "./contract-space-aggregate-loader-hPVymNLw.mjs";
|
|
5
5
|
import { emit } from "@prisma-next/emitter";
|
|
6
6
|
import { ifDefined } from "@prisma-next/utils/defined";
|
|
7
7
|
import { notOk, ok } from "@prisma-next/utils/result";
|
|
@@ -1514,7 +1514,6 @@ var ControlClientImpl = class {
|
|
|
1514
1514
|
const sourceContext = {
|
|
1515
1515
|
composedExtensionPacks: stack.extensionPacks.map((p) => p.id),
|
|
1516
1516
|
composedExtensionContracts: stack.extensionContracts,
|
|
1517
|
-
scalarTypeDescriptors: stack.scalarTypeDescriptors,
|
|
1518
1517
|
authoringContributions: stack.authoringContributions,
|
|
1519
1518
|
codecLookup: stack.codecLookup,
|
|
1520
1519
|
controlMutationDefaults: stack.controlMutationDefaults,
|
|
@@ -1625,4 +1624,4 @@ var ControlClientImpl = class {
|
|
|
1625
1624
|
//#endregion
|
|
1626
1625
|
export { executeDbInit as a, executeDbUpdate as i, planSpacePath as n, ContractValidationError as o, executeDbVerify as r, createControlClient as t };
|
|
1627
1626
|
|
|
1628
|
-
//# sourceMappingURL=client-
|
|
1627
|
+
//# sourceMappingURL=client-DeJvLD2h.mjs.map
|