vercel 28.2.4 → 28.2.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 +40 -12
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -216660,6 +216660,28 @@ exports.monorepoManagers = [
216660
216660
  ],
216661
216661
  },
216662
216662
  },
216663
+ {
216664
+ name: 'Nx',
216665
+ slug: 'nx',
216666
+ detectors: {
216667
+ every: [
216668
+ {
216669
+ path: 'nx.json',
216670
+ },
216671
+ ],
216672
+ },
216673
+ },
216674
+ {
216675
+ name: 'Rush',
216676
+ slug: 'rush',
216677
+ detectors: {
216678
+ every: [
216679
+ {
216680
+ path: 'rush.json',
216681
+ },
216682
+ ],
216683
+ },
216684
+ },
216663
216685
  ];
216664
216686
  exports.default = exports.monorepoManagers;
216665
216687
  //# sourceMappingURL=monorepo-managers.js.map
@@ -239105,8 +239127,7 @@ class DevServer {
239105
239127
  if ((0, is_url_1.default)(rewritePath)) {
239106
239128
  const rewriteUrlParsed = new url_1.URL(rewritePath);
239107
239129
  // `this.address` already has localhost normalized from ip4 and ip6 values
239108
- const devServerParsed = new url_1.URL(this.address);
239109
- if (devServerParsed.origin === rewriteUrlParsed.origin) {
239130
+ if (this.address.origin === rewriteUrlParsed.origin) {
239110
239131
  // remove origin, leaving the path
239111
239132
  req.url =
239112
239133
  rewritePath.slice(rewriteUrlParsed.origin.length) || '/';
@@ -239479,7 +239500,6 @@ class DevServer {
239479
239500
  this.systemEnvValues = options.systemEnvValues || [];
239480
239501
  this.projectEnvs = options.projectEnvs || [];
239481
239502
  this.files = {};
239482
- this.address = '';
239483
239503
  this.originalProjectSettings = options.projectSettings;
239484
239504
  this.projectSettings = options.projectSettings;
239485
239505
  this.caseSensitive = false;
@@ -239512,6 +239532,12 @@ class DevServer {
239512
239532
  this.podId = Math.random().toString(32).slice(-5);
239513
239533
  this.devServerPids = new Set();
239514
239534
  }
239535
+ get address() {
239536
+ if (!this._address) {
239537
+ throw new Error('Invalid access to `address` because `start` has not yet populated `this.address`.');
239538
+ }
239539
+ return this._address;
239540
+ }
239515
239541
  async exit(code = 1) {
239516
239542
  await this.stop(code);
239517
239543
  process.exit(code);
@@ -239873,7 +239899,7 @@ class DevServer {
239873
239899
  let allEnv = { ...buildEnv, ...runEnv };
239874
239900
  // If no .env/.build.env is present, use cloud environment variables
239875
239901
  if (Object.keys(allEnv).length === 0) {
239876
- const cloudEnv = (0, expose_system_envs_1.default)(this.projectEnvs || [], this.systemEnvValues || [], this.projectSettings?.autoExposeSystemEnvs, new url_1.URL(this.address).host);
239902
+ const cloudEnv = (0, expose_system_envs_1.default)(this.projectEnvs || [], this.systemEnvValues || [], this.projectSettings?.autoExposeSystemEnvs, this.address.host);
239877
239903
  allEnv = { ...cloudEnv };
239878
239904
  runEnv = { ...cloudEnv };
239879
239905
  buildEnv = { ...cloudEnv };
@@ -239978,7 +240004,7 @@ class DevServer {
239978
240004
  injectSystemValuesInDotenv(env) {
239979
240005
  for (const name of Object.keys(env)) {
239980
240006
  if (name === 'VERCEL_URL') {
239981
- env['VERCEL_URL'] = new url_1.URL(this.address).host;
240007
+ env['VERCEL_URL'] = this.address.host;
239982
240008
  }
239983
240009
  else if (name === 'VERCEL_REGION') {
239984
240010
  env['VERCEL_REGION'] = 'dev1';
@@ -240039,9 +240065,7 @@ class DevServer {
240039
240065
  }
240040
240066
  }
240041
240067
  }
240042
- this.address = address
240043
- .replace('[::]', 'localhost')
240044
- .replace('127.0.0.1', 'localhost');
240068
+ this._address = new url_1.URL(address.replace('[::]', 'localhost').replace('127.0.0.1', 'localhost'));
240045
240069
  const vercelConfig = await this.getVercelConfig();
240046
240070
  const devCommandPromise = this.runDevCommand();
240047
240071
  const files = await (0, get_files_1.staticFiles)(this.cwd, { output: this.output });
@@ -240123,7 +240147,12 @@ class DevServer {
240123
240147
  this.proxy.ws(req, socket, head, { target });
240124
240148
  });
240125
240149
  await devCommandPromise;
240126
- this.output.ready(`Available at ${(0, link_1.default)(this.address)}`);
240150
+ let addressFormatted = this.address.toString();
240151
+ if (this.address.pathname === '/' && this.address.protocol === 'http:') {
240152
+ // log address without trailing slash to maintain backwards compatibility
240153
+ addressFormatted = addressFormatted.replace(/\/$/, '');
240154
+ }
240155
+ this.output.ready(`Available at ${(0, link_1.default)(addressFormatted)}`);
240127
240156
  }
240128
240157
  /**
240129
240158
  * Shuts down the `vercel dev` server, and cleans up any temporary resources.
@@ -240487,7 +240516,6 @@ class DevServer {
240487
240516
  }
240488
240517
  }
240489
240518
  this.output.debug(`Spawning dev command: ${command}`);
240490
- const devPort = new url_1.URL(this.address).port;
240491
240519
  const proxyPort = new RegExp(port.toString(), 'g');
240492
240520
  const p = (0, build_utils_1.spawnCommand)(command, {
240493
240521
  stdio: ['inherit', 'pipe', 'pipe'],
@@ -240501,7 +240529,7 @@ class DevServer {
240501
240529
  p.stderr.pipe(process.stderr);
240502
240530
  p.stdout.setEncoding('utf8');
240503
240531
  p.stdout.on('data', (data) => {
240504
- process.stdout.write(data.replace(proxyPort, devPort));
240532
+ process.stdout.write(data.replace(proxyPort, this.address.port));
240505
240533
  });
240506
240534
  p.on('exit', (code, signal) => {
240507
240535
  this.output.debug(`Dev command exited with "${signal || code}"`);
@@ -249500,7 +249528,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source
249500
249528
  /***/ ((module) => {
249501
249529
 
249502
249530
  "use strict";
249503
- module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.2.4\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest --env node --verbose --runInBand --bail --forceExit\",\"test-unit\":\"yarn test test/unit/\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"yarn test test/dev/\",\"coverage\":\"codecov\",\"build\":\"ts-node ./scripts/build.ts\",\"dev\":\"ts-node ./src/index.ts\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 14\"},\"dependencies\":{\"@vercel/build-utils\":\"5.4.2\",\"@vercel/go\":\"2.2.5\",\"@vercel/hydrogen\":\"0.0.18\",\"@vercel/next\":\"3.1.25\",\"@vercel/node\":\"2.5.14\",\"@vercel/python\":\"3.1.14\",\"@vercel/redwood\":\"1.0.23\",\"@vercel/remix\":\"1.0.24\",\"@vercel/ruby\":\"1.3.31\",\"@vercel/static-build\":\"1.0.23\",\"update-notifier\":\"5.1.0\"},\"devDependencies\":{\"@alex_neo/jest-expect-message\":\"1.0.5\",\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@swc/core\":\"1.2.218\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/ini\":\"1.3.31\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.4.1\",\"@types/jest-expect-message\":\"1.0.3\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/psl\":\"1.1.0\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@types/yauzl-promise\":\"2.1.0\",\"@vercel/client\":\"12.2.4\",\"@vercel/frameworks\":\"1.1.5\",\"@vercel/fs-detectors\":\"3.1.0\",\"@vercel/fun\":\"1.0.4\",\"@vercel/ncc\":\"0.24.0\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"boxen\":\"4.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"git-last-commit\":\"1.0.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"ini\":\"3.0.0\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.1.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jsonlines\":\"0.1.1\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.7\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.4.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"5.2.0\",\"stripe\":\"5.1.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-node\":\"10.9.1\",\"typescript\":\"4.7.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\",\"yauzl-promise\":\"2.1.3\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"setupFilesAfterEnv\":[\"@alex_neo/jest-expect-message\"],\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]}}");
249531
+ module.exports = JSON.parse("{\"name\":\"vercel\",\"version\":\"28.2.5\",\"preferGlobal\":true,\"license\":\"Apache-2.0\",\"description\":\"The command-line interface for Vercel\",\"homepage\":\"https://vercel.com\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vercel/vercel.git\",\"directory\":\"packages/cli\"},\"scripts\":{\"preinstall\":\"node ./scripts/preinstall.js\",\"test\":\"jest --env node --verbose --runInBand --bail --forceExit\",\"test-unit\":\"yarn test test/unit/\",\"test-integration-cli\":\"rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose\",\"test-integration-dev\":\"yarn test test/dev/\",\"coverage\":\"codecov\",\"build\":\"ts-node ./scripts/build.ts\",\"dev\":\"ts-node ./src/index.ts\"},\"bin\":{\"vc\":\"./dist/index.js\",\"vercel\":\"./dist/index.js\"},\"files\":[\"dist\",\"scripts/preinstall.js\"],\"ava\":{\"extensions\":[\"ts\"],\"require\":[\"ts-node/register/transpile-only\",\"esm\"]},\"engines\":{\"node\":\">= 14\"},\"dependencies\":{\"@vercel/build-utils\":\"5.4.2\",\"@vercel/go\":\"2.2.5\",\"@vercel/hydrogen\":\"0.0.18\",\"@vercel/next\":\"3.1.25\",\"@vercel/node\":\"2.5.14\",\"@vercel/python\":\"3.1.14\",\"@vercel/redwood\":\"1.0.23\",\"@vercel/remix\":\"1.0.24\",\"@vercel/ruby\":\"1.3.31\",\"@vercel/static-build\":\"1.0.23\",\"update-notifier\":\"5.1.0\"},\"devDependencies\":{\"@alex_neo/jest-expect-message\":\"1.0.5\",\"@next/env\":\"11.1.2\",\"@sentry/node\":\"5.5.0\",\"@sindresorhus/slugify\":\"0.11.0\",\"@swc/core\":\"1.2.218\",\"@tootallnate/once\":\"1.1.2\",\"@types/ansi-escapes\":\"3.0.0\",\"@types/ansi-regex\":\"4.0.0\",\"@types/async-retry\":\"1.2.1\",\"@types/bytes\":\"3.0.0\",\"@types/chance\":\"1.1.3\",\"@types/debug\":\"0.0.31\",\"@types/dotenv\":\"6.1.1\",\"@types/escape-html\":\"0.0.20\",\"@types/express\":\"4.17.13\",\"@types/fs-extra\":\"9.0.13\",\"@types/glob\":\"7.1.1\",\"@types/http-proxy\":\"1.16.2\",\"@types/ini\":\"1.3.31\",\"@types/inquirer\":\"7.3.1\",\"@types/jest\":\"27.4.1\",\"@types/jest-expect-message\":\"1.0.3\",\"@types/load-json-file\":\"2.0.7\",\"@types/mime-types\":\"2.1.0\",\"@types/minimatch\":\"3.0.3\",\"@types/mri\":\"1.1.0\",\"@types/ms\":\"0.7.30\",\"@types/node\":\"11.11.0\",\"@types/node-fetch\":\"2.5.10\",\"@types/npm-package-arg\":\"6.1.0\",\"@types/pluralize\":\"0.0.29\",\"@types/psl\":\"1.1.0\",\"@types/semver\":\"6.0.1\",\"@types/tar-fs\":\"1.16.1\",\"@types/text-table\":\"0.2.0\",\"@types/title\":\"3.4.1\",\"@types/universal-analytics\":\"0.4.2\",\"@types/update-notifier\":\"5.1.0\",\"@types/which\":\"1.3.2\",\"@types/write-json-file\":\"2.2.1\",\"@types/yauzl-promise\":\"2.1.0\",\"@vercel/client\":\"12.2.4\",\"@vercel/frameworks\":\"1.1.5\",\"@vercel/fs-detectors\":\"3.2.0\",\"@vercel/fun\":\"1.0.4\",\"@vercel/ncc\":\"0.24.0\",\"@zeit/source-map-support\":\"0.6.2\",\"ajv\":\"6.12.2\",\"alpha-sort\":\"2.0.1\",\"ansi-escapes\":\"3.0.0\",\"ansi-regex\":\"3.0.0\",\"arg\":\"5.0.0\",\"async-listen\":\"1.2.0\",\"async-retry\":\"1.1.3\",\"async-sema\":\"2.1.4\",\"ava\":\"2.2.0\",\"boxen\":\"4.2.0\",\"bytes\":\"3.0.0\",\"chalk\":\"4.1.0\",\"chance\":\"1.1.7\",\"chokidar\":\"3.3.1\",\"codecov\":\"3.8.2\",\"cpy\":\"7.2.0\",\"date-fns\":\"1.29.0\",\"debug\":\"3.1.0\",\"dot\":\"1.1.3\",\"dotenv\":\"4.0.0\",\"email-prompt\":\"0.3.2\",\"email-validator\":\"1.1.1\",\"epipebomb\":\"1.0.0\",\"escape-html\":\"1.0.3\",\"esm\":\"3.1.4\",\"execa\":\"3.2.0\",\"express\":\"4.17.1\",\"fast-deep-equal\":\"3.1.3\",\"fs-extra\":\"10.0.0\",\"get-port\":\"5.1.1\",\"git-last-commit\":\"1.0.1\",\"glob\":\"7.1.2\",\"http-proxy\":\"1.18.1\",\"ini\":\"3.0.0\",\"inquirer\":\"7.0.4\",\"is-docker\":\"2.2.1\",\"is-port-reachable\":\"3.1.0\",\"is-url\":\"1.2.2\",\"jaro-winkler\":\"0.2.8\",\"jsonlines\":\"0.1.1\",\"load-json-file\":\"3.0.0\",\"mime-types\":\"2.1.24\",\"minimatch\":\"3.0.4\",\"mri\":\"1.1.5\",\"ms\":\"2.1.2\",\"node-fetch\":\"2.6.7\",\"npm-package-arg\":\"6.1.0\",\"open\":\"8.4.0\",\"ora\":\"3.4.0\",\"pcre-to-regexp\":\"1.0.0\",\"pluralize\":\"7.0.0\",\"promisepipe\":\"3.0.0\",\"psl\":\"1.1.31\",\"qr-image\":\"3.2.0\",\"raw-body\":\"2.4.1\",\"rimraf\":\"3.0.2\",\"semver\":\"5.5.0\",\"serve-handler\":\"6.1.1\",\"strip-ansi\":\"5.2.0\",\"stripe\":\"5.1.0\",\"tar-fs\":\"1.16.3\",\"test-listen\":\"1.1.0\",\"text-table\":\"0.2.0\",\"title\":\"3.4.1\",\"tmp-promise\":\"1.0.3\",\"tree-kill\":\"1.2.2\",\"ts-node\":\"10.9.1\",\"typescript\":\"4.7.4\",\"universal-analytics\":\"0.4.20\",\"utility-types\":\"2.1.0\",\"which\":\"2.0.2\",\"write-json-file\":\"2.2.0\",\"xdg-app-paths\":\"5.1.0\",\"yauzl-promise\":\"2.1.3\"},\"jest\":{\"preset\":\"ts-jest\",\"globals\":{\"ts-jest\":{\"diagnostics\":false,\"isolatedModules\":true}},\"setupFilesAfterEnv\":[\"@alex_neo/jest-expect-message\"],\"verbose\":false,\"testEnvironment\":\"node\",\"testMatch\":[\"<rootDir>/test/**/*.test.ts\"]}}");
249504
249532
 
249505
249533
  /***/ }),
249506
249534
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "28.2.4",
3
+ "version": "28.2.5",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -97,7 +97,7 @@
97
97
  "@types/yauzl-promise": "2.1.0",
98
98
  "@vercel/client": "12.2.4",
99
99
  "@vercel/frameworks": "1.1.5",
100
- "@vercel/fs-detectors": "3.1.0",
100
+ "@vercel/fs-detectors": "3.2.0",
101
101
  "@vercel/fun": "1.0.4",
102
102
  "@vercel/ncc": "0.24.0",
103
103
  "@zeit/source-map-support": "0.6.2",
@@ -193,5 +193,5 @@
193
193
  "<rootDir>/test/**/*.test.ts"
194
194
  ]
195
195
  },
196
- "gitHead": "8b3c52b9e8cbf7de7fc51f76975374c4bb2fad56"
196
+ "gitHead": "b5c3610113da7fedcba994151da5565584ca2023"
197
197
  }