@vercel/backends
Advanced tools
+6
-2
| import { builtinModules, createRequire } from "node:module"; | ||
| import { delimiter, dirname, extname, join } from "path"; | ||
| import { FileBlob, FileFsRef, NodejsLambda, Span, debug, defaultCachePathGlob, download, execCommand, getEnvForPackageManager, getNodeBinPaths, getNodeVersion, glob, isBackendFramework, isExperimentalBackendsWithoutIntrospectionEnabled, runNpmInstall, runPackageJsonScript, scanParentDirs } from "@vercel/build-utils"; | ||
| import { FileBlob, FileFsRef, NodejsLambda, Span, debug, defaultCachePathGlob, download, execCommand, getEnvForPackageManager, getNodeBinPaths, getNodeVersion, glob, isBackendFramework, isBunVersion, isExperimentalBackendsWithoutIntrospectionEnabled, runNpmInstall, runPackageJsonScript, scanParentDirs } from "@vercel/build-utils"; | ||
| import { createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, unlinkSync, writeFileSync } from "node:fs"; | ||
@@ -686,2 +686,3 @@ import { lstat, readFile, rm } from "node:fs/promises"; | ||
| mixedModules: true, | ||
| conditions: args.conditions, | ||
| ignore: args.ignoreNodeModules ? (path) => path.includes("node_modules") : void 0, | ||
@@ -907,2 +908,3 @@ async readFile(fsPath) { | ||
| if (!handler) throw new Error(`Unable to resolve build handler for entrypoint: ${args.entrypoint}`); | ||
| console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Build complete`)); | ||
| return { | ||
@@ -1413,3 +1415,4 @@ files, | ||
| const downloadResult = await downloadInstallAndBundle(args); | ||
| const nodeVersion = await getNodeVersion(args.workPath); | ||
| const nodeVersion = await getNodeVersion(args.workPath, void 0, args.config, args.meta); | ||
| const isBun = isBunVersion(nodeVersion); | ||
| const builderName = "@vercel/backends"; | ||
@@ -1449,2 +1452,3 @@ const span = args.span ?? new Span({ name: builderName }); | ||
| ignoreNodeModules: false, | ||
| conditions: isBun ? ["bun"] : void 0, | ||
| span: buildSpan | ||
@@ -1451,0 +1455,0 @@ }); |
+6
-2
| import { builtinModules, createRequire } from "node:module"; | ||
| import { delimiter, dirname, extname, join } from "path"; | ||
| import { FileBlob, FileFsRef, NodejsLambda, Span, debug, defaultCachePathGlob, download, execCommand, getEnvForPackageManager, getNodeBinPaths, getNodeVersion, glob, isBackendFramework, isExperimentalBackendsWithoutIntrospectionEnabled, runNpmInstall, runPackageJsonScript, scanParentDirs } from "@vercel/build-utils"; | ||
| import { FileBlob, FileFsRef, NodejsLambda, Span, debug, defaultCachePathGlob, download, execCommand, getEnvForPackageManager, getNodeBinPaths, getNodeVersion, glob, isBackendFramework, isBunVersion, isExperimentalBackendsWithoutIntrospectionEnabled, runNpmInstall, runPackageJsonScript, scanParentDirs } from "@vercel/build-utils"; | ||
| import { createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, unlinkSync, writeFileSync } from "node:fs"; | ||
@@ -686,2 +686,3 @@ import { lstat, readFile, rm } from "node:fs/promises"; | ||
| mixedModules: true, | ||
| conditions: args.conditions, | ||
| ignore: args.ignoreNodeModules ? (path) => path.includes("node_modules") : void 0, | ||
@@ -907,2 +908,3 @@ async readFile(fsPath) { | ||
| if (!handler) throw new Error(`Unable to resolve build handler for entrypoint: ${args.entrypoint}`); | ||
| console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Build complete`)); | ||
| return { | ||
@@ -1413,3 +1415,4 @@ files, | ||
| const downloadResult = await downloadInstallAndBundle(args); | ||
| const nodeVersion = await getNodeVersion(args.workPath); | ||
| const nodeVersion = await getNodeVersion(args.workPath, void 0, args.config, args.meta); | ||
| const isBun = isBunVersion(nodeVersion); | ||
| const builderName = "@vercel/backends"; | ||
@@ -1449,2 +1452,3 @@ const span = args.span ?? new Span({ name: builderName }); | ||
| ignoreNodeModules: false, | ||
| conditions: isBun ? ["bun"] : void 0, | ||
| span: buildSpan | ||
@@ -1451,0 +1455,0 @@ }); |
@@ -12,2 +12,31 @@ import { builtinModules } from "node:module"; | ||
| //#region src/cervel/utils.ts | ||
| const noColor = globalThis.process?.env?.NO_COLOR === "1" || globalThis.process?.env?.TERM === "dumb"; | ||
| const resets = { | ||
| 1: 22, | ||
| 31: 39, | ||
| 32: 39, | ||
| 33: 39, | ||
| 34: 39, | ||
| 35: 39, | ||
| 36: 39, | ||
| 90: 39 | ||
| }; | ||
| const _c = (c) => (text) => { | ||
| if (noColor) return text; | ||
| return `\u001B[${c}m${text}\u001B[${resets[c] ?? 0}m`; | ||
| }; | ||
| const Colors = { | ||
| bold: _c(1), | ||
| red: _c(31), | ||
| green: _c(32), | ||
| yellow: _c(33), | ||
| blue: _c(34), | ||
| magenta: _c(35), | ||
| cyan: _c(36), | ||
| gray: _c(90), | ||
| url: (title, url) => noColor ? `[${title}](${url})` : `\u001B]8;;${url}\u001B\\${title}\u001B]8;;\u001B\\` | ||
| }; | ||
| //#endregion | ||
| //#region src/rolldown/resolve-format.ts | ||
@@ -73,2 +102,3 @@ const resolveEntrypointAndFormat = async (args) => { | ||
| mixedModules: true, | ||
| conditions: args.conditions, | ||
| ignore: args.ignoreNodeModules ? (path) => path.includes("node_modules") : void 0, | ||
@@ -294,2 +324,3 @@ async readFile(fsPath) { | ||
| if (!handler) throw new Error(`Unable to resolve build handler for entrypoint: ${args.entrypoint}`); | ||
| console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Build complete`)); | ||
| return { | ||
@@ -296,0 +327,0 @@ files, |
+2
-2
| { | ||
| "name": "@vercel/backends", | ||
| "version": "0.0.29", | ||
| "version": "0.0.30", | ||
| "license": "Apache-2.0", | ||
@@ -37,3 +37,3 @@ "main": "./dist/index.mjs", | ||
| "zod": "3.22.4", | ||
| "@vercel/build-utils": "13.3.2" | ||
| "@vercel/build-utils": "13.3.3" | ||
| }, | ||
@@ -40,0 +40,0 @@ "peerDependencies": { |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
151795
0.8%4154
0.92%+ Added
+ Added
- Removed
- Removed
Updated