vercel 54.14.0 → 54.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-PVEKZBHH.js → add-PKT6ULVJ.js} +9 -9
- package/dist/chunks/{chunk-Y76J3TGD.js → chunk-2HN6DLIY.js} +1 -1
- package/dist/chunks/{chunk-FPRA7U2P.js → chunk-2XEEOHHH.js} +1 -1
- package/dist/chunks/{chunk-TH555JND.js → chunk-2ZSXQQXI.js} +15 -42
- package/dist/chunks/{chunk-6D6CSOSK.js → chunk-372SHB43.js} +86 -62
- package/dist/chunks/{chunk-4KAFHBYE.js → chunk-3BR246Y6.js} +1 -1
- package/dist/chunks/{chunk-V2WFM23D.js → chunk-4BFK3C7V.js} +2 -2
- package/dist/chunks/{chunk-FMN3NXRC.js → chunk-56AJHIQC.js} +1 -1
- package/dist/chunks/chunk-64IF634X.js +18 -0
- package/dist/chunks/{chunk-VNUNCNPE.js → chunk-AWD3IGXU.js} +3 -3
- package/dist/chunks/{chunk-5SYDEK2N.js → chunk-D7MGZH35.js} +1 -1
- package/dist/chunks/{chunk-IQQJHYW4.js → chunk-DPS62LHL.js} +2 -2
- package/dist/chunks/{chunk-RWJORLQP.js → chunk-FEYVO2US.js} +59 -17
- package/dist/chunks/{chunk-ABOX5TXU.js → chunk-FLW73SZ3.js} +3 -3
- package/dist/chunks/{chunk-Z7KOKD2G.js → chunk-G3NXHUFT.js} +1 -1
- package/dist/chunks/{chunk-CO5D46AG.js → chunk-GGP5R3FU.js} +18 -38
- package/dist/chunks/{chunk-J5273CSE.js → chunk-HIYWSGI7.js} +19 -10
- package/dist/chunks/{chunk-WFRHKZFI.js → chunk-IB56QKCM.js} +1 -1
- package/dist/chunks/{chunk-ZTPOJE63.js → chunk-IJJOI63T.js} +1 -1
- package/dist/chunks/{chunk-DAASB6YQ.js → chunk-ILJH44MK.js} +23 -3
- package/dist/chunks/{chunk-V4GROAUJ.js → chunk-IPWWE7PB.js} +4 -7
- package/dist/chunks/{chunk-G7QWUIGS.js → chunk-J7BMPRCU.js} +3 -3
- package/dist/chunks/{chunk-7OZWGXPA.js → chunk-JISJDGJF.js} +2 -2
- package/dist/chunks/{chunk-5UCWXYNH.js → chunk-LQR3CHMH.js} +88 -46
- package/dist/chunks/{chunk-4NDOMD3E.js → chunk-LYCSVJIX.js} +1 -1
- package/dist/chunks/{chunk-6IQZVQV6.js → chunk-MYWLF3BZ.js} +18 -0
- package/dist/chunks/{chunk-6K3WJDFA.js → chunk-O4V7CMVO.js} +10 -10
- package/dist/chunks/{chunk-KJ5O7JQQ.js → chunk-O7RJHL34.js} +81 -86
- package/dist/chunks/{chunk-C3VH3X5Y.js → chunk-OHIZ4SVU.js} +4 -4
- package/dist/chunks/{chunk-JFWE5ORG.js → chunk-P4KQ3FJ4.js} +1 -0
- package/dist/chunks/{chunk-PV533MBH.js → chunk-PMUUPCDL.js} +1 -1
- package/dist/chunks/{chunk-OEM7RB3X.js → chunk-SDZ5ICZL.js} +2 -2
- package/dist/chunks/{chunk-NGRSQRSN.js → chunk-SGPBULVT.js} +1 -1
- package/dist/chunks/{chunk-RM4XGGZO.js → chunk-TSENBD7C.js} +2 -2
- package/dist/chunks/{chunk-O4C4A7HM.js → chunk-VKRW77HH.js} +1 -1
- package/dist/chunks/chunk-VXYGCOKL.js +28 -0
- package/dist/chunks/{chunk-7CJZCFLW.js → chunk-YLGMXYFG.js} +2 -2
- package/dist/chunks/{chunk-B6C7NMT3.js → chunk-Z2MBXYZZ.js} +1 -1
- package/dist/chunks/{chunk-S4VHXL2Y.js → chunk-Z3X747P6.js} +1 -1
- package/dist/chunks/{compile-vercel-config-MD37D2F7.js → compile-vercel-config-3LV7J3IZ.js} +4 -4
- package/dist/chunks/{delete-6EMDCXSA.js → delete-GFW6Y6TZ.js} +10 -8
- package/dist/chunks/{disable-FLJ27NHG.js → disable-PGRAS2ZL.js} +10 -8
- package/dist/chunks/{discard-KEIII6RM.js → discard-S6N5Q4G5.js} +10 -8
- package/dist/chunks/{edit-DOL2ZJPG.js → edit-TICKX4ZV.js} +12 -10
- package/dist/chunks/{enable-PZWZIETT.js → enable-L3BYWN6S.js} +10 -8
- package/dist/chunks/{export-2PFHAELC.js → export-NXS33U5T.js} +6 -6
- package/dist/chunks/{inspect-WPWOZJ2K.js → inspect-OOI5JN3Y.js} +9 -9
- package/dist/chunks/{list-4R5DCLTB.js → list-6EHRL2D4.js} +7 -7
- package/dist/chunks/{list-ZT7QK2H7.js → list-77WL6463.js} +11 -11
- package/dist/chunks/{ls-4JTXQXMQ.js → ls-PBSOEXFG.js} +9 -9
- package/dist/chunks/{publish-JV4J3SOA.js → publish-CU2THVYW.js} +10 -8
- package/dist/chunks/{query-N22EYSZZ.js → query-HEATRYAK.js} +99 -43
- package/dist/chunks/{reorder-TG53BKW4.js → reorder-IQVKSM3H.js} +10 -8
- package/dist/chunks/{restore-U7O4VESA.js → restore-RDEOBGAS.js} +10 -8
- package/dist/chunks/{rm-XA4LYZXI.js → rm-MCSGTU4J.js} +9 -9
- package/dist/chunks/{routes-EAMQVFU2.js → routes-YEU33SON.js} +2 -2
- package/dist/chunks/{rule-inspect-HC745CYT.js → rule-inspect-3YK2XSL3.js} +9 -9
- package/dist/chunks/{rules-RMN72YHN.js → rules-F4MRDDHM.js} +6 -6
- package/dist/chunks/{schema-CZVKUXM6.js → schema-65C5EBJ7.js} +9 -9
- package/dist/chunks/{stamp-ENIXDCRO.js → stamp-AA7R3MZS.js} +3 -1
- package/dist/chunks/{types-P6JKZFEY.js → types-3R7HKP57.js} +3 -3
- package/dist/chunks/{update-PU3WLIA7.js → update-XB4WSRGY.js} +9 -9
- package/dist/commands/build/index.js +18 -16
- package/dist/commands/deploy/index.js +30 -171
- package/dist/commands/dev/index.js +187 -133
- package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +190 -0
- package/dist/commands/env/index.js +162 -101
- package/dist/commands/link/index.js +19 -19
- package/dist/commands/list/index.js +13 -11
- package/dist/commands-bulk.js +258 -104
- package/dist/help.js +1 -1
- package/dist/index.js +27 -27
- package/dist/version.mjs +1 -1
- package/package.json +11 -11
|
@@ -9,32 +9,32 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-JISJDGJF.js";
|
|
13
|
+
import "./chunk-FLW73SZ3.js";
|
|
14
|
+
import "./chunk-D7MGZH35.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
17
17
|
} from "./chunk-XPKWKPWA.js";
|
|
18
18
|
import {
|
|
19
19
|
rulesAddSubcommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SGPBULVT.js";
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
23
|
} from "./chunk-LJ5WXXG6.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-G3NXHUFT.js";
|
|
25
|
+
import "./chunk-LQR3CHMH.js";
|
|
26
|
+
import "./chunk-HIYWSGI7.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
30
30
|
} from "./chunk-NHGCQRK5.js";
|
|
31
|
-
import "./chunk-CO5D46AG.js";
|
|
32
31
|
import "./chunk-N2T234LO.js";
|
|
32
|
+
import "./chunk-GGP5R3FU.js";
|
|
33
33
|
import {
|
|
34
34
|
getFlagsSpecification,
|
|
35
35
|
parseArguments,
|
|
36
36
|
printError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
38
38
|
import {
|
|
39
39
|
isAPIError,
|
|
40
40
|
packageName
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
printIndications,
|
|
10
10
|
require_dist as require_dist2,
|
|
11
11
|
sleep
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OHIZ4SVU.js";
|
|
13
13
|
import {
|
|
14
14
|
suggestNextCommands
|
|
15
15
|
} from "./chunk-LKBI43XK.js";
|
|
@@ -19,10 +19,13 @@ import {
|
|
|
19
19
|
} from "./chunk-TCF6MGBY.js";
|
|
20
20
|
import {
|
|
21
21
|
CommandTimeout
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O7RJHL34.js";
|
|
23
|
+
import {
|
|
24
|
+
stamp_default
|
|
25
|
+
} from "./chunk-64IF634X.js";
|
|
23
26
|
import {
|
|
24
27
|
getScope
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-G3NXHUFT.js";
|
|
26
29
|
import {
|
|
27
30
|
getProjectByNameOrId,
|
|
28
31
|
param,
|
|
@@ -31,18 +34,17 @@ import {
|
|
|
31
34
|
require_pluralize,
|
|
32
35
|
showPluginTipIfNeeded,
|
|
33
36
|
ua_default
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import {
|
|
36
|
-
require_ms,
|
|
37
|
-
stamp_default
|
|
38
|
-
} from "./chunk-CO5D46AG.js";
|
|
37
|
+
} from "./chunk-LQR3CHMH.js";
|
|
39
38
|
import {
|
|
40
39
|
require_lib
|
|
41
40
|
} from "./chunk-N2T234LO.js";
|
|
41
|
+
import {
|
|
42
|
+
require_ms
|
|
43
|
+
} from "./chunk-GGP5R3FU.js";
|
|
42
44
|
import {
|
|
43
45
|
require_strip_ansi,
|
|
44
46
|
responseError
|
|
45
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
46
48
|
import {
|
|
47
49
|
APIError,
|
|
48
50
|
BuildError,
|
|
@@ -1966,7 +1968,6 @@ async function processDeployment({
|
|
|
1966
1968
|
agent,
|
|
1967
1969
|
manual,
|
|
1968
1970
|
jsonOutput,
|
|
1969
|
-
functionsBeta,
|
|
1970
1971
|
linkedProject,
|
|
1971
1972
|
...args
|
|
1972
1973
|
}) {
|
|
@@ -1983,6 +1984,7 @@ async function processDeployment({
|
|
|
1983
1984
|
bulkRedirectsPath
|
|
1984
1985
|
} = args;
|
|
1985
1986
|
const client = now._client;
|
|
1987
|
+
const aliasedRowWillPrint = !noWait && requestBody.autoAssignCustomDomains !== false;
|
|
1986
1988
|
const { env = {} } = requestBody;
|
|
1987
1989
|
const token = now._token;
|
|
1988
1990
|
if (!token) {
|
|
@@ -2074,7 +2076,7 @@ async function processDeployment({
|
|
|
2074
2076
|
printAlignedLabel(
|
|
2075
2077
|
isProdDeployment ? "Production" : "Preview",
|
|
2076
2078
|
import_chalk2.default.cyan(previewUrl),
|
|
2077
|
-
isProdDeployment ? { gutter: "\u25B2" } : {}
|
|
2079
|
+
isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
|
|
2078
2080
|
);
|
|
2079
2081
|
if (!jsonOutput && (quiet || process.env.FORCE_TTY === "1")) {
|
|
2080
2082
|
process.stdout.write(`https://${event.payload.url}`);
|
|
@@ -2147,7 +2149,7 @@ async function processDeployment({
|
|
|
2147
2149
|
printAlignedLabel(
|
|
2148
2150
|
isProdDeployment ? "Production" : "Preview",
|
|
2149
2151
|
import_chalk2.default.cyan(previewUrl),
|
|
2150
|
-
isProdDeployment ? { gutter: "\u25B2" } : {}
|
|
2152
|
+
isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
|
|
2151
2153
|
);
|
|
2152
2154
|
if (v1ChecksPending || v2ChecksPending) {
|
|
2153
2155
|
output_manager_default.spinner("Running Checks\u2026", 0);
|
|
@@ -2168,14 +2170,6 @@ async function processDeployment({
|
|
|
2168
2170
|
}
|
|
2169
2171
|
if (event.type === "error") {
|
|
2170
2172
|
stopSpinner();
|
|
2171
|
-
if (!functionsBeta) {
|
|
2172
|
-
const maybeSizeError = handleErrorSolvableWithFunctionsBeta(
|
|
2173
|
-
event.payload
|
|
2174
|
-
);
|
|
2175
|
-
if (maybeSizeError) {
|
|
2176
|
-
throw maybeSizeError;
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
2173
|
if (!archive) {
|
|
2180
2174
|
const maybeError = handleErrorSolvableWithArchive(event.payload);
|
|
2181
2175
|
if (maybeError) {
|
|
@@ -2209,23 +2203,6 @@ async function processDeployment({
|
|
|
2209
2203
|
throw err;
|
|
2210
2204
|
}
|
|
2211
2205
|
}
|
|
2212
|
-
var FunctionsSizeLimitError = class extends Error {
|
|
2213
|
-
constructor() {
|
|
2214
|
-
super(...arguments);
|
|
2215
|
-
this.link = "https://vercel.com/docs/functions/runtimes/python#extended-size-limits-with-functions-beta";
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
function handleErrorSolvableWithFunctionsBeta(error) {
|
|
2219
|
-
if ((0, import_error_utils.isErrorLike)(error)) {
|
|
2220
|
-
const isLambdaSizeExceeded = "errorCode" in error && error.errorCode === "LAMBDA_SIZE_EXCEEDED";
|
|
2221
|
-
const isMessageMatch = !isLambdaSizeExceeded && "errorMessage" in error && typeof error.errorMessage === "string" && error.errorMessage.includes("exceeds") && (error.errorMessage.includes("Lambda size limit") || error.errorMessage.includes("Lambda ephemeral storage") || error.errorMessage.includes("exceeds Lambda limit"));
|
|
2222
|
-
if (isLambdaSizeExceeded || isMessageMatch) {
|
|
2223
|
-
return new FunctionsSizeLimitError(
|
|
2224
|
-
error.errorMessage || error.message || "Function build exceeded the maximum size limit."
|
|
2225
|
-
);
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
2206
|
var archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
|
|
2230
2207
|
var UploadErrorMissingArchive = class extends Error {
|
|
2231
2208
|
constructor() {
|
|
@@ -2284,7 +2261,6 @@ var Now = class {
|
|
|
2284
2261
|
prebuilt = false,
|
|
2285
2262
|
vercelOutputDir,
|
|
2286
2263
|
rootDirectory,
|
|
2287
|
-
wantsPublic,
|
|
2288
2264
|
meta,
|
|
2289
2265
|
gitMetadata,
|
|
2290
2266
|
regions,
|
|
@@ -2302,7 +2278,6 @@ var Now = class {
|
|
|
2302
2278
|
agentName,
|
|
2303
2279
|
manual,
|
|
2304
2280
|
jsonOutput = false,
|
|
2305
|
-
functionsBeta,
|
|
2306
2281
|
linkedProject
|
|
2307
2282
|
}, org, isSettingUpProject, archive) {
|
|
2308
2283
|
const hashes = {};
|
|
@@ -2310,7 +2285,6 @@ var Now = class {
|
|
|
2310
2285
|
...nowConfig,
|
|
2311
2286
|
env,
|
|
2312
2287
|
build,
|
|
2313
|
-
public: wantsPublic || nowConfig.public,
|
|
2314
2288
|
name,
|
|
2315
2289
|
project,
|
|
2316
2290
|
meta,
|
|
@@ -2324,6 +2298,7 @@ var Now = class {
|
|
|
2324
2298
|
};
|
|
2325
2299
|
delete requestBody.scope;
|
|
2326
2300
|
delete requestBody.github;
|
|
2301
|
+
delete requestBody.public;
|
|
2327
2302
|
const deployment = await processDeployment({
|
|
2328
2303
|
now: this,
|
|
2329
2304
|
agent: this._client.agent,
|
|
@@ -2345,7 +2320,6 @@ var Now = class {
|
|
|
2345
2320
|
bulkRedirectsPath: nowConfig.bulkRedirectsPath,
|
|
2346
2321
|
manual,
|
|
2347
2322
|
jsonOutput,
|
|
2348
|
-
functionsBeta,
|
|
2349
2323
|
linkedProject
|
|
2350
2324
|
});
|
|
2351
2325
|
if (deployment && deployment.warnings) {
|
|
@@ -3091,7 +3065,6 @@ export {
|
|
|
3091
3065
|
displayBuildLogs,
|
|
3092
3066
|
displayBuildLogsUntilFinalError,
|
|
3093
3067
|
displayRuntimeLogs,
|
|
3094
|
-
FunctionsSizeLimitError,
|
|
3095
3068
|
UploadErrorMissingArchive,
|
|
3096
3069
|
Now,
|
|
3097
3070
|
require_cjs,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-LJ5WXXG6.js";
|
|
11
11
|
import {
|
|
12
12
|
getLocalPathConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4BFK3C7V.js";
|
|
14
14
|
import {
|
|
15
15
|
getScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-G3NXHUFT.js";
|
|
17
17
|
import {
|
|
18
18
|
VERCEL_DIR_PROJECT,
|
|
19
19
|
VERCEL_DIR_README,
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
linkRepoProject,
|
|
38
38
|
parseGitConfig,
|
|
39
39
|
pluckRemoteUrls,
|
|
40
|
+
printAlignedLabel,
|
|
40
41
|
pull,
|
|
41
42
|
readJSONFile,
|
|
42
43
|
require_dist3 as require_dist,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
selectAndParseRemoteUrl,
|
|
48
49
|
selectOrg,
|
|
49
50
|
writeServicesConfig
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-LQR3CHMH.js";
|
|
51
52
|
import {
|
|
52
53
|
buildCommandWithGlobalFlags,
|
|
53
54
|
outputAgentError,
|
|
@@ -55,10 +56,10 @@ import {
|
|
|
55
56
|
} from "./chunk-NHGCQRK5.js";
|
|
56
57
|
import {
|
|
57
58
|
table
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LYCSVJIX.js";
|
|
59
60
|
import {
|
|
60
61
|
printError
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
62
63
|
import {
|
|
63
64
|
CantParseJSONFile,
|
|
64
65
|
ProjectNotFound,
|
|
@@ -364,6 +365,20 @@ import { join as join2, basename } from "path";
|
|
|
364
365
|
// src/util/input/input-project.ts
|
|
365
366
|
var import_chalk2 = __toESM(require_source(), 1);
|
|
366
367
|
var import_slugify = __toESM(require_slugify(), 1);
|
|
368
|
+
async function inputProjectDecision(client, defaultDecision) {
|
|
369
|
+
const createChoice = {
|
|
370
|
+
name: "Create new project",
|
|
371
|
+
value: "create"
|
|
372
|
+
};
|
|
373
|
+
const existingChoice = {
|
|
374
|
+
name: "Link existing project",
|
|
375
|
+
value: "existing"
|
|
376
|
+
};
|
|
377
|
+
return await client.input.select({
|
|
378
|
+
message: "Project?",
|
|
379
|
+
choices: defaultDecision === "existing" ? [existingChoice, createChoice] : [createChoice, existingChoice]
|
|
380
|
+
});
|
|
381
|
+
}
|
|
367
382
|
async function inputProject(client, org, detectedProjectName, autoConfirm = false, skipAutoDetect = false) {
|
|
368
383
|
const slugifiedName = (0, import_slugify.default)(detectedProjectName);
|
|
369
384
|
let detectedProject = null;
|
|
@@ -392,23 +407,20 @@ async function inputProject(client, org, detectedProjectName, autoConfirm = fals
|
|
|
392
407
|
}
|
|
393
408
|
let shouldLinkProject;
|
|
394
409
|
if (!detectedProject) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
410
|
+
const decision = await inputProjectDecision(
|
|
411
|
+
client,
|
|
412
|
+
skipAutoDetect ? "existing" : "create"
|
|
398
413
|
);
|
|
414
|
+
shouldLinkProject = decision === "existing";
|
|
399
415
|
} else {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
true
|
|
405
|
-
)) {
|
|
416
|
+
output_manager_default.print(` ${import_chalk2.default.bold("Found existing project")}
|
|
417
|
+
`);
|
|
418
|
+
printAlignedLabel("Project", `${org.slug}/${detectedProject.name}`);
|
|
419
|
+
if (await client.input.confirm(`Link directory to project?`, true)) {
|
|
406
420
|
return detectedProject;
|
|
407
421
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
true
|
|
411
|
-
);
|
|
422
|
+
const decision = await inputProjectDecision(client, "existing");
|
|
423
|
+
shouldLinkProject = decision === "existing";
|
|
412
424
|
}
|
|
413
425
|
if (shouldLinkProject) {
|
|
414
426
|
const firstPage = await client.fetch(`/v9/projects?limit=100`, { accountId: org.id });
|
|
@@ -441,7 +453,7 @@ async function inputProject(client, org, detectedProjectName, autoConfirm = fals
|
|
|
441
453
|
value: project
|
|
442
454
|
}));
|
|
443
455
|
const toLink = await client.input.select({
|
|
444
|
-
message: "Which
|
|
456
|
+
message: "Which project?",
|
|
445
457
|
choices
|
|
446
458
|
});
|
|
447
459
|
return toLink;
|
|
@@ -473,7 +485,7 @@ async function inputRootDirectory(client, cwd, autoConfirm = false) {
|
|
|
473
485
|
}
|
|
474
486
|
while (true) {
|
|
475
487
|
const rootDirectory = await client.input.text({
|
|
476
|
-
message: `
|
|
488
|
+
message: `Code directory?`,
|
|
477
489
|
transformer: (input) => {
|
|
478
490
|
return `${import_chalk3.default.dim(`./`)}${input}`;
|
|
479
491
|
}
|
|
@@ -565,6 +577,7 @@ async function editProjectSettings(client, projectSettings, framework, autoConfi
|
|
|
565
577
|
settings.framework = null;
|
|
566
578
|
return settings;
|
|
567
579
|
}
|
|
580
|
+
output_manager_default.print("\n");
|
|
568
581
|
if (!framework.slug) {
|
|
569
582
|
output_manager_default.print(` No framework detected. Default Project Settings:
|
|
570
583
|
`);
|
|
@@ -942,22 +955,29 @@ function formatCrossTeamMatch(match) {
|
|
|
942
955
|
match
|
|
943
956
|
)}`;
|
|
944
957
|
}
|
|
945
|
-
function
|
|
946
|
-
|
|
947
|
-
const suffix = slugs.length > shown.length ? `, and ${slugs.length - shown.length} more` : "";
|
|
948
|
-
return `${shown.join(", ")}${suffix}`;
|
|
958
|
+
function formatMatchSource(match) {
|
|
959
|
+
return match.reason === "repo-root" ? "Git repository" : "Folder name";
|
|
949
960
|
}
|
|
961
|
+
var CHECKBOX_INSTRUCTIONS = [
|
|
962
|
+
"\n ",
|
|
963
|
+
import_chalk6.default.dim("("),
|
|
964
|
+
import_chalk6.default.cyan("<space>"),
|
|
965
|
+
import_chalk6.default.dim(" select, "),
|
|
966
|
+
import_chalk6.default.cyan("<enter>"),
|
|
967
|
+
import_chalk6.default.dim(" confirm, "),
|
|
968
|
+
import_chalk6.default.cyan("<a>"),
|
|
969
|
+
import_chalk6.default.dim(" toggle all, "),
|
|
970
|
+
import_chalk6.default.cyan("<i>"),
|
|
971
|
+
import_chalk6.default.dim(" invert)")
|
|
972
|
+
].join("");
|
|
950
973
|
function printCrossTeamSearchScope({
|
|
951
|
-
searchedTeamSlugs
|
|
952
|
-
skippedLimitedTeamSlugs
|
|
974
|
+
searchedTeamSlugs
|
|
953
975
|
}) {
|
|
954
976
|
if (searchedTeamSlugs.length > 0) {
|
|
955
|
-
output_manager_default.print(` Searched teams: ${formatTeamList(searchedTeamSlugs)}
|
|
956
|
-
`);
|
|
957
|
-
}
|
|
958
|
-
if (skippedLimitedTeamSlugs.length > 0) {
|
|
959
977
|
output_manager_default.print(
|
|
960
|
-
`
|
|
978
|
+
` ${import_chalk6.default.dim(
|
|
979
|
+
`Searched ${searchedTeamSlugs.length} ${searchedTeamSlugs.length === 1 ? "team" : "teams"}`
|
|
980
|
+
)}
|
|
961
981
|
`
|
|
962
982
|
);
|
|
963
983
|
}
|
|
@@ -998,8 +1018,9 @@ async function maybePullEnvAfterLink(client, path2, autoConfirm, pullEnv) {
|
|
|
998
1018
|
if (!pullEnv || !client.stdin.isTTY || client.nonInteractive) {
|
|
999
1019
|
return;
|
|
1000
1020
|
}
|
|
1021
|
+
output_manager_default.print("\n");
|
|
1001
1022
|
const pullEnvConfirmed = autoConfirm || await client.input.confirm(
|
|
1002
|
-
"
|
|
1023
|
+
"Pull development environment variables into .env.local?",
|
|
1003
1024
|
true
|
|
1004
1025
|
);
|
|
1005
1026
|
if (!pullEnvConfirmed) {
|
|
@@ -1065,7 +1086,8 @@ async function promptForLimitedTeams(client, teams) {
|
|
|
1065
1086
|
return [];
|
|
1066
1087
|
}
|
|
1067
1088
|
return await client.input.checkbox({
|
|
1068
|
-
message: "
|
|
1089
|
+
message: "Select teams that require SSO",
|
|
1090
|
+
instructions: CHECKBOX_INSTRUCTIONS,
|
|
1069
1091
|
choices: teams.map((team) => ({
|
|
1070
1092
|
name: team.name ? `${team.name} (${team.slug})` : team.slug,
|
|
1071
1093
|
value: team
|
|
@@ -1083,7 +1105,7 @@ async function searchSelectedLimitedTeams({
|
|
|
1083
1105
|
if (selectedTeams.length === 0) {
|
|
1084
1106
|
return [];
|
|
1085
1107
|
}
|
|
1086
|
-
output_manager_default.spinner("Searching selected SSO
|
|
1108
|
+
output_manager_default.spinner("Searching selected teams that require SSO\u2026", 1e3);
|
|
1087
1109
|
try {
|
|
1088
1110
|
const result = await searchProjectAcrossTeams(client, projectName, path2, {
|
|
1089
1111
|
teams: selectedTeams,
|
|
@@ -1091,12 +1113,11 @@ async function searchSelectedLimitedTeams({
|
|
|
1091
1113
|
gitProjectName
|
|
1092
1114
|
});
|
|
1093
1115
|
printCrossTeamSearchScope({
|
|
1094
|
-
searchedTeamSlugs: result.searchedTeamSlugs
|
|
1095
|
-
skippedLimitedTeamSlugs: []
|
|
1116
|
+
searchedTeamSlugs: result.searchedTeamSlugs
|
|
1096
1117
|
});
|
|
1097
1118
|
return result.matches;
|
|
1098
1119
|
} catch (err) {
|
|
1099
|
-
output_manager_default.debug(`Selected
|
|
1120
|
+
output_manager_default.debug(`Selected team search requiring SSO failed: ${err}`);
|
|
1100
1121
|
return [];
|
|
1101
1122
|
} finally {
|
|
1102
1123
|
output_manager_default.stopSpinner();
|
|
@@ -1126,8 +1147,17 @@ async function linkCrossTeamMatches({
|
|
|
1126
1147
|
pullEnv
|
|
1127
1148
|
});
|
|
1128
1149
|
}
|
|
1150
|
+
output_manager_default.print("\n");
|
|
1151
|
+
output_manager_default.print(` ${import_chalk6.default.bold("Found existing project")}
|
|
1152
|
+
`);
|
|
1153
|
+
if (match.reason === "repo-root") {
|
|
1154
|
+
printAlignedLabel("Project", `${match.org.slug}/${match.project.name}`);
|
|
1155
|
+
printAlignedLabel("Source", formatMatchSource(match));
|
|
1156
|
+
} else {
|
|
1157
|
+
printAlignedLabel("Project", `${match.org.slug}/${match.project.name}`);
|
|
1158
|
+
}
|
|
1129
1159
|
const confirmed = await client.input.confirm(
|
|
1130
|
-
|
|
1160
|
+
match.reason === "repo-root" ? "Link repository to project?" : "Link directory to project?",
|
|
1131
1161
|
true
|
|
1132
1162
|
);
|
|
1133
1163
|
if (confirmed) {
|
|
@@ -1166,8 +1196,10 @@ async function linkCrossTeamMatches({
|
|
|
1166
1196
|
name: "Not one of these projects",
|
|
1167
1197
|
value: null
|
|
1168
1198
|
});
|
|
1199
|
+
output_manager_default.print("\n");
|
|
1200
|
+
printAlignedLabel("Projects", `${matches.length} matches across teams`);
|
|
1169
1201
|
const selected = await client.input.select({
|
|
1170
|
-
message: "
|
|
1202
|
+
message: "Which project?",
|
|
1171
1203
|
choices,
|
|
1172
1204
|
default: currentTeamMatch ?? void 0
|
|
1173
1205
|
});
|
|
@@ -1188,7 +1220,6 @@ async function setupAndLink(client, path2, {
|
|
|
1188
1220
|
forceDelete = false,
|
|
1189
1221
|
link,
|
|
1190
1222
|
successEmoji = "link",
|
|
1191
|
-
setupMsg = "Set up",
|
|
1192
1223
|
projectName,
|
|
1193
1224
|
nonInteractive = false,
|
|
1194
1225
|
pullEnv = true,
|
|
@@ -1220,16 +1251,13 @@ async function setupAndLink(client, path2, {
|
|
|
1220
1251
|
if (!isTTY && !autoConfirm && !nonInteractive) {
|
|
1221
1252
|
return { status: "error", exitCode: 1, reason: "HEADLESS" };
|
|
1222
1253
|
}
|
|
1223
|
-
output_manager_default.print(
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
`
|
|
1227
|
-
);
|
|
1254
|
+
output_manager_default.print("\n");
|
|
1255
|
+
printAlignedLabel("Directory", humanizePath(path2));
|
|
1256
|
+
output_manager_default.print("\n");
|
|
1228
1257
|
let skipAutoDetect = false;
|
|
1229
1258
|
if (searchAcrossTeams) {
|
|
1230
1259
|
let crossTeamMatches = [];
|
|
1231
1260
|
let searchedTeamSlugs = [];
|
|
1232
|
-
let skippedLimitedTeamSlugs = [];
|
|
1233
1261
|
let skippedLimitedTeams = [];
|
|
1234
1262
|
output_manager_default.spinner("Searching for existing projects\u2026", 1e3);
|
|
1235
1263
|
try {
|
|
@@ -1245,17 +1273,15 @@ async function setupAndLink(client, path2, {
|
|
|
1245
1273
|
);
|
|
1246
1274
|
crossTeamMatches = searchResult.matches;
|
|
1247
1275
|
searchedTeamSlugs = searchResult.searchedTeamSlugs;
|
|
1248
|
-
skippedLimitedTeamSlugs = searchResult.skippedLimitedTeamSlugs;
|
|
1249
1276
|
skippedLimitedTeams = searchResult.skippedLimitedTeams;
|
|
1250
1277
|
} catch (err) {
|
|
1251
1278
|
output_manager_default.debug(`Cross-team search failed: ${err}`);
|
|
1252
1279
|
} finally {
|
|
1253
1280
|
output_manager_default.stopSpinner();
|
|
1254
1281
|
}
|
|
1255
|
-
if (crossTeamMatches.length > 0 && !autoConfirm && !nonInteractive) {
|
|
1282
|
+
if (crossTeamMatches.length > 0 && searchedTeamSlugs.length > 1 && !autoConfirm && !nonInteractive) {
|
|
1256
1283
|
printCrossTeamSearchScope({
|
|
1257
|
-
searchedTeamSlugs
|
|
1258
|
-
skippedLimitedTeamSlugs
|
|
1284
|
+
searchedTeamSlugs
|
|
1259
1285
|
});
|
|
1260
1286
|
}
|
|
1261
1287
|
const linkedMatch = await linkCrossTeamMatches({
|
|
@@ -1272,10 +1298,11 @@ async function setupAndLink(client, path2, {
|
|
|
1272
1298
|
}
|
|
1273
1299
|
if (!autoConfirm && !nonInteractive && skippedLimitedTeams.length > 0) {
|
|
1274
1300
|
if (crossTeamMatches.length === 0) {
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
`
|
|
1301
|
+
printAlignedLabel(
|
|
1302
|
+
"Searched",
|
|
1303
|
+
`${searchedTeamSlugs.length} ${searchedTeamSlugs.length === 1 ? "team" : "teams"} available without SSO`
|
|
1278
1304
|
);
|
|
1305
|
+
output_manager_default.print(" No matching projects found\n");
|
|
1279
1306
|
}
|
|
1280
1307
|
const limitedTeamMatches = await searchSelectedLimitedTeams({
|
|
1281
1308
|
client,
|
|
@@ -1297,9 +1324,7 @@ async function setupAndLink(client, path2, {
|
|
|
1297
1324
|
return linkedLimitedMatch;
|
|
1298
1325
|
}
|
|
1299
1326
|
if (limitedTeamMatches.length === 0) {
|
|
1300
|
-
output_manager_default.print(
|
|
1301
|
-
" No matching projects found in the selected SSO-protected teams.\n"
|
|
1302
|
-
);
|
|
1327
|
+
output_manager_default.print(" No matching projects found in the selected teams.\n");
|
|
1303
1328
|
}
|
|
1304
1329
|
skipAutoDetect = skipAutoDetect || crossTeamMatches.length > 0 || limitedTeamMatches.length > 0;
|
|
1305
1330
|
} else if (crossTeamMatches.length > 0) {
|
|
@@ -1467,7 +1492,7 @@ async function setupAndLink(client, path2, {
|
|
|
1467
1492
|
let changeAdditionalSettings = false;
|
|
1468
1493
|
if (!autoConfirm) {
|
|
1469
1494
|
changeAdditionalSettings = await client.input.confirm(
|
|
1470
|
-
"
|
|
1495
|
+
"Customize advanced settings?",
|
|
1471
1496
|
false
|
|
1472
1497
|
);
|
|
1473
1498
|
}
|
|
@@ -1497,8 +1522,9 @@ async function setupAndLink(client, path2, {
|
|
|
1497
1522
|
org.slug,
|
|
1498
1523
|
successEmoji,
|
|
1499
1524
|
autoConfirm,
|
|
1500
|
-
false
|
|
1525
|
+
false,
|
|
1501
1526
|
// don't prompt to pull env for newly created projects
|
|
1527
|
+
"Created"
|
|
1502
1528
|
);
|
|
1503
1529
|
await connectGitRepository(client, path2, project, autoConfirm, org);
|
|
1504
1530
|
return { status: "linked", org, project };
|
|
@@ -1524,10 +1550,8 @@ async function connectGitRepository(client, path2, project, autoConfirm, org) {
|
|
|
1524
1550
|
if (!remoteUrls || Object.keys(remoteUrls).length === 0) {
|
|
1525
1551
|
return;
|
|
1526
1552
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
true
|
|
1530
|
-
);
|
|
1553
|
+
output_manager_default.print("\n");
|
|
1554
|
+
const shouldConnect = autoConfirm || await client.input.confirm(`Connect detected Git repository?`, true);
|
|
1531
1555
|
if (!shouldConnect) {
|
|
1532
1556
|
return;
|
|
1533
1557
|
}
|
|
@@ -7,10 +7,10 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
VERCEL_DIR,
|
|
9
9
|
isVercelTomlEnabled
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LQR3CHMH.js";
|
|
11
11
|
import {
|
|
12
12
|
parseArguments
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
14
14
|
import {
|
|
15
15
|
ConflictingConfigFiles,
|
|
16
16
|
DeprecatedNowJson,
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
elapsed
|
|
9
|
+
} from "./chunk-VXYGCOKL.js";
|
|
10
|
+
|
|
11
|
+
// src/util/output/stamp.ts
|
|
12
|
+
var stamp_default = (start = Date.now()) => {
|
|
13
|
+
return () => elapsed(Date.now() - start);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
stamp_default
|
|
18
|
+
};
|
|
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
require_dist
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HIYWSGI7.js";
|
|
10
10
|
import {
|
|
11
11
|
noBorderChars,
|
|
12
12
|
require_cli_table3
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LYCSVJIX.js";
|
|
14
14
|
import {
|
|
15
15
|
globalCommandOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
17
17
|
import {
|
|
18
18
|
require_source
|
|
19
19
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -6,12 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
rulesAggregateCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SGPBULVT.js";
|
|
10
10
|
import {
|
|
11
11
|
formatOption,
|
|
12
12
|
limitOption,
|
|
13
13
|
projectOption
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MYWLF3BZ.js";
|
|
15
15
|
import {
|
|
16
16
|
packageName
|
|
17
17
|
} from "./chunk-LN6B7ZI3.js";
|