@prisma/cli 3.0.0-dev.104.1 → 3.0.0-dev.107.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.
- package/dist/adapters/local-state.js +14 -3
- package/dist/adapters/token-storage.js +1 -1
- package/dist/cli2.js +4 -2
- package/dist/commands/agent/index.js +60 -0
- package/dist/commands/app/index.js +2 -2
- package/dist/commands/auth/index.js +1 -1
- package/dist/commands/git/index.js +1 -1
- package/dist/commands/project/index.js +1 -1
- package/dist/controllers/agent.js +228 -0
- package/dist/controllers/app.js +59 -9
- package/dist/controllers/auth.js +38 -3
- package/dist/controllers/project.js +2 -2
- package/dist/controllers/select-prompt-port.js +1 -0
- package/dist/lib/agent/cli-command.js +17 -0
- package/dist/lib/agent/constants.js +12 -0
- package/dist/lib/agent/package-manager.js +99 -0
- package/dist/lib/agent/setup-status.js +83 -0
- package/dist/lib/app/app-provider.js +3 -3
- package/dist/lib/app/branch-database-deploy.js +3 -2
- package/dist/lib/app/branch-database.js +2 -1
- package/dist/lib/app/build-settings.js +1 -1
- package/dist/lib/app/build.js +2 -2
- package/dist/lib/app/bun-project.js +1 -1
- package/dist/lib/app/compute-config.js +1 -1
- package/dist/lib/app/env-file.js +1 -1
- package/dist/lib/app/local-dev.js +1 -1
- package/dist/lib/app/production-deploy-gate.js +2 -1
- package/dist/lib/auth/login.js +1 -1
- package/dist/lib/git/local-branch.js +1 -1
- package/dist/lib/project/interactive-setup.js +1 -0
- package/dist/lib/project/local-pin.js +1 -1
- package/dist/lib/project/resolution.js +2 -2
- package/dist/lib/project/setup.js +1 -1
- package/dist/presenters/agent.js +74 -0
- package/dist/presenters/auth.js +1 -1
- package/dist/presenters/project.js +1 -1
- package/dist/shell/cli-command.js +12 -0
- package/dist/shell/command-arguments.js +7 -1
- package/dist/shell/command-meta.js +71 -0
- package/dist/shell/command-runner.js +1 -1
- package/dist/shell/help.js +6 -5
- package/dist/shell/prompt.js +7 -3
- package/dist/shell/runtime.js +2 -2
- package/dist/shell/update-check.js +2 -2
- package/package.json +3 -2
package/dist/shell/prompt.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { usageError } from "./errors.js";
|
|
2
2
|
import { confirm, isCancel, select, text } from "@clack/prompts";
|
|
3
3
|
//#region src/shell/prompt.ts
|
|
4
|
+
const PROMPT_CANCELED_SUMMARY = "Interactive prompt canceled";
|
|
4
5
|
async function selectPrompt(options) {
|
|
5
6
|
const promptOptions = options.choices.map((choice) => ({
|
|
6
7
|
label: choice.label,
|
|
@@ -9,31 +10,34 @@ async function selectPrompt(options) {
|
|
|
9
10
|
const response = await select({
|
|
10
11
|
input: options.input,
|
|
11
12
|
output: options.output,
|
|
13
|
+
signal: options.signal,
|
|
12
14
|
message: options.message,
|
|
13
15
|
options: promptOptions
|
|
14
16
|
});
|
|
15
|
-
if (isCancel(response)) throw usageError(
|
|
17
|
+
if (isCancel(response)) throw usageError(PROMPT_CANCELED_SUMMARY, "The command was canceled before a selection was made.", "Re-run the command and choose an option to continue.");
|
|
16
18
|
return response;
|
|
17
19
|
}
|
|
18
20
|
async function textPrompt(options) {
|
|
19
21
|
const response = await text({
|
|
20
22
|
input: options.input,
|
|
21
23
|
output: options.output,
|
|
24
|
+
signal: options.signal,
|
|
22
25
|
message: options.message,
|
|
23
26
|
placeholder: options.placeholder,
|
|
24
27
|
validate: options.validate
|
|
25
28
|
});
|
|
26
|
-
if (isCancel(response)) throw usageError(
|
|
29
|
+
if (isCancel(response)) throw usageError(PROMPT_CANCELED_SUMMARY, "The command was canceled before a value was entered.", "Re-run the command and provide a value to continue.");
|
|
27
30
|
return response;
|
|
28
31
|
}
|
|
29
32
|
async function confirmPrompt(options) {
|
|
30
33
|
const response = await confirm({
|
|
31
34
|
input: options.input,
|
|
32
35
|
output: options.output,
|
|
36
|
+
signal: options.signal,
|
|
33
37
|
message: options.message,
|
|
34
38
|
initialValue: options.initialValue ?? false
|
|
35
39
|
});
|
|
36
|
-
if (isCancel(response)) throw usageError(
|
|
40
|
+
if (isCancel(response)) throw usageError(PROMPT_CANCELED_SUMMARY, "The command was canceled before a confirmation was made.", "Re-run the command and choose an option to continue.");
|
|
37
41
|
return response;
|
|
38
42
|
}
|
|
39
43
|
function disposePromptState(_input) {}
|
package/dist/shell/runtime.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { createShellUi } from "./ui.js";
|
|
1
2
|
import { LocalStateStore } from "../adapters/local-state.js";
|
|
2
3
|
import { MockApi } from "../adapters/mock-api.js";
|
|
3
|
-
import { createShellUi } from "./ui.js";
|
|
4
4
|
import { renderHelp } from "./help.js";
|
|
5
|
-
import { findComputeConfigDir } from "@prisma/compute-sdk/config";
|
|
6
5
|
import path from "node:path";
|
|
6
|
+
import { findComputeConfigDir } from "@prisma/compute-sdk/config";
|
|
7
7
|
//#region src/shell/runtime.ts
|
|
8
8
|
const DEFAULT_STATE_DIR_NAME = path.join(".prisma", "cli");
|
|
9
9
|
function configureRuntimeCommand(command, runtime) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getCliName, getCliVersion } from "../lib/version.js";
|
|
2
|
-
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
3
2
|
import path from "node:path";
|
|
3
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
4
5
|
import { randomUUID } from "node:crypto";
|
|
5
6
|
import os from "node:os";
|
|
6
|
-
import { spawn } from "node:child_process";
|
|
7
7
|
//#region src/shell/update-check.ts
|
|
8
8
|
const UPDATE_CHECK_FILE_NAME = "update-check.json";
|
|
9
9
|
const FALLBACK_INSTALL_DOCS_URL = "https://www.prisma.io/docs/orm/tools/prisma-cli";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.107.1",
|
|
4
4
|
"description": "Command-line interface for the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,11 +46,12 @@
|
|
|
46
46
|
"@clack/prompts": "^1.5.0",
|
|
47
47
|
"@prisma/compute-sdk": "0.31.0",
|
|
48
48
|
"@prisma/credentials-store": "^7.8.0",
|
|
49
|
-
"@prisma/management-api-sdk": "^1.
|
|
49
|
+
"@prisma/management-api-sdk": "^1.46.0",
|
|
50
50
|
"better-result": "^2.9.2",
|
|
51
51
|
"colorette": "^2.0.20",
|
|
52
52
|
"commander": "^14.0.3",
|
|
53
53
|
"dotenv": "^17.4.2",
|
|
54
|
+
"execa": "^9.6.1",
|
|
54
55
|
"magicast": "^0.5.3",
|
|
55
56
|
"open": "^11.0.0",
|
|
56
57
|
"string-width": "^8.2.1",
|