@vercel/static-build 2.7.6 → 2.7.7
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.
- package/dist/index.js +81 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9340,7 +9340,7 @@ var require_frameworks = __commonJS({
|
|
|
9340
9340
|
getOutputDirName: async () => "public"
|
|
9341
9341
|
},
|
|
9342
9342
|
{
|
|
9343
|
-
name: "SvelteKit
|
|
9343
|
+
name: "SvelteKit",
|
|
9344
9344
|
slug: "sveltekit-1",
|
|
9345
9345
|
demo: "https://sveltekit-1-template.vercel.app",
|
|
9346
9346
|
logo: "https://api-frameworks.vercel.sh/framework-logos/svelte.svg",
|
|
@@ -26426,6 +26426,84 @@ var require_get_monorepo_default_settings = __commonJS({
|
|
|
26426
26426
|
}
|
|
26427
26427
|
});
|
|
26428
26428
|
|
|
26429
|
+
// ../fs-detectors/dist/detect-instrumentation.js
|
|
26430
|
+
var require_detect_instrumentation = __commonJS({
|
|
26431
|
+
"../fs-detectors/dist/detect-instrumentation.js"(exports2, module2) {
|
|
26432
|
+
"use strict";
|
|
26433
|
+
var __create2 = Object.create;
|
|
26434
|
+
var __defProp2 = Object.defineProperty;
|
|
26435
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
26436
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
26437
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
26438
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
26439
|
+
var __export2 = (target, all) => {
|
|
26440
|
+
for (var name in all)
|
|
26441
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
26442
|
+
};
|
|
26443
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
26444
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26445
|
+
for (let key of __getOwnPropNames2(from))
|
|
26446
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
26447
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
26448
|
+
}
|
|
26449
|
+
return to;
|
|
26450
|
+
};
|
|
26451
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
26452
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26453
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26454
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26455
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26456
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
|
26457
|
+
mod
|
|
26458
|
+
));
|
|
26459
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
26460
|
+
var detect_instrumentation_exports = {};
|
|
26461
|
+
__export2(detect_instrumentation_exports, {
|
|
26462
|
+
detectInstrumentation: () => detectInstrumentation2
|
|
26463
|
+
});
|
|
26464
|
+
module2.exports = __toCommonJS2(detect_instrumentation_exports);
|
|
26465
|
+
var import_semver2 = __toESM2(require_semver3());
|
|
26466
|
+
var VERCEL_OTEL = "@vercel/otel";
|
|
26467
|
+
var OPENTELEMETRY_SDK_TRACE_NODE = "@opentelemetry/sdk-trace-node";
|
|
26468
|
+
var OPENTELEMETRY_API = "@opentelemetry/api";
|
|
26469
|
+
var tracingDependencies = [
|
|
26470
|
+
{ name: VERCEL_OTEL, minVersion: "1.11.0" },
|
|
26471
|
+
{ name: OPENTELEMETRY_SDK_TRACE_NODE, minVersion: "1.19.0" },
|
|
26472
|
+
{ name: OPENTELEMETRY_API, minVersion: "1.7.0" }
|
|
26473
|
+
];
|
|
26474
|
+
async function detectInstrumentation2(fs5) {
|
|
26475
|
+
if (await fs5.hasPath("package.json") === false) {
|
|
26476
|
+
return false;
|
|
26477
|
+
}
|
|
26478
|
+
if (await fs5.isFile("package.json") === false) {
|
|
26479
|
+
return false;
|
|
26480
|
+
}
|
|
26481
|
+
const content = await fs5.readFile("package.json");
|
|
26482
|
+
const packageJsonContent = content.toString();
|
|
26483
|
+
let hasInstrumentation = false;
|
|
26484
|
+
for (const dependency of tracingDependencies) {
|
|
26485
|
+
const regex = new RegExp(
|
|
26486
|
+
`"(dev)?(d|D)ependencies":\\s*{[^}]*"${dependency.name}":\\s*"(.+?)"[^}]*}`,
|
|
26487
|
+
"m"
|
|
26488
|
+
);
|
|
26489
|
+
const match = packageJsonContent.match(regex);
|
|
26490
|
+
if (match && match[3]) {
|
|
26491
|
+
const detectedVersion = match[3];
|
|
26492
|
+
const cleanVersion = detectedVersion.replace(/[\^~]/, "");
|
|
26493
|
+
if (import_semver2.default.valid(cleanVersion) && import_semver2.default.gte(cleanVersion, dependency.minVersion)) {
|
|
26494
|
+
console.log(
|
|
26495
|
+
`Detected OpenTelemetry dependency: ${dependency.name}@${cleanVersion}, which meets the minimum version requirement of ${dependency.minVersion}`
|
|
26496
|
+
);
|
|
26497
|
+
hasInstrumentation = true;
|
|
26498
|
+
break;
|
|
26499
|
+
}
|
|
26500
|
+
}
|
|
26501
|
+
}
|
|
26502
|
+
return hasInstrumentation;
|
|
26503
|
+
}
|
|
26504
|
+
}
|
|
26505
|
+
});
|
|
26506
|
+
|
|
26429
26507
|
// ../fs-detectors/dist/index.js
|
|
26430
26508
|
var require_dist4 = __commonJS({
|
|
26431
26509
|
"../fs-detectors/dist/index.js"(exports2, module2) {
|
|
@@ -26465,6 +26543,7 @@ var require_dist4 = __commonJS({
|
|
|
26465
26543
|
detectFrameworkRecord: () => import_detect_framework.detectFrameworkRecord,
|
|
26466
26544
|
detectFrameworkVersion: () => import_detect_framework.detectFrameworkVersion,
|
|
26467
26545
|
detectFrameworks: () => import_detect_framework.detectFrameworks,
|
|
26546
|
+
detectInstrumentation: () => import_detect_instrumentation.detectInstrumentation,
|
|
26468
26547
|
detectOutputDirectory: () => import_detect_builders.detectOutputDirectory,
|
|
26469
26548
|
getProjectPaths: () => import_get_project_paths.getProjectPaths,
|
|
26470
26549
|
getWorkspacePackagePaths: () => import_get_workspace_package_paths.getWorkspacePackagePaths,
|
|
@@ -26490,6 +26569,7 @@ var require_dist4 = __commonJS({
|
|
|
26490
26569
|
var import_package_managers = require_package_managers();
|
|
26491
26570
|
__reExport(src_exports2, require_get_monorepo_default_settings(), module2.exports);
|
|
26492
26571
|
var import_detect_builders2 = require_detect_builders();
|
|
26572
|
+
var import_detect_instrumentation = require_detect_instrumentation();
|
|
26493
26573
|
}
|
|
26494
26574
|
});
|
|
26495
26575
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.7",
|
|
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.11",
|
|
17
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.0.
|
|
17
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.0.81",
|
|
18
18
|
"@vercel/static-config": "3.0.0",
|
|
19
19
|
"ts-morph": "12.0.0"
|
|
20
20
|
},
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@types/semver": "7.3.13",
|
|
31
31
|
"@vercel/build-utils": "10.5.1",
|
|
32
32
|
"@vercel/error-utils": "2.0.3",
|
|
33
|
-
"@vercel/frameworks": "3.6.
|
|
34
|
-
"@vercel/fs-detectors": "5.
|
|
33
|
+
"@vercel/frameworks": "3.6.3",
|
|
34
|
+
"@vercel/fs-detectors": "5.4.0",
|
|
35
35
|
"@vercel/routing-utils": "5.0.4",
|
|
36
36
|
"execa": "3.2.0",
|
|
37
37
|
"fs-extra": "10.0.0",
|