@vercel/static-build 1.0.38 → 1.0.40

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 +207 -7
  2. package/package.json +5 -4
package/dist/index.js CHANGED
@@ -187104,6 +187104,132 @@ module.exports = function(num) {
187104
187104
  };
187105
187105
 
187106
187106
 
187107
+ /***/ }),
187108
+
187109
+ /***/ 3255:
187110
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
187111
+
187112
+ "use strict";
187113
+
187114
+
187115
+ var childProcess = __webpack_require__(3129);
187116
+ var spawn = childProcess.spawn;
187117
+ var exec = childProcess.exec;
187118
+
187119
+ module.exports = function (pid, signal, callback) {
187120
+ if (typeof signal === 'function' && callback === undefined) {
187121
+ callback = signal;
187122
+ signal = undefined;
187123
+ }
187124
+
187125
+ pid = parseInt(pid);
187126
+ if (Number.isNaN(pid)) {
187127
+ if (callback) {
187128
+ return callback(new Error("pid must be a number"));
187129
+ } else {
187130
+ throw new Error("pid must be a number");
187131
+ }
187132
+ }
187133
+
187134
+ var tree = {};
187135
+ var pidsToProcess = {};
187136
+ tree[pid] = [];
187137
+ pidsToProcess[pid] = 1;
187138
+
187139
+ switch (process.platform) {
187140
+ case 'win32':
187141
+ exec('taskkill /pid ' + pid + ' /T /F', callback);
187142
+ break;
187143
+ case 'darwin':
187144
+ buildProcessTree(pid, tree, pidsToProcess, function (parentPid) {
187145
+ return spawn('pgrep', ['-P', parentPid]);
187146
+ }, function () {
187147
+ killAll(tree, signal, callback);
187148
+ });
187149
+ break;
187150
+ // case 'sunos':
187151
+ // buildProcessTreeSunOS(pid, tree, pidsToProcess, function () {
187152
+ // killAll(tree, signal, callback);
187153
+ // });
187154
+ // break;
187155
+ default: // Linux
187156
+ buildProcessTree(pid, tree, pidsToProcess, function (parentPid) {
187157
+ return spawn('ps', ['-o', 'pid', '--no-headers', '--ppid', parentPid]);
187158
+ }, function () {
187159
+ killAll(tree, signal, callback);
187160
+ });
187161
+ break;
187162
+ }
187163
+ };
187164
+
187165
+ function killAll (tree, signal, callback) {
187166
+ var killed = {};
187167
+ try {
187168
+ Object.keys(tree).forEach(function (pid) {
187169
+ tree[pid].forEach(function (pidpid) {
187170
+ if (!killed[pidpid]) {
187171
+ killPid(pidpid, signal);
187172
+ killed[pidpid] = 1;
187173
+ }
187174
+ });
187175
+ if (!killed[pid]) {
187176
+ killPid(pid, signal);
187177
+ killed[pid] = 1;
187178
+ }
187179
+ });
187180
+ } catch (err) {
187181
+ if (callback) {
187182
+ return callback(err);
187183
+ } else {
187184
+ throw err;
187185
+ }
187186
+ }
187187
+ if (callback) {
187188
+ return callback();
187189
+ }
187190
+ }
187191
+
187192
+ function killPid(pid, signal) {
187193
+ try {
187194
+ process.kill(parseInt(pid, 10), signal);
187195
+ }
187196
+ catch (err) {
187197
+ if (err.code !== 'ESRCH') throw err;
187198
+ }
187199
+ }
187200
+
187201
+ function buildProcessTree (parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) {
187202
+ var ps = spawnChildProcessesList(parentPid);
187203
+ var allData = '';
187204
+ ps.stdout.on('data', function (data) {
187205
+ var data = data.toString('ascii');
187206
+ allData += data;
187207
+ });
187208
+
187209
+ var onClose = function (code) {
187210
+ delete pidsToProcess[parentPid];
187211
+
187212
+ if (code != 0) {
187213
+ // no more parent processes
187214
+ if (Object.keys(pidsToProcess).length == 0) {
187215
+ cb();
187216
+ }
187217
+ return;
187218
+ }
187219
+
187220
+ allData.match(/\d+/g).forEach(function (pid) {
187221
+ pid = parseInt(pid, 10);
187222
+ tree[parentPid].push(pid);
187223
+ tree[pid] = [];
187224
+ pidsToProcess[pid] = 1;
187225
+ buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb);
187226
+ });
187227
+ };
187228
+
187229
+ ps.on('close', onClose);
187230
+ }
187231
+
187232
+
187107
187233
  /***/ }),
187108
187234
 
187109
187235
  /***/ 4490:
@@ -209122,20 +209248,19 @@ const { readdir, readFile, unlink } = fs_1.promises;
209122
209248
  */
209123
209249
  exports.frameworks = [
209124
209250
  {
209125
- name: 'Blitz.js',
209251
+ name: 'Blitz.js (Legacy)',
209126
209252
  slug: 'blitzjs',
209127
209253
  demo: 'https://blitz-template.vercel.app',
209128
209254
  logo: 'https://api-frameworks.vercel.sh/framework-logos/blitz.svg',
209129
209255
  tagline: 'Blitz.js: The Fullstack React Framework',
209130
- description: 'A brand new Blitz.js app - the result of running `npx blitz new`.',
209256
+ description: 'A brand new Blitz.js app - the result of running `npx blitz@0.45.4 new`.',
209131
209257
  website: 'https://blitzjs.com',
209132
209258
  envPrefix: 'NEXT_PUBLIC_',
209133
209259
  useRuntime: { src: 'package.json', use: '@vercel/next' },
209134
209260
  detectors: {
209135
209261
  every: [
209136
209262
  {
209137
- path: 'package.json',
209138
- matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"blitz":\\s*".+?"[^}]*}',
209263
+ path: 'blitz.config.(js|ts)',
209139
209264
  },
209140
209265
  ],
209141
209266
  },
@@ -210754,6 +210879,72 @@ exports.frameworks = [
210754
210879
  dependency: 'vite',
210755
210880
  getOutputDirName: async () => 'dist',
210756
210881
  },
210882
+ {
210883
+ name: 'VitePress',
210884
+ slug: 'vitepress',
210885
+ demo: 'https://vitepress-starter-template.vercel.app/',
210886
+ logo: 'https://api-frameworks.vercel.sh/framework-logos/vite.svg',
210887
+ tagline: "VitePress is VuePress' little brother, built on top of Vite.",
210888
+ description: 'VuePress on top of Vite',
210889
+ website: 'https://vitepress.vuejs.org/',
210890
+ detectors: {
210891
+ every: [
210892
+ {
210893
+ path: 'package.json',
210894
+ matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*vitepress:\\s*".+?"[^}]*}',
210895
+ },
210896
+ ],
210897
+ },
210898
+ settings: {
210899
+ installCommand: {
210900
+ placeholder: '`yarn install`, `pnpm install`, or `npm install`',
210901
+ },
210902
+ buildCommand: {
210903
+ placeholder: '`npm run build` or `vitepress build docs`',
210904
+ value: 'vitepress build docs',
210905
+ },
210906
+ devCommand: {
210907
+ value: 'vitepress dev docs --port $PORT',
210908
+ },
210909
+ outputDirectory: {
210910
+ value: 'docs/.vitepress/dist',
210911
+ },
210912
+ },
210913
+ getOutputDirName: async () => '.vitepress/dist',
210914
+ },
210915
+ {
210916
+ name: 'VuePress',
210917
+ slug: 'vuepress',
210918
+ demo: 'https://vuepress-starter-template.vercel.app',
210919
+ logo: 'https://api-frameworks.vercel.sh/framework-logos/vuepress.png',
210920
+ tagline: 'Vue-powered Static Site Generator',
210921
+ description: 'Vue-powered Static Site Generator',
210922
+ website: 'https://vuepress.vuejs.org/',
210923
+ detectors: {
210924
+ every: [
210925
+ {
210926
+ path: 'package.json',
210927
+ matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*vuepress:\\s*".+?"[^}]*}',
210928
+ },
210929
+ ],
210930
+ },
210931
+ settings: {
210932
+ installCommand: {
210933
+ placeholder: '`yarn install`, `pnpm install`, or `npm install`',
210934
+ },
210935
+ buildCommand: {
210936
+ placeholder: '`npm run build` or `vuepress build src`',
210937
+ value: 'vuepress build src',
210938
+ },
210939
+ devCommand: {
210940
+ value: 'vuepress dev src --port $PORT',
210941
+ },
210942
+ outputDirectory: {
210943
+ value: 'src/.vuepress/dist',
210944
+ },
210945
+ },
210946
+ getOutputDirName: async () => 'src/.vuepress/dist',
210947
+ },
210757
210948
  {
210758
210949
  name: 'Parcel',
210759
210950
  slug: 'parcel',
@@ -224025,6 +224216,7 @@ const BuildOutputV2 = __importStar(__webpack_require__(5154));
224025
224216
  const BuildOutputV3 = __importStar(__webpack_require__(8939));
224026
224217
  const GatsbyUtils = __importStar(__webpack_require__(8573));
224027
224218
  const NuxtUtils = __importStar(__webpack_require__(431));
224219
+ const tree_kill_1 = __importDefault(__webpack_require__(3255));
224028
224220
  const sleep = (n) => new Promise(resolve => setTimeout(resolve, n));
224029
224221
  const DEV_SERVER_PORT_BIND_TIMEOUT = ms_1.default('5m');
224030
224222
  async function checkForPort(port, timeout) {
@@ -224117,10 +224309,10 @@ exports.version = 2;
224117
224309
  const nowDevScriptPorts = new Map();
224118
224310
  const nowDevChildProcesses = new Set();
224119
224311
  ['SIGINT', 'SIGTERM'].forEach(signal => {
224120
- process.once(signal, () => {
224312
+ process.once(signal, async () => {
224121
224313
  for (const child of nowDevChildProcesses) {
224122
224314
  build_utils_1.debug(`Got ${signal}, killing dev server child process (pid=${child.pid})`);
224123
- process.kill(child.pid, signal);
224315
+ await new Promise(resolve => tree_kill_1.default(child.pid, signal, resolve));
224124
224316
  }
224125
224317
  process.exit(0);
224126
224318
  });
@@ -224418,7 +224610,7 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
224418
224610
  };
224419
224611
  const cmd = devCommand || `yarn run ${devScript}`;
224420
224612
  const child = build_utils_1.spawnCommand(cmd, opts);
224421
- child.on('exit', () => nowDevScriptPorts.delete(entrypoint));
224613
+ child.on('close', () => nowDevScriptPorts.delete(entrypoint));
224422
224614
  nowDevChildProcesses.add(child);
224423
224615
  // Wait for the server to have listened on `$PORT`, after which we
224424
224616
  // will ProxyPass any requests to that development server that come in
@@ -225345,6 +225537,14 @@ module.exports = require("buffer");
225345
225537
 
225346
225538
  /***/ }),
225347
225539
 
225540
+ /***/ 3129:
225541
+ /***/ ((module) => {
225542
+
225543
+ "use strict";
225544
+ module.exports = require("child_process");
225545
+
225546
+ /***/ }),
225547
+
225348
225548
  /***/ 7619:
225349
225549
  /***/ ((module) => {
225350
225550
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -36,8 +36,8 @@
36
36
  "@types/ms": "0.7.31",
37
37
  "@types/node-fetch": "2.5.4",
38
38
  "@types/promise-timeout": "1.3.0",
39
- "@vercel/build-utils": "5.5.8",
40
- "@vercel/frameworks": "1.1.12",
39
+ "@vercel/build-utils": "5.6.0",
40
+ "@vercel/frameworks": "1.1.13",
41
41
  "@vercel/ncc": "0.24.0",
42
42
  "@vercel/routing-utils": "2.1.3",
43
43
  "@vercel/static-config": "2.0.6",
@@ -47,7 +47,8 @@
47
47
  "ms": "2.1.2",
48
48
  "node-fetch": "2.6.7",
49
49
  "rc9": "1.2.0",
50
+ "tree-kill": "1.2.2",
50
51
  "typescript": "4.3.4"
51
52
  },
52
- "gitHead": "4159b498b93cc340ee483beb5dd1ef18dc762408"
53
+ "gitHead": "a19447f9cdc8c7be8aa3646dfb441dd9469d2ed3"
53
54
  }