vercel 44.7.2 → 45.0.8

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 +189 -68
  2. package/package.json +10 -9
package/dist/index.js CHANGED
@@ -31951,14 +31951,14 @@ var init_command6 = __esm({
31951
31951
  name: "logs",
31952
31952
  shorthand: "l",
31953
31953
  type: Boolean,
31954
- deprecated: true,
31954
+ deprecated: false,
31955
31955
  description: "Print the build logs"
31956
31956
  },
31957
31957
  {
31958
31958
  name: "no-logs",
31959
31959
  shorthand: null,
31960
31960
  type: Boolean,
31961
- deprecated: false,
31961
+ deprecated: true,
31962
31962
  description: "Do not print the build logs"
31963
31963
  },
31964
31964
  {
@@ -46901,7 +46901,7 @@ var require_package = __commonJS2({
46901
46901
  "../client/package.json"(exports2, module2) {
46902
46902
  module2.exports = {
46903
46903
  name: "@vercel/client",
46904
- version: "15.3.13",
46904
+ version: "15.3.14",
46905
46905
  main: "dist/index.js",
46906
46906
  typings: "dist/index.d.ts",
46907
46907
  homepage: "https://vercel.com",
@@ -46940,7 +46940,7 @@ var require_package = __commonJS2({
46940
46940
  vitest: "2.0.1"
46941
46941
  },
46942
46942
  dependencies: {
46943
- "@vercel/build-utils": "11.0.0",
46943
+ "@vercel/build-utils": "11.0.1",
46944
46944
  "@vercel/error-utils": "2.0.3",
46945
46945
  "@vercel/microfrontends": "1.2.2",
46946
46946
  "@vercel/routing-utils": "5.1.1",
@@ -61137,19 +61137,11 @@ function canParseURL(url3) {
61137
61137
  return false;
61138
61138
  }
61139
61139
  }
61140
- function inspectToken(token) {
61141
- try {
61142
- return [null, (0, import_jose.decodeJwt)(token)];
61143
- } catch (cause) {
61144
- return [new InspectionError("Could not inspect token.", { cause })];
61145
- }
61146
- }
61147
- var import_node_fetch, import_jose, import_os5, VERCEL_ISSUER, VERCEL_CLI_CLIENT_ID, userAgent, _as, OAuthError, InspectionError;
61140
+ var import_node_fetch, import_os5, VERCEL_ISSUER, VERCEL_CLI_CLIENT_ID, userAgent, _as, OAuthError;
61148
61141
  var init_oauth2 = __esm({
61149
61142
  "src/util/oauth.ts"() {
61150
61143
  "use strict";
61151
61144
  import_node_fetch = __toESM3(require_lib7());
61152
- import_jose = require("jose");
61153
61145
  init_ua();
61154
61146
  import_os5 = require("os");
61155
61147
  VERCEL_ISSUER = new URL("https://vercel.com");
@@ -61178,8 +61170,6 @@ var init_oauth2 = __esm({
61178
61170
  this.code = error3.error;
61179
61171
  }
61180
61172
  };
61181
- InspectionError = class extends Error {
61182
- };
61183
61173
  }
61184
61174
  });
61185
61175
 
@@ -116472,6 +116462,108 @@ var require_frameworks = __commonJS2({
116472
116462
  dependency: "hono",
116473
116463
  getOutputDirName: async () => "public"
116474
116464
  },
116465
+ {
116466
+ name: "Express",
116467
+ slug: "express",
116468
+ logo: "https://api-frameworks.vercel.sh/framework-logos/express.svg",
116469
+ darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/express-dark.svg",
116470
+ tagline: "Fast, unopinionated, minimalist web framework for Node.js",
116471
+ description: "Fast, unopinionated, minimalist web framework for Node.js",
116472
+ website: "https://expressjs.com",
116473
+ useRuntime: { src: "index.js", use: "@vercel/express" },
116474
+ defaultRoutes: [
116475
+ {
116476
+ handle: "filesystem"
116477
+ },
116478
+ {
116479
+ src: "/(.*)",
116480
+ dest: "/"
116481
+ }
116482
+ ],
116483
+ detectors: {
116484
+ every: [{ matchPackage: "express" }],
116485
+ some: [
116486
+ {
116487
+ path: "index.cjs",
116488
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116489
+ },
116490
+ {
116491
+ path: "index.js",
116492
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116493
+ },
116494
+ {
116495
+ path: "index.mjs",
116496
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116497
+ },
116498
+ {
116499
+ path: "index.mts",
116500
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116501
+ },
116502
+ {
116503
+ path: "index.ts",
116504
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116505
+ },
116506
+ {
116507
+ path: "server.cjs",
116508
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116509
+ },
116510
+ {
116511
+ path: "server.js",
116512
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116513
+ },
116514
+ {
116515
+ path: "server.mjs",
116516
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116517
+ },
116518
+ {
116519
+ path: "server.mts",
116520
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116521
+ },
116522
+ {
116523
+ path: "server.ts",
116524
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116525
+ },
116526
+ {
116527
+ path: "src/index.cjs",
116528
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116529
+ },
116530
+ {
116531
+ path: "src/index.js",
116532
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116533
+ },
116534
+ {
116535
+ path: "src/index.mjs",
116536
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116537
+ },
116538
+ {
116539
+ path: "src/index.mts",
116540
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116541
+ },
116542
+ {
116543
+ path: "src/index.ts",
116544
+ matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']express["']\\s*(?:\\))?`
116545
+ }
116546
+ ]
116547
+ },
116548
+ settings: {
116549
+ installCommand: {
116550
+ placeholder: "`yarn install`, `pnpm install`, `npm install`, or `bun install`"
116551
+ },
116552
+ buildCommand: {
116553
+ placeholder: "None",
116554
+ value: null
116555
+ },
116556
+ devCommand: {
116557
+ placeholder: "None",
116558
+ value: null
116559
+ },
116560
+ outputDirectory: {
116561
+ value: "N/A"
116562
+ }
116563
+ },
116564
+ dependency: "express",
116565
+ getOutputDirName: async () => "public"
116566
+ },
116475
116567
  {
116476
116568
  name: "Other",
116477
116569
  slug: null,
@@ -129919,7 +130011,7 @@ var init_token = __esm({
129919
130011
  init_list_item();
129920
130012
  ErrorMessage = `No Vercel Blob token found. To fix this issue, choose one of the following options:
129921
130013
  ${list_item_default(`Pass the token directly as an option: ${getCommandName("blob list --rw-token BLOB_TOKEN")}`, 1)}
129922
- ${list_item_default(`Set the Token as an environment variable: ${cmd(`VERCEL_BLOB_READ_WRITE_TOKEN=BLOB_TOKEN ${packageName} blob list`)}`, 2)}
130014
+ ${list_item_default(`Set the Token as an environment variable: ${cmd(`BLOB_READ_WRITE_TOKEN=BLOB_TOKEN ${packageName} blob list`)}`, 2)}
129923
130015
  ${list_item_default("Link your current folder to a Vercel Project that has a Vercel Blob store connected", 3)}`;
129924
130016
  }
129925
130017
  });
@@ -145250,31 +145342,33 @@ async function vercelAuth(client2, {
145250
145342
  `Want to use the default Deployment Protection settings? ${import_chalk49.default.dim(`(Vercel Authentication: Standard Protection)`)}`,
145251
145343
  true
145252
145344
  )) {
145253
- return "standard";
145345
+ return DEFAULT_VERCEL_AUTH_SETTING;
145254
145346
  }
145255
- const vercelAuth2 = await client2.input.select({
145256
- message: `What setting do you want to use for Vercel Authentication?`,
145257
- default: "standard",
145258
- choices: [
145259
- {
145260
- description: "Standard Protection (recommended)",
145261
- name: "standard",
145262
- value: "standard"
145263
- },
145264
- {
145265
- description: "No Protection (all deployments will be public)",
145266
- name: "none",
145267
- value: "none"
145268
- }
145269
- ]
145270
- });
145347
+ const vercelAuth2 = await client2.input.select(OPTIONS);
145271
145348
  return vercelAuth2;
145272
145349
  }
145273
- var import_chalk49;
145350
+ var import_chalk49, DEFAULT_VERCEL_AUTH_SETTING, OPTIONS;
145274
145351
  var init_vercel_auth = __esm({
145275
145352
  "src/util/input/vercel-auth.ts"() {
145276
145353
  "use strict";
145277
145354
  import_chalk49 = __toESM3(require_source());
145355
+ DEFAULT_VERCEL_AUTH_SETTING = "standard";
145356
+ OPTIONS = {
145357
+ message: `What setting do you want to use for Vercel Authentication?`,
145358
+ default: DEFAULT_VERCEL_AUTH_SETTING,
145359
+ choices: [
145360
+ {
145361
+ description: "Standard Protection (recommended)",
145362
+ name: "standard",
145363
+ value: "standard"
145364
+ },
145365
+ {
145366
+ description: "No Protection (all deployments will be public)",
145367
+ name: "none",
145368
+ value: "none"
145369
+ }
145370
+ ]
145371
+ };
145278
145372
  }
145279
145373
  });
145280
145374
 
@@ -145397,9 +145491,19 @@ async function setupAndLink(client2, path11, {
145397
145491
  localConfigurationOverrides
145398
145492
  );
145399
145493
  }
145400
- const vercelAuthSetting = await vercelAuth(client2, {
145401
- autoConfirm
145402
- });
145494
+ let changeAdditionalSettings = false;
145495
+ if (!autoConfirm) {
145496
+ changeAdditionalSettings = await client2.input.confirm(
145497
+ "Do you want to change additional project settings?",
145498
+ false
145499
+ );
145500
+ }
145501
+ let vercelAuthSetting = DEFAULT_VERCEL_AUTH_SETTING;
145502
+ if (changeAdditionalSettings) {
145503
+ vercelAuthSetting = await vercelAuth(client2, {
145504
+ autoConfirm
145505
+ });
145506
+ }
145403
145507
  if (rootDirectory) {
145404
145508
  settings.rootDirectory = rootDirectory;
145405
145509
  }
@@ -149242,6 +149346,7 @@ var init_deploy2 = __esm({
149242
149346
  init_output_manager();
149243
149347
  init_ensure_link();
149244
149348
  init_process_deployment();
149349
+ init_logs();
149245
149350
  deploy_default = async (client2) => {
149246
149351
  const telemetryClient = new DeployTelemetryClient({
149247
149352
  opts: {
@@ -149279,8 +149384,8 @@ var init_deploy2 = __esm({
149279
149384
  output_manager_default.warn("`--confirm` is deprecated, please use `--yes` instead");
149280
149385
  parsedArguments.flags["--yes"] = parsedArguments.flags["--confirm"];
149281
149386
  }
149282
- if ("--logs" in parsedArguments.flags) {
149283
- output_manager_default.warn("`--logs` is deprecated and now the default behavior.");
149387
+ if ("--no-logs" in parsedArguments.flags) {
149388
+ output_manager_default.warn("`--no-logs` is deprecated and now the default behavior.");
149284
149389
  }
149285
149390
  } catch (error4) {
149286
149391
  printError(error4);
@@ -149536,7 +149641,7 @@ var init_deploy2 = __esm({
149536
149641
  const deployStamp = stamp_default();
149537
149642
  let deployment = null;
149538
149643
  const noWait = !!parsedArguments.flags["--no-wait"];
149539
- const withLogs = "--no-logs" in parsedArguments.flags ? false : true;
149644
+ const withLogs = parsedArguments.flags["--logs"] ? true : false;
149540
149645
  const localConfigurationOverrides = pickOverrides(localConfig);
149541
149646
  const name = project.name;
149542
149647
  if (!name) {
@@ -149686,13 +149791,33 @@ ${err.stack}`);
149686
149791
  }
149687
149792
  if (err instanceof BuildError) {
149688
149793
  output_manager_default.error(err.message || "Build failed");
149689
- output_manager_default.log("\n");
149690
- output_manager_default.log(
149691
- `To check build logs run: ${getCommandName(
149692
- `inspect ${now.url} --logs`
149693
- )}`
149694
- );
149695
- output_manager_default.log(`Or inspect them in your browser at https://${now.url}/_logs`);
149794
+ output_manager_default.print("\n");
149795
+ if (withLogs === false) {
149796
+ try {
149797
+ if (now.url) {
149798
+ const failedDeployment = await getDeployment(
149799
+ client2,
149800
+ contextName,
149801
+ now.url
149802
+ );
149803
+ const { promise } = displayBuildLogs(
149804
+ client2,
149805
+ failedDeployment,
149806
+ false
149807
+ );
149808
+ await promise;
149809
+ }
149810
+ } catch (_) {
149811
+ output_manager_default.log(
149812
+ `To check build logs run: ${getCommandName(
149813
+ `inspect ${now.url} --logs`
149814
+ )}`
149815
+ );
149816
+ output_manager_default.log(
149817
+ `Or inspect them in your browser at https://${now.url}/_logs`
149818
+ );
149819
+ }
149820
+ }
149696
149821
  return 1;
149697
149822
  }
149698
149823
  if (isAPIError(err) && err.code === "size_limit_exceeded") {
@@ -166827,7 +166952,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
166827
166952
  if (src[0] === "/") {
166828
166953
  src = src.substring(1);
166829
166954
  }
166830
- if (buildConfig.config?.framework === "hono") {
166955
+ if (buildConfig.config?.framework === "hono" || buildConfig.config?.framework === "express") {
166831
166956
  src = "package.json";
166832
166957
  }
166833
166958
  const mapToEntrypoint = /* @__PURE__ */ new Map();
@@ -167302,7 +167427,8 @@ async function findBuildMatch(matches, files, requestPath, devServer, vercelConf
167302
167427
  requestPath,
167303
167428
  devServer,
167304
167429
  vercelConfig,
167305
- isFilesystem
167430
+ isFilesystem,
167431
+ !!bestIndexMatch
167306
167432
  )) {
167307
167433
  if (!isIndex(match.src)) {
167308
167434
  return match;
@@ -167316,7 +167442,7 @@ async function findBuildMatch(matches, files, requestPath, devServer, vercelConf
167316
167442
  }
167317
167443
  return bestIndexMatch || null;
167318
167444
  }
167319
- async function shouldServe2(match, files, requestPath, devServer, vercelConfig, isFilesystem = false) {
167445
+ async function shouldServe2(match, files, requestPath, devServer, vercelConfig, isFilesystem = false, hasMatched = false) {
167320
167446
  const {
167321
167447
  src,
167322
167448
  config: config2,
@@ -167339,7 +167465,8 @@ async function shouldServe2(match, files, requestPath, devServer, vercelConfig,
167339
167465
  files,
167340
167466
  config: config2 || {},
167341
167467
  requestPath,
167342
- workPath: devServer.cwd
167468
+ workPath: devServer.cwd,
167469
+ hasMatched
167343
167470
  });
167344
167471
  if (shouldServe3) {
167345
167472
  return true;
@@ -169215,7 +169342,7 @@ async function* refreshOidcToken(signal, client2, projectId, envValues, source,
169215
169342
  const now = clock();
169216
169343
  let expiresAfterMillis;
169217
169344
  try {
169218
- const { exp } = (0, import_jose2.decodeJwt)(oidcToken);
169345
+ const { exp } = (0, import_jose.decodeJwt)(oidcToken);
169219
169346
  expiresAfterMillis = exp !== void 0 ? exp * 1e3 - now : void 0;
169220
169347
  } catch (error3) {
169221
169348
  }
@@ -169279,12 +169406,12 @@ function clock() {
169279
169406
  function millisToSecs(millis) {
169280
169407
  return millis / 1e3;
169281
169408
  }
169282
- var import_promises4, import_jose2, import_ms15, import_perf_hooks, REFRESH_BEFORE_EXPIRY_MILLIS, THROTTLE_MILLIS;
169409
+ var import_promises4, import_jose, import_ms15, import_perf_hooks, REFRESH_BEFORE_EXPIRY_MILLIS, THROTTLE_MILLIS;
169283
169410
  var init_refresh_oidc_token = __esm({
169284
169411
  "src/util/env/refresh-oidc-token.ts"() {
169285
169412
  "use strict";
169286
169413
  import_promises4 = require("timers/promises");
169287
- import_jose2 = require("jose");
169414
+ import_jose = require("jose");
169288
169415
  import_ms15 = __toESM3(require_ms());
169289
169416
  import_perf_hooks = require("perf_hooks");
169290
169417
  init_output_manager();
@@ -178758,25 +178885,15 @@ async function login2(client2) {
178758
178885
  error3 = void 0;
178759
178886
  output_manager_default.print((0, import_ansi_escapes6.eraseLines)(2));
178760
178887
  const isInitialLogin = !client2.authConfig.token;
178761
- const [inspectError, payload] = inspectToken(tokens.access_token);
178762
- if (inspectError)
178763
- return inspectError;
178764
- output_manager_default.debug("access_token inspected");
178765
178888
  client2.updateAuthConfig({
178766
178889
  token: tokens.access_token,
178767
178890
  type: "oauth",
178768
- expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in
178891
+ expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in,
178892
+ refreshToken: tokens.refresh_token
178769
178893
  });
178770
- if (payload.team_id)
178771
- output_manager_default.debug("Current team updated");
178772
- else
178773
- output_manager_default.debug("Current team deleted");
178774
- client2.updateConfig({ currentTeam: payload.team_id });
178775
- if (tokens.refresh_token) {
178776
- client2.updateAuthConfig({ refreshToken: tokens.refresh_token });
178777
- }
178894
+ client2.updateConfig({ currentTeam: void 0 });
178778
178895
  if (isInitialLogin) {
178779
- await updateCurrentTeamAfterLogin(client2, client2.config.currentTeam);
178896
+ await updateCurrentTeamAfterLogin(client2);
178780
178897
  }
178781
178898
  client2.writeToAuthConfigFile();
178782
178899
  client2.writeToConfigFile();
@@ -184245,6 +184362,7 @@ var devinLocalPath = "/opt/.devin";
184245
184362
  var CURSOR = "cursor";
184246
184363
  var CLAUDE = "claude";
184247
184364
  var DEVIN = "devin";
184365
+ var REPLIT = "replit";
184248
184366
  async function determineAgent() {
184249
184367
  if (process.env.CURSOR_TRACE_ID) {
184250
184368
  return CURSOR;
@@ -184252,6 +184370,9 @@ async function determineAgent() {
184252
184370
  if (process.env.CLAUDE_CODE) {
184253
184371
  return CLAUDE;
184254
184372
  }
184373
+ if (process.env.REPL_ID) {
184374
+ return REPLIT;
184375
+ }
184255
184376
  try {
184256
184377
  await (0, import_promises.access)(devinLocalPath, import_node_fs.constants.F_OK);
184257
184378
  return DEVIN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "44.7.2",
3
+ "version": "45.0.8",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -22,18 +22,19 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@vercel/blob": "1.0.2",
25
- "@vercel/build-utils": "11.0.0",
25
+ "@vercel/build-utils": "11.0.1",
26
26
  "@vercel/fun": "1.1.6",
27
- "@vercel/go": "3.2.2",
28
- "@vercel/hono": "0.0.9",
27
+ "@vercel/go": "3.2.3",
28
+ "@vercel/express": "0.0.5",
29
+ "@vercel/hono": "0.0.13",
29
30
  "@vercel/hydrogen": "1.2.3",
30
- "@vercel/next": "4.11.0",
31
- "@vercel/node": "5.3.11",
31
+ "@vercel/next": "4.11.2",
32
+ "@vercel/node": "5.3.12",
32
33
  "@vercel/python": "5.0.0",
33
34
  "@vercel/redwood": "2.3.4",
34
35
  "@vercel/remix-builder": "5.4.10",
35
36
  "@vercel/ruby": "2.2.1",
36
- "@vercel/static-build": "2.7.17",
37
+ "@vercel/static-build": "2.7.18",
37
38
  "chokidar": "4.0.0",
38
39
  "jose": "5.9.6"
39
40
  },
@@ -80,7 +81,7 @@
80
81
  "@types/which": "3.0.0",
81
82
  "@types/write-json-file": "2.2.1",
82
83
  "@types/yauzl-promise": "2.1.0",
83
- "@vercel/client": "15.3.13",
84
+ "@vercel/client": "15.3.14",
84
85
  "@vercel/error-utils": "2.0.3",
85
86
  "@vercel/frameworks": "3.7.6",
86
87
  "@vercel/fs-detectors": "5.4.12",
@@ -163,8 +164,8 @@
163
164
  "write-json-file": "2.2.0",
164
165
  "xdg-app-paths": "5.1.0",
165
166
  "yauzl-promise": "2.1.3",
166
- "@vercel-internals/constants": "1.0.4",
167
167
  "@vercel-internals/get-package-json": "1.0.0",
168
+ "@vercel-internals/constants": "1.0.4",
168
169
  "@vercel-internals/types": "3.0.6"
169
170
  },
170
171
  "scripts": {