@vercel/static-build 1.3.37 → 1.3.39

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 +25 -24
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -235417,7 +235417,7 @@ exports.frameworks = [
235417
235417
  logo: 'https://api-frameworks.vercel.sh/framework-logos/saber.svg',
235418
235418
  tagline: 'Saber is a framework for building static sites in Vue.js that supports data from any source.',
235419
235419
  description: 'A Saber site, created with npm init.',
235420
- website: 'https://saber.land/',
235420
+ website: 'https://saber.egoist.dev',
235421
235421
  detectors: {
235422
235422
  every: [
235423
235423
  {
@@ -237442,7 +237442,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
237442
237442
  Object.defineProperty(exports, "__esModule", ({ value: true }));
237443
237443
  exports.LocalFileSystemDetector = void 0;
237444
237444
  const promises_1 = __importDefault(__webpack_require__(9225));
237445
- const path_1 = __importDefault(__webpack_require__(5622));
237445
+ const path_1 = __webpack_require__(5622);
237446
237446
  const filesystem_1 = __webpack_require__(4451);
237447
237447
  const error_utils_1 = __webpack_require__(9799);
237448
237448
  class LocalFileSystemDetector extends filesystem_1.DetectorFilesystem {
@@ -237469,26 +237469,24 @@ class LocalFileSystemDetector extends filesystem_1.DetectorFilesystem {
237469
237469
  const stat = await promises_1.default.stat(this.getFilePath(name));
237470
237470
  return stat.isFile();
237471
237471
  }
237472
- async _readdir(name) {
237473
- const dirPath = this.getFilePath(name);
237474
- const dir = await promises_1.default.readdir(dirPath, {
237475
- withFileTypes: true,
237476
- });
237477
- const getType = (dirent) => {
237478
- if (dirent.isFile()) {
237479
- return 'file';
237472
+ async _readdir(dir) {
237473
+ const dirPath = this.getFilePath(dir);
237474
+ const files = await promises_1.default.readdir(dirPath);
237475
+ return Promise.all(files.map(async (name) => {
237476
+ const absPath = (0, path_1.join)(this.rootPath, dir, name);
237477
+ const path = (0, path_1.join)(this.getRelativeFilePath(dir), name);
237478
+ const stat = await promises_1.default.stat(absPath);
237479
+ let type;
237480
+ if (stat.isFile()) {
237481
+ type = 'file';
237480
237482
  }
237481
- else if (dirent.isDirectory()) {
237482
- return 'dir';
237483
+ else if (stat.isDirectory()) {
237484
+ type = 'dir';
237483
237485
  }
237484
237486
  else {
237485
- throw new Error(`Dirent was neither file nor directory`);
237487
+ throw new Error(`Dirent was neither file nor directory: ${path}`);
237486
237488
  }
237487
- };
237488
- return dir.map(dirent => ({
237489
- name: dirent.name,
237490
- path: path_1.default.join(this.getRelativeFilePath(name), dirent.name),
237491
- type: getType(dirent),
237489
+ return { name, path, type };
237492
237490
  }));
237493
237491
  }
237494
237492
  _chdir(name) {
@@ -237496,11 +237494,11 @@ class LocalFileSystemDetector extends filesystem_1.DetectorFilesystem {
237496
237494
  }
237497
237495
  getRelativeFilePath(name) {
237498
237496
  return name.startsWith(this.rootPath)
237499
- ? path_1.default.relative(this.rootPath, name)
237497
+ ? (0, path_1.relative)(this.rootPath, name)
237500
237498
  : name;
237501
237499
  }
237502
237500
  getFilePath(name) {
237503
- return path_1.default.join(this.rootPath, this.getRelativeFilePath(name));
237501
+ return (0, path_1.join)(this.rootPath, this.getRelativeFilePath(name));
237504
237502
  }
237505
237503
  }
237506
237504
  exports.LocalFileSystemDetector = LocalFileSystemDetector;
@@ -238688,7 +238686,7 @@ async function getUpdatedDistPath(framework, outputDirPrefix, entrypointDir, dis
238688
238686
  }
238689
238687
  return undefined;
238690
238688
  }
238691
- const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
238689
+ const build = async ({ files, entrypoint, workPath, repoRootPath, config, meta = {}, }) => {
238692
238690
  await (0, build_utils_1.download)(files, workPath, meta);
238693
238691
  const mountpoint = path_1.default.dirname(entrypoint);
238694
238692
  const entrypointDir = path_1.default.join(workPath, mountpoint);
@@ -238854,9 +238852,12 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
238854
238852
  let gemHome = undefined;
238855
238853
  const pathList = [];
238856
238854
  if (isNpmInstall || (pkg && (buildCommand || devCommand))) {
238857
- const nodeBinPath = await (0, build_utils_1.getNodeBinPath)({ cwd: entrypointDir });
238858
- pathList.push(nodeBinPath); // Add `./node_modules/.bin`
238859
- (0, build_utils_1.debug)(`Added "${nodeBinPath}" to PATH env because a package.json file was found`);
238855
+ const nodeBinPaths = (0, build_utils_1.getNodeBinPaths)({
238856
+ start: entrypointDir,
238857
+ base: repoRootPath,
238858
+ });
238859
+ pathList.push(...nodeBinPaths); // Add `./node_modules/.bin`
238860
+ (0, build_utils_1.debug)(`Added "${nodeBinPaths.join(path_1.default.delimiter)}" to PATH env because a package.json file was found`);
238860
238861
  }
238861
238862
  if (isBundleInstall) {
238862
238863
  const vendorBin = path_1.default.join(workPath, 'vendor', 'bin');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "1.3.37",
3
+ "version": "1.3.39",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.10",
17
- "@vercel/gatsby-plugin-vercel-builder": "1.3.10"
17
+ "@vercel/gatsby-plugin-vercel-builder": "1.3.12"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/aws-lambda": "8.10.64",
@@ -26,10 +26,10 @@
26
26
  "@types/node-fetch": "2.5.4",
27
27
  "@types/promise-timeout": "1.3.0",
28
28
  "@types/semver": "7.3.13",
29
- "@vercel/build-utils": "6.7.5",
29
+ "@vercel/build-utils": "6.8.1",
30
30
  "@vercel/error-utils": "1.0.10",
31
- "@vercel/frameworks": "1.4.2",
32
- "@vercel/fs-detectors": "4.0.0",
31
+ "@vercel/frameworks": "1.4.3",
32
+ "@vercel/fs-detectors": "4.0.1",
33
33
  "@vercel/ncc": "0.24.0",
34
34
  "@vercel/routing-utils": "2.2.1",
35
35
  "@vercel/static-config": "2.0.17",