vercel 59.4.0 → 59.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-73X2SKBH.js → add-MH3WV6PV.js} +12 -8
- package/dist/chunks/{add-FQMB3XPM.js → add-W3FFMTX4.js} +15 -11
- package/dist/chunks/{add-QJ3WT4FW.js → add-Z5FM6TFI.js} +18 -14
- package/dist/chunks/{build-YUYCLCXD.js → build-VYYFBJL7.js} +13 -10
- package/dist/chunks/{chunk-F7OXZLY2.js → chunk-26XDDLXM.js} +2 -2
- package/dist/chunks/{chunk-RIB4S2IB.js → chunk-3HZLXCVL.js} +1 -1
- package/dist/chunks/{chunk-UV2ZMFVG.js → chunk-47VQ6H2S.js} +1 -1
- package/dist/chunks/{chunk-O5DLWLT7.js → chunk-4JTF6RD7.js} +7 -7
- package/dist/chunks/{chunk-3KNPVXJ3.js → chunk-4KD5BYHB.js} +1 -1
- package/dist/chunks/{chunk-XLKFJPMT.js → chunk-57RHXXXG.js} +1 -1
- package/dist/chunks/chunk-5GGUB4EO.js +31 -0
- package/dist/chunks/chunk-5LX2JDZP.js +34 -0
- package/dist/chunks/chunk-7Q45OKWR.js +149 -0
- package/dist/chunks/{chunk-Y3J4VU2H.js → chunk-7XX4ZEOV.js} +2 -2
- package/dist/chunks/{chunk-JKQWQA2T.js → chunk-AINIBIP4.js} +1 -1
- package/dist/chunks/{chunk-SOFC4MLS.js → chunk-AWCID36T.js} +8 -568
- package/dist/chunks/{chunk-KAYSW4CJ.js → chunk-AWSLWAOC.js} +1 -1
- package/dist/chunks/{chunk-KDYRLN6H.js → chunk-C5HKWXRR.js} +1 -1
- package/dist/chunks/{chunk-2MF3ZAVW.js → chunk-CJV7J7B5.js} +6 -6
- package/dist/chunks/chunk-CQJRLNTX.js +104 -0
- package/dist/chunks/{chunk-PD4DYNSB.js → chunk-CSCSGSQG.js} +4 -4
- package/dist/chunks/{chunk-3L2YLLHC.js → chunk-DWIC7MRV.js} +2 -2
- package/dist/chunks/{chunk-HMJVUXE6.js → chunk-E6LFKMI2.js} +82 -509
- package/dist/chunks/{chunk-GFCTRJI5.js → chunk-EZKW5YJ2.js} +1 -1
- package/dist/chunks/{chunk-DDIZGOCK.js → chunk-FA3MO56Q.js} +6 -4
- package/dist/chunks/{chunk-Y42SPI2H.js → chunk-GUWPUX2Y.js} +5 -5
- package/dist/chunks/chunk-GY5I4AYD.js +122 -0
- package/dist/chunks/chunk-HGRWPPYB.js +18 -0
- package/dist/chunks/{chunk-NP6BQPCN.js → chunk-JJQP3PYM.js} +5 -3
- package/dist/chunks/{chunk-X6O6XJEA.js → chunk-JNU3DTEV.js} +14 -12
- package/dist/chunks/{chunk-TH2XUVDP.js → chunk-L7CEMAJG.js} +4 -2
- package/dist/chunks/{chunk-EB7NJKPL.js → chunk-LLM3ZNXJ.js} +2 -2
- package/dist/chunks/{chunk-ZFWNMVNR.js → chunk-M3OSDZPY.js} +6 -4
- package/dist/chunks/{chunk-LKTQR5JE.js → chunk-MRMNMFMD.js} +2 -2
- package/dist/chunks/{chunk-EG5BSAXD.js → chunk-MTWHQEXI.js} +1 -1
- package/dist/chunks/{chunk-WC7IINFV.js → chunk-NFU4XJIR.js} +1 -1
- package/dist/chunks/{chunk-VCE6QKFE.js → chunk-NSU2BTRS.js} +3 -3
- package/dist/chunks/chunk-OHER4DGX.js +451 -0
- package/dist/chunks/{chunk-BBSS3XIW.js → chunk-OQ3C5VXZ.js} +1 -1
- package/dist/chunks/{chunk-CHEZBD7H.js → chunk-PBHBX6UL.js} +2 -2
- package/dist/chunks/{chunk-M22O6CYY.js → chunk-POOO7W47.js} +1 -1
- package/dist/chunks/{chunk-BLYBHFIE.js → chunk-PPUWG2UB.js} +12 -8
- package/dist/chunks/chunk-Q2DGFCO7.js +579 -0
- package/dist/chunks/{chunk-HURL5EBN.js → chunk-QG4PCM45.js} +24 -148
- package/dist/chunks/{chunk-VAFU7DXZ.js → chunk-RKDCNQ4S.js} +1 -91
- package/dist/chunks/{chunk-XI6NJLI4.js → chunk-RZ5NP6HN.js} +2 -2
- package/dist/chunks/{chunk-GMWRTZVZ.js → chunk-SLPSPYVR.js} +1 -1
- package/dist/chunks/{chunk-J5Y2QGGU.js → chunk-TAZ5ZAKG.js} +1 -1
- package/dist/chunks/{chunk-KSZ4MNHO.js → chunk-TDXNNIZ6.js} +1 -1
- package/dist/chunks/{chunk-EB5NBVTV.js → chunk-TIWAL2YU.js} +6 -6
- package/dist/chunks/{chunk-HJVTLJHO.js → chunk-UUVMIXT4.js} +5 -5
- package/dist/chunks/{chunk-RI7KKKII.js → chunk-V4YLY44R.js} +3 -17
- package/dist/chunks/{chunk-O5GNPPTU.js → chunk-VP5Y3SZG.js} +1 -1
- package/dist/chunks/{chunk-2PX6N4FE.js → chunk-VWYNSJXI.js} +7 -7
- package/dist/chunks/{chunk-7QVJTI5H.js → chunk-XDGOOW3K.js} +1 -1
- package/dist/chunks/{chunk-UMA66MKW.js → chunk-XM3LOQIX.js} +1 -1
- package/dist/chunks/{chunk-VDJN4WKH.js → chunk-XRWOTCDO.js} +1 -1
- package/dist/chunks/{chunk-MWYQ24FO.js → chunk-YIHOS3ZF.js} +2 -2
- package/dist/chunks/{chunk-STPH4Y62.js → chunk-YJUO3EKH.js} +1 -1
- package/dist/chunks/chunk-ZKUHCL6O.js +249 -0
- package/dist/chunks/{clear-USQM5VW5.js → clear-TNGRDA7D.js} +12 -8
- package/dist/chunks/{compile-vercel-config-2JNYMI6W.js → compile-vercel-config-ERLXKKWW.js} +8 -5
- package/dist/chunks/config-7EDKML5Q.js +122 -0
- package/dist/chunks/{config-VTRIDLY4.js → config-H22EE765.js} +15 -11
- package/dist/chunks/{delete-VTPHK3EB.js → delete-LORYIZHY.js} +10 -7
- package/dist/chunks/{delete-ILLSBCVQ.js → delete-Q4S5F2AI.js} +12 -8
- package/dist/chunks/{disable-VTOMO64V.js → disable-HKWCBDJC.js} +10 -7
- package/dist/chunks/{discard-ZIOZ34ZI.js → discard-UCCRF2JQ.js} +10 -7
- package/dist/chunks/{edit-JMZ5XWVW.js → edit-6IM6VRBR.js} +12 -8
- package/dist/chunks/{edit-E3AMR4KM.js → edit-AWL35PYQ.js} +11 -8
- package/dist/chunks/{enable-A4PMZ7QZ.js → enable-GN3D3L3V.js} +10 -7
- package/dist/chunks/{export-Y6AJ3WRZ.js → export-HHRVFALV.js} +10 -7
- package/dist/chunks/{image-26BKPAUB.js → image-4DCU4VPP.js} +6 -5
- package/dist/chunks/{import-builders-3H7J2SEK.js → import-builders-DVG3HOTF.js} +9 -6
- package/dist/chunks/{inspect-ZW5N6O5P.js → inspect-B3OWUFLH.js} +12 -8
- package/dist/chunks/{inspect-OEY4DJRI.js → inspect-TGOJDKIT.js} +15 -11
- package/dist/chunks/{inspect-7DGKYHKW.js → inspect-TUW67CFZ.js} +15 -11
- package/dist/chunks/{inspect-N3E2PO6K.js → inspect-VLGKNHJW.js} +12 -8
- package/dist/chunks/{inspect-GJFVAZIJ.js → inspect-VPME6UC7.js} +15 -11
- package/dist/chunks/{list-DTJBW7OQ.js → list-2DPKDHRV.js} +15 -11
- package/dist/chunks/{list-MIQ5D6PM.js → list-K552ITMK.js} +15 -11
- package/dist/chunks/{list-2VTCNQEB.js → list-TK2JO7BK.js} +12 -8
- package/dist/chunks/{login-L34UHAU5.js → login-HRWEKW5P.js} +15 -11
- package/dist/chunks/{ls-OKO4IHWB.js → ls-IOXGXEY4.js} +15 -11
- package/dist/chunks/{ls-VDYUFSSC.js → ls-JSV2WZVF.js} +15 -10
- package/dist/chunks/{ls-OBUDC4SB.js → ls-M5TYGFP5.js} +15 -10
- package/dist/chunks/{ls-NCPQY4FV.js → ls-O2WYF5UL.js} +18 -13
- package/dist/chunks/ls-TM6NTZEB.js +176 -0
- package/dist/chunks/{ls-SXJFBLUT.js → ls-YIF3KLF3.js} +15 -10
- package/dist/chunks/{open-V5JDGXUP.js → open-FWAVEWGU.js} +12 -8
- package/dist/chunks/{permissions-6CPRPPBY.js → permissions-DPFYL47Z.js} +9 -8
- package/dist/chunks/{publish-R27DPHFO.js → publish-63CGFKQR.js} +10 -7
- package/dist/chunks/{push-VLVTBS42.js → push-T5ZTBW3P.js} +13 -10
- package/dist/chunks/{query-IVVRYMJN.js → query-B6O3EMEV.js} +14 -10
- package/dist/chunks/{reorder-LJ2RBZM2.js → reorder-ANV4NMKH.js} +10 -7
- package/dist/chunks/{reply-USAISZYC.js → reply-C73KGOCG.js} +12 -8
- package/dist/chunks/{resolve-CRCJYVS5.js → resolve-IHSIVPEE.js} +12 -8
- package/dist/chunks/{restore-6PBPEAMU.js → restore-GSUNXP2O.js} +10 -7
- package/dist/chunks/{rm-HHELZB7R.js → rm-4O74PS4Q.js} +12 -8
- package/dist/chunks/{rm-TWU3JR6Z.js → rm-M7IJC2WZ.js} +12 -8
- package/dist/chunks/{rm-EOD7RDSO.js → rm-PRINF4OU.js} +15 -11
- package/dist/chunks/rm-RV5SQFQA.js +317 -0
- package/dist/chunks/{rm-KGOEOWVK.js → rm-YDTK5ESZ.js} +13 -9
- package/dist/chunks/{rule-inspect-WFTVRK6B.js → rule-inspect-ZZC53FLP.js} +15 -11
- package/dist/chunks/{rules-AQYTFJI6.js → rules-SAOSSGFI.js} +10 -9
- package/dist/chunks/{schema-LUVFYPWN.js → schema-23ZFAKDU.js} +7 -5
- package/dist/chunks/{schema-ZCDCJC7E.js → schema-2Q3QRMRO.js} +11 -8
- package/dist/chunks/set-L47ZCZBJ.js +243 -0
- package/dist/chunks/{tags-RCNRFX7U.js → tags-2TWLM77N.js} +5 -4
- package/dist/chunks/{types-AJHILHO5.js → types-G3PEUIJH.js} +11 -7
- package/dist/chunks/{update-I7QGAOYF.js → update-SZH2VBD6.js} +16 -12
- package/dist/commands/build/index.js +16 -12
- package/dist/commands/deploy/index.js +41 -32
- package/dist/commands/dev/index.js +19 -15
- package/dist/commands/env/index.js +44 -35
- package/dist/commands/link/index.js +25 -20
- package/dist/commands/list/index.js +19 -12
- package/dist/commands-bulk.js +132 -125
- package/dist/help.js +1 -1
- package/dist/index.js +34 -28
- package/dist/version.mjs +1 -1
- package/package.json +47 -47
|
@@ -0,0 +1,451 @@
|
|
|
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
|
+
require_dist
|
|
9
|
+
} from "./chunk-CYNB6LL4.js";
|
|
10
|
+
import {
|
|
11
|
+
forceOption,
|
|
12
|
+
formatOption,
|
|
13
|
+
jsonOption,
|
|
14
|
+
packageName,
|
|
15
|
+
projectOption,
|
|
16
|
+
require_lib,
|
|
17
|
+
yesOption
|
|
18
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
19
|
+
import {
|
|
20
|
+
__toESM
|
|
21
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
22
|
+
|
|
23
|
+
// src/util/env/env-target.ts
|
|
24
|
+
var import_constants = __toESM(require_dist(), 1);
|
|
25
|
+
var import_title = __toESM(require_lib(), 1);
|
|
26
|
+
var envTargetChoices = import_constants.PROJECT_ENV_TARGET.map((t) => ({
|
|
27
|
+
name: (0, import_title.default)(t),
|
|
28
|
+
value: t
|
|
29
|
+
}));
|
|
30
|
+
function isValidEnvTarget(target) {
|
|
31
|
+
return typeof target === "undefined" || envTargetChoices.map((c) => c.value).includes(target);
|
|
32
|
+
}
|
|
33
|
+
function getEnvTargetPlaceholder() {
|
|
34
|
+
return `<${envTargetChoices.map((c) => c.value).join(" | ")}>`;
|
|
35
|
+
}
|
|
36
|
+
function parseEnvTargetArg(arg) {
|
|
37
|
+
return Array.from(
|
|
38
|
+
new Set(
|
|
39
|
+
arg.split(",").map((t) => t.trim()).filter(Boolean)
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/commands/env/command.ts
|
|
45
|
+
var targetPlaceholder = getEnvTargetPlaceholder();
|
|
46
|
+
var listSubcommand = {
|
|
47
|
+
name: "list",
|
|
48
|
+
aliases: ["ls"],
|
|
49
|
+
description: "List all Environment Variables for a Project",
|
|
50
|
+
arguments: [
|
|
51
|
+
{
|
|
52
|
+
name: "environment",
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "git-branch",
|
|
57
|
+
required: false
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
options: [
|
|
61
|
+
formatOption,
|
|
62
|
+
jsonOption,
|
|
63
|
+
projectOption,
|
|
64
|
+
{
|
|
65
|
+
name: "guidance",
|
|
66
|
+
description: "Receive command suggestions once command is complete",
|
|
67
|
+
shorthand: null,
|
|
68
|
+
type: Boolean,
|
|
69
|
+
deprecated: false
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
examples: []
|
|
73
|
+
};
|
|
74
|
+
var addSubcommand = {
|
|
75
|
+
name: "add",
|
|
76
|
+
aliases: [],
|
|
77
|
+
description: "Add an Environment Variable",
|
|
78
|
+
arguments: [
|
|
79
|
+
{
|
|
80
|
+
name: "name",
|
|
81
|
+
required: true
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "environment",
|
|
85
|
+
required: false
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
options: [
|
|
89
|
+
projectOption,
|
|
90
|
+
{
|
|
91
|
+
name: "git-branch",
|
|
92
|
+
description: "Set the Git branch for a Preview Environment Variable",
|
|
93
|
+
shorthand: null,
|
|
94
|
+
type: String,
|
|
95
|
+
argument: "NAME",
|
|
96
|
+
deprecated: false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "sensitive",
|
|
100
|
+
description: "Store the value as sensitive for Production or Preview",
|
|
101
|
+
shorthand: null,
|
|
102
|
+
type: Boolean,
|
|
103
|
+
deprecated: false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "no-sensitive",
|
|
107
|
+
description: "Store the value as non-sensitive when policy allows",
|
|
108
|
+
shorthand: null,
|
|
109
|
+
type: Boolean,
|
|
110
|
+
deprecated: false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "visibility",
|
|
114
|
+
description: "Set config/secret visibility (`config` or `secret`). Inferred from type when omitted",
|
|
115
|
+
shorthand: null,
|
|
116
|
+
type: String,
|
|
117
|
+
argument: "VISIBILITY",
|
|
118
|
+
deprecated: false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
...forceOption,
|
|
122
|
+
description: "Overwrite an existing variable for the same target",
|
|
123
|
+
shorthand: null
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
...yesOption,
|
|
127
|
+
description: "Accept default choices when adding an Environment Variable"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "guidance",
|
|
131
|
+
description: "Show command suggestions after completion",
|
|
132
|
+
shorthand: null,
|
|
133
|
+
type: Boolean,
|
|
134
|
+
deprecated: false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "value",
|
|
138
|
+
description: "Set the variable value for non-interactive use; otherwise use stdin or the prompt",
|
|
139
|
+
shorthand: null,
|
|
140
|
+
type: String,
|
|
141
|
+
argument: "VALUE",
|
|
142
|
+
deprecated: false
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
examples: [
|
|
146
|
+
{
|
|
147
|
+
name: "Add a new variable (prompts for value and Environments)",
|
|
148
|
+
value: [
|
|
149
|
+
`${packageName} env add <name>`,
|
|
150
|
+
`${packageName} env add API_TOKEN`
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "Add a new Environment Variable to a specific Environment",
|
|
155
|
+
value: [
|
|
156
|
+
`${packageName} env add <name> ${targetPlaceholder}`,
|
|
157
|
+
`${packageName} env add DB_PASS production`
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "Add one variable to multiple Environments (comma-separated)",
|
|
162
|
+
value: [
|
|
163
|
+
`${packageName} env add <name> <environment>[,<environment>]`,
|
|
164
|
+
`${packageName} env add API_URL production,preview,development`
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "Override an existing Environment Variable of same target (production, preview, deployment)",
|
|
169
|
+
value: `${packageName} env add API_TOKEN --force`
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "Add a regular (non-sensitive) Environment Variable that remains readable later",
|
|
173
|
+
value: `${packageName} env add API_TOKEN --no-sensitive`
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "Add a new Environment Variable for a specific Environment and Git Branch",
|
|
177
|
+
value: [
|
|
178
|
+
`${packageName} env add <name> ${targetPlaceholder} --git-branch <name>`,
|
|
179
|
+
`${packageName} env add DB_PASS preview --git-branch feat1`
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "Add a new Environment Variable from stdin",
|
|
184
|
+
value: [
|
|
185
|
+
`cat <file> | ${packageName} env add <name> ${targetPlaceholder}`,
|
|
186
|
+
`cat ~/.npmrc | ${packageName} env add NPM_RC preview`,
|
|
187
|
+
`${packageName} env add API_URL production < url.txt`
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "Add with --value for non-interactive use",
|
|
192
|
+
value: `${packageName} env add API_TOKEN production --value "<value>" --yes`
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
};
|
|
196
|
+
var removeSubcommand = {
|
|
197
|
+
name: "remove",
|
|
198
|
+
aliases: ["rm"],
|
|
199
|
+
description: "Remove an Environment Variable (see examples below)",
|
|
200
|
+
arguments: [
|
|
201
|
+
{
|
|
202
|
+
name: "name",
|
|
203
|
+
required: true
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "environment",
|
|
207
|
+
required: false
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
options: [
|
|
211
|
+
projectOption,
|
|
212
|
+
{
|
|
213
|
+
...yesOption,
|
|
214
|
+
description: "Skip the confirmation prompt when removing an Environment Variable"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
examples: [
|
|
218
|
+
{
|
|
219
|
+
name: "Remove a variable from multiple Environments",
|
|
220
|
+
value: [
|
|
221
|
+
`${packageName} env rm <name>`,
|
|
222
|
+
`${packageName} env rm API_TOKEN`
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "Remove a variable from a specific Environment",
|
|
227
|
+
value: [
|
|
228
|
+
`${packageName} env rm <name> ${targetPlaceholder}`,
|
|
229
|
+
`${packageName} env rm NPM_RC preview`
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "Remove a variable from a specific Environment and Git Branch",
|
|
234
|
+
value: [
|
|
235
|
+
`${packageName} env rm <name> ${targetPlaceholder} <gitbranch>`,
|
|
236
|
+
`${packageName} env rm NPM_RC preview feat1`
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
};
|
|
241
|
+
var pullSubcommand = {
|
|
242
|
+
name: "pull",
|
|
243
|
+
aliases: [],
|
|
244
|
+
description: "Pull all Development Environment Variables from the cloud and write to a file [.env.local]",
|
|
245
|
+
arguments: [
|
|
246
|
+
{
|
|
247
|
+
name: "filename",
|
|
248
|
+
required: false
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
options: [
|
|
252
|
+
projectOption,
|
|
253
|
+
{
|
|
254
|
+
name: "environment",
|
|
255
|
+
description: "Set the Environment when pulling Environment Variables",
|
|
256
|
+
shorthand: null,
|
|
257
|
+
type: String,
|
|
258
|
+
argument: "TARGET",
|
|
259
|
+
deprecated: false
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: "git-branch",
|
|
263
|
+
description: "Specify the Git branch to pull specific Environment Variables for",
|
|
264
|
+
shorthand: null,
|
|
265
|
+
type: String,
|
|
266
|
+
argument: "NAME",
|
|
267
|
+
deprecated: false
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: "id",
|
|
271
|
+
description: "Pull environment variables for a specific deployment (e.g. dpl_xxx)",
|
|
272
|
+
shorthand: null,
|
|
273
|
+
type: String,
|
|
274
|
+
argument: "ID",
|
|
275
|
+
deprecated: false
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
...yesOption,
|
|
279
|
+
description: "Skip the confirmation prompt when removing an environment variable"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
examples: [
|
|
283
|
+
{
|
|
284
|
+
name: "Pull all Development Environment Variables down from the cloud",
|
|
285
|
+
value: [
|
|
286
|
+
`${packageName} env pull <file>`,
|
|
287
|
+
`${packageName} env pull .env.development.local`
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "Pull environment variables for a specific deployment",
|
|
292
|
+
value: `${packageName} env pull --id dpl_xxx`
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
};
|
|
296
|
+
var runSubcommand = {
|
|
297
|
+
name: "run",
|
|
298
|
+
aliases: [],
|
|
299
|
+
description: "Run a command with environment variables from the linked Vercel project",
|
|
300
|
+
arguments: [
|
|
301
|
+
{
|
|
302
|
+
name: "command",
|
|
303
|
+
required: true,
|
|
304
|
+
multiple: true
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
options: [
|
|
308
|
+
projectOption,
|
|
309
|
+
{
|
|
310
|
+
name: "environment",
|
|
311
|
+
description: "Specify the environment to pull variables from (default: development)",
|
|
312
|
+
shorthand: "e",
|
|
313
|
+
type: String,
|
|
314
|
+
argument: "TARGET",
|
|
315
|
+
deprecated: false
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: "git-branch",
|
|
319
|
+
description: "Specify the Git branch to pull specific Environment Variables for",
|
|
320
|
+
shorthand: null,
|
|
321
|
+
type: String,
|
|
322
|
+
argument: "NAME",
|
|
323
|
+
deprecated: false
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
examples: [
|
|
327
|
+
{
|
|
328
|
+
name: "Run Next.js dev server with development environment variables",
|
|
329
|
+
value: `${packageName} env run -- next dev`
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: "Run tests with preview environment variables for a specific branch",
|
|
333
|
+
value: `${packageName} env run -e preview --git-branch feature-x -- npm test`
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
};
|
|
337
|
+
var updateSubcommand = {
|
|
338
|
+
name: "update",
|
|
339
|
+
aliases: [],
|
|
340
|
+
description: "Update the value of an existing Environment Variable (see examples below)",
|
|
341
|
+
arguments: [
|
|
342
|
+
{
|
|
343
|
+
name: "name",
|
|
344
|
+
required: true
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: "environment",
|
|
348
|
+
required: false
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
options: [
|
|
352
|
+
projectOption,
|
|
353
|
+
{
|
|
354
|
+
name: "sensitive",
|
|
355
|
+
description: "Update to a sensitive Environment Variable",
|
|
356
|
+
shorthand: null,
|
|
357
|
+
type: Boolean,
|
|
358
|
+
deprecated: false
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "visibility",
|
|
362
|
+
description: "Set config/secret visibility (`config` or `secret`). Inferred from type when omitted",
|
|
363
|
+
shorthand: null,
|
|
364
|
+
type: String,
|
|
365
|
+
argument: "VISIBILITY",
|
|
366
|
+
deprecated: false
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
...yesOption,
|
|
370
|
+
description: "Skip the confirmation prompt when updating an Environment Variable"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: "value",
|
|
374
|
+
description: "New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",
|
|
375
|
+
shorthand: null,
|
|
376
|
+
type: String,
|
|
377
|
+
argument: "VALUE",
|
|
378
|
+
deprecated: false
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
examples: [
|
|
382
|
+
{
|
|
383
|
+
name: "Update a variable in all Environments",
|
|
384
|
+
value: [
|
|
385
|
+
`${packageName} env update <name>`,
|
|
386
|
+
`${packageName} env update API_TOKEN`
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "Update a variable in a specific Environment",
|
|
391
|
+
value: [
|
|
392
|
+
`${packageName} env update <name> ${targetPlaceholder}`,
|
|
393
|
+
`${packageName} env update DB_PASS production`
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: "Update a variable for a specific Environment and Git Branch",
|
|
398
|
+
value: [
|
|
399
|
+
`${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,
|
|
400
|
+
`${packageName} env update NPM_RC preview feat1`
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: "Update a variable from stdin",
|
|
405
|
+
value: [
|
|
406
|
+
`cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,
|
|
407
|
+
`cat ~/.npmrc | ${packageName} env update NPM_RC preview`,
|
|
408
|
+
`${packageName} env update API_URL production < url.txt`
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
};
|
|
413
|
+
var envCommand = {
|
|
414
|
+
name: "env",
|
|
415
|
+
aliases: [],
|
|
416
|
+
description: "Interact with Environment Variables for a Project",
|
|
417
|
+
arguments: [],
|
|
418
|
+
subcommands: [
|
|
419
|
+
addSubcommand,
|
|
420
|
+
listSubcommand,
|
|
421
|
+
pullSubcommand,
|
|
422
|
+
removeSubcommand,
|
|
423
|
+
runSubcommand,
|
|
424
|
+
updateSubcommand
|
|
425
|
+
],
|
|
426
|
+
options: [],
|
|
427
|
+
examples: [
|
|
428
|
+
{
|
|
429
|
+
name: "Run a command with Environment Variables from the linked Project",
|
|
430
|
+
value: `${packageName} env run -- <command>`
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: "Add one variable to multiple Environments",
|
|
434
|
+
value: `${packageName} env add API_URL production,preview,development`
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
export {
|
|
440
|
+
envTargetChoices,
|
|
441
|
+
isValidEnvTarget,
|
|
442
|
+
getEnvTargetPlaceholder,
|
|
443
|
+
parseEnvTargetArg,
|
|
444
|
+
listSubcommand,
|
|
445
|
+
addSubcommand,
|
|
446
|
+
removeSubcommand,
|
|
447
|
+
pullSubcommand,
|
|
448
|
+
runSubcommand,
|
|
449
|
+
updateSubcommand,
|
|
450
|
+
envCommand
|
|
451
|
+
};
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveAlertsScope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NSU2BTRS.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
AGENT_REASON,
|
|
17
17
|
buildCommandWithGlobalFlags,
|
|
18
18
|
outputAgentError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L7CEMAJG.js";
|
|
20
20
|
|
|
21
21
|
// src/commands/alerts/rules/parse-scope.ts
|
|
22
22
|
async function parseRulesFlagsAndScope(client, flags, jsonOutput, command = "alerts rules ls") {
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
} from "./chunk-PRWJUY5U.js";
|
|
10
10
|
import {
|
|
11
11
|
progress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TIWAL2YU.js";
|
|
13
13
|
import {
|
|
14
14
|
isJSONObject,
|
|
15
15
|
printIndications,
|
|
16
16
|
require_dist as require_dist2,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4JTF6RD7.js";
|
|
19
19
|
import {
|
|
20
20
|
suggestNextCommands
|
|
21
21
|
} from "./chunk-XBN2O34P.js";
|
|
22
22
|
import {
|
|
23
23
|
CommandTimeout
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QG4PCM45.js";
|
|
25
25
|
import {
|
|
26
26
|
showPluginTipIfNeeded
|
|
27
27
|
} from "./chunk-HT2XWSAJ.js";
|
|
@@ -38,14 +38,16 @@ import {
|
|
|
38
38
|
require_dist as require_dist3,
|
|
39
39
|
require_pluralize,
|
|
40
40
|
ua_default
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-E6LFKMI2.js";
|
|
42
42
|
import {
|
|
43
43
|
require_ms
|
|
44
44
|
} from "./chunk-GGP5R3FU.js";
|
|
45
45
|
import {
|
|
46
|
-
require_strip_ansi,
|
|
47
46
|
responseError
|
|
48
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-CQJRLNTX.js";
|
|
48
|
+
import {
|
|
49
|
+
require_strip_ansi
|
|
50
|
+
} from "./chunk-RKDCNQ4S.js";
|
|
49
51
|
import {
|
|
50
52
|
APIError,
|
|
51
53
|
BuildError,
|
|
@@ -60,10 +62,12 @@ import {
|
|
|
60
62
|
UnexpectedDomainPurchaseError,
|
|
61
63
|
UnsupportedTLD,
|
|
62
64
|
UserAborted,
|
|
63
|
-
getCommandName,
|
|
64
65
|
isAPIError,
|
|
65
66
|
require_bytes
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-AWCID36T.js";
|
|
68
|
+
import {
|
|
69
|
+
getCommandName
|
|
70
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
67
71
|
import {
|
|
68
72
|
Headers,
|
|
69
73
|
fetch,
|