vercel 56.4.1 → 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-L3Z6PL54.js → add-6GRH6G2M.js} +4 -4
- package/dist/chunks/{add-RFEJCIBM.js → add-KNK5E2YT.js} +3 -3
- package/dist/chunks/{chunk-XFGY3JAX.js → chunk-23U6FANO.js} +1 -1
- package/dist/chunks/chunk-2473DUBR.js +15 -0
- package/dist/chunks/{chunk-4M3ZQCYN.js → chunk-26TEKOBZ.js} +1 -1
- package/dist/chunks/{chunk-CHZBEMLF.js → chunk-3BHSS5E2.js} +2 -2
- package/dist/chunks/{chunk-5EXIJBLL.js → chunk-4MK452Y5.js} +4 -4
- package/dist/chunks/{chunk-GKVAAY2A.js → chunk-ARKHETJP.js} +1 -1
- package/dist/chunks/chunk-BM36UWE2.js +245 -0
- package/dist/chunks/{chunk-J6KTUJHV.js → chunk-CM3DLBDY.js} +1 -1
- package/dist/chunks/{chunk-NLRIKNPX.js → chunk-DI3HR3K6.js} +1 -1
- package/dist/chunks/{chunk-Y7TVKRRJ.js → chunk-DOF6CJLL.js} +3 -3
- package/dist/chunks/chunk-E336ZXPP.js +43 -0
- package/dist/chunks/{chunk-UHGAPG7O.js → chunk-EYICIM2K.js} +4 -4
- package/dist/chunks/chunk-FHEMFAHB.js +320 -0
- package/dist/chunks/{chunk-DXFSBJTA.js → chunk-G4MTGCZ5.js} +1 -1
- package/dist/chunks/{chunk-43B3LNUF.js → chunk-GAOAGU5K.js} +1 -1
- package/dist/chunks/{chunk-F32B76CK.js → chunk-GNV7547O.js} +1 -1
- package/dist/chunks/{chunk-IHQ7DPQI.js → chunk-IBP2XAUH.js} +102 -2
- package/dist/chunks/{chunk-OOD67FAL.js → chunk-JQG5EDRD.js} +1 -1
- package/dist/chunks/{chunk-MQRHJEBS.js → chunk-PPEQUJ7T.js} +2 -2
- package/dist/chunks/{chunk-VLTQJKP6.js → chunk-PRYNIKBZ.js} +1 -1
- package/dist/chunks/{chunk-A4XB42AB.js → chunk-SWEPOMSA.js} +1 -1
- package/dist/chunks/{chunk-GLAHGVBS.js → chunk-TMK6RSYW.js} +842 -845
- package/dist/chunks/chunk-WR7JTCGL.js +104 -0
- package/dist/chunks/{chunk-HZKJMZEQ.js → chunk-X43U65TH.js} +2 -2
- package/dist/chunks/chunk-YTFJGKRG.js +247 -0
- package/dist/chunks/{compile-vercel-config-J2X5OV6K.js → compile-vercel-config-IFET4E6H.js} +2 -2
- package/dist/chunks/config-validator.mjs +1 -0
- package/dist/chunks/{delete-57A44RN7.js → delete-PXB5WRH7.js} +3 -3
- package/dist/chunks/delete-X2MUMONI.js +150 -0
- package/dist/chunks/{disable-DNZ52MEO.js → disable-GBL3SHJL.js} +3 -3
- package/dist/chunks/{discard-HACSIZ74.js → discard-XVVSRGDR.js} +3 -3
- package/dist/chunks/{edit-HJ47TQU3.js → edit-EIHRP6XT.js} +4 -4
- package/dist/chunks/edit-K5Y2BDJO.js +153 -0
- package/dist/chunks/{enable-BVLRVRYM.js → enable-W7AMJWKH.js} +3 -3
- package/dist/chunks/{export-7MJFGMG7.js → export-N3AZ2KOO.js} +3 -3
- package/dist/chunks/{image-4UMD7UZP.js → image-DRTGVPVJ.js} +3 -3
- package/dist/chunks/{inspect-5YZP7IWI.js → inspect-5YUAEI3L.js} +3 -3
- package/dist/chunks/{inspect-WBHUZC3R.js → inspect-AAIVWSJI.js} +3 -3
- package/dist/chunks/{inspect-4JD2QN67.js → inspect-DYXTX6P4.js} +3 -3
- package/dist/chunks/{inspect-XX3OXSHC.js → inspect-IPSAYR2C.js} +3 -3
- package/dist/chunks/inspect-SLZLI6ZC.js +205 -0
- package/dist/chunks/{list-5H57NTM4.js → list-IF2YW73F.js} +2 -2
- package/dist/chunks/list-K2HLGUXV.js +360 -0
- package/dist/chunks/{list-AM6K2JCW.js → list-V7VTXVK4.js} +3 -3
- package/dist/chunks/{login-YO34E4V5.js → login-7C6HQEOG.js} +3 -3
- package/dist/chunks/{ls-YDUYTLXW.js → ls-2NU353QP.js} +3 -3
- package/dist/chunks/{ls-P7ZLBWW2.js → ls-NKECPPOR.js} +3 -3
- package/dist/chunks/{ls-44NPIO2N.js → ls-QQQHOJBE.js} +3 -3
- package/dist/chunks/{ls-MB74DIQV.js → ls-RH6Y4XBS.js} +4 -4
- package/dist/chunks/open-2FAPZA6V.js +106 -0
- package/dist/chunks/{publish-RXFUYSW3.js → publish-G7PB64LJ.js} +3 -3
- package/dist/chunks/{query-ILJJL3BZ.js → query-D4QBT4WR.js} +2 -2
- package/dist/chunks/{reorder-GBCOPZT4.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-YK5DGGRX.js → restore-Q2DR7SMW.js} +3 -3
- package/dist/chunks/{rm-LK6P7XTA.js → rm-O4M4GFSK.js} +3 -3
- package/dist/chunks/{rm-FRZMXB2W.js → rm-OCLUTM57.js} +4 -4
- package/dist/chunks/{rm-O474MI5C.js → rm-PCWMEHQ2.js} +3 -3
- package/dist/chunks/{rule-inspect-YEZGYINZ.js → rule-inspect-XJ47UEG7.js} +4 -4
- package/dist/chunks/{rules-MZ2MP6KJ.js → rules-LIH5FLPJ.js} +6 -6
- package/dist/chunks/{schema-FR6CCQIZ.js → schema-OFALTXXM.js} +2 -2
- package/dist/chunks/{tags-AKRTKFRV.js → tags-P4HIAI6D.js} +2 -2
- package/dist/chunks/{update-W3CWQB2F.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/version.mjs +1 -1
- package/package.json +19 -19
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-SWEPOMSA.js";
|
|
13
|
+
import "./chunk-23U6FANO.js";
|
|
14
14
|
import "./chunk-BUZRVER7.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
rulesAddSubcommand
|
|
20
20
|
} from "./chunk-STJJ3DFO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-TMK6RSYW.js";
|
|
22
|
+
import "./chunk-ECCWJHC6.js";
|
|
22
23
|
import {
|
|
23
24
|
AGENT_REASON,
|
|
24
25
|
buildCommandWithGlobalFlags,
|
|
25
26
|
outputAgentError
|
|
26
27
|
} from "./chunk-UDWRZXIT.js";
|
|
27
|
-
import "./chunk-ECCWJHC6.js";
|
|
28
28
|
import {
|
|
29
29
|
parseArguments,
|
|
30
30
|
printError
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleVcrApiError,
|
|
10
10
|
resolveVcrScope,
|
|
11
11
|
validateVcrJsonOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DI3HR3K6.js";
|
|
13
13
|
import {
|
|
14
14
|
outputError
|
|
15
15
|
} from "./chunk-BUZRVER7.js";
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
} from "./chunk-3VS4DTAU.js";
|
|
20
20
|
import "./chunk-GIL3VAUR.js";
|
|
21
21
|
import "./chunk-FYQPTH5C.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TMK6RSYW.js";
|
|
23
|
+
import "./chunk-ECCWJHC6.js";
|
|
23
24
|
import {
|
|
24
25
|
AGENT_REASON,
|
|
25
26
|
buildCommandWithGlobalFlags,
|
|
26
27
|
outputAgentError
|
|
27
28
|
} from "./chunk-UDWRZXIT.js";
|
|
28
|
-
import "./chunk-ECCWJHC6.js";
|
|
29
29
|
import {
|
|
30
30
|
parseArguments,
|
|
31
31
|
printError
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
|
|
8
|
+
// src/util/can-prompt.ts
|
|
9
|
+
function canPrompt(client) {
|
|
10
|
+
return Boolean(client.stdin.isTTY) && !client.nonInteractive;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
canPrompt
|
|
15
|
+
};
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PromptBackError,
|
|
12
12
|
PromptCanceledError,
|
|
13
13
|
getLocalPathConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GNV7547O.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
17
17
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
useKeypress,
|
|
39
39
|
usePrefix,
|
|
40
40
|
useState
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TMK6RSYW.js";
|
|
42
42
|
import {
|
|
43
43
|
require_load_json_file
|
|
44
44
|
} from "./chunk-ECCWJHC6.js";
|
|
@@ -7,17 +7,17 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GAOAGU5K.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig,
|
|
13
13
|
progress,
|
|
14
14
|
writeToConfigFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3BHSS5E2.js";
|
|
16
16
|
import {
|
|
17
17
|
apiCommand,
|
|
18
18
|
listSubcommand3 as listSubcommand,
|
|
19
19
|
loginCommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IBP2XAUH.js";
|
|
21
21
|
import {
|
|
22
22
|
require_semver
|
|
23
23
|
} from "./chunk-IB5L4LKZ.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-DMSLNAVH.js";
|
|
27
27
|
import {
|
|
28
28
|
login
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TMK6RSYW.js";
|
|
30
30
|
import {
|
|
31
31
|
TelemetryClient,
|
|
32
32
|
isNativeBinaryInstall
|
|
@@ -0,0 +1,245 @@
|
|
|
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
|
+
ALIGNED_LABEL_WIDTH
|
|
9
|
+
} from "./chunk-TMK6RSYW.js";
|
|
10
|
+
import {
|
|
11
|
+
require_ms
|
|
12
|
+
} from "./chunk-GGP5R3FU.js";
|
|
13
|
+
import {
|
|
14
|
+
require_source
|
|
15
|
+
} from "./chunk-S7KYDPEM.js";
|
|
16
|
+
import {
|
|
17
|
+
__toESM
|
|
18
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
19
|
+
|
|
20
|
+
// src/commands/comments/format.ts
|
|
21
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
22
|
+
var import_ms = __toESM(require_ms(), 1);
|
|
23
|
+
function alignedRow(label, value) {
|
|
24
|
+
return ` ${import_chalk.default.bold(label.padEnd(ALIGNED_LABEL_WIDTH))}${value}`;
|
|
25
|
+
}
|
|
26
|
+
function actorLabel(actor) {
|
|
27
|
+
if (!actor) {
|
|
28
|
+
return "-";
|
|
29
|
+
}
|
|
30
|
+
const base = actor.name || actor.username || actor.id;
|
|
31
|
+
return actor.type === "app" ? `${base} (app)` : base;
|
|
32
|
+
}
|
|
33
|
+
function relativeAge(timestamp) {
|
|
34
|
+
if (!timestamp || !Number.isFinite(timestamp)) {
|
|
35
|
+
return "-";
|
|
36
|
+
}
|
|
37
|
+
const delta = Date.now() - timestamp;
|
|
38
|
+
if (delta < 1e3) {
|
|
39
|
+
return "now";
|
|
40
|
+
}
|
|
41
|
+
return (0, import_ms.default)(delta);
|
|
42
|
+
}
|
|
43
|
+
function displayPath(thread) {
|
|
44
|
+
const href = thread.context?.href;
|
|
45
|
+
if (href) {
|
|
46
|
+
try {
|
|
47
|
+
return new URL(href).pathname;
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return thread.context?.path || "/";
|
|
52
|
+
}
|
|
53
|
+
function truncate(text, max) {
|
|
54
|
+
const normalized = text.replace(/\s+/g, " ").trim();
|
|
55
|
+
const segmenter = new Intl.Segmenter();
|
|
56
|
+
const graphemes = [...segmenter.segment(normalized)];
|
|
57
|
+
if (graphemes.length <= max) {
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
return `${graphemes.slice(0, Math.max(0, max - 1)).map((s) => s.segment).join("")}\u2026`;
|
|
61
|
+
}
|
|
62
|
+
function firstMessageText(thread) {
|
|
63
|
+
return thread.messages[0]?.text ?? "";
|
|
64
|
+
}
|
|
65
|
+
function threadAge(thread) {
|
|
66
|
+
return relativeAge(thread.messages[0]?.timestamp);
|
|
67
|
+
}
|
|
68
|
+
function renderThreadSummary(thread, complete) {
|
|
69
|
+
const replies = thread.messageCount - 1;
|
|
70
|
+
const rootAuthorId = complete ? thread.messages[0]?.author.id : void 0;
|
|
71
|
+
const names = [];
|
|
72
|
+
const seen = /* @__PURE__ */ new Set();
|
|
73
|
+
for (const message of thread.messages) {
|
|
74
|
+
const { author } = message;
|
|
75
|
+
if (author.id === rootAuthorId || seen.has(author.id)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
seen.add(author.id);
|
|
79
|
+
names.push(actorLabel(author));
|
|
80
|
+
}
|
|
81
|
+
const shown = names.slice(0, 3);
|
|
82
|
+
const overflow = names.length - shown.length;
|
|
83
|
+
const participants = shown.length > 0 ? `${shown.join(", ")}${overflow > 0 ? ` +${overflow} more` : ""}` : void 0;
|
|
84
|
+
const lastTimestamp = thread.messages[thread.messages.length - 1]?.timestamp;
|
|
85
|
+
const parts = [`\u2192 ${replies} ${replies === 1 ? "reply" : "replies"}`];
|
|
86
|
+
if (participants) {
|
|
87
|
+
parts.push(participants);
|
|
88
|
+
}
|
|
89
|
+
parts.push(`last ${relativeAge(lastTimestamp)} ago`);
|
|
90
|
+
return parts.join(" \xB7 ");
|
|
91
|
+
}
|
|
92
|
+
function renderThreadRow(thread, opts) {
|
|
93
|
+
const complete = thread.messageCount <= thread.messages.length;
|
|
94
|
+
const dot = thread.resolved ? import_chalk.default.dim("\u25CB") : "\u25CF";
|
|
95
|
+
const author = complete ? actorLabel(thread.messages[0]?.author) : "\u2026";
|
|
96
|
+
const columns = [
|
|
97
|
+
dot,
|
|
98
|
+
thread.id,
|
|
99
|
+
import_chalk.default.dim(threadAge(thread)),
|
|
100
|
+
author,
|
|
101
|
+
displayPath(thread)
|
|
102
|
+
];
|
|
103
|
+
if (opts.showBranch && thread.branch) {
|
|
104
|
+
columns.push(import_chalk.default.dim(thread.branch));
|
|
105
|
+
}
|
|
106
|
+
if (thread.isLocalhost) {
|
|
107
|
+
columns.push(import_chalk.default.dim("localhost"));
|
|
108
|
+
}
|
|
109
|
+
const lines = [` ${columns.join(" ")}`];
|
|
110
|
+
if (complete) {
|
|
111
|
+
const excerpt = truncate(firstMessageText(thread), 80);
|
|
112
|
+
if (excerpt) {
|
|
113
|
+
lines.push(` \u201C${excerpt}\u201D`);
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
lines.push(
|
|
117
|
+
import_chalk.default.dim(" (long thread \u2014 inspect for the full conversation)")
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const selection = thread.context?.selection;
|
|
121
|
+
if (selection) {
|
|
122
|
+
lines.push(import_chalk.default.dim(` \u2192 selected: \u201C${truncate(selection, 60)}\u201D`));
|
|
123
|
+
}
|
|
124
|
+
if (thread.messageCount > 1) {
|
|
125
|
+
lines.push(import_chalk.default.dim(` ${renderThreadSummary(thread, complete)}`));
|
|
126
|
+
}
|
|
127
|
+
const meta = [];
|
|
128
|
+
const reactionCount = thread.messages.reduce(
|
|
129
|
+
(acc, message) => acc + (message.reactions?.length ?? 0),
|
|
130
|
+
0
|
|
131
|
+
);
|
|
132
|
+
if (reactionCount > 0) {
|
|
133
|
+
meta.push(
|
|
134
|
+
`${reactionCount} ${reactionCount === 1 ? "reaction" : "reactions"}`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
const attachmentCount = thread.messages.reduce(
|
|
138
|
+
(acc, message) => acc + (message.attachments?.length ?? 0),
|
|
139
|
+
0
|
|
140
|
+
);
|
|
141
|
+
if (attachmentCount > 0) {
|
|
142
|
+
meta.push(
|
|
143
|
+
`${attachmentCount} ${attachmentCount === 1 ? "attachment" : "attachments"}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
if (thread.resolved) {
|
|
147
|
+
meta.push(`resolved by ${actorLabel(thread.resolvedBy)}`);
|
|
148
|
+
}
|
|
149
|
+
if (meta.length > 0) {
|
|
150
|
+
lines.push(import_chalk.default.dim(` ${meta.join(" \xB7 ")}`));
|
|
151
|
+
}
|
|
152
|
+
return lines.join("\n");
|
|
153
|
+
}
|
|
154
|
+
function renderReactions(message) {
|
|
155
|
+
if (!message.reactions || message.reactions.length === 0) {
|
|
156
|
+
return void 0;
|
|
157
|
+
}
|
|
158
|
+
return message.reactions.map((r) => `${r.emoji} ${r.name} \xB7 ${r.users.length}`).join(" ");
|
|
159
|
+
}
|
|
160
|
+
function renderMessage(message) {
|
|
161
|
+
const lines = [
|
|
162
|
+
`${import_chalk.default.bold(actorLabel(message.author))} \xB7 ${relativeAge(message.timestamp)} ago \xB7 ${import_chalk.default.dim(message.id)}`
|
|
163
|
+
];
|
|
164
|
+
for (const textLine of message.text.split("\n")) {
|
|
165
|
+
lines.push(` ${textLine}`);
|
|
166
|
+
}
|
|
167
|
+
for (const attachment of message.attachments ?? []) {
|
|
168
|
+
const dimensions = attachment.width && attachment.height ? ` (${attachment.width}\xD7${attachment.height})` : "";
|
|
169
|
+
lines.push(
|
|
170
|
+
`${import_chalk.default.dim(` \u2192 attachment ${attachment.filename}${dimensions}`)} ${import_chalk.default.cyan(attachment.url)}`
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
const reactions = renderReactions(message);
|
|
174
|
+
if (reactions) {
|
|
175
|
+
lines.push(` ${reactions}`);
|
|
176
|
+
}
|
|
177
|
+
return lines.join("\n");
|
|
178
|
+
}
|
|
179
|
+
function renderThreadDetail(thread, messages, opts) {
|
|
180
|
+
const sections = [];
|
|
181
|
+
const status = thread.resolved ? import_chalk.default.dim(`resolved by ${actorLabel(thread.resolvedBy)}`) : "unresolved";
|
|
182
|
+
const headline = [import_chalk.default.bold(thread.id), status];
|
|
183
|
+
if (thread.branch) {
|
|
184
|
+
headline.push(import_chalk.default.dim(thread.branch));
|
|
185
|
+
}
|
|
186
|
+
if (thread.isLocalhost) {
|
|
187
|
+
headline.push(import_chalk.default.dim("localhost"));
|
|
188
|
+
}
|
|
189
|
+
sections.push(headline.join(" \xB7 "));
|
|
190
|
+
const headerLines = [];
|
|
191
|
+
const path = displayPath(thread);
|
|
192
|
+
const pageTitle = thread.context?.pageTitle;
|
|
193
|
+
headerLines.push(pageTitle ? `${path} \u2014 \u201C${pageTitle}\u201D` : path);
|
|
194
|
+
if (thread.context?.href) {
|
|
195
|
+
headerLines.push(import_chalk.default.cyan(thread.context.href));
|
|
196
|
+
}
|
|
197
|
+
sections.push(headerLines.join("\n"));
|
|
198
|
+
const contextLines = [];
|
|
199
|
+
if (thread.context?.selection) {
|
|
200
|
+
contextLines.push(alignedRow("Selected", `\u201C${thread.context.selection}\u201D`));
|
|
201
|
+
}
|
|
202
|
+
if (thread.context?.selector) {
|
|
203
|
+
contextLines.push(alignedRow("Element", thread.context.selector));
|
|
204
|
+
}
|
|
205
|
+
for (const link of thread.links ?? []) {
|
|
206
|
+
contextLines.push(
|
|
207
|
+
alignedRow("Linked", `${link.label} \u2014 ${import_chalk.default.cyan(link.link)}`)
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
if (contextLines.length > 0) {
|
|
211
|
+
sections.push(contextLines.join("\n"));
|
|
212
|
+
}
|
|
213
|
+
sections.push(messages.map(renderMessage).join("\n\n"));
|
|
214
|
+
if (opts.showContext) {
|
|
215
|
+
const extra = [];
|
|
216
|
+
if (thread.context?.frameworkContext) {
|
|
217
|
+
extra.push(
|
|
218
|
+
`${import_chalk.default.bold("Framework context")}
|
|
219
|
+
${thread.context.frameworkContext}`
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
if (thread.context?.device) {
|
|
223
|
+
extra.push(
|
|
224
|
+
`${import_chalk.default.bold("Device")}
|
|
225
|
+
${JSON.stringify(thread.context.device, null, 2)}`
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
if (extra.length > 0) {
|
|
229
|
+
sections.push(extra.join("\n\n"));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (thread.webUrl) {
|
|
233
|
+
sections.push(`Open in Vercel \u2192 ${import_chalk.default.cyan(thread.webUrl)}`);
|
|
234
|
+
}
|
|
235
|
+
return sections.join("\n\n");
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export {
|
|
239
|
+
actorLabel,
|
|
240
|
+
displayPath,
|
|
241
|
+
truncate,
|
|
242
|
+
threadAge,
|
|
243
|
+
renderThreadRow,
|
|
244
|
+
renderThreadDetail
|
|
245
|
+
};
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
progress,
|
|
11
11
|
require_dist as require_dist2,
|
|
12
12
|
sleep
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3BHSS5E2.js";
|
|
14
14
|
import {
|
|
15
15
|
suggestNextCommands
|
|
16
16
|
} from "./chunk-XBN2O34P.js";
|
|
17
17
|
import {
|
|
18
18
|
CommandTimeout
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IBP2XAUH.js";
|
|
20
20
|
import {
|
|
21
21
|
showPluginTipIfNeeded
|
|
22
22
|
} from "./chunk-NJUPUGOE.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
require_dist as require_dist3,
|
|
34
34
|
require_pluralize,
|
|
35
35
|
ua_default
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TMK6RSYW.js";
|
|
37
37
|
import {
|
|
38
38
|
require_strip_ansi,
|
|
39
39
|
responseError
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
|
|
8
|
+
// src/commands/comments/threads.ts
|
|
9
|
+
function parseThreadArg(arg) {
|
|
10
|
+
if (!/^https?:\/\//i.test(arg)) {
|
|
11
|
+
return { id: arg };
|
|
12
|
+
}
|
|
13
|
+
let url;
|
|
14
|
+
try {
|
|
15
|
+
url = new URL(arg);
|
|
16
|
+
} catch {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
const segments = url.pathname.split("/").filter(Boolean);
|
|
20
|
+
const cIndex = segments.lastIndexOf("c");
|
|
21
|
+
if (cIndex !== -1 && cIndex + 1 < segments.length) {
|
|
22
|
+
const id = safeDecode(segments[cIndex + 1]);
|
|
23
|
+
if (!id) {
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
id,
|
|
28
|
+
teamSlug: cIndex > 1 ? safeDecode(segments[0]) : void 0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
function safeDecode(segment) {
|
|
34
|
+
try {
|
|
35
|
+
return decodeURIComponent(segment) || void 0;
|
|
36
|
+
} catch {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
parseThreadArg
|
|
43
|
+
};
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JQG5EDRD.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallVercelPlugin
|
|
12
12
|
} from "./chunk-NJUPUGOE.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
} from "./chunk-64IF634X.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureLink
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-X43U65TH.js";
|
|
19
19
|
import {
|
|
20
20
|
pullCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PRYNIKBZ.js";
|
|
22
22
|
import {
|
|
23
23
|
help
|
|
24
24
|
} from "./chunk-DMSLNAVH.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
envPullCommandLogic,
|
|
29
29
|
humanizePath,
|
|
30
30
|
parseTarget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TMK6RSYW.js";
|
|
32
32
|
import {
|
|
33
33
|
TelemetryClient
|
|
34
34
|
} from "./chunk-ECCWJHC6.js";
|