vercel 29.0.2 → 29.1.0

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 +65 -125
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -44284,107 +44284,6 @@ var eos = function(stream, opts, callback) {
44284
44284
  module.exports = eos;
44285
44285
 
44286
44286
 
44287
- /***/ }),
44288
-
44289
- /***/ 68912:
44290
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
44291
-
44292
- var once = __webpack_require__(11924);
44293
-
44294
- var noop = function() {};
44295
-
44296
- var isRequest = function(stream) {
44297
- return stream.setHeader && typeof stream.abort === 'function';
44298
- };
44299
-
44300
- var isChildProcess = function(stream) {
44301
- return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
44302
- };
44303
-
44304
- var eos = function(stream, opts, callback) {
44305
- if (typeof opts === 'function') return eos(stream, null, opts);
44306
- if (!opts) opts = {};
44307
-
44308
- callback = once(callback || noop);
44309
-
44310
- var ws = stream._writableState;
44311
- var rs = stream._readableState;
44312
- var readable = opts.readable || (opts.readable !== false && stream.readable);
44313
- var writable = opts.writable || (opts.writable !== false && stream.writable);
44314
- var cancelled = false;
44315
-
44316
- var onlegacyfinish = function() {
44317
- if (!stream.writable) onfinish();
44318
- };
44319
-
44320
- var onfinish = function() {
44321
- writable = false;
44322
- if (!readable) callback.call(stream);
44323
- };
44324
-
44325
- var onend = function() {
44326
- readable = false;
44327
- if (!writable) callback.call(stream);
44328
- };
44329
-
44330
- var onexit = function(exitCode) {
44331
- callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
44332
- };
44333
-
44334
- var onerror = function(err) {
44335
- callback.call(stream, err);
44336
- };
44337
-
44338
- var onclose = function() {
44339
- process.nextTick(onclosenexttick);
44340
- };
44341
-
44342
- var onclosenexttick = function() {
44343
- if (cancelled) return;
44344
- if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
44345
- if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
44346
- };
44347
-
44348
- var onrequest = function() {
44349
- stream.req.on('finish', onfinish);
44350
- };
44351
-
44352
- if (isRequest(stream)) {
44353
- stream.on('complete', onfinish);
44354
- stream.on('abort', onclose);
44355
- if (stream.req) onrequest();
44356
- else stream.on('request', onrequest);
44357
- } else if (writable && !ws) { // legacy streams
44358
- stream.on('end', onlegacyfinish);
44359
- stream.on('close', onlegacyfinish);
44360
- }
44361
-
44362
- if (isChildProcess(stream)) stream.on('exit', onexit);
44363
-
44364
- stream.on('end', onend);
44365
- stream.on('finish', onfinish);
44366
- if (opts.error !== false) stream.on('error', onerror);
44367
- stream.on('close', onclose);
44368
-
44369
- return function() {
44370
- cancelled = true;
44371
- stream.removeListener('complete', onfinish);
44372
- stream.removeListener('abort', onclose);
44373
- stream.removeListener('request', onrequest);
44374
- if (stream.req) stream.req.removeListener('finish', onfinish);
44375
- stream.removeListener('end', onlegacyfinish);
44376
- stream.removeListener('close', onlegacyfinish);
44377
- stream.removeListener('finish', onfinish);
44378
- stream.removeListener('exit', onexit);
44379
- stream.removeListener('end', onend);
44380
- stream.removeListener('error', onerror);
44381
- stream.removeListener('close', onclose);
44382
- };
44383
- };
44384
-
44385
- module.exports = eos;
44386
-
44387
-
44388
44287
  /***/ }),
44389
44288
 
44390
44289
  /***/ 25140:
@@ -55409,7 +55308,7 @@ module.exports = {
55409
55308
  "use strict";
55410
55309
 
55411
55310
 
55412
- const fs = __webpack_require__(41317)
55311
+ const fs = __webpack_require__(57156)
55413
55312
  const path = __webpack_require__(85622)
55414
55313
  const mkdirpSync = __webpack_require__(58148).mkdirsSync
55415
55314
  const utimesSync = __webpack_require__(48493).utimesMillisSync
@@ -55594,7 +55493,7 @@ module.exports = {
55594
55493
  "use strict";
55595
55494
 
55596
55495
 
55597
- const fs = __webpack_require__(41317)
55496
+ const fs = __webpack_require__(57156)
55598
55497
  const path = __webpack_require__(85622)
55599
55498
  const mkdirp = __webpack_require__(58148).mkdirs
55600
55499
  const pathExists = __webpack_require__(42643).pathExists
@@ -55829,7 +55728,7 @@ module.exports = {
55829
55728
 
55830
55729
 
55831
55730
  const u = __webpack_require__(21967)/* .fromCallback */ .E
55832
- const fs = __webpack_require__(41317)
55731
+ const fs = __webpack_require__(57156)
55833
55732
  const path = __webpack_require__(85622)
55834
55733
  const mkdir = __webpack_require__(58148)
55835
55734
  const remove = __webpack_require__(80764)
@@ -55886,7 +55785,7 @@ module.exports = {
55886
55785
 
55887
55786
  const u = __webpack_require__(21967)/* .fromCallback */ .E
55888
55787
  const path = __webpack_require__(85622)
55889
- const fs = __webpack_require__(41317)
55788
+ const fs = __webpack_require__(57156)
55890
55789
  const mkdir = __webpack_require__(58148)
55891
55790
  const pathExists = __webpack_require__(42643).pathExists
55892
55791
 
@@ -55974,7 +55873,7 @@ module.exports = {
55974
55873
 
55975
55874
  const u = __webpack_require__(21967)/* .fromCallback */ .E
55976
55875
  const path = __webpack_require__(85622)
55977
- const fs = __webpack_require__(41317)
55876
+ const fs = __webpack_require__(57156)
55978
55877
  const mkdir = __webpack_require__(58148)
55979
55878
  const pathExists = __webpack_require__(42643).pathExists
55980
55879
 
@@ -56042,7 +55941,7 @@ module.exports = {
56042
55941
 
56043
55942
 
56044
55943
  const path = __webpack_require__(85622)
56045
- const fs = __webpack_require__(41317)
55944
+ const fs = __webpack_require__(57156)
56046
55945
  const pathExists = __webpack_require__(42643).pathExists
56047
55946
 
56048
55947
  /**
@@ -56148,7 +56047,7 @@ module.exports = {
56148
56047
  "use strict";
56149
56048
 
56150
56049
 
56151
- const fs = __webpack_require__(41317)
56050
+ const fs = __webpack_require__(57156)
56152
56051
 
56153
56052
  function symlinkType (srcpath, type, callback) {
56154
56053
  callback = (typeof type === 'function') ? type : callback
@@ -56189,7 +56088,7 @@ module.exports = {
56189
56088
 
56190
56089
  const u = __webpack_require__(21967)/* .fromCallback */ .E
56191
56090
  const path = __webpack_require__(85622)
56192
- const fs = __webpack_require__(41317)
56091
+ const fs = __webpack_require__(57156)
56193
56092
  const _mkdirs = __webpack_require__(58148)
56194
56093
  const mkdirs = _mkdirs.mkdirs
56195
56094
  const mkdirsSync = _mkdirs.mkdirsSync
@@ -56260,7 +56159,7 @@ module.exports = {
56260
56159
  // This is adapted from https://github.com/normalize/mz
56261
56160
  // Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
56262
56161
  const u = __webpack_require__(21967)/* .fromCallback */ .E
56263
- const fs = __webpack_require__(41317)
56162
+ const fs = __webpack_require__(57156)
56264
56163
 
56265
56164
  const api = [
56266
56165
  'access',
@@ -56455,7 +56354,7 @@ module.exports = {
56455
56354
  "use strict";
56456
56355
 
56457
56356
 
56458
- const fs = __webpack_require__(41317)
56357
+ const fs = __webpack_require__(57156)
56459
56358
  const path = __webpack_require__(85622)
56460
56359
  const mkdir = __webpack_require__(58148)
56461
56360
  const jsonFile = __webpack_require__(57495)
@@ -56538,7 +56437,7 @@ module.exports = {
56538
56437
  "use strict";
56539
56438
 
56540
56439
 
56541
- const fs = __webpack_require__(41317)
56440
+ const fs = __webpack_require__(57156)
56542
56441
  const path = __webpack_require__(85622)
56543
56442
  const invalidWin32Path = __webpack_require__(96811).invalidWin32Path
56544
56443
 
@@ -56600,7 +56499,7 @@ module.exports = mkdirsSync
56600
56499
  "use strict";
56601
56500
 
56602
56501
 
56603
- const fs = __webpack_require__(41317)
56502
+ const fs = __webpack_require__(57156)
56604
56503
  const path = __webpack_require__(85622)
56605
56504
  const invalidWin32Path = __webpack_require__(96811).invalidWin32Path
56606
56505
 
@@ -56717,7 +56616,7 @@ module.exports = {
56717
56616
  "use strict";
56718
56617
 
56719
56618
 
56720
- const fs = __webpack_require__(41317)
56619
+ const fs = __webpack_require__(57156)
56721
56620
  const path = __webpack_require__(85622)
56722
56621
  const copySync = __webpack_require__(2732).copySync
56723
56622
  const removeSync = __webpack_require__(80764).removeSync
@@ -56786,7 +56685,7 @@ module.exports = {
56786
56685
  "use strict";
56787
56686
 
56788
56687
 
56789
- const fs = __webpack_require__(41317)
56688
+ const fs = __webpack_require__(57156)
56790
56689
  const path = __webpack_require__(85622)
56791
56690
  const copy = __webpack_require__(44463).copy
56792
56691
  const remove = __webpack_require__(80764).remove
@@ -56860,7 +56759,7 @@ module.exports = move
56860
56759
 
56861
56760
 
56862
56761
  const u = __webpack_require__(21967)/* .fromCallback */ .E
56863
- const fs = __webpack_require__(41317)
56762
+ const fs = __webpack_require__(57156)
56864
56763
  const path = __webpack_require__(85622)
56865
56764
  const mkdir = __webpack_require__(58148)
56866
56765
  const pathExists = __webpack_require__(42643).pathExists
@@ -56944,7 +56843,7 @@ module.exports = {
56944
56843
  "use strict";
56945
56844
 
56946
56845
 
56947
- const fs = __webpack_require__(41317)
56846
+ const fs = __webpack_require__(57156)
56948
56847
  const path = __webpack_require__(85622)
56949
56848
  const assert = __webpack_require__(42357)
56950
56849
 
@@ -57286,7 +57185,7 @@ module.exports = function (size) {
57286
57185
  "use strict";
57287
57186
 
57288
57187
 
57289
- const fs = __webpack_require__(41317)
57188
+ const fs = __webpack_require__(57156)
57290
57189
  const path = __webpack_require__(85622)
57291
57190
 
57292
57191
  const NODE_VERSION_MAJOR_WITH_BIGINT = 10
@@ -57466,7 +57365,7 @@ module.exports = {
57466
57365
  "use strict";
57467
57366
 
57468
57367
 
57469
- const fs = __webpack_require__(41317)
57368
+ const fs = __webpack_require__(57156)
57470
57369
  const os = __webpack_require__(12087)
57471
57370
  const path = __webpack_require__(85622)
57472
57371
 
@@ -124227,7 +124126,7 @@ exports.isValid = function (domain) {
124227
124126
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
124228
124127
 
124229
124128
  var once = __webpack_require__(11924)
124230
- var eos = __webpack_require__(68912)
124129
+ var eos = __webpack_require__(11235)
124231
124130
  var fs = __webpack_require__(35747) // we only need fs to get the ReadStream and WriteStream prototypes
124232
124131
 
124233
124132
  var noop = function () {}
@@ -164416,7 +164315,7 @@ exports.pack = __webpack_require__(62667)
164416
164315
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
164417
164316
 
164418
164317
  var constants = __webpack_require__(73061)
164419
- var eos = __webpack_require__(68912)
164318
+ var eos = __webpack_require__(11235)
164420
164319
  var util = __webpack_require__(31669)
164421
164320
  var alloc = __webpack_require__(47343)
164422
164321
  var toBuffer = __webpack_require__(97740)
@@ -187884,6 +187783,37 @@ exports.frameworks = [
187884
187783
  },
187885
187784
  ],
187886
187785
  },
187786
+ {
187787
+ name: 'Storybook',
187788
+ slug: 'storybook',
187789
+ logo: 'https://api-frameworks.vercel.sh/framework-logos/storybook.svg',
187790
+ tagline: 'Frontend workshop for UI development',
187791
+ description: 'Storybook is a frontend workshop for building UI components and pages in isolation.',
187792
+ website: 'https://storybook.js.org',
187793
+ ignoreRuntimes: ['@vercel/next', '@vercel/node'],
187794
+ disableRootMiddleware: true,
187795
+ detectors: {
187796
+ every: [
187797
+ {
187798
+ matchPackage: 'storybook',
187799
+ },
187800
+ ],
187801
+ },
187802
+ settings: {
187803
+ installCommand: {
187804
+ placeholder: '`yarn install`, `pnpm install`, or `npm install`',
187805
+ },
187806
+ buildCommand: {
187807
+ value: 'storybook build',
187808
+ },
187809
+ devCommand: {
187810
+ value: `storybook dev -p $PORT`,
187811
+ },
187812
+ outputDirectory: {
187813
+ value: 'storybook-static',
187814
+ },
187815
+ },
187816
+ },
187887
187817
  {
187888
187818
  name: 'Other',
187889
187819
  slug: null,
@@ -188062,10 +187992,15 @@ async function detectBuilders(files, pkg, options = {}) {
188062
187992
  const absolutePathCache = new Map();
188063
187993
  const { projectSettings = {} } = options;
188064
187994
  const { buildCommand, outputDirectory, framework } = projectSettings;
188065
- const ignoreRuntimes = new Set(slugToFramework.get(framework || '')?.ignoreRuntimes);
187995
+ const frameworkConfig = slugToFramework.get(framework || '');
187996
+ const ignoreRuntimes = new Set(frameworkConfig?.ignoreRuntimes);
188066
187997
  const withTag = options.tag ? `@${options.tag}` : '';
188067
187998
  const apiMatches = getApiMatches()
188068
- .filter(b => !ignoreRuntimes.has(b.use))
187999
+ .filter(b =>
188000
+ // Root-level middleware is enabled, unless `disableRootMiddleware: true`
188001
+ (b.config?.middleware && !frameworkConfig?.disableRootMiddleware) ||
188002
+ // "api" dir runtimes are enabled, unless opted-out via `ignoreRuntimes`
188003
+ !ignoreRuntimes.has(b.use))
188069
188004
  .map(b => {
188070
188005
  b.use = `${b.use}${withTag}`;
188071
188006
  return b;
@@ -188292,7 +188227,11 @@ function getFunction(fileName, { functions = {} }) {
188292
188227
  function getApiMatches() {
188293
188228
  const config = { zeroConfig: true };
188294
188229
  return [
188295
- { src: 'middleware.[jt]s', use: `@vercel/node`, config },
188230
+ {
188231
+ src: 'middleware.[jt]s',
188232
+ use: `@vercel/node`,
188233
+ config: { ...config, middleware: true },
188234
+ },
188296
188235
  { src: 'api/**/*.+(js|mjs|ts|tsx)', use: `@vercel/node`, config },
188297
188236
  { src: 'api/**/!(*_test).go', use: `@vercel/go`, config },
188298
188237
  { src: 'api/**/*.py', use: `@vercel/python`, config },
@@ -188327,7 +188266,8 @@ function detectFrontBuilder(pkg, files, usedFunctions, fallbackEntrypoint, optio
188327
188266
  config.outputDirectory = projectSettings.outputDirectory;
188328
188267
  }
188329
188268
  if (pkg &&
188330
- (framework === undefined || createdAt < Date.parse('2020-03-01'))) {
188269
+ (framework === undefined ||
188270
+ (framework !== 'storybook' && createdAt < Date.parse('2020-03-01')))) {
188331
188271
  const deps = {
188332
188272
  ...pkg.dependencies,
188333
188273
  ...pkg.devDependencies,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "29.0.2",
3
+ "version": "29.1.0",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -35,13 +35,13 @@
35
35
  "@vercel/build-utils": "6.7.2",
36
36
  "@vercel/go": "2.5.1",
37
37
  "@vercel/hydrogen": "0.0.64",
38
- "@vercel/next": "3.8.1",
39
- "@vercel/node": "2.14.0",
38
+ "@vercel/next": "3.8.2",
39
+ "@vercel/node": "2.14.1",
40
40
  "@vercel/python": "3.1.60",
41
41
  "@vercel/redwood": "1.1.15",
42
- "@vercel/remix-builder": "1.8.6",
42
+ "@vercel/remix-builder": "1.8.7",
43
43
  "@vercel/ruby": "1.3.76",
44
- "@vercel/static-build": "1.3.27"
44
+ "@vercel/static-build": "1.3.28"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -89,8 +89,8 @@
89
89
  "@vercel-internals/types": "*",
90
90
  "@vercel/client": "12.4.12",
91
91
  "@vercel/error-utils": "1.0.10",
92
- "@vercel/frameworks": "1.3.5",
93
- "@vercel/fs-detectors": "3.8.13",
92
+ "@vercel/frameworks": "1.4.0",
93
+ "@vercel/fs-detectors": "3.9.0",
94
94
  "@vercel/fun": "1.0.4",
95
95
  "@vercel/ncc": "0.24.0",
96
96
  "@vercel/routing-utils": "2.2.1",
@@ -169,5 +169,5 @@
169
169
  "xdg-app-paths": "5.1.0",
170
170
  "yauzl-promise": "2.1.3"
171
171
  },
172
- "gitHead": "85947b658ee1b4b3b7fcb631bdc6e591ee1e338a"
172
+ "gitHead": "672c1681cc453744e30f985d3e532111d4d7b120"
173
173
  }