@prisma/cli 3.0.0-dev.43.1 → 3.0.0-dev.46.1

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.
@@ -8,7 +8,7 @@ import { confirmPrompt, selectPrompt, textPrompt } from "../shell/prompt.js";
8
8
  import { requireComputeAuth } from "../lib/auth/guard.js";
9
9
  import { readAuthState } from "../lib/auth/auth-ops.js";
10
10
  import { parseEnvAssignments } from "../lib/app/env-vars.js";
11
- import { renderDeployOutputRows } from "../lib/app/deploy-output.js";
11
+ import { renderDeployOutputRows, renderDeploySettingsPreview } from "../lib/app/deploy-output.js";
12
12
  import { readBunPackageEntrypoint, readBunPackageJson } from "../lib/app/bun-project.js";
13
13
  import { DEFAULT_LOCAL_DEV_PORT, resolveLocalBuildType, runLocalApp } from "../lib/app/local-dev.js";
14
14
  import { formatCommandArgument } from "../shell/command-arguments.js";
@@ -1629,10 +1629,14 @@ async function maybeCustomizeDeploySettings(context, options) {
1629
1629
  framework: options.framework,
1630
1630
  runtime: options.runtime
1631
1631
  };
1632
+ maybeRenderDeploySettingsPreview(context, {
1633
+ framework: options.framework,
1634
+ runtime: options.runtime
1635
+ });
1632
1636
  if (!await confirmPrompt({
1633
1637
  input: context.runtime.stdin,
1634
1638
  output: context.runtime.stderr,
1635
- message: "Customize settings?",
1639
+ message: "Customize build settings?",
1636
1640
  initialValue: false
1637
1641
  })) return {
1638
1642
  framework: options.framework,
@@ -1677,6 +1681,16 @@ async function maybeCustomizeDeploySettings(context, options) {
1677
1681
  runtime
1678
1682
  };
1679
1683
  }
1684
+ function maybeRenderDeploySettingsPreview(context, options) {
1685
+ if (context.flags.quiet || context.flags.json) return;
1686
+ context.output.stderr.write(`Detected ${options.framework.displayName}\n${renderDeploySettingsPreview(context.ui, [{
1687
+ key: "framework",
1688
+ value: options.framework.displayName
1689
+ }, {
1690
+ key: "runtime",
1691
+ value: `HTTP ${options.runtime.port}`
1692
+ }]).join("\n")}\n\n`);
1693
+ }
1680
1694
  function frameworkDisplayName(framework) {
1681
1695
  switch (framework) {
1682
1696
  case "nextjs": return "Next.js";
@@ -2,6 +2,7 @@ import { padDisplay } from "../../shell/ui.js";
2
2
  //#region src/lib/app/deploy-output.ts
3
3
  const DEPLOY_OUTPUT_MIN_LABEL_WIDTH = 9;
4
4
  const DEPLOY_OUTPUT_MIN_VALUE_WIDTH = 9;
5
+ const DEPLOY_SETTINGS_MIN_KEY_WIDTH = 10;
5
6
  function renderDeployOutputRows(ui, rows) {
6
7
  if (rows.length === 0) return [];
7
8
  const labelWidth = Math.max(DEPLOY_OUTPUT_MIN_LABEL_WIDTH, ...rows.map((row) => row.label.length));
@@ -11,5 +12,13 @@ function renderDeployOutputRows(ui, rows) {
11
12
  return ` ${padDisplay(row.label, labelWidth)} ${padDisplay(ui.strong(row.value), valueWidth)}${row.origin ? ` ${ui.dim(`· ${row.origin}`)}` : ""}`.trimEnd();
12
13
  });
13
14
  }
15
+ function renderDeploySettingsPreview(ui, rows) {
16
+ if (rows.length === 0) return [];
17
+ const keyWidth = Math.max(DEPLOY_SETTINGS_MIN_KEY_WIDTH, ...rows.map((row) => `${row.key}:`.length));
18
+ const rail = ui.dim("│");
19
+ return rows.map((row) => {
20
+ return `${rail} ${ui.accent(padDisplay(`${row.key}:`, keyWidth))} ${ui.strong(row.value)}`;
21
+ });
22
+ }
14
23
  //#endregion
15
- export { renderDeployOutputRows };
24
+ export { renderDeployOutputRows, renderDeploySettingsPreview };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli",
3
- "version": "3.0.0-dev.43.1",
3
+ "version": "3.0.0-dev.46.1",
4
4
  "description": "Command-line interface for the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {