vercel 56.4.0 → 56.5.0
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/chunks/{add-XY2LNFK3.js → add-6GRH6G2M.js} +4 -4
- package/dist/chunks/{add-2HLAH42D.js → add-KNK5E2YT.js} +3 -3
- package/dist/chunks/{chunk-WM3UMX65.js → chunk-23U6FANO.js} +1 -1
- package/dist/chunks/chunk-2473DUBR.js +15 -0
- package/dist/chunks/{chunk-C4TEOOGB.js → chunk-26TEKOBZ.js} +63 -6
- package/dist/chunks/{chunk-S7HMSWGQ.js → chunk-3BHSS5E2.js} +2 -2
- package/dist/chunks/{chunk-PEC4ROHM.js → chunk-4MK452Y5.js} +5 -5
- package/dist/chunks/{chunk-ORMDX3GR.js → chunk-ARKHETJP.js} +1 -1
- package/dist/chunks/chunk-BM36UWE2.js +245 -0
- package/dist/chunks/{chunk-VZGX4CKB.js → chunk-CM3DLBDY.js} +1 -1
- package/dist/chunks/{chunk-SLCLT4P5.js → chunk-DI3HR3K6.js} +1 -1
- package/dist/chunks/{chunk-OSXJ6G4O.js → chunk-DOF6CJLL.js} +3 -3
- package/dist/chunks/chunk-E336ZXPP.js +43 -0
- package/dist/chunks/{chunk-K6YMSJMZ.js → chunk-EYICIM2K.js} +4 -4
- package/dist/chunks/chunk-FHEMFAHB.js +320 -0
- package/dist/chunks/{chunk-JGXABANG.js → chunk-G4MTGCZ5.js} +1 -1
- package/dist/chunks/{chunk-IN3RG4AU.js → chunk-GAOAGU5K.js} +1 -1
- package/dist/chunks/{chunk-UA3D44SL.js → chunk-GNV7547O.js} +1 -1
- package/dist/chunks/{chunk-2KNVJ7ET.js → chunk-IBP2XAUH.js} +103 -3
- package/dist/chunks/{chunk-JIK3GTU3.js → chunk-JQG5EDRD.js} +1 -1
- package/dist/chunks/{chunk-ENIJVO7C.js → chunk-PPEQUJ7T.js} +2 -2
- package/dist/chunks/{chunk-EJNFC5AV.js → chunk-PRYNIKBZ.js} +1 -1
- package/dist/chunks/{chunk-BRTMH4PL.js → chunk-SWEPOMSA.js} +1 -1
- package/dist/chunks/{chunk-QX4337BT.js → chunk-TMK6RSYW.js} +842 -842
- package/dist/chunks/chunk-WR7JTCGL.js +104 -0
- package/dist/chunks/{chunk-4QRRJEYO.js → chunk-X43U65TH.js} +2 -2
- package/dist/chunks/chunk-YTFJGKRG.js +247 -0
- package/dist/chunks/{compile-vercel-config-4Q4YZ44O.js → compile-vercel-config-IFET4E6H.js} +2 -2
- package/dist/chunks/config-validator.mjs +1 -0
- package/dist/chunks/{delete-AUDPLCMU.js → delete-PXB5WRH7.js} +3 -3
- package/dist/chunks/delete-X2MUMONI.js +150 -0
- package/dist/chunks/{disable-WFPXR7GZ.js → disable-GBL3SHJL.js} +3 -3
- package/dist/chunks/{discard-RVFKIZZG.js → discard-XVVSRGDR.js} +3 -3
- package/dist/chunks/{edit-KO5KX4WU.js → edit-EIHRP6XT.js} +4 -4
- package/dist/chunks/edit-K5Y2BDJO.js +153 -0
- package/dist/chunks/{enable-I5HE32DI.js → enable-W7AMJWKH.js} +3 -3
- package/dist/chunks/{export-4Y5L2TOT.js → export-N3AZ2KOO.js} +3 -3
- package/dist/chunks/{image-QC5MVWKN.js → image-DRTGVPVJ.js} +3 -3
- package/dist/chunks/{inspect-Q5BKZNVI.js → inspect-5YUAEI3L.js} +3 -3
- package/dist/chunks/{inspect-BULBAPNR.js → inspect-AAIVWSJI.js} +3 -3
- package/dist/chunks/{inspect-JUGFKEGR.js → inspect-DYXTX6P4.js} +3 -3
- package/dist/chunks/{inspect-PJDCPARM.js → inspect-IPSAYR2C.js} +3 -3
- package/dist/chunks/inspect-SLZLI6ZC.js +205 -0
- package/dist/chunks/{list-FJT44SB6.js → list-IF2YW73F.js} +2 -2
- package/dist/chunks/list-K2HLGUXV.js +360 -0
- package/dist/chunks/{list-N7OA4FBI.js → list-V7VTXVK4.js} +3 -3
- package/dist/chunks/{login-BPE774JW.js → login-7C6HQEOG.js} +3 -3
- package/dist/chunks/{ls-YV554CRJ.js → ls-2NU353QP.js} +3 -3
- package/dist/chunks/{ls-H52WO65Y.js → ls-NKECPPOR.js} +3 -3
- package/dist/chunks/{ls-E47M6P5O.js → ls-QQQHOJBE.js} +3 -3
- package/dist/chunks/{ls-26VFGQ6P.js → ls-RH6Y4XBS.js} +4 -4
- package/dist/chunks/open-2FAPZA6V.js +106 -0
- package/dist/chunks/{publish-DUTEBRX3.js → publish-G7PB64LJ.js} +3 -3
- package/dist/chunks/{query-QDOKUCHX.js → query-D4QBT4WR.js} +2 -2
- package/dist/chunks/{reorder-L2M3YGJ4.js → reorder-3Z7YIPAX.js} +3 -3
- package/dist/chunks/reply-7QQBXL5H.js +167 -0
- package/dist/chunks/resolve-UYKTDZEX.js +228 -0
- package/dist/chunks/{restore-BVDNAJVC.js → restore-Q2DR7SMW.js} +3 -3
- package/dist/chunks/{rm-VHWBHG3A.js → rm-O4M4GFSK.js} +3 -3
- package/dist/chunks/{rm-7KSHXSTB.js → rm-OCLUTM57.js} +4 -4
- package/dist/chunks/{rm-4OQ7G6UX.js → rm-PCWMEHQ2.js} +3 -3
- package/dist/chunks/{rule-inspect-AT6IEOUF.js → rule-inspect-XJ47UEG7.js} +4 -4
- package/dist/chunks/{rules-SQFCUKWS.js → rules-LIH5FLPJ.js} +6 -6
- package/dist/chunks/{schema-PWSCMD24.js → schema-OFALTXXM.js} +2 -2
- package/dist/chunks/{tags-BT7ZGJP2.js → tags-P4HIAI6D.js} +2 -2
- package/dist/chunks/{update-PTDGBKEH.js → update-E3ZQAFBS.js} +4 -4
- package/dist/commands/build/index.js +11 -11
- package/dist/commands/deploy/index.js +13 -12
- package/dist/commands/dev/index.js +10 -10
- package/dist/commands/env/index.js +9 -8
- package/dist/commands/link/index.js +8 -7
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +2744 -1982
- package/dist/index.js +19 -8
- package/dist/vc.js +6 -1
- package/dist/version.mjs +1 -1
- package/package.json +92 -12
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
requireProjectContext,
|
|
16
16
|
resolveRoutes,
|
|
17
17
|
withGlobalFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ARKHETJP.js";
|
|
19
19
|
import {
|
|
20
20
|
deleteSubcommand
|
|
21
21
|
} from "./chunk-VZSZBD4V.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
stamp_default
|
|
24
24
|
} from "./chunk-64IF634X.js";
|
|
25
25
|
import "./chunk-VXYGCOKL.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-TMK6RSYW.js";
|
|
27
|
+
import "./chunk-ECCWJHC6.js";
|
|
27
28
|
import {
|
|
28
29
|
AGENT_REASON,
|
|
29
30
|
AGENT_STATUS,
|
|
30
31
|
outputAgentError
|
|
31
32
|
} from "./chunk-UDWRZXIT.js";
|
|
32
|
-
import "./chunk-ECCWJHC6.js";
|
|
33
33
|
import "./chunk-SZXT3PDQ.js";
|
|
34
34
|
import "./chunk-KSSNLCL4.js";
|
|
35
35
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
parseThreadArg
|
|
9
|
+
} from "./chunk-E336ZXPP.js";
|
|
10
|
+
import {
|
|
11
|
+
deleteMessage,
|
|
12
|
+
handleCommentsParseError,
|
|
13
|
+
resolveCommentsScope,
|
|
14
|
+
threadNotFoundMessage,
|
|
15
|
+
toApiErrorParts
|
|
16
|
+
} from "./chunk-YTFJGKRG.js";
|
|
17
|
+
import {
|
|
18
|
+
canPrompt
|
|
19
|
+
} from "./chunk-2473DUBR.js";
|
|
20
|
+
import {
|
|
21
|
+
outputError
|
|
22
|
+
} from "./chunk-BUZRVER7.js";
|
|
23
|
+
import {
|
|
24
|
+
validateJsonOutput
|
|
25
|
+
} from "./chunk-XPKWKPWA.js";
|
|
26
|
+
import {
|
|
27
|
+
deleteSubcommand
|
|
28
|
+
} from "./chunk-FHEMFAHB.js";
|
|
29
|
+
import "./chunk-TMK6RSYW.js";
|
|
30
|
+
import "./chunk-ECCWJHC6.js";
|
|
31
|
+
import "./chunk-UDWRZXIT.js";
|
|
32
|
+
import {
|
|
33
|
+
parseArguments
|
|
34
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
35
|
+
import {
|
|
36
|
+
getFlagsSpecification,
|
|
37
|
+
isAPIError
|
|
38
|
+
} from "./chunk-KSSNLCL4.js";
|
|
39
|
+
import "./chunk-P4QNYOFB.js";
|
|
40
|
+
import "./chunk-52QYYTM5.js";
|
|
41
|
+
import {
|
|
42
|
+
output_manager_default
|
|
43
|
+
} from "./chunk-OX7KI3LF.js";
|
|
44
|
+
import "./chunk-GGP5R3FU.js";
|
|
45
|
+
import {
|
|
46
|
+
require_source
|
|
47
|
+
} from "./chunk-S7KYDPEM.js";
|
|
48
|
+
import {
|
|
49
|
+
__toESM
|
|
50
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
51
|
+
|
|
52
|
+
// src/commands/comments/delete.ts
|
|
53
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
54
|
+
async function deleteCommentMessage(client, telemetry) {
|
|
55
|
+
let parsedArgs;
|
|
56
|
+
const flagsSpecification = getFlagsSpecification(deleteSubcommand.options);
|
|
57
|
+
try {
|
|
58
|
+
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
return handleCommentsParseError(err, "delete");
|
|
61
|
+
}
|
|
62
|
+
const formatResult = validateJsonOutput(parsedArgs.flags);
|
|
63
|
+
if (!formatResult.valid) {
|
|
64
|
+
output_manager_default.error(formatResult.error);
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
const jsonOutput = formatResult.jsonOutput;
|
|
68
|
+
const yes = Boolean(parsedArgs.flags["--yes"]);
|
|
69
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
70
|
+
telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
71
|
+
const [threadInput, messageId] = parsedArgs.args.slice(2);
|
|
72
|
+
telemetry.trackCliArgumentThread(threadInput);
|
|
73
|
+
telemetry.trackCliArgumentMessageId(messageId);
|
|
74
|
+
if (!threadInput || !messageId) {
|
|
75
|
+
return outputError(
|
|
76
|
+
client,
|
|
77
|
+
jsonOutput,
|
|
78
|
+
"MISSING_ARGUMENT",
|
|
79
|
+
"Usage: `vercel comments delete <thread> <message-id>` \u2014 message IDs are shown in `vercel comments inspect`."
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const threadRef = parseThreadArg(threadInput);
|
|
83
|
+
if (!threadRef) {
|
|
84
|
+
return outputError(
|
|
85
|
+
client,
|
|
86
|
+
jsonOutput,
|
|
87
|
+
"INVALID_THREAD",
|
|
88
|
+
`Could not extract a thread ID from "${threadInput}".`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const threadId = threadRef.id;
|
|
92
|
+
const scope = await resolveCommentsScope(client, {
|
|
93
|
+
project: parsedArgs.flags["--project"],
|
|
94
|
+
requireProject: false,
|
|
95
|
+
jsonOutput,
|
|
96
|
+
urlTeamSlug: threadRef.teamSlug
|
|
97
|
+
});
|
|
98
|
+
if (typeof scope === "number") {
|
|
99
|
+
return scope;
|
|
100
|
+
}
|
|
101
|
+
if (!yes) {
|
|
102
|
+
if (!canPrompt(client) || jsonOutput) {
|
|
103
|
+
return outputError(
|
|
104
|
+
client,
|
|
105
|
+
jsonOutput,
|
|
106
|
+
"CONFIRMATION_REQUIRED",
|
|
107
|
+
"Pass --yes to delete the message non-interactively."
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
const confirmed = await client.input.confirm(
|
|
111
|
+
`${import_chalk.default.red("Delete")} message ${messageId} from ${threadId} in team ${scope.teamSlug ?? scope.teamId}? This cannot be undone.`,
|
|
112
|
+
false
|
|
113
|
+
);
|
|
114
|
+
if (!confirmed) {
|
|
115
|
+
output_manager_default.log("Canceled.");
|
|
116
|
+
return 0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
telemetry.trackCliOptionProject(parsedArgs.flags["--project"]);
|
|
120
|
+
try {
|
|
121
|
+
const result = await deleteMessage(
|
|
122
|
+
client,
|
|
123
|
+
scope.teamId,
|
|
124
|
+
threadId,
|
|
125
|
+
messageId
|
|
126
|
+
);
|
|
127
|
+
if (jsonOutput) {
|
|
128
|
+
client.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
129
|
+
`);
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
output_manager_default.print(`${import_chalk.default.green("\u2713")} Deleted message ${messageId}
|
|
133
|
+
`);
|
|
134
|
+
return 0;
|
|
135
|
+
} catch (err) {
|
|
136
|
+
if (isAPIError(err)) {
|
|
137
|
+
const { code, message } = toApiErrorParts(err);
|
|
138
|
+
return outputError(
|
|
139
|
+
client,
|
|
140
|
+
jsonOutput,
|
|
141
|
+
code,
|
|
142
|
+
err.status === 404 ? threadNotFoundMessage(threadId, scope) : message
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
deleteCommentMessage as default
|
|
150
|
+
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
requireProjectContext,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ARKHETJP.js";
|
|
21
21
|
import {
|
|
22
22
|
disableSubcommand
|
|
23
23
|
} from "./chunk-VZSZBD4V.js";
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-TMK6RSYW.js";
|
|
29
|
+
import "./chunk-ECCWJHC6.js";
|
|
29
30
|
import {
|
|
30
31
|
outputAgentError
|
|
31
32
|
} from "./chunk-UDWRZXIT.js";
|
|
32
|
-
import "./chunk-ECCWJHC6.js";
|
|
33
33
|
import "./chunk-SZXT3PDQ.js";
|
|
34
34
|
import "./chunk-KSSNLCL4.js";
|
|
35
35
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
printDiffSummary,
|
|
18
18
|
requireProjectContext,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ARKHETJP.js";
|
|
21
21
|
import {
|
|
22
22
|
discardSubcommand
|
|
23
23
|
} from "./chunk-VZSZBD4V.js";
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-TMK6RSYW.js";
|
|
29
|
+
import "./chunk-ECCWJHC6.js";
|
|
29
30
|
import {
|
|
30
31
|
outputAgentError
|
|
31
32
|
} from "./chunk-UDWRZXIT.js";
|
|
32
|
-
import "./chunk-ECCWJHC6.js";
|
|
33
33
|
import "./chunk-SZXT3PDQ.js";
|
|
34
34
|
import "./chunk-KSSNLCL4.js";
|
|
35
35
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
printRouteConfig,
|
|
20
20
|
routingRuleToCurrentRoute,
|
|
21
21
|
runInteractiveEditLoop
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CM3DLBDY.js";
|
|
23
23
|
import {
|
|
24
24
|
getRouteVersions
|
|
25
25
|
} from "./chunk-AHU7WNL2.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveRoute,
|
|
32
32
|
shellQuoteRouteIdentifierForSuggestion,
|
|
33
33
|
withGlobalFlags
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ARKHETJP.js";
|
|
35
35
|
import {
|
|
36
36
|
editSubcommand
|
|
37
37
|
} from "./chunk-VZSZBD4V.js";
|
|
@@ -39,11 +39,11 @@ import {
|
|
|
39
39
|
stamp_default
|
|
40
40
|
} from "./chunk-64IF634X.js";
|
|
41
41
|
import "./chunk-VXYGCOKL.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-TMK6RSYW.js";
|
|
43
|
+
import "./chunk-ECCWJHC6.js";
|
|
43
44
|
import {
|
|
44
45
|
outputAgentError
|
|
45
46
|
} from "./chunk-UDWRZXIT.js";
|
|
46
|
-
import "./chunk-ECCWJHC6.js";
|
|
47
47
|
import "./chunk-SZXT3PDQ.js";
|
|
48
48
|
import "./chunk-KSSNLCL4.js";
|
|
49
49
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
resolveMessageContent
|
|
9
|
+
} from "./chunk-WR7JTCGL.js";
|
|
10
|
+
import {
|
|
11
|
+
parseThreadArg
|
|
12
|
+
} from "./chunk-E336ZXPP.js";
|
|
13
|
+
import {
|
|
14
|
+
handleCommentsParseError,
|
|
15
|
+
resolveCommentsScope,
|
|
16
|
+
threadNotFoundMessage,
|
|
17
|
+
toApiErrorParts,
|
|
18
|
+
updateMessage
|
|
19
|
+
} from "./chunk-YTFJGKRG.js";
|
|
20
|
+
import "./chunk-2473DUBR.js";
|
|
21
|
+
import {
|
|
22
|
+
outputError
|
|
23
|
+
} from "./chunk-BUZRVER7.js";
|
|
24
|
+
import {
|
|
25
|
+
validateJsonOutput
|
|
26
|
+
} from "./chunk-XPKWKPWA.js";
|
|
27
|
+
import {
|
|
28
|
+
editSubcommand
|
|
29
|
+
} from "./chunk-FHEMFAHB.js";
|
|
30
|
+
import "./chunk-TMK6RSYW.js";
|
|
31
|
+
import "./chunk-ECCWJHC6.js";
|
|
32
|
+
import "./chunk-UDWRZXIT.js";
|
|
33
|
+
import {
|
|
34
|
+
parseArguments
|
|
35
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
36
|
+
import {
|
|
37
|
+
getFlagsSpecification,
|
|
38
|
+
isAPIError
|
|
39
|
+
} from "./chunk-KSSNLCL4.js";
|
|
40
|
+
import "./chunk-P4QNYOFB.js";
|
|
41
|
+
import "./chunk-52QYYTM5.js";
|
|
42
|
+
import {
|
|
43
|
+
output_manager_default
|
|
44
|
+
} from "./chunk-OX7KI3LF.js";
|
|
45
|
+
import "./chunk-GGP5R3FU.js";
|
|
46
|
+
import {
|
|
47
|
+
require_source
|
|
48
|
+
} from "./chunk-S7KYDPEM.js";
|
|
49
|
+
import {
|
|
50
|
+
__toESM
|
|
51
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
52
|
+
|
|
53
|
+
// src/commands/comments/edit.ts
|
|
54
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
55
|
+
async function edit(client, telemetry) {
|
|
56
|
+
let parsedArgs;
|
|
57
|
+
const flagsSpecification = getFlagsSpecification(editSubcommand.options);
|
|
58
|
+
try {
|
|
59
|
+
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
return handleCommentsParseError(err, "edit");
|
|
62
|
+
}
|
|
63
|
+
const formatResult = validateJsonOutput(parsedArgs.flags);
|
|
64
|
+
if (!formatResult.valid) {
|
|
65
|
+
output_manager_default.error(formatResult.error);
|
|
66
|
+
return 1;
|
|
67
|
+
}
|
|
68
|
+
const jsonOutput = formatResult.jsonOutput;
|
|
69
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
70
|
+
telemetry.trackCliOptionMessage(parsedArgs.flags["--message"]);
|
|
71
|
+
telemetry.trackCliOptionFile(parsedArgs.flags["--file"]);
|
|
72
|
+
const [threadInput, messageId] = parsedArgs.args.slice(2);
|
|
73
|
+
telemetry.trackCliArgumentThread(threadInput);
|
|
74
|
+
telemetry.trackCliArgumentMessageId(messageId);
|
|
75
|
+
if (!threadInput || !messageId) {
|
|
76
|
+
return outputError(
|
|
77
|
+
client,
|
|
78
|
+
jsonOutput,
|
|
79
|
+
"MISSING_ARGUMENT",
|
|
80
|
+
"Usage: `vercel comments edit <thread> <message-id> -m <text>` \u2014 message IDs are shown in `vercel comments inspect`."
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
const threadRef = parseThreadArg(threadInput);
|
|
84
|
+
if (!threadRef) {
|
|
85
|
+
return outputError(
|
|
86
|
+
client,
|
|
87
|
+
jsonOutput,
|
|
88
|
+
"INVALID_THREAD",
|
|
89
|
+
`Could not extract a thread ID from "${threadInput}".`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
const threadId = threadRef.id;
|
|
93
|
+
const content = await resolveMessageContent(
|
|
94
|
+
client,
|
|
95
|
+
{
|
|
96
|
+
message: parsedArgs.flags["--message"],
|
|
97
|
+
file: parsedArgs.flags["--file"]
|
|
98
|
+
},
|
|
99
|
+
jsonOutput
|
|
100
|
+
);
|
|
101
|
+
if (typeof content === "number") {
|
|
102
|
+
return content;
|
|
103
|
+
}
|
|
104
|
+
if (content === void 0) {
|
|
105
|
+
return outputError(
|
|
106
|
+
client,
|
|
107
|
+
jsonOutput,
|
|
108
|
+
"MISSING_CONTENT",
|
|
109
|
+
"Pass the new content with -m <text> or --file <path>."
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
telemetry.trackCliOptionProject(parsedArgs.flags["--project"]);
|
|
113
|
+
const scope = await resolveCommentsScope(client, {
|
|
114
|
+
project: parsedArgs.flags["--project"],
|
|
115
|
+
requireProject: false,
|
|
116
|
+
jsonOutput,
|
|
117
|
+
urlTeamSlug: threadRef.teamSlug
|
|
118
|
+
});
|
|
119
|
+
if (typeof scope === "number") {
|
|
120
|
+
return scope;
|
|
121
|
+
}
|
|
122
|
+
try {
|
|
123
|
+
const message = await updateMessage(
|
|
124
|
+
client,
|
|
125
|
+
scope.teamId,
|
|
126
|
+
threadId,
|
|
127
|
+
messageId,
|
|
128
|
+
{ markdown: content }
|
|
129
|
+
);
|
|
130
|
+
if (jsonOutput) {
|
|
131
|
+
client.stdout.write(`${JSON.stringify(message, null, 2)}
|
|
132
|
+
`);
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
output_manager_default.print(`${import_chalk.default.green("\u2713")} Edited message ${messageId}
|
|
136
|
+
`);
|
|
137
|
+
return 0;
|
|
138
|
+
} catch (err) {
|
|
139
|
+
if (isAPIError(err)) {
|
|
140
|
+
const { code, message } = toApiErrorParts(err);
|
|
141
|
+
return outputError(
|
|
142
|
+
client,
|
|
143
|
+
jsonOutput,
|
|
144
|
+
code,
|
|
145
|
+
err.status === 404 ? threadNotFoundMessage(threadId, scope) : message
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
throw err;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
edit as default
|
|
153
|
+
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
requireProjectContext,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ARKHETJP.js";
|
|
21
21
|
import {
|
|
22
22
|
enableSubcommand
|
|
23
23
|
} from "./chunk-VZSZBD4V.js";
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-TMK6RSYW.js";
|
|
29
|
+
import "./chunk-ECCWJHC6.js";
|
|
29
30
|
import {
|
|
30
31
|
outputAgentError
|
|
31
32
|
} from "./chunk-UDWRZXIT.js";
|
|
32
|
-
import "./chunk-ECCWJHC6.js";
|
|
33
33
|
import "./chunk-SZXT3PDQ.js";
|
|
34
34
|
import "./chunk-KSSNLCL4.js";
|
|
35
35
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
parseSubcommandArgs,
|
|
10
10
|
requireProjectContext,
|
|
11
11
|
withGlobalFlags
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ARKHETJP.js";
|
|
13
13
|
import {
|
|
14
14
|
exportSubcommand
|
|
15
15
|
} from "./chunk-VZSZBD4V.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-TMK6RSYW.js";
|
|
17
|
+
import "./chunk-ECCWJHC6.js";
|
|
17
18
|
import {
|
|
18
19
|
outputAgentError
|
|
19
20
|
} from "./chunk-UDWRZXIT.js";
|
|
20
|
-
import "./chunk-ECCWJHC6.js";
|
|
21
21
|
import "./chunk-SZXT3PDQ.js";
|
|
22
22
|
import "./chunk-KSSNLCL4.js";
|
|
23
23
|
import "./chunk-P4QNYOFB.js";
|
|
@@ -56,11 +56,11 @@ async function image(client, argv, telemetry) {
|
|
|
56
56
|
}
|
|
57
57
|
switch (subcommand) {
|
|
58
58
|
case "ls":
|
|
59
|
-
return (await import("./ls-
|
|
59
|
+
return (await import("./ls-QQQHOJBE.js")).default(client, args, telemetry);
|
|
60
60
|
case "inspect":
|
|
61
|
-
return (await import("./inspect-
|
|
61
|
+
return (await import("./inspect-AAIVWSJI.js")).default(client, args, telemetry);
|
|
62
62
|
case "rm":
|
|
63
|
-
return (await import("./rm-
|
|
63
|
+
return (await import("./rm-PCWMEHQ2.js")).default(client, args, telemetry);
|
|
64
64
|
default:
|
|
65
65
|
output_manager_default.error(`Unhandled image subcommand: ${subcommand}`);
|
|
66
66
|
return 1;
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
emitAlertsScopeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-23U6FANO.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
getLinkedProject,
|
|
24
24
|
getProjectByNameOrId,
|
|
25
25
|
getScope
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TMK6RSYW.js";
|
|
27
|
+
import "./chunk-ECCWJHC6.js";
|
|
27
28
|
import {
|
|
28
29
|
AGENT_REASON,
|
|
29
30
|
buildCommandWithGlobalFlags,
|
|
30
31
|
outputAgentError
|
|
31
32
|
} from "./chunk-UDWRZXIT.js";
|
|
32
|
-
import "./chunk-ECCWJHC6.js";
|
|
33
33
|
import {
|
|
34
34
|
parseArguments,
|
|
35
35
|
printError
|
|
@@ -20,15 +20,15 @@ import {
|
|
|
20
20
|
requireVcrRepositoryAndImageId,
|
|
21
21
|
resolveVcrScope,
|
|
22
22
|
validateVcrJsonOutput
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DI3HR3K6.js";
|
|
24
24
|
import "./chunk-BUZRVER7.js";
|
|
25
25
|
import "./chunk-XPKWKPWA.js";
|
|
26
26
|
import {
|
|
27
27
|
imageInspectSubcommand
|
|
28
28
|
} from "./chunk-FYQPTH5C.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-UDWRZXIT.js";
|
|
29
|
+
import "./chunk-TMK6RSYW.js";
|
|
31
30
|
import "./chunk-ECCWJHC6.js";
|
|
31
|
+
import "./chunk-UDWRZXIT.js";
|
|
32
32
|
import {
|
|
33
33
|
parseArguments,
|
|
34
34
|
printError
|
|
@@ -20,15 +20,15 @@ import {
|
|
|
20
20
|
requireVcrRepositoryAndTag,
|
|
21
21
|
resolveVcrScope,
|
|
22
22
|
validateVcrJsonOutput
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DI3HR3K6.js";
|
|
24
24
|
import "./chunk-BUZRVER7.js";
|
|
25
25
|
import "./chunk-XPKWKPWA.js";
|
|
26
26
|
import {
|
|
27
27
|
tagsInspectSubcommand
|
|
28
28
|
} from "./chunk-GIL3VAUR.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-UDWRZXIT.js";
|
|
29
|
+
import "./chunk-TMK6RSYW.js";
|
|
31
30
|
import "./chunk-ECCWJHC6.js";
|
|
31
|
+
import "./chunk-UDWRZXIT.js";
|
|
32
32
|
import {
|
|
33
33
|
parseArguments,
|
|
34
34
|
printError
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
requireVcrRepository,
|
|
17
17
|
resolveVcrScope,
|
|
18
18
|
validateVcrJsonOutput
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DI3HR3K6.js";
|
|
20
20
|
import "./chunk-BUZRVER7.js";
|
|
21
21
|
import "./chunk-XPKWKPWA.js";
|
|
22
22
|
import {
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
} from "./chunk-3VS4DTAU.js";
|
|
25
25
|
import "./chunk-GIL3VAUR.js";
|
|
26
26
|
import "./chunk-FYQPTH5C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-UDWRZXIT.js";
|
|
27
|
+
import "./chunk-TMK6RSYW.js";
|
|
29
28
|
import "./chunk-ECCWJHC6.js";
|
|
29
|
+
import "./chunk-UDWRZXIT.js";
|
|
30
30
|
import {
|
|
31
31
|
parseArguments,
|
|
32
32
|
printError
|