vercel 41.3.1 → 41.3.2
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/index.js +39 -18
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -46172,7 +46172,7 @@ var require_package = __commonJS2({
|
|
46172
46172
|
"../client/package.json"(exports2, module2) {
|
46173
46173
|
module2.exports = {
|
46174
46174
|
name: "@vercel/client",
|
46175
|
-
version: "15.1.
|
46175
|
+
version: "15.1.4",
|
46176
46176
|
main: "dist/index.js",
|
46177
46177
|
typings: "dist/index.d.ts",
|
46178
46178
|
homepage: "https://vercel.com",
|
@@ -46211,7 +46211,7 @@ var require_package = __commonJS2({
|
|
46211
46211
|
typescript: "4.9.5"
|
46212
46212
|
},
|
46213
46213
|
dependencies: {
|
46214
|
-
"@vercel/build-utils": "10.
|
46214
|
+
"@vercel/build-utils": "10.4.0",
|
46215
46215
|
"@vercel/error-utils": "2.0.3",
|
46216
46216
|
"@vercel/routing-utils": "5.0.4",
|
46217
46217
|
"async-retry": "1.2.3",
|
@@ -161357,7 +161357,7 @@ async function findProjectsForDomain(client2, domainName) {
|
|
161357
161357
|
"/v9/projects"
|
161358
161358
|
)) {
|
161359
161359
|
for (const project of chunk.projects) {
|
161360
|
-
if (project.targets?.production?.alias?.some(
|
161360
|
+
if (project.targets?.production?.alias?.some?.(
|
161361
161361
|
(alias2) => alias2.endsWith(domainName)
|
161362
161362
|
)) {
|
161363
161363
|
result.push(project);
|
@@ -167743,13 +167743,13 @@ async function processRevocationResponse(response) {
|
|
167743
167743
|
}
|
167744
167744
|
function processOAuthErrorResponse(json) {
|
167745
167745
|
if (typeof json !== "object" || json === null)
|
167746
|
-
|
167746
|
+
return new TypeError("Expected response to be an object");
|
167747
167747
|
if (!("error" in json) || typeof json.error !== "string")
|
167748
|
-
|
167748
|
+
return new TypeError("Expected `error` to be a string");
|
167749
167749
|
if ("error_description" in json && typeof json.error_description !== "string")
|
167750
|
-
|
167750
|
+
return new TypeError("Expected `error_description` to be a string");
|
167751
167751
|
if ("error_uri" in json && typeof json.error_uri !== "string")
|
167752
|
-
|
167752
|
+
return new TypeError("Expected `error_uri` to be a string");
|
167753
167753
|
return json;
|
167754
167754
|
}
|
167755
167755
|
function isOAuthError(error3) {
|
@@ -167763,12 +167763,18 @@ function canParseURL(url3) {
|
|
167763
167763
|
}
|
167764
167764
|
}
|
167765
167765
|
async function verifyJWT(token) {
|
167766
|
-
|
167767
|
-
|
167768
|
-
|
167769
|
-
|
167770
|
-
|
167771
|
-
|
167766
|
+
try {
|
167767
|
+
const JWKS = (0, import_jose.createRemoteJWKSet)((await as()).jwks_uri);
|
167768
|
+
const { payload } = await (0, import_jose.jwtVerify)(token, JWKS, {
|
167769
|
+
issuer: "https://vercel.com",
|
167770
|
+
audience: ["https://api.vercel.com", "https://vercel.com/api"]
|
167771
|
+
});
|
167772
|
+
return [null, payload];
|
167773
|
+
} catch (error3) {
|
167774
|
+
if (error3 instanceof Error)
|
167775
|
+
return [error3];
|
167776
|
+
return [new Error("Could not verify JWT.", { cause: error3 })];
|
167777
|
+
}
|
167772
167778
|
}
|
167773
167779
|
var import_node_fetch6, import_jose, VERCEL_ISSUER, VERCEL_CLI_CLIENT_ID, _as, OAuthError;
|
167774
167780
|
var init_oauth2 = __esm({
|
@@ -167781,13 +167787,23 @@ var init_oauth2 = __esm({
|
|
167781
167787
|
VERCEL_CLI_CLIENT_ID = "cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp";
|
167782
167788
|
OAuthError = class extends Error {
|
167783
167789
|
constructor(message2, response) {
|
167790
|
+
var __super = (...args) => {
|
167791
|
+
super(...args);
|
167792
|
+
};
|
167784
167793
|
const error3 = processOAuthErrorResponse(response);
|
167794
|
+
if (error3 instanceof TypeError) {
|
167795
|
+
const message3 = `Unexpected server response: ${JSON.stringify(response)}`;
|
167796
|
+
__super(message3);
|
167797
|
+
this.cause = new Error(message3, { cause: error3 });
|
167798
|
+
this.code = "server_error";
|
167799
|
+
return;
|
167800
|
+
}
|
167785
167801
|
let cause = error3.error;
|
167786
167802
|
if (error3.error_description)
|
167787
167803
|
cause += `: ${error3.error_description}`;
|
167788
167804
|
if (error3.error_uri)
|
167789
167805
|
cause += ` (${error3.error_uri})`;
|
167790
|
-
|
167806
|
+
__super(message2, { cause });
|
167791
167807
|
this.cause = new Error(cause);
|
167792
167808
|
this.code = error3.error;
|
167793
167809
|
}
|
@@ -167822,7 +167838,7 @@ async function login2(client2) {
|
|
167822
167838
|
`
|
167823
167839
|
\u25B2 Sign in to the Vercel CLI
|
167824
167840
|
|
167825
|
-
Visit ${import_chalk98.default.bold(output_manager_default.link(verification_uri, verification_uri_complete, { color: false }))} to enter ${import_chalk98.default.bold(user_code)}
|
167841
|
+
Visit ${import_chalk98.default.bold(output_manager_default.link(verification_uri.replace("https://", ""), verification_uri_complete, { color: false }))} to enter ${import_chalk98.default.bold(user_code)}
|
167826
167842
|
${import_chalk98.default.grey("Press [ENTER] to open the browser")}
|
167827
167843
|
`,
|
167828
167844
|
() => {
|
@@ -167873,11 +167889,16 @@ async function login2(client2) {
|
|
167873
167889
|
const isInitialLogin = !client2.authConfig.token;
|
167874
167890
|
client2.authConfig.token = token.access_token;
|
167875
167891
|
error3 = void 0;
|
167876
|
-
const
|
167892
|
+
const [accessTokenError, accessToken] = await verifyJWT(
|
167893
|
+
token.access_token
|
167894
|
+
);
|
167895
|
+
if (accessTokenError) {
|
167896
|
+
return accessTokenError;
|
167897
|
+
}
|
167877
167898
|
output_manager_default.debug("access_token verified");
|
167878
|
-
if (team_id) {
|
167899
|
+
if (accessToken.team_id) {
|
167879
167900
|
output_manager_default.debug("Current team updated");
|
167880
|
-
client2.config.currentTeam = team_id;
|
167901
|
+
client2.config.currentTeam = accessToken.team_id;
|
167881
167902
|
} else {
|
167882
167903
|
output_manager_default.debug("Current team deleted");
|
167883
167904
|
delete client2.config.currentTeam;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "41.3.
|
3
|
+
"version": "41.3.2",
|
4
4
|
"preferGlobal": true,
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"description": "The command-line interface for Vercel",
|
@@ -21,17 +21,17 @@
|
|
21
21
|
"node": ">= 18"
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
|
-
"@vercel/build-utils": "10.
|
24
|
+
"@vercel/build-utils": "10.4.0",
|
25
25
|
"@vercel/fun": "1.1.5",
|
26
26
|
"@vercel/go": "3.2.1",
|
27
27
|
"@vercel/hydrogen": "1.2.0",
|
28
28
|
"@vercel/next": "4.7.3",
|
29
|
-
"@vercel/node": "5.1.
|
29
|
+
"@vercel/node": "5.1.12",
|
30
30
|
"@vercel/python": "4.7.1",
|
31
31
|
"@vercel/redwood": "2.3.0",
|
32
32
|
"@vercel/remix-builder": "5.4.2",
|
33
33
|
"@vercel/ruby": "2.2.0",
|
34
|
-
"@vercel/static-build": "2.7.
|
34
|
+
"@vercel/static-build": "2.7.4",
|
35
35
|
"chokidar": "4.0.0",
|
36
36
|
"jose": "5.9.6"
|
37
37
|
},
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"@types/which": "3.0.0",
|
79
79
|
"@types/write-json-file": "2.2.1",
|
80
80
|
"@types/yauzl-promise": "2.1.0",
|
81
|
-
"@vercel/client": "15.1.
|
81
|
+
"@vercel/client": "15.1.4",
|
82
82
|
"@vercel/error-utils": "2.0.3",
|
83
83
|
"@vercel/frameworks": "3.6.2",
|
84
84
|
"@vercel/fs-detectors": "5.3.9",
|
@@ -161,9 +161,9 @@
|
|
161
161
|
"write-json-file": "2.2.0",
|
162
162
|
"xdg-app-paths": "5.1.0",
|
163
163
|
"yauzl-promise": "2.1.3",
|
164
|
+
"@vercel-internals/get-package-json": "1.0.0",
|
164
165
|
"@vercel-internals/constants": "1.0.4",
|
165
|
-
"@vercel-internals/types": "3.0.6"
|
166
|
-
"@vercel-internals/get-package-json": "1.0.0"
|
166
|
+
"@vercel-internals/types": "3.0.6"
|
167
167
|
},
|
168
168
|
"scripts": {
|
169
169
|
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|