vercel 51.8.0 → 52.2.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-6TAGTCM2.js → add-TH62Y34V.js} +8 -8
- package/dist/chunks/{chunk-TAOVG4PS.js → chunk-4Q5VS23S.js} +3 -3
- package/dist/chunks/{chunk-VGWGLBUC.js → chunk-5EDL2IVB.js} +2 -2
- package/dist/chunks/{chunk-Y3HAJQCS.js → chunk-5EZVRZOJ.js} +88 -40
- package/dist/chunks/{chunk-BHDZCUTT.js → chunk-77JGNI4Z.js} +2 -2
- package/dist/chunks/{chunk-N5IS4YW4.js → chunk-7L7NSLYK.js} +22 -4
- package/dist/chunks/{chunk-GE6G37P4.js → chunk-ABDTA3V2.js} +1 -1
- package/dist/chunks/{chunk-R4ZPBOD7.js → chunk-BUPMO37Q.js} +86 -16
- package/dist/chunks/{chunk-G6RXZLQ2.js → chunk-DFUTSURK.js} +2 -2
- package/dist/chunks/{chunk-DQPDIHII.js → chunk-EVDPX5BO.js} +2 -2
- package/dist/chunks/{chunk-UP2QQYRS.js → chunk-FPTKAORS.js} +4 -4
- package/dist/chunks/{chunk-IHOJDWAH.js → chunk-FUUQ2WSC.js} +6 -6
- package/dist/chunks/{chunk-KUY7VLTK.js → chunk-FUYNVB23.js} +3 -3
- package/dist/chunks/{chunk-H2PHTCJL.js → chunk-H2O3DQDC.js} +5 -5
- package/dist/chunks/{chunk-CRZM5WM2.js → chunk-HMM7V4AU.js} +2 -2
- package/dist/chunks/{chunk-KM6BIRA3.js → chunk-I5OH27IT.js} +4 -4
- package/dist/chunks/{chunk-XKHLPA6V.js → chunk-IABMY4Q3.js} +22 -20
- package/dist/chunks/{chunk-GLDQ23LD.js → chunk-IEKDY4FP.js} +1 -1
- package/dist/chunks/{chunk-4PQA6H63.js → chunk-JCLLQ23G.js} +1 -1
- package/dist/chunks/{chunk-RFMC2QXQ.js → chunk-JNOMOD7R.js} +15 -11
- package/dist/chunks/{chunk-UWKTUK3W.js → chunk-LN5ZMLBU.js} +2 -2
- package/dist/chunks/{chunk-SKXUP3WW.js → chunk-LSPPTDRH.js} +2 -2
- package/dist/chunks/{chunk-N45K6NXC.js → chunk-MSJX3VKI.js} +1 -1
- package/dist/chunks/{chunk-BJQTGP42.js → chunk-NCUOSZ6X.js} +2 -2
- package/dist/chunks/{chunk-6WHQFFN2.js → chunk-NJYOE4D7.js} +1 -1
- package/dist/chunks/{chunk-CUCRUPRY.js → chunk-O7R67TAG.js} +2 -2
- package/dist/chunks/{chunk-HRVQZZ3Q.js → chunk-ODASAX4M.js} +1 -1
- package/dist/chunks/{chunk-UBOSX7RM.js → chunk-OHOYN7R2.js} +3 -3
- package/dist/chunks/{chunk-BNVEZBEW.js → chunk-OVFHCZBS.js} +7 -7
- package/dist/chunks/{chunk-DVQ4SIWF.js → chunk-P3H4MP5H.js} +2 -2
- package/dist/chunks/{chunk-LDXYSGPZ.js → chunk-QPPVRYOB.js} +2 -2
- package/dist/chunks/{chunk-5VQMJCHT.js → chunk-QTX36APP.js} +4 -4
- package/dist/chunks/{chunk-AQ4L3FS4.js → chunk-WCMV6TSF.js} +1 -1
- package/dist/chunks/{chunk-ECRBC4HL.js → chunk-XZ7CVBQ4.js} +26 -0
- package/dist/chunks/{chunk-U7MQBM3F.js → chunk-ZI2C6YH2.js} +25 -8
- package/dist/chunks/{chunk-45TDB64X.js → chunk-ZJKFUXSF.js} +2 -2
- package/dist/chunks/{chunk-BQI2CW7A.js → chunk-ZZDXEXJ5.js} +9 -9
- package/dist/chunks/{compile-vercel-config-3LQ66C4J.js → compile-vercel-config-H5YVD5ZD.js} +4 -4
- package/dist/chunks/{delete-57Y647IJ.js → delete-WW5B2IIN.js} +6 -6
- package/dist/chunks/{disable-E7QAIMBG.js → disable-WSV2JYK6.js} +6 -6
- package/dist/chunks/{discard-6JNSEHUD.js → discard-BTIMKAXZ.js} +6 -6
- package/dist/chunks/{edit-XKOVDTOO.js → edit-LOQJITTM.js} +7 -7
- package/dist/chunks/{enable-HXRMVTBB.js → enable-XMWWLBL7.js} +6 -6
- package/dist/chunks/{export-MRADQNKX.js → export-P2OSIM3L.js} +6 -6
- package/dist/chunks/{inspect-AOOSX4VO.js → inspect-5NKOJ64V.js} +8 -8
- package/dist/chunks/{list-YIDM3OOG.js → list-OLUANKMJ.js} +9 -9
- package/dist/chunks/{list-LQ4BDCK7.js → list-ZSRD6M3H.js} +6 -6
- package/dist/chunks/{ls-7GZP6WNF.js → ls-3YMXPZ7A.js} +8 -8
- package/dist/chunks/{publish-VPLDS2W7.js → publish-T2HPYN5D.js} +6 -6
- package/dist/chunks/{query-SRFELIAP.js → query-ZKNQWF5L.js} +8 -8
- package/dist/chunks/{reorder-UWAXWRXX.js → reorder-WQA5LQ7X.js} +6 -6
- package/dist/chunks/{restore-YHQNMAGI.js → restore-QTREUYWW.js} +6 -6
- package/dist/chunks/{rm-HA373E4I.js → rm-4JKXZFP3.js} +8 -8
- package/dist/chunks/{rule-inspect-WMR7SVJY.js → rule-inspect-3PUS2RKH.js} +8 -8
- package/dist/chunks/{rules-CPRD5HRH.js → rules-GBXWDR3P.js} +8 -8
- package/dist/chunks/{schema-AGVIOWAU.js → schema-TXE5TXMY.js} +9 -9
- package/dist/chunks/{types-QNN5CDCB.js → types-FAFL42RV.js} +4 -4
- package/dist/chunks/{update-K5GTSDIT.js → update-57KTLPIK.js} +8 -8
- package/dist/commands/build/index.js +15 -15
- package/dist/commands/deploy/index.js +24 -24
- package/dist/commands/dev/index.js +14 -14
- package/dist/commands/env/index.js +99 -20
- package/dist/commands/link/index.js +18 -18
- package/dist/commands/list/index.js +10 -10
- package/dist/commands-bulk.js +335 -122
- package/dist/index.js +26 -45
- package/dist/version.mjs +1 -1
- package/package.json +22 -21
|
@@ -9,35 +9,35 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EVDPX5BO.js";
|
|
13
|
+
import "./chunk-FPTKAORS.js";
|
|
14
14
|
import "./chunk-HTOH3MSD.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-O7R67TAG.js";
|
|
16
16
|
import {
|
|
17
17
|
validateJsonOutput
|
|
18
18
|
} from "./chunk-XPKWKPWA.js";
|
|
19
19
|
import {
|
|
20
20
|
rulesAddSubcommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P3H4MP5H.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_REASON
|
|
24
24
|
} from "./chunk-E3NE4SKN.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-ZI2C6YH2.js";
|
|
26
26
|
import "./chunk-U3WLEFHU.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-IABMY4Q3.js";
|
|
31
31
|
import "./chunk-CO5D46AG.js";
|
|
32
32
|
import {
|
|
33
33
|
getFlagsSpecification,
|
|
34
34
|
parseArguments,
|
|
35
35
|
printError
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JNOMOD7R.js";
|
|
37
37
|
import {
|
|
38
38
|
isAPIError,
|
|
39
39
|
packageName
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
41
41
|
import {
|
|
42
42
|
output_manager_default
|
|
43
43
|
} from "./chunk-ZQKJVHXY.js";
|
|
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
rulesAggregateCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-P3H4MP5H.js";
|
|
10
10
|
import {
|
|
11
11
|
formatOption,
|
|
12
12
|
limitOption
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JNOMOD7R.js";
|
|
14
14
|
import {
|
|
15
15
|
packageName
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/alerts/command.ts
|
|
19
19
|
var listSubcommand = {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
formatOption,
|
|
11
11
|
nextOption,
|
|
12
12
|
yesOption
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JNOMOD7R.js";
|
|
14
14
|
import {
|
|
15
15
|
packageName
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/list/command.ts
|
|
19
19
|
var listCommand = {
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
11
|
ua_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JCLLQ23G.js";
|
|
13
13
|
import {
|
|
14
14
|
getLocalPathConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FUYNVB23.js";
|
|
16
16
|
import {
|
|
17
17
|
autoInstallVercelPlugin
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OHOYN7R2.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
21
21
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
useKeypress,
|
|
42
42
|
usePrefix,
|
|
43
43
|
useState
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ZI2C6YH2.js";
|
|
45
45
|
import {
|
|
46
46
|
require_load_json_file,
|
|
47
47
|
require_write_json_file
|
|
@@ -49,12 +49,12 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
printError,
|
|
51
51
|
require_strip_ansi
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JNOMOD7R.js";
|
|
53
53
|
import {
|
|
54
54
|
APIError,
|
|
55
55
|
NowError,
|
|
56
56
|
getCommandName
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
58
58
|
import {
|
|
59
59
|
emoji,
|
|
60
60
|
link_default,
|
|
@@ -719,18 +719,41 @@ var require_open = __commonJS({
|
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
721
|
|
|
722
|
+
// src/util/config/get-default.ts
|
|
723
|
+
var defaultGlobalConfig = {
|
|
724
|
+
"// Note": "This is your Vercel config file. For more information see the global configuration documentation.",
|
|
725
|
+
"// Docs": "https://vercel.com/docs/projects/project-configuration/global-configuration#config.json"
|
|
726
|
+
};
|
|
727
|
+
function getDefaultAuthConfig(tokenStoredInSystemKeychain = false) {
|
|
728
|
+
return {
|
|
729
|
+
"// Note": tokenStoredInSystemKeychain ? "Your auth token is stored in your system keychain." : "This is your Vercel credentials file. DO NOT SHARE!",
|
|
730
|
+
"// Docs": "https://vercel.com/docs/projects/project-configuration/global-configuration#auth.json"
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
var defaultAuthConfig = getDefaultAuthConfig();
|
|
734
|
+
|
|
722
735
|
// src/util/config/files.ts
|
|
723
736
|
var import_load_json_file = __toESM(require_load_json_file(), 1);
|
|
724
737
|
var import_write_json_file = __toESM(require_write_json_file(), 1);
|
|
725
738
|
var import_client = __toESM(require_dist2(), 1);
|
|
726
739
|
import { join, basename, dirname } from "path";
|
|
727
740
|
import { accessSync, constants } from "fs";
|
|
741
|
+
import {
|
|
742
|
+
clearAllCredentialsStrict,
|
|
743
|
+
hasCredentials,
|
|
744
|
+
readCredentials,
|
|
745
|
+
resolveAuthTokenStorage,
|
|
746
|
+
writeCredentials
|
|
747
|
+
} from "@vercel/cli-auth/credentials-store.js";
|
|
728
748
|
var import_error_utils = __toESM(require_dist(), 1);
|
|
729
749
|
var VERCEL_DIR2 = global_path_default();
|
|
730
750
|
var CONFIG_FILE_PATH = join(VERCEL_DIR2, "config.json");
|
|
731
751
|
var AUTH_CONFIG_FILE_PATH = join(VERCEL_DIR2, "auth.json");
|
|
732
752
|
var readConfigFile = () => {
|
|
733
753
|
const config = import_load_json_file.default.sync(CONFIG_FILE_PATH);
|
|
754
|
+
if ("authTokenStorage" in config) {
|
|
755
|
+
config.authTokenStorage = resolveAuthTokenStorage(config.authTokenStorage);
|
|
756
|
+
}
|
|
734
757
|
return config;
|
|
735
758
|
};
|
|
736
759
|
var writeToConfigFile = (stuff) => {
|
|
@@ -757,38 +780,44 @@ var writeToConfigFile = (stuff) => {
|
|
|
757
780
|
throw err;
|
|
758
781
|
}
|
|
759
782
|
};
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
783
|
+
function getAuthStoreConfig(config) {
|
|
784
|
+
return {
|
|
785
|
+
authTokenStorage: resolveAuthTokenStorage(config.authTokenStorage)
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
function toPersistedAuthConfig(authConfig) {
|
|
789
|
+
const { skipWrite, tokenSource, ...persistedAuthConfig } = authConfig;
|
|
790
|
+
return persistedAuthConfig;
|
|
791
|
+
}
|
|
792
|
+
var readAuthConfigFile = (config) => {
|
|
793
|
+
return {
|
|
794
|
+
...getDefaultAuthConfig(),
|
|
795
|
+
...readCredentials(VERCEL_DIR2, getAuthStoreConfig(config))
|
|
796
|
+
};
|
|
763
797
|
};
|
|
764
|
-
var
|
|
798
|
+
var persistAuthConfig = (authConfig, config) => {
|
|
765
799
|
if (authConfig.skipWrite) {
|
|
766
800
|
return;
|
|
767
801
|
}
|
|
802
|
+
const persistedAuthConfig = toPersistedAuthConfig(authConfig);
|
|
768
803
|
try {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
});
|
|
773
|
-
} catch (err) {
|
|
774
|
-
if ((0, import_error_utils.isErrnoException)(err)) {
|
|
775
|
-
if (err.code === "EPERM") {
|
|
776
|
-
output_manager_default.error(
|
|
777
|
-
`Not able to create ${highlight(
|
|
778
|
-
AUTH_CONFIG_FILE_PATH
|
|
779
|
-
)} (operation not permitted).`
|
|
780
|
-
);
|
|
781
|
-
process.exit(1);
|
|
782
|
-
} else if (err.code === "EBADF") {
|
|
783
|
-
output_manager_default.error(
|
|
784
|
-
`Not able to create ${highlight(
|
|
785
|
-
AUTH_CONFIG_FILE_PATH
|
|
786
|
-
)} (bad file descriptor).`
|
|
787
|
-
);
|
|
788
|
-
process.exit(1);
|
|
789
|
-
}
|
|
804
|
+
if (!hasCredentials(persistedAuthConfig)) {
|
|
805
|
+
clearAllCredentialsStrict(VERCEL_DIR2);
|
|
806
|
+
return;
|
|
790
807
|
}
|
|
791
|
-
|
|
808
|
+
return writeCredentials(
|
|
809
|
+
VERCEL_DIR2,
|
|
810
|
+
persistedAuthConfig,
|
|
811
|
+
getAuthStoreConfig(config)
|
|
812
|
+
);
|
|
813
|
+
} catch (err) {
|
|
814
|
+
const wrappedError = new Error(
|
|
815
|
+
`An unexpected error occurred while trying to write the auth config to "${humanizePath(
|
|
816
|
+
AUTH_CONFIG_FILE_PATH
|
|
817
|
+
)}" ${(0, import_error_utils.errorToString)(err)}`
|
|
818
|
+
);
|
|
819
|
+
wrappedError.cause = err;
|
|
820
|
+
throw wrappedError;
|
|
792
821
|
}
|
|
793
822
|
};
|
|
794
823
|
function getConfigFilePath() {
|
|
@@ -2247,7 +2276,7 @@ async function login(client, telemetry) {
|
|
|
2247
2276
|
if (isInitialLogin) {
|
|
2248
2277
|
await updateCurrentTeamAfterLogin(client);
|
|
2249
2278
|
}
|
|
2250
|
-
client.
|
|
2279
|
+
client.persistAuthConfig();
|
|
2251
2280
|
client.writeToConfigFile();
|
|
2252
2281
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
|
2253
2282
|
output_manager_default.print(`
|
|
@@ -2268,6 +2297,23 @@ async function wait(intervalMs) {
|
|
|
2268
2297
|
|
|
2269
2298
|
// src/util/login/reauthenticate.ts
|
|
2270
2299
|
async function reauthenticate(client, error) {
|
|
2300
|
+
const { tokenSource } = client.authConfig;
|
|
2301
|
+
const reauthAction = error.enforced ? "SAML re-authentication is required" : "Re-authentication is required";
|
|
2302
|
+
if (tokenSource === "flag") {
|
|
2303
|
+
throw new Error(
|
|
2304
|
+
`${reauthAction} for ${(0, import_chalk4.bold)(error.scope)} scope, but the token provided via \`--token\` does not have access. Provide a token that is authorized for that scope.`
|
|
2305
|
+
);
|
|
2306
|
+
}
|
|
2307
|
+
if (tokenSource === "env") {
|
|
2308
|
+
throw new Error(
|
|
2309
|
+
`${reauthAction} for ${(0, import_chalk4.bold)(error.scope)} scope, but the token provided via the VERCEL_TOKEN environment variable does not have access. Set VERCEL_TOKEN to a token that is authorized for that scope.`
|
|
2310
|
+
);
|
|
2311
|
+
}
|
|
2312
|
+
if (!client.stdin.isTTY) {
|
|
2313
|
+
throw new Error(
|
|
2314
|
+
`${reauthAction} for ${(0, import_chalk4.bold)(error.scope)} scope, but the current environment is non-interactive so the device-code flow cannot be completed. Run \`vercel login\` in an interactive shell, or set VERCEL_TOKEN / pass \`--token\` with a token that is authorized for that scope.`
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2271
2317
|
if (error.teamId && error.enforced) {
|
|
2272
2318
|
output_manager_default.log(
|
|
2273
2319
|
`You must re-authenticate with SAML to use ${(0, import_chalk4.bold)(error.scope)} scope.`
|
|
@@ -2287,7 +2333,7 @@ async function reauthenticate(client, error) {
|
|
|
2287
2333
|
expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in,
|
|
2288
2334
|
refreshToken: tokens.refresh_token
|
|
2289
2335
|
});
|
|
2290
|
-
client.
|
|
2336
|
+
client.persistAuthConfig();
|
|
2291
2337
|
output_manager_default.success(`Authentication complete for ${(0, import_chalk4.bold)(error.scope)} scope.`);
|
|
2292
2338
|
return { token: tokens.access_token, email: "" };
|
|
2293
2339
|
}
|
|
@@ -2436,7 +2482,7 @@ ${error.stack}`);
|
|
|
2436
2482
|
if (!hasRefreshToken(authConfig)) {
|
|
2437
2483
|
output_manager_default.debug("No refresh token found, emptying auth config.");
|
|
2438
2484
|
this.emptyAuthConfig();
|
|
2439
|
-
this.
|
|
2485
|
+
this.persistAuthConfig();
|
|
2440
2486
|
return;
|
|
2441
2487
|
}
|
|
2442
2488
|
const tokenResponse = await refreshTokenRequest({
|
|
@@ -2446,7 +2492,7 @@ ${error.stack}`);
|
|
|
2446
2492
|
if (tokensError) {
|
|
2447
2493
|
output_manager_default.debug("Error refreshing token, emptying auth config.");
|
|
2448
2494
|
this.emptyAuthConfig();
|
|
2449
|
-
this.
|
|
2495
|
+
this.persistAuthConfig();
|
|
2450
2496
|
return;
|
|
2451
2497
|
}
|
|
2452
2498
|
this.updateAuthConfig({
|
|
@@ -2456,7 +2502,7 @@ ${error.stack}`);
|
|
|
2456
2502
|
if (tokens.refresh_token) {
|
|
2457
2503
|
this.updateAuthConfig({ refreshToken: tokens.refresh_token });
|
|
2458
2504
|
}
|
|
2459
|
-
this.
|
|
2505
|
+
this.persistAuthConfig();
|
|
2460
2506
|
this.writeToConfigFile();
|
|
2461
2507
|
output_manager_default.debug("Tokens refreshed successfully.");
|
|
2462
2508
|
}
|
|
@@ -2472,8 +2518,8 @@ ${error.stack}`);
|
|
|
2472
2518
|
emptyAuthConfig() {
|
|
2473
2519
|
this.authConfig = this.authConfig.skipWrite ? { skipWrite: true } : {};
|
|
2474
2520
|
}
|
|
2475
|
-
|
|
2476
|
-
|
|
2521
|
+
persistAuthConfig() {
|
|
2522
|
+
persistAuthConfig(this.authConfig, this.config);
|
|
2477
2523
|
}
|
|
2478
2524
|
/**
|
|
2479
2525
|
* Confirms DELETE operations with the user.
|
|
@@ -2643,10 +2689,12 @@ export {
|
|
|
2643
2689
|
revocationRequest,
|
|
2644
2690
|
processRevocationResponse,
|
|
2645
2691
|
login,
|
|
2692
|
+
defaultGlobalConfig,
|
|
2693
|
+
getDefaultAuthConfig,
|
|
2646
2694
|
readConfigFile,
|
|
2647
2695
|
writeToConfigFile,
|
|
2648
2696
|
readAuthConfigFile,
|
|
2649
|
-
|
|
2697
|
+
persistAuthConfig,
|
|
2650
2698
|
getConfigFilePath,
|
|
2651
2699
|
getAuthConfigFilePath,
|
|
2652
2700
|
readLocalConfig,
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
formatOption
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JNOMOD7R.js";
|
|
10
10
|
import {
|
|
11
11
|
packageName
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/metrics/command.ts
|
|
15
15
|
var schemaSubcommand = {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IB5L4LKZ.js";
|
|
10
10
|
import {
|
|
11
11
|
require_execa
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WCMV6TSF.js";
|
|
13
13
|
import {
|
|
14
14
|
VERCEL_DIR,
|
|
15
15
|
readJSONFile,
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
require_lib,
|
|
19
19
|
require_minimatch,
|
|
20
20
|
require_pluralize
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZI2C6YH2.js";
|
|
22
22
|
import {
|
|
23
23
|
CantParseJSONFile,
|
|
24
24
|
cmd,
|
|
25
25
|
code
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
27
27
|
import {
|
|
28
28
|
output_manager_default,
|
|
29
29
|
require_dist
|
|
@@ -10908,11 +10908,29 @@ __export(static_builder_exports, {
|
|
|
10908
10908
|
var import_minimatch = __toESM(require_minimatch(), 1);
|
|
10909
10909
|
import { shouldServe as defaultShouldServe } from "@vercel/build-utils";
|
|
10910
10910
|
var version = 2;
|
|
10911
|
+
var ALWAYS_EXCLUDED_PREFIXES = [".git/", "node_modules/"];
|
|
10912
|
+
var ALWAYS_EXCLUDED_FILES = [
|
|
10913
|
+
"vercel.json",
|
|
10914
|
+
"vercel.toml",
|
|
10915
|
+
".vercelignore",
|
|
10916
|
+
"now.json",
|
|
10917
|
+
".nowignore"
|
|
10918
|
+
];
|
|
10919
|
+
var DEFAULT_EXCLUDED_FILES = [
|
|
10920
|
+
".gitignore",
|
|
10921
|
+
"package.json",
|
|
10922
|
+
"package-lock.json",
|
|
10923
|
+
"yarn.lock",
|
|
10924
|
+
"pnpm-lock.yaml",
|
|
10925
|
+
"bun.lock",
|
|
10926
|
+
"bun.lockb",
|
|
10927
|
+
"README.md"
|
|
10928
|
+
];
|
|
10911
10929
|
var build = async ({ entrypoint, files, config }) => {
|
|
10912
10930
|
const output = {};
|
|
10913
10931
|
const outputDirectory = config.zeroConfig ? config.outputDirectory : "";
|
|
10914
10932
|
for (let [filename, fileFsRef] of Object.entries(files)) {
|
|
10915
|
-
if (
|
|
10933
|
+
if (ALWAYS_EXCLUDED_PREFIXES.some((prefix) => filename.startsWith(prefix)) || ALWAYS_EXCLUDED_FILES.includes(filename) || DEFAULT_EXCLUDED_FILES.includes(filename) || filename.startsWith(".env")) {
|
|
10916
10934
|
continue;
|
|
10917
10935
|
}
|
|
10918
10936
|
if (entrypoint && !(entrypoint === filename || (0, import_minimatch.default)(filename, entrypoint, { dot: true }))) {
|
|
@@ -6,29 +6,29 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
routesCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HMM7V4AU.js";
|
|
10
10
|
import {
|
|
11
11
|
metricsCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-77JGNI4Z.js";
|
|
13
13
|
import {
|
|
14
14
|
devCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NCUOSZ6X.js";
|
|
16
16
|
import {
|
|
17
17
|
activityCommand
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LN5ZMLBU.js";
|
|
19
19
|
import {
|
|
20
20
|
alertsCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4Q5VS23S.js";
|
|
22
22
|
import {
|
|
23
23
|
listCommand
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5EDL2IVB.js";
|
|
25
25
|
import {
|
|
26
26
|
buildCommand,
|
|
27
27
|
pullCommand
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OHOYN7R2.js";
|
|
29
29
|
import {
|
|
30
30
|
envCommand
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZI2C6YH2.js";
|
|
32
32
|
import {
|
|
33
33
|
confirmOption,
|
|
34
34
|
forceOption,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
limitOption,
|
|
38
38
|
nextOption,
|
|
39
39
|
yesOption
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-JNOMOD7R.js";
|
|
41
41
|
import {
|
|
42
42
|
packageName
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
44
44
|
import {
|
|
45
45
|
output_manager_default
|
|
46
46
|
} from "./chunk-ZQKJVHXY.js";
|
|
@@ -1396,13 +1396,78 @@ var listSubcommand4 = {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
]
|
|
1398
1398
|
};
|
|
1399
|
+
var tokenSubcommand = {
|
|
1400
|
+
name: "token",
|
|
1401
|
+
aliases: [],
|
|
1402
|
+
description: "Get a token for a Connex client (accepts a client ID like scl_abc or a UID like slack/my-bot)",
|
|
1403
|
+
arguments: [
|
|
1404
|
+
{
|
|
1405
|
+
name: "id",
|
|
1406
|
+
required: true
|
|
1407
|
+
}
|
|
1408
|
+
],
|
|
1409
|
+
options: [
|
|
1410
|
+
{
|
|
1411
|
+
name: "subject",
|
|
1412
|
+
shorthand: "s",
|
|
1413
|
+
type: String,
|
|
1414
|
+
argument: "TYPE",
|
|
1415
|
+
deprecated: false,
|
|
1416
|
+
description: `Subject type: "user" (default, acts on behalf of you) or "app" (uses the client's default installation)`
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
name: "installation-id",
|
|
1420
|
+
shorthand: null,
|
|
1421
|
+
type: String,
|
|
1422
|
+
argument: "ID",
|
|
1423
|
+
deprecated: false,
|
|
1424
|
+
description: "Target a specific installation (only useful with --subject app; defaults to the client's default installation)"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
name: "scopes",
|
|
1428
|
+
shorthand: null,
|
|
1429
|
+
type: String,
|
|
1430
|
+
argument: "SCOPES",
|
|
1431
|
+
deprecated: false,
|
|
1432
|
+
description: "Scopes (comma- or space-separated)"
|
|
1433
|
+
},
|
|
1434
|
+
yesOption,
|
|
1435
|
+
formatOption
|
|
1436
|
+
],
|
|
1437
|
+
examples: [
|
|
1438
|
+
{
|
|
1439
|
+
name: "Get a user token by client ID",
|
|
1440
|
+
value: `${packageName} connex token scl_abc123`
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
name: "Get a token by client UID",
|
|
1444
|
+
value: `${packageName} connex token slack/my-bot`
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
name: "Get an app token (default installation)",
|
|
1448
|
+
value: `${packageName} connex token scl_abc123 --subject app`
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
name: "Get an app token for a specific installation",
|
|
1452
|
+
value: `${packageName} connex token scl_abc123 --subject app --installation-id inst_1`
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
name: "Open the browser automatically if authorization/installation is required",
|
|
1456
|
+
value: `${packageName} connex token scl_abc123 --yes`
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
name: "Output as JSON (includes expiresAt, installationId, etc.)",
|
|
1460
|
+
value: `${packageName} connex token scl_abc123 --format=json`
|
|
1461
|
+
}
|
|
1462
|
+
]
|
|
1463
|
+
};
|
|
1399
1464
|
var connexCommand = {
|
|
1400
1465
|
name: "connex",
|
|
1401
1466
|
aliases: [],
|
|
1402
1467
|
description: "Manage Vercel Connect clients",
|
|
1403
1468
|
arguments: [],
|
|
1404
1469
|
options: [],
|
|
1405
|
-
subcommands: [createSubcommand2, listSubcommand4],
|
|
1470
|
+
subcommands: [createSubcommand2, listSubcommand4, tokenSubcommand],
|
|
1406
1471
|
examples: [
|
|
1407
1472
|
{
|
|
1408
1473
|
name: "Create a Slack app",
|
|
@@ -1411,6 +1476,10 @@ var connexCommand = {
|
|
|
1411
1476
|
{
|
|
1412
1477
|
name: "List Connex clients on the current team",
|
|
1413
1478
|
value: `${packageName} connex list`
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
name: "Get a token",
|
|
1482
|
+
value: `${packageName} connex token scl_abc123`
|
|
1414
1483
|
}
|
|
1415
1484
|
]
|
|
1416
1485
|
};
|
|
@@ -2103,9 +2172,9 @@ var tokensSubcommand = {
|
|
|
2103
2172
|
name: "remove",
|
|
2104
2173
|
shorthand: null,
|
|
2105
2174
|
type: [String],
|
|
2106
|
-
argument: "
|
|
2175
|
+
argument: "ID_OR_TOKEN",
|
|
2107
2176
|
deprecated: false,
|
|
2108
|
-
description: "Revoke one or more token
|
|
2177
|
+
description: "Revoke one or more tokens by id or plaintext token (repeatable). Requires `--yes` in non-interactive mode"
|
|
2109
2178
|
}
|
|
2110
2179
|
],
|
|
2111
2180
|
examples: []
|
|
@@ -5540,7 +5609,7 @@ var renameSubcommand = {
|
|
|
5540
5609
|
}
|
|
5541
5610
|
]
|
|
5542
5611
|
};
|
|
5543
|
-
var
|
|
5612
|
+
var tokenSubcommand2 = {
|
|
5544
5613
|
name: "token",
|
|
5545
5614
|
aliases: [],
|
|
5546
5615
|
description: "Get a development OIDC token for a project",
|
|
@@ -5863,7 +5932,7 @@ var projectCommand = {
|
|
|
5863
5932
|
speedInsightsSubcommand,
|
|
5864
5933
|
renameSubcommand,
|
|
5865
5934
|
removeSubcommand11,
|
|
5866
|
-
|
|
5935
|
+
tokenSubcommand2
|
|
5867
5936
|
],
|
|
5868
5937
|
options: [],
|
|
5869
5938
|
examples: []
|
|
@@ -7724,6 +7793,7 @@ export {
|
|
|
7724
7793
|
certsCommand,
|
|
7725
7794
|
createSubcommand2,
|
|
7726
7795
|
listSubcommand4,
|
|
7796
|
+
tokenSubcommand,
|
|
7727
7797
|
connexCommand,
|
|
7728
7798
|
contractCommand,
|
|
7729
7799
|
addSubcommand3 as addSubcommand2,
|
|
@@ -7862,7 +7932,7 @@ export {
|
|
|
7862
7932
|
listSubcommand12,
|
|
7863
7933
|
removeSubcommand11,
|
|
7864
7934
|
renameSubcommand,
|
|
7865
|
-
|
|
7935
|
+
tokenSubcommand2,
|
|
7866
7936
|
accessSummarySubcommand,
|
|
7867
7937
|
membersSubcommand,
|
|
7868
7938
|
protectionSubcommand,
|
|
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
table
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ABDTA3V2.js";
|
|
10
10
|
import {
|
|
11
11
|
require_strip_ansi
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JNOMOD7R.js";
|
|
13
13
|
import {
|
|
14
14
|
require_source
|
|
15
15
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -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-FPTKAORS.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
buildCommandWithGlobalFlags,
|
|
20
20
|
outputAgentError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IABMY4Q3.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/alerts/rules/parse-scope.ts
|
|
24
24
|
async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
|
|
@@ -9,22 +9,22 @@ import {
|
|
|
9
9
|
} from "./chunk-HTOH3MSD.js";
|
|
10
10
|
import {
|
|
11
11
|
getScope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O7R67TAG.js";
|
|
13
13
|
import {
|
|
14
14
|
AGENT_REASON
|
|
15
15
|
} from "./chunk-E3NE4SKN.js";
|
|
16
16
|
import {
|
|
17
17
|
getLinkedProject,
|
|
18
18
|
getProjectByNameOrId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZI2C6YH2.js";
|
|
20
20
|
import {
|
|
21
21
|
buildCommandWithGlobalFlags,
|
|
22
22
|
outputAgentError
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IABMY4Q3.js";
|
|
24
24
|
import {
|
|
25
25
|
ProjectNotFound,
|
|
26
26
|
isAPIError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XZ7CVBQ4.js";
|
|
28
28
|
|
|
29
29
|
// src/commands/alerts/resolve-alerts-scope.ts
|
|
30
30
|
function emitAlertsScopeError(client, jsonOutput, code, message, agent) {
|
|
@@ -6,24 +6,24 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NJYOE4D7.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureLink
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QTX36APP.js";
|
|
13
13
|
import {
|
|
14
14
|
autoInstallVercelPlugin,
|
|
15
15
|
pullCommand
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OHOYN7R2.js";
|
|
17
17
|
import {
|
|
18
18
|
help
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QPPVRYOB.js";
|
|
20
20
|
import {
|
|
21
21
|
VERCEL_DIR,
|
|
22
22
|
VERCEL_DIR_PROJECT,
|
|
23
23
|
envPullCommandLogic,
|
|
24
24
|
humanizePath,
|
|
25
25
|
parseTarget
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZI2C6YH2.js";
|
|
27
27
|
import {
|
|
28
28
|
TelemetryClient
|
|
29
29
|
} from "./chunk-U3WLEFHU.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
getFlagsSpecification,
|
|
35
35
|
parseArguments,
|
|
36
36
|
printError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JNOMOD7R.js";
|
|
38
38
|
import {
|
|
39
39
|
emoji,
|
|
40
40
|
output_manager_default,
|