vercel 47.0.3 → 47.0.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 +20 -68
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -94419,13 +94419,6 @@ var init_telemetry = __esm({
94419
94419
  value: this.redactedValue
94420
94420
  });
94421
94421
  }
94422
- trackLoginState(state) {
94423
- if (state === "started")
94424
- this.loginAttempt = (0, import_node_crypto.randomUUID)();
94425
- this.track({ key: `login:attempt:${this.loginAttempt}`, value: state });
94426
- if (state !== "started")
94427
- this.loginAttempt = void 0;
94428
- }
94429
94422
  trackCliFlagHelp(command, subcommands) {
94430
94423
  let subcommand;
94431
94424
  if (subcommands) {
@@ -119095,6 +119088,16 @@ var require_detect_builders = __commonJS2({
119095
119088
  builders.push(...apiBuilders);
119096
119089
  }
119097
119090
  if (frontendBuilder) {
119091
+ if (frontendBuilder?.use === "@vercel/express") {
119092
+ builders.push({
119093
+ src: "public/**/*",
119094
+ use: "@vercel/static",
119095
+ config: {
119096
+ zeroConfig: true,
119097
+ outputDirectory: "public"
119098
+ }
119099
+ });
119100
+ }
119098
119101
  builders.push(frontendBuilder);
119099
119102
  if (hasNextApiFiles && apiBuilders.some((b) => (0, import_is_official_runtime.isOfficialRuntime)("node", b.use))) {
119100
119103
  warnings.push({
@@ -179463,16 +179466,6 @@ var init_login2 = __esm({
179463
179466
  "use strict";
179464
179467
  init_telemetry();
179465
179468
  LoginTelemetryClient = class extends TelemetryClient {
179466
- /**
179467
- * Tracks the state of the login process.
179468
- * - `started` when the user initiates the login process.
179469
- * - `canceled` when the user cancels the login process.
179470
- * - `error` when the user encounters an error during the login process.
179471
- * - `success` when the user successfully logs in.
179472
- */
179473
- trackState(...args2) {
179474
- this.trackLoginState(...args2);
179475
- }
179476
179469
  };
179477
179470
  }
179478
179471
  });
@@ -179486,7 +179479,7 @@ async function login2(client2) {
179486
179479
  const [deviceAuthorizationError, deviceAuthorization] = await processDeviceAuthorizationResponse(deviceAuthorizationResponse);
179487
179480
  if (deviceAuthorizationError) {
179488
179481
  printError(deviceAuthorizationError);
179489
- return "error";
179482
+ return 1;
179490
179483
  }
179491
179484
  const {
179492
179485
  device_code,
@@ -179496,15 +179489,10 @@ async function login2(client2) {
179496
179489
  expiresAt,
179497
179490
  interval
179498
179491
  } = deviceAuthorization;
179499
- let canceled = false;
179500
- const handleCancel = () => {
179501
- canceled = true;
179502
- rl.close();
179503
- };
179504
179492
  const rl = import_node_readline.default.createInterface({
179505
179493
  input: process.stdin,
179506
179494
  output: process.stdout
179507
- }).on("SIGINT", handleCancel);
179495
+ }).on("SIGINT", () => process.exit(0));
179508
179496
  rl.question(
179509
179497
  `
179510
179498
  Visit ${import_chalk107.default.bold(
@@ -179517,41 +179505,20 @@ async function login2(client2) {
179517
179505
  ${import_chalk107.default.grey("Press [ENTER] to open the browser")}
179518
179506
  `,
179519
179507
  () => {
179520
- if (canceled)
179521
- return;
179522
179508
  open6.default(verification_uri_complete);
179523
179509
  output_manager_default.print((0, import_ansi_escapes6.eraseLines)(2));
179524
179510
  output_manager_default.spinner("Waiting for authentication...");
179525
- if (!canceled) {
179526
- rl.close();
179527
- }
179511
+ rl.close();
179528
179512
  }
179529
179513
  );
179530
- if (canceled) {
179531
- rl.off("SIGINT", handleCancel);
179532
- return "canceled";
179533
- }
179534
179514
  output_manager_default.spinner("Waiting for authentication...");
179535
179515
  let intervalMs = interval * 1e3;
179536
179516
  let error3 = new Error(
179537
179517
  "Timed out waiting for authentication. Please try again."
179538
179518
  );
179539
179519
  async function pollForToken() {
179540
- while (Date.now() < expiresAt && !canceled) {
179541
- await new Promise((resolve13) => {
179542
- const timeoutId = setTimeout(resolve13, intervalMs);
179543
- const checkCancellation = () => {
179544
- if (canceled) {
179545
- clearTimeout(timeoutId);
179546
- resolve13();
179547
- } else {
179548
- setTimeout(checkCancellation, 50);
179549
- }
179550
- };
179551
- checkCancellation();
179552
- });
179553
- if (canceled)
179554
- break;
179520
+ while (Date.now() < expiresAt) {
179521
+ await new Promise((resolve13) => setTimeout(resolve13, intervalMs));
179555
179522
  const [tokenResponseError, tokenResponse] = await deviceAccessTokenRequest({ device_code });
179556
179523
  if (tokenResponseError) {
179557
179524
  if (tokenResponseError.message.includes("timeout")) {
@@ -179613,16 +179580,11 @@ async function login2(client2) {
179613
179580
  }
179614
179581
  error3 = await pollForToken();
179615
179582
  output_manager_default.stopSpinner();
179616
- rl.off("SIGINT", handleCancel);
179617
179583
  rl.close();
179618
- if (canceled) {
179619
- return "canceled";
179620
- }
179621
- if (!error3) {
179622
- return "success";
179623
- }
179584
+ if (!error3)
179585
+ return 0;
179624
179586
  printError(error3);
179625
- return "error";
179587
+ return 1;
179626
179588
  }
179627
179589
  var import_node_readline, import_chalk107, open6, import_ansi_escapes6;
179628
179590
  var init_future = __esm({
@@ -179654,8 +179616,7 @@ async function login3(client2) {
179654
179616
  const flagsSpecification = getFlagsSpecification(loginCommand.options);
179655
179617
  const telemetry2 = new LoginTelemetryClient({
179656
179618
  opts: {
179657
- store: client2.telemetryEventStore,
179658
- isDebug: output_manager_default.isDebugEnabled()
179619
+ store: client2.telemetryEventStore
179659
179620
  }
179660
179621
  });
179661
179622
  try {
@@ -179666,16 +179627,7 @@ async function login3(client2) {
179666
179627
  }
179667
179628
  if (parsedArgs.flags["--future"]) {
179668
179629
  telemetry2.trackCliFlagFuture("login");
179669
- telemetry2.trackState("started");
179670
- const status3 = await login2(client2);
179671
- telemetry2.trackState(status3);
179672
- switch (status3) {
179673
- case "canceled":
179674
- case "success":
179675
- return 0;
179676
- case "error":
179677
- return 1;
179678
- }
179630
+ return await login2(client2);
179679
179631
  }
179680
179632
  if (parsedArgs.flags["--help"]) {
179681
179633
  telemetry2.trackCliFlagHelp("login");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "47.0.3",
3
+ "version": "47.0.5",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -26,11 +26,11 @@
26
26
  "@vercel/detect-agent": "0.2.0",
27
27
  "@vercel/fun": "1.1.6",
28
28
  "@vercel/go": "3.2.3",
29
- "@vercel/express": "0.0.13",
30
- "@vercel/hono": "0.0.21",
29
+ "@vercel/express": "0.0.14",
30
+ "@vercel/hono": "0.0.22",
31
31
  "@vercel/hydrogen": "1.2.4",
32
32
  "@vercel/next": "4.12.4",
33
- "@vercel/node": "5.3.20",
33
+ "@vercel/node": "5.3.21",
34
34
  "@vercel/python": "5.0.0",
35
35
  "@vercel/redwood": "2.3.6",
36
36
  "@vercel/remix-builder": "5.4.12",
@@ -167,8 +167,8 @@
167
167
  "xdg-app-paths": "5.1.0",
168
168
  "yauzl-promise": "2.1.3",
169
169
  "@vercel-internals/constants": "1.0.4",
170
- "@vercel-internals/types": "3.0.6",
171
- "@vercel-internals/get-package-json": "1.0.0"
170
+ "@vercel-internals/get-package-json": "1.0.0",
171
+ "@vercel-internals/types": "3.0.6"
172
172
  },
173
173
  "scripts": {
174
174
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",