Compare commits
8 Commits
0391559000
...
0ac018073c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0ac018073c | ||
![]() |
d3546313a3 | ||
![]() |
1be82e0451 | ||
![]() |
2c02f62569 | ||
![]() |
0713337744 | ||
![]() |
ab46e608ea | ||
![]() |
03b16a432c | ||
![]() |
a163917428 |
10
.gitignore
vendored
10
.gitignore
vendored
@ -75,22 +75,12 @@ typings/
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
|
219
dist/index.js
vendored
Normal file
219
dist/index.js
vendored
Normal file
@ -0,0 +1,219 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//Modules
|
||||
// const AdmZip = require('adm-zip');
|
||||
const adm_zip_1 = __importDefault(require("adm-zip"));
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const pcb_stackup_1 = __importDefault(require("pcb-stackup"));
|
||||
const sharp_1 = __importDefault(require("sharp"));
|
||||
const node_stream_1 = require("node:stream");
|
||||
const node_fs_1 = require("node:fs");
|
||||
//Class definition
|
||||
class ImageGenerator {
|
||||
constructor(folderConfig, imgConfig, layerNames) {
|
||||
this.folderConfig = folderConfig;
|
||||
this.imgConfig = imgConfig;
|
||||
this.layerNames = layerNames;
|
||||
//Ensure folders exist
|
||||
if (!(0, node_fs_1.existsSync)(folderConfig.tmpDir))
|
||||
throw new Error('Temp dir does not exist');
|
||||
if (!(0, node_fs_1.existsSync)(folderConfig.imgDir))
|
||||
throw new Error('Image dir does not exist');
|
||||
//Check folder permissions
|
||||
(0, node_fs_1.accessSync)(folderConfig.tmpDir, node_fs_1.constants.R_OK | node_fs_1.constants.W_OK);
|
||||
(0, node_fs_1.accessSync)(folderConfig.imgDir, node_fs_1.constants.R_OK | node_fs_1.constants.W_OK);
|
||||
}
|
||||
/**
|
||||
* Extracts the passed in zip file
|
||||
|
||||
*/
|
||||
extractArchive(fileName, tmpDir) {
|
||||
// Check archive exists
|
||||
if (!(0, node_fs_1.existsSync)(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
//Check temp folder exists
|
||||
if (!(0, node_fs_1.existsSync)(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
const zip = new adm_zip_1.default(fileName);
|
||||
zip.extractAllTo(path_1.default.join(tmpDir, 'archive'));
|
||||
return zip.getEntries().length;
|
||||
}
|
||||
/**
|
||||
* Temporary test method zip file
|
||||
|
||||
*/
|
||||
testArchive(fileName, tmpDir) {
|
||||
// Check archive exists
|
||||
try {
|
||||
if (!(0, node_fs_1.existsSync)(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!(0, node_fs_1.existsSync)(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
const zip = new adm_zip_1.default(fileName);
|
||||
return zip.getEntries().length;
|
||||
}
|
||||
//Layer promise
|
||||
getLayers(dir, layerNames) {
|
||||
//Check correct number of layers and folder exists
|
||||
layerNames.forEach((layerName) => {
|
||||
if (!(0, node_fs_1.existsSync)(path_1.default.join(dir, layerName))) {
|
||||
throw `Missing layer: ${layerName}`;
|
||||
}
|
||||
});
|
||||
if (!(0, node_fs_1.existsSync)(dir)) {
|
||||
throw new Error('Folder not there');
|
||||
}
|
||||
//Return layer promise
|
||||
const layersPromise = new Promise(function (resolve, reject) {
|
||||
const layers = layerNames.map((layerName) => ({
|
||||
filename: layerName,
|
||||
gerber: (0, node_fs_1.createReadStream)(path_1.default.join(dir, layerName)),
|
||||
}));
|
||||
if (layers.length === layerNames.length) {
|
||||
resolve(layers);
|
||||
}
|
||||
else {
|
||||
reject('Invalid layer count');
|
||||
}
|
||||
});
|
||||
return layersPromise;
|
||||
}
|
||||
//Clean up the archive folder in the specified directory
|
||||
static cleanupFiles(dir) {
|
||||
try {
|
||||
const folder = path_1.default.join(dir, 'archive');
|
||||
(0, fs_extra_1.emptyDirSync)(folder);
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
// * Take an archive containing gerber files, config object, temporary dir
|
||||
// * and output dir and create a PNG image from the gerber in the output dir
|
||||
// * @param {string} gerber Path to an archive file containing gerber
|
||||
// * @returns {Promise.<string>} Promise to return path to image
|
||||
gerberToImage(gerber) {
|
||||
// Create output dir if it doesn't exist
|
||||
try {
|
||||
(0, fs_extra_1.ensureDirSync)(this.folderConfig.imgDir);
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!(0, node_fs_1.existsSync)(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!(0, node_fs_1.existsSync)(this.folderConfig.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!(0, node_fs_1.existsSync)(this.folderConfig.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
// Set filenames
|
||||
//Use the filename of the gerber zip to determine the output png filename
|
||||
const imageName = path_1.default.basename(gerber, '.zip');
|
||||
const destFile = `${path_1.default.join(this.folderConfig.imgDir, imageName)}.png`;
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.layerNames) {
|
||||
throw new Error('You must supply an array of layer names.');
|
||||
}
|
||||
this.extractArchive(gerber, this.folderConfig.tmpDir);
|
||||
this.getLayers(path_1.default.join(this.folderConfig.tmpDir, 'archive'), this.layerNames)
|
||||
.then(pcb_stackup_1.default)
|
||||
.then((stackup) => {
|
||||
(0, sharp_1.default)(Buffer.from(stackup.top.svg), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toFile(destFile);
|
||||
})
|
||||
.then(() => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
resolve(destFile);
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Take an archive containing gerber files and return a stream containing
|
||||
* a PNG image from the gerber
|
||||
* @param {string} gerber Path to an archive file containing gerber
|
||||
* @returns {Promise.<stream.Readable>} Promise that resolves to a PNG stream
|
||||
*/
|
||||
gerberToStream(gerber) {
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!(0, node_fs_1.existsSync)(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!(0, node_fs_1.existsSync)(this.folderConfig.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!(0, node_fs_1.existsSync)(this.folderConfig.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.extractArchive(gerber, this.folderConfig.tmpDir);
|
||||
if (!this.layerNames)
|
||||
throw new Error('No layers provided');
|
||||
this.getLayers(path_1.default.join(this.folderConfig.tmpDir, 'archive'), this.layerNames)
|
||||
.then(pcb_stackup_1.default)
|
||||
.then((stackup) => {
|
||||
(0, sharp_1.default)(Buffer.from(stackup.top.svg), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toBuffer()
|
||||
.then((buffer) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
const stream = new node_stream_1.Readable();
|
||||
stream.push(buffer);
|
||||
stream.push(null);
|
||||
resolve(stream);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
ImageGenerator,
|
||||
};
|
@ -1,17 +1,18 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
// @ts-check
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['test/**/*', 'node_modules/**/*']),
|
||||
import eslint from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs}'],
|
||||
plugins: { js },
|
||||
extends: ['js/recommended'],
|
||||
ignores: [
|
||||
'dist/**',
|
||||
'test/**',
|
||||
'node_modules/**',
|
||||
'webpack.dev.js',
|
||||
'webpack.prod.js',
|
||||
],
|
||||
},
|
||||
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs}'],
|
||||
languageOptions: { globals: globals.browser },
|
||||
},
|
||||
]);
|
||||
);
|
||||
|
256
index.js
256
index.js
@ -1,256 +0,0 @@
|
||||
//Modules
|
||||
const AdmZip = require('adm-zip');
|
||||
const { emptyDirSync } = require('fs-extra');
|
||||
const path = require('path');
|
||||
const pcbStackup = require('pcb-stackup');
|
||||
const sharp = require('sharp');
|
||||
const { Readable } = require('node:stream');
|
||||
const { Buffer } = require('node:buffer');
|
||||
const {
|
||||
existsSync,
|
||||
accessSync,
|
||||
createReadStream,
|
||||
mkdirSync,
|
||||
chmodSync,
|
||||
constants,
|
||||
} = require('node:fs');
|
||||
|
||||
//ensureDirSync method
|
||||
function ensureDirSync(directory) {
|
||||
if (!existsSync(directory)) {
|
||||
mkdirSync(directory, { recursive: true });
|
||||
chmodSync(directory, 0o644);
|
||||
}
|
||||
}
|
||||
|
||||
//Class definition
|
||||
class ImageGenerator {
|
||||
constructor(folderConfig, imgConfig, layerNames) {
|
||||
this.tmpDir = folderConfig.tmpDir;
|
||||
this.imgDir = folderConfig.imgDir;
|
||||
this.imgConfig = imgConfig;
|
||||
this.layerNames = layerNames;
|
||||
|
||||
//Ensure folders exist
|
||||
try {
|
||||
if (!existsSync(this.tmpDir)) throw 'Temp dir does not exist';
|
||||
if (!existsSync(this.imgDir)) throw 'Image dir does not exist';
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
|
||||
//Check folder permissions
|
||||
try {
|
||||
accessSync(this.tmpDir, constants.R_OK | constants.W_OK);
|
||||
accessSync(this.imgDir, constants.R_OK | constants.W_OK);
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the passed in zip file
|
||||
* @param {string} fileName Name of the file to be extracted
|
||||
* @param {string} tmpDir Temporary directory to extract to
|
||||
* @returns {number} Number of objects contained in the archive
|
||||
*/
|
||||
static extractArchive(fileName, tmpDir) {
|
||||
// Check archive exists
|
||||
try {
|
||||
if (!existsSync(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
const zip = new AdmZip(fileName);
|
||||
zip.extractAllTo(path.join(tmpDir, 'archive'));
|
||||
|
||||
return zip.getEntries().length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary test method zip file
|
||||
* @param {string} fileName Name of the file to be extracted
|
||||
* @param {string} tmpDir Temporary directory to extract to
|
||||
* @returns {number} Number of objects contained in the archive
|
||||
*/
|
||||
static testArchive(fileName, tmpDir) {
|
||||
// Check archive exists
|
||||
try {
|
||||
if (!existsSync(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
try {
|
||||
const zip = new AdmZip(fileName);
|
||||
return zip.getEntries().length;
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take in a directory of layer files and return an array of the layers files
|
||||
* @param {string} dir Directory containing layer files
|
||||
* @param {Array} layerNames Array of filenames for the desired layers
|
||||
* @returns {Array} Array of paths to the layers files
|
||||
*/
|
||||
static getLayers(dir, layerNames) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Make sure the directory exists
|
||||
if (!existsSync(dir)) {
|
||||
return reject(new Error('Layers folder does not exist.'));
|
||||
}
|
||||
// Check that the required layer files exist in source dir
|
||||
let layersValid = true;
|
||||
layerNames.forEach((layer) => {
|
||||
if (!existsSync(path.join(dir, layer))) layersValid = false;
|
||||
});
|
||||
if (!layersValid) return reject(new Error('Layer not found.'));
|
||||
// Construct array of layers that match the supplied filenames array
|
||||
const layers = layerNames.map((layerName) => ({
|
||||
filename: layerName,
|
||||
gerber: createReadStream(path.join(dir, layerName)),
|
||||
}));
|
||||
return resolve(layers);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up the archive folder in the specified directory
|
||||
* @param {string} dir Path to a directory to clean up
|
||||
*/
|
||||
static cleanupFiles(dir) {
|
||||
try {
|
||||
const folder = path.join(dir, 'archive');
|
||||
emptyDirSync(folder);
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take an archive containing gerber files, config object, temporary dir
|
||||
* and output dir and create a PNG image from the gerber in the output dir
|
||||
* @param {string} gerber Path to an archive file containing gerber
|
||||
* @returns {Promise.<string>} Promise to return path to image
|
||||
*/
|
||||
gerberToImage(gerber) {
|
||||
// Create output dir if it doesn't exist
|
||||
try {
|
||||
// fs.ensureDirSync(this.imgDir, 0o644);
|
||||
ensureDirSync(this.imgDir);
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!existsSync(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(this.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!existsSync(this.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
// Set filenames
|
||||
const imageName = path.basename(gerber, '.zip');
|
||||
const destFile = `${path.join(this.imgDir, imageName)}.png`;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
ImageGenerator.extractArchive(gerber, this.tmpDir);
|
||||
ImageGenerator.getLayers(
|
||||
path.join(this.tmpDir, 'archive'),
|
||||
this.layerNames,
|
||||
)
|
||||
.then(pcbStackup)
|
||||
.then((stackup) => {
|
||||
sharp(Buffer.from(stackup.top.svg), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toFile(destFile);
|
||||
})
|
||||
.then(() => {
|
||||
ImageGenerator.cleanupFiles(this.tmpDir);
|
||||
resolve(destFile);
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Take an archive containing gerber files and return a stream containing
|
||||
* a PNG image from the gerber
|
||||
* @param {string} gerber Path to an archive file containing gerber
|
||||
* @returns {Promise.<stream.Readable>} Promise that resolves to a PNG stream
|
||||
*/
|
||||
gerberToStream(gerber) {
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!existsSync(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(this.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!existsSync(this.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
ImageGenerator.extractArchive(gerber, this.tmpDir);
|
||||
ImageGenerator.getLayers(
|
||||
path.join(this.tmpDir, 'archive'),
|
||||
this.layerNames,
|
||||
)
|
||||
.then(pcbStackup)
|
||||
.then((stackup) => {
|
||||
sharp(Buffer.from(stackup.top.svg), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toBuffer()
|
||||
.then((buffer) => {
|
||||
ImageGenerator.cleanupFiles(this.tmpDir);
|
||||
const stream = new Readable();
|
||||
stream.push(buffer);
|
||||
stream.push(null);
|
||||
resolve(stream);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ImageGenerator,
|
||||
};
|
716
package-lock.json
generated
716
package-lock.json
generated
@ -1,26 +1,29 @@
|
||||
{
|
||||
"name": "@nplayfair/npe_gerber",
|
||||
"version": "0.3.0",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@nplayfair/npe_gerber",
|
||||
"version": "0.3.0",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.16",
|
||||
"fs-extra": "^11.3.0",
|
||||
"jszip": "^3.10.1",
|
||||
"pcb-stackup": "^4.2.8",
|
||||
"sharp": "^0.34.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.29.0",
|
||||
"@types/adm-zip": "^0.5.7",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"eslint": "^9.29.0",
|
||||
"globals": "^16.2.0",
|
||||
"jest": "^30.0.0",
|
||||
"prettier": "^3.5.3"
|
||||
"prettier": "^3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.34.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
@ -533,6 +536,30 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz",
|
||||
@ -1738,6 +1765,44 @@
|
||||
"@tybys/wasm-util": "^0.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "2.0.5",
|
||||
"run-parallel": "^1.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.stat": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
||||
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.walk": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
||||
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.scandir": "2.1.5",
|
||||
"fastq": "^1.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgjs/parseargs": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||
@ -1795,6 +1860,34 @@
|
||||
"integrity": "sha512-4T7uAx5HB6qwKNH7jQDiij4EDe+uP+zlFcccMpZageZA5S2V2GFxm3g5lThJdTaQhp8Or4FLsmu8C/BRdYS7hg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
|
||||
"integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node16": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
|
||||
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tybys/wasm-util": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz",
|
||||
@ -1806,6 +1899,16 @@
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/adm-zip": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.7.tgz",
|
||||
"integrity": "sha512-DNEs/QvmyRLurdQPChqq0Md4zGvPwHerAJYWk9l2jCbD1VPpnzRJorOdiq4zsw09NFbYnhfsoEhWtxIzXpn2yw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
||||
@ -1858,6 +1961,17 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
|
||||
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/jsonfile": "*",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
|
||||
@ -1892,6 +2006,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/jsonfile": {
|
||||
"version": "6.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz",
|
||||
"integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz",
|
||||
@ -1926,6 +2050,276 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.0.tgz",
|
||||
"integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.34.0",
|
||||
"@typescript-eslint/type-utils": "8.34.0",
|
||||
"@typescript-eslint/utils": "8.34.0",
|
||||
"@typescript-eslint/visitor-keys": "8.34.0",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^7.0.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.34.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
|
||||
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.0.tgz",
|
||||
"integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.34.0",
|
||||
"@typescript-eslint/types": "8.34.0",
|
||||
"@typescript-eslint/typescript-estree": "8.34.0",
|
||||
"@typescript-eslint/visitor-keys": "8.34.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz",
|
||||
"integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.34.0",
|
||||
"@typescript-eslint/types": "^8.34.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz",
|
||||
"integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.34.0",
|
||||
"@typescript-eslint/visitor-keys": "8.34.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz",
|
||||
"integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.0.tgz",
|
||||
"integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "8.34.0",
|
||||
"@typescript-eslint/utils": "8.34.0",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz",
|
||||
"integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz",
|
||||
"integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.34.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.34.0",
|
||||
"@typescript-eslint/types": "8.34.0",
|
||||
"@typescript-eslint/visitor-keys": "8.34.0",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^9.0.4",
|
||||
"semver": "^7.6.0",
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
|
||||
"version": "9.0.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
|
||||
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz",
|
||||
"integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.7.0",
|
||||
"@typescript-eslint/scope-manager": "8.34.0",
|
||||
"@typescript-eslint/types": "8.34.0",
|
||||
"@typescript-eslint/typescript-estree": "8.34.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz",
|
||||
"integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.34.0",
|
||||
"eslint-visitor-keys": "^4.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
|
||||
@ -2225,6 +2619,19 @@
|
||||
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-walk": {
|
||||
"version": "8.3.4",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
|
||||
"integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"acorn": "^8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.16",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz",
|
||||
@ -2306,6 +2713,13 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
@ -2764,10 +3178,12 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"node_modules/create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
@ -2853,6 +3269,16 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/eastasianwidth": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||
@ -3159,6 +3585,36 @@
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
|
||||
"integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
"@nodelib/fs.walk": "^1.2.3",
|
||||
"glob-parent": "^5.1.2",
|
||||
"merge2": "^1.3.0",
|
||||
"micromatch": "^4.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-glob/node_modules/glob-parent": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"is-glob": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
@ -3172,6 +3628,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
|
||||
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fb-watchman": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
|
||||
@ -3468,25 +3934,19 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz",
|
||||
"integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/graphemer": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
||||
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
@ -3524,11 +3984,6 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
|
||||
},
|
||||
"node_modules/import-fresh": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
|
||||
@ -3665,11 +4120,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"node_modules/isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
@ -4466,45 +4916,6 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
|
||||
"integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
|
||||
"license": "(MIT OR GPL-3.0-or-later)",
|
||||
"dependencies": {
|
||||
"lie": "~3.3.0",
|
||||
"pako": "~1.0.2",
|
||||
"readable-stream": "~2.3.6",
|
||||
"setimmediate": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip/node_modules/readable-stream": {
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||
"dependencies": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.3",
|
||||
"isarray": "~1.0.0",
|
||||
"process-nextick-args": "~2.0.0",
|
||||
"safe-buffer": "~5.1.1",
|
||||
"string_decoder": "~1.1.1",
|
||||
"util-deprecate": "~1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/jszip/node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"node_modules/jszip/node_modules/string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/keyv": {
|
||||
"version": "4.5.4",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
|
||||
@ -4539,14 +4950,6 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lie": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
|
||||
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
|
||||
"dependencies": {
|
||||
"immediate": "~3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/lines-and-columns": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||
@ -4646,6 +5049,13 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/makeerror": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
|
||||
@ -4663,6 +5073,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
@ -4869,11 +5289,6 @@
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0"
|
||||
},
|
||||
"node_modules/pako": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
|
||||
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
|
||||
},
|
||||
"node_modules/parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@ -5144,11 +5559,6 @@
|
||||
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
@ -5239,6 +5649,17 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/reusify": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
|
||||
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"iojs": ">=1.0.0",
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz",
|
||||
@ -5307,12 +5728,6 @@
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/setimmediate": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
||||
"integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/sharp": {
|
||||
"version": "0.34.2",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.2.tgz",
|
||||
@ -5747,6 +6162,63 @@
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
|
||||
"integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.8.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-node": {
|
||||
"version": "10.9.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
||||
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"ts-node": "dist/bin.js",
|
||||
"ts-node-cwd": "dist/bin-cwd.js",
|
||||
"ts-node-esm": "dist/bin-esm.js",
|
||||
"ts-node-script": "dist/bin-script.js",
|
||||
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||
"ts-script": "dist/bin-script-deprecated.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@swc/core": ">=1.2.50",
|
||||
"@swc/wasm": ">=1.2.50",
|
||||
"@types/node": "*",
|
||||
"typescript": ">=2.7"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@swc/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@swc/wasm": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
@ -5790,6 +6262,43 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.34.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.0.tgz",
|
||||
"integrity": "sha512-MRpfN7uYjTrTGigFCt8sRyNqJFhjN0WwZecldaqhWm+wy0gaRt8Edb/3cuUy0zdq2opJWT6iXINKAtewnDOltQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.34.0",
|
||||
"@typescript-eslint/parser": "8.34.0",
|
||||
"@typescript-eslint/utils": "8.34.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <5.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
||||
@ -5885,6 +6394,13 @@
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
|
||||
@ -6192,6 +6708,16 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
14
package.json
14
package.json
@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "@nplayfair/npe_gerber",
|
||||
"version": "0.3.0",
|
||||
"version": "1.0.0",
|
||||
"description": "Create a PCB image from gerber files",
|
||||
"main": "index.js",
|
||||
"main": "dist/index.js",
|
||||
"types": "types/npe_gerber.d.ts",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"lint": "eslint ."
|
||||
@ -25,15 +26,18 @@
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.16",
|
||||
"fs-extra": "^11.3.0",
|
||||
"jszip": "^3.10.1",
|
||||
"pcb-stackup": "^4.2.8",
|
||||
"sharp": "^0.34.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.29.0",
|
||||
"@types/adm-zip": "^0.5.7",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"eslint": "^9.29.0",
|
||||
"globals": "^16.2.0",
|
||||
"jest": "^30.0.0",
|
||||
"prettier": "^3.5.3"
|
||||
"prettier": "^3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.34.0"
|
||||
}
|
||||
}
|
||||
|
231
src/index.ts
Normal file
231
src/index.ts
Normal file
@ -0,0 +1,231 @@
|
||||
//Modules
|
||||
// const AdmZip = require('adm-zip');
|
||||
import AdmZip from 'adm-zip';
|
||||
import { emptyDirSync, ensureDirSync } from 'fs-extra';
|
||||
import path from 'path';
|
||||
import pcbStackup from 'pcb-stackup';
|
||||
import sharp from 'sharp';
|
||||
import { Readable } from 'node:stream';
|
||||
import { existsSync, accessSync, createReadStream, constants } from 'node:fs';
|
||||
|
||||
//Class definition
|
||||
class ImageGenerator implements ZipExtractor, LayerGenerator {
|
||||
constructor(
|
||||
public folderConfig: FolderConfig,
|
||||
public imgConfig: ImageConfig,
|
||||
public layerNames?: string[],
|
||||
) {
|
||||
//Ensure folders exist
|
||||
if (!existsSync(folderConfig.tmpDir))
|
||||
throw new Error('Temp dir does not exist');
|
||||
|
||||
if (!existsSync(folderConfig.imgDir))
|
||||
throw new Error('Image dir does not exist');
|
||||
|
||||
//Check folder permissions
|
||||
accessSync(folderConfig.tmpDir, constants.R_OK | constants.W_OK);
|
||||
accessSync(folderConfig.imgDir, constants.R_OK | constants.W_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the passed in zip file
|
||||
|
||||
*/
|
||||
public extractArchive(fileName: string, tmpDir: string): number {
|
||||
// Check archive exists
|
||||
if (!existsSync(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
//Check temp folder exists
|
||||
if (!existsSync(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
|
||||
const zip = new AdmZip(fileName);
|
||||
zip.extractAllTo(path.join(tmpDir, 'archive'));
|
||||
|
||||
return zip.getEntries().length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary test method zip file
|
||||
|
||||
*/
|
||||
public testArchive(fileName: string, tmpDir: string): number {
|
||||
// Check archive exists
|
||||
try {
|
||||
if (!existsSync(fileName)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
} catch (e: unknown) {
|
||||
console.error(e);
|
||||
}
|
||||
const zip = new AdmZip(fileName);
|
||||
return zip.getEntries().length;
|
||||
}
|
||||
|
||||
//Layer promise
|
||||
public getLayers(dir: string, layerNames: string[]): Promise<Layers[]> {
|
||||
//Check correct number of layers and folder exists
|
||||
layerNames.forEach((layerName) => {
|
||||
if (!existsSync(path.join(dir, layerName))) {
|
||||
throw `Missing layer: ${layerName}`;
|
||||
}
|
||||
});
|
||||
if (!existsSync(dir)) {
|
||||
throw new Error('Folder not there');
|
||||
}
|
||||
//Return layer promise
|
||||
const layersPromise = new Promise<Layers[]>(function (resolve, reject) {
|
||||
const layers: Layers[] = layerNames.map((layerName: string) => ({
|
||||
filename: layerName,
|
||||
gerber: createReadStream(path.join(dir, layerName)),
|
||||
}));
|
||||
if (layers.length === layerNames.length) {
|
||||
resolve(layers);
|
||||
} else {
|
||||
reject('Invalid layer count');
|
||||
}
|
||||
});
|
||||
return layersPromise;
|
||||
}
|
||||
|
||||
//Clean up the archive folder in the specified directory
|
||||
public static cleanupFiles(dir: string): void {
|
||||
try {
|
||||
const folder = path.join(dir, 'archive');
|
||||
emptyDirSync(folder);
|
||||
} catch (error: unknown) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * Take an archive containing gerber files, config object, temporary dir
|
||||
// * and output dir and create a PNG image from the gerber in the output dir
|
||||
// * @param {string} gerber Path to an archive file containing gerber
|
||||
// * @returns {Promise.<string>} Promise to return path to image
|
||||
|
||||
public gerberToImage(gerber: string) {
|
||||
// Create output dir if it doesn't exist
|
||||
try {
|
||||
ensureDirSync(this.folderConfig.imgDir);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!existsSync(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(this.folderConfig.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!existsSync(this.folderConfig.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
// Set filenames
|
||||
//Use the filename of the gerber zip to determine the output png filename
|
||||
const imageName = path.basename(gerber, '.zip');
|
||||
const destFile = `${path.join(this.folderConfig.imgDir, imageName)}.png`;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.layerNames) {
|
||||
throw new Error('You must supply an array of layer names.');
|
||||
}
|
||||
this.extractArchive(gerber, this.folderConfig.tmpDir);
|
||||
this.getLayers(
|
||||
path.join(this.folderConfig.tmpDir, 'archive'),
|
||||
this.layerNames,
|
||||
)
|
||||
.then(pcbStackup)
|
||||
.then((stackup) => {
|
||||
sharp(Buffer.from(stackup.top.svg as ArrayLike<number>), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toFile(destFile);
|
||||
})
|
||||
.then(() => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
resolve(destFile);
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Take an archive containing gerber files and return a stream containing
|
||||
* a PNG image from the gerber
|
||||
* @param {string} gerber Path to an archive file containing gerber
|
||||
* @returns {Promise.<stream.Readable>} Promise that resolves to a PNG stream
|
||||
*/
|
||||
gerberToStream(gerber: string) {
|
||||
// Check temp and output dirs exist
|
||||
try {
|
||||
if (!existsSync(gerber)) {
|
||||
throw Error('Archive does not exist.');
|
||||
}
|
||||
if (!existsSync(this.folderConfig.tmpDir)) {
|
||||
throw Error('Temporary folder does not exist.');
|
||||
}
|
||||
if (!existsSync(this.folderConfig.imgDir)) {
|
||||
throw Error('Output folder does not exist.');
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.extractArchive(gerber, this.folderConfig.tmpDir);
|
||||
if (!this.layerNames) throw new Error('No layers provided');
|
||||
this.getLayers(
|
||||
path.join(this.folderConfig.tmpDir, 'archive'),
|
||||
this.layerNames,
|
||||
)
|
||||
.then(pcbStackup)
|
||||
.then((stackup) => {
|
||||
sharp(Buffer.from(stackup.top.svg as ArrayLike<number>), {
|
||||
density: this.imgConfig.density,
|
||||
})
|
||||
.resize({ width: this.imgConfig.resizeWidth })
|
||||
.png({ compressionLevel: this.imgConfig.compLevel })
|
||||
.toBuffer()
|
||||
.then((buffer) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
const stream = new Readable();
|
||||
stream.push(buffer);
|
||||
stream.push(null);
|
||||
resolve(stream);
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
ImageGenerator.cleanupFiles(this.folderConfig.tmpDir);
|
||||
reject(new Error(e));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ImageGenerator,
|
||||
};
|
@ -1,8 +1,8 @@
|
||||
const path = require('path');
|
||||
const { readdirSync, ReadStream } = require('node:fs');
|
||||
const { Readable } = require('node:stream');
|
||||
const { ImageGenerator } = require('../index.js');
|
||||
require('../index.js');
|
||||
const { ImageGenerator } = require('../dist/index.js');
|
||||
require('../dist/index.js');
|
||||
|
||||
const testGerber = path.join(__dirname, 'Arduino-Pro-Mini.zip');
|
||||
const incompleteGerber = path.join(__dirname, 'incomplete.zip');
|
||||
@ -80,8 +80,8 @@ describe('Creating an ImageGenerator object', () => {
|
||||
expect(imgGen.imgConfig.compLevel).toBe(1);
|
||||
});
|
||||
test('folders should be the ones specified in the folder config parameter', () => {
|
||||
expect(imgGen.tmpDir).toBe(path.join(__dirname, 'tmp'));
|
||||
expect(imgGen.imgDir).toBe(path.join(__dirname, 'tmp'));
|
||||
expect(imgGen.folderConfig.tmpDir).toBe(path.join(__dirname, 'tmp'));
|
||||
expect(imgGen.folderConfig.imgDir).toBe(path.join(__dirname, 'tmp'));
|
||||
});
|
||||
});
|
||||
|
||||
@ -109,61 +109,56 @@ describe('Passing in', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Testing static methods
|
||||
//Layer methods
|
||||
describe('Getting layers', () => {
|
||||
test('should return a promise of array layers', () => {
|
||||
expect.assertions(1);
|
||||
return ImageGenerator.getLayers(testLayers, layerNames).then((data) => {
|
||||
expect(data).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
filename: expect.any(String),
|
||||
gerber: expect.any(ReadStream),
|
||||
}),
|
||||
]),
|
||||
);
|
||||
});
|
||||
const imgGen = new ImageGenerator(folderConfig, imgConfig);
|
||||
test('should return a promise of array of layers', () => {
|
||||
expect(imgGen.getLayers(testLayers, layerNames)).resolves.toBeInstanceOf(
|
||||
Array,
|
||||
);
|
||||
});
|
||||
test('should reject promise with error if the layers folder is not valid', () => {
|
||||
expect.assertions(1);
|
||||
return expect(
|
||||
ImageGenerator.getLayers('./invalid_folder', layerNames),
|
||||
).rejects.toThrow(new Error('Layers folder does not exist.'));
|
||||
|
||||
// test('should return a promise of array of layers', () => {
|
||||
// return imgGen.getLayers(testLayers, layerNames).then((data) => {
|
||||
// expect(data).toBeInstanceOf(Array);
|
||||
// });
|
||||
// });
|
||||
|
||||
test('should throw error if the layers folder is not valid', () => {
|
||||
expect(() => {
|
||||
imgGen.getLayers('some_invalid_folder', layerNames);
|
||||
}).toThrow();
|
||||
});
|
||||
test('should reject promise with error if there is not the correct number of layers', () => {
|
||||
expect.assertions(1);
|
||||
return expect(
|
||||
ImageGenerator.getLayers(emptyFolder, layerNames),
|
||||
).rejects.toThrow(new Error('Layer not found.'));
|
||||
|
||||
test('should throw error if incorrect number of layers supplied', () => {
|
||||
expect(() => {
|
||||
imgGen.getLayers(emptyFolder, layerNames);
|
||||
}).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
//Archive methods
|
||||
describe('When extracting an archive', () => {
|
||||
const imgGen = new ImageGenerator(folderConfig, imgConfig);
|
||||
test('a non-existent archive should throw an error', () => {
|
||||
expect(() =>
|
||||
ImageGenerator.extractArchive('invalid.zip', folderConfig.tmpDir),
|
||||
imgGen.extractArchive('invalid.zip', folderConfig.tmpDir),
|
||||
).toThrow();
|
||||
});
|
||||
test('if the temp dir does not exist it should throw an error', () => {
|
||||
expect(() =>
|
||||
ImageGenerator.extractArchive(testGerber, './invalid_dir'),
|
||||
).toThrow(Error);
|
||||
expect(() => imgGen.extractArchive(testGerber, 'some_invalid_dir')).toThrow(
|
||||
Error,
|
||||
);
|
||||
});
|
||||
test('it should load the archive and return the number of files extracted', () => {
|
||||
expect(() => {
|
||||
ImageGenerator.testArchive(testGerber, archiveTestFolder);
|
||||
imgGen.testArchive(testGerber, archiveTestFolder);
|
||||
}).not.toThrow();
|
||||
expect(ImageGenerator.testArchive(testGerber, archiveTestFolder)).toEqual(
|
||||
12,
|
||||
);
|
||||
expect(imgGen.testArchive(testGerber, archiveTestFolder)).toEqual(12);
|
||||
});
|
||||
test('it should extract archive and all files should be present', () => {
|
||||
expect(ImageGenerator.testArchive(testGerber, archiveTestFolder)).toEqual(
|
||||
12,
|
||||
);
|
||||
ImageGenerator.extractArchive(testGerber, archiveTestFolder);
|
||||
expect(imgGen.testArchive(testGerber, archiveTestFolder)).toEqual(12);
|
||||
imgGen.extractArchive(testGerber, archiveTestFolder);
|
||||
const dirents = readdirSync(archiveTestFolder, {
|
||||
recursive: true,
|
||||
withFileTypes: true,
|
||||
|
115
tsconfig.json
Normal file
115
tsconfig.json
Normal file
@ -0,0 +1,115 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
||||
// "libReplacement": true, /* Enable lib replacement. */
|
||||
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
||||
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
||||
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
||||
// "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
|
||||
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
||||
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
||||
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
||||
// "noUncheckedSideEffectImports": true, /* Check side effect imports. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files. */
|
||||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
||||
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
/* JavaScript Support */
|
||||
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
||||
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
|
||||
/* Interop Constraints */
|
||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
||||
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
|
||||
// "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
// "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
|
||||
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
||||
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
||||
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
||||
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"include": ["src", "types/npe_gerber.d.ts"],
|
||||
"exclude": ["node_modules", "dist/**/*", "test/**/*"]
|
||||
}
|
23
types/npe_gerber.d.ts
vendored
Normal file
23
types/npe_gerber.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
interface ImageConfig {
|
||||
resizeWidth: number;
|
||||
density: number;
|
||||
compLevel: number;
|
||||
}
|
||||
|
||||
interface FolderConfig {
|
||||
tmpDir: string;
|
||||
imgDir: string;
|
||||
}
|
||||
|
||||
interface ZipExtractor {
|
||||
extractArchive(fileName: string, tmpDir: string): number;
|
||||
}
|
||||
|
||||
interface Layers {
|
||||
filename: string;
|
||||
gerber: ReadStream;
|
||||
}
|
||||
|
||||
interface LayerGenerator {
|
||||
getLayers(dir: string, layerNames: string[]): Promise<Layers[]>;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user