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
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
canPrompt
|
|
9
|
+
} from "./chunk-2473DUBR.js";
|
|
10
|
+
import {
|
|
11
|
+
outputError
|
|
12
|
+
} from "./chunk-BUZRVER7.js";
|
|
13
|
+
|
|
14
|
+
// src/commands/comments/content.ts
|
|
15
|
+
import { readFileSync } from "fs";
|
|
16
|
+
function readAllStandardInput(stdin) {
|
|
17
|
+
if (stdin.isTTY) {
|
|
18
|
+
return Promise.resolve("");
|
|
19
|
+
}
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
const chunks = [];
|
|
22
|
+
const timer = setTimeout(() => {
|
|
23
|
+
if (chunks.length === 0) {
|
|
24
|
+
cleanup();
|
|
25
|
+
resolve("");
|
|
26
|
+
}
|
|
27
|
+
}, 500);
|
|
28
|
+
const onData = (chunk) => {
|
|
29
|
+
chunks.push(String(chunk));
|
|
30
|
+
};
|
|
31
|
+
const onEnd = () => {
|
|
32
|
+
cleanup();
|
|
33
|
+
resolve(chunks.join(""));
|
|
34
|
+
};
|
|
35
|
+
function cleanup() {
|
|
36
|
+
clearTimeout(timer);
|
|
37
|
+
stdin.off("data", onData);
|
|
38
|
+
stdin.off("end", onEnd);
|
|
39
|
+
}
|
|
40
|
+
stdin.setEncoding("utf8");
|
|
41
|
+
stdin.on("data", onData);
|
|
42
|
+
stdin.on("end", onEnd);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function resolveMessageContent(client, flags, jsonOutput) {
|
|
46
|
+
if (flags.message !== void 0 && flags.file !== void 0) {
|
|
47
|
+
return outputError(
|
|
48
|
+
client,
|
|
49
|
+
jsonOutput,
|
|
50
|
+
"CONFLICTING_CONTENT",
|
|
51
|
+
"Use either --message or --file, not both."
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
if (flags.message !== void 0) {
|
|
55
|
+
return flags.message;
|
|
56
|
+
}
|
|
57
|
+
if (flags.file !== void 0) {
|
|
58
|
+
if (flags.file === "-") {
|
|
59
|
+
const piped2 = await readAllStandardInput(client.stdin);
|
|
60
|
+
if (piped2) {
|
|
61
|
+
return piped2;
|
|
62
|
+
}
|
|
63
|
+
return outputError(
|
|
64
|
+
client,
|
|
65
|
+
jsonOutput,
|
|
66
|
+
"MISSING_CONTENT",
|
|
67
|
+
"No content received on stdin for `--file -`."
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
return readFileSync(flags.file, "utf8");
|
|
72
|
+
} catch (err) {
|
|
73
|
+
return outputError(
|
|
74
|
+
client,
|
|
75
|
+
jsonOutput,
|
|
76
|
+
"FILE_READ_ERROR",
|
|
77
|
+
`Could not read ${flags.file}: ${err instanceof Error ? err.message : String(err)}`
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const piped = await readAllStandardInput(client.stdin);
|
|
82
|
+
if (piped) {
|
|
83
|
+
return piped;
|
|
84
|
+
}
|
|
85
|
+
if (flags.hasAttachments) {
|
|
86
|
+
return void 0;
|
|
87
|
+
}
|
|
88
|
+
if (canPrompt(client) && !jsonOutput) {
|
|
89
|
+
const text = await client.input.text({ message: "Comment message:" });
|
|
90
|
+
if (text) {
|
|
91
|
+
return text;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return outputError(
|
|
95
|
+
client,
|
|
96
|
+
jsonOutput,
|
|
97
|
+
"MISSING_CONTENT",
|
|
98
|
+
'No content provided. Pass -m <text>, --file <path>, or pipe stdin (e.g. `echo "LGTM" | vercel comments reply <thread>`).'
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
resolveMessageContent
|
|
104
|
+
};
|
|
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setupAndLink
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PPEQUJ7T.js";
|
|
10
10
|
import {
|
|
11
11
|
detectExplicitScope,
|
|
12
12
|
getLinkedProject,
|
|
13
13
|
param,
|
|
14
14
|
printProjectNotFoundError,
|
|
15
15
|
resolveProjectCwd
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TMK6RSYW.js";
|
|
17
17
|
import {
|
|
18
18
|
buildCommandWithYes,
|
|
19
19
|
outputActionRequired
|
|
@@ -0,0 +1,247 @@
|
|
|
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
|
+
outputError
|
|
9
|
+
} from "./chunk-BUZRVER7.js";
|
|
10
|
+
import {
|
|
11
|
+
getLinkedProject,
|
|
12
|
+
getProjectByNameOrId,
|
|
13
|
+
getScope
|
|
14
|
+
} from "./chunk-TMK6RSYW.js";
|
|
15
|
+
import {
|
|
16
|
+
printError
|
|
17
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
18
|
+
import {
|
|
19
|
+
ProjectNotFound,
|
|
20
|
+
getCommandName,
|
|
21
|
+
isAPIError
|
|
22
|
+
} from "./chunk-KSSNLCL4.js";
|
|
23
|
+
import {
|
|
24
|
+
output_manager_default
|
|
25
|
+
} from "./chunk-OX7KI3LF.js";
|
|
26
|
+
|
|
27
|
+
// src/commands/comments/errors.ts
|
|
28
|
+
function handleCommentsParseError(err, subcommandName) {
|
|
29
|
+
printError(err);
|
|
30
|
+
if (err instanceof Error && /unknown or unexpected option: -[^-]/.test(err.message)) {
|
|
31
|
+
output_manager_default.log(
|
|
32
|
+
`An argument starting with "-"? Put it after \`--\`: ${getCommandName(`comments ${subcommandName} -- <arg>`)}`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
output_manager_default.log(
|
|
36
|
+
`Run ${getCommandName(`comments ${subcommandName} --help`)} for usage.`
|
|
37
|
+
);
|
|
38
|
+
return 1;
|
|
39
|
+
}
|
|
40
|
+
function threadNotFoundMessage(threadId, scope) {
|
|
41
|
+
return `Comment not found: ${threadId} in team ${scope.teamSlug ?? scope.teamId}. If it belongs to another team, pass --scope <team>.`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/commands/comments/api.ts
|
|
45
|
+
function query(teamId, params = {}) {
|
|
46
|
+
const search = new URLSearchParams({ teamId });
|
|
47
|
+
for (const [key, value] of Object.entries(params)) {
|
|
48
|
+
if (value === void 0) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (Array.isArray(value)) {
|
|
52
|
+
for (const entry of value) {
|
|
53
|
+
search.append(key, entry);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
search.set(key, String(value));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return search.toString();
|
|
60
|
+
}
|
|
61
|
+
var fetchOpts = { useCurrentTeam: false };
|
|
62
|
+
function listThreads(client, teamId, params) {
|
|
63
|
+
return client.fetch(
|
|
64
|
+
`/toolbar/threads?${query(teamId, { ...params })}`,
|
|
65
|
+
fetchOpts
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function getThread(client, teamId, threadId) {
|
|
69
|
+
return client.fetch(
|
|
70
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,
|
|
71
|
+
fetchOpts
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
function updateThread(client, teamId, threadId, resolved) {
|
|
75
|
+
return client.fetch(
|
|
76
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,
|
|
77
|
+
{ ...fetchOpts, method: "PATCH", body: { resolved } }
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function listMessages(client, teamId, threadId, opts = {}) {
|
|
81
|
+
return client.fetch(
|
|
82
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId, { ...opts })}`,
|
|
83
|
+
fetchOpts
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function addMessage(client, teamId, threadId, body) {
|
|
87
|
+
return client.fetch(
|
|
88
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId)}`,
|
|
89
|
+
{ ...fetchOpts, method: "POST", body }
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function updateMessage(client, teamId, threadId, messageId, body) {
|
|
93
|
+
return client.fetch(
|
|
94
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,
|
|
95
|
+
{ ...fetchOpts, method: "PATCH", body }
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function deleteMessage(client, teamId, threadId, messageId) {
|
|
99
|
+
return client.fetch(
|
|
100
|
+
`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,
|
|
101
|
+
{ ...fetchOpts, method: "DELETE" }
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function toApiErrorParts(err) {
|
|
105
|
+
const apiErr = err;
|
|
106
|
+
return {
|
|
107
|
+
code: apiErr.code || "API_ERROR",
|
|
108
|
+
message: apiErr.serverMessage || `API error (${apiErr.status ?? "unknown"}).`
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// src/commands/comments/scope.ts
|
|
113
|
+
import { spawnSync } from "child_process";
|
|
114
|
+
function scopeIsExplicit(client) {
|
|
115
|
+
return client.argv.some(
|
|
116
|
+
(arg) => arg === "--scope" || arg === "-S" || arg.startsWith("--scope=") || arg === "--team" || arg.startsWith("--team=") || arg === "-T"
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
async function resolveCommentsScope(client, opts) {
|
|
120
|
+
if (opts.urlTeamSlug && !opts.project && !scopeIsExplicit(client)) {
|
|
121
|
+
return { teamId: opts.urlTeamSlug, teamSlug: opts.urlTeamSlug };
|
|
122
|
+
}
|
|
123
|
+
if (opts.project) {
|
|
124
|
+
const { team: team2 } = await getScope(client);
|
|
125
|
+
if (!team2) {
|
|
126
|
+
return outputError(
|
|
127
|
+
client,
|
|
128
|
+
opts.jsonOutput,
|
|
129
|
+
"NO_TEAM",
|
|
130
|
+
"No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory."
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
let project;
|
|
134
|
+
try {
|
|
135
|
+
project = await getProjectByNameOrId(client, opts.project, team2.id);
|
|
136
|
+
} catch (err) {
|
|
137
|
+
if (isAPIError(err)) {
|
|
138
|
+
return outputError(
|
|
139
|
+
client,
|
|
140
|
+
opts.jsonOutput,
|
|
141
|
+
err.code || "API_ERROR",
|
|
142
|
+
err.serverMessage || `API error (${err.status}).`
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
if (project instanceof ProjectNotFound) {
|
|
148
|
+
return outputError(
|
|
149
|
+
client,
|
|
150
|
+
opts.jsonOutput,
|
|
151
|
+
"PROJECT_NOT_FOUND",
|
|
152
|
+
`Project "${opts.project}" was not found in team "${team2.slug}".`
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
teamId: team2.id,
|
|
157
|
+
teamSlug: team2.slug,
|
|
158
|
+
projectId: project.id,
|
|
159
|
+
projectName: project.name
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const linked = await getLinkedProject(client);
|
|
163
|
+
if (linked.status === "error") {
|
|
164
|
+
return linked.exitCode;
|
|
165
|
+
}
|
|
166
|
+
if (linked.status === "linked") {
|
|
167
|
+
if (scopeIsExplicit(client)) {
|
|
168
|
+
const { team: team2 } = await getScope(client);
|
|
169
|
+
if (!team2) {
|
|
170
|
+
return outputError(
|
|
171
|
+
client,
|
|
172
|
+
opts.jsonOutput,
|
|
173
|
+
"NO_TEAM",
|
|
174
|
+
"No team context found for --scope."
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
if (team2.id !== linked.org.id) {
|
|
178
|
+
if (opts.requireProject) {
|
|
179
|
+
return outputError(
|
|
180
|
+
client,
|
|
181
|
+
opts.jsonOutput,
|
|
182
|
+
"SCOPE_PROJECT_MISMATCH",
|
|
183
|
+
`--scope ${team2.slug} does not match the linked project's team (${linked.org.slug}). Pass --project <name-or-id> for a project in ${team2.slug}.`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
return { teamId: team2.id, teamSlug: team2.slug };
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
teamId: linked.org.id,
|
|
191
|
+
teamSlug: linked.org.slug,
|
|
192
|
+
projectId: linked.project.id,
|
|
193
|
+
projectName: linked.project.name,
|
|
194
|
+
linked: true
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (opts.requireProject) {
|
|
198
|
+
return outputError(
|
|
199
|
+
client,
|
|
200
|
+
opts.jsonOutput,
|
|
201
|
+
"NOT_LINKED",
|
|
202
|
+
"No linked project found. Run `vercel link` to link a project, or pass --project <name-or-id>."
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
const { team } = await getScope(client);
|
|
206
|
+
if (!team) {
|
|
207
|
+
return outputError(
|
|
208
|
+
client,
|
|
209
|
+
opts.jsonOutput,
|
|
210
|
+
"NO_TEAM",
|
|
211
|
+
"No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory."
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
return { teamId: team.id, teamSlug: team.slug };
|
|
215
|
+
}
|
|
216
|
+
function inferBranch(cwd) {
|
|
217
|
+
const result = spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
|
|
218
|
+
cwd,
|
|
219
|
+
encoding: "utf8"
|
|
220
|
+
});
|
|
221
|
+
if (result.status === 0) {
|
|
222
|
+
const branch = result.stdout.trim();
|
|
223
|
+
if (branch && branch !== "HEAD") {
|
|
224
|
+
return { value: branch, source: "git" };
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const ciRef = process.env.VERCEL_GIT_COMMIT_REF || process.env.GITHUB_HEAD_REF || process.env.GITHUB_REF_NAME;
|
|
228
|
+
if (ciRef) {
|
|
229
|
+
return { value: ciRef, source: "ci" };
|
|
230
|
+
}
|
|
231
|
+
return void 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export {
|
|
235
|
+
handleCommentsParseError,
|
|
236
|
+
threadNotFoundMessage,
|
|
237
|
+
listThreads,
|
|
238
|
+
getThread,
|
|
239
|
+
updateThread,
|
|
240
|
+
listMessages,
|
|
241
|
+
addMessage,
|
|
242
|
+
updateMessage,
|
|
243
|
+
deleteMessage,
|
|
244
|
+
toApiErrorParts,
|
|
245
|
+
resolveCommentsScope,
|
|
246
|
+
inferBranch
|
|
247
|
+
};
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-UDWRZXIT.js";
|
|
14
|
+
} from "./chunk-TMK6RSYW.js";
|
|
16
15
|
import "./chunk-ECCWJHC6.js";
|
|
16
|
+
import "./chunk-UDWRZXIT.js";
|
|
17
17
|
import "./chunk-SZXT3PDQ.js";
|
|
18
18
|
import "./chunk-KSSNLCL4.js";
|
|
19
19
|
import "./chunk-P4QNYOFB.js";
|