prisma-next 0.11.0 → 0.12.0
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 +259 -12
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-oXO2WCPD.mjs → client-KgJorIvG.mjs} +72 -60
- package/dist/client-KgJorIvG.mjs.map +1 -0
- package/dist/{command-helpers-BSb0tRC8.mjs → command-helpers-Bbw1GbwL.mjs} +646 -46
- package/dist/command-helpers-Bbw1GbwL.mjs.map +1 -0
- package/dist/commands/contract-emit.d.mts.map +1 -1
- package/dist/commands/contract-emit.mjs +1 -1
- package/dist/commands/contract-infer.d.mts.map +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 +32 -7
- package/dist/commands/db-init.mjs.map +1 -1
- package/dist/commands/db-schema.d.mts.map +1 -1
- package/dist/commands/db-schema.mjs +3 -4
- package/dist/commands/db-schema.mjs.map +1 -1
- package/dist/commands/db-sign.d.mts.map +1 -1
- package/dist/commands/db-sign.mjs +12 -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 +41 -11
- package/dist/commands/db-update.mjs.map +1 -1
- package/dist/commands/db-verify.d.mts.map +1 -1
- package/dist/commands/db-verify.mjs +1 -1
- package/dist/commands/migrate.d.mts +6 -2
- package/dist/commands/migrate.d.mts.map +1 -1
- package/dist/commands/migrate.mjs +75 -40
- package/dist/commands/migrate.mjs.map +1 -1
- package/dist/commands/migration-check.d.mts +4 -3
- package/dist/commands/migration-check.d.mts.map +1 -1
- package/dist/commands/migration-check.mjs +1 -280
- package/dist/commands/migration-graph.d.mts +13 -2
- package/dist/commands/migration-graph.d.mts.map +1 -1
- package/dist/commands/migration-graph.mjs +2 -137
- package/dist/commands/migration-list.d.mts +64 -4
- package/dist/commands/migration-list.d.mts.map +1 -1
- package/dist/commands/migration-list.mjs +143 -56
- package/dist/commands/migration-list.mjs.map +1 -1
- package/dist/commands/migration-log.d.mts +10 -1
- package/dist/commands/migration-log.d.mts.map +1 -1
- package/dist/commands/migration-log.mjs +10 -15
- package/dist/commands/migration-log.mjs.map +1 -1
- package/dist/commands/migration-new.d.mts.map +1 -1
- package/dist/commands/migration-new.mjs +32 -38
- package/dist/commands/migration-new.mjs.map +1 -1
- package/dist/commands/migration-plan.d.mts +3 -2
- package/dist/commands/migration-plan.d.mts.map +1 -1
- package/dist/commands/migration-plan.mjs +1 -1
- package/dist/commands/migration-show.d.mts +4 -55
- package/dist/commands/migration-show.d.mts.map +1 -1
- package/dist/commands/migration-show.mjs +61 -153
- package/dist/commands/migration-show.mjs.map +1 -1
- package/dist/commands/migration-status.d.mts +12 -49
- package/dist/commands/migration-status.d.mts.map +1 -1
- package/dist/commands/migration-status.mjs +85 -81
- package/dist/commands/migration-status.mjs.map +1 -1
- package/dist/commands/ref.d.mts +1 -1
- package/dist/commands/ref.d.mts.map +1 -1
- package/dist/commands/ref.mjs +38 -10
- package/dist/commands/ref.mjs.map +1 -1
- package/dist/config-loader-B6sJjXTv.mjs.map +1 -1
- package/dist/config-loader.d.mts.map +1 -1
- package/dist/contract-at-errors-BxP-TOMl.mjs +42 -0
- package/dist/contract-at-errors-BxP-TOMl.mjs.map +1 -0
- package/dist/{contract-emit-bcrpT-wD.mjs → contract-emit-D-4jrNve.mjs} +25 -10
- package/dist/contract-emit-D-4jrNve.mjs.map +1 -0
- package/dist/{contract-emit-r4y8Zhf1.mjs → contract-emit-DxcGl4Uq.mjs} +19 -14
- package/dist/contract-emit-DxcGl4Uq.mjs.map +1 -0
- package/dist/{contract-enrichment-Dani0mMW.mjs → contract-enrichment-a0V5Y_mL.mjs} +4 -25
- package/dist/contract-enrichment-a0V5Y_mL.mjs.map +1 -0
- package/dist/{contract-infer-BmySmqVT.mjs → contract-infer-D8uEbJuu.mjs} +4 -5
- package/dist/{contract-infer-BmySmqVT.mjs.map → contract-infer-D8uEbJuu.mjs.map} +1 -1
- package/dist/contract-space-aggregate-loader-DvZwdkrr.mjs +247 -0
- package/dist/contract-space-aggregate-loader-DvZwdkrr.mjs.map +1 -0
- package/dist/{db-verify-BClPs3ph.mjs → db-verify-v_vUKXTU.mjs} +5 -7
- package/dist/{db-verify-BClPs3ph.mjs.map → db-verify-v_vUKXTU.mjs.map} +1 -1
- package/dist/exports/control-api.d.mts +3 -3
- package/dist/exports/control-api.d.mts.map +1 -1
- package/dist/exports/control-api.mjs +3 -3
- package/dist/exports/index.d.mts.map +1 -1
- package/dist/exports/index.mjs +1 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/exports/init-output.d.mts.map +1 -1
- package/dist/exports/init-output.mjs +1 -1
- package/dist/extension-pack-inputs-IDvjRCi3.mjs +62 -0
- package/dist/extension-pack-inputs-IDvjRCi3.mjs.map +1 -0
- package/dist/{framework-components-65gOHkHB.mjs → framework-components-fYXjz_in.mjs} +2 -2
- package/dist/{framework-components-65gOHkHB.mjs.map → framework-components-fYXjz_in.mjs.map} +1 -1
- package/dist/global-flags-DEHjV8_s.d.mts +34 -0
- package/dist/global-flags-DEHjV8_s.d.mts.map +1 -0
- package/dist/{graph-render-DJVv0_uf.mjs → graph-render-rFAqZujX.mjs} +2 -2
- package/dist/{graph-render-DJVv0_uf.mjs.map → graph-render-rFAqZujX.mjs.map} +1 -1
- package/dist/{init-BCJZPWE1.mjs → init-Cv9UzWL5.mjs} +20 -269
- package/dist/init-Cv9UzWL5.mjs.map +1 -0
- package/dist/{inspect-live-schema-DSRbFoOL.mjs → inspect-live-schema-C6ohV_oQ.mjs} +4 -5
- package/dist/{inspect-live-schema-DSRbFoOL.mjs.map → inspect-live-schema-C6ohV_oQ.mjs.map} +1 -1
- package/dist/migration-check-BiBJoYYW.mjs +341 -0
- package/dist/migration-check-BiBJoYYW.mjs.map +1 -0
- package/dist/migration-cli.d.mts.map +1 -1
- package/dist/migration-cli.mjs +4 -4
- package/dist/migration-cli.mjs.map +1 -1
- package/dist/{migration-command-scaffold-Bzd9La5c.mjs → migration-command-scaffold-CjvwO6at.mjs} +4 -5
- package/dist/{migration-command-scaffold-Bzd9La5c.mjs.map → migration-command-scaffold-CjvwO6at.mjs.map} +1 -1
- package/dist/migration-graph-D7DVUElV.mjs +1232 -0
- package/dist/migration-graph-D7DVUElV.mjs.map +1 -0
- package/dist/migration-list-styler-BRwF4-gy.mjs +399 -0
- package/dist/migration-list-styler-BRwF4-gy.mjs.map +1 -0
- package/dist/{migration-plan-CFwqw3Gk.mjs → migration-plan-9DJ7q7_z.mjs} +372 -133
- package/dist/migration-plan-9DJ7q7_z.mjs.map +1 -0
- package/dist/{migration-types-BXWvz12q.d.mts → migration-types-D2FW63pr.d.mts} +1 -1
- package/dist/{migration-types-BXWvz12q.d.mts.map → migration-types-D2FW63pr.d.mts.map} +1 -1
- package/dist/{migrations-CwZMa1Ck.mjs → migrations-Cv2jxNNK.mjs} +12 -13
- package/dist/migrations-Cv2jxNNK.mjs.map +1 -0
- package/dist/{output-BlsrGMEF.mjs → output-B60Gw5fu.mjs} +1 -1
- package/dist/{output-BlsrGMEF.mjs.map → output-B60Gw5fu.mjs.map} +1 -1
- package/dist/{progress-adapter-DFfvZcYL.mjs → progress-adapter-C644QK8l.mjs} +1 -1
- package/dist/{progress-adapter-DFfvZcYL.mjs.map → progress-adapter-C644QK8l.mjs.map} +1 -1
- package/dist/ref-advancement-DUZqsue6.mjs +50 -0
- package/dist/ref-advancement-DUZqsue6.mjs.map +1 -0
- package/dist/terminal-ui-5Y6mrg93.d.mts +133 -0
- package/dist/terminal-ui-5Y6mrg93.d.mts.map +1 -0
- package/dist/{types--CqjMdk0.d.mts → types-Dt_SfqFm.d.mts} +28 -28
- package/dist/types-Dt_SfqFm.d.mts.map +1 -0
- package/dist/{verify-Bom75OYI.mjs → verify-DCA9Sldu.mjs} +2 -2
- package/dist/{verify-Bom75OYI.mjs.map → verify-DCA9Sldu.mjs.map} +1 -1
- package/package.json +28 -17
- package/dist/cli-errors-Czmx92Zy.d.mts +0 -3
- package/dist/cli-errors-Djtz98Vm.mjs +0 -71
- package/dist/cli-errors-Djtz98Vm.mjs.map +0 -1
- package/dist/client-oXO2WCPD.mjs.map +0 -1
- package/dist/command-helpers-BSb0tRC8.mjs.map +0 -1
- package/dist/commands/migration-check.mjs.map +0 -1
- package/dist/commands/migration-graph.mjs.map +0 -1
- package/dist/contract-emit-bcrpT-wD.mjs.map +0 -1
- package/dist/contract-emit-r4y8Zhf1.mjs.map +0 -1
- package/dist/contract-enrichment-Dani0mMW.mjs.map +0 -1
- package/dist/contract-space-aggregate-loader-BmNQwlws.mjs +0 -160
- package/dist/contract-space-aggregate-loader-BmNQwlws.mjs.map +0 -1
- package/dist/global-flags-CdE7M0d9.d.mts +0 -15
- package/dist/global-flags-CdE7M0d9.d.mts.map +0 -1
- package/dist/init-BCJZPWE1.mjs.map +0 -1
- package/dist/migration-plan-CFwqw3Gk.mjs.map +0 -1
- package/dist/migrations-CwZMa1Ck.mjs.map +0 -1
- package/dist/rolldown-runtime-twds-ZHy.mjs +0 -14
- package/dist/terminal-ui-BiB_8KNo.mjs +0 -379
- package/dist/terminal-ui-BiB_8KNo.mjs.map +0 -1
- package/dist/types--CqjMdk0.d.mts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrations-CwZMa1Ck.mjs","names":[],"sources":["../src/utils/formatters/migrations.ts"],"sourcesContent":["import type { OperationPreview } from '@prisma-next/framework-components/control';\nimport { cyan, green, yellow } from 'colorette';\n\nimport type { AggregatePerSpaceExecutionEntry } from '../../control-api/types';\nimport type { GlobalFlags } from '../global-flags';\nimport { createColorFormatter, formatDim, isVerbose } from './helpers';\n\n/**\n * Render a single statement of an `OperationPreview` for the human-readable\n * preview block. SQL statements get a trailing `;` if missing so the rendered\n * preview is byte-identical to the legacy `string[]`-based renderer for SQL\n * targets. Other languages (`'mongodb-shell'`) render verbatim.\n */\nfunction renderPreviewStatement(text: string, language: string): string | undefined {\n const trimmed = text.trim();\n if (!trimmed) return undefined;\n if (language === 'sql') {\n return trimmed.endsWith(';') ? trimmed : `${trimmed};`;\n }\n return trimmed;\n}\n\n/**\n * Choose the header label for a preview block. SQL-only previews keep the\n * legacy `DDL preview` label so the rendered output is byte-identical to the\n * pre-aggregate SQL CLI; previews from any other family — or a mix that\n * includes any non-SQL language — use the family-agnostic `Operation preview`\n * label.\n *\n * An empty `statements` array deliberately renders as `Operation preview`\n * rather than `DDL preview`: `Array.prototype.every` is vacuously true for\n * empty arrays, but we have no evidence the preview is SQL-only when no\n * statements are present, so the family-agnostic label is the safer default.\n */\nexport function previewBlockHeader(preview: OperationPreview): string {\n const allSql =\n preview.statements.length > 0 && preview.statements.every((s) => s.language === 'sql');\n return allSql ? 'DDL preview' : 'Operation preview';\n}\n\n// ============================================================================\n// Migration Command Output Formatters (shared by db init and db update)\n// ============================================================================\n\n/**\n * Shared CLI output type for migration commands (db init, db update).\n */\nexport interface MigrationCommandResult {\n readonly ok: true;\n readonly mode: 'plan' | 'apply';\n readonly plan: {\n readonly targetId: string;\n readonly destination: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly operations: readonly {\n readonly id: string;\n readonly label: string;\n readonly operationClass: string;\n }[];\n /**\n * Family-agnostic textual preview of the planned operations. Replaces the\n * previous `sql?: readonly string[]`. Consumers should read\n * `plan.preview?.statements`.\n */\n readonly preview?: OperationPreview;\n };\n readonly execution?: {\n readonly operationsPlanned: number;\n readonly operationsExecuted: number;\n };\n readonly marker?: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n /**\n * Per-space execution breakdown in canonical schedule order\n * (extensions alphabetically, then app). Surfaces per-space markers\n * and the ops grouped by space, so the CLI summary can name which\n * space each op and marker belongs to instead of flattening them\n * into a single ambiguous list. See {@link AggregatePerSpaceExecutionEntry}.\n */\n readonly perSpace?: ReadonlyArray<AggregatePerSpaceExecutionEntry>;\n readonly summary: string;\n readonly timings: {\n readonly total: number;\n };\n}\n\n/**\n * Render the shared per-space execution block consumed by the `db init`\n * / `db update` / `migrate` summaries. Always shows: space\n * label (`Extension space: <id>` or `App space`) → per-op lines under\n * each space → per-space marker hash (when known).\n *\n * `mode` controls the marker label phrasing — `'apply'` shows\n * `marker → <hash>` (post-apply), `'plan'` omits the marker line\n * entirely (no marker has been written yet).\n */\nexport function formatPerSpaceBlock(\n perSpace: ReadonlyArray<AggregatePerSpaceExecutionEntry>,\n mode: 'plan' | 'apply',\n useColor: boolean,\n): readonly string[] {\n const formatYellow = createColorFormatter(useColor, yellow);\n const formatCyan = createColorFormatter(useColor, cyan);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n const lines: string[] = [];\n for (let s = 0; s < perSpace.length; s++) {\n const space = perSpace[s]!;\n if (s > 0) lines.push('');\n const header =\n space.kind === 'app'\n ? formatCyan('App space')\n : formatCyan(`Extension space: ${space.spaceId}`);\n lines.push(header);\n if (space.operations.length === 0) {\n lines.push(` ${formatDimText('(no operations)')}`);\n } else {\n for (let i = 0; i < space.operations.length; i++) {\n const op = space.operations[i]!;\n const isLast = i === space.operations.length - 1;\n const treeChar = isLast ? '└' : '├';\n const destructiveMarker =\n op.operationClass === 'destructive' ? ` ${formatYellow('(destructive)')}` : '';\n lines.push(` ${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n }\n }\n if (mode === 'apply' && space.marker) {\n lines.push(` ${formatDimText(`marker: ${space.marker.storageHash}`)}`);\n }\n }\n return lines;\n}\n\n/**\n * Formats human-readable output for migration commands (db init, db update) in plan mode.\n */\nexport function formatMigrationPlanOutput(\n result: MigrationCommandResult,\n flags: GlobalFlags,\n): string {\n if (flags.quiet) {\n return '';\n }\n\n const lines: string[] = [];\n\n const useColor = flags.color !== false;\n const formatGreen = createColorFormatter(useColor, green);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n // Plan summary\n const operationCount = result.plan?.operations.length ?? 0;\n const spaceCount = result.perSpace?.length ?? 0;\n if (spaceCount > 0) {\n lines.push(\n `${formatGreen('✔')} Planned ${operationCount} operation(s) across ${spaceCount} contract space${spaceCount === 1 ? '' : 's'}`,\n );\n } else {\n lines.push(`${formatGreen('✔')} Planned ${operationCount} operation(s)`);\n }\n\n const formatYellow = createColorFormatter(useColor, yellow);\n\n // Per-space breakdown takes precedence over the flat ops tree when\n // the aggregate flow surfaced one.\n if (result.perSpace && result.perSpace.length > 0) {\n lines.push('');\n lines.push(...formatPerSpaceBlock(result.perSpace, 'plan', useColor));\n const hasDestructive = result.perSpace.some((s) =>\n s.operations.some((op) => op.operationClass === 'destructive'),\n );\n if (hasDestructive) {\n lines.push('');\n lines.push(\n `${formatYellow('⚠')} This migration contains destructive operations that may cause data loss.`,\n );\n }\n } else if (result.plan?.operations && result.plan.operations.length > 0) {\n // Single-space fallback (no aggregate breakdown). Same flat tree\n // we've always rendered.\n lines.push(`${formatDimText('│')}`);\n for (let i = 0; i < result.plan.operations.length; i++) {\n const op = result.plan.operations[i];\n if (!op) continue;\n const isLast = i === result.plan.operations.length - 1;\n const treeChar = isLast ? '└' : '├';\n const destructiveMarker =\n op.operationClass === 'destructive' ? ` ${formatYellow('(destructive)')}` : '';\n lines.push(`${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n }\n\n const hasDestructive = result.plan.operations.some((op) => op.operationClass === 'destructive');\n if (hasDestructive) {\n lines.push('');\n lines.push(\n `${formatYellow('⚠')} This migration contains destructive operations that may cause data loss.`,\n );\n }\n }\n\n // Destination hash\n if (result.plan?.destination) {\n lines.push('');\n lines.push(`${formatDimText(`Destination hash: ${result.plan.destination.storageHash}`)}`);\n }\n\n // Statement preview (any family that implements OperationPreviewCapable)\n const preview = result.plan?.preview;\n if (preview) {\n lines.push('');\n lines.push(`${formatDimText(previewBlockHeader(preview))}`);\n if (preview.statements.length === 0) {\n lines.push(`${formatDimText('No operations.')}`);\n } else {\n lines.push('');\n for (const statement of preview.statements) {\n const rendered = renderPreviewStatement(statement.text, statement.language);\n if (rendered) {\n lines.push(rendered);\n }\n }\n }\n }\n\n // Timings in verbose mode\n if (isVerbose(flags, 1)) {\n lines.push(`${formatDimText(`Total time: ${result.timings.total}ms`)}`);\n }\n\n // Note about dry run\n lines.push('');\n lines.push(`${formatDimText('This is a dry run. No changes were applied.')}`);\n lines.push(`${formatDimText('Run without --dry-run to apply changes.')}`);\n\n return lines.join('\\n');\n}\n\nexport interface MigrationApplyCommandOutputResult {\n readonly migrationsApplied: number;\n readonly markerHash: string;\n readonly applied: readonly {\n readonly spaceId: string;\n readonly dirName?: string;\n readonly migrationHash?: string;\n readonly from?: string;\n readonly to?: string;\n readonly operationsExecuted: number;\n }[];\n readonly summary: string;\n /**\n * Per-space breakdown in canonical schedule order (extensions\n * alphabetically, then app). Always present for the aggregate-walking\n * `migrate` command.\n */\n readonly perSpace: readonly AggregatePerSpaceExecutionEntry[];\n readonly timings?: {\n readonly total: number;\n };\n}\n\nexport function formatMigrationApplyCommandOutput(\n result: MigrationApplyCommandOutputResult,\n flags: GlobalFlags,\n): string {\n if (flags.quiet) {\n return '';\n }\n\n const lines: string[] = [];\n const useColor = flags.color !== false;\n const formatGreen = createColorFormatter(useColor, green);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n lines.push(`${formatGreen('✔')} ${result.summary}`);\n\n if (result.perSpace.length > 0) {\n lines.push('');\n for (const line of formatPerSpaceBlock(result.perSpace, 'apply', useColor)) {\n lines.push(line);\n }\n }\n\n lines.push('');\n lines.push(formatDimText('Next: prisma-next migration status'));\n\n if (isVerbose(flags, 1) && result.timings) {\n lines.push('');\n lines.push(formatDimText(`Total time: ${result.timings.total}ms`));\n }\n\n return lines.join('\\n');\n}\n\ninterface MigrationShowSpacePresent {\n readonly kind: 'present';\n readonly spaceId: string;\n readonly dirName: string;\n readonly dirPath: string;\n readonly from: string | null;\n readonly to: string;\n readonly migrationHash: string;\n readonly createdAt: string;\n readonly operations: readonly {\n readonly id: string;\n readonly label: string;\n readonly operationClass: string;\n }[];\n readonly preview: OperationPreview;\n readonly summary: string;\n}\n\ninterface MigrationShowSpaceMissing {\n readonly kind: 'missing';\n readonly spaceId: string;\n readonly summary: string;\n}\n\ntype MigrationShowSpaceResult = MigrationShowSpacePresent | MigrationShowSpaceMissing;\n\ninterface MigrationShowResult {\n readonly spaces: readonly MigrationShowSpaceResult[];\n}\n\nfunction formatSpaceShowBlock(\n space: MigrationShowSpacePresent,\n useColor: boolean,\n): readonly string[] {\n const formatGreen = createColorFormatter(useColor, green);\n const formatYellow = createColorFormatter(useColor, yellow);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n const lines: string[] = [];\n lines.push(`${formatGreen('✔')} ${space.dirName}`);\n lines.push(`${formatDimText(` from: ${space.from ?? '(baseline)'}`)}`);\n lines.push(`${formatDimText(` to: ${space.to}`)}`);\n lines.push(`${formatDimText(` migrationHash: ${space.migrationHash}`)}`);\n lines.push(`${formatDimText(` created: ${space.createdAt}`)}`);\n\n lines.push('');\n lines.push(`${space.operations.length} operation(s)`);\n\n if (space.operations.length > 0) {\n lines.push(`${formatDimText('│')}`);\n for (let i = 0; i < space.operations.length; i++) {\n const op = space.operations[i]!;\n const isLast = i === space.operations.length - 1;\n const treeChar = isLast ? '└' : '├';\n const destructiveMarker =\n op.operationClass === 'destructive' ? ` ${formatYellow('(destructive)')}` : '';\n lines.push(`${formatDimText(treeChar)}─ ${op.label}${destructiveMarker}`);\n }\n\n const hasDestructive = space.operations.some((op) => op.operationClass === 'destructive');\n if (hasDestructive) {\n lines.push('');\n lines.push(\n `${formatYellow('⚠')} This migration contains destructive operations that may cause data loss.`,\n );\n }\n }\n\n if (space.preview.statements.length > 0) {\n lines.push('');\n lines.push(`${formatDimText(previewBlockHeader(space.preview))}`);\n lines.push('');\n for (const statement of space.preview.statements) {\n const rendered = renderPreviewStatement(statement.text, statement.language);\n if (rendered) {\n lines.push(rendered);\n }\n }\n }\n\n return lines;\n}\n\nexport function formatMigrationShowOutput(result: MigrationShowResult, flags: GlobalFlags): string {\n if (flags.quiet) {\n return '';\n }\n\n const useColor = flags.color !== false;\n const formatDimText = (text: string) => formatDim(useColor, text);\n const multipleSpaces = result.spaces.length > 1;\n const lines: string[] = [];\n\n for (let i = 0; i < result.spaces.length; i++) {\n const space = result.spaces[i]!;\n if (multipleSpaces) {\n lines.push(formatDimText(`── ${space.spaceId} ──`));\n }\n if (space.kind === 'missing') {\n lines.push(formatDimText(` ${space.summary}`));\n } else {\n for (const line of formatSpaceShowBlock(space, useColor)) {\n lines.push(line);\n }\n }\n if (i < result.spaces.length - 1) {\n lines.push('');\n }\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Formats human-readable output for migration commands (db init, db update) in apply mode.\n */\nexport function formatMigrationApplyOutput(\n result: MigrationCommandResult,\n flags: GlobalFlags,\n): string {\n if (flags.quiet) {\n return '';\n }\n\n const lines: string[] = [];\n\n const useColor = flags.color !== false;\n const formatGreen = createColorFormatter(useColor, green);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n if (result.ok) {\n // Success summary\n const executed = result.execution?.operationsExecuted ?? 0;\n const spaceCount = result.perSpace?.length ?? 0;\n\n if (executed === 0) {\n const acrossClause =\n spaceCount > 0 ? ` across ${spaceCount} contract space${spaceCount === 1 ? '' : 's'}` : '';\n lines.push(`${formatGreen('✔')} Database already matches contract${acrossClause}`);\n } else if (spaceCount > 0) {\n lines.push(\n `${formatGreen('✔')} Applied ${executed} operation(s) across ${spaceCount} contract space${spaceCount === 1 ? '' : 's'}`,\n );\n } else {\n lines.push(`${formatGreen('✔')} Applied ${executed} operation(s)`);\n }\n\n // Per-space breakdown — replaces the single ambiguous `Signature:`\n // line with a per-space marker + ops listing.\n if (result.perSpace && result.perSpace.length > 0) {\n lines.push('');\n lines.push(...formatPerSpaceBlock(result.perSpace, 'apply', useColor));\n lines.push('');\n lines.push(\n formatDimText(\n `Run 'prisma-next migration status' to confirm ${\n spaceCount === 1 ? 'the space is' : 'all spaces are'\n } up to date.`,\n ),\n );\n } else if (result.marker) {\n // Single-space fallback (no aggregate breakdown surfaced — e.g.\n // older callers / non-aggregate code paths). The label is\n // `App-space marker` (not `Signature`) so that when only one\n // marker is observable we still name what it covers explicitly.\n lines.push(`${formatDimText(` App-space marker: ${result.marker.storageHash}`)}`);\n if (result.marker.profileHash) {\n lines.push(`${formatDimText(` Profile hash: ${result.marker.profileHash}`)}`);\n }\n }\n\n // Timings in verbose mode\n if (isVerbose(flags, 1)) {\n lines.push(`${formatDimText(` Total time: ${result.timings.total}ms`)}`);\n }\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Formats JSON output for migration commands (db init, db update).\n */\nexport function formatMigrationJson(result: MigrationCommandResult): string {\n return JSON.stringify(result, null, 2);\n}\n"],"mappings":";;;;;;;;;AAaA,SAAS,uBAAuB,MAAc,UAAsC;CAClF,MAAM,UAAU,KAAK,MAAM;CAC3B,IAAI,CAAC,SAAS,OAAO,KAAA;CACrB,IAAI,aAAa,OACf,OAAO,QAAQ,SAAS,IAAI,GAAG,UAAU,GAAG,QAAQ;CAEtD,OAAO;;;;;;;;;;;;;;AAeT,SAAgB,mBAAmB,SAAmC;CAGpE,OADE,QAAQ,WAAW,SAAS,KAAK,QAAQ,WAAW,OAAO,MAAM,EAAE,aAAa,MAAM,GACxE,gBAAgB;;;;;;;;;;;;AA+DlC,SAAgB,oBACd,UACA,MACA,UACmB;CACnB,MAAM,eAAe,qBAAqB,UAAU,OAAO;CAC3D,MAAM,aAAa,qBAAqB,UAAU,KAAK;CACvD,MAAM,iBAAiB,SAAiB,UAAU,UAAU,KAAK;CAEjE,MAAM,QAAkB,EAAE;CAC1B,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,QAAQ,SAAS;EACvB,IAAI,IAAI,GAAG,MAAM,KAAK,GAAG;EACzB,MAAM,SACJ,MAAM,SAAS,QACX,WAAW,YAAY,GACvB,WAAW,oBAAoB,MAAM,UAAU;EACrD,MAAM,KAAK,OAAO;EAClB,IAAI,MAAM,WAAW,WA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AAc,mBAAmB,OAAO,OAAO,cAAc,GAAG;;EAKlF,IAAI,UAAU,OAAO,EAAE,EACrB,MAAM,KAAK,GAAG,cAAc,iBAAiB,OAAO,QAAQ,MAAM,IAAI,GAAG;;CAI7E,OAAO,MAAM,KAAK,KAAK;;;;;AAMzB,SAAgB,oBAAoB,QAAwC;CAC1E,OAAO,KAAK,UAAU,QAAQ,MAAM,EAAE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __exportAll = (all, no_symbols) => {
|
|
5
|
-
let target = {};
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { __exportAll as t };
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { bold, cyan, dim, green, red, yellow } from "colorette";
|
|
2
|
-
import { isCI } from "ci-info";
|
|
3
|
-
import * as clack from "@clack/prompts";
|
|
4
|
-
//#region src/utils/formatters/helpers.ts
|
|
5
|
-
/**
|
|
6
|
-
* Checks if verbose output is enabled at the specified level.
|
|
7
|
-
*/
|
|
8
|
-
function isVerbose(flags, level) {
|
|
9
|
-
return (flags.verbose ?? 0) >= level;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Creates a color-aware formatter function.
|
|
13
|
-
* Returns a function that applies the color only if colors are enabled.
|
|
14
|
-
*/
|
|
15
|
-
function createColorFormatter(useColor, colorFn) {
|
|
16
|
-
return useColor ? colorFn : (text) => text;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Formats text with dim styling if colors are enabled.
|
|
20
|
-
*/
|
|
21
|
-
function formatDim(useColor, text) {
|
|
22
|
-
return useColor ? dim(text) : text;
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/utils/is-ci.ts
|
|
26
|
-
/**
|
|
27
|
-
* Returns true when the process is running in any CI environment recognised
|
|
28
|
-
* by the `ci-info` package. The single source of truth for CI detection
|
|
29
|
-
* across this CLI — colour-output suppression and telemetry-skip both call
|
|
30
|
-
* this helper, so neither path drifts from the other when a new CI provider
|
|
31
|
-
* is added upstream.
|
|
32
|
-
*
|
|
33
|
-
* `ci-info` checks the standard `CI=true` marker plus dozens of
|
|
34
|
-
* provider-specific environment variables (Buildkite, Jenkins, Drone,
|
|
35
|
-
* Bitbucket Pipelines, Azure Pipelines, AWS CodeBuild, …) that the raw
|
|
36
|
-
* `process.env.CI` read misses.
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
function isCI$1() {
|
|
40
|
-
return isCI;
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/utils/formatters/errors.ts
|
|
44
|
-
/**
|
|
45
|
-
* Formats error output for human-readable display.
|
|
46
|
-
*/
|
|
47
|
-
function formatErrorOutput(error, flags) {
|
|
48
|
-
const lines = [];
|
|
49
|
-
const useColor = flags.color !== false;
|
|
50
|
-
const formatRed = createColorFormatter(useColor, red);
|
|
51
|
-
const formatDimText = (text) => formatDim(useColor, text);
|
|
52
|
-
lines.push(`${formatRed("✖")} ${error.summary} (${error.code})`);
|
|
53
|
-
if (error.why) lines.push(`${formatDimText(` Why: ${error.why}`)}`);
|
|
54
|
-
if (error.fix) lines.push(`${formatDimText(` Fix: ${error.fix}`)}`);
|
|
55
|
-
if (error.where?.path) {
|
|
56
|
-
const whereLine = error.where.line ? `${error.where.path}:${error.where.line}` : error.where.path;
|
|
57
|
-
lines.push(`${formatDimText(` Where: ${whereLine}`)}`);
|
|
58
|
-
}
|
|
59
|
-
if (error.meta?.["conflicts"]) {
|
|
60
|
-
const conflicts = error.meta["conflicts"];
|
|
61
|
-
if (conflicts.length > 0) {
|
|
62
|
-
const maxToShow = isVerbose(flags, 1) ? conflicts.length : Math.min(3, conflicts.length);
|
|
63
|
-
const header = isVerbose(flags, 1) ? " Conflicts:" : ` Conflicts (showing ${maxToShow} of ${conflicts.length}):`;
|
|
64
|
-
lines.push(`${formatDimText(header)}`);
|
|
65
|
-
for (const conflict of conflicts.slice(0, maxToShow)) lines.push(`${formatDimText(` - [${conflict.kind}] ${conflict.summary}`)}`);
|
|
66
|
-
if (!isVerbose(flags, 1) && conflicts.length > maxToShow) lines.push(`${formatDimText(" Re-run with -v/--verbose to see all conflicts")}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (error.meta?.["issues"]) {
|
|
70
|
-
const issues = error.meta["issues"];
|
|
71
|
-
if (issues.length > 0) {
|
|
72
|
-
const maxToShow = isVerbose(flags, 1) ? issues.length : Math.min(3, issues.length);
|
|
73
|
-
const header = isVerbose(flags, 1) ? " Issues:" : ` Issues (showing ${maxToShow} of ${issues.length}):`;
|
|
74
|
-
lines.push(`${formatDimText(header)}`);
|
|
75
|
-
for (const issue of issues.slice(0, maxToShow)) {
|
|
76
|
-
const kind = issue.kind ?? "issue";
|
|
77
|
-
const message = issue.message ?? "";
|
|
78
|
-
lines.push(`${formatDimText(` - [${kind}] ${message}`)}`);
|
|
79
|
-
}
|
|
80
|
-
if (!isVerbose(flags, 1) && issues.length > maxToShow) lines.push(`${formatDimText(" Re-run with -v/--verbose to see all issues")}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (error.docsUrl && isVerbose(flags, 1)) lines.push(formatDimText(error.docsUrl));
|
|
84
|
-
if (isVerbose(flags, 2) && error.meta) lines.push(`${formatDimText(` Meta: ${JSON.stringify(error.meta, null, 2)}`)}`);
|
|
85
|
-
return lines.join("\n");
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Formats error output as JSON.
|
|
89
|
-
*/
|
|
90
|
-
function formatErrorJson(error) {
|
|
91
|
-
return JSON.stringify(error, null, 2);
|
|
92
|
-
}
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/utils/shutdown.ts
|
|
95
|
-
function createShutdownHandler(options) {
|
|
96
|
-
const exit = options?.exit ?? ((code) => process.exit(code));
|
|
97
|
-
const gracePeriodMs = options?.gracePeriodMs ?? 3e3;
|
|
98
|
-
const controller = new AbortController();
|
|
99
|
-
let shuttingDown = false;
|
|
100
|
-
let graceTimer;
|
|
101
|
-
const onSignal = () => {
|
|
102
|
-
if (shuttingDown) {
|
|
103
|
-
exit(130);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
shuttingDown = true;
|
|
107
|
-
controller.abort();
|
|
108
|
-
graceTimer = setTimeout(() => exit(130), gracePeriodMs);
|
|
109
|
-
graceTimer.unref();
|
|
110
|
-
};
|
|
111
|
-
return {
|
|
112
|
-
signal: controller.signal,
|
|
113
|
-
isShuttingDown: () => shuttingDown,
|
|
114
|
-
onSignal,
|
|
115
|
-
clearGraceTimer: () => {
|
|
116
|
-
if (graceTimer !== void 0) {
|
|
117
|
-
clearTimeout(graceTimer);
|
|
118
|
-
graceTimer = void 0;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
const globalHandler = createShutdownHandler();
|
|
124
|
-
/**
|
|
125
|
-
* The global AbortSignal. Pass this to any async operation that should
|
|
126
|
-
* be cancellable on Ctrl+C (e.g., DB queries, long-running emit).
|
|
127
|
-
*/
|
|
128
|
-
const shutdownSignal = globalHandler.signal;
|
|
129
|
-
/**
|
|
130
|
-
* Installs SIGINT and SIGTERM handlers. Call once at CLI startup.
|
|
131
|
-
*
|
|
132
|
-
* - First signal: aborts the controller, starts a 3s grace timer.
|
|
133
|
-
* - Second signal: force-exits immediately.
|
|
134
|
-
*/
|
|
135
|
-
let installed = false;
|
|
136
|
-
function installShutdownHandlers() {
|
|
137
|
-
if (installed) return;
|
|
138
|
-
installed = true;
|
|
139
|
-
process.on("SIGINT", globalHandler.onSignal);
|
|
140
|
-
process.on("SIGTERM", globalHandler.onSignal);
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/utils/terminal-ui.ts
|
|
144
|
-
/**
|
|
145
|
-
* Composable CLI output abstraction.
|
|
146
|
-
*
|
|
147
|
-
* Follows the Unix convention of separating data from decoration:
|
|
148
|
-
* - **stdout** — data output only (`ui.output()`). This is what scripts and pipes capture.
|
|
149
|
-
* - **stderr** — all decoration (spinners, logs, notes, intro/outro). Visible in terminal, invisible in pipes.
|
|
150
|
-
*
|
|
151
|
-
* Rules:
|
|
152
|
-
* 1. All methods except `output()` and `error()` write to stderr only in interactive mode.
|
|
153
|
-
* 2. `output(data)` always writes to stdout — if a command calls it, there is data to emit.
|
|
154
|
-
* 3. `error()` always writes to stderr — errors matter even when piped.
|
|
155
|
-
* 4. Decoration is suppressed when piped unless `--format pretty` was explicit (`forcePretty`).
|
|
156
|
-
* 5. Never write data to stderr — decoration methods are for human context only.
|
|
157
|
-
* 6. Never write decoration to stdout — it breaks pipes, `$(...)` captures, and `> file` redirects.
|
|
158
|
-
*/
|
|
159
|
-
var TerminalUI = class TerminalUI {
|
|
160
|
-
/**
|
|
161
|
-
* True when stdout is a TTY (interactive terminal).
|
|
162
|
-
* False when piped (e.g., `prisma-next db verify | jq`).
|
|
163
|
-
*/
|
|
164
|
-
isInteractive;
|
|
165
|
-
/**
|
|
166
|
-
* Whether color output is enabled.
|
|
167
|
-
*/
|
|
168
|
-
useColor;
|
|
169
|
-
/**
|
|
170
|
-
* When true, decoration methods write even on non-TTY stdout
|
|
171
|
-
* (explicit `--format pretty`).
|
|
172
|
-
*/
|
|
173
|
-
forcePretty;
|
|
174
|
-
static stderrOpts = { output: process.stderr };
|
|
175
|
-
constructor(options) {
|
|
176
|
-
this.isInteractive = options?.interactive ?? !!process.stdout.isTTY;
|
|
177
|
-
this.forcePretty = options?.forcePretty ?? false;
|
|
178
|
-
this.useColor = options?.color ?? (this.isInteractive || this.forcePretty);
|
|
179
|
-
}
|
|
180
|
-
get shouldDecorate() {
|
|
181
|
-
return this.isInteractive || this.forcePretty;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Log a message line to stderr. No-op when piped unless forcePretty.
|
|
185
|
-
*/
|
|
186
|
-
log(message) {
|
|
187
|
-
if (!this.shouldDecorate) return;
|
|
188
|
-
clack.log.message(message, TerminalUI.stderrOpts);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Log a success message to stderr. No-op when piped unless forcePretty.
|
|
192
|
-
*/
|
|
193
|
-
success(message) {
|
|
194
|
-
if (!this.shouldDecorate) return;
|
|
195
|
-
clack.log.success(message, TerminalUI.stderrOpts);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Log a warning message to stderr. No-op when piped unless forcePretty.
|
|
199
|
-
*/
|
|
200
|
-
warn(message) {
|
|
201
|
-
if (!this.shouldDecorate) return;
|
|
202
|
-
clack.log.warn(message, TerminalUI.stderrOpts);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Log an error message to stderr. Always writes (errors matter even in pipes).
|
|
206
|
-
*/
|
|
207
|
-
error(message) {
|
|
208
|
-
clack.log.error(message, TerminalUI.stderrOpts);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Log an info message to stderr. No-op when piped unless forcePretty.
|
|
212
|
-
*/
|
|
213
|
-
info(message) {
|
|
214
|
-
if (!this.shouldDecorate) return;
|
|
215
|
-
clack.log.info(message, TerminalUI.stderrOpts);
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Log a step message to stderr. No-op when piped unless forcePretty.
|
|
219
|
-
*/
|
|
220
|
-
step(message) {
|
|
221
|
-
if (!this.shouldDecorate) return;
|
|
222
|
-
clack.log.step(message, TerminalUI.stderrOpts);
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Display a note box on stderr. No-op when piped unless forcePretty.
|
|
226
|
-
*/
|
|
227
|
-
note(message, title) {
|
|
228
|
-
if (!this.shouldDecorate) return;
|
|
229
|
-
clack.note(message, title, TerminalUI.stderrOpts);
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Display intro banner on stderr. No-op when piped unless forcePretty.
|
|
233
|
-
*/
|
|
234
|
-
intro(title) {
|
|
235
|
-
if (!this.shouldDecorate) return;
|
|
236
|
-
clack.intro(title, TerminalUI.stderrOpts);
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Display outro banner on stderr. No-op when piped unless forcePretty.
|
|
240
|
-
*/
|
|
241
|
-
outro(message) {
|
|
242
|
-
if (!this.shouldDecorate) return;
|
|
243
|
-
clack.outro(message, TerminalUI.stderrOpts);
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Create a Clack spinner on stderr with a 100ms delay threshold.
|
|
247
|
-
* The spinner only appears if the operation takes longer than the threshold,
|
|
248
|
-
* avoiding flicker for fast operations. Returns a no-op spinner when not decorating.
|
|
249
|
-
*/
|
|
250
|
-
spinner(delayMs = 100) {
|
|
251
|
-
const noop = {
|
|
252
|
-
start: () => {},
|
|
253
|
-
stop: () => {},
|
|
254
|
-
cancel: () => {},
|
|
255
|
-
error: () => {},
|
|
256
|
-
message: () => {},
|
|
257
|
-
clear: () => {},
|
|
258
|
-
get isCancelled() {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
if (!this.shouldDecorate) return noop;
|
|
263
|
-
let inner;
|
|
264
|
-
let timer;
|
|
265
|
-
let pendingMsg;
|
|
266
|
-
let settled = false;
|
|
267
|
-
const ensureCleared = () => {
|
|
268
|
-
if (timer !== void 0) {
|
|
269
|
-
clearTimeout(timer);
|
|
270
|
-
timer = void 0;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
const onAbort = () => {
|
|
274
|
-
if (!settled) {
|
|
275
|
-
settled = true;
|
|
276
|
-
ensureCleared();
|
|
277
|
-
if (inner) inner.cancel("Interrupted");
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
if (!shutdownSignal.aborted) shutdownSignal.addEventListener("abort", onAbort, { once: true });
|
|
281
|
-
return {
|
|
282
|
-
start(msg) {
|
|
283
|
-
pendingMsg = msg;
|
|
284
|
-
timer = setTimeout(() => {
|
|
285
|
-
if (!settled) {
|
|
286
|
-
inner = clack.spinner(TerminalUI.stderrOpts);
|
|
287
|
-
inner.start(pendingMsg);
|
|
288
|
-
}
|
|
289
|
-
}, delayMs);
|
|
290
|
-
},
|
|
291
|
-
stop(msg) {
|
|
292
|
-
settled = true;
|
|
293
|
-
ensureCleared();
|
|
294
|
-
if (inner) inner.stop(msg);
|
|
295
|
-
},
|
|
296
|
-
cancel(msg) {
|
|
297
|
-
settled = true;
|
|
298
|
-
ensureCleared();
|
|
299
|
-
if (inner) inner.cancel(msg);
|
|
300
|
-
},
|
|
301
|
-
error(msg) {
|
|
302
|
-
settled = true;
|
|
303
|
-
ensureCleared();
|
|
304
|
-
if (inner) inner.error(msg);
|
|
305
|
-
},
|
|
306
|
-
message(msg) {
|
|
307
|
-
pendingMsg = msg;
|
|
308
|
-
if (inner) inner.message(msg);
|
|
309
|
-
},
|
|
310
|
-
clear() {
|
|
311
|
-
settled = true;
|
|
312
|
-
ensureCleared();
|
|
313
|
-
if (inner) inner.clear();
|
|
314
|
-
},
|
|
315
|
-
get isCancelled() {
|
|
316
|
-
return inner?.isCancelled ?? false;
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Prompt for yes/no confirmation on stderr. Returns true if confirmed.
|
|
322
|
-
* In non-interactive mode or when cancelled (Ctrl-C), returns false.
|
|
323
|
-
*/
|
|
324
|
-
async confirm(message) {
|
|
325
|
-
if (!this.isInteractive) return false;
|
|
326
|
-
const result = await clack.confirm({
|
|
327
|
-
message,
|
|
328
|
-
...TerminalUI.stderrOpts
|
|
329
|
-
});
|
|
330
|
-
if (clack.isCancel(result)) return false;
|
|
331
|
-
return result;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Write a raw line to stderr. No-op when piped unless forcePretty.
|
|
335
|
-
* Use for decoration that doesn't fit Clack's log format (e.g. styled headers).
|
|
336
|
-
*/
|
|
337
|
-
stderr(message) {
|
|
338
|
-
if (!this.shouldDecorate) return;
|
|
339
|
-
process.stderr.write(`${message}\n`);
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Write machine-readable data to stdout.
|
|
343
|
-
* Always writes — if a command calls output(), there is data to emit.
|
|
344
|
-
*
|
|
345
|
-
* This is what scripts and pipes capture: `prisma-next db verify --json | jq .ok`
|
|
346
|
-
*/
|
|
347
|
-
output(data) {
|
|
348
|
-
process.stdout.write(`${data}\n`);
|
|
349
|
-
}
|
|
350
|
-
green(text) {
|
|
351
|
-
return this.useColor ? green(text) : text;
|
|
352
|
-
}
|
|
353
|
-
red(text) {
|
|
354
|
-
return this.useColor ? red(text) : text;
|
|
355
|
-
}
|
|
356
|
-
cyan(text) {
|
|
357
|
-
return this.useColor ? cyan(text) : text;
|
|
358
|
-
}
|
|
359
|
-
dim(text) {
|
|
360
|
-
return this.useColor ? dim(text) : text;
|
|
361
|
-
}
|
|
362
|
-
bold(text) {
|
|
363
|
-
return this.useColor ? bold(text) : text;
|
|
364
|
-
}
|
|
365
|
-
yellow(text) {
|
|
366
|
-
return this.useColor ? yellow(text) : text;
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
function createTerminalUI(flags) {
|
|
370
|
-
return new TerminalUI({
|
|
371
|
-
color: flags.color,
|
|
372
|
-
interactive: flags.interactive,
|
|
373
|
-
forcePretty: flags.format === "pretty" && flags.explicitFormat
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
//#endregion
|
|
377
|
-
export { isCI$1 as a, isVerbose as c, formatErrorOutput as i, installShutdownHandlers as n, createColorFormatter as o, formatErrorJson as r, formatDim as s, createTerminalUI as t };
|
|
378
|
-
|
|
379
|
-
//# sourceMappingURL=terminal-ui-BiB_8KNo.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-ui-BiB_8KNo.mjs","names":["isCI","ciInfoIsCI"],"sources":["../src/utils/formatters/helpers.ts","../src/utils/is-ci.ts","../src/utils/formatters/errors.ts","../src/utils/shutdown.ts","../src/utils/terminal-ui.ts"],"sourcesContent":["import { dim } from 'colorette';\n\nimport type { GlobalFlags } from '../global-flags';\n\n/**\n * Checks if verbose output is enabled at the specified level.\n */\nexport function isVerbose(flags: GlobalFlags, level: 1 | 2): boolean {\n return (flags.verbose ?? 0) >= level;\n}\n\n/**\n * Creates a color-aware formatter function.\n * Returns a function that applies the color only if colors are enabled.\n */\nexport function createColorFormatter<T extends (text: string) => string>(\n useColor: boolean,\n colorFn: T,\n): (text: string) => string {\n return useColor ? colorFn : (text: string) => text;\n}\n\n/**\n * Formats text with dim styling if colors are enabled.\n */\nexport function formatDim(useColor: boolean, text: string): string {\n return useColor ? dim(text) : text;\n}\n","import { isCI as ciInfoIsCI } from 'ci-info';\n\n/**\n * Returns true when the process is running in any CI environment recognised\n * by the `ci-info` package. The single source of truth for CI detection\n * across this CLI — colour-output suppression and telemetry-skip both call\n * this helper, so neither path drifts from the other when a new CI provider\n * is added upstream.\n *\n * `ci-info` checks the standard `CI=true` marker plus dozens of\n * provider-specific environment variables (Buildkite, Jenkins, Drone,\n * Bitbucket Pipelines, Azure Pipelines, AWS CodeBuild, …) that the raw\n * `process.env.CI` read misses.\n *\n */\nexport function isCI(): boolean {\n return ciInfoIsCI;\n}\n","import { red } from 'colorette';\n\nimport type { CliErrorConflict, CliErrorEnvelope } from '../cli-errors';\nimport type { GlobalFlags } from '../global-flags';\nimport { createColorFormatter, formatDim, isVerbose } from './helpers';\n\n/**\n * Formats error output for human-readable display.\n */\nexport function formatErrorOutput(error: CliErrorEnvelope, flags: GlobalFlags): string {\n const lines: string[] = [];\n\n const useColor = flags.color !== false;\n const formatRed = createColorFormatter(useColor, red);\n const formatDimText = (text: string) => formatDim(useColor, text);\n\n lines.push(`${formatRed('✖')} ${error.summary} (${error.code})`);\n\n if (error.why) {\n lines.push(`${formatDimText(` Why: ${error.why}`)}`);\n }\n if (error.fix) {\n lines.push(`${formatDimText(` Fix: ${error.fix}`)}`);\n }\n if (error.where?.path) {\n const whereLine = error.where.line\n ? `${error.where.path}:${error.where.line}`\n : error.where.path;\n lines.push(`${formatDimText(` Where: ${whereLine}`)}`);\n }\n // Show conflicts list if present (always show a short list; show full list when verbose)\n if (error.meta?.['conflicts']) {\n const conflicts = error.meta['conflicts'] as readonly CliErrorConflict[];\n if (conflicts.length > 0) {\n const maxToShow = isVerbose(flags, 1) ? conflicts.length : Math.min(3, conflicts.length);\n const header = isVerbose(flags, 1)\n ? ' Conflicts:'\n : ` Conflicts (showing ${maxToShow} of ${conflicts.length}):`;\n lines.push(`${formatDimText(header)}`);\n for (const conflict of conflicts.slice(0, maxToShow)) {\n lines.push(`${formatDimText(` - [${conflict.kind}] ${conflict.summary}`)}`);\n }\n if (!isVerbose(flags, 1) && conflicts.length > maxToShow) {\n lines.push(`${formatDimText(' Re-run with -v/--verbose to see all conflicts')}`);\n }\n }\n }\n // Show issues list if present (always show a short list; show full list when verbose)\n if (error.meta?.['issues']) {\n const issues = error.meta['issues'] as readonly { kind?: string; message?: string }[];\n if (issues.length > 0) {\n const maxToShow = isVerbose(flags, 1) ? issues.length : Math.min(3, issues.length);\n const header = isVerbose(flags, 1)\n ? ' Issues:'\n : ` Issues (showing ${maxToShow} of ${issues.length}):`;\n lines.push(`${formatDimText(header)}`);\n for (const issue of issues.slice(0, maxToShow)) {\n const kind = issue.kind ?? 'issue';\n const message = issue.message ?? '';\n lines.push(`${formatDimText(` - [${kind}] ${message}`)}`);\n }\n if (!isVerbose(flags, 1) && issues.length > maxToShow) {\n lines.push(`${formatDimText(' Re-run with -v/--verbose to see all issues')}`);\n }\n }\n }\n if (error.docsUrl && isVerbose(flags, 1)) {\n lines.push(formatDimText(error.docsUrl));\n }\n if (isVerbose(flags, 2) && error.meta) {\n lines.push(`${formatDimText(` Meta: ${JSON.stringify(error.meta, null, 2)}`)}`);\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Formats error output as JSON.\n */\nexport function formatErrorJson(error: CliErrorEnvelope): string {\n return JSON.stringify(error, null, 2);\n}\n","/**\n * Global shutdown controller for graceful SIGINT/SIGTERM handling.\n *\n * The CLI installs signal handlers once at startup. When a signal fires:\n * 1. The AbortController is aborted — in-flight async work (DB queries, emit) can check `signal.aborted`.\n * 2. A 3-second grace timer starts — gives `finally` blocks time to close connections.\n * 3. If the process hasn't exited by then, force-exit with code 130 (128 + SIGINT).\n * 4. A second signal during the grace period force-exits immediately.\n */\n\n/**\n * Creates a shutdown handler with its own AbortController.\n * Exposed for testing — production code uses the singleton below.\n */\nexport interface ShutdownHandler {\n readonly signal: AbortSignal;\n readonly isShuttingDown: () => boolean;\n readonly onSignal: () => void;\n readonly clearGraceTimer: () => void;\n}\n\nexport function createShutdownHandler(options?: {\n readonly exit?: (code: number) => void;\n readonly gracePeriodMs?: number;\n}): ShutdownHandler {\n const exit = options?.exit ?? ((code: number) => process.exit(code));\n const gracePeriodMs = options?.gracePeriodMs ?? 3000;\n\n const controller = new AbortController();\n let shuttingDown = false;\n let graceTimer: ReturnType<typeof setTimeout> | undefined;\n\n const onSignal = () => {\n if (shuttingDown) {\n // Second signal — force exit\n exit(130);\n return;\n }\n shuttingDown = true;\n controller.abort();\n\n // Give finally blocks time to clean up, then force-exit\n graceTimer = setTimeout(() => exit(130), gracePeriodMs);\n graceTimer.unref();\n };\n\n return {\n signal: controller.signal,\n isShuttingDown: () => shuttingDown,\n onSignal,\n clearGraceTimer: () => {\n if (graceTimer !== undefined) {\n clearTimeout(graceTimer);\n graceTimer = undefined;\n }\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Singleton for production use\n// ---------------------------------------------------------------------------\n\nconst globalHandler = createShutdownHandler();\n\n/**\n * The global AbortSignal. Pass this to any async operation that should\n * be cancellable on Ctrl+C (e.g., DB queries, long-running emit).\n */\nexport const shutdownSignal: AbortSignal = globalHandler.signal;\n\n/**\n * Whether a shutdown has been initiated.\n */\nexport function isShuttingDown(): boolean {\n return globalHandler.isShuttingDown();\n}\n\n/**\n * Installs SIGINT and SIGTERM handlers. Call once at CLI startup.\n *\n * - First signal: aborts the controller, starts a 3s grace timer.\n * - Second signal: force-exits immediately.\n */\nlet installed = false;\n\nexport function installShutdownHandlers(): void {\n if (installed) return;\n installed = true;\n process.on('SIGINT', globalHandler.onSignal);\n process.on('SIGTERM', globalHandler.onSignal);\n}\n","import * as clack from '@clack/prompts';\nimport { bold, cyan, dim, green, red, yellow } from 'colorette';\nimport type { GlobalFlags } from './global-flags';\nimport { shutdownSignal } from './shutdown';\n\n/**\n * Composable CLI output abstraction.\n *\n * Follows the Unix convention of separating data from decoration:\n * - **stdout** — data output only (`ui.output()`). This is what scripts and pipes capture.\n * - **stderr** — all decoration (spinners, logs, notes, intro/outro). Visible in terminal, invisible in pipes.\n *\n * Rules:\n * 1. All methods except `output()` and `error()` write to stderr only in interactive mode.\n * 2. `output(data)` always writes to stdout — if a command calls it, there is data to emit.\n * 3. `error()` always writes to stderr — errors matter even when piped.\n * 4. Decoration is suppressed when piped unless `--format pretty` was explicit (`forcePretty`).\n * 5. Never write data to stderr — decoration methods are for human context only.\n * 6. Never write decoration to stdout — it breaks pipes, `$(...)` captures, and `> file` redirects.\n */\nexport class TerminalUI {\n /**\n * True when stdout is a TTY (interactive terminal).\n * False when piped (e.g., `prisma-next db verify | jq`).\n */\n readonly isInteractive: boolean;\n\n /**\n * Whether color output is enabled.\n */\n readonly useColor: boolean;\n\n /**\n * When true, decoration methods write even on non-TTY stdout\n * (explicit `--format pretty`).\n */\n readonly forcePretty: boolean;\n\n private static readonly stderrOpts = { output: process.stderr } as const;\n\n constructor(options?: {\n readonly color?: boolean | undefined;\n readonly interactive?: boolean | undefined;\n readonly forcePretty?: boolean | undefined;\n }) {\n // --interactive/--no-interactive override TTY detection\n this.isInteractive = options?.interactive ?? !!process.stdout.isTTY;\n this.forcePretty = options?.forcePretty ?? false;\n this.useColor = options?.color ?? (this.isInteractive || this.forcePretty);\n }\n\n private get shouldDecorate(): boolean {\n return this.isInteractive || this.forcePretty;\n }\n\n // ---------------------------------------------------------------------------\n // Decoration → stderr (interactive mode, or explicit --format pretty)\n // ---------------------------------------------------------------------------\n\n /**\n * Log a message line to stderr. No-op when piped unless forcePretty.\n */\n log(message: string): void {\n if (!this.shouldDecorate) return;\n clack.log.message(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Log a success message to stderr. No-op when piped unless forcePretty.\n */\n success(message: string): void {\n if (!this.shouldDecorate) return;\n clack.log.success(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Log a warning message to stderr. No-op when piped unless forcePretty.\n */\n warn(message: string): void {\n if (!this.shouldDecorate) return;\n clack.log.warn(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Log an error message to stderr. Always writes (errors matter even in pipes).\n */\n error(message: string): void {\n clack.log.error(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Log an info message to stderr. No-op when piped unless forcePretty.\n */\n info(message: string): void {\n if (!this.shouldDecorate) return;\n clack.log.info(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Log a step message to stderr. No-op when piped unless forcePretty.\n */\n step(message: string): void {\n if (!this.shouldDecorate) return;\n clack.log.step(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Display a note box on stderr. No-op when piped unless forcePretty.\n */\n note(message: string, title?: string): void {\n if (!this.shouldDecorate) return;\n clack.note(message, title, TerminalUI.stderrOpts);\n }\n\n /**\n * Display intro banner on stderr. No-op when piped unless forcePretty.\n */\n intro(title?: string): void {\n if (!this.shouldDecorate) return;\n clack.intro(title, TerminalUI.stderrOpts);\n }\n\n /**\n * Display outro banner on stderr. No-op when piped unless forcePretty.\n */\n outro(message?: string): void {\n if (!this.shouldDecorate) return;\n clack.outro(message, TerminalUI.stderrOpts);\n }\n\n /**\n * Create a Clack spinner on stderr with a 100ms delay threshold.\n * The spinner only appears if the operation takes longer than the threshold,\n * avoiding flicker for fast operations. Returns a no-op spinner when not decorating.\n */\n spinner(delayMs = 100): clack.SpinnerResult {\n const noop: clack.SpinnerResult = {\n start: () => {},\n stop: () => {},\n cancel: () => {},\n error: () => {},\n message: () => {},\n clear: () => {},\n get isCancelled() {\n return false;\n },\n };\n\n if (!this.shouldDecorate) {\n return noop;\n }\n\n // Wrap the real spinner with a delay: only show it after `delayMs`\n let inner: clack.SpinnerResult | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n let pendingMsg: string | undefined;\n let settled = false;\n\n const ensureCleared = () => {\n if (timer !== undefined) {\n clearTimeout(timer);\n timer = undefined;\n }\n };\n\n // Cancel the spinner if a shutdown signal fires\n const onAbort = () => {\n if (!settled) {\n settled = true;\n ensureCleared();\n if (inner) {\n inner.cancel('Interrupted');\n }\n }\n };\n if (!shutdownSignal.aborted) {\n shutdownSignal.addEventListener('abort', onAbort, { once: true });\n }\n\n return {\n start(msg?: string) {\n pendingMsg = msg;\n timer = setTimeout(() => {\n if (!settled) {\n inner = clack.spinner(TerminalUI.stderrOpts);\n inner.start(pendingMsg);\n }\n }, delayMs);\n },\n stop(msg?: string) {\n settled = true;\n ensureCleared();\n if (inner) {\n inner.stop(msg);\n }\n },\n cancel(msg?: string) {\n settled = true;\n ensureCleared();\n if (inner) {\n inner.cancel(msg);\n }\n },\n error(msg?: string) {\n settled = true;\n ensureCleared();\n if (inner) {\n inner.error(msg);\n }\n },\n message(msg?: string) {\n pendingMsg = msg;\n if (inner) {\n inner.message(msg);\n }\n },\n clear() {\n settled = true;\n ensureCleared();\n if (inner) {\n inner.clear();\n }\n },\n get isCancelled() {\n return inner?.isCancelled ?? false;\n },\n };\n }\n\n /**\n * Prompt for yes/no confirmation on stderr. Returns true if confirmed.\n * In non-interactive mode or when cancelled (Ctrl-C), returns false.\n */\n async confirm(message: string): Promise<boolean> {\n if (!this.isInteractive) return false;\n const result = await clack.confirm({\n message,\n ...TerminalUI.stderrOpts,\n });\n if (clack.isCancel(result)) return false;\n return result;\n }\n\n /**\n * Write a raw line to stderr. No-op when piped unless forcePretty.\n * Use for decoration that doesn't fit Clack's log format (e.g. styled headers).\n */\n stderr(message: string): void {\n if (!this.shouldDecorate) return;\n process.stderr.write(`${message}\\n`);\n }\n\n // ---------------------------------------------------------------------------\n // Data → stdout (only when piped)\n // ---------------------------------------------------------------------------\n\n /**\n * Write machine-readable data to stdout.\n * Always writes — if a command calls output(), there is data to emit.\n *\n * This is what scripts and pipes capture: `prisma-next db verify --json | jq .ok`\n */\n output(data: string): void {\n process.stdout.write(`${data}\\n`);\n }\n\n // ---------------------------------------------------------------------------\n // Color helpers\n // ---------------------------------------------------------------------------\n\n green(text: string): string {\n return this.useColor ? green(text) : text;\n }\n red(text: string): string {\n return this.useColor ? red(text) : text;\n }\n cyan(text: string): string {\n return this.useColor ? cyan(text) : text;\n }\n dim(text: string): string {\n return this.useColor ? dim(text) : text;\n }\n bold(text: string): string {\n return this.useColor ? bold(text) : text;\n }\n yellow(text: string): string {\n return this.useColor ? yellow(text) : text;\n }\n}\n\nexport function createTerminalUI(flags: GlobalFlags): TerminalUI {\n return new TerminalUI({\n color: flags.color,\n interactive: flags.interactive,\n forcePretty: flags.format === 'pretty' && flags.explicitFormat,\n });\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,UAAU,OAAoB,OAAuB;CACnE,QAAQ,MAAM,WAAW,MAAM;;;;;;AAOjC,SAAgB,qBACd,UACA,SAC0B;CAC1B,OAAO,WAAW,WAAW,SAAiB;;;;;AAMhD,SAAgB,UAAU,UAAmB,MAAsB;CACjE,OAAO,WAAW,IAAI,KAAK,GAAG;;;;;;;;;;;;;;;;;ACXhC,SAAgBA,SAAgB;CAC9B,OAAOC;;;;;;;ACPT,SAAgB,kBAAkB,OAAyB,OAA4B;CACrF,MAAM,QAAkB,EAAE;CAE1B,MAA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