@frozzare/pkg
Advanced tools
Comparing version
@@ -1,6 +0,12 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { build as esbuild } from 'esbuild'; | ||
export const build = async (entryPoint, config = {}) => { | ||
const out = await esbuild({ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.build = void 0; | ||
const fs_1 = __importDefault(require("fs")); | ||
const path_1 = __importDefault(require("path")); | ||
const esbuild_1 = require("esbuild"); | ||
const build = async (entryPoint, config = {}) => { | ||
const out = await (0, esbuild_1.build)({ | ||
...config, | ||
@@ -25,4 +31,5 @@ entryPoints: [entryPoint], | ||
} | ||
fs.mkdirSync(path.dirname(file.path)); | ||
return !config.write ? text : fs.writeFileSync(file.path, text); | ||
fs_1.default.mkdirSync(path_1.default.dirname(file.path)); | ||
return !config.write ? text : fs_1.default.writeFileSync(file.path, text); | ||
}; | ||
exports.build = build; |
{ | ||
"name": "@frozzare/pkg", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -13,2 +13,5 @@ "main": "dist/index.js", | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [], | ||
@@ -15,0 +18,0 @@ "author": "Fredrik Forsmo <fredrik.forsmo@gmail.com>", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3427
-56.47%4
-71.43%37
-69.67%