vercel 48.10.4 → 48.10.6

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 +114 -54
  2. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -9412,9 +9412,9 @@ var require_strip_ansi = __commonJS2({
9412
9412
  "../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js"(exports2, module2) {
9413
9413
  "use strict";
9414
9414
  var ansiRegex = require_ansi_regex();
9415
- var stripAnsi5 = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
9416
- module2.exports = stripAnsi5;
9417
- module2.exports.default = stripAnsi5;
9415
+ var stripAnsi6 = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
9416
+ module2.exports = stripAnsi6;
9417
+ module2.exports.default = stripAnsi6;
9418
9418
  }
9419
9419
  });
9420
9420
 
@@ -9784,7 +9784,7 @@ var require_ora = __commonJS2({
9784
9784
  var cliCursor = require_cli_cursor();
9785
9785
  var cliSpinners = require_cli_spinners();
9786
9786
  var logSymbols = require_log_symbols();
9787
- var stripAnsi5 = require_strip_ansi();
9787
+ var stripAnsi6 = require_strip_ansi();
9788
9788
  var wcwidth = require_wcwidth();
9789
9789
  var TEXT = Symbol("text");
9790
9790
  var PREFIX_TEXT = Symbol("prefixText");
@@ -9853,7 +9853,7 @@ var require_ora = __commonJS2({
9853
9853
  updateLineCount() {
9854
9854
  const columns = this.stream.columns || 80;
9855
9855
  const fullPrefixText = typeof this[PREFIX_TEXT] === "string" ? this[PREFIX_TEXT] + "-" : "";
9856
- this.lineCount = stripAnsi5(fullPrefixText + "--" + this[TEXT]).split("\n").reduce((count, line) => {
9856
+ this.lineCount = stripAnsi6(fullPrefixText + "--" + this[TEXT]).split("\n").reduce((count, line) => {
9857
9857
  return count + Math.max(1, Math.ceil(wcwidth(line) / columns));
9858
9858
  }, 0);
9859
9859
  }
@@ -36710,14 +36710,14 @@ var require_emoji_regex = __commonJS2({
36710
36710
  var require_string_width = __commonJS2({
36711
36711
  "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
36712
36712
  "use strict";
36713
- var stripAnsi5 = require_strip_ansi2();
36713
+ var stripAnsi6 = require_strip_ansi2();
36714
36714
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
36715
36715
  var emojiRegex = require_emoji_regex();
36716
36716
  var stringWidth = (string) => {
36717
36717
  if (typeof string !== "string" || string.length === 0) {
36718
36718
  return 0;
36719
36719
  }
36720
- string = stripAnsi5(string);
36720
+ string = stripAnsi6(string);
36721
36721
  if (string.length === 0) {
36722
36722
  return 0;
36723
36723
  }
@@ -36748,7 +36748,7 @@ var require_wrap_ansi = __commonJS2({
36748
36748
  "../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
36749
36749
  "use strict";
36750
36750
  var stringWidth = require_string_width();
36751
- var stripAnsi5 = require_strip_ansi2();
36751
+ var stripAnsi6 = require_strip_ansi2();
36752
36752
  var ansiStyles = require_ansi_styles();
36753
36753
  var ESCAPES = /* @__PURE__ */ new Set([
36754
36754
  "\x1B",
@@ -36760,7 +36760,7 @@ var require_wrap_ansi = __commonJS2({
36760
36760
  var wrapWord = (rows, word, columns) => {
36761
36761
  const characters = [...word];
36762
36762
  let isInsideEscape = false;
36763
- let visible = stringWidth(stripAnsi5(rows[rows.length - 1]));
36763
+ let visible = stringWidth(stripAnsi6(rows[rows.length - 1]));
36764
36764
  for (const [index, character] of characters.entries()) {
36765
36765
  const characterLength = stringWidth(character);
36766
36766
  if (visible + characterLength <= columns) {
@@ -49731,7 +49731,7 @@ var require_package = __commonJS2({
49731
49731
  "../client/package.json"(exports2, module2) {
49732
49732
  module2.exports = {
49733
49733
  name: "@vercel/client",
49734
- version: "17.2.6",
49734
+ version: "17.2.8",
49735
49735
  main: "dist/index.js",
49736
49736
  typings: "dist/index.d.ts",
49737
49737
  homepage: "https://vercel.com",
@@ -49770,10 +49770,10 @@ var require_package = __commonJS2({
49770
49770
  vitest: "2.0.1"
49771
49771
  },
49772
49772
  dependencies: {
49773
- "@vercel/build-utils": "13.0.2",
49773
+ "@vercel/build-utils": "13.1.0",
49774
49774
  "@vercel/error-utils": "2.0.3",
49775
49775
  "@vercel/microfrontends": "1.2.2",
49776
- "@vercel/routing-utils": "5.2.2",
49776
+ "@vercel/routing-utils": "5.3.0",
49777
49777
  "async-retry": "1.2.3",
49778
49778
  "async-sema": "3.0.0",
49779
49779
  "fs-extra": "8.0.1",
@@ -134301,6 +134301,16 @@ var require_schemas = __commonJS2({
134301
134301
  }
134302
134302
  }
134303
134303
  ]
134304
+ },
134305
+ env: {
134306
+ description: "An array of environment variable names that should be replaced at runtime in the args value",
134307
+ type: "array",
134308
+ minItems: 1,
134309
+ maxItems: 64,
134310
+ items: {
134311
+ type: "string",
134312
+ maxLength: 256
134313
+ }
134304
134314
  }
134305
134315
  },
134306
134316
  allOf: [
@@ -147638,22 +147648,41 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
147638
147648
  );
147639
147649
  }
147640
147650
  if (shouldLinkProject) {
147641
- let toLink;
147642
- await client2.input.text({
147643
- message: "What\u2019s the name of your existing project?",
147644
- validate: async (val) => {
147645
- if (!val) {
147646
- return "Project name cannot be empty";
147647
- }
147648
- const project2 = await getProjectByNameOrId(client2, val, org.id);
147649
- if (project2 instanceof ProjectNotFound) {
147650
- return "Project not found";
147651
+ const firstPage = await client2.fetch(`/v9/projects?limit=100`, { accountId: org.id });
147652
+ const projects = firstPage.projects;
147653
+ const hasMoreProjects = firstPage.pagination.next !== null;
147654
+ if (projects.length === 0) {
147655
+ output_manager_default.log(
147656
+ `No existing projects found under ${import_chalk48.default.bold(org.slug)}. Creating new project.`
147657
+ );
147658
+ } else if (hasMoreProjects) {
147659
+ let toLink;
147660
+ await client2.input.text({
147661
+ message: "What's the name of your existing project?",
147662
+ validate: async (val) => {
147663
+ if (!val) {
147664
+ return "Project name cannot be empty";
147665
+ }
147666
+ const project2 = await getProjectByNameOrId(client2, val, org.id);
147667
+ if (project2 instanceof ProjectNotFound) {
147668
+ return "Project not found";
147669
+ }
147670
+ toLink = project2;
147671
+ return true;
147651
147672
  }
147652
- toLink = project2;
147653
- return true;
147654
- }
147655
- });
147656
- return toLink;
147673
+ });
147674
+ return toLink;
147675
+ } else {
147676
+ const choices = projects.sort((a, b) => b.updatedAt - a.updatedAt).map((project2) => ({
147677
+ name: project2.name,
147678
+ value: project2
147679
+ }));
147680
+ const toLink = await client2.input.select({
147681
+ message: "Which existing project do you want to link?",
147682
+ choices
147683
+ });
147684
+ return toLink;
147685
+ }
147657
147686
  }
147658
147687
  return await client2.input.text({
147659
147688
  message: `What\u2019s your project\u2019s name?`,
@@ -151615,8 +151644,9 @@ function printBuildLog(log2, print) {
151615
151644
  if (!log2.created)
151616
151645
  return;
151617
151646
  const date = new Date(log2.created).toISOString();
151618
- for (const line of colorize(sanitize(log2), log2).split("\n")) {
151619
- print(`${import_chalk64.default.dim(date)} ${line.replace("[now-builder-debug] ", "")}
151647
+ const cleanText = parseLogLines(log2).join("\n");
151648
+ for (const line of colorize(cleanText, log2).split("\n")) {
151649
+ print(`${import_chalk64.default.dim(date)} ${line}
151620
151650
  `);
151621
151651
  }
151622
151652
  }
@@ -151680,7 +151710,11 @@ function getSourceIcon(source) {
151680
151710
  return " ";
151681
151711
  }
151682
151712
  function sanitize(log2) {
151683
- return (log2.text || "").replace(/\n$/, "").replace(/^\n/, "").replace(/\x1b\[1000D/g, "").replace(/\x1b\[0K/g, "").replace(/\x1b\[1A/g, "");
151713
+ return (0, import_strip_ansi4.default)(log2.text || "").replace(/\n$/, "").replace(/^\n/, "");
151714
+ }
151715
+ function parseLogLines(log2) {
151716
+ const text = sanitize(log2);
151717
+ return text.split("\n").map((line) => line.replace("[now-builder-debug] ", "").trim());
151684
151718
  }
151685
151719
  function colorize(text, log2) {
151686
151720
  if (log2.level === "error") {
@@ -151690,7 +151724,7 @@ function colorize(text, log2) {
151690
151724
  }
151691
151725
  return text;
151692
151726
  }
151693
- var import_chalk64, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
151727
+ var import_chalk64, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, import_strip_ansi4, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
151694
151728
  var init_logs = __esm({
151695
151729
  "src/util/logs.ts"() {
151696
151730
  "use strict";
@@ -151703,6 +151737,7 @@ var init_logs = __esm({
151703
151737
  init_events();
151704
151738
  init_command24();
151705
151739
  init_output_manager();
151740
+ import_strip_ansi4 = __toESM3(require_strip_ansi2());
151706
151741
  runtimeLogSpinnerMessage = `waiting for new logs...`;
151707
151742
  dateTimeFormat = "HH:mm:ss.SS";
151708
151743
  moreSymbol = "\u2026";
@@ -151746,7 +151781,7 @@ async function processDeployment({
151746
151781
  archive,
151747
151782
  skipAutoDetectionConfirmation,
151748
151783
  noWait,
151749
- withLogs,
151784
+ withFullLogs,
151750
151785
  agent,
151751
151786
  ...args2
151752
151787
  }) {
@@ -151795,6 +151830,7 @@ async function processDeployment({
151795
151830
  }
151796
151831
  let rollingRelease2;
151797
151832
  let project;
151833
+ let latestLogMessage = "";
151798
151834
  try {
151799
151835
  for await (const event of (0, import_client7.createDeployment)(clientOptions, requestBody)) {
151800
151836
  if (["tip", "notice", "warning"].includes(event.type)) {
@@ -151853,7 +151889,7 @@ async function processDeployment({
151853
151889
  `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk65.default.bold(
151854
151890
  previewUrl
151855
151891
  )} ${deployStamp()}`,
151856
- emoji("loading")
151892
+ emoji(withFullLogs ? "link" : "loading")
151857
151893
  ) + `
151858
151894
  `
151859
151895
  );
@@ -151863,7 +151899,8 @@ async function processDeployment({
151863
151899
  if (noWait) {
151864
151900
  return deployment;
151865
151901
  }
151866
- if (withLogs) {
151902
+ latestLogMessage = deployment.readyState === "QUEUED" ? "Queued..." : "Building...";
151903
+ if (withFullLogs) {
151867
151904
  let promise;
151868
151905
  ({ abortController, promise } = displayBuildLogs(
151869
151906
  client2,
@@ -151873,14 +151910,36 @@ async function processDeployment({
151873
151910
  promise.catch(
151874
151911
  (error3) => output_manager_default.warn(`Failed to read build logs: ${error3}`)
151875
151912
  );
151913
+ } else {
151914
+ abortController = new AbortController();
151915
+ const promise = events_default(
151916
+ client2,
151917
+ deployment.id,
151918
+ {
151919
+ mode: "logs",
151920
+ onEvent: (event2) => {
151921
+ if (!event2.created)
151922
+ return;
151923
+ const lines2 = parseLogLines(event2);
151924
+ const message2 = lines2[0];
151925
+ if (message2) {
151926
+ latestLogMessage = `Building: ${message2}`;
151927
+ output_manager_default.spinner(latestLogMessage, 0);
151928
+ }
151929
+ },
151930
+ quiet: false,
151931
+ findOpts: { direction: "forward", follow: true }
151932
+ },
151933
+ abortController
151934
+ );
151935
+ promise.catch(
151936
+ (error3) => output_manager_default.warn(`Failed to read build logs: ${error3}`)
151937
+ );
151876
151938
  }
151877
- output_manager_default.spinner(
151878
- deployment.readyState === "QUEUED" ? "Queued" : "Building",
151879
- 0
151880
- );
151939
+ output_manager_default.spinner(latestLogMessage, 0);
151881
151940
  }
151882
- if (event.type === "building" && !withLogs) {
151883
- output_manager_default.spinner("Building", 0);
151941
+ if (event.type === "building" && !withFullLogs) {
151942
+ output_manager_default.spinner(latestLogMessage || "Building...", 0);
151884
151943
  }
151885
151944
  if (event.type === "canceled") {
151886
151945
  stopSpinner();
@@ -151891,11 +151950,11 @@ async function processDeployment({
151891
151950
  rollingRelease2 = project?.rollingRelease;
151892
151951
  }
151893
151952
  if (event.type === "ready" && rollingRelease2) {
151894
- output_manager_default.spinner("Releasing", 0);
151895
- output_manager_default.stopSpinner();
151953
+ output_manager_default.spinner("Releasing...", 0);
151954
+ stopSpinner();
151896
151955
  return event.payload;
151897
151956
  }
151898
- if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withLogs) {
151957
+ if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withFullLogs) {
151899
151958
  stopSpinner();
151900
151959
  process.stderr.write(eraseLines(2));
151901
151960
  const isProdDeployment = event.payload.target === "production";
@@ -151909,10 +151968,10 @@ async function processDeployment({
151909
151968
  ) + `
151910
151969
  `
151911
151970
  );
151912
- output_manager_default.spinner("Completing", 0);
151971
+ output_manager_default.spinner("Completing...", 0);
151913
151972
  }
151914
- if (event.type === "checks-running" && !withLogs) {
151915
- output_manager_default.spinner("Running Checks", 0);
151973
+ if (event.type === "checks-running" && !withFullLogs) {
151974
+ output_manager_default.spinner("Running Checks...", 0);
151916
151975
  }
151917
151976
  if (event.type === "checks-conclusion-failed") {
151918
151977
  stopSpinner();
@@ -151975,6 +152034,7 @@ var init_process_deployment = __esm({
151975
152034
  init_output_manager();
151976
152035
  init_erase_lines();
151977
152036
  init_get_project_by_id_or_name();
152037
+ init_events();
151978
152038
  archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
151979
152039
  UploadErrorMissingArchive = class extends Error {
151980
152040
  constructor() {
@@ -152049,7 +152109,7 @@ var init_util = __esm({
152049
152109
  projectSettings,
152050
152110
  skipAutoDetectionConfirmation,
152051
152111
  noWait,
152052
- withLogs,
152112
+ withFullLogs,
152053
152113
  autoAssignCustomDomains
152054
152114
  }, org, isSettingUpProject, archive) {
152055
152115
  const hashes = {};
@@ -152090,7 +152150,7 @@ var init_util = __esm({
152090
152150
  vercelOutputDir,
152091
152151
  rootDirectory,
152092
152152
  noWait,
152093
- withLogs
152153
+ withFullLogs
152094
152154
  });
152095
152155
  if (deployment && deployment.warnings) {
152096
152156
  let sizeExceeded = 0;
@@ -153152,7 +153212,7 @@ var init_deploy2 = __esm({
153152
153212
  const deployStamp = stamp_default();
153153
153213
  let deployment = null;
153154
153214
  const noWait = !!parsedArguments.flags["--no-wait"];
153155
- const withLogs = parsedArguments.flags["--logs"] ? true : false;
153215
+ const withFullLogs = parsedArguments.flags["--logs"] ? true : false;
153156
153216
  const localConfigurationOverrides = pickOverrides(localConfig);
153157
153217
  const name = project.name;
153158
153218
  if (!name) {
@@ -153188,7 +153248,7 @@ var init_deploy2 = __esm({
153188
153248
  target,
153189
153249
  skipAutoDetectionConfirmation: autoConfirm,
153190
153250
  noWait,
153191
- withLogs,
153251
+ withFullLogs,
153192
153252
  autoAssignCustomDomains
153193
153253
  };
153194
153254
  if (!localConfig.builds || localConfig.builds.length === 0) {
@@ -153301,7 +153361,7 @@ ${err.stack}`);
153301
153361
  return 1;
153302
153362
  }
153303
153363
  if (err instanceof BuildError) {
153304
- if (withLogs === false) {
153364
+ if (withFullLogs === false) {
153305
153365
  try {
153306
153366
  if (now.url) {
153307
153367
  const failedDeployment = await getDeployment(
@@ -173778,13 +173838,13 @@ var init_import2 = __esm({
173778
173838
 
173779
173839
  // src/util/strlen.ts
173780
173840
  function strlen(str) {
173781
- return (0, import_strip_ansi4.default)(str).length;
173841
+ return (0, import_strip_ansi5.default)(str).length;
173782
173842
  }
173783
- var import_strip_ansi4;
173843
+ var import_strip_ansi5;
173784
173844
  var init_strlen = __esm({
173785
173845
  "src/util/strlen.ts"() {
173786
173846
  "use strict";
173787
- import_strip_ansi4 = __toESM3(require_strip_ansi2());
173847
+ import_strip_ansi5 = __toESM3(require_strip_ansi2());
173788
173848
  }
173789
173849
  });
173790
173850
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "48.10.4",
3
+ "version": "48.10.6",
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.2",
26
- "@vercel/fun": "1.1.6",
25
+ "@vercel/build-utils": "13.1.0",
26
+ "@vercel/elysia": "0.1.6",
27
+ "@vercel/express": "0.1.10",
28
+ "@vercel/fastify": "0.1.9",
29
+ "@vercel/fun": "1.2.0",
27
30
  "@vercel/go": "3.2.3",
28
- "@vercel/elysia": "0.1.5",
29
- "@vercel/express": "0.1.9",
30
- "@vercel/fastify": "0.1.8",
31
- "@vercel/hono": "0.2.8",
32
- "@vercel/h3": "0.1.14",
31
+ "@vercel/h3": "0.1.15",
32
+ "@vercel/hono": "0.2.9",
33
33
  "@vercel/hydrogen": "1.3.2",
34
34
  "@vercel/next": "4.15.3",
35
- "@vercel/node": "5.5.7",
36
- "@vercel/python": "6.0.5",
35
+ "@vercel/node": "5.5.8",
36
+ "@vercel/python": "6.0.6",
37
37
  "@vercel/redwood": "2.4.2",
38
38
  "@vercel/remix-builder": "5.5.2",
39
39
  "@vercel/ruby": "2.2.2",
40
- "@vercel/static-build": "2.8.7",
40
+ "@vercel/static-build": "2.8.8",
41
41
  "chokidar": "4.0.0",
42
42
  "jose": "5.9.6",
43
- "@vercel/detect-agent": "1.0.0",
44
- "@vercel/backends": "0.0.9"
43
+ "@vercel/backends": "0.0.9",
44
+ "@vercel/detect-agent": "1.0.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -85,11 +85,11 @@
85
85
  "@types/which": "3.0.0",
86
86
  "@types/write-json-file": "2.2.1",
87
87
  "@types/yauzl-promise": "2.1.0",
88
- "@vercel/client": "17.2.6",
88
+ "@vercel/client": "17.2.8",
89
89
  "@vercel/error-utils": "2.0.3",
90
90
  "@vercel/frameworks": "3.15.3",
91
- "@vercel/fs-detectors": "5.7.6",
92
- "@vercel/routing-utils": "5.2.2",
91
+ "@vercel/fs-detectors": "5.7.7",
92
+ "@vercel/routing-utils": "5.3.0",
93
93
  "@vitest/expect": "2.1.3",
94
94
  "ajv": "6.12.3",
95
95
  "alpha-sort": "2.0.1",