@prisma/cli 3.0.0-dev.99.1 → 8.0.0-rc.2
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 +3 -1
- package/dist/cli.js +15115 -16
- package/dist/deploy-framework-C7bQM00A.js +23 -0
- package/dist/payload-B88Qvzxk-CrtTXSOe.js +34 -0
- package/dist/sender.js +192 -0
- package/package.json +22 -18
- package/dist/adapters/git.js +0 -54
- package/dist/adapters/local-state.js +0 -144
- package/dist/adapters/mock-api.js +0 -136
- package/dist/adapters/token-storage.js +0 -418
- package/dist/cli2.js +0 -119
- package/dist/commands/app/index.js +0 -345
- package/dist/commands/auth/index.js +0 -96
- package/dist/commands/branch/index.js +0 -27
- package/dist/commands/database/index.js +0 -159
- package/dist/commands/env.js +0 -99
- package/dist/commands/git/index.js +0 -36
- package/dist/commands/project/index.js +0 -69
- package/dist/commands/version/index.js +0 -18
- package/dist/controllers/app-env-api.js +0 -54
- package/dist/controllers/app-env-file.js +0 -181
- package/dist/controllers/app-env.js +0 -502
- package/dist/controllers/app.js +0 -2443
- package/dist/controllers/auth.js +0 -316
- package/dist/controllers/branch.js +0 -103
- package/dist/controllers/database.js +0 -318
- package/dist/controllers/project.js +0 -731
- package/dist/controllers/select-prompt-port.js +0 -12
- package/dist/controllers/version.js +0 -12
- package/dist/lib/app/app-interaction.js +0 -5
- package/dist/lib/app/app-provider.js +0 -544
- package/dist/lib/app/branch-database-api.js +0 -102
- package/dist/lib/app/branch-database-deploy.js +0 -325
- package/dist/lib/app/branch-database.js +0 -215
- package/dist/lib/app/build-settings.js +0 -93
- package/dist/lib/app/build.js +0 -80
- package/dist/lib/app/bun-project.js +0 -45
- package/dist/lib/app/compute-config.js +0 -147
- package/dist/lib/app/deploy-output.js +0 -24
- package/dist/lib/app/deploy-plan.js +0 -58
- package/dist/lib/app/deploy-progress.js +0 -100
- package/dist/lib/app/domain-guidance.js +0 -14
- package/dist/lib/app/env-config.js +0 -67
- package/dist/lib/app/env-file.js +0 -82
- package/dist/lib/app/env-vars.js +0 -50
- package/dist/lib/app/local-dev.js +0 -109
- package/dist/lib/app/production-deploy-gate.js +0 -161
- package/dist/lib/app/read-branch.js +0 -30
- package/dist/lib/auth/auth-ops.js +0 -158
- package/dist/lib/auth/client.js +0 -22
- package/dist/lib/auth/guard.js +0 -38
- package/dist/lib/auth/login.js +0 -330
- package/dist/lib/database/provider.js +0 -167
- package/dist/lib/diagnostics.js +0 -15
- package/dist/lib/fs/home-path.js +0 -24
- package/dist/lib/git/local-branch.js +0 -53
- package/dist/lib/git/local-status.js +0 -57
- package/dist/lib/project/interactive-setup.js +0 -56
- package/dist/lib/project/local-pin.js +0 -200
- package/dist/lib/project/resolution.js +0 -386
- package/dist/lib/project/setup.js +0 -135
- package/dist/lib/version.js +0 -55
- package/dist/output/patterns.js +0 -90
- package/dist/presenters/app-env.js +0 -265
- package/dist/presenters/app.js +0 -646
- package/dist/presenters/auth.js +0 -183
- package/dist/presenters/branch.js +0 -46
- package/dist/presenters/database.js +0 -274
- package/dist/presenters/project.js +0 -174
- package/dist/presenters/verbose-context.js +0 -64
- package/dist/presenters/version.js +0 -29
- package/dist/shell/command-arguments.js +0 -6
- package/dist/shell/command-meta.js +0 -622
- package/dist/shell/command-runner.js +0 -112
- package/dist/shell/diagnostics-output.js +0 -57
- package/dist/shell/errors.js +0 -134
- package/dist/shell/global-flags.js +0 -37
- package/dist/shell/help.js +0 -89
- package/dist/shell/output.js +0 -82
- package/dist/shell/prompt.js +0 -41
- package/dist/shell/runtime.js +0 -55
- package/dist/shell/ui.js +0 -116
- package/dist/shell/update-check.js +0 -247
- package/dist/use-cases/auth.js +0 -145
- package/dist/use-cases/branch.js +0 -47
- package/dist/use-cases/create-cli-gateways.js +0 -68
- 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 };
|