vercel 51.6.1 → 51.8.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-JALB3DKU.js → add-6TAGTCM2.js} +7 -7
- package/dist/chunks/{chunk-Z66S4G43.js → chunk-45TDB64X.js} +1 -1
- package/dist/chunks/{chunk-U73MZTAR.js → chunk-5VQMJCHT.js} +3 -3
- package/dist/chunks/{chunk-QFP6FEBN.js → chunk-6WHQFFN2.js} +1 -1
- package/dist/chunks/{chunk-FY3TMBQS.js → chunk-AQ4L3FS4.js} +1 -1
- package/dist/chunks/{chunk-DAOAZ2VQ.js → chunk-BHDZCUTT.js} +1 -1
- package/dist/chunks/{chunk-PVZBM6NU.js → chunk-BJQTGP42.js} +1 -1
- package/dist/chunks/{chunk-CHUU7VXC.js → chunk-BNVEZBEW.js} +75 -68
- package/dist/chunks/{chunk-MUJZV257.js → chunk-BQI2CW7A.js} +6 -6
- package/dist/chunks/{chunk-DED5G3HZ.js → chunk-CRZM5WM2.js} +1 -1
- package/dist/chunks/{chunk-MGJMZIIT.js → chunk-CUCRUPRY.js} +1 -1
- package/dist/chunks/{chunk-RW7LIX2Y.js → chunk-DQPDIHII.js} +2 -2
- package/dist/chunks/{chunk-LUCCJW67.js → chunk-DVQ4SIWF.js} +1 -1
- package/dist/chunks/{chunk-DF4AVQY3.js → chunk-G6RXZLQ2.js} +2 -2
- package/dist/chunks/{chunk-WCTFUOSJ.js → chunk-GE6G37P4.js} +1 -1
- package/dist/chunks/{chunk-3N3AYMMW.js → chunk-H2PHTCJL.js} +30 -17
- package/dist/chunks/{chunk-HUPHOH2F.js → chunk-HRVQZZ3Q.js} +1 -1
- package/dist/chunks/{chunk-553A6UFX.js → chunk-IHOJDWAH.js} +6 -6
- package/dist/chunks/{chunk-FH2OHGXG.js → chunk-KM6BIRA3.js} +3 -3
- package/dist/chunks/{chunk-LUJPLXGG.js → chunk-KUY7VLTK.js} +2 -2
- package/dist/chunks/{chunk-C7UTFMYF.js → chunk-LDXYSGPZ.js} +2 -2
- package/dist/chunks/{chunk-34IM6J7A.js → chunk-N5IS4YW4.js} +2 -2
- package/dist/chunks/{chunk-4X7GBE5B.js → chunk-R4ZPBOD7.js} +23 -23
- package/dist/chunks/{chunk-VDM5O3P6.js → chunk-RFMC2QXQ.js} +3 -3
- package/dist/chunks/{chunk-BBW6EGBQ.js → chunk-SKXUP3WW.js} +1 -1
- package/dist/chunks/{chunk-7L4XVUFK.js → chunk-TAOVG4PS.js} +2 -2
- package/dist/chunks/{chunk-UG4457SI.js → chunk-U7MQBM3F.js} +70 -57
- package/dist/chunks/{chunk-WYRFA4PX.js → chunk-UBOSX7RM.js} +2 -2
- package/dist/chunks/{chunk-QHXUBID6.js → chunk-UP2QQYRS.js} +3 -3
- package/dist/chunks/{chunk-XLKXWNRG.js → chunk-UWKTUK3W.js} +1 -1
- package/dist/chunks/{chunk-MCTAPJSL.js → chunk-VGWGLBUC.js} +1 -1
- package/dist/chunks/{chunk-CGTXAXZ4.js → chunk-XKHLPA6V.js} +3 -1
- package/dist/chunks/{chunk-5KFTN63Q.js → chunk-Y3HAJQCS.js} +4 -4
- package/dist/chunks/{compile-vercel-config-V2SHBZFW.js → compile-vercel-config-3LQ66C4J.js} +3 -3
- package/dist/chunks/{delete-5RI2PRIT.js → delete-57Y647IJ.js} +5 -5
- package/dist/chunks/{disable-JPKO7VCV.js → disable-E7QAIMBG.js} +5 -5
- package/dist/chunks/{discard-KXGXXDNX.js → discard-6JNSEHUD.js} +5 -5
- package/dist/chunks/{edit-VFUE5PVU.js → edit-XKOVDTOO.js} +6 -6
- package/dist/chunks/{enable-V2AX2FXX.js → enable-HXRMVTBB.js} +5 -5
- package/dist/chunks/{export-BG3TOT6G.js → export-MRADQNKX.js} +5 -5
- package/dist/chunks/{inspect-3QVCZVKV.js → inspect-AOOSX4VO.js} +7 -7
- package/dist/chunks/{list-Y2YMJWEY.js → list-LQ4BDCK7.js} +5 -5
- package/dist/chunks/{list-CWTYXKB5.js → list-YIDM3OOG.js} +8 -8
- package/dist/chunks/{ls-SY2CP56I.js → ls-7GZP6WNF.js} +7 -7
- package/dist/chunks/{publish-75IJ4PZS.js → publish-VPLDS2W7.js} +5 -5
- package/dist/chunks/{query-MLMGNGL2.js → query-SRFELIAP.js} +6 -6
- package/dist/chunks/{reorder-757V4BF5.js → reorder-UWAXWRXX.js} +5 -5
- package/dist/chunks/{restore-KV44XHFS.js → restore-YHQNMAGI.js} +5 -5
- package/dist/chunks/{rm-3EGKFLKW.js → rm-HA373E4I.js} +7 -7
- package/dist/chunks/{rule-inspect-AYUGCLVJ.js → rule-inspect-WMR7SVJY.js} +7 -7
- package/dist/chunks/{rules-FUFDJOIP.js → rules-CPRD5HRH.js} +7 -7
- package/dist/chunks/{schema-CI2XUYTW.js → schema-AGVIOWAU.js} +7 -7
- package/dist/chunks/{types-M7LVCA3E.js → types-QNN5CDCB.js} +3 -3
- package/dist/chunks/{update-6EM4XIDW.js → update-K5GTSDIT.js} +7 -7
- package/dist/commands/build/index.js +24 -15
- package/dist/commands/deploy/index.js +21 -21
- package/dist/commands/dev/index.js +35 -29
- package/dist/commands/env/index.js +146 -33
- package/dist/commands/link/index.js +17 -17
- package/dist/commands/list/index.js +8 -8
- package/dist/commands-bulk.js +215 -115
- package/dist/index.js +20 -20
- package/dist/version.mjs +1 -1
- package/package.json +18 -18
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../../chunks/chunk-2HSQ7YUK.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateCommand
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-SKXUP3WW.js";
|
|
13
13
|
import {
|
|
14
14
|
highlight
|
|
15
15
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -18,31 +18,31 @@ import {
|
|
|
18
18
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
19
19
|
import {
|
|
20
20
|
devCommand
|
|
21
|
-
} from "../../chunks/chunk-
|
|
21
|
+
} from "../../chunks/chunk-BJQTGP42.js";
|
|
22
22
|
import {
|
|
23
23
|
OUTPUT_DIR,
|
|
24
24
|
importBuilders,
|
|
25
25
|
require_mime_types,
|
|
26
26
|
require_npa,
|
|
27
27
|
staticFiles
|
|
28
|
-
} from "../../chunks/chunk-
|
|
28
|
+
} from "../../chunks/chunk-N5IS4YW4.js";
|
|
29
29
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
30
30
|
import {
|
|
31
31
|
pickOverrides
|
|
32
|
-
} from "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
32
|
+
} from "../../chunks/chunk-6WHQFFN2.js";
|
|
33
|
+
import "../../chunks/chunk-AQ4L3FS4.js";
|
|
34
34
|
import {
|
|
35
35
|
displayDetectedServices,
|
|
36
36
|
readConfig,
|
|
37
37
|
setupAndLink
|
|
38
|
-
} from "../../chunks/chunk-
|
|
38
|
+
} from "../../chunks/chunk-H2PHTCJL.js";
|
|
39
39
|
import {
|
|
40
40
|
getLocalPathConfig
|
|
41
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-KUY7VLTK.js";
|
|
42
42
|
import {
|
|
43
43
|
help
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
45
|
+
import "../../chunks/chunk-GE6G37P4.js";
|
|
46
46
|
import {
|
|
47
47
|
VERCEL_DIR,
|
|
48
48
|
getLinkedProject,
|
|
@@ -66,14 +66,14 @@ import {
|
|
|
66
66
|
resolveProjectCwd,
|
|
67
67
|
tryDetectServices,
|
|
68
68
|
validateConfig
|
|
69
|
-
} from "../../chunks/chunk-
|
|
69
|
+
} from "../../chunks/chunk-U7MQBM3F.js";
|
|
70
70
|
import {
|
|
71
71
|
TelemetryClient
|
|
72
72
|
} from "../../chunks/chunk-U3WLEFHU.js";
|
|
73
73
|
import {
|
|
74
74
|
buildCommandWithYes,
|
|
75
75
|
outputActionRequired
|
|
76
|
-
} from "../../chunks/chunk-
|
|
76
|
+
} from "../../chunks/chunk-XKHLPA6V.js";
|
|
77
77
|
import {
|
|
78
78
|
require_ms
|
|
79
79
|
} from "../../chunks/chunk-CO5D46AG.js";
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
getFlagsSpecification,
|
|
82
82
|
parseArguments,
|
|
83
83
|
printError
|
|
84
|
-
} from "../../chunks/chunk-
|
|
84
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
85
85
|
import {
|
|
86
86
|
CantParseJSONFile,
|
|
87
87
|
LambdaSizeExceededError,
|
|
@@ -18484,27 +18484,33 @@ var QueueBroker = class {
|
|
|
18484
18484
|
state.receiptHandle = receiptHandle;
|
|
18485
18485
|
state.deliveryCount++;
|
|
18486
18486
|
state.leaseExpiresAt = Date.now() + DEFAULT_VISIBILITY_TIMEOUT;
|
|
18487
|
-
const
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
id: message2.messageId,
|
|
18492
|
-
time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
18493
|
-
datacontenttype: "application/json",
|
|
18494
|
-
data: {
|
|
18495
|
-
queueName: message2.queueName,
|
|
18496
|
-
consumerGroup: group.name,
|
|
18497
|
-
messageId: message2.messageId
|
|
18498
|
-
}
|
|
18499
|
-
});
|
|
18487
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
18488
|
+
const expiresAt = new Date(
|
|
18489
|
+
new Date(message2.createdAt).getTime() + message2.retentionMs
|
|
18490
|
+
).toISOString();
|
|
18500
18491
|
output_manager_default.debug(
|
|
18501
|
-
`queues: dispatching
|
|
18492
|
+
`queues: dispatching v2beta callback to worker "${group.name}" at ${upstream}`
|
|
18502
18493
|
);
|
|
18503
18494
|
try {
|
|
18504
18495
|
const response = await (0, import_node_fetch.default)(`${upstream}/`, {
|
|
18505
18496
|
method: "POST",
|
|
18506
|
-
headers: {
|
|
18507
|
-
|
|
18497
|
+
headers: {
|
|
18498
|
+
"content-type": message2.contentType,
|
|
18499
|
+
"ce-type": "com.vercel.queue.v2beta",
|
|
18500
|
+
"ce-specversion": "1.0",
|
|
18501
|
+
"ce-source": `/topic/${message2.queueName}/consumer/${group.name}`,
|
|
18502
|
+
"ce-id": message2.messageId,
|
|
18503
|
+
"ce-time": now,
|
|
18504
|
+
"ce-vqsmessageid": message2.messageId,
|
|
18505
|
+
"ce-vqsqueuename": message2.queueName,
|
|
18506
|
+
"ce-vqsconsumergroup": group.name,
|
|
18507
|
+
"ce-vqsreceipthandle": receiptHandle,
|
|
18508
|
+
"ce-vqsdeliverycount": String(state.deliveryCount),
|
|
18509
|
+
"ce-vqscreatedat": message2.createdAt,
|
|
18510
|
+
"ce-vqsexpiresat": expiresAt,
|
|
18511
|
+
"ce-vqsregion": "dev1"
|
|
18512
|
+
},
|
|
18513
|
+
body: message2.payload
|
|
18508
18514
|
});
|
|
18509
18515
|
if (!response.ok) {
|
|
18510
18516
|
output_manager_default.debug(
|
|
@@ -19852,7 +19858,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19852
19858
|
return void 0;
|
|
19853
19859
|
}
|
|
19854
19860
|
async _getVercelConfig() {
|
|
19855
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
19861
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-3LQ66C4J.js");
|
|
19856
19862
|
await compileVercelConfig(this.cwd);
|
|
19857
19863
|
const configPath = getLocalPathConfig(this.cwd);
|
|
19858
19864
|
const [
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
} from "../../chunks/chunk-C5YP6KFI.js";
|
|
13
13
|
import {
|
|
14
14
|
formatTable
|
|
15
|
-
} from "../../chunks/chunk-
|
|
15
|
+
} from "../../chunks/chunk-G6RXZLQ2.js";
|
|
16
16
|
import {
|
|
17
17
|
suggestNextCommands
|
|
18
18
|
} from "../../chunks/chunk-LOS7HHU3.js";
|
|
19
19
|
import {
|
|
20
20
|
formatEnvironment,
|
|
21
21
|
validateLsArgs
|
|
22
|
-
} from "../../chunks/chunk-
|
|
22
|
+
} from "../../chunks/chunk-45TDB64X.js";
|
|
23
23
|
import {
|
|
24
24
|
validateJsonOutput
|
|
25
25
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -28,25 +28,25 @@ import {
|
|
|
28
28
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
29
29
|
import {
|
|
30
30
|
getCommandAliases
|
|
31
|
-
} from "../../chunks/chunk-
|
|
32
|
-
import "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
35
|
-
import "../../chunks/chunk-
|
|
36
|
-
import "../../chunks/chunk-
|
|
37
|
-
import "../../chunks/chunk-
|
|
38
|
-
import "../../chunks/chunk-
|
|
31
|
+
} from "../../chunks/chunk-R4ZPBOD7.js";
|
|
32
|
+
import "../../chunks/chunk-CRZM5WM2.js";
|
|
33
|
+
import "../../chunks/chunk-BHDZCUTT.js";
|
|
34
|
+
import "../../chunks/chunk-BJQTGP42.js";
|
|
35
|
+
import "../../chunks/chunk-UWKTUK3W.js";
|
|
36
|
+
import "../../chunks/chunk-TAOVG4PS.js";
|
|
37
|
+
import "../../chunks/chunk-DVQ4SIWF.js";
|
|
38
|
+
import "../../chunks/chunk-VGWGLBUC.js";
|
|
39
39
|
import {
|
|
40
40
|
require_execa
|
|
41
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-AQ4L3FS4.js";
|
|
42
42
|
import {
|
|
43
43
|
autoInstallVercelPlugin
|
|
44
|
-
} from "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-UBOSX7RM.js";
|
|
45
45
|
import "../../chunks/chunk-E3NE4SKN.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
|
-
} from "../../chunks/chunk-
|
|
49
|
-
import "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
49
|
+
import "../../chunks/chunk-GE6G37P4.js";
|
|
50
50
|
import {
|
|
51
51
|
STANDARD_ENVIRONMENTS,
|
|
52
52
|
addSubcommand,
|
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
getEnvRecords,
|
|
57
57
|
getEnvTargetPlaceholder,
|
|
58
58
|
getLinkedProject,
|
|
59
|
+
getTeamById,
|
|
59
60
|
listSubcommand,
|
|
60
61
|
param,
|
|
61
62
|
parseTarget,
|
|
@@ -66,7 +67,7 @@ import {
|
|
|
66
67
|
require_frameworks,
|
|
67
68
|
runSubcommand,
|
|
68
69
|
updateSubcommand
|
|
69
|
-
} from "../../chunks/chunk-
|
|
70
|
+
} from "../../chunks/chunk-U7MQBM3F.js";
|
|
70
71
|
import {
|
|
71
72
|
TelemetryClient,
|
|
72
73
|
require_dist as require_dist2
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
getPreservedArgsForEnvUpdate,
|
|
82
83
|
outputActionRequired,
|
|
83
84
|
outputAgentError
|
|
84
|
-
} from "../../chunks/chunk-
|
|
85
|
+
} from "../../chunks/chunk-XKHLPA6V.js";
|
|
85
86
|
import {
|
|
86
87
|
require_ms,
|
|
87
88
|
stamp_default
|
|
@@ -90,7 +91,7 @@ import {
|
|
|
90
91
|
getFlagsSpecification,
|
|
91
92
|
parseArguments,
|
|
92
93
|
printError
|
|
93
|
-
} from "../../chunks/chunk-
|
|
94
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
94
95
|
import {
|
|
95
96
|
getCommandName,
|
|
96
97
|
getCommandNamePlain,
|
|
@@ -371,6 +372,11 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
|
|
|
371
372
|
this.trackCliFlag("sensitive");
|
|
372
373
|
}
|
|
373
374
|
}
|
|
375
|
+
trackCliFlagNoSensitive(noSensitive) {
|
|
376
|
+
if (noSensitive) {
|
|
377
|
+
this.trackCliFlag("no-sensitive");
|
|
378
|
+
}
|
|
379
|
+
}
|
|
374
380
|
trackCliFlagForce(force) {
|
|
375
381
|
if (force) {
|
|
376
382
|
this.trackCliFlag("force");
|
|
@@ -390,6 +396,18 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
|
|
|
390
396
|
|
|
391
397
|
// src/commands/env/add.ts
|
|
392
398
|
import { determineAgent } from "@vercel/detect-agent";
|
|
399
|
+
function resolveTypeForTarget(target, opts) {
|
|
400
|
+
if (target === "development") {
|
|
401
|
+
return "encrypted";
|
|
402
|
+
}
|
|
403
|
+
if (opts.forceEncrypted)
|
|
404
|
+
return "encrypted";
|
|
405
|
+
if (opts.forceSensitive)
|
|
406
|
+
return "sensitive";
|
|
407
|
+
if (opts.policyOn)
|
|
408
|
+
return "sensitive";
|
|
409
|
+
return "sensitive";
|
|
410
|
+
}
|
|
393
411
|
function valueForNextCommand(value) {
|
|
394
412
|
if (!/[\s'"\\]/.test(value))
|
|
395
413
|
return value;
|
|
@@ -439,6 +457,7 @@ async function add(client, argv) {
|
|
|
439
457
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
440
458
|
telemetryClient.trackCliOptionValue(opts["--value"]);
|
|
441
459
|
telemetryClient.trackCliFlagSensitive(opts["--sensitive"]);
|
|
460
|
+
telemetryClient.trackCliFlagNoSensitive(opts["--no-sensitive"]);
|
|
442
461
|
telemetryClient.trackCliFlagForce(opts["--force"]);
|
|
443
462
|
telemetryClient.trackCliFlagGuidance(opts["--guidance"]);
|
|
444
463
|
telemetryClient.trackCliFlagYes(opts["--yes"]);
|
|
@@ -797,11 +816,8 @@ async function add(client, argv) {
|
|
|
797
816
|
}
|
|
798
817
|
}
|
|
799
818
|
const choices = [
|
|
800
|
-
...envTargetChoices.filter((c) => !existingTargets.has(c.value)),
|
|
801
|
-
...customEnvironments.filter((c) => !existingCustomEnvs.has(c.id)).map((c) => ({
|
|
802
|
-
name: c.slug,
|
|
803
|
-
value: c.id
|
|
804
|
-
}))
|
|
819
|
+
...envTargetChoices.filter((c) => !existingTargets.has(c.value)).map((c) => ({ name: c.name, value: c.value })),
|
|
820
|
+
...customEnvironments.filter((c) => !existingCustomEnvs.has(c.id)).map((c) => ({ name: c.slug, value: c.id }))
|
|
805
821
|
];
|
|
806
822
|
if (!envGitBranch && choices.length === 0 && !opts["--force"]) {
|
|
807
823
|
output_manager_default.error(
|
|
@@ -813,7 +829,31 @@ async function add(client, argv) {
|
|
|
813
829
|
);
|
|
814
830
|
return 1;
|
|
815
831
|
}
|
|
816
|
-
|
|
832
|
+
const forceSensitive = Boolean(opts["--sensitive"]);
|
|
833
|
+
const forceEncrypted = Boolean(opts["--no-sensitive"]);
|
|
834
|
+
if (forceSensitive && forceEncrypted) {
|
|
835
|
+
output_manager_default.error(
|
|
836
|
+
`--sensitive and --no-sensitive cannot be used together. Pick one.`
|
|
837
|
+
);
|
|
838
|
+
return 1;
|
|
839
|
+
}
|
|
840
|
+
let policyOn = false;
|
|
841
|
+
if (link.org.type === "team") {
|
|
842
|
+
try {
|
|
843
|
+
const team = await getTeamById(client, link.org.id);
|
|
844
|
+
policyOn = team?.sensitiveEnvironmentVariablePolicy === "on";
|
|
845
|
+
} catch {
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (policyOn) {
|
|
849
|
+
for (const choice of choices) {
|
|
850
|
+
if (choice.value === "development") {
|
|
851
|
+
choice.disabled = "(disallowed)";
|
|
852
|
+
} else if (choice.value === "production" || choice.value === "preview") {
|
|
853
|
+
choice.checked = true;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
817
857
|
let envValue;
|
|
818
858
|
if (stdInput) {
|
|
819
859
|
envValue = stdInput;
|
|
@@ -835,15 +875,6 @@ async function add(client, argv) {
|
|
|
835
875
|
]
|
|
836
876
|
});
|
|
837
877
|
}
|
|
838
|
-
if (type === "encrypted") {
|
|
839
|
-
const isSensitive = await client.input.confirm(
|
|
840
|
-
`Your value will be encrypted. Mark as sensitive?`,
|
|
841
|
-
false
|
|
842
|
-
);
|
|
843
|
-
if (isSensitive) {
|
|
844
|
-
type = "sensitive";
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
878
|
envValue = await client.input.password({
|
|
848
879
|
message: `What's the value of ${envName}?`,
|
|
849
880
|
mask: true
|
|
@@ -923,6 +954,88 @@ async function add(client, argv) {
|
|
|
923
954
|
});
|
|
924
955
|
}
|
|
925
956
|
}
|
|
957
|
+
const hasDevelopment = envTargets.includes("development");
|
|
958
|
+
const hasSensitiveCapable = envTargets.some((t) => t !== "development");
|
|
959
|
+
if (policyOn && hasDevelopment) {
|
|
960
|
+
const msg = `Your team has enabled the Sensitive Environment Variables Policy and the Development Environment does not support sensitive values. https://vercel.com/docs/environment-variables/sensitive-environment-variables#environment-variables-policy`;
|
|
961
|
+
if (client.nonInteractive) {
|
|
962
|
+
outputAgentError(
|
|
963
|
+
client,
|
|
964
|
+
{
|
|
965
|
+
status: "error",
|
|
966
|
+
reason: "development_disallowed_by_team_policy",
|
|
967
|
+
message: msg
|
|
968
|
+
},
|
|
969
|
+
1
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
output_manager_default.error(msg);
|
|
973
|
+
return 1;
|
|
974
|
+
}
|
|
975
|
+
if (forceSensitive && hasDevelopment) {
|
|
976
|
+
const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
|
|
977
|
+
if (client.nonInteractive) {
|
|
978
|
+
outputAgentError(
|
|
979
|
+
client,
|
|
980
|
+
{
|
|
981
|
+
status: "error",
|
|
982
|
+
reason: "sensitive_not_allowed_on_development",
|
|
983
|
+
message: msg
|
|
984
|
+
},
|
|
985
|
+
1
|
|
986
|
+
);
|
|
987
|
+
}
|
|
988
|
+
output_manager_default.error(msg);
|
|
989
|
+
return 1;
|
|
990
|
+
}
|
|
991
|
+
if (hasDevelopment && hasSensitiveCapable) {
|
|
992
|
+
const msg = `Development cannot be combined with other Environments because Development does not support sensitive Environment Variables. Run ${getCommandName(
|
|
993
|
+
"env add"
|
|
994
|
+
)} separately for Development.`;
|
|
995
|
+
if (client.nonInteractive) {
|
|
996
|
+
outputAgentError(
|
|
997
|
+
client,
|
|
998
|
+
{
|
|
999
|
+
status: "error",
|
|
1000
|
+
reason: "mixed_development_and_sensitive_capable_targets",
|
|
1001
|
+
message: msg
|
|
1002
|
+
},
|
|
1003
|
+
1
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
output_manager_default.error(msg);
|
|
1007
|
+
return 1;
|
|
1008
|
+
}
|
|
1009
|
+
let finalType = resolveTypeForTarget(
|
|
1010
|
+
hasDevelopment ? "development" : "production",
|
|
1011
|
+
{ forceSensitive, forceEncrypted, policyOn }
|
|
1012
|
+
);
|
|
1013
|
+
const userWasExplicit = forceSensitive || forceEncrypted;
|
|
1014
|
+
const canPromptForType = !client.nonInteractive && !userWasExplicit && !policyOn && hasSensitiveCapable && !skipConfirm;
|
|
1015
|
+
if (canPromptForType) {
|
|
1016
|
+
output_manager_default.log(
|
|
1017
|
+
`Sensitive values cannot be retrieved later from the dashboard or CLI.`
|
|
1018
|
+
);
|
|
1019
|
+
const keepSensitive = await client.input.confirm(
|
|
1020
|
+
`Make it sensitive?`,
|
|
1021
|
+
true
|
|
1022
|
+
);
|
|
1023
|
+
if (!keepSensitive) {
|
|
1024
|
+
finalType = "encrypted";
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
if (policyOn && hasSensitiveCapable) {
|
|
1028
|
+
if (forceEncrypted) {
|
|
1029
|
+
output_manager_default.warn(
|
|
1030
|
+
`--no-sensitive is ignored: your team enforces sensitive Environment Variables for Production and Preview.`
|
|
1031
|
+
);
|
|
1032
|
+
finalType = "sensitive";
|
|
1033
|
+
} else if (!userWasExplicit) {
|
|
1034
|
+
output_manager_default.log(
|
|
1035
|
+
`Your team requires sensitive Environment Variables for Production and Preview.`
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
926
1039
|
const upsert = opts["--force"] ? "true" : "";
|
|
927
1040
|
const addStamp = stamp_default();
|
|
928
1041
|
try {
|
|
@@ -931,7 +1044,7 @@ async function add(client, argv) {
|
|
|
931
1044
|
client,
|
|
932
1045
|
project.id,
|
|
933
1046
|
upsert,
|
|
934
|
-
|
|
1047
|
+
finalType,
|
|
935
1048
|
envName,
|
|
936
1049
|
finalValue,
|
|
937
1050
|
envTargets,
|
|
@@ -11,42 +11,42 @@ import {
|
|
|
11
11
|
addSubcommand7 as addSubcommand,
|
|
12
12
|
getCommandAliases,
|
|
13
13
|
linkCommand
|
|
14
|
-
} from "../../chunks/chunk-
|
|
15
|
-
import "../../chunks/chunk-
|
|
16
|
-
import "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-
|
|
18
|
-
import "../../chunks/chunk-
|
|
19
|
-
import "../../chunks/chunk-
|
|
20
|
-
import "../../chunks/chunk-
|
|
21
|
-
import "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-R4ZPBOD7.js";
|
|
15
|
+
import "../../chunks/chunk-CRZM5WM2.js";
|
|
16
|
+
import "../../chunks/chunk-BHDZCUTT.js";
|
|
17
|
+
import "../../chunks/chunk-BJQTGP42.js";
|
|
18
|
+
import "../../chunks/chunk-UWKTUK3W.js";
|
|
19
|
+
import "../../chunks/chunk-TAOVG4PS.js";
|
|
20
|
+
import "../../chunks/chunk-DVQ4SIWF.js";
|
|
21
|
+
import "../../chunks/chunk-VGWGLBUC.js";
|
|
22
22
|
import {
|
|
23
23
|
ensureLink
|
|
24
|
-
} from "../../chunks/chunk-
|
|
25
|
-
import "../../chunks/chunk-
|
|
26
|
-
import "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-5VQMJCHT.js";
|
|
25
|
+
import "../../chunks/chunk-H2PHTCJL.js";
|
|
26
|
+
import "../../chunks/chunk-KUY7VLTK.js";
|
|
27
27
|
import {
|
|
28
28
|
autoInstallVercelPlugin
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-UBOSX7RM.js";
|
|
30
30
|
import "../../chunks/chunk-E3NE4SKN.js";
|
|
31
31
|
import {
|
|
32
32
|
help
|
|
33
|
-
} from "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
34
|
+
import "../../chunks/chunk-GE6G37P4.js";
|
|
35
35
|
import {
|
|
36
36
|
addRepoLink,
|
|
37
37
|
ensureRepoLink,
|
|
38
38
|
getTeams
|
|
39
|
-
} from "../../chunks/chunk-
|
|
39
|
+
} from "../../chunks/chunk-U7MQBM3F.js";
|
|
40
40
|
import {
|
|
41
41
|
TelemetryClient
|
|
42
42
|
} from "../../chunks/chunk-U3WLEFHU.js";
|
|
43
|
-
import "../../chunks/chunk-
|
|
43
|
+
import "../../chunks/chunk-XKHLPA6V.js";
|
|
44
44
|
import "../../chunks/chunk-CO5D46AG.js";
|
|
45
45
|
import {
|
|
46
46
|
getFlagsSpecification,
|
|
47
47
|
parseArguments,
|
|
48
48
|
printError
|
|
49
|
-
} from "../../chunks/chunk-
|
|
49
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
50
50
|
import {
|
|
51
51
|
cmd
|
|
52
52
|
} from "../../chunks/chunk-ECRBC4HL.js";
|
|
@@ -19,33 +19,33 @@ import {
|
|
|
19
19
|
} from "../../chunks/chunk-N45K6NXC.js";
|
|
20
20
|
import {
|
|
21
21
|
getScope
|
|
22
|
-
} from "../../chunks/chunk-
|
|
22
|
+
} from "../../chunks/chunk-CUCRUPRY.js";
|
|
23
23
|
import {
|
|
24
24
|
formatEnvironment,
|
|
25
25
|
validateLsArgs
|
|
26
|
-
} from "../../chunks/chunk-
|
|
26
|
+
} from "../../chunks/chunk-45TDB64X.js";
|
|
27
27
|
import {
|
|
28
28
|
validateJsonOutput
|
|
29
29
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
30
30
|
import {
|
|
31
31
|
listCommand
|
|
32
|
-
} from "../../chunks/chunk-
|
|
32
|
+
} from "../../chunks/chunk-VGWGLBUC.js";
|
|
33
33
|
import {
|
|
34
34
|
help
|
|
35
|
-
} from "../../chunks/chunk-
|
|
35
|
+
} from "../../chunks/chunk-LDXYSGPZ.js";
|
|
36
36
|
import {
|
|
37
37
|
table
|
|
38
|
-
} from "../../chunks/chunk-
|
|
38
|
+
} from "../../chunks/chunk-GE6G37P4.js";
|
|
39
39
|
import {
|
|
40
40
|
formatProject,
|
|
41
41
|
getLinkedProject,
|
|
42
42
|
getProjectByNameOrId,
|
|
43
43
|
parseTarget
|
|
44
|
-
} from "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-U7MQBM3F.js";
|
|
45
45
|
import {
|
|
46
46
|
TelemetryClient
|
|
47
47
|
} from "../../chunks/chunk-U3WLEFHU.js";
|
|
48
|
-
import "../../chunks/chunk-
|
|
48
|
+
import "../../chunks/chunk-XKHLPA6V.js";
|
|
49
49
|
import {
|
|
50
50
|
elapsed,
|
|
51
51
|
require_ms
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getFlagsSpecification,
|
|
55
55
|
parseArguments,
|
|
56
56
|
printError
|
|
57
|
-
} from "../../chunks/chunk-
|
|
57
|
+
} from "../../chunks/chunk-RFMC2QXQ.js";
|
|
58
58
|
import {
|
|
59
59
|
ProjectNotFound,
|
|
60
60
|
getCommandName,
|