vercel 48.10.4 → 48.10.5

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 +102 -52
  2. package/package.json +12 -12
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.7",
49735
49735
  main: "dist/index.js",
49736
49736
  typings: "dist/index.d.ts",
49737
49737
  homepage: "https://vercel.com",
@@ -49770,7 +49770,7 @@ 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
49776
  "@vercel/routing-utils": "5.2.2",
@@ -147638,22 +147638,41 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
147638
147638
  );
147639
147639
  }
147640
147640
  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";
147641
+ const firstPage = await client2.fetch(`/v9/projects?limit=100`, { accountId: org.id });
147642
+ const projects = firstPage.projects;
147643
+ const hasMoreProjects = firstPage.pagination.next !== null;
147644
+ if (projects.length === 0) {
147645
+ output_manager_default.log(
147646
+ `No existing projects found under ${import_chalk48.default.bold(org.slug)}. Creating new project.`
147647
+ );
147648
+ } else if (hasMoreProjects) {
147649
+ let toLink;
147650
+ await client2.input.text({
147651
+ message: "What's the name of your existing project?",
147652
+ validate: async (val) => {
147653
+ if (!val) {
147654
+ return "Project name cannot be empty";
147655
+ }
147656
+ const project2 = await getProjectByNameOrId(client2, val, org.id);
147657
+ if (project2 instanceof ProjectNotFound) {
147658
+ return "Project not found";
147659
+ }
147660
+ toLink = project2;
147661
+ return true;
147651
147662
  }
147652
- toLink = project2;
147653
- return true;
147654
- }
147655
- });
147656
- return toLink;
147663
+ });
147664
+ return toLink;
147665
+ } else {
147666
+ const choices = projects.sort((a, b) => b.updatedAt - a.updatedAt).map((project2) => ({
147667
+ name: project2.name,
147668
+ value: project2
147669
+ }));
147670
+ const toLink = await client2.input.select({
147671
+ message: "Which existing project do you want to link?",
147672
+ choices
147673
+ });
147674
+ return toLink;
147675
+ }
147657
147676
  }
147658
147677
  return await client2.input.text({
147659
147678
  message: `What\u2019s your project\u2019s name?`,
@@ -151615,8 +151634,9 @@ function printBuildLog(log2, print) {
151615
151634
  if (!log2.created)
151616
151635
  return;
151617
151636
  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] ", "")}
151637
+ const cleanText = parseLogLines(log2).join("\n");
151638
+ for (const line of colorize(cleanText, log2).split("\n")) {
151639
+ print(`${import_chalk64.default.dim(date)} ${line}
151620
151640
  `);
151621
151641
  }
151622
151642
  }
@@ -151680,7 +151700,11 @@ function getSourceIcon(source) {
151680
151700
  return " ";
151681
151701
  }
151682
151702
  function sanitize(log2) {
151683
- return (log2.text || "").replace(/\n$/, "").replace(/^\n/, "").replace(/\x1b\[1000D/g, "").replace(/\x1b\[0K/g, "").replace(/\x1b\[1A/g, "");
151703
+ return (0, import_strip_ansi4.default)(log2.text || "").replace(/\n$/, "").replace(/^\n/, "");
151704
+ }
151705
+ function parseLogLines(log2) {
151706
+ const text = sanitize(log2);
151707
+ return text.split("\n").map((line) => line.replace("[now-builder-debug] ", "").trim());
151684
151708
  }
151685
151709
  function colorize(text, log2) {
151686
151710
  if (log2.level === "error") {
@@ -151690,7 +151714,7 @@ function colorize(text, log2) {
151690
151714
  }
151691
151715
  return text;
151692
151716
  }
151693
- var import_chalk64, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
151717
+ var import_chalk64, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, import_strip_ansi4, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
151694
151718
  var init_logs = __esm({
151695
151719
  "src/util/logs.ts"() {
151696
151720
  "use strict";
@@ -151703,6 +151727,7 @@ var init_logs = __esm({
151703
151727
  init_events();
151704
151728
  init_command24();
151705
151729
  init_output_manager();
151730
+ import_strip_ansi4 = __toESM3(require_strip_ansi2());
151706
151731
  runtimeLogSpinnerMessage = `waiting for new logs...`;
151707
151732
  dateTimeFormat = "HH:mm:ss.SS";
151708
151733
  moreSymbol = "\u2026";
@@ -151746,7 +151771,7 @@ async function processDeployment({
151746
151771
  archive,
151747
151772
  skipAutoDetectionConfirmation,
151748
151773
  noWait,
151749
- withLogs,
151774
+ withFullLogs,
151750
151775
  agent,
151751
151776
  ...args2
151752
151777
  }) {
@@ -151795,6 +151820,7 @@ async function processDeployment({
151795
151820
  }
151796
151821
  let rollingRelease2;
151797
151822
  let project;
151823
+ let latestLogMessage = "";
151798
151824
  try {
151799
151825
  for await (const event of (0, import_client7.createDeployment)(clientOptions, requestBody)) {
151800
151826
  if (["tip", "notice", "warning"].includes(event.type)) {
@@ -151853,7 +151879,7 @@ async function processDeployment({
151853
151879
  `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk65.default.bold(
151854
151880
  previewUrl
151855
151881
  )} ${deployStamp()}`,
151856
- emoji("loading")
151882
+ emoji(withFullLogs ? "link" : "loading")
151857
151883
  ) + `
151858
151884
  `
151859
151885
  );
@@ -151863,7 +151889,8 @@ async function processDeployment({
151863
151889
  if (noWait) {
151864
151890
  return deployment;
151865
151891
  }
151866
- if (withLogs) {
151892
+ latestLogMessage = deployment.readyState === "QUEUED" ? "Queued..." : "Building...";
151893
+ if (withFullLogs) {
151867
151894
  let promise;
151868
151895
  ({ abortController, promise } = displayBuildLogs(
151869
151896
  client2,
@@ -151873,14 +151900,36 @@ async function processDeployment({
151873
151900
  promise.catch(
151874
151901
  (error3) => output_manager_default.warn(`Failed to read build logs: ${error3}`)
151875
151902
  );
151903
+ } else {
151904
+ abortController = new AbortController();
151905
+ const promise = events_default(
151906
+ client2,
151907
+ deployment.id,
151908
+ {
151909
+ mode: "logs",
151910
+ onEvent: (event2) => {
151911
+ if (!event2.created)
151912
+ return;
151913
+ const lines2 = parseLogLines(event2);
151914
+ const message2 = lines2[0];
151915
+ if (message2) {
151916
+ latestLogMessage = `Building: ${message2}`;
151917
+ output_manager_default.spinner(latestLogMessage, 0);
151918
+ }
151919
+ },
151920
+ quiet: false,
151921
+ findOpts: { direction: "forward", follow: true }
151922
+ },
151923
+ abortController
151924
+ );
151925
+ promise.catch(
151926
+ (error3) => output_manager_default.warn(`Failed to read build logs: ${error3}`)
151927
+ );
151876
151928
  }
151877
- output_manager_default.spinner(
151878
- deployment.readyState === "QUEUED" ? "Queued" : "Building",
151879
- 0
151880
- );
151929
+ output_manager_default.spinner(latestLogMessage, 0);
151881
151930
  }
151882
- if (event.type === "building" && !withLogs) {
151883
- output_manager_default.spinner("Building", 0);
151931
+ if (event.type === "building" && !withFullLogs) {
151932
+ output_manager_default.spinner(latestLogMessage || "Building...", 0);
151884
151933
  }
151885
151934
  if (event.type === "canceled") {
151886
151935
  stopSpinner();
@@ -151891,11 +151940,11 @@ async function processDeployment({
151891
151940
  rollingRelease2 = project?.rollingRelease;
151892
151941
  }
151893
151942
  if (event.type === "ready" && rollingRelease2) {
151894
- output_manager_default.spinner("Releasing", 0);
151943
+ output_manager_default.spinner("Releasing...", 0);
151895
151944
  output_manager_default.stopSpinner();
151896
151945
  return event.payload;
151897
151946
  }
151898
- if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withLogs) {
151947
+ if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withFullLogs) {
151899
151948
  stopSpinner();
151900
151949
  process.stderr.write(eraseLines(2));
151901
151950
  const isProdDeployment = event.payload.target === "production";
@@ -151909,10 +151958,10 @@ async function processDeployment({
151909
151958
  ) + `
151910
151959
  `
151911
151960
  );
151912
- output_manager_default.spinner("Completing", 0);
151961
+ output_manager_default.spinner("Completing...", 0);
151913
151962
  }
151914
- if (event.type === "checks-running" && !withLogs) {
151915
- output_manager_default.spinner("Running Checks", 0);
151963
+ if (event.type === "checks-running" && !withFullLogs) {
151964
+ output_manager_default.spinner("Running Checks...", 0);
151916
151965
  }
151917
151966
  if (event.type === "checks-conclusion-failed") {
151918
151967
  stopSpinner();
@@ -151975,6 +152024,7 @@ var init_process_deployment = __esm({
151975
152024
  init_output_manager();
151976
152025
  init_erase_lines();
151977
152026
  init_get_project_by_id_or_name();
152027
+ init_events();
151978
152028
  archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
151979
152029
  UploadErrorMissingArchive = class extends Error {
151980
152030
  constructor() {
@@ -152049,7 +152099,7 @@ var init_util = __esm({
152049
152099
  projectSettings,
152050
152100
  skipAutoDetectionConfirmation,
152051
152101
  noWait,
152052
- withLogs,
152102
+ withFullLogs,
152053
152103
  autoAssignCustomDomains
152054
152104
  }, org, isSettingUpProject, archive) {
152055
152105
  const hashes = {};
@@ -152090,7 +152140,7 @@ var init_util = __esm({
152090
152140
  vercelOutputDir,
152091
152141
  rootDirectory,
152092
152142
  noWait,
152093
- withLogs
152143
+ withFullLogs
152094
152144
  });
152095
152145
  if (deployment && deployment.warnings) {
152096
152146
  let sizeExceeded = 0;
@@ -153152,7 +153202,7 @@ var init_deploy2 = __esm({
153152
153202
  const deployStamp = stamp_default();
153153
153203
  let deployment = null;
153154
153204
  const noWait = !!parsedArguments.flags["--no-wait"];
153155
- const withLogs = parsedArguments.flags["--logs"] ? true : false;
153205
+ const withFullLogs = parsedArguments.flags["--logs"] ? true : false;
153156
153206
  const localConfigurationOverrides = pickOverrides(localConfig);
153157
153207
  const name = project.name;
153158
153208
  if (!name) {
@@ -153188,7 +153238,7 @@ var init_deploy2 = __esm({
153188
153238
  target,
153189
153239
  skipAutoDetectionConfirmation: autoConfirm,
153190
153240
  noWait,
153191
- withLogs,
153241
+ withFullLogs,
153192
153242
  autoAssignCustomDomains
153193
153243
  };
153194
153244
  if (!localConfig.builds || localConfig.builds.length === 0) {
@@ -153301,7 +153351,7 @@ ${err.stack}`);
153301
153351
  return 1;
153302
153352
  }
153303
153353
  if (err instanceof BuildError) {
153304
- if (withLogs === false) {
153354
+ if (withFullLogs === false) {
153305
153355
  try {
153306
153356
  if (now.url) {
153307
153357
  const failedDeployment = await getDeployment(
@@ -173778,13 +173828,13 @@ var init_import2 = __esm({
173778
173828
 
173779
173829
  // src/util/strlen.ts
173780
173830
  function strlen(str) {
173781
- return (0, import_strip_ansi4.default)(str).length;
173831
+ return (0, import_strip_ansi5.default)(str).length;
173782
173832
  }
173783
- var import_strip_ansi4;
173833
+ var import_strip_ansi5;
173784
173834
  var init_strlen = __esm({
173785
173835
  "src/util/strlen.ts"() {
173786
173836
  "use strict";
173787
- import_strip_ansi4 = __toESM3(require_strip_ansi2());
173837
+ import_strip_ansi5 = __toESM3(require_strip_ansi2());
173788
173838
  }
173789
173839
  });
173790
173840
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "48.10.4",
3
+ "version": "48.10.5",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -22,22 +22,22 @@
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
43
  "@vercel/detect-agent": "1.0.0",
@@ -85,7 +85,7 @@
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.7",
89
89
  "@vercel/error-utils": "2.0.3",
90
90
  "@vercel/frameworks": "3.15.3",
91
91
  "@vercel/fs-detectors": "5.7.6",