@prisma/cli 3.0.0-beta.8 → 3.0.0-beta.9

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.
@@ -31,13 +31,20 @@ async function runCommand(runtime, commandName, options, handler, presenter) {
31
31
  });
32
32
  return;
33
33
  }
34
- if (flags.quiet) return;
34
+ const stdout = presenter.renderStdout?.(context, descriptor, success.result) ?? [];
35
+ if (flags.quiet) {
36
+ if (stdout.length > 0) context.output.stdout.write(`${stdout.join("\n")}\n`);
37
+ return;
38
+ }
35
39
  const rendered = presenter.renderHuman(context, descriptor, success.result);
36
40
  const diagnostics = await renderBestEffortCommandDiagnostics(context, {
37
41
  enabled: flags.verbose && rendered.length > 0,
38
42
  durationMs: Date.now() - startedAt
39
43
  });
40
- writeHumanLines(context.output, [...rendered, ...diagnostics]);
44
+ const humanLines = [...rendered, ...diagnostics];
45
+ if (stdout.length > 0 && humanLines.length > 0) humanLines.push("");
46
+ writeHumanLines(context.output, humanLines);
47
+ if (stdout.length > 0) context.output.stdout.write(`${stdout.join("\n")}\n`);
41
48
  } catch (error) {
42
49
  const cliError = toCliError(error, runtime);
43
50
  if (cliError) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0-beta.9",
4
4
  "description": "Command-line interface for the Prisma Developer Platform.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,6 +39,7 @@
39
39
  "@prisma/compute-sdk": "^0.22.0",
40
40
  "@prisma/credentials-store": "^7.8.0",
41
41
  "@prisma/management-api-sdk": "^1.37.0",
42
+ "better-result": "^2.9.2",
42
43
  "c12": "4.0.0-beta.5",
43
44
  "colorette": "^2.0.20",
44
45
  "commander": "^14.0.3",