vercel 56.1.0 → 56.2.1
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-CAG6USJE.js → add-YIAPBLSF.js} +4 -4
- package/dist/chunks/{add-323XURMF.js → add-ZAQLTF5W.js} +5 -5
- package/dist/chunks/{chunk-SVSO76UB.js → chunk-2I34TRQZ.js} +1 -1
- package/dist/chunks/{chunk-2RVK3DDN.js → chunk-52QYYTM5.js} +4 -0
- package/dist/chunks/{chunk-ZDKEZNOJ.js → chunk-52V5NDUN.js} +1 -1
- package/dist/chunks/{chunk-2LVETUK7.js → chunk-5HNYJHOB.js} +1 -1
- package/dist/chunks/{chunk-HAZVRYHI.js → chunk-6ZVIC6FL.js} +4 -4
- package/dist/chunks/{chunk-6HNQJHQP.js → chunk-75PKWYOS.js} +1 -1
- package/dist/chunks/{chunk-DZGBBY3A.js → chunk-7OJJKCSW.js} +2 -2
- package/dist/chunks/{chunk-Q42RNOJZ.js → chunk-7TJLLZPN.js} +2 -2
- package/dist/chunks/{chunk-X73W5HTJ.js → chunk-DD6D5J7E.js} +7 -8
- package/dist/chunks/{chunk-TLHKETA6.js → chunk-DDEPCAGE.js} +175 -3072
- package/dist/chunks/{chunk-CQEYCOBR.js → chunk-DWU7JOO6.js} +1 -1
- package/dist/chunks/{chunk-GW66OTWH.js → chunk-EPBUWIAO.js} +144 -7
- package/dist/chunks/{chunk-7PZWVZN6.js → chunk-G75NFPIT.js} +1 -1
- package/dist/chunks/{chunk-CWSK7WS2.js → chunk-GPVU6JRS.js} +4 -4
- package/dist/chunks/{chunk-6NECZQWO.js → chunk-HIO4M75R.js} +20 -10
- package/dist/chunks/chunk-IMUF5MGV.js +81 -0
- package/dist/chunks/{chunk-O7ZMPY6L.js → chunk-JF7LPEBD.js} +1 -1
- package/dist/chunks/{chunk-3XCDGACN.js → chunk-KXVQEPTA.js} +1 -1
- package/dist/chunks/{chunk-CZLKIVVT.js → chunk-MYD7N6MH.js} +4 -2
- package/dist/chunks/{chunk-PJ3UJGFX.js → chunk-NULWLKT7.js} +3 -4
- package/dist/chunks/{chunk-4YWIGTZR.js → chunk-PASZMRTZ.js} +5 -65
- package/dist/chunks/{chunk-24FCBXI4.js → chunk-R6IGDGX3.js} +1 -1
- package/dist/chunks/{chunk-VBLL2YSE.js → chunk-UESEGACQ.js} +1 -1
- package/dist/chunks/{chunk-W346YNDN.js → chunk-VOBBH2SB.js} +49 -0
- package/dist/chunks/{chunk-U5MCEDDN.js → chunk-YKJA5TVC.js} +1 -1
- package/dist/chunks/{compile-vercel-config-TIO3FAYI.js → compile-vercel-config-4NKPN3EG.js} +2 -2
- package/dist/chunks/{delete-6TCLBG25.js → delete-NCMDC3IU.js} +3 -3
- package/dist/chunks/{disable-7SOBOP2H.js → disable-Z7DXY4AY.js} +3 -3
- package/dist/chunks/{discard-YGXO5GP5.js → discard-4ILK3ULP.js} +3 -3
- package/dist/chunks/{edit-KL2O6AGH.js → edit-ROJQCTWR.js} +4 -4
- package/dist/chunks/{enable-BJG2XLCD.js → enable-TAVCLAEC.js} +3 -3
- package/dist/chunks/{exec-G4AUF3KG.js → exec-CNBOV577.js} +3 -3
- package/dist/chunks/{export-32T5VGVA.js → export-YTSIGJFX.js} +3 -3
- package/dist/chunks/{image-PXN76ZCH.js → image-LORSHERP.js} +3 -3
- package/dist/chunks/{inspect-EIQBBWPM.js → inspect-5C4UHSCT.js} +4 -4
- package/dist/chunks/{inspect-N2UQFFNL.js → inspect-A2X7RTP4.js} +4 -4
- package/dist/chunks/{inspect-IMS5XUMF.js → inspect-L4UIWOXO.js} +4 -4
- package/dist/chunks/{inspect-TSK2LYUI.js → inspect-OHDU2SVS.js} +4 -4
- package/dist/chunks/{list-OHXBNQJW.js → list-FGVDMSFN.js} +3 -3
- package/dist/chunks/{list-RELZVTWN.js → list-P2B5MHON.js} +4 -4
- package/dist/chunks/{login-JEAMS6RC.js → login-4BK3VGII.js} +6 -6
- package/dist/chunks/{ls-VLBSSAUI.js → ls-NU4D6TLG.js} +4 -4
- package/dist/chunks/{ls-3RMT2VAX.js → ls-RAC5LMTR.js} +5 -5
- package/dist/chunks/{ls-6LX7JBT4.js → ls-WDRFGE2J.js} +4 -4
- package/dist/chunks/{ls-IOR6RY2E.js → ls-YXKRRYTL.js} +4 -4
- package/dist/chunks/{publish-RP7M4QTZ.js → publish-DGF2TQCQ.js} +3 -3
- package/dist/chunks/{query-CZVPJ4DQ.js → query-NWW6RDHK.js} +5 -5
- package/dist/chunks/{reorder-M25MRPFN.js → reorder-TTZBKCEB.js} +3 -3
- package/dist/chunks/{restore-NC5F6U4W.js → restore-DG3LZMHQ.js} +3 -3
- package/dist/chunks/{rm-NFJ4Z7OV.js → rm-2VBE4C2V.js} +5 -5
- package/dist/chunks/{rm-NE33ZYNW.js → rm-7WXXLTXF.js} +4 -4
- package/dist/chunks/{rm-54DKY5WE.js → rm-U2DFRDKE.js} +4 -4
- package/dist/chunks/{rule-inspect-JAULGGMI.js → rule-inspect-4NL3GGDB.js} +5 -5
- package/dist/chunks/{rules-KFLYMN6N.js → rules-DABNOUNG.js} +6 -6
- package/dist/chunks/{schema-D2ECKUMA.js → schema-4RRRUUOO.js} +4 -4
- package/dist/chunks/{tags-22H3MYVI.js → tags-MLX3AHHK.js} +2 -2
- package/dist/chunks/{update-7CBX7VDA.js → update-YXH7WWTN.js} +5 -5
- package/dist/commands/build/index.js +61 -36
- package/dist/commands/deploy/index.js +12 -11
- package/dist/commands/dev/index.js +27 -18
- package/dist/commands/env/index.js +171 -33
- package/dist/commands/link/index.js +13 -12
- package/dist/commands/list/index.js +7 -7
- package/dist/commands-bulk.js +2754 -1540
- package/dist/index.js +17 -18
- package/dist/vc.js +3 -3
- package/dist/version.mjs +1 -1
- package/package.json +20 -21
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
buildCommand,
|
|
30
30
|
pullCommand
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YKJA5TVC.js";
|
|
32
32
|
import {
|
|
33
33
|
envCommand
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DDEPCAGE.js";
|
|
35
35
|
import {
|
|
36
36
|
confirmOption,
|
|
37
37
|
deploymentOption,
|
|
@@ -4467,6 +4467,131 @@ var inspectSubcommand3 = {
|
|
|
4467
4467
|
}
|
|
4468
4468
|
]
|
|
4469
4469
|
};
|
|
4470
|
+
var versionsListSubcommand = {
|
|
4471
|
+
name: "list",
|
|
4472
|
+
aliases: ["ls"],
|
|
4473
|
+
default: true,
|
|
4474
|
+
description: "List version history for a feature flag",
|
|
4475
|
+
arguments: [
|
|
4476
|
+
{
|
|
4477
|
+
name: "flag",
|
|
4478
|
+
required: true
|
|
4479
|
+
}
|
|
4480
|
+
],
|
|
4481
|
+
options: [
|
|
4482
|
+
projectOption,
|
|
4483
|
+
{
|
|
4484
|
+
name: "environment",
|
|
4485
|
+
shorthand: "e",
|
|
4486
|
+
type: String,
|
|
4487
|
+
deprecated: false,
|
|
4488
|
+
description: "Filter versions by changed environment",
|
|
4489
|
+
argument: "ENV"
|
|
4490
|
+
},
|
|
4491
|
+
{
|
|
4492
|
+
name: "limit",
|
|
4493
|
+
shorthand: null,
|
|
4494
|
+
type: Number,
|
|
4495
|
+
deprecated: false,
|
|
4496
|
+
description: "Return at most NUMBER versions (1-100)",
|
|
4497
|
+
argument: "NUMBER"
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
name: "cursor",
|
|
4501
|
+
shorthand: null,
|
|
4502
|
+
type: String,
|
|
4503
|
+
deprecated: false,
|
|
4504
|
+
description: "Pagination cursor from a previous versions response",
|
|
4505
|
+
argument: "CURSOR"
|
|
4506
|
+
},
|
|
4507
|
+
{
|
|
4508
|
+
name: "json",
|
|
4509
|
+
shorthand: null,
|
|
4510
|
+
type: Boolean,
|
|
4511
|
+
deprecated: false,
|
|
4512
|
+
description: "Output in JSON format"
|
|
4513
|
+
}
|
|
4514
|
+
],
|
|
4515
|
+
examples: [
|
|
4516
|
+
{
|
|
4517
|
+
name: "List version history for a feature flag",
|
|
4518
|
+
value: `${packageName} flags versions my-feature-flag`
|
|
4519
|
+
},
|
|
4520
|
+
{
|
|
4521
|
+
name: "List version history using the explicit list subcommand",
|
|
4522
|
+
value: `${packageName} flags versions list my-feature-flag`
|
|
4523
|
+
},
|
|
4524
|
+
{
|
|
4525
|
+
name: "List production version history",
|
|
4526
|
+
value: `${packageName} flags versions my-feature-flag --environment production`
|
|
4527
|
+
},
|
|
4528
|
+
{
|
|
4529
|
+
name: "List the next page of version history",
|
|
4530
|
+
value: `${packageName} flags versions my-feature-flag --limit 10 --cursor <cursor>`
|
|
4531
|
+
},
|
|
4532
|
+
{
|
|
4533
|
+
name: "List version history as JSON",
|
|
4534
|
+
value: `${packageName} flags versions my-feature-flag --json`
|
|
4535
|
+
}
|
|
4536
|
+
]
|
|
4537
|
+
};
|
|
4538
|
+
var versionsDiffSubcommand = {
|
|
4539
|
+
name: "diff",
|
|
4540
|
+
aliases: [],
|
|
4541
|
+
description: "Show changes introduced by a feature flag version",
|
|
4542
|
+
arguments: [
|
|
4543
|
+
{
|
|
4544
|
+
name: "flag",
|
|
4545
|
+
required: true
|
|
4546
|
+
}
|
|
4547
|
+
],
|
|
4548
|
+
options: [
|
|
4549
|
+
projectOption,
|
|
4550
|
+
{
|
|
4551
|
+
name: "revision",
|
|
4552
|
+
shorthand: null,
|
|
4553
|
+
type: Number,
|
|
4554
|
+
deprecated: false,
|
|
4555
|
+
description: "Revision number to compare with the previous revision",
|
|
4556
|
+
argument: "NUMBER"
|
|
4557
|
+
},
|
|
4558
|
+
{
|
|
4559
|
+
name: "json",
|
|
4560
|
+
shorthand: null,
|
|
4561
|
+
type: Boolean,
|
|
4562
|
+
deprecated: false,
|
|
4563
|
+
description: "Output the diff in JSON format"
|
|
4564
|
+
}
|
|
4565
|
+
],
|
|
4566
|
+
examples: [
|
|
4567
|
+
{
|
|
4568
|
+
name: "Show what changed in a revision",
|
|
4569
|
+
value: `${packageName} flags versions diff my-feature-flag --revision 4`
|
|
4570
|
+
},
|
|
4571
|
+
{
|
|
4572
|
+
name: "Show the revision diff as JSON",
|
|
4573
|
+
value: `${packageName} flags versions diff my-feature-flag --revision 4 --json`
|
|
4574
|
+
}
|
|
4575
|
+
]
|
|
4576
|
+
};
|
|
4577
|
+
var versionsSubcommand = {
|
|
4578
|
+
name: "versions",
|
|
4579
|
+
aliases: [],
|
|
4580
|
+
description: "List and compare version history for a feature flag",
|
|
4581
|
+
arguments: [],
|
|
4582
|
+
subcommands: [versionsListSubcommand, versionsDiffSubcommand],
|
|
4583
|
+
options: [],
|
|
4584
|
+
examples: [
|
|
4585
|
+
{
|
|
4586
|
+
name: "List version history for a feature flag",
|
|
4587
|
+
value: `${packageName} flags versions my-feature-flag`
|
|
4588
|
+
},
|
|
4589
|
+
{
|
|
4590
|
+
name: "Show what changed in a revision",
|
|
4591
|
+
value: `${packageName} flags versions diff my-feature-flag --revision 4`
|
|
4592
|
+
}
|
|
4593
|
+
]
|
|
4594
|
+
};
|
|
4470
4595
|
var createSubcommand4 = {
|
|
4471
4596
|
name: "create",
|
|
4472
4597
|
aliases: ["add"],
|
|
@@ -5691,6 +5816,7 @@ var flagsCommand = {
|
|
|
5691
5816
|
subcommands: [
|
|
5692
5817
|
listSubcommand11,
|
|
5693
5818
|
inspectSubcommand3,
|
|
5819
|
+
versionsSubcommand,
|
|
5694
5820
|
createSubcommand4,
|
|
5695
5821
|
openSubcommand2,
|
|
5696
5822
|
updateSubcommand3,
|
|
@@ -6981,7 +7107,7 @@ var CommandTimeout = "5 minutes";
|
|
|
6981
7107
|
var logsCommand = {
|
|
6982
7108
|
name: "logs",
|
|
6983
7109
|
aliases: ["log"],
|
|
6984
|
-
description: "Display request logs for a project.\n\nSource types: \u03BB = serverless, \u03B5 = edge/middleware, \u25C7 = static/external",
|
|
7110
|
+
description: "Display request logs for a project.\n\nWith --follow, stream live runtime logs from a deployment. When no deployment is specified, resolves in order: latest deployment on the current git branch, then your latest deployment, then the latest production deployment. Use --environment production to always stream the latest production deployment.\n\nSource types: \u03BB = serverless, \u03B5 = edge/middleware, \u25C7 = static/external",
|
|
6985
7111
|
arguments: [
|
|
6986
7112
|
{
|
|
6987
7113
|
name: "url|deploymentId",
|
|
@@ -7002,7 +7128,7 @@ var logsCommand = {
|
|
|
7002
7128
|
shorthand: null,
|
|
7003
7129
|
type: String,
|
|
7004
7130
|
deprecated: false,
|
|
7005
|
-
description: "Filter by environment: production or preview"
|
|
7131
|
+
description: "Filter by environment: production or preview. With --follow, selects which environment to stream (production always streams the latest production deployment)"
|
|
7006
7132
|
},
|
|
7007
7133
|
{
|
|
7008
7134
|
name: "level",
|
|
@@ -7058,7 +7184,7 @@ var logsCommand = {
|
|
|
7058
7184
|
shorthand: "f",
|
|
7059
7185
|
type: Boolean,
|
|
7060
7186
|
deprecated: false,
|
|
7061
|
-
description: "Stream live runtime logs
|
|
7187
|
+
description: "Stream live runtime logs. Without a deployment, follows the latest deployment on the current git branch, then your latest deployment, then the latest production deployment"
|
|
7062
7188
|
},
|
|
7063
7189
|
{
|
|
7064
7190
|
name: "no-follow",
|
|
@@ -7093,7 +7219,7 @@ var logsCommand = {
|
|
|
7093
7219
|
shorthand: "x",
|
|
7094
7220
|
type: Boolean,
|
|
7095
7221
|
deprecated: false,
|
|
7096
|
-
description: "Show full log message below each request line"
|
|
7222
|
+
description: "Show full log message below each request line (default when output is not a TTY)"
|
|
7097
7223
|
},
|
|
7098
7224
|
{
|
|
7099
7225
|
name: "branch",
|
|
@@ -7111,6 +7237,14 @@ var logsCommand = {
|
|
|
7111
7237
|
}
|
|
7112
7238
|
],
|
|
7113
7239
|
examples: [
|
|
7240
|
+
{
|
|
7241
|
+
name: "Stream live logs for your most recent deployment",
|
|
7242
|
+
value: `${packageName} logs --follow`
|
|
7243
|
+
},
|
|
7244
|
+
{
|
|
7245
|
+
name: "Stream live logs for the latest production deployment",
|
|
7246
|
+
value: `${packageName} logs --follow --environment production`
|
|
7247
|
+
},
|
|
7114
7248
|
{
|
|
7115
7249
|
name: "Stream live logs for a deployment URL",
|
|
7116
7250
|
value: `${packageName} logs https://my-app-xxxxx.vercel.app --follow`
|
|
@@ -7120,7 +7254,7 @@ var logsCommand = {
|
|
|
7120
7254
|
value: `${packageName} logs dpl_xxxxx --follow`
|
|
7121
7255
|
},
|
|
7122
7256
|
{
|
|
7123
|
-
name: "Stream logs for
|
|
7257
|
+
name: "Stream logs for a specific project",
|
|
7124
7258
|
value: `${packageName} logs --project my-app --follow`
|
|
7125
7259
|
},
|
|
7126
7260
|
{
|
|
@@ -10316,6 +10450,9 @@ export {
|
|
|
10316
10450
|
formatFlagConditionComparator,
|
|
10317
10451
|
listSubcommand11,
|
|
10318
10452
|
inspectSubcommand3,
|
|
10453
|
+
versionsListSubcommand,
|
|
10454
|
+
versionsDiffSubcommand,
|
|
10455
|
+
versionsSubcommand,
|
|
10319
10456
|
createSubcommand4,
|
|
10320
10457
|
openSubcommand2,
|
|
10321
10458
|
updateSubcommand3,
|
|
@@ -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-JF7LPEBD.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-HIO4M75R.js";
|
|
19
19
|
import {
|
|
20
20
|
pullCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YKJA5TVC.js";
|
|
22
22
|
import {
|
|
23
23
|
help
|
|
24
24
|
} from "./chunk-QY63UKTP.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
envPullCommandLogic,
|
|
29
29
|
humanizePath,
|
|
30
30
|
parseTarget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DDEPCAGE.js";
|
|
32
32
|
import {
|
|
33
33
|
TelemetryClient
|
|
34
34
|
} from "./chunk-ECCWJHC6.js";
|
|
@@ -5,14 +5,19 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
-
printProjectNotFoundError,
|
|
9
8
|
setupAndLink
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PASZMRTZ.js";
|
|
10
|
+
import {
|
|
11
|
+
printProjectNotFoundError
|
|
12
|
+
} from "./chunk-IMUF5MGV.js";
|
|
13
|
+
import {
|
|
14
|
+
detectExplicitScope
|
|
15
|
+
} from "./chunk-DWU7JOO6.js";
|
|
11
16
|
import {
|
|
12
17
|
getLinkedProject,
|
|
13
18
|
param,
|
|
14
19
|
resolveProjectCwd
|
|
15
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DDEPCAGE.js";
|
|
16
21
|
import {
|
|
17
22
|
buildCommandWithYes,
|
|
18
23
|
outputActionRequired
|
|
@@ -28,25 +33,30 @@ import {
|
|
|
28
33
|
// src/util/link/ensure-link.ts
|
|
29
34
|
async function ensureLink(commandName, client, cwd, opts = {}) {
|
|
30
35
|
cwd = await resolveProjectCwd(cwd);
|
|
31
|
-
let
|
|
36
|
+
let link = opts.link;
|
|
32
37
|
const nonInteractive = opts.nonInteractive ?? client.nonInteractive ?? false;
|
|
33
38
|
opts.nonInteractive = nonInteractive;
|
|
34
39
|
if (!link) {
|
|
35
40
|
if (opts.forceDelete) {
|
|
36
41
|
link = { status: "not_linked", org: null, project: null };
|
|
37
42
|
} else {
|
|
38
|
-
link = await getLinkedProject(
|
|
39
|
-
client,
|
|
43
|
+
link = await getLinkedProject(client, {
|
|
40
44
|
cwd,
|
|
41
|
-
opts.projectName,
|
|
42
|
-
opts.failIfNotFound
|
|
43
|
-
|
|
45
|
+
projectName: opts.projectName,
|
|
46
|
+
projectNameIsExplicit: Boolean(opts.projectName && opts.failIfNotFound),
|
|
47
|
+
scopeIsExplicit: detectExplicitScope(client)
|
|
48
|
+
});
|
|
44
49
|
}
|
|
45
50
|
opts.link = link;
|
|
46
51
|
}
|
|
47
52
|
if (link.status === "linked" && opts.forceDelete || link.status === "not_linked") {
|
|
48
53
|
if (link.status === "not_linked" && opts.failIfNotFound && opts.projectName) {
|
|
49
|
-
await printProjectNotFoundError(
|
|
54
|
+
await printProjectNotFoundError(
|
|
55
|
+
client,
|
|
56
|
+
opts.projectName,
|
|
57
|
+
commandName,
|
|
58
|
+
link.orgId
|
|
59
|
+
);
|
|
50
60
|
return 1;
|
|
51
61
|
}
|
|
52
62
|
if (link.status === "not_linked" && opts.requireExistingLink) {
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
AGENT_REASON,
|
|
9
|
+
AGENT_STATUS
|
|
10
|
+
} from "./chunk-IC4YEIGW.js";
|
|
11
|
+
import {
|
|
12
|
+
getScope
|
|
13
|
+
} from "./chunk-DWU7JOO6.js";
|
|
14
|
+
import {
|
|
15
|
+
getOrgById
|
|
16
|
+
} from "./chunk-DDEPCAGE.js";
|
|
17
|
+
import {
|
|
18
|
+
buildCommandWithGlobalFlags,
|
|
19
|
+
outputAgentError,
|
|
20
|
+
shouldEmitNonInteractiveCommandError
|
|
21
|
+
} from "./chunk-CB3I3QIT.js";
|
|
22
|
+
import {
|
|
23
|
+
output_manager_default
|
|
24
|
+
} from "./chunk-OX7KI3LF.js";
|
|
25
|
+
|
|
26
|
+
// src/util/projects/project-not-found-error.ts
|
|
27
|
+
async function printProjectNotFoundError(client, projectNameOrId, commandName, orgId) {
|
|
28
|
+
let contextName;
|
|
29
|
+
try {
|
|
30
|
+
if (orgId) {
|
|
31
|
+
const org = await getOrgById(client, orgId);
|
|
32
|
+
contextName = org?.slug ?? orgId;
|
|
33
|
+
} else {
|
|
34
|
+
const scope = await getScope(client);
|
|
35
|
+
contextName = scope.contextName;
|
|
36
|
+
}
|
|
37
|
+
} catch (err) {
|
|
38
|
+
contextName = orgId;
|
|
39
|
+
output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`);
|
|
40
|
+
}
|
|
41
|
+
const scopeClause = contextName ? ` (${contextName})` : "";
|
|
42
|
+
const headline = `Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;
|
|
43
|
+
output_manager_default.error(
|
|
44
|
+
`${headline}
|
|
45
|
+
|
|
46
|
+
If it lives in a different team or account:
|
|
47
|
+
\u2022 Retry with \`--scope <team-slug|your-username>\`, or
|
|
48
|
+
\u2022 Run \`vercel switch <team-slug|your-username>\` to change scope.
|
|
49
|
+
|
|
50
|
+
List accessible teams with \`vercel teams ls\`.`
|
|
51
|
+
);
|
|
52
|
+
if (!shouldEmitNonInteractiveCommandError(client)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const retryWithScope = buildCommandWithGlobalFlags(
|
|
56
|
+
client.argv,
|
|
57
|
+
`${commandName} --project ${projectNameOrId} --scope <team-slug>`
|
|
58
|
+
);
|
|
59
|
+
outputAgentError(
|
|
60
|
+
client,
|
|
61
|
+
{
|
|
62
|
+
status: AGENT_STATUS.ERROR,
|
|
63
|
+
reason: AGENT_REASON.PROJECT_NOT_FOUND,
|
|
64
|
+
message: `${headline} If it lives in a different team or account, retry with --scope <team-slug|your-username> or run \`vercel switch <team-slug|your-username>\` to change scope.`,
|
|
65
|
+
...contextName ? { scope: contextName } : {},
|
|
66
|
+
next: [
|
|
67
|
+
{ command: "vercel teams ls", when: "list accessible teams" },
|
|
68
|
+
{ command: retryWithScope, when: "retry with a specific team" },
|
|
69
|
+
{
|
|
70
|
+
command: "vercel switch <team-slug>",
|
|
71
|
+
when: "change the default scope"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
1
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
printProjectNotFoundError
|
|
81
|
+
};
|
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
} from "./chunk-IB5L4LKZ.js";
|
|
10
10
|
import {
|
|
11
11
|
require_execa
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R6IGDGX3.js";
|
|
13
13
|
import {
|
|
14
|
+
VERCEL_CONFIG_EXTENSIONS,
|
|
14
15
|
VERCEL_DIR,
|
|
15
16
|
readJSONFile,
|
|
16
17
|
require_dist as require_dist2,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
require_lib,
|
|
19
20
|
require_minimatch,
|
|
20
21
|
require_pluralize
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DDEPCAGE.js";
|
|
22
23
|
import {
|
|
23
24
|
CantParseJSONFile,
|
|
24
25
|
cmd,
|
|
@@ -10912,6 +10913,7 @@ var ALWAYS_EXCLUDED_PREFIXES = [".git/", "node_modules/"];
|
|
|
10912
10913
|
var ALWAYS_EXCLUDED_FILES = [
|
|
10913
10914
|
"vercel.json",
|
|
10914
10915
|
"vercel.toml",
|
|
10916
|
+
...VERCEL_CONFIG_EXTENSIONS.map((ext) => `vercel.${ext}`),
|
|
10915
10917
|
".vercelignore",
|
|
10916
10918
|
"now.json",
|
|
10917
10919
|
".nowignore"
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
PromptBackError,
|
|
12
12
|
PromptCanceledError,
|
|
13
13
|
getLocalPathConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UESEGACQ.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-DDEPCAGE.js";
|
|
42
42
|
import {
|
|
43
43
|
require_load_json_file
|
|
44
44
|
} from "./chunk-ECCWJHC6.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
Headers,
|
|
58
58
|
fetch
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-52QYYTM5.js";
|
|
60
60
|
import {
|
|
61
61
|
emoji,
|
|
62
62
|
link_default,
|
|
@@ -1655,7 +1655,6 @@ var Client = class extends EventEmitter {
|
|
|
1655
1655
|
output_manager_default.debug(`Retrying: ${error}
|
|
1656
1656
|
${error.stack}`);
|
|
1657
1657
|
};
|
|
1658
|
-
this.agent = opts.agent;
|
|
1659
1658
|
this.setArgv(opts.argv);
|
|
1660
1659
|
this.apiUrl = opts.apiUrl;
|
|
1661
1660
|
this.authConfig = opts.authConfig;
|
|
@@ -4,18 +4,11 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import {
|
|
8
|
-
AGENT_REASON,
|
|
9
|
-
AGENT_STATUS
|
|
10
|
-
} from "./chunk-IC4YEIGW.js";
|
|
11
7
|
import {
|
|
12
8
|
getLocalPathConfig,
|
|
13
9
|
isPromptBackError,
|
|
14
10
|
isPromptCanceledError
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
getScope
|
|
18
|
-
} from "./chunk-CQEYCOBR.js";
|
|
11
|
+
} from "./chunk-UESEGACQ.js";
|
|
19
12
|
import {
|
|
20
13
|
table
|
|
21
14
|
} from "./chunk-QEEGXNFK.js";
|
|
@@ -53,12 +46,7 @@ import {
|
|
|
53
46
|
selectAndParseRemoteUrl,
|
|
54
47
|
selectOrg,
|
|
55
48
|
writeServicesConfig
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import {
|
|
58
|
-
buildCommandWithGlobalFlags,
|
|
59
|
-
outputAgentError,
|
|
60
|
-
shouldEmitNonInteractiveCommandError
|
|
61
|
-
} from "./chunk-CB3I3QIT.js";
|
|
49
|
+
} from "./chunk-DDEPCAGE.js";
|
|
62
50
|
import {
|
|
63
51
|
printError
|
|
64
52
|
} from "./chunk-EHTPDXTS.js";
|
|
@@ -167,53 +155,6 @@ async function readConfig(dir) {
|
|
|
167
155
|
return null;
|
|
168
156
|
}
|
|
169
157
|
|
|
170
|
-
// src/util/projects/project-not-found-error.ts
|
|
171
|
-
async function printProjectNotFoundError(client, projectNameOrId, commandName) {
|
|
172
|
-
let contextName;
|
|
173
|
-
try {
|
|
174
|
-
const scope = await getScope(client);
|
|
175
|
-
contextName = scope.contextName;
|
|
176
|
-
} catch (err) {
|
|
177
|
-
output_manager_default.debug(`getScope failed during error reporting: ${err}`);
|
|
178
|
-
}
|
|
179
|
-
const scopeClause = contextName ? ` (${contextName})` : "";
|
|
180
|
-
const headline = `Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;
|
|
181
|
-
output_manager_default.error(
|
|
182
|
-
`${headline}
|
|
183
|
-
|
|
184
|
-
If it lives in a different team or account:
|
|
185
|
-
\u2022 Retry with \`--scope <team-slug|your-username>\`, or
|
|
186
|
-
\u2022 Run \`vercel switch <team-slug|your-username>\` to change scope.
|
|
187
|
-
|
|
188
|
-
List accessible teams with \`vercel teams ls\`.`
|
|
189
|
-
);
|
|
190
|
-
if (!shouldEmitNonInteractiveCommandError(client)) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
const retryWithScope = buildCommandWithGlobalFlags(
|
|
194
|
-
client.argv,
|
|
195
|
-
`${commandName} --project ${projectNameOrId} --scope <team-slug>`
|
|
196
|
-
);
|
|
197
|
-
outputAgentError(
|
|
198
|
-
client,
|
|
199
|
-
{
|
|
200
|
-
status: AGENT_STATUS.ERROR,
|
|
201
|
-
reason: AGENT_REASON.PROJECT_NOT_FOUND,
|
|
202
|
-
message: `${headline} If it lives in a different team or account, retry with --scope <team-slug|your-username> or run \`vercel switch <team-slug|your-username>\` to change scope.`,
|
|
203
|
-
...contextName ? { scope: contextName } : {},
|
|
204
|
-
next: [
|
|
205
|
-
{ command: "vercel teams ls", when: "list accessible teams" },
|
|
206
|
-
{ command: retryWithScope, when: "retry with a specific team" },
|
|
207
|
-
{
|
|
208
|
-
command: "vercel switch <team-slug>",
|
|
209
|
-
when: "change the default scope"
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
|
-
1
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
158
|
// src/util/input/display-services.ts
|
|
218
159
|
var import_frameworks = __toESM(require_frameworks(), 1);
|
|
219
160
|
import {
|
|
@@ -1190,7 +1131,7 @@ async function setupAndLink(client, path2, {
|
|
|
1190
1131
|
return { status: "error", exitCode: 1, reason: "PATH_IS_FILE" };
|
|
1191
1132
|
}
|
|
1192
1133
|
if (!link) {
|
|
1193
|
-
link = await getLinkedProject(client, path2);
|
|
1134
|
+
link = await getLinkedProject(client, { cwd: path2 });
|
|
1194
1135
|
}
|
|
1195
1136
|
const isTTY = client.stdin.isTTY;
|
|
1196
1137
|
let rootDirectory = null;
|
|
@@ -1200,7 +1141,7 @@ async function setupAndLink(client, path2, {
|
|
|
1200
1141
|
return link;
|
|
1201
1142
|
}
|
|
1202
1143
|
if (getPlatformEnv("ORG_ID") && getPlatformEnv("PROJECT_ID")) {
|
|
1203
|
-
const envLink = await getLinkedProject(client, path2);
|
|
1144
|
+
const envLink = await getLinkedProject(client, { cwd: path2 });
|
|
1204
1145
|
if (envLink.status === "error") {
|
|
1205
1146
|
return envLink;
|
|
1206
1147
|
}
|
|
@@ -1535,6 +1476,5 @@ export {
|
|
|
1535
1476
|
validatePaths,
|
|
1536
1477
|
readConfig,
|
|
1537
1478
|
displayDetectedServices,
|
|
1538
|
-
setupAndLink
|
|
1539
|
-
printProjectNotFoundError
|
|
1479
|
+
setupAndLink
|
|
1540
1480
|
};
|
|
@@ -4,6 +4,18 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
printProjectNotFoundError
|
|
9
|
+
} from "./chunk-IMUF5MGV.js";
|
|
10
|
+
import {
|
|
11
|
+
detectExplicitScope
|
|
12
|
+
} from "./chunk-DWU7JOO6.js";
|
|
13
|
+
import {
|
|
14
|
+
getLinkedProject
|
|
15
|
+
} from "./chunk-DDEPCAGE.js";
|
|
16
|
+
import {
|
|
17
|
+
omitGlobalFlagsFromArgs
|
|
18
|
+
} from "./chunk-CB3I3QIT.js";
|
|
7
19
|
import {
|
|
8
20
|
require_dist
|
|
9
21
|
} from "./chunk-OX7KI3LF.js";
|
|
@@ -299,11 +311,48 @@ function ellipsis(str, length) {
|
|
|
299
311
|
return str.length > length ? `${str.slice(0, length - 1)}\u2026` : str;
|
|
300
312
|
}
|
|
301
313
|
|
|
314
|
+
// src/util/projects/resolve-project-context.ts
|
|
315
|
+
function getInvokingCommandFromArgv(argv) {
|
|
316
|
+
const args = omitGlobalFlagsFromArgs(argv.slice(2));
|
|
317
|
+
const positionals = [];
|
|
318
|
+
for (const arg of args) {
|
|
319
|
+
if (arg.startsWith("-")) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
positionals.push(arg);
|
|
323
|
+
}
|
|
324
|
+
return positionals.join(" ");
|
|
325
|
+
}
|
|
326
|
+
async function resolveProjectContext({
|
|
327
|
+
client,
|
|
328
|
+
cwd = client.cwd,
|
|
329
|
+
projectNameOrId,
|
|
330
|
+
commandName = ""
|
|
331
|
+
}) {
|
|
332
|
+
const context = await getLinkedProject(client, {
|
|
333
|
+
cwd,
|
|
334
|
+
projectName: projectNameOrId,
|
|
335
|
+
projectNameIsExplicit: Boolean(projectNameOrId),
|
|
336
|
+
scopeIsExplicit: detectExplicitScope(client)
|
|
337
|
+
});
|
|
338
|
+
if (context.status === "not_linked" && projectNameOrId) {
|
|
339
|
+
await printProjectNotFoundError(
|
|
340
|
+
client,
|
|
341
|
+
projectNameOrId,
|
|
342
|
+
commandName || getInvokingCommandFromArgv(client.argv),
|
|
343
|
+
context.orgId
|
|
344
|
+
);
|
|
345
|
+
return { status: "error", exitCode: 1, orgId: context.orgId };
|
|
346
|
+
}
|
|
347
|
+
return context;
|
|
348
|
+
}
|
|
349
|
+
|
|
302
350
|
export {
|
|
303
351
|
readStandardInput,
|
|
304
352
|
CHECKBOX_INSTRUCTIONS,
|
|
305
353
|
getCustomEnvironments,
|
|
306
354
|
pickCustomEnvironment,
|
|
307
355
|
ellipsis,
|
|
356
|
+
resolveProjectContext,
|
|
308
357
|
require_dist2 as require_dist
|
|
309
358
|
};
|