vercel 48.9.0 → 48.9.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 +53 -29
- package/package.json +19 -19
package/dist/index.js
CHANGED
|
@@ -31962,8 +31962,8 @@ var init_command6 = __esm({
|
|
|
31962
31962
|
shorthand: null,
|
|
31963
31963
|
type: String,
|
|
31964
31964
|
deprecated: false,
|
|
31965
|
-
description: "The deployment ID to target",
|
|
31966
|
-
argument: "ID"
|
|
31965
|
+
description: "The deployment ID or URL to target",
|
|
31966
|
+
argument: "ID|URL"
|
|
31967
31967
|
},
|
|
31968
31968
|
{
|
|
31969
31969
|
name: "protection-bypass",
|
|
@@ -31987,6 +31987,10 @@ var init_command6 = __esm({
|
|
|
31987
31987
|
name: "Target a specific deployment by ID",
|
|
31988
31988
|
value: `${packageName} curl /api/status --deployment ERiL45NJvP8ghWxgbvCM447bmxwV`
|
|
31989
31989
|
},
|
|
31990
|
+
{
|
|
31991
|
+
name: "Target a specific deployment by URL",
|
|
31992
|
+
value: `${packageName} curl /api/status --deployment https://your-project-abc123.vercel.app`
|
|
31993
|
+
},
|
|
31990
31994
|
{
|
|
31991
31995
|
name: "Use curl flags after the separator",
|
|
31992
31996
|
value: `${packageName} curl /api/test -- --header "Content-Type: application/json" --request PUT`
|
|
@@ -32935,8 +32939,8 @@ var init_command14 = __esm({
|
|
|
32935
32939
|
shorthand: null,
|
|
32936
32940
|
type: String,
|
|
32937
32941
|
deprecated: false,
|
|
32938
|
-
description: "The deployment ID to target",
|
|
32939
|
-
argument: "ID"
|
|
32942
|
+
description: "The deployment ID or URL to target",
|
|
32943
|
+
argument: "ID|URL"
|
|
32940
32944
|
},
|
|
32941
32945
|
{
|
|
32942
32946
|
name: "protection-bypass",
|
|
@@ -49702,7 +49706,7 @@ var require_package = __commonJS2({
|
|
|
49702
49706
|
"../client/package.json"(exports2, module2) {
|
|
49703
49707
|
module2.exports = {
|
|
49704
49708
|
name: "@vercel/client",
|
|
49705
|
-
version: "17.2.
|
|
49709
|
+
version: "17.2.3",
|
|
49706
49710
|
main: "dist/index.js",
|
|
49707
49711
|
typings: "dist/index.d.ts",
|
|
49708
49712
|
homepage: "https://vercel.com",
|
|
@@ -49741,7 +49745,7 @@ var require_package = __commonJS2({
|
|
|
49741
49745
|
vitest: "2.0.1"
|
|
49742
49746
|
},
|
|
49743
49747
|
dependencies: {
|
|
49744
|
-
"@vercel/build-utils": "13.0.
|
|
49748
|
+
"@vercel/build-utils": "13.0.1",
|
|
49745
49749
|
"@vercel/error-utils": "2.0.3",
|
|
49746
49750
|
"@vercel/microfrontends": "1.2.2",
|
|
49747
49751
|
"@vercel/routing-utils": "5.2.1",
|
|
@@ -150684,7 +150688,7 @@ var init_curl = __esm({
|
|
|
150684
150688
|
}
|
|
150685
150689
|
trackCliOptionDeployment(deploymentId) {
|
|
150686
150690
|
if (deploymentId) {
|
|
150687
|
-
const value = deploymentId.startsWith("dpl_") ? "dpl_" : "no-prefix";
|
|
150691
|
+
const value = deploymentId.startsWith("http://") || deploymentId.startsWith("https://") ? "url" : deploymentId.startsWith("dpl_") ? "dpl_" : "no-prefix";
|
|
150688
150692
|
this.trackCliOption({
|
|
150689
150693
|
option: "deployment",
|
|
150690
150694
|
value
|
|
@@ -150713,21 +150717,15 @@ async function createDeploymentProtectionToken(client2, projectId, orgId) {
|
|
|
150713
150717
|
"Authentication required to create protection bypass token"
|
|
150714
150718
|
);
|
|
150715
150719
|
}
|
|
150716
|
-
const query = new URLSearchParams();
|
|
150717
|
-
if (orgId) {
|
|
150718
|
-
query.set("teamId", orgId);
|
|
150719
|
-
}
|
|
150720
150720
|
try {
|
|
150721
|
-
const response = await client2.fetch(
|
|
150722
|
-
|
|
150723
|
-
{
|
|
150724
|
-
|
|
150725
|
-
|
|
150726
|
-
|
|
150727
|
-
|
|
150728
|
-
|
|
150729
|
-
}
|
|
150730
|
-
);
|
|
150721
|
+
const response = await client2.fetch(`/v1/projects/${projectId}/protection-bypass`, {
|
|
150722
|
+
method: "PATCH",
|
|
150723
|
+
body: "{}",
|
|
150724
|
+
headers: {
|
|
150725
|
+
"Content-Type": "application/json"
|
|
150726
|
+
},
|
|
150727
|
+
accountId: orgId
|
|
150728
|
+
});
|
|
150731
150729
|
const { protectionBypass } = response;
|
|
150732
150730
|
output_manager_default.log(
|
|
150733
150731
|
`You require a deployment protection bypass token to access this deployment... Generating one now...`
|
|
@@ -150804,14 +150802,24 @@ var init_bypass_token = __esm({
|
|
|
150804
150802
|
});
|
|
150805
150803
|
|
|
150806
150804
|
// src/commands/curl/deployment-url.ts
|
|
150807
|
-
async function getDeploymentUrlById(client2,
|
|
150805
|
+
async function getDeploymentUrlById(client2, deploymentIdOrUrl, accountId) {
|
|
150808
150806
|
try {
|
|
150809
|
-
|
|
150807
|
+
if (deploymentIdOrUrl.startsWith("http://") || deploymentIdOrUrl.startsWith("https://")) {
|
|
150808
|
+
try {
|
|
150809
|
+
const url3 = new URL(deploymentIdOrUrl);
|
|
150810
|
+
return url3.origin;
|
|
150811
|
+
} catch (err) {
|
|
150812
|
+
output_manager_default.debug(`Invalid deployment URL provided: ${deploymentIdOrUrl}`);
|
|
150813
|
+
return null;
|
|
150814
|
+
}
|
|
150815
|
+
}
|
|
150816
|
+
let fullDeploymentId = deploymentIdOrUrl;
|
|
150810
150817
|
if (!fullDeploymentId.startsWith("dpl_")) {
|
|
150811
|
-
fullDeploymentId = `dpl_${
|
|
150818
|
+
fullDeploymentId = `dpl_${deploymentIdOrUrl}`;
|
|
150812
150819
|
}
|
|
150813
150820
|
const deployment = await client2.fetch(
|
|
150814
|
-
`/v13/deployments/${fullDeploymentId}
|
|
150821
|
+
`/v13/deployments/${fullDeploymentId}`,
|
|
150822
|
+
{ accountId }
|
|
150815
150823
|
);
|
|
150816
150824
|
if (!deployment || !deployment.url) {
|
|
150817
150825
|
return null;
|
|
@@ -150866,6 +150874,16 @@ function setupCurlLikeCommand(client2, command, telemetryClient) {
|
|
|
150866
150874
|
print(help(command, { columns: client2.stderr.columns }));
|
|
150867
150875
|
return 1;
|
|
150868
150876
|
}
|
|
150877
|
+
if (path11.startsWith("http://") || path11.startsWith("https://")) {
|
|
150878
|
+
output_manager_default.error(
|
|
150879
|
+
`The <path> argument must be a relative API path (e.g., '/' or '/api/hello'), not a full URL.`
|
|
150880
|
+
);
|
|
150881
|
+
output_manager_default.print(
|
|
150882
|
+
`To target a specific deployment within the currently linked project, use the --deployment <id|url> flag.`
|
|
150883
|
+
);
|
|
150884
|
+
print(help(command, { columns: client2.stderr.columns }));
|
|
150885
|
+
return 1;
|
|
150886
|
+
}
|
|
150869
150887
|
const toolFlags = separatorIndex !== -1 ? process.argv.slice(separatorIndex + 1) : [];
|
|
150870
150888
|
output_manager_default.debug(
|
|
150871
150889
|
`${command.name} flags (${toolFlags.length} args): ${JSON.stringify(toolFlags)}`
|
|
@@ -150880,8 +150898,9 @@ function setupCurlLikeCommand(client2, command, telemetryClient) {
|
|
|
150880
150898
|
async function getDeploymentUrlAndToken(client2, commandName, path11, options) {
|
|
150881
150899
|
const { deploymentFlag, protectionBypassFlag } = options;
|
|
150882
150900
|
let link4;
|
|
150901
|
+
let scope;
|
|
150883
150902
|
try {
|
|
150884
|
-
await getScope(client2);
|
|
150903
|
+
scope = await getScope(client2);
|
|
150885
150904
|
} catch (err) {
|
|
150886
150905
|
if ((0, import_error_utils18.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
150887
150906
|
output_manager_default.error(err.message);
|
|
@@ -150912,10 +150931,15 @@ async function getDeploymentUrlAndToken(client2, commandName, path11, options) {
|
|
|
150912
150931
|
output_manager_default.error("Failed to get project information");
|
|
150913
150932
|
return 1;
|
|
150914
150933
|
}
|
|
150915
|
-
const target = linkedProject.project.latestDeployments?.[0]
|
|
150934
|
+
const target = linkedProject.project.latestDeployments?.[0]?.url;
|
|
150916
150935
|
let baseUrl;
|
|
150917
150936
|
if (deploymentFlag) {
|
|
150918
|
-
const
|
|
150937
|
+
const accountId = scope.team?.id || scope.user.id;
|
|
150938
|
+
const deploymentUrl = await getDeploymentUrlById(
|
|
150939
|
+
client2,
|
|
150940
|
+
deploymentFlag,
|
|
150941
|
+
accountId
|
|
150942
|
+
);
|
|
150919
150943
|
if (!deploymentUrl) {
|
|
150920
150944
|
output_manager_default.error(`No deployment found for ID "${deploymentFlag}"`);
|
|
150921
150945
|
return 1;
|
|
@@ -178083,7 +178107,7 @@ var init_httpstat = __esm({
|
|
|
178083
178107
|
}
|
|
178084
178108
|
trackCliOptionDeployment(deploymentId) {
|
|
178085
178109
|
if (deploymentId) {
|
|
178086
|
-
const value = deploymentId.startsWith("dpl_") ? "dpl_" : "no-prefix";
|
|
178110
|
+
const value = deploymentId.startsWith("http://") || deploymentId.startsWith("https://") ? "url" : deploymentId.startsWith("dpl_") ? "dpl_" : "no-prefix";
|
|
178087
178111
|
this.trackCliOption({
|
|
178088
178112
|
option: "deployment",
|
|
178089
178113
|
value
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "48.9.
|
|
3
|
+
"version": "48.9.2",
|
|
4
4
|
"preferGlobal": true,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "The command-line interface for Vercel",
|
|
@@ -22,26 +22,26 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@vercel/blob": "1.0.2",
|
|
25
|
-
"@vercel/build-utils": "13.0.
|
|
25
|
+
"@vercel/build-utils": "13.0.1",
|
|
26
26
|
"@vercel/fun": "1.1.6",
|
|
27
27
|
"@vercel/go": "3.2.3",
|
|
28
|
-
"@vercel/elysia": "0.1.
|
|
29
|
-
"@vercel/express": "0.1.
|
|
30
|
-
"@vercel/fastify": "0.1.
|
|
31
|
-
"@vercel/hono": "0.2.
|
|
32
|
-
"@vercel/h3": "0.1.
|
|
33
|
-
"@vercel/hydrogen": "1.3.
|
|
34
|
-
"@vercel/next": "4.15.
|
|
35
|
-
"@vercel/node": "5.5.
|
|
36
|
-
"@vercel/python": "6.0.
|
|
37
|
-
"@vercel/redwood": "2.4.
|
|
38
|
-
"@vercel/remix-builder": "5.5.
|
|
39
|
-
"@vercel/ruby": "2.2.
|
|
40
|
-
"@vercel/static-build": "2.8.
|
|
28
|
+
"@vercel/elysia": "0.1.4",
|
|
29
|
+
"@vercel/express": "0.1.7",
|
|
30
|
+
"@vercel/fastify": "0.1.7",
|
|
31
|
+
"@vercel/hono": "0.2.7",
|
|
32
|
+
"@vercel/h3": "0.1.13",
|
|
33
|
+
"@vercel/hydrogen": "1.3.2",
|
|
34
|
+
"@vercel/next": "4.15.3",
|
|
35
|
+
"@vercel/node": "5.5.6",
|
|
36
|
+
"@vercel/python": "6.0.4",
|
|
37
|
+
"@vercel/redwood": "2.4.2",
|
|
38
|
+
"@vercel/remix-builder": "5.5.2",
|
|
39
|
+
"@vercel/ruby": "2.2.2",
|
|
40
|
+
"@vercel/static-build": "2.8.6",
|
|
41
41
|
"chokidar": "4.0.0",
|
|
42
42
|
"jose": "5.9.6",
|
|
43
43
|
"@vercel/detect-agent": "1.0.0",
|
|
44
|
-
"@vercel/backends": "0.0.
|
|
44
|
+
"@vercel/backends": "0.0.7"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@alex_neo/jest-expect-message": "1.0.5",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@types/which": "3.0.0",
|
|
87
87
|
"@types/write-json-file": "2.2.1",
|
|
88
88
|
"@types/yauzl-promise": "2.1.0",
|
|
89
|
-
"@vercel/client": "17.2.
|
|
89
|
+
"@vercel/client": "17.2.3",
|
|
90
90
|
"@vercel/error-utils": "2.0.3",
|
|
91
91
|
"@vercel/frameworks": "3.15.2",
|
|
92
92
|
"@vercel/fs-detectors": "5.7.5",
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
"xdg-app-paths": "5.1.0",
|
|
172
172
|
"yauzl-promise": "2.1.3",
|
|
173
173
|
"@vercel-internals/constants": "1.0.4",
|
|
174
|
-
"@vercel-internals/
|
|
175
|
-
"@vercel-internals/
|
|
174
|
+
"@vercel-internals/get-package-json": "1.0.0",
|
|
175
|
+
"@vercel-internals/types": "3.0.6"
|
|
176
176
|
},
|
|
177
177
|
"scripts": {
|
|
178
178
|
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|