@prisma/cli 3.0.0-dev.99.1 → 8.0.0-rc.10-dev.80

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.
Files changed (86) hide show
  1. package/README.md +26 -28
  2. package/dist/cli.js +14551 -16
  3. package/dist/payload-B88Qvzxk-CrtTXSOe.js +34 -0
  4. package/dist/sender.js +192 -0
  5. package/package.json +26 -19
  6. package/dist/adapters/git.js +0 -54
  7. package/dist/adapters/local-state.js +0 -144
  8. package/dist/adapters/mock-api.js +0 -136
  9. package/dist/adapters/token-storage.js +0 -418
  10. package/dist/cli2.js +0 -119
  11. package/dist/commands/app/index.js +0 -345
  12. package/dist/commands/auth/index.js +0 -96
  13. package/dist/commands/branch/index.js +0 -27
  14. package/dist/commands/database/index.js +0 -159
  15. package/dist/commands/env.js +0 -99
  16. package/dist/commands/git/index.js +0 -36
  17. package/dist/commands/project/index.js +0 -69
  18. package/dist/commands/version/index.js +0 -18
  19. package/dist/controllers/app-env-api.js +0 -54
  20. package/dist/controllers/app-env-file.js +0 -181
  21. package/dist/controllers/app-env.js +0 -502
  22. package/dist/controllers/app.js +0 -2443
  23. package/dist/controllers/auth.js +0 -316
  24. package/dist/controllers/branch.js +0 -103
  25. package/dist/controllers/database.js +0 -318
  26. package/dist/controllers/project.js +0 -731
  27. package/dist/controllers/select-prompt-port.js +0 -12
  28. package/dist/controllers/version.js +0 -12
  29. package/dist/lib/app/app-interaction.js +0 -5
  30. package/dist/lib/app/app-provider.js +0 -544
  31. package/dist/lib/app/branch-database-api.js +0 -102
  32. package/dist/lib/app/branch-database-deploy.js +0 -325
  33. package/dist/lib/app/branch-database.js +0 -215
  34. package/dist/lib/app/build-settings.js +0 -93
  35. package/dist/lib/app/build.js +0 -80
  36. package/dist/lib/app/bun-project.js +0 -45
  37. package/dist/lib/app/compute-config.js +0 -147
  38. package/dist/lib/app/deploy-output.js +0 -24
  39. package/dist/lib/app/deploy-plan.js +0 -58
  40. package/dist/lib/app/deploy-progress.js +0 -100
  41. package/dist/lib/app/domain-guidance.js +0 -14
  42. package/dist/lib/app/env-config.js +0 -67
  43. package/dist/lib/app/env-file.js +0 -82
  44. package/dist/lib/app/env-vars.js +0 -50
  45. package/dist/lib/app/local-dev.js +0 -109
  46. package/dist/lib/app/production-deploy-gate.js +0 -161
  47. package/dist/lib/app/read-branch.js +0 -30
  48. package/dist/lib/auth/auth-ops.js +0 -158
  49. package/dist/lib/auth/client.js +0 -22
  50. package/dist/lib/auth/guard.js +0 -38
  51. package/dist/lib/auth/login.js +0 -330
  52. package/dist/lib/database/provider.js +0 -167
  53. package/dist/lib/diagnostics.js +0 -15
  54. package/dist/lib/fs/home-path.js +0 -24
  55. package/dist/lib/git/local-branch.js +0 -53
  56. package/dist/lib/git/local-status.js +0 -57
  57. package/dist/lib/project/interactive-setup.js +0 -56
  58. package/dist/lib/project/local-pin.js +0 -200
  59. package/dist/lib/project/resolution.js +0 -386
  60. package/dist/lib/project/setup.js +0 -135
  61. package/dist/lib/version.js +0 -55
  62. package/dist/output/patterns.js +0 -90
  63. package/dist/presenters/app-env.js +0 -265
  64. package/dist/presenters/app.js +0 -646
  65. package/dist/presenters/auth.js +0 -183
  66. package/dist/presenters/branch.js +0 -46
  67. package/dist/presenters/database.js +0 -274
  68. package/dist/presenters/project.js +0 -174
  69. package/dist/presenters/verbose-context.js +0 -64
  70. package/dist/presenters/version.js +0 -29
  71. package/dist/shell/command-arguments.js +0 -6
  72. package/dist/shell/command-meta.js +0 -622
  73. package/dist/shell/command-runner.js +0 -112
  74. package/dist/shell/diagnostics-output.js +0 -57
  75. package/dist/shell/errors.js +0 -134
  76. package/dist/shell/global-flags.js +0 -37
  77. package/dist/shell/help.js +0 -89
  78. package/dist/shell/output.js +0 -82
  79. package/dist/shell/prompt.js +0 -41
  80. package/dist/shell/runtime.js +0 -55
  81. package/dist/shell/ui.js +0 -116
  82. package/dist/shell/update-check.js +0 -247
  83. package/dist/use-cases/auth.js +0 -145
  84. package/dist/use-cases/branch.js +0 -47
  85. package/dist/use-cases/create-cli-gateways.js +0 -68
  86. package/dist/use-cases/project.js +0 -30
@@ -1,64 +0,0 @@
1
- import { renderVerboseBlock } from "../shell/ui.js";
2
- //#region src/presenters/verbose-context.ts
3
- function renderResolvedProjectContextBlock(ui, context, options = {}) {
4
- if (!context) return [];
5
- return renderVerboseBlock(ui, [...projectResolutionRows(context), ...options.extraRows ?? []], { title: options.title ?? "Resolved context" });
6
- }
7
- function projectResolutionRows(context) {
8
- return [
9
- {
10
- key: "workspace",
11
- value: context.workspace.name
12
- },
13
- {
14
- key: "workspace id",
15
- value: context.workspace.id,
16
- tone: "dim"
17
- },
18
- {
19
- key: "project",
20
- value: context.project.name
21
- },
22
- {
23
- key: "project id",
24
- value: context.project.id,
25
- tone: "dim"
26
- },
27
- {
28
- key: "project source",
29
- value: formatProjectSource(context.resolution.projectSource)
30
- },
31
- ...context.resolution.targetName ? [{
32
- key: "target name",
33
- value: formatTargetName(context.resolution)
34
- }] : [],
35
- ...context.branch ? [{
36
- key: "branch",
37
- value: `${context.branch.name} (${context.branch.kind})`
38
- }, ...context.branch.id ? [{
39
- key: "branch id",
40
- value: context.branch.id,
41
- tone: "dim"
42
- }] : []] : []
43
- ];
44
- }
45
- function stripVerboseContext(result) {
46
- const { verboseContext: _verboseContext, ...serialized } = result;
47
- return serialized;
48
- }
49
- function formatProjectSource(source) {
50
- switch (source) {
51
- case "explicit": return "--project";
52
- case "env": return "environment";
53
- case "local-pin": return ".prisma/local.json";
54
- case "platform-mapping": return "platform mapping";
55
- case "created": return "created";
56
- case "prompt": return "prompt";
57
- case "unbound": return "unbound";
58
- }
59
- }
60
- function formatTargetName(resolution) {
61
- return resolution.targetNameSource ? `${resolution.targetName} (${resolution.targetNameSource})` : String(resolution.targetName);
62
- }
63
- //#endregion
64
- export { renderResolvedProjectContextBlock, stripVerboseContext };
@@ -1,29 +0,0 @@
1
- import { renderShow } from "../output/patterns.js";
2
- //#region src/presenters/version.ts
3
- function renderVersionSuccess(context, descriptor, result) {
4
- return renderShow({
5
- title: "Showing CLI build and environment.",
6
- descriptor,
7
- fields: [
8
- {
9
- key: result.cli.name,
10
- value: result.cli.version
11
- },
12
- {
13
- key: "node",
14
- value: result.node.version
15
- },
16
- {
17
- key: "os",
18
- value: `${result.os.platform} ${result.os.arch}`
19
- },
20
- {
21
- key: "invocation",
22
- value: result.invocation,
23
- tone: result.invocation === "unknown" ? "dim" : "default"
24
- }
25
- ]
26
- }, context.ui);
27
- }
28
- //#endregion
29
- export { renderVersionSuccess };
@@ -1,6 +0,0 @@
1
- //#region src/shell/command-arguments.ts
2
- function formatCommandArgument(value) {
3
- return /^[A-Za-z0-9._/-]+$/.test(value) && !value.startsWith("-") ? value : `'${value.replace(/'/g, "'\\''")}'`;
4
- }
5
- //#endregion
6
- export { formatCommandArgument };