@prisma/cli 3.0.0-beta.0 → 3.0.0-beta.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 +13 -0
- package/dist/commands/app/index.js +6 -5
- package/dist/commands/project/index.js +28 -2
- package/dist/controllers/app-env.js +6 -8
- package/dist/controllers/app.js +283 -261
- package/dist/controllers/project.js +179 -21
- package/dist/lib/app/deploy-output.js +10 -1
- package/dist/lib/auth/auth-ops.js +49 -8
- package/dist/lib/project/interactive-setup.js +56 -0
- package/dist/lib/project/resolution.js +126 -97
- package/dist/lib/project/setup.js +89 -0
- package/dist/presenters/auth.js +19 -6
- package/dist/presenters/project.js +66 -37
- package/dist/shell/command-arguments.js +6 -0
- package/dist/shell/command-meta.js +36 -3
- package/dist/shell/command-runner.js +4 -2
- package/dist/shell/errors.js +2 -0
- package/dist/shell/output.js +3 -1
- package/dist/use-cases/auth.js +15 -4
- package/dist/use-cases/project.js +2 -1
- package/package.json +2 -2
package/dist/shell/output.js
CHANGED
|
@@ -3,6 +3,7 @@ import { renderNextSteps, renderSummaryLine } from "./ui.js";
|
|
|
3
3
|
function writeJsonSuccess(output, success) {
|
|
4
4
|
output.stdout.write(`${JSON.stringify({
|
|
5
5
|
ok: true,
|
|
6
|
+
nextActions: [],
|
|
6
7
|
...success
|
|
7
8
|
}, null, 2)}\n`);
|
|
8
9
|
}
|
|
@@ -28,7 +29,8 @@ function writeJsonError(output, command, error) {
|
|
|
28
29
|
command,
|
|
29
30
|
error: cliErrorToJson(error),
|
|
30
31
|
warnings: [],
|
|
31
|
-
nextSteps: error.nextSteps
|
|
32
|
+
nextSteps: error.nextSteps,
|
|
33
|
+
nextActions: error.nextActions
|
|
32
34
|
}, null, 2)}\n`);
|
|
33
35
|
}
|
|
34
36
|
function writeHumanLines(output, lines) {
|
package/dist/use-cases/auth.js
CHANGED
|
@@ -45,7 +45,8 @@ async function resolveCurrentAuthState(dependencies) {
|
|
|
45
45
|
authenticated: false,
|
|
46
46
|
provider: null,
|
|
47
47
|
user: null,
|
|
48
|
-
workspace: null
|
|
48
|
+
workspace: null,
|
|
49
|
+
credential: null
|
|
49
50
|
};
|
|
50
51
|
const provider = dependencies.identityGateway.getProvider(session.provider);
|
|
51
52
|
const user = dependencies.identityGateway.getUser(session.userId);
|
|
@@ -54,13 +55,23 @@ async function resolveCurrentAuthState(dependencies) {
|
|
|
54
55
|
authenticated: false,
|
|
55
56
|
provider: null,
|
|
56
57
|
user: null,
|
|
57
|
-
workspace: null
|
|
58
|
+
workspace: null,
|
|
59
|
+
credential: null
|
|
58
60
|
};
|
|
59
61
|
return {
|
|
60
62
|
authenticated: true,
|
|
61
63
|
provider: provider.id,
|
|
62
|
-
user: {
|
|
63
|
-
|
|
64
|
+
user: {
|
|
65
|
+
id: user.id,
|
|
66
|
+
email: user.email,
|
|
67
|
+
name: user.name
|
|
68
|
+
},
|
|
69
|
+
workspace,
|
|
70
|
+
credential: {
|
|
71
|
+
type: "oauth",
|
|
72
|
+
id: null,
|
|
73
|
+
name: null
|
|
74
|
+
}
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "Command-line interface for the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@prisma/compute-sdk": "^0.19.0",
|
|
40
40
|
"c12": "4.0.0-beta.4",
|
|
41
41
|
"@prisma/credentials-store": "^7.7.0",
|
|
42
|
-
"@prisma/management-api-sdk": "^1.
|
|
42
|
+
"@prisma/management-api-sdk": "^1.34.0",
|
|
43
43
|
"colorette": "^2.0.20",
|
|
44
44
|
"commander": "^12.1.0",
|
|
45
45
|
"magicast": "^0.3.5",
|