vercel 48.10.3 → 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 +121 -53
  2. package/package.json +13 -13
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
  }
@@ -10057,7 +10057,8 @@ var init_emoji = __esm({
10057
10057
  link: "\u{1F517}",
10058
10058
  inspect: "\u{1F50D}",
10059
10059
  success: "\u2705",
10060
- locked: "\u{1F512}"
10060
+ locked: "\u{1F512}",
10061
+ loading: "\u23F3"
10061
10062
  };
10062
10063
  stripEmojiRegex = new RegExp(Object.values(emojiLabels).join("|"), "gi");
10063
10064
  }
@@ -36709,14 +36710,14 @@ var require_emoji_regex = __commonJS2({
36709
36710
  var require_string_width = __commonJS2({
36710
36711
  "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
36711
36712
  "use strict";
36712
- var stripAnsi5 = require_strip_ansi2();
36713
+ var stripAnsi6 = require_strip_ansi2();
36713
36714
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
36714
36715
  var emojiRegex = require_emoji_regex();
36715
36716
  var stringWidth = (string) => {
36716
36717
  if (typeof string !== "string" || string.length === 0) {
36717
36718
  return 0;
36718
36719
  }
36719
- string = stripAnsi5(string);
36720
+ string = stripAnsi6(string);
36720
36721
  if (string.length === 0) {
36721
36722
  return 0;
36722
36723
  }
@@ -36747,7 +36748,7 @@ var require_wrap_ansi = __commonJS2({
36747
36748
  "../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
36748
36749
  "use strict";
36749
36750
  var stringWidth = require_string_width();
36750
- var stripAnsi5 = require_strip_ansi2();
36751
+ var stripAnsi6 = require_strip_ansi2();
36751
36752
  var ansiStyles = require_ansi_styles();
36752
36753
  var ESCAPES = /* @__PURE__ */ new Set([
36753
36754
  "\x1B",
@@ -36759,7 +36760,7 @@ var require_wrap_ansi = __commonJS2({
36759
36760
  var wrapWord = (rows, word, columns) => {
36760
36761
  const characters = [...word];
36761
36762
  let isInsideEscape = false;
36762
- let visible = stringWidth(stripAnsi5(rows[rows.length - 1]));
36763
+ let visible = stringWidth(stripAnsi6(rows[rows.length - 1]));
36763
36764
  for (const [index, character] of characters.entries()) {
36764
36765
  const characterLength = stringWidth(character);
36765
36766
  if (visible + characterLength <= columns) {
@@ -49730,7 +49731,7 @@ var require_package = __commonJS2({
49730
49731
  "../client/package.json"(exports2, module2) {
49731
49732
  module2.exports = {
49732
49733
  name: "@vercel/client",
49733
- version: "17.2.5",
49734
+ version: "17.2.7",
49734
49735
  main: "dist/index.js",
49735
49736
  typings: "dist/index.d.ts",
49736
49737
  homepage: "https://vercel.com",
@@ -49769,7 +49770,7 @@ var require_package = __commonJS2({
49769
49770
  vitest: "2.0.1"
49770
49771
  },
49771
49772
  dependencies: {
49772
- "@vercel/build-utils": "13.0.1",
49773
+ "@vercel/build-utils": "13.1.0",
49773
49774
  "@vercel/error-utils": "2.0.3",
49774
49775
  "@vercel/microfrontends": "1.2.2",
49775
49776
  "@vercel/routing-utils": "5.2.2",
@@ -147637,22 +147638,41 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
147637
147638
  );
147638
147639
  }
147639
147640
  if (shouldLinkProject) {
147640
- let toLink;
147641
- await client2.input.text({
147642
- message: "What\u2019s the name of your existing project?",
147643
- validate: async (val) => {
147644
- if (!val) {
147645
- return "Project name cannot be empty";
147646
- }
147647
- const project2 = await getProjectByNameOrId(client2, val, org.id);
147648
- if (project2 instanceof ProjectNotFound) {
147649
- 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;
147650
147662
  }
147651
- toLink = project2;
147652
- return true;
147653
- }
147654
- });
147655
- 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
+ }
147656
147676
  }
147657
147677
  return await client2.input.text({
147658
147678
  message: `What\u2019s your project\u2019s name?`,
@@ -150894,6 +150914,9 @@ async function getDeploymentUrlById(client2, deploymentIdOrUrl, accountId) {
150894
150914
  return null;
150895
150915
  }
150896
150916
  }
150917
+ if (deploymentIdOrUrl.includes("vercel.app")) {
150918
+ return `https://${deploymentIdOrUrl}`;
150919
+ }
150897
150920
  let fullDeploymentId = deploymentIdOrUrl;
150898
150921
  if (!fullDeploymentId.startsWith("dpl_")) {
150899
150922
  fullDeploymentId = `dpl_${deploymentIdOrUrl}`;
@@ -151611,8 +151634,9 @@ function printBuildLog(log2, print) {
151611
151634
  if (!log2.created)
151612
151635
  return;
151613
151636
  const date = new Date(log2.created).toISOString();
151614
- for (const line of colorize(sanitize(log2), log2).split("\n")) {
151615
- 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}
151616
151640
  `);
151617
151641
  }
151618
151642
  }
@@ -151676,7 +151700,11 @@ function getSourceIcon(source) {
151676
151700
  return " ";
151677
151701
  }
151678
151702
  function sanitize(log2) {
151679
- 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());
151680
151708
  }
151681
151709
  function colorize(text, log2) {
151682
151710
  if (log2.level === "error") {
@@ -151686,7 +151714,7 @@ function colorize(text, log2) {
151686
151714
  }
151687
151715
  return text;
151688
151716
  }
151689
- 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;
151690
151718
  var init_logs = __esm({
151691
151719
  "src/util/logs.ts"() {
151692
151720
  "use strict";
@@ -151699,6 +151727,7 @@ var init_logs = __esm({
151699
151727
  init_events();
151700
151728
  init_command24();
151701
151729
  init_output_manager();
151730
+ import_strip_ansi4 = __toESM3(require_strip_ansi2());
151702
151731
  runtimeLogSpinnerMessage = `waiting for new logs...`;
151703
151732
  dateTimeFormat = "HH:mm:ss.SS";
151704
151733
  moreSymbol = "\u2026";
@@ -151742,7 +151771,7 @@ async function processDeployment({
151742
151771
  archive,
151743
151772
  skipAutoDetectionConfirmation,
151744
151773
  noWait,
151745
- withLogs,
151774
+ withFullLogs,
151746
151775
  agent,
151747
151776
  ...args2
151748
151777
  }) {
@@ -151791,6 +151820,7 @@ async function processDeployment({
151791
151820
  }
151792
151821
  let rollingRelease2;
151793
151822
  let project;
151823
+ let latestLogMessage = "";
151794
151824
  try {
151795
151825
  for await (const event of (0, import_client7.createDeployment)(clientOptions, requestBody)) {
151796
151826
  if (["tip", "notice", "warning"].includes(event.type)) {
@@ -151849,7 +151879,7 @@ async function processDeployment({
151849
151879
  `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk65.default.bold(
151850
151880
  previewUrl
151851
151881
  )} ${deployStamp()}`,
151852
- emoji("success")
151882
+ emoji(withFullLogs ? "link" : "loading")
151853
151883
  ) + `
151854
151884
  `
151855
151885
  );
@@ -151859,7 +151889,8 @@ async function processDeployment({
151859
151889
  if (noWait) {
151860
151890
  return deployment;
151861
151891
  }
151862
- if (withLogs) {
151892
+ latestLogMessage = deployment.readyState === "QUEUED" ? "Queued..." : "Building...";
151893
+ if (withFullLogs) {
151863
151894
  let promise;
151864
151895
  ({ abortController, promise } = displayBuildLogs(
151865
151896
  client2,
@@ -151869,14 +151900,36 @@ async function processDeployment({
151869
151900
  promise.catch(
151870
151901
  (error3) => output_manager_default.warn(`Failed to read build logs: ${error3}`)
151871
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
+ );
151872
151928
  }
151873
- output_manager_default.spinner(
151874
- deployment.readyState === "QUEUED" ? "Queued" : "Building",
151875
- 0
151876
- );
151929
+ output_manager_default.spinner(latestLogMessage, 0);
151877
151930
  }
151878
- if (event.type === "building" && !withLogs) {
151879
- output_manager_default.spinner("Building", 0);
151931
+ if (event.type === "building" && !withFullLogs) {
151932
+ output_manager_default.spinner(latestLogMessage || "Building...", 0);
151880
151933
  }
151881
151934
  if (event.type === "canceled") {
151882
151935
  stopSpinner();
@@ -151887,15 +151940,28 @@ async function processDeployment({
151887
151940
  rollingRelease2 = project?.rollingRelease;
151888
151941
  }
151889
151942
  if (event.type === "ready" && rollingRelease2) {
151890
- output_manager_default.spinner("Releasing", 0);
151943
+ output_manager_default.spinner("Releasing...", 0);
151891
151944
  output_manager_default.stopSpinner();
151892
151945
  return event.payload;
151893
151946
  }
151894
- if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withLogs) {
151895
- output_manager_default.spinner("Completing", 0);
151947
+ if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withFullLogs) {
151948
+ stopSpinner();
151949
+ process.stderr.write(eraseLines(2));
151950
+ const isProdDeployment = event.payload.target === "production";
151951
+ const previewUrl = `https://${event.payload.url}`;
151952
+ output_manager_default.print(
151953
+ prependEmoji(
151954
+ `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk65.default.bold(
151955
+ previewUrl
151956
+ )} ${deployStamp()}`,
151957
+ emoji("success")
151958
+ ) + `
151959
+ `
151960
+ );
151961
+ output_manager_default.spinner("Completing...", 0);
151896
151962
  }
151897
- if (event.type === "checks-running" && !withLogs) {
151898
- output_manager_default.spinner("Running Checks", 0);
151963
+ if (event.type === "checks-running" && !withFullLogs) {
151964
+ output_manager_default.spinner("Running Checks...", 0);
151899
151965
  }
151900
151966
  if (event.type === "checks-conclusion-failed") {
151901
151967
  stopSpinner();
@@ -151956,7 +152022,9 @@ var init_process_deployment = __esm({
151956
152022
  init_progress();
151957
152023
  init_ua();
151958
152024
  init_output_manager();
152025
+ init_erase_lines();
151959
152026
  init_get_project_by_id_or_name();
152027
+ init_events();
151960
152028
  archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
151961
152029
  UploadErrorMissingArchive = class extends Error {
151962
152030
  constructor() {
@@ -152031,7 +152099,7 @@ var init_util = __esm({
152031
152099
  projectSettings,
152032
152100
  skipAutoDetectionConfirmation,
152033
152101
  noWait,
152034
- withLogs,
152102
+ withFullLogs,
152035
152103
  autoAssignCustomDomains
152036
152104
  }, org, isSettingUpProject, archive) {
152037
152105
  const hashes = {};
@@ -152072,7 +152140,7 @@ var init_util = __esm({
152072
152140
  vercelOutputDir,
152073
152141
  rootDirectory,
152074
152142
  noWait,
152075
- withLogs
152143
+ withFullLogs
152076
152144
  });
152077
152145
  if (deployment && deployment.warnings) {
152078
152146
  let sizeExceeded = 0;
@@ -153134,7 +153202,7 @@ var init_deploy2 = __esm({
153134
153202
  const deployStamp = stamp_default();
153135
153203
  let deployment = null;
153136
153204
  const noWait = !!parsedArguments.flags["--no-wait"];
153137
- const withLogs = parsedArguments.flags["--logs"] ? true : false;
153205
+ const withFullLogs = parsedArguments.flags["--logs"] ? true : false;
153138
153206
  const localConfigurationOverrides = pickOverrides(localConfig);
153139
153207
  const name = project.name;
153140
153208
  if (!name) {
@@ -153170,7 +153238,7 @@ var init_deploy2 = __esm({
153170
153238
  target,
153171
153239
  skipAutoDetectionConfirmation: autoConfirm,
153172
153240
  noWait,
153173
- withLogs,
153241
+ withFullLogs,
153174
153242
  autoAssignCustomDomains
153175
153243
  };
153176
153244
  if (!localConfig.builds || localConfig.builds.length === 0) {
@@ -153283,7 +153351,7 @@ ${err.stack}`);
153283
153351
  return 1;
153284
153352
  }
153285
153353
  if (err instanceof BuildError) {
153286
- if (withLogs === false) {
153354
+ if (withFullLogs === false) {
153287
153355
  try {
153288
153356
  if (now.url) {
153289
153357
  const failedDeployment = await getDeployment(
@@ -173760,13 +173828,13 @@ var init_import2 = __esm({
173760
173828
 
173761
173829
  // src/util/strlen.ts
173762
173830
  function strlen(str) {
173763
- return (0, import_strip_ansi4.default)(str).length;
173831
+ return (0, import_strip_ansi5.default)(str).length;
173764
173832
  }
173765
- var import_strip_ansi4;
173833
+ var import_strip_ansi5;
173766
173834
  var init_strlen = __esm({
173767
173835
  "src/util/strlen.ts"() {
173768
173836
  "use strict";
173769
- import_strip_ansi4 = __toESM3(require_strip_ansi2());
173837
+ import_strip_ansi5 = __toESM3(require_strip_ansi2());
173770
173838
  }
173771
173839
  });
173772
173840
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "48.10.3",
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,26 +22,26 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@vercel/blob": "1.0.2",
25
- "@vercel/build-utils": "13.0.1",
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.4",
29
- "@vercel/express": "0.1.8",
30
- "@vercel/fastify": "0.1.7",
31
- "@vercel/hono": "0.2.7",
32
- "@vercel/h3": "0.1.13",
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.6",
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.6",
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",
44
- "@vercel/backends": "0.0.8"
44
+ "@vercel/backends": "0.0.9"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -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.5",
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",