vercel 49.2.0 → 50.0.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.
Files changed (2) hide show
  1. package/dist/index.js +103 -5
  2. package/package.json +17 -17
package/dist/index.js CHANGED
@@ -33066,6 +33066,13 @@ var init_command16 = __esm({
33066
33066
  type: Boolean,
33067
33067
  deprecated: false,
33068
33068
  description: "Prints the build logs instead of the deployment summary"
33069
+ },
33070
+ {
33071
+ name: "json",
33072
+ shorthand: null,
33073
+ type: Boolean,
33074
+ deprecated: false,
33075
+ description: "Output the deployment information as JSON"
33069
33076
  }
33070
33077
  ],
33071
33078
  examples: [
@@ -33088,6 +33095,10 @@ var init_command16 = __esm({
33088
33095
  {
33089
33096
  name: "Get deployment build logs",
33090
33097
  value: `${packageName} inspect my-deployment.vercel.app --logs`
33098
+ },
33099
+ {
33100
+ name: "Get deployment information as JSON",
33101
+ value: `${packageName} inspect my-deployment.vercel.app --json`
33091
33102
  }
33092
33103
  ]
33093
33104
  };
@@ -50046,7 +50057,7 @@ var require_package = __commonJS2({
50046
50057
  "../client/package.json"(exports2, module2) {
50047
50058
  module2.exports = {
50048
50059
  name: "@vercel/client",
50049
- version: "17.2.15",
50060
+ version: "17.2.16",
50050
50061
  main: "dist/index.js",
50051
50062
  typings: "dist/index.d.ts",
50052
50063
  homepage: "https://vercel.com",
@@ -91657,6 +91668,15 @@ var init_diff_env_files = __esm({
91657
91668
  function formatEnvValue(value) {
91658
91669
  if (value == null)
91659
91670
  return "";
91671
+ if (!/[\r\n]/.test(value)) {
91672
+ try {
91673
+ const parsed = JSON.parse(value);
91674
+ if (typeof parsed === "object" && parsed !== null) {
91675
+ return value;
91676
+ }
91677
+ } catch {
91678
+ }
91679
+ }
91660
91680
  const needsQuotes = /\s/.test(value) || value.startsWith("#") || value.startsWith('"');
91661
91681
  if (!needsQuotes)
91662
91682
  return value;
@@ -134561,6 +134581,9 @@ var require_superstatic = __commonJS2({
134561
134581
  headers: { Location: loc },
134562
134582
  status: status3
134563
134583
  };
134584
+ if (typeof r.env !== "undefined") {
134585
+ route.env = r.env;
134586
+ }
134564
134587
  if (r.has) {
134565
134588
  route.has = r.has;
134566
134589
  }
@@ -134588,6 +134611,9 @@ var require_superstatic = __commonJS2({
134588
134611
  internalParamNames
134589
134612
  );
134590
134613
  const route = { src, dest, check: true };
134614
+ if (typeof r.env !== "undefined") {
134615
+ route.env = r.env;
134616
+ }
134591
134617
  if (r.has) {
134592
134618
  route.has = r.has;
134593
134619
  }
@@ -135506,7 +135532,17 @@ var require_schemas = __commonJS2({
135506
135532
  has: hasSchema,
135507
135533
  missing: hasSchema,
135508
135534
  mitigate: mitigateSchema,
135509
- transforms: transformsSchema
135535
+ transforms: transformsSchema,
135536
+ env: {
135537
+ description: "An array of environment variable names that should be replaced at runtime in the destination or headers",
135538
+ type: "array",
135539
+ minItems: 1,
135540
+ maxItems: 64,
135541
+ items: {
135542
+ type: "string",
135543
+ maxLength: 256
135544
+ }
135545
+ }
135510
135546
  }
135511
135547
  },
135512
135548
  {
@@ -135550,6 +135586,16 @@ var require_schemas = __commonJS2({
135550
135586
  type: "integer",
135551
135587
  minimum: 100,
135552
135588
  maximum: 999
135589
+ },
135590
+ env: {
135591
+ description: "An array of environment variable names that should be replaced at runtime in the destination",
135592
+ type: "array",
135593
+ minItems: 1,
135594
+ maxItems: 64,
135595
+ items: {
135596
+ type: "string",
135597
+ maxLength: 256
135598
+ }
135553
135599
  }
135554
135600
  }
135555
135601
  }
@@ -135586,7 +135632,17 @@ var require_schemas = __commonJS2({
135586
135632
  maximum: 999
135587
135633
  },
135588
135634
  has: hasSchema,
135589
- missing: hasSchema
135635
+ missing: hasSchema,
135636
+ env: {
135637
+ description: "An array of environment variable names that should be replaced at runtime in the destination",
135638
+ type: "array",
135639
+ minItems: 1,
135640
+ maxItems: 64,
135641
+ items: {
135642
+ type: "string",
135643
+ maxLength: 256
135644
+ }
135645
+ }
135590
135646
  }
135591
135647
  }
135592
135648
  };
@@ -179895,6 +179951,11 @@ var init_inspect3 = __esm({
179895
179951
  this.trackCliFlag("wait");
179896
179952
  }
179897
179953
  }
179954
+ trackCliFlagJson(json) {
179955
+ if (json) {
179956
+ this.trackCliFlag("json");
179957
+ }
179958
+ }
179898
179959
  };
179899
179960
  }
179900
179961
  });
@@ -179943,6 +180004,7 @@ async function inspect3(client2) {
179943
180004
  telemetry2.trackCliOptionTimeout(parsedArguments.flags["--timeout"]);
179944
180005
  telemetry2.trackCliFlagLogs(parsedArguments.flags["--logs"]);
179945
180006
  telemetry2.trackCliFlagWait(parsedArguments.flags["--wait"]);
180007
+ telemetry2.trackCliFlagJson(parsedArguments.flags["--json"]);
179946
180008
  const timeout = (0, import_ms19.default)(parsedArguments.flags["--timeout"] ?? "3m");
179947
180009
  if (timeout === void 0) {
179948
180010
  error3(`Invalid timeout "${parsedArguments.flags["--timeout"]}"`);
@@ -179961,6 +180023,7 @@ async function inspect3(client2) {
179961
180023
  const until = Date.now() + timeout;
179962
180024
  const wait3 = parsedArguments.flags["--wait"] ?? false;
179963
180025
  const withLogs = parsedArguments.flags["--logs"];
180026
+ const asJson = parsedArguments.flags["--json"] ?? false;
179964
180027
  const startTimestamp = Date.now();
179965
180028
  try {
179966
180029
  deploymentIdOrHost = new import_url16.URL(deploymentIdOrHost).hostname;
@@ -179971,7 +180034,7 @@ async function inspect3(client2) {
179971
180034
  );
179972
180035
  let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
179973
180036
  let abortController;
179974
- if (withLogs) {
180037
+ if (withLogs && !asJson) {
179975
180038
  let promise;
179976
180039
  ({ abortController, promise } = displayBuildLogs(client2, deployment, wait3));
179977
180040
  if (wait3) {
@@ -179993,7 +180056,10 @@ async function inspect3(client2) {
179993
180056
  break;
179994
180057
  }
179995
180058
  }
179996
- if (withLogs) {
180059
+ if (asJson) {
180060
+ output_manager_default.stopSpinner();
180061
+ await printJson({ deployment, contextName, client: client2 });
180062
+ } else if (withLogs) {
179997
180063
  print(`${import_chalk103.default.cyan("status")} ${stateString(deployment.readyState)}
179998
180064
  `);
179999
180065
  } else {
@@ -180102,6 +180168,38 @@ async function printDetails({
180102
180168
  `);
180103
180169
  }
180104
180170
  }
180171
+ async function printJson({
180172
+ deployment,
180173
+ contextName,
180174
+ client: client2
180175
+ }) {
180176
+ const {
180177
+ id,
180178
+ name,
180179
+ url: url3,
180180
+ createdAt,
180181
+ routes: routes2,
180182
+ readyState,
180183
+ alias: aliases,
180184
+ target,
180185
+ customEnvironment
180186
+ } = deployment;
180187
+ const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
180188
+ const jsonOutput = {
180189
+ id,
180190
+ name,
180191
+ url: url3,
180192
+ target: customEnvironment?.slug ?? target ?? "preview",
180193
+ readyState,
180194
+ createdAt,
180195
+ ...aliases && aliases.length > 0 && { aliases },
180196
+ ...builds.length > 0 && { builds },
180197
+ ...Array.isArray(routes2) && routes2.length > 0 && { routes: routes2 },
180198
+ ...contextName && { contextName }
180199
+ };
180200
+ client2.stdout.write(`${JSON.stringify(jsonOutput, null, 2)}
180201
+ `);
180202
+ }
180105
180203
  function exitCode(state) {
180106
180204
  if (state === "ERROR" || state === "CANCELED") {
180107
180205
  return 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "49.2.0",
3
+ "version": "50.0.0",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -29,22 +29,22 @@
29
29
  "@vercel/backends": "0.0.17",
30
30
  "@vercel/build-utils": "13.2.3",
31
31
  "@vercel/detect-agent": "1.0.0",
32
- "@vercel/elysia": "0.1.13",
33
- "@vercel/fastify": "0.1.16",
34
- "@vercel/express": "0.1.19",
32
+ "@vercel/fastify": "0.1.17",
35
33
  "@vercel/go": "3.2.4",
36
- "@vercel/h3": "0.1.22",
37
- "@vercel/hono": "0.2.16",
38
- "@vercel/hydrogen": "1.3.3",
39
- "@vercel/nestjs": "0.2.17",
34
+ "@vercel/express": "0.1.20",
35
+ "@vercel/h3": "0.1.23",
36
+ "@vercel/elysia": "0.1.14",
37
+ "@vercel/hono": "0.2.17",
40
38
  "@vercel/next": "4.15.8",
39
+ "@vercel/nestjs": "0.2.18",
40
+ "@vercel/hydrogen": "1.3.3",
41
41
  "@vercel/node": "5.5.15",
42
+ "@vercel/redwood": "2.4.6",
43
+ "@vercel/python": "6.1.3",
42
44
  "@vercel/remix-builder": "5.5.6",
43
- "@vercel/python": "6.1.2",
44
45
  "@vercel/ruby": "2.2.3",
45
- "@vercel/redwood": "2.4.6",
46
- "@vercel/static-build": "2.8.14",
47
- "@vercel/rust": "1.0.4"
46
+ "@vercel/rust": "1.0.4",
47
+ "@vercel/static-build": "2.8.14"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -169,13 +169,13 @@
169
169
  "xdg-app-paths": "5.1.0",
170
170
  "yauzl-promise": "2.1.3",
171
171
  "@vercel-internals/constants": "1.0.4",
172
- "@vercel-internals/get-package-json": "1.0.0",
173
- "@vercel/client": "17.2.15",
174
- "@vercel/error-utils": "2.0.3",
175
172
  "@vercel-internals/types": "3.0.6",
173
+ "@vercel-internals/get-package-json": "1.0.0",
174
+ "@vercel/client": "17.2.16",
176
175
  "@vercel/frameworks": "3.15.4",
177
- "@vercel/fs-detectors": "5.7.9",
178
- "@vercel/routing-utils": "5.3.0"
176
+ "@vercel/fs-detectors": "5.7.10",
177
+ "@vercel/routing-utils": "5.3.1",
178
+ "@vercel/error-utils": "2.0.3"
179
179
  },
180
180
  "scripts": {
181
181
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",