@prisma/cli 8.0.0-rc.23 → 8.0.0-rc.23-dev.153
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/cli.js +138 -56
- package/package.json +8 -8
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
|
-
import { SERVICE_TOKEN_ENV_VAR, claimedExpiresAt, claimedIdentity, createCli, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfigSection, defineSessionCommand, detectCI, emptyServiceTokenError, flag, loadConfig, noSessionForWorkspaceError, positional, readActiveAccessToken, realpathOr, resolveSectionOverChain, telemetryCommandGroup } from "@prisma/cli-engine";
|
|
4
|
+
import { SERVICE_TOKEN_ENV_VAR, claimedExpiresAt, claimedIdentity, createCli, credentialWorkspaceId, credentialWorkspaceMismatchError, credentialsRequiredError, defineCommand, defineCommandFamily, defineConfigSection, defineSessionCommand, detectCI, emptyServiceTokenError, flag, loadConfig, noDataLines, noSessionForWorkspaceError, positional, readActiveAccessToken, realpathOr, resolveSectionOverChain, telemetryCommandGroup } from "@prisma/cli-engine";
|
|
5
5
|
import { createComposerFamily } from "@prisma/composer-cli/family";
|
|
6
6
|
import { ormCommandFamily } from "@prisma/orm-toolchain/cli";
|
|
7
7
|
import { CliStructuredError, notOk, ok } from "@prisma/cli-engine/protocol";
|
|
@@ -1633,6 +1633,13 @@ function environmentServiceToken(env) {
|
|
|
1633
1633
|
function environmentCredentialInForce(env) {
|
|
1634
1634
|
return environmentServiceToken(env) !== void 0;
|
|
1635
1635
|
}
|
|
1636
|
+
//#endregion
|
|
1637
|
+
//#region src/output/data-lines.ts
|
|
1638
|
+
/** A show's data lines: one `key<TAB>value` line per field that has a
|
|
1639
|
+
* value. A field whose value is absent (an empty string) is left out. */
|
|
1640
|
+
function fieldLines(rows) {
|
|
1641
|
+
return rows.filter((row) => row.value !== "").map((row) => `${row.label}\t${row.value}`);
|
|
1642
|
+
}
|
|
1636
1643
|
const PRISMA_CLI_PACKAGE_SPEC = `@prisma/cli@latest`;
|
|
1637
1644
|
const DEFAULT_PRISMA_CLI_PACKAGE_RUNNER = ["npx", "-y"];
|
|
1638
1645
|
const PRISMA_CLI_BINARY = CLI_NAME;
|
|
@@ -3448,7 +3455,7 @@ function presentationsFor$2(spec, result) {
|
|
|
3448
3455
|
text: `Install Prisma skills for this project with ${spec.agentSetupTipCommand}.`
|
|
3449
3456
|
}]
|
|
3450
3457
|
],
|
|
3451
|
-
stdout: () => rows
|
|
3458
|
+
stdout: () => fieldLines(rows),
|
|
3452
3459
|
next: () => nextActionsFor$1(spec.agentSetupTipCommand)
|
|
3453
3460
|
};
|
|
3454
3461
|
}
|
|
@@ -3531,7 +3538,7 @@ function presentationsFor$1(result, environmentInForce) {
|
|
|
3531
3538
|
status: "info",
|
|
3532
3539
|
text: ENVIRONMENT_CREDENTIAL_NOTICE
|
|
3533
3540
|
}] : []],
|
|
3534
|
-
stdout: (
|
|
3541
|
+
stdout: noDataLines("Signing out has no data; its exit code is the result."),
|
|
3535
3542
|
next: () => [SIGN_IN$1]
|
|
3536
3543
|
};
|
|
3537
3544
|
}
|
|
@@ -3637,7 +3644,7 @@ function presentationsFor(spec, result) {
|
|
|
3637
3644
|
text: UNVERIFIED_CREDENTIAL_NOTICE
|
|
3638
3645
|
}] : []
|
|
3639
3646
|
],
|
|
3640
|
-
stdout: () => rows
|
|
3647
|
+
stdout: () => fieldLines(rows),
|
|
3641
3648
|
next: () => spec.credential === null ? [SIGN_IN] : []
|
|
3642
3649
|
};
|
|
3643
3650
|
}
|
|
@@ -3735,9 +3742,10 @@ function listPresentations$9(result) {
|
|
|
3735
3742
|
],
|
|
3736
3743
|
stdout: () => result.sessions.map((session) => [
|
|
3737
3744
|
sessionLabel(session),
|
|
3745
|
+
sessionUserLabel(session) ?? "",
|
|
3738
3746
|
session.workspaceId,
|
|
3739
3747
|
session.workspaceId === result.selectedWorkspaceId ? "current" : ""
|
|
3740
|
-
].join("
|
|
3748
|
+
].join(" ")),
|
|
3741
3749
|
json: () => serializeWorkspaceList(result),
|
|
3742
3750
|
next: () => result.sessions.length === 0 ? [LOGIN_NEXT_ACTION] : []
|
|
3743
3751
|
};
|
|
@@ -3793,7 +3801,7 @@ function logoutPresentations(spec, result) {
|
|
|
3793
3801
|
text: ENVIRONMENT_CREDENTIAL_NOTICE
|
|
3794
3802
|
}] : []
|
|
3795
3803
|
],
|
|
3796
|
-
stdout: (
|
|
3804
|
+
stdout: noDataLines("Ending a workspace session has no data; its exit code is the result."),
|
|
3797
3805
|
next: () => [{
|
|
3798
3806
|
kind: "run-command",
|
|
3799
3807
|
label: "List your workspace sessions",
|
|
@@ -3887,7 +3895,7 @@ function usePresentations(spec, result) {
|
|
|
3887
3895
|
text: ENVIRONMENT_CREDENTIAL_NOTICE
|
|
3888
3896
|
}] : []
|
|
3889
3897
|
],
|
|
3890
|
-
stdout: () =>
|
|
3898
|
+
stdout: () => [spec.session.workspaceId],
|
|
3891
3899
|
next: () => [{
|
|
3892
3900
|
kind: "run-command",
|
|
3893
3901
|
label: "Show the signed-in identity",
|
|
@@ -5570,7 +5578,7 @@ const bucketCreateCommand = defineCommand({
|
|
|
5570
5578
|
status: "ok",
|
|
5571
5579
|
text: `Created bucket "${bucket.name}" in ${bucketTargetLabel(projectName, bucket.branchId)}.`
|
|
5572
5580
|
}],
|
|
5573
|
-
stdout: () => [],
|
|
5581
|
+
stdout: () => [bucket.id],
|
|
5574
5582
|
json: () => result,
|
|
5575
5583
|
next: () => []
|
|
5576
5584
|
}));
|
|
@@ -5582,7 +5590,7 @@ const bucketCreateCommand = defineCommand({
|
|
|
5582
5590
|
const CONSENT_QUESTION$6 = "Deleting this bucket permanently removes all objects and access keys.";
|
|
5583
5591
|
function deletePresentations$5(result) {
|
|
5584
5592
|
return {
|
|
5585
|
-
stdout: (
|
|
5593
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
5586
5594
|
json: () => result,
|
|
5587
5595
|
next: () => [],
|
|
5588
5596
|
human: () => [
|
|
@@ -5738,7 +5746,7 @@ const bucketKeyCreateCommand = defineCommand({
|
|
|
5738
5746
|
/** The `bucket key delete` command. */
|
|
5739
5747
|
function deletePresentations$4(result) {
|
|
5740
5748
|
return {
|
|
5741
|
-
stdout: (
|
|
5749
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
5742
5750
|
json: () => result,
|
|
5743
5751
|
next: () => [],
|
|
5744
5752
|
human: () => [
|
|
@@ -6055,7 +6063,7 @@ function emailInvalidError(value) {
|
|
|
6055
6063
|
}
|
|
6056
6064
|
function feedbackPresentations(result) {
|
|
6057
6065
|
return {
|
|
6058
|
-
stdout: (
|
|
6066
|
+
stdout: noDataLines("Sending feedback has no data; its exit code says whether it was sent."),
|
|
6059
6067
|
json: () => result,
|
|
6060
6068
|
next: () => [],
|
|
6061
6069
|
human: () => [{
|
|
@@ -6322,7 +6330,7 @@ async function resolveInstalledRepository(ctx, api, workspaceId, repository) {
|
|
|
6322
6330
|
function connectPresentations(result) {
|
|
6323
6331
|
const connection = result.repositoryConnection;
|
|
6324
6332
|
return {
|
|
6325
|
-
stdout: (
|
|
6333
|
+
stdout: noDataLines("Connecting a repository has no data to pass on; the repository is the one the user named."),
|
|
6326
6334
|
json: () => result,
|
|
6327
6335
|
next: () => [{
|
|
6328
6336
|
kind: "edit-file",
|
|
@@ -6436,7 +6444,7 @@ const gitConnectCommand = defineCommand({
|
|
|
6436
6444
|
/** The `git disconnect` command. */
|
|
6437
6445
|
function disconnectPresentations(result) {
|
|
6438
6446
|
return {
|
|
6439
|
-
stdout: (
|
|
6447
|
+
stdout: noDataLines("Disconnecting a repository has no data; its exit code is the result."),
|
|
6440
6448
|
json: () => result,
|
|
6441
6449
|
next: () => [],
|
|
6442
6450
|
human: () => [
|
|
@@ -7298,7 +7306,7 @@ function initPresentations(result, postinstall, config, skills) {
|
|
|
7298
7306
|
return {
|
|
7299
7307
|
json: () => result,
|
|
7300
7308
|
next: () => postinstall.next ?? [],
|
|
7301
|
-
stdout: (
|
|
7309
|
+
stdout: noDataLines("init writes files into the project; the card names them, and no value is left to pass on."),
|
|
7302
7310
|
human: (ui) => {
|
|
7303
7311
|
const skillsBlocks = result.skills.sync === null ? [] : syncPresentations(result.skills.sync).human(ui);
|
|
7304
7312
|
return [
|
|
@@ -8120,7 +8128,7 @@ function restorePresentations(result, sourceDatabaseId, targetDatabaseId) {
|
|
|
8120
8128
|
}] : []
|
|
8121
8129
|
];
|
|
8122
8130
|
return {
|
|
8123
|
-
stdout: (
|
|
8131
|
+
stdout: noDataLines("A restore overwrites an existing database and creates nothing new to pass on."),
|
|
8124
8132
|
json: () => result,
|
|
8125
8133
|
human: () => [
|
|
8126
8134
|
{
|
|
@@ -8304,7 +8312,7 @@ const postgresConnectionDeleteCommand = defineCommand({
|
|
|
8304
8312
|
items: ["The connection metadata was deleted. Existing one-time secrets were not shown."]
|
|
8305
8313
|
}
|
|
8306
8314
|
],
|
|
8307
|
-
stdout: (
|
|
8315
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
8308
8316
|
json: () => ({ connection: result.connection }),
|
|
8309
8317
|
next: () => []
|
|
8310
8318
|
}));
|
|
@@ -8507,7 +8515,7 @@ const postgresCreateCommand = defineCommand({
|
|
|
8507
8515
|
const CONSENT_QUESTION$2 = "Deleting this database is destructive and requires the exact id.";
|
|
8508
8516
|
function deletePresentations$3(result) {
|
|
8509
8517
|
return {
|
|
8510
|
-
stdout: (
|
|
8518
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
8511
8519
|
json: () => result,
|
|
8512
8520
|
next: () => [],
|
|
8513
8521
|
human: () => [
|
|
@@ -8747,7 +8755,7 @@ function showPresentations$2(result) {
|
|
|
8747
8755
|
kind: "fields",
|
|
8748
8756
|
rows
|
|
8749
8757
|
}],
|
|
8750
|
-
stdout: () => stdoutFieldRows$2(result)
|
|
8758
|
+
stdout: () => fieldLines(stdoutFieldRows$2(result))
|
|
8751
8759
|
};
|
|
8752
8760
|
}
|
|
8753
8761
|
const postgresShowCommand = defineCommand({
|
|
@@ -8866,7 +8874,7 @@ function usagePresentations(result) {
|
|
|
8866
8874
|
kind: "fields",
|
|
8867
8875
|
rows
|
|
8868
8876
|
}],
|
|
8869
|
-
stdout: () => stdoutFieldRows$1(result)
|
|
8877
|
+
stdout: () => fieldLines(stdoutFieldRows$1(result))
|
|
8870
8878
|
};
|
|
8871
8879
|
}
|
|
8872
8880
|
const postgresUsageCommand = defineCommand({
|
|
@@ -9571,7 +9579,7 @@ function localPinDiagnostics(warnings) {
|
|
|
9571
9579
|
}
|
|
9572
9580
|
function setupPresentations(result) {
|
|
9573
9581
|
return {
|
|
9574
|
-
stdout: () => [],
|
|
9582
|
+
stdout: () => [result.project.id],
|
|
9575
9583
|
human: () => [
|
|
9576
9584
|
...result.action === "created" ? [{
|
|
9577
9585
|
kind: "summary",
|
|
@@ -9648,7 +9656,7 @@ const projectCreateCommand = defineCommand({
|
|
|
9648
9656
|
const CONSENT_QUESTION$1 = "Deleting a project is permanent, destroys its databases, and stops its apps, so it requires the exact project id.";
|
|
9649
9657
|
function deletePresentations$2(result) {
|
|
9650
9658
|
return {
|
|
9651
|
-
stdout: (
|
|
9659
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
9652
9660
|
json: () => result,
|
|
9653
9661
|
next: () => [],
|
|
9654
9662
|
human: () => [
|
|
@@ -10447,7 +10455,7 @@ function variableFieldRows(projectId, scope, variable) {
|
|
|
10447
10455
|
function fileWritePresentations(input, result) {
|
|
10448
10456
|
const rows = variableRows(input.variables);
|
|
10449
10457
|
return {
|
|
10450
|
-
stdout: () =>
|
|
10458
|
+
stdout: () => variableStdoutRows(input.variables).map((row) => row.join(" ")),
|
|
10451
10459
|
json: () => result,
|
|
10452
10460
|
next: () => [],
|
|
10453
10461
|
human: () => [
|
|
@@ -10494,7 +10502,7 @@ function previewDefaultDiagnostics(warnings) {
|
|
|
10494
10502
|
const TITLE$4 = "Setting a new environment variable.";
|
|
10495
10503
|
function singlePresentations$1(result) {
|
|
10496
10504
|
return {
|
|
10497
|
-
stdout: () => [],
|
|
10505
|
+
stdout: () => [result.variable.id],
|
|
10498
10506
|
json: () => result,
|
|
10499
10507
|
next: () => [],
|
|
10500
10508
|
human: () => [{
|
|
@@ -10599,7 +10607,7 @@ const projectEnvAddCommand = defineCommand({
|
|
|
10599
10607
|
const TITLE$3 = "Deleting the environment variable from the scope.";
|
|
10600
10608
|
function deletePresentations$1(result) {
|
|
10601
10609
|
return {
|
|
10602
|
-
stdout: (
|
|
10610
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
10603
10611
|
json: () => result,
|
|
10604
10612
|
next: () => [],
|
|
10605
10613
|
human: () => [{
|
|
@@ -10763,7 +10771,7 @@ const projectEnvListCommand = defineCommand({
|
|
|
10763
10771
|
const TITLE$1 = "Replacing the environment variable's value.";
|
|
10764
10772
|
function singlePresentations(result) {
|
|
10765
10773
|
return {
|
|
10766
|
-
stdout: (
|
|
10774
|
+
stdout: noDataLines("Replacing a value has no data; the variable keeps its key and id."),
|
|
10767
10775
|
json: () => result,
|
|
10768
10776
|
next: () => [],
|
|
10769
10777
|
human: () => [{
|
|
@@ -11043,7 +11051,7 @@ const projectListCommand = defineCommand({
|
|
|
11043
11051
|
/** The `project rename` command. */
|
|
11044
11052
|
function renamePresentations(result) {
|
|
11045
11053
|
return {
|
|
11046
|
-
stdout: (
|
|
11054
|
+
stdout: noDataLines("A rename has no data; the new name is the one the user typed."),
|
|
11047
11055
|
json: () => result,
|
|
11048
11056
|
next: () => [],
|
|
11049
11057
|
human: () => [
|
|
@@ -11208,7 +11216,7 @@ function showPresentations$1(result, cwd, env) {
|
|
|
11208
11216
|
kind: "fields",
|
|
11209
11217
|
rows
|
|
11210
11218
|
}],
|
|
11211
|
-
stdout: () => stdoutFieldRows(result, cwd)
|
|
11219
|
+
stdout: () => fieldLines(stdoutFieldRows(result, cwd)),
|
|
11212
11220
|
next: () => result.project === null ? buildProjectSetupNextActions({
|
|
11213
11221
|
commandName: "project show",
|
|
11214
11222
|
retryCommand: "prisma project show <id-or-name>",
|
|
@@ -11355,7 +11363,7 @@ async function resolveRecipient(ctx, options) {
|
|
|
11355
11363
|
}
|
|
11356
11364
|
function transferPresentations(result, toWorkspace) {
|
|
11357
11365
|
return {
|
|
11358
|
-
stdout: (
|
|
11366
|
+
stdout: noDataLines("A transfer moves the project to another workspace and leaves nothing here to pass on."),
|
|
11359
11367
|
json: () => result,
|
|
11360
11368
|
human: () => [
|
|
11361
11369
|
{
|
|
@@ -11822,6 +11830,14 @@ function domainDnsRows(domain) {
|
|
|
11822
11830
|
value: `${record.name} -> ${record.value}${record.ttl === null ? "" : ` (ttl ${record.ttl})`}`
|
|
11823
11831
|
}));
|
|
11824
11832
|
}
|
|
11833
|
+
/** A DNS record as data: the fields a script hands to its DNS provider. */
|
|
11834
|
+
function dnsRecordFields(record) {
|
|
11835
|
+
return [
|
|
11836
|
+
record.type,
|
|
11837
|
+
record.name,
|
|
11838
|
+
record.value
|
|
11839
|
+
];
|
|
11840
|
+
}
|
|
11825
11841
|
function domainFailureRows(domain) {
|
|
11826
11842
|
if (!domain.failureReason) return [];
|
|
11827
11843
|
return [{
|
|
@@ -11877,7 +11893,7 @@ function listPresentations(result) {
|
|
|
11877
11893
|
}
|
|
11878
11894
|
function createPresentations(result) {
|
|
11879
11895
|
return {
|
|
11880
|
-
stdout: () => [],
|
|
11896
|
+
stdout: () => [result.service.id],
|
|
11881
11897
|
json: () => result,
|
|
11882
11898
|
human: () => [result.existing ? title(`${result.service.name} already exists on ${result.branch}; showing it.`) : completed(`Created ${result.service.name} on ${result.branch}.`), fields([
|
|
11883
11899
|
{
|
|
@@ -11914,7 +11930,24 @@ function showPresentations(result) {
|
|
|
11914
11930
|
const inspectable = result.liveVersion ?? result.recentVersions[0];
|
|
11915
11931
|
if (inspectable) next.push(runCommandAction("Show the version", `service version show ${inspectable.id}`));
|
|
11916
11932
|
return {
|
|
11917
|
-
stdout: () => [
|
|
11933
|
+
stdout: () => fieldLines([
|
|
11934
|
+
{
|
|
11935
|
+
label: "project",
|
|
11936
|
+
value: result.projectId
|
|
11937
|
+
},
|
|
11938
|
+
{
|
|
11939
|
+
label: "service",
|
|
11940
|
+
value: result.service.name
|
|
11941
|
+
},
|
|
11942
|
+
{
|
|
11943
|
+
label: "live version",
|
|
11944
|
+
value: result.liveVersion?.id ?? ""
|
|
11945
|
+
},
|
|
11946
|
+
{
|
|
11947
|
+
label: "live url",
|
|
11948
|
+
value: result.liveUrl ?? ""
|
|
11949
|
+
}
|
|
11950
|
+
]),
|
|
11918
11951
|
json: () => result,
|
|
11919
11952
|
human: () => [title(`Showing the state of service ${result.service.name}.`), fields([
|
|
11920
11953
|
{
|
|
@@ -11943,7 +11976,12 @@ function showPresentations(result) {
|
|
|
11943
11976
|
}
|
|
11944
11977
|
function versionListPresentations(result) {
|
|
11945
11978
|
return {
|
|
11946
|
-
stdout: () => [
|
|
11979
|
+
stdout: () => result.versions.map((version) => [
|
|
11980
|
+
version.id,
|
|
11981
|
+
version.status,
|
|
11982
|
+
version.createdAt,
|
|
11983
|
+
version.live === null ? "" : String(version.live)
|
|
11984
|
+
].join(" ")),
|
|
11947
11985
|
json: () => result,
|
|
11948
11986
|
human: () => [
|
|
11949
11987
|
title(`Listing versions of service ${result.service.name}.`),
|
|
@@ -11981,15 +12019,38 @@ function versionListPresentations(result) {
|
|
|
11981
12019
|
};
|
|
11982
12020
|
}
|
|
11983
12021
|
function versionShowPresentations(result) {
|
|
12022
|
+
const rows = [
|
|
12023
|
+
...result.service ? [{
|
|
12024
|
+
label: "service",
|
|
12025
|
+
value: result.service.name
|
|
12026
|
+
}] : [],
|
|
12027
|
+
{
|
|
12028
|
+
label: "version",
|
|
12029
|
+
value: result.version.id
|
|
12030
|
+
},
|
|
12031
|
+
{
|
|
12032
|
+
label: "status",
|
|
12033
|
+
value: result.version.status
|
|
12034
|
+
},
|
|
12035
|
+
...result.version.url ? [{
|
|
12036
|
+
label: "url",
|
|
12037
|
+
value: result.version.url
|
|
12038
|
+
}] : [],
|
|
12039
|
+
...result.version.live === null ? [] : [{
|
|
12040
|
+
label: "live",
|
|
12041
|
+
value: result.version.live ? "yes" : "no"
|
|
12042
|
+
}],
|
|
12043
|
+
{
|
|
12044
|
+
label: "created",
|
|
12045
|
+
value: result.version.createdAt
|
|
12046
|
+
}
|
|
12047
|
+
];
|
|
11984
12048
|
return {
|
|
11985
|
-
stdout: () => [
|
|
11986
|
-
|
|
11987
|
-
next: () => [],
|
|
11988
|
-
human: () => [title("Showing service version details."), fields([
|
|
11989
|
-
...result.service ? [{
|
|
12049
|
+
stdout: () => fieldLines([
|
|
12050
|
+
{
|
|
11990
12051
|
label: "service",
|
|
11991
|
-
value: result.service
|
|
11992
|
-
}
|
|
12052
|
+
value: result.service?.name ?? ""
|
|
12053
|
+
},
|
|
11993
12054
|
{
|
|
11994
12055
|
label: "version",
|
|
11995
12056
|
value: result.version.id
|
|
@@ -11998,19 +12059,22 @@ function versionShowPresentations(result) {
|
|
|
11998
12059
|
label: "status",
|
|
11999
12060
|
value: result.version.status
|
|
12000
12061
|
},
|
|
12001
|
-
|
|
12062
|
+
{
|
|
12002
12063
|
label: "url",
|
|
12003
|
-
value: result.version.url
|
|
12004
|
-
}
|
|
12005
|
-
|
|
12064
|
+
value: result.version.url ?? ""
|
|
12065
|
+
},
|
|
12066
|
+
{
|
|
12006
12067
|
label: "live",
|
|
12007
|
-
value: result.version.live ? "
|
|
12008
|
-
}
|
|
12068
|
+
value: result.version.live === null ? "" : String(result.version.live)
|
|
12069
|
+
},
|
|
12009
12070
|
{
|
|
12010
12071
|
label: "created",
|
|
12011
12072
|
value: result.version.createdAt
|
|
12012
12073
|
}
|
|
12013
|
-
])
|
|
12074
|
+
]),
|
|
12075
|
+
json: () => result,
|
|
12076
|
+
next: () => [],
|
|
12077
|
+
human: () => [title("Showing service version details."), fields(rows)]
|
|
12014
12078
|
};
|
|
12015
12079
|
}
|
|
12016
12080
|
function openPresentations(result, liveDeploymentId) {
|
|
@@ -12043,7 +12107,7 @@ function versionNextActions(deploymentId, serviceName) {
|
|
|
12043
12107
|
}
|
|
12044
12108
|
function promotePresentations(result, alreadyLive) {
|
|
12045
12109
|
return {
|
|
12046
|
-
stdout: (
|
|
12110
|
+
stdout: noDataLines("A promotion changes which version serves traffic and has no data."),
|
|
12047
12111
|
json: () => result,
|
|
12048
12112
|
human: () => [completed(alreadyLive ? `${result.version.id} was already live for ${result.service.name}.` : `Promoted ${result.version.id} to production.`), fields([
|
|
12049
12113
|
{
|
|
@@ -12068,7 +12132,7 @@ function promotePresentations(result, alreadyLive) {
|
|
|
12068
12132
|
}
|
|
12069
12133
|
function rollbackPresentations(result, alreadyLive) {
|
|
12070
12134
|
return {
|
|
12071
|
-
stdout: (
|
|
12135
|
+
stdout: noDataLines("A rollback changes which version serves traffic and has no data."),
|
|
12072
12136
|
json: () => result,
|
|
12073
12137
|
human: () => [completed(alreadyLive ? `${result.version.id} was already live for ${result.service.name}.` : `Rolled ${result.service.name} back to ${result.version.id}.`), fields([
|
|
12074
12138
|
{
|
|
@@ -12101,7 +12165,7 @@ function rollbackPresentations(result, alreadyLive) {
|
|
|
12101
12165
|
}
|
|
12102
12166
|
function versionStartPresentations(result) {
|
|
12103
12167
|
return {
|
|
12104
|
-
stdout: (
|
|
12168
|
+
stdout: noDataLines("Starting a version has no data; its exit code is the result."),
|
|
12105
12169
|
json: () => result,
|
|
12106
12170
|
human: () => [completed(result.alreadyInState ? `${result.version.id} was already running.` : `Started ${result.version.id}.`), fields([
|
|
12107
12171
|
{
|
|
@@ -12126,7 +12190,7 @@ function versionStartPresentations(result) {
|
|
|
12126
12190
|
}
|
|
12127
12191
|
function versionStopPresentations(result) {
|
|
12128
12192
|
return {
|
|
12129
|
-
stdout: (
|
|
12193
|
+
stdout: noDataLines("Stopping a version has no data; its exit code is the result."),
|
|
12130
12194
|
json: () => result,
|
|
12131
12195
|
human: () => [completed(result.alreadyInState ? `${result.version.id} was already stopped.` : `Stopped ${result.version.id}.`), fields([
|
|
12132
12196
|
{
|
|
@@ -12147,7 +12211,7 @@ function versionStopPresentations(result) {
|
|
|
12147
12211
|
}
|
|
12148
12212
|
function versionDeletePresentations(result) {
|
|
12149
12213
|
return {
|
|
12150
|
-
stdout: (
|
|
12214
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
12151
12215
|
json: () => result,
|
|
12152
12216
|
human: () => [completed(`Deleted ${result.versionId} from ${result.service.name}.`), fields([
|
|
12153
12217
|
{
|
|
@@ -12168,7 +12232,7 @@ function versionDeletePresentations(result) {
|
|
|
12168
12232
|
}
|
|
12169
12233
|
function deletePresentations(result) {
|
|
12170
12234
|
return {
|
|
12171
|
-
stdout: (
|
|
12235
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
12172
12236
|
json: () => result,
|
|
12173
12237
|
human: () => [completed(`Deleted ${result.service.name} and every version it owned.`), fields([
|
|
12174
12238
|
{
|
|
@@ -12189,7 +12253,7 @@ function deletePresentations(result) {
|
|
|
12189
12253
|
}
|
|
12190
12254
|
function domainAddPresentations(result) {
|
|
12191
12255
|
return {
|
|
12192
|
-
stdout: () =>
|
|
12256
|
+
stdout: () => result.domain.dnsRecords.map((record) => dnsRecordFields(record).join(" ")),
|
|
12193
12257
|
json: () => result,
|
|
12194
12258
|
human: () => [result.existing ? title(`Showing the existing custom domain on ${result.service.name}.`) : completed(`Added ${result.domain.hostname} to ${result.service.name}.`), fields([
|
|
12195
12259
|
...domainTargetRows(result),
|
|
@@ -12208,7 +12272,25 @@ function domainAddPresentations(result) {
|
|
|
12208
12272
|
}
|
|
12209
12273
|
function domainShowPresentations(result) {
|
|
12210
12274
|
return {
|
|
12211
|
-
stdout: () => [
|
|
12275
|
+
stdout: () => [...fieldLines([
|
|
12276
|
+
{
|
|
12277
|
+
label: "hostname",
|
|
12278
|
+
value: result.domain.hostname
|
|
12279
|
+
},
|
|
12280
|
+
{
|
|
12281
|
+
label: "status",
|
|
12282
|
+
value: result.domain.status
|
|
12283
|
+
},
|
|
12284
|
+
...domainFailureRows(result.domain),
|
|
12285
|
+
{
|
|
12286
|
+
label: "cert expires",
|
|
12287
|
+
value: result.domain.certExpiresAt ?? ""
|
|
12288
|
+
},
|
|
12289
|
+
{
|
|
12290
|
+
label: "created",
|
|
12291
|
+
value: result.domain.createdAt
|
|
12292
|
+
}
|
|
12293
|
+
]), ...result.domain.dnsRecords.map((record) => ["dns", ...dnsRecordFields(record)].join(" "))],
|
|
12212
12294
|
json: () => result,
|
|
12213
12295
|
human: () => [title("Showing custom domain status."), fields([
|
|
12214
12296
|
...domainTargetRows(result),
|
|
@@ -12240,7 +12322,7 @@ function domainShowPresentations(result) {
|
|
|
12240
12322
|
}
|
|
12241
12323
|
function domainDeletePresentations(result) {
|
|
12242
12324
|
return {
|
|
12243
|
-
stdout: (
|
|
12325
|
+
stdout: noDataLines("A delete has no data; its exit code is the result."),
|
|
12244
12326
|
json: () => result,
|
|
12245
12327
|
next: () => [],
|
|
12246
12328
|
human: () => [completed(`Deleted ${result.hostname} from ${result.service.name}.`), fields([
|
|
@@ -12258,7 +12340,7 @@ function domainDeletePresentations(result) {
|
|
|
12258
12340
|
}
|
|
12259
12341
|
function domainRetryPresentations(result) {
|
|
12260
12342
|
return {
|
|
12261
|
-
stdout: (
|
|
12343
|
+
stdout: noDataLines("A retry restarts verification and has no data; domain wait reports the outcome."),
|
|
12262
12344
|
json: () => result,
|
|
12263
12345
|
human: () => [completed(`Retried verification for ${result.domain.hostname}.`), fields([
|
|
12264
12346
|
...domainTargetRows(result),
|
|
@@ -12278,7 +12360,7 @@ function domainRetryPresentations(result) {
|
|
|
12278
12360
|
}
|
|
12279
12361
|
function domainWaitPresentations(result) {
|
|
12280
12362
|
return {
|
|
12281
|
-
stdout: () => [],
|
|
12363
|
+
stdout: () => [result.liveUrl],
|
|
12282
12364
|
json: () => result,
|
|
12283
12365
|
next: () => [],
|
|
12284
12366
|
human: () => [completed(`${result.hostname} is live at ${result.liveUrl}`), fields([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli",
|
|
3
|
-
"version": "8.0.0-rc.23",
|
|
3
|
+
"version": "8.0.0-rc.23-dev.153",
|
|
4
4
|
"description": "Command-line interface for the Prisma Developer Platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@manypkg/tools": "^2.1.2",
|
|
43
|
-
"@prisma/cli-engine": "0.
|
|
44
|
-
"@prisma/composer-cli": "0.30.0",
|
|
43
|
+
"@prisma/cli-engine": "0.9.0",
|
|
44
|
+
"@prisma/composer-cli": "0.30.0-dev.1",
|
|
45
45
|
"@prisma/compute-sdk": "0.43.0",
|
|
46
46
|
"@prisma/management-api-sdk": "1.80.0",
|
|
47
|
-
"@prisma/orm-toolchain": "8.0.0-rc.18",
|
|
47
|
+
"@prisma/orm-toolchain": "8.0.0-rc.18-dev.5",
|
|
48
48
|
"@vercel/detect-agent": "^1.2.3",
|
|
49
49
|
"better-result": "^2.9.2",
|
|
50
50
|
"cross-spawn": "^7.0.6",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"open": "^11.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@prisma/composer": "0.30.0",
|
|
56
|
+
"@prisma/composer": "0.30.0-dev.1",
|
|
57
57
|
"@prisma/credentials-store": "^7.8.0",
|
|
58
|
-
"@repo/cli-conformance": "8.0.0-rc.23",
|
|
59
|
-
"@repo/cli-telemetry": "8.0.0-rc.23",
|
|
60
|
-
"@repo/tsconfig": "8.0.0-rc.23",
|
|
58
|
+
"@repo/cli-conformance": "8.0.0-rc.23-dev.153",
|
|
59
|
+
"@repo/cli-telemetry": "8.0.0-rc.23-dev.153",
|
|
60
|
+
"@repo/tsconfig": "8.0.0-rc.23-dev.153",
|
|
61
61
|
"@types/node": "^22.19.19",
|
|
62
62
|
"@types/cross-spawn": "^6.0.6",
|
|
63
63
|
"tsdown": "^0.21.10",
|