@vercel/static-build 2.11.13 → 2.12.1

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 +29 -26
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -23504,8 +23504,8 @@ var require_resolve = __commonJS({
23504
23504
  let reachedRoot = false;
23505
23505
  while (!reachedRoot) {
23506
23506
  for (const manifest of manifests) {
23507
- const manifestPath2 = dir === "." ? manifest : import_path7.posix.join(dir, manifest);
23508
- if (await (0, import_utils.hasFile)(fs5, manifestPath2)) {
23507
+ const manifestPath = dir === "." ? manifest : import_path7.posix.join(dir, manifest);
23508
+ if (await (0, import_utils.hasFile)(fs5, manifestPath)) {
23509
23509
  return dir;
23510
23510
  }
23511
23511
  }
@@ -29294,6 +29294,7 @@ var require_detect_builders = __commonJS({
29294
29294
  REGEX_MIDDLEWARE_FILES: () => REGEX_MIDDLEWARE_FILES,
29295
29295
  REGEX_NON_VERCEL_PLATFORM_FILES: () => REGEX_NON_VERCEL_PLATFORM_FILES2,
29296
29296
  REGEX_VERCEL_PLATFORM_FILES: () => REGEX_VERCEL_PLATFORM_FILES,
29297
+ builderToFrameworks: () => builderToFrameworks2,
29297
29298
  detectApiDirectory: () => detectApiDirectory2,
29298
29299
  detectApiExtensions: () => detectApiExtensions2,
29299
29300
  detectBuilders: () => detectBuilders2,
@@ -29338,6 +29339,21 @@ var require_detect_builders = __commonJS({
29338
29339
  var slugToFramework = new Map(
29339
29340
  import_frameworks2.frameworkList.map((f) => [f.slug, f])
29340
29341
  );
29342
+ var builderToFrameworks2 = (() => {
29343
+ const map = /* @__PURE__ */ new Map();
29344
+ for (const f of import_frameworks2.frameworkList) {
29345
+ if (!f.useRuntime?.use)
29346
+ continue;
29347
+ const builder = f.useRuntime.use;
29348
+ const entry = map.get(builder);
29349
+ if (entry) {
29350
+ entry.push(f);
29351
+ } else {
29352
+ map.set(builder, [f]);
29353
+ }
29354
+ }
29355
+ return map;
29356
+ })();
29341
29357
  function sortFiles(fileA, fileB) {
29342
29358
  return fileA.localeCompare(fileB);
29343
29359
  }
@@ -34837,6 +34853,7 @@ var require_dist8 = __commonJS({
34837
34853
  Workspace: () => import_get_workspaces.Workspace,
34838
34854
  WorkspaceType: () => import_get_workspaces.WorkspaceType,
34839
34855
  autoDetectServices: () => import_auto_detect.autoDetectServices,
34856
+ builderToFrameworks: () => import_detect_builders.builderToFrameworks,
34840
34857
  detectApiDirectory: () => import_detect_builders.detectApiDirectory,
34841
34858
  detectApiExtensions: () => import_detect_builders.detectApiExtensions,
34842
34859
  detectBuilders: () => import_detect_builders.detectBuilders,
@@ -35227,13 +35244,13 @@ async function readBuildOutputDirectory2({
35227
35244
  return outputs;
35228
35245
  }
35229
35246
  async function getMiddleware(workPath) {
35230
- const manifestPath2 = import_path3.default.join(
35247
+ const manifestPath = import_path3.default.join(
35231
35248
  workPath,
35232
35249
  BUILD_OUTPUT_DIR,
35233
35250
  "functions-manifest.json"
35234
35251
  );
35235
35252
  try {
35236
- const manifest = await (0, import_fs_extra.readJson)(manifestPath2);
35253
+ const manifest = await (0, import_fs_extra.readJson)(manifestPath);
35237
35254
  if (manifest.pages["_middleware.js"].runtime !== "web") {
35238
35255
  return;
35239
35256
  }
@@ -36472,7 +36489,7 @@ var prepareCache = async ({
36472
36489
  }
36473
36490
  return cacheFiles;
36474
36491
  };
36475
- var STATIC_BUILD_MANIFEST_RUNTIMES = ["node", "go", "rust", "ruby"];
36492
+ var STATIC_BUILD_MANIFEST_RUNTIME = "static-build";
36476
36493
  async function generateStaticBuildManifest({
36477
36494
  framework,
36478
36495
  service,
@@ -36504,7 +36521,7 @@ async function generateStaticBuildManifest({
36504
36521
  ]
36505
36522
  },
36506
36523
  entrypointDir,
36507
- "go"
36524
+ STATIC_BUILD_MANIFEST_RUNTIME
36508
36525
  );
36509
36526
  } catch (err) {
36510
36527
  (0, import_build_utils4.debug)(
@@ -36533,7 +36550,7 @@ async function generateStaticBuildManifest({
36533
36550
  ]
36534
36551
  },
36535
36552
  entrypointDir,
36536
- "rust"
36553
+ STATIC_BUILD_MANIFEST_RUNTIME
36537
36554
  );
36538
36555
  } catch (err) {
36539
36556
  (0, import_build_utils4.debug)(
@@ -36545,7 +36562,8 @@ async function generateStaticBuildManifest({
36545
36562
  workPath: entrypointDir,
36546
36563
  gemfileLockPath: import_path6.default.join(entrypointDir, "Gemfile.lock"),
36547
36564
  framework: framework.slug,
36548
- serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
36565
+ serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0,
36566
+ outputRuntime: STATIC_BUILD_MANIFEST_RUNTIME
36549
36567
  });
36550
36568
  } else if (framework?.slug) {
36551
36569
  try {
@@ -36556,7 +36574,8 @@ async function generateStaticBuildManifest({
36556
36574
  lockfilePath,
36557
36575
  lockfileVersion,
36558
36576
  framework: framework.slug,
36559
- serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
36577
+ serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0,
36578
+ outputRuntime: STATIC_BUILD_MANIFEST_RUNTIME
36560
36579
  });
36561
36580
  } catch (err) {
36562
36581
  (0, import_build_utils4.debug)(
@@ -36565,23 +36584,7 @@ async function generateStaticBuildManifest({
36565
36584
  }
36566
36585
  }
36567
36586
  }
36568
- var diagnostics = async ({ workPath }) => {
36569
- const files = {};
36570
- await Promise.all(
36571
- STATIC_BUILD_MANIFEST_RUNTIMES.map(async (runtime) => {
36572
- const relPath = (0, import_build_utils4.manifestPath)(runtime);
36573
- try {
36574
- const data = await import_fs4.promises.readFile(
36575
- import_path6.default.join(workPath, relPath),
36576
- "utf-8"
36577
- );
36578
- files[relPath] = new import_build_utils4.FileBlob({ data });
36579
- } catch {
36580
- }
36581
- })
36582
- );
36583
- return files;
36584
- };
36587
+ var diagnostics = (0, import_build_utils4.createDiagnostics)(STATIC_BUILD_MANIFEST_RUNTIME);
36585
36588
  // Annotate the CommonJS export names for ESM import in node:
36586
36589
  0 && (module.exports = {
36587
36590
  build,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "2.11.13",
3
+ "version": "2.12.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -14,9 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "ts-morph": "12.0.0",
17
- "@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
18
- "@vercel/static-config": "3.4.0",
19
- "@vercel/gatsby-plugin-vercel-builder": "2.2.33"
17
+ "@vercel/static-config": "3.4.1",
18
+ "@vercel/gatsby-plugin-vercel-builder": "2.2.35",
19
+ "@vercel/gatsby-plugin-vercel-analytics": "1.0.12"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/aws-lambda": "8.10.64",
@@ -37,11 +37,11 @@
37
37
  "semver": "7.5.2",
38
38
  "tree-kill": "1.2.2",
39
39
  "vitest": "2.0.3",
40
- "@vercel/error-utils": "2.2.0",
41
- "@vercel/frameworks": "3.30.7",
42
- "@vercel/build-utils": "13.36.3",
43
- "@vercel/fs-detectors": "6.14.3",
44
- "@vercel/routing-utils": "6.4.0"
40
+ "@vercel/error-utils": "2.2.1",
41
+ "@vercel/frameworks": "3.30.8",
42
+ "@vercel/build-utils": "14.0.1",
43
+ "@vercel/fs-detectors": "6.15.1",
44
+ "@vercel/routing-utils": "6.4.1"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "node ../../utils/build-builder.mjs",