vercel 54.6.0 → 54.6.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-4JTZ2IN2.js → add-PABR7UDW.js} +4 -4
- package/dist/chunks/{chunk-7O3VXZBW.js → chunk-3ZDA2CNR.js} +1 -1
- package/dist/chunks/{chunk-B43F7BHW.js → chunk-55ZHYOXR.js} +1 -1
- package/dist/chunks/{chunk-JD4N3RDP.js → chunk-5IH3CKCW.js} +1 -1
- package/dist/chunks/{chunk-C7WFNC2H.js → chunk-BDBG7347.js} +1 -1
- package/dist/chunks/{chunk-BT4S267X.js → chunk-DSVJF7BT.js} +2 -2
- package/dist/chunks/{chunk-KSWKCPMW.js → chunk-DUIYXUIB.js} +5 -5
- package/dist/chunks/{chunk-6PVIXIDG.js → chunk-F7OFM5NM.js} +1 -1
- package/dist/chunks/{chunk-AQMLIXGD.js → chunk-FJOUYHN4.js} +1 -1
- package/dist/chunks/{chunk-IZ6WAFPZ.js → chunk-HD3NJHWT.js} +1 -1
- package/dist/chunks/{chunk-XFSFHTAB.js → chunk-HXCZ6ZNO.js} +1 -1
- package/dist/chunks/{chunk-MOA7PCJA.js → chunk-KSS3AMDU.js} +1 -1
- package/dist/chunks/{chunk-XR64AS27.js → chunk-KTMAZEOI.js} +2 -2
- package/dist/chunks/{chunk-KNTWCQDY.js → chunk-L3BYKHWE.js} +3 -3
- package/dist/chunks/{chunk-LT7RPFRM.js → chunk-NVHKS2AA.js} +2 -2
- package/dist/chunks/{chunk-HXXKDZQ6.js → chunk-OF7SJ4AC.js} +1 -1
- package/dist/chunks/{chunk-TPCECDGK.js → chunk-TFLXDK24.js} +3 -3
- package/dist/chunks/{chunk-OLXE4TRH.js → chunk-TKQCQ2Z4.js} +4 -4
- package/dist/chunks/{chunk-PKUYGVBJ.js → chunk-V2EPUZ7C.js} +23 -5
- package/dist/chunks/{chunk-V23PMSXG.js → chunk-YV5W67AJ.js} +3 -3
- package/dist/chunks/{compile-vercel-config-TJYP77GR.js → compile-vercel-config-UWWV5Q74.js} +1 -1
- package/dist/chunks/{delete-KMJUZ2FR.js → delete-Z2TQELK6.js} +2 -2
- package/dist/chunks/{disable-JNVD32GK.js → disable-D7GG4H3R.js} +2 -2
- package/dist/chunks/{discard-IHJUBIIP.js → discard-IIG3TUIT.js} +2 -2
- package/dist/chunks/{edit-SHG24GD3.js → edit-DD2KENCR.js} +3 -3
- package/dist/chunks/{enable-BPPOFBS5.js → enable-UCYQRKCL.js} +2 -2
- package/dist/chunks/{export-NXMANIFJ.js → export-U4BZUMSZ.js} +2 -2
- package/dist/chunks/{inspect-3QUNVUYY.js → inspect-PYA4NFIT.js} +3 -3
- package/dist/chunks/{list-3EEABCQ5.js → list-QHVLSNFO.js} +3 -3
- package/dist/chunks/{list-DIFVR5IT.js → list-RDT3KISX.js} +2 -2
- package/dist/chunks/{ls-W3EW6GXH.js → ls-E3EILWRU.js} +4 -4
- package/dist/chunks/{publish-MJWCDLBZ.js → publish-HSIQS5SO.js} +2 -2
- package/dist/chunks/{query-C6RJSZM3.js → query-5SREWTMU.js} +2 -2
- package/dist/chunks/{reorder-PPF7SVNU.js → reorder-QRLPE5HF.js} +2 -2
- package/dist/chunks/{restore-EOJNTA2T.js → restore-AI3YOHCB.js} +2 -2
- package/dist/chunks/{rm-WEZ4K7UG.js → rm-ZLDS7FJG.js} +4 -4
- package/dist/chunks/{rule-inspect-PXCF73V3.js → rule-inspect-2LDHZJ24.js} +4 -4
- package/dist/chunks/{rules-DF7IFF4R.js → rules-DTEFM3BW.js} +6 -6
- package/dist/chunks/{schema-3UFDQZFG.js → schema-G6O7BMIJ.js} +2 -2
- package/dist/chunks/{update-FNAEWCUN.js → update-A3O2FDGF.js} +4 -4
- package/dist/commands/build/index.js +521 -379
- package/dist/commands/deploy/index.js +10 -10
- package/dist/commands/dev/index.js +8 -8
- package/dist/commands/env/index.js +146 -80
- package/dist/commands/link/index.js +7 -7
- package/dist/commands/list/index.js +3 -3
- package/dist/commands-bulk.js +31 -31
- package/dist/index.js +8 -8
- package/dist/version.mjs +1 -1
- package/package.json +20 -20
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
purchaseDomainIfAvailable,
|
|
15
15
|
require_cjs,
|
|
16
16
|
setupDomain
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-DUIYXUIB.js";
|
|
18
18
|
import {
|
|
19
19
|
readLocalConfig
|
|
20
|
-
} from "../../chunks/chunk-
|
|
20
|
+
} from "../../chunks/chunk-YV5W67AJ.js";
|
|
21
21
|
import {
|
|
22
22
|
highlight
|
|
23
23
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
deprecatedArchiveSplitTgz,
|
|
42
42
|
getCommandAliases,
|
|
43
43
|
initSubcommand
|
|
44
|
-
} from "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-KTMAZEOI.js";
|
|
45
45
|
import "../../chunks/chunk-YAOSNCGO.js";
|
|
46
46
|
import "../../chunks/chunk-5EKBCYHA.js";
|
|
47
47
|
import "../../chunks/chunk-TM2USC5N.js";
|
|
@@ -51,21 +51,21 @@ import "../../chunks/chunk-YP423QYK.js";
|
|
|
51
51
|
import "../../chunks/chunk-DJA3IN2X.js";
|
|
52
52
|
import {
|
|
53
53
|
pickOverrides
|
|
54
|
-
} from "../../chunks/chunk-
|
|
54
|
+
} from "../../chunks/chunk-3ZDA2CNR.js";
|
|
55
55
|
import "../../chunks/chunk-76ZNZKIN.js";
|
|
56
56
|
import {
|
|
57
57
|
ensureLink
|
|
58
|
-
} from "../../chunks/chunk-
|
|
58
|
+
} from "../../chunks/chunk-DSVJF7BT.js";
|
|
59
59
|
import {
|
|
60
60
|
validatePaths,
|
|
61
61
|
validateRootDirectory
|
|
62
|
-
} from "../../chunks/chunk-
|
|
62
|
+
} from "../../chunks/chunk-TFLXDK24.js";
|
|
63
63
|
import {
|
|
64
64
|
AGENT_STATUS
|
|
65
65
|
} from "../../chunks/chunk-L6Q2EQPI.js";
|
|
66
|
-
import "../../chunks/chunk-
|
|
67
|
-
import "../../chunks/chunk-
|
|
68
|
-
import "../../chunks/chunk-
|
|
66
|
+
import "../../chunks/chunk-F7OFM5NM.js";
|
|
67
|
+
import "../../chunks/chunk-OF7SJ4AC.js";
|
|
68
|
+
import "../../chunks/chunk-BDBG7347.js";
|
|
69
69
|
import {
|
|
70
70
|
help
|
|
71
71
|
} from "../../chunks/chunk-TTOZFGDX.js";
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
printAlignedLabel,
|
|
79
79
|
require_dist as require_dist2,
|
|
80
80
|
require_lib
|
|
81
|
-
} from "../../chunks/chunk-
|
|
81
|
+
} from "../../chunks/chunk-V2EPUZ7C.js";
|
|
82
82
|
import {
|
|
83
83
|
TelemetryClient
|
|
84
84
|
} from "../../chunks/chunk-4CIXZOP4.js";
|
|
@@ -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-55ZHYOXR.js";
|
|
13
13
|
import {
|
|
14
14
|
highlight
|
|
15
15
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -26,23 +26,23 @@ import {
|
|
|
26
26
|
require_mime_types,
|
|
27
27
|
require_npa,
|
|
28
28
|
staticFiles
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-HXCZ6ZNO.js";
|
|
30
30
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
pickOverrides
|
|
33
|
-
} from "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-3ZDA2CNR.js";
|
|
34
34
|
import "../../chunks/chunk-N733ZD4W.js";
|
|
35
35
|
import {
|
|
36
36
|
displayDetectedServices,
|
|
37
37
|
printProjectNotFoundError,
|
|
38
38
|
readConfig,
|
|
39
39
|
setupAndLink
|
|
40
|
-
} from "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-TFLXDK24.js";
|
|
41
41
|
import "../../chunks/chunk-L6Q2EQPI.js";
|
|
42
42
|
import {
|
|
43
43
|
getLocalPathConfig
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-F7OFM5NM.js";
|
|
45
|
+
import "../../chunks/chunk-BDBG7347.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
48
|
} from "../../chunks/chunk-TTOZFGDX.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
resolveProjectCwd,
|
|
70
70
|
tryDetectServices,
|
|
71
71
|
validateConfig
|
|
72
|
-
} from "../../chunks/chunk-
|
|
72
|
+
} from "../../chunks/chunk-V2EPUZ7C.js";
|
|
73
73
|
import {
|
|
74
74
|
TelemetryClient
|
|
75
75
|
} from "../../chunks/chunk-4CIXZOP4.js";
|
|
@@ -20032,7 +20032,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20032
20032
|
return void 0;
|
|
20033
20033
|
}
|
|
20034
20034
|
async _getVercelConfig() {
|
|
20035
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
20035
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-UWWV5Q74.js");
|
|
20036
20036
|
await compileVercelConfig(this.cwd);
|
|
20037
20037
|
const configPath = getLocalPathConfig(this.cwd);
|
|
20038
20038
|
const [
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
formatEnvironment,
|
|
22
22
|
validateLsArgs
|
|
23
|
-
} from "../../chunks/chunk-
|
|
23
|
+
} from "../../chunks/chunk-KSS3AMDU.js";
|
|
24
24
|
import {
|
|
25
25
|
validateJsonOutput
|
|
26
26
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
30
30
|
import {
|
|
31
31
|
getCommandAliases
|
|
32
|
-
} from "../../chunks/chunk-
|
|
32
|
+
} from "../../chunks/chunk-KTMAZEOI.js";
|
|
33
33
|
import "../../chunks/chunk-YAOSNCGO.js";
|
|
34
34
|
import "../../chunks/chunk-5EKBCYHA.js";
|
|
35
35
|
import "../../chunks/chunk-TM2USC5N.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "../../chunks/chunk-N733ZD4W.js";
|
|
43
43
|
import {
|
|
44
44
|
autoInstallVercelPlugin
|
|
45
|
-
} from "../../chunks/chunk-
|
|
45
|
+
} from "../../chunks/chunk-OF7SJ4AC.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
48
|
} from "../../chunks/chunk-TTOZFGDX.js";
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
require_frameworks,
|
|
67
67
|
runSubcommand,
|
|
68
68
|
updateSubcommand
|
|
69
|
-
} from "../../chunks/chunk-
|
|
69
|
+
} from "../../chunks/chunk-V2EPUZ7C.js";
|
|
70
70
|
import {
|
|
71
71
|
TelemetryClient,
|
|
72
72
|
require_dist as require_dist2
|
|
@@ -421,17 +421,43 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
|
|
|
421
421
|
|
|
422
422
|
// src/commands/env/add.ts
|
|
423
423
|
import { determineAgent } from "@vercel/detect-agent";
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
var SENSITIVE_SECRET_PROMPT = "Is the value a sensitive secret?";
|
|
425
|
+
function filterEnvChoicesForSensitivity(choices, opts) {
|
|
426
|
+
if (opts.isSensitive) {
|
|
427
|
+
return choices.filter((c) => c.value !== "development");
|
|
428
|
+
}
|
|
429
|
+
if (opts.policyOn) {
|
|
430
|
+
return choices.filter((c) => c.value === "development");
|
|
431
|
+
}
|
|
432
|
+
return choices;
|
|
433
|
+
}
|
|
434
|
+
function getTargetCompatibilityError(envTargets, isSensitive, policyOn) {
|
|
435
|
+
const hasDevelopment = envTargets.includes("development");
|
|
436
|
+
const hasSensitiveCapable = envTargets.some((t) => t !== "development");
|
|
437
|
+
if (isSensitive && hasDevelopment) {
|
|
438
|
+
return `Sensitive Environment Variables are not supported on the Development Environment. Run ${getCommandName(
|
|
439
|
+
"env add"
|
|
440
|
+
)} separately for Development with a non-sensitive value.`;
|
|
441
|
+
}
|
|
442
|
+
if (!isSensitive && policyOn && hasSensitiveCapable) {
|
|
443
|
+
return `Your team requires sensitive Environment Variables for Production and Preview. To add a non-sensitive value, target the Development Environment only. Run ${getCommandName(
|
|
444
|
+
"env add"
|
|
445
|
+
)} with the development target instead.`;
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
function resolveFinalType(envTargets, isSensitive, opts) {
|
|
450
|
+
const hasDevelopment = envTargets.includes("development");
|
|
451
|
+
if (hasDevelopment) {
|
|
426
452
|
return "encrypted";
|
|
427
453
|
}
|
|
428
|
-
if (opts.forceEncrypted)
|
|
454
|
+
if (opts.forceEncrypted && !opts.policyOn) {
|
|
429
455
|
return "encrypted";
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
if (opts.policyOn)
|
|
456
|
+
}
|
|
457
|
+
if (isSensitive || opts.forceSensitive || opts.policyOn) {
|
|
433
458
|
return "sensitive";
|
|
434
|
-
|
|
459
|
+
}
|
|
460
|
+
return "encrypted";
|
|
435
461
|
}
|
|
436
462
|
function valueForNextCommand(value) {
|
|
437
463
|
if (!/[\s'"\\]/.test(value))
|
|
@@ -870,12 +896,85 @@ async function add(client, argv) {
|
|
|
870
896
|
} catch {
|
|
871
897
|
}
|
|
872
898
|
}
|
|
873
|
-
|
|
874
|
-
|
|
899
|
+
const isDevelopmentOnlyTarget = envTargets.length === 1 && envTargets[0] === "development";
|
|
900
|
+
const userWasExplicit = forceSensitive || forceEncrypted;
|
|
901
|
+
const skipSensitivePrompt = userWasExplicit || client.nonInteractive || skipConfirm || isDevelopmentOnlyTarget;
|
|
902
|
+
let isSensitive;
|
|
903
|
+
if (forceSensitive) {
|
|
904
|
+
isSensitive = true;
|
|
905
|
+
} else if (forceEncrypted) {
|
|
906
|
+
isSensitive = false;
|
|
907
|
+
} else if (isDevelopmentOnlyTarget) {
|
|
908
|
+
isSensitive = false;
|
|
909
|
+
} else if (skipSensitivePrompt) {
|
|
910
|
+
isSensitive = true;
|
|
911
|
+
} else {
|
|
912
|
+
output_manager_default.log(
|
|
913
|
+
`Sensitive values cannot be retrieved later from the dashboard or CLI.`
|
|
914
|
+
);
|
|
915
|
+
isSensitive = await client.input.confirm(SENSITIVE_SECRET_PROMPT, true);
|
|
916
|
+
if (policyOn && !isSensitive) {
|
|
917
|
+
output_manager_default.log(
|
|
918
|
+
`Your team requires sensitive Environment Variables for Production and Preview. To add a non-sensitive value, you can only target the Development Environment.`
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
if (forceSensitive && envTargets.includes("development")) {
|
|
923
|
+
const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
|
|
924
|
+
if (client.nonInteractive) {
|
|
925
|
+
outputAgentError(
|
|
926
|
+
client,
|
|
927
|
+
{
|
|
928
|
+
status: "error",
|
|
929
|
+
reason: "sensitive_not_allowed_on_development",
|
|
930
|
+
message: msg
|
|
931
|
+
},
|
|
932
|
+
1
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
output_manager_default.error(msg);
|
|
936
|
+
return 1;
|
|
937
|
+
}
|
|
938
|
+
if (envTargets.length > 0) {
|
|
939
|
+
const compatibilityError = getTargetCompatibilityError(
|
|
940
|
+
envTargets,
|
|
941
|
+
isSensitive,
|
|
942
|
+
policyOn
|
|
943
|
+
);
|
|
944
|
+
if (compatibilityError) {
|
|
945
|
+
if (client.nonInteractive) {
|
|
946
|
+
outputAgentError(
|
|
947
|
+
client,
|
|
948
|
+
{
|
|
949
|
+
status: "error",
|
|
950
|
+
reason: isSensitive ? "sensitive_not_allowed_on_development" : "non_sensitive_not_allowed_on_production_preview",
|
|
951
|
+
message: compatibilityError
|
|
952
|
+
},
|
|
953
|
+
1
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
output_manager_default.error(compatibilityError);
|
|
957
|
+
return 1;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
const envChoices = filterEnvChoicesForSensitivity(choices, {
|
|
961
|
+
isSensitive,
|
|
962
|
+
policyOn
|
|
963
|
+
});
|
|
964
|
+
if (policyOn && isSensitive) {
|
|
965
|
+
for (const choice of envChoices) {
|
|
875
966
|
if (choice.value === "production" || choice.value === "preview") {
|
|
876
967
|
choice.checked = true;
|
|
877
968
|
}
|
|
878
969
|
}
|
|
970
|
+
} else if (envChoices.length === 1) {
|
|
971
|
+
envChoices[0].checked = true;
|
|
972
|
+
}
|
|
973
|
+
if (!envGitBranch && envChoices.length === 0 && envTargets.length === 0 && !opts["--force"]) {
|
|
974
|
+
output_manager_default.error(
|
|
975
|
+
`No Environments are available for this variable with the selected sensitivity. ${isSensitive ? "Sensitive Environment Variables cannot be added to Development." : "Your team requires sensitive Environment Variables for Production and Preview."}`
|
|
976
|
+
);
|
|
977
|
+
return 1;
|
|
879
978
|
}
|
|
880
979
|
let envValue;
|
|
881
980
|
if (stdInput) {
|
|
@@ -902,25 +1001,35 @@ async function add(client, argv) {
|
|
|
902
1001
|
]
|
|
903
1002
|
});
|
|
904
1003
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1004
|
+
if (isSensitive) {
|
|
1005
|
+
envValue = await client.input.password({
|
|
1006
|
+
message: `What's the value of ${envName}?`,
|
|
1007
|
+
mask: true
|
|
1008
|
+
});
|
|
1009
|
+
} else {
|
|
1010
|
+
envValue = await client.input.text({
|
|
1011
|
+
message: `What's the value of ${envName}?`,
|
|
1012
|
+
validate: (val) => val ? true : "Value cannot be empty"
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
909
1015
|
}
|
|
910
1016
|
const { finalValue } = await validateEnvValue({
|
|
911
1017
|
envName,
|
|
912
1018
|
initialValue: envValue,
|
|
913
1019
|
skipConfirm,
|
|
914
|
-
promptForValue: () => client.input.password({
|
|
1020
|
+
promptForValue: () => isSensitive ? client.input.password({
|
|
915
1021
|
message: `What's the value of ${envName}?`,
|
|
916
1022
|
mask: true
|
|
1023
|
+
}) : client.input.text({
|
|
1024
|
+
message: `What's the value of ${envName}?`,
|
|
1025
|
+
validate: (val) => val ? true : "Value cannot be empty"
|
|
917
1026
|
}),
|
|
918
1027
|
selectAction: (choices2) => client.input.select({ message: "How to proceed?", choices: choices2 }),
|
|
919
1028
|
showWarning: (msg) => output_manager_default.warn(msg),
|
|
920
1029
|
showLog: (msg) => output_manager_default.log(msg)
|
|
921
1030
|
});
|
|
922
1031
|
while (envTargets.length === 0) {
|
|
923
|
-
if (client.nonInteractive &&
|
|
1032
|
+
if (client.nonInteractive && envChoices.length > 0) {
|
|
924
1033
|
outputActionRequired(client, {
|
|
925
1034
|
status: "action_required",
|
|
926
1035
|
reason: "missing_environment",
|
|
@@ -928,11 +1037,11 @@ async function add(client, argv) {
|
|
|
928
1037
|
client.argv,
|
|
929
1038
|
`env add ${envName} <environment> --value <value> --yes`
|
|
930
1039
|
)}`,
|
|
931
|
-
choices:
|
|
1040
|
+
choices: envChoices.map((c) => ({
|
|
932
1041
|
id: c.value,
|
|
933
1042
|
name: typeof c.name === "string" ? c.name : c.value
|
|
934
1043
|
})),
|
|
935
|
-
next:
|
|
1044
|
+
next: envChoices.slice(0, 5).map((c) => ({
|
|
936
1045
|
command: buildEnvAddCommandWithPreservedArgs(
|
|
937
1046
|
client.argv,
|
|
938
1047
|
`env add ${envName} ${c.value} --value <value> --yes`
|
|
@@ -942,12 +1051,21 @@ async function add(client, argv) {
|
|
|
942
1051
|
}
|
|
943
1052
|
envTargets = await client.input.checkbox({
|
|
944
1053
|
message: `Add ${envName} to which Environments (select multiple)?`,
|
|
945
|
-
choices
|
|
1054
|
+
choices: envChoices
|
|
946
1055
|
});
|
|
947
1056
|
if (envTargets.length === 0) {
|
|
948
1057
|
output_manager_default.error("Please select at least one Environment");
|
|
949
1058
|
}
|
|
950
1059
|
}
|
|
1060
|
+
const postSelectionError = getTargetCompatibilityError(
|
|
1061
|
+
envTargets,
|
|
1062
|
+
isSensitive,
|
|
1063
|
+
policyOn
|
|
1064
|
+
);
|
|
1065
|
+
if (postSelectionError) {
|
|
1066
|
+
output_manager_default.error(postSelectionError);
|
|
1067
|
+
return 1;
|
|
1068
|
+
}
|
|
951
1069
|
if (envGitBranch === void 0 && envTargets.length === 1 && envTargets[0] === "preview") {
|
|
952
1070
|
if (client.nonInteractive) {
|
|
953
1071
|
outputActionRequired(
|
|
@@ -982,69 +1100,17 @@ async function add(client, argv) {
|
|
|
982
1100
|
}
|
|
983
1101
|
}
|
|
984
1102
|
const hasDevelopment = envTargets.includes("development");
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
{
|
|
992
|
-
status: "error",
|
|
993
|
-
reason: "sensitive_not_allowed_on_development",
|
|
994
|
-
message: msg
|
|
995
|
-
},
|
|
996
|
-
1
|
|
997
|
-
);
|
|
998
|
-
}
|
|
999
|
-
output_manager_default.error(msg);
|
|
1000
|
-
return 1;
|
|
1001
|
-
}
|
|
1002
|
-
if (hasDevelopment && hasSensitiveCapable) {
|
|
1003
|
-
const msg = `Development cannot be combined with other Environments because Development does not support sensitive Environment Variables. Run ${getCommandName(
|
|
1004
|
-
"env add"
|
|
1005
|
-
)} separately for Development.`;
|
|
1006
|
-
if (client.nonInteractive) {
|
|
1007
|
-
outputAgentError(
|
|
1008
|
-
client,
|
|
1009
|
-
{
|
|
1010
|
-
status: "error",
|
|
1011
|
-
reason: "mixed_development_and_sensitive_capable_targets",
|
|
1012
|
-
message: msg
|
|
1013
|
-
},
|
|
1014
|
-
1
|
|
1015
|
-
);
|
|
1016
|
-
}
|
|
1017
|
-
output_manager_default.error(msg);
|
|
1018
|
-
return 1;
|
|
1019
|
-
}
|
|
1020
|
-
let finalType = resolveTypeForTarget(
|
|
1021
|
-
hasDevelopment ? "development" : "production",
|
|
1022
|
-
{ forceSensitive, forceEncrypted, policyOn }
|
|
1023
|
-
);
|
|
1024
|
-
const userWasExplicit = forceSensitive || forceEncrypted;
|
|
1025
|
-
const canPromptForType = !client.nonInteractive && !userWasExplicit && !policyOn && hasSensitiveCapable && !skipConfirm;
|
|
1026
|
-
if (canPromptForType) {
|
|
1027
|
-
output_manager_default.log(
|
|
1028
|
-
`Sensitive values cannot be retrieved later from the dashboard or CLI.`
|
|
1029
|
-
);
|
|
1030
|
-
const keepSensitive = await client.input.confirm(
|
|
1031
|
-
`Make it sensitive?`,
|
|
1032
|
-
true
|
|
1033
|
-
);
|
|
1034
|
-
if (!keepSensitive) {
|
|
1035
|
-
finalType = "encrypted";
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
if (policyOn && hasSensitiveCapable) {
|
|
1103
|
+
let finalType = resolveFinalType(envTargets, isSensitive, {
|
|
1104
|
+
forceSensitive,
|
|
1105
|
+
forceEncrypted,
|
|
1106
|
+
policyOn
|
|
1107
|
+
});
|
|
1108
|
+
if (policyOn && !hasDevelopment) {
|
|
1039
1109
|
if (forceEncrypted) {
|
|
1040
1110
|
output_manager_default.warn(
|
|
1041
1111
|
`--no-sensitive is ignored: your team enforces sensitive Environment Variables for Production and Preview.`
|
|
1042
1112
|
);
|
|
1043
1113
|
finalType = "sensitive";
|
|
1044
|
-
} else if (!userWasExplicit) {
|
|
1045
|
-
output_manager_default.log(
|
|
1046
|
-
`Your team requires sensitive Environment Variables for Production and Preview.`
|
|
1047
|
-
);
|
|
1048
1114
|
}
|
|
1049
1115
|
}
|
|
1050
1116
|
const upsert = opts["--force"] ? "true" : "";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
addSubcommand7 as addSubcommand,
|
|
12
12
|
getCommandAliases,
|
|
13
13
|
linkCommand
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-KTMAZEOI.js";
|
|
15
15
|
import "../../chunks/chunk-YAOSNCGO.js";
|
|
16
16
|
import "../../chunks/chunk-5EKBCYHA.js";
|
|
17
17
|
import "../../chunks/chunk-TM2USC5N.js";
|
|
@@ -21,24 +21,24 @@ import "../../chunks/chunk-YP423QYK.js";
|
|
|
21
21
|
import "../../chunks/chunk-DJA3IN2X.js";
|
|
22
22
|
import {
|
|
23
23
|
ensureLink
|
|
24
|
-
} from "../../chunks/chunk-
|
|
25
|
-
import "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-DSVJF7BT.js";
|
|
25
|
+
import "../../chunks/chunk-TFLXDK24.js";
|
|
26
26
|
import "../../chunks/chunk-L6Q2EQPI.js";
|
|
27
|
-
import "../../chunks/chunk-
|
|
27
|
+
import "../../chunks/chunk-F7OFM5NM.js";
|
|
28
28
|
import {
|
|
29
29
|
autoInstallVercelPlugin
|
|
30
|
-
} from "../../chunks/chunk-
|
|
30
|
+
} from "../../chunks/chunk-OF7SJ4AC.js";
|
|
31
31
|
import {
|
|
32
32
|
detectExplicitScope,
|
|
33
33
|
getScope
|
|
34
|
-
} from "../../chunks/chunk-
|
|
34
|
+
} from "../../chunks/chunk-BDBG7347.js";
|
|
35
35
|
import {
|
|
36
36
|
help
|
|
37
37
|
} from "../../chunks/chunk-TTOZFGDX.js";
|
|
38
38
|
import {
|
|
39
39
|
addRepoLink,
|
|
40
40
|
ensureRepoLink
|
|
41
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-V2EPUZ7C.js";
|
|
42
42
|
import {
|
|
43
43
|
TelemetryClient
|
|
44
44
|
} from "../../chunks/chunk-4CIXZOP4.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
formatEnvironment,
|
|
22
22
|
validateLsArgs
|
|
23
|
-
} from "../../chunks/chunk-
|
|
23
|
+
} from "../../chunks/chunk-KSS3AMDU.js";
|
|
24
24
|
import {
|
|
25
25
|
validateJsonOutput
|
|
26
26
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "../../chunks/chunk-DJA3IN2X.js";
|
|
30
30
|
import {
|
|
31
31
|
getScope
|
|
32
|
-
} from "../../chunks/chunk-
|
|
32
|
+
} from "../../chunks/chunk-BDBG7347.js";
|
|
33
33
|
import {
|
|
34
34
|
help
|
|
35
35
|
} from "../../chunks/chunk-TTOZFGDX.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
getLinkedProject,
|
|
39
39
|
getProjectByNameOrId,
|
|
40
40
|
parseTarget
|
|
41
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-V2EPUZ7C.js";
|
|
42
42
|
import {
|
|
43
43
|
TelemetryClient
|
|
44
44
|
} from "../../chunks/chunk-4CIXZOP4.js";
|