chore: added updated dependencies

This commit is contained in:
SethCohen
2025-06-17 02:48:23 -04:00
parent 0559b87ee8
commit 067d2cb017
5742 changed files with 831074 additions and 37878 deletions
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env node
export {};
Generated Vendored Executable
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = require("./index.js");
void (0, index_js_1.checkAndPreparePackage)(process.argv[2], process.argv[3], ['1', 'check', 'true', 'yes'].includes(process.argv[4]));
//# sourceMappingURL=cli.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,yCAAmD;AAEnD,KAAK,IAAA,iCAAsB,EACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EACf,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACxD,CAAA"}
+9
View File
@@ -0,0 +1,9 @@
import { PackageJson } from './types.js';
export declare const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org/";
export declare const meta: PackageJson;
export declare const LOG_PREFIX: string;
export declare const WASM32 = "wasm32";
export declare const WASI = "wasi";
export declare const WASM32_WASI = "wasm32-wasi";
export declare const EABI = "eabi";
export declare const PACKAGE_JSON = "package.json";
+14
View File
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PACKAGE_JSON = exports.EABI = exports.WASM32_WASI = exports.WASI = exports.WASM32 = exports.LOG_PREFIX = exports.meta = exports.DEFAULT_NPM_REGISTRY = void 0;
const path = require("node:path");
exports.DEFAULT_NPM_REGISTRY = 'https://registry.npmjs.org/';
exports.meta = require(path.resolve(__dirname, '../package.json'));
const { name, version } = exports.meta;
exports.LOG_PREFIX = `[${name}@${version}] `;
exports.WASM32 = 'wasm32';
exports.WASI = 'wasi';
exports.WASM32_WASI = `${exports.WASM32}-${exports.WASI}`;
exports.EABI = 'eabi';
exports.PACKAGE_JSON = 'package.json';
//# sourceMappingURL=constants.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,kCAAiC;AAIpB,QAAA,oBAAoB,GAAG,6BAA6B,CAAA;AAEpD,QAAA,IAAI,GAAG,OAAO,CACzB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAC5B,CAAA;AAEhB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,YAAI,CAAA;AAEjB,QAAA,UAAU,GAAG,IAAI,IAAI,IAAI,OAAO,IAAI,CAAA;AAEpC,QAAA,MAAM,GAAG,QAAQ,CAAA;AACjB,QAAA,IAAI,GAAG,MAAM,CAAA;AACb,QAAA,WAAW,GAAG,GAAG,cAAM,IAAI,YAAI,EAAE,CAAA;AAEjC,QAAA,IAAI,GAAG,MAAM,CAAA;AAEb,QAAA,YAAY,GAAG,cAAc,CAAA"}
+13
View File
@@ -0,0 +1,13 @@
import { NapiInfo, PackageJson } from './types.js';
export declare function getGlobalNpmRegistry(): string;
export declare function removeRecursive(dir: string): void;
export declare function downloadedNodePath(name: string, subpath: string): string;
export declare function getNapiInfoFromPackageJson(packageJson: PackageJson, checkVersion: true): NapiInfo & {
version: string;
};
export declare function getNapiInfoFromPackageJson(packageJson: PackageJson, checkVersion?: boolean): NapiInfo;
export declare function getNapiNativeTarget(): string[] | string;
export declare function getNapiNativeTargets(): string[];
export declare function getErrorMessage(err: unknown): string;
export declare function errorLog(message: string, ...args: unknown[]): void;
export declare function errorMessage(message: string, extra?: string): string;
+234
View File
@@ -0,0 +1,234 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobalNpmRegistry = getGlobalNpmRegistry;
exports.removeRecursive = removeRecursive;
exports.downloadedNodePath = downloadedNodePath;
exports.getNapiInfoFromPackageJson = getNapiInfoFromPackageJson;
exports.getNapiNativeTarget = getNapiNativeTarget;
exports.getNapiNativeTargets = getNapiNativeTargets;
exports.getErrorMessage = getErrorMessage;
exports.errorLog = errorLog;
exports.errorMessage = errorMessage;
const node_child_process_1 = require("node:child_process");
const fs = require("node:fs");
const path = require("node:path");
const constants_js_1 = require("./constants.js");
const target_js_1 = require("./target.js");
function getGlobalNpmRegistry() {
try {
const registry = (0, node_child_process_1.execSync)('npm config get registry', {
encoding: 'utf8',
}).trim();
return registry.endsWith('/') ? registry : `${registry}/`;
}
catch {
return constants_js_1.DEFAULT_NPM_REGISTRY;
}
}
function removeRecursive(dir) {
for (const entry of fs.readdirSync(dir)) {
const entryPath = path.join(dir, entry);
let stats;
try {
stats = fs.lstatSync(entryPath);
}
catch {
continue;
}
if (stats.isDirectory()) {
removeRecursive(entryPath);
}
else {
fs.unlinkSync(entryPath);
}
}
fs.rmdirSync(dir);
}
function downloadedNodePath(name, subpath) {
const pkgLibDir = path.dirname(require.resolve(name + '/package.json'));
return path.join(pkgLibDir, path.basename(subpath));
}
function getNapiInfoFromPackageJson(packageJson, checkVersion) {
const { name, napi: napi_, optionalDependencies } = packageJson;
const targets = napi_?.targets ?? napi_?.triples?.additional;
if (!targets?.length) {
throw new Error(errorMessage(`No \`napi.targets\` nor \`napi.triples.additional\` field found in \`${name}\`'s \`package.json\`. Please ensure the package is built with NAPI support.`));
}
const napi = napi_;
napi.binaryName ?? (napi.binaryName = napi.name);
napi.packageName ?? (napi.packageName = napi.package?.name ?? name);
napi.targets = targets;
if (!optionalDependencies) {
return { napi };
}
let version;
for (const target of targets) {
const { platformArchABI } = (0, target_js_1.parseTriple)(target);
const pkg = `${napi.packageName}-${platformArchABI}`;
const packageVersion = optionalDependencies[pkg];
if (!packageVersion) {
continue;
}
if (version) {
if (checkVersion && version !== packageVersion) {
throw new Error(errorMessage(`Inconsistent package versions found for \`${name}\` with \`${pkg}\` v${packageVersion} vs v${version}.`));
}
}
else if (packageVersion) {
version = packageVersion;
if (!checkVersion) {
break;
}
}
}
return { napi, version };
}
function isMusl() {
let musl = false;
if (process.platform === 'linux') {
musl = isMuslFromFilesystem();
if (musl === null) {
musl = isMuslFromReport();
}
if (musl === null) {
musl = isMuslFromChildProcess();
}
}
return musl;
}
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
function isMuslFromFilesystem() {
try {
return fs.readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
}
catch {
return null;
}
}
function isMuslFromReport() {
let report = null;
if (typeof process.report.getReport === 'function') {
process.report.excludeNetwork = true;
report = process.report.getReport();
}
if (!report) {
return null;
}
if ('header' in report &&
report.header != null &&
typeof report.header === 'object' &&
'glibcVersionRuntime' in report.header &&
report.header.glibcVersionRuntime) {
return false;
}
return ('sharedObjects' in report &&
Array.isArray(report.sharedObjects) &&
report.sharedObjects.some(isFileMusl));
}
function isMuslFromChildProcess() {
try {
return (0, node_child_process_1.execSync)('ldd --version', { encoding: 'utf8' }).includes('musl');
}
catch {
return false;
}
}
function getNapiNativeTarget() {
switch (process.platform) {
case 'android': {
if (process.arch === 'arm64') {
return 'android-arm64';
}
if (process.arch === 'arm') {
return 'android-arm-eabi';
}
break;
}
case 'win32': {
if (process.arch === 'x64') {
return 'win32-x64-msvc';
}
if (process.arch === 'ia32') {
return 'win32-ia32-msvc';
}
if (process.arch === 'arm64') {
return 'win32-arm64-msvc';
}
break;
}
case 'darwin': {
const targets = ['darwin-universal'];
if (process.arch === 'x64') {
targets.push('darwin-x64');
}
else if (process.arch === 'arm64') {
targets.push('darwin-arm64');
}
return targets;
}
case 'freebsd': {
if (process.arch === 'x64') {
return 'freebsd-x64';
}
if (process.arch === 'arm64') {
return 'freebsd-arm64';
}
break;
}
case 'linux': {
if (process.arch === 'x64') {
if (isMusl()) {
return 'linux-x64-musl';
}
return 'linux-x64-gnu';
}
if (process.arch === 'arm64') {
if (isMusl()) {
return 'linux-arm64-musl';
}
return 'linux-arm64-gnu';
}
if (process.arch === 'arm') {
if (isMusl()) {
return 'linux-arm-musleabihf';
}
return 'linux-arm-gnueabihf';
}
if (process.arch === 'riscv64') {
if (isMusl()) {
return 'linux-riscv64-musl';
}
return 'linux-riscv64-gnu';
}
if (process.arch === 'ppc64') {
return 'linux-ppc64-gnu';
}
if (process.arch === 's390x') {
return 'linux-s390x-gnu';
}
break;
}
}
return [];
}
const WASI_TARGET = 'wasm32-wasi';
function getNapiNativeTargets() {
if (process.versions.webcontainer) {
return [WASI_TARGET];
}
const targets = getNapiNativeTarget();
if (Array.isArray(targets)) {
return [...targets, WASI_TARGET];
}
return [targets, WASI_TARGET];
}
function getErrorMessage(err) {
return err?.message || String(err);
}
function errorLog(message, ...args) {
console.error(`${constants_js_1.LOG_PREFIX}${message}`, ...args);
}
function errorMessage(message, extra) {
return `${constants_js_1.LOG_PREFIX}${message}` + (extra ? ': ' + extra : '');
}
//# sourceMappingURL=helpers.js.map
File diff suppressed because one or more lines are too long
+6
View File
@@ -0,0 +1,6 @@
import type { PackageJson } from './types.js';
export type * from './types.js';
export declare function isNpm(): boolean | undefined;
export declare function isPnp(): boolean;
export declare function checkAndPreparePackage(packageName: string, version?: string, checkVersion?: boolean): Promise<void>;
export declare function checkAndPreparePackage(packageJson: PackageJson, checkVersion?: boolean): Promise<void>;
+239
View File
@@ -0,0 +1,239 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNpm = isNpm;
exports.isPnp = isPnp;
exports.checkAndPreparePackage = checkAndPreparePackage;
const node_child_process_1 = require("node:child_process");
const fs = require("node:fs");
const https = require("node:https");
const path = require("node:path");
const zlib = require("node:zlib");
const constants_js_1 = require("./constants.js");
const helpers_js_1 = require("./helpers.js");
function fetch(url) {
return new Promise((resolve, reject) => {
https
.get(url, res => {
if ((res.statusCode === 301 || res.statusCode === 302) &&
res.headers.location) {
fetch(res.headers.location).then(resolve, reject);
return;
}
if (res.statusCode !== 200) {
return reject(new Error(`Server responded with ${res.statusCode}`));
}
const chunks = [];
res.on('data', (chunk) => chunks.push(chunk));
res.on('end', () => resolve(Buffer.concat(chunks)));
})
.on('error', reject);
});
}
function extractFileFromTarGzip(buffer, subpath) {
try {
buffer = zlib.unzipSync(buffer);
}
catch (err) {
throw new Error((0, helpers_js_1.errorMessage)(`Invalid gzip data in archive`, (0, helpers_js_1.getErrorMessage)(err)));
}
const str = (i, n) => String.fromCodePoint(...buffer.subarray(i, i + n)).replace(/\0.*$/, '');
let offset = 0;
subpath = `package/${subpath}`;
while (offset < buffer.length) {
const name = str(offset, 100);
const size = Number.parseInt(str(offset + 124, 12), 8);
offset += 512;
if (!Number.isNaN(size)) {
if (name === subpath) {
return buffer.subarray(offset, offset + size);
}
offset += (size + 511) & ~511;
}
}
throw new Error((0, helpers_js_1.errorMessage)(`Could not find \`${subpath}\` in archive`));
}
function isNpm() {
return process.env.npm_config_user_agent?.startsWith('npm/');
}
function isPnp() {
return !!process.versions.pnp;
}
function installUsingNPM(hostPkg, pkg, version, target, subpath, nodePath) {
const isWasm32Wasi = target === constants_js_1.WASM32_WASI;
const env = { ...process.env, npm_config_global: undefined };
const pkgDir = path.dirname(require.resolve(hostPkg + `/${constants_js_1.PACKAGE_JSON}`));
const installDir = path.join(pkgDir, 'npm-install');
try {
fs.mkdirSync(installDir, { recursive: true });
}
catch (err) {
const error = err;
if (error.code === 'EROFS') {
(0, helpers_js_1.errorLog)(`Failed to create the temporary directory on read-only location: ${error.message}`);
(0, helpers_js_1.errorLog)(`You have to install \`${pkg}\` manually in this case.`);
return;
}
throw err;
}
try {
const packageJsonPath = path.join(installDir, constants_js_1.PACKAGE_JSON);
fs.writeFileSync(packageJsonPath, '{}');
(0, node_child_process_1.execSync)(`npm install --loglevel=error --prefer-offline --no-audit --progress=false${isWasm32Wasi ? ` --cpu=${constants_js_1.WASM32} --force` : ''} ${pkg}@${version}`, { cwd: installDir, stdio: 'pipe', env });
if (isWasm32Wasi) {
fs.unlinkSync(packageJsonPath);
}
const nodeModulesDir = path.join(installDir, 'node_modules');
try {
if (isWasm32Wasi) {
const newNodeModulesDir = path.resolve(installDir, '../node_modules');
const dirs = fs.readdirSync(nodeModulesDir);
for (const dir of dirs) {
if (dir.startsWith('@')) {
const newPath = path.join(newNodeModulesDir, dir);
fs.mkdirSync(newPath, { recursive: true });
const subdir = path.join(nodeModulesDir, dir);
const nestedDirs = fs.readdirSync(subdir);
for (const nestedDir of nestedDirs) {
try {
fs.renameSync(path.join(subdir, nestedDir), path.join(newPath, nestedDir));
}
catch {
}
}
}
else {
try {
fs.renameSync(path.join(nodeModulesDir, dir), path.join(newNodeModulesDir, dir));
}
catch {
}
}
}
}
else {
const newPath = path.resolve(pkgDir, hostPkg
.split('/')
.map(() => '..')
.join('/'), pkg);
fs.mkdirSync(newPath, { recursive: true });
fs.renameSync(path.join(nodeModulesDir, pkg), newPath);
}
}
catch {
fs.renameSync(path.join(nodeModulesDir, pkg, subpath), nodePath);
}
}
finally {
try {
(0, helpers_js_1.removeRecursive)(installDir);
}
catch {
}
}
}
async function downloadDirectlyFromNPM(pkg, version, subpath, nodePath) {
const url = `${(0, helpers_js_1.getGlobalNpmRegistry)()}${pkg}/-/${pkg.startsWith('@') ? pkg.split('/')[1] : pkg}-${version}.tgz`;
(0, helpers_js_1.errorLog)(`Trying to download ${JSON.stringify(url)}`);
try {
fs.writeFileSync(nodePath, extractFileFromTarGzip(await fetch(url), subpath));
}
catch (err) {
(0, helpers_js_1.errorLog)(`Failed to download ${JSON.stringify(url)}`, (0, helpers_js_1.getErrorMessage)(err));
throw err;
}
}
async function checkAndPreparePackage(packageNameOrPackageJson, versionOrCheckVersion, checkVersion) {
let packageJson;
if (typeof packageNameOrPackageJson === 'string') {
try {
packageJson = require(packageNameOrPackageJson + `/${constants_js_1.PACKAGE_JSON}`);
}
catch {
if (typeof versionOrCheckVersion !== 'string') {
throw new TypeError((0, helpers_js_1.errorMessage)(`Failed to load \`${constants_js_1.PACKAGE_JSON}\` from \`${packageNameOrPackageJson}\`, please provide a version.`));
}
const pkg = packageNameOrPackageJson;
const packageJsonBuffer = await fetch(`${(0, helpers_js_1.getGlobalNpmRegistry)()}${pkg}/${versionOrCheckVersion}`);
packageJson = JSON.parse(packageJsonBuffer.toString('utf8'));
}
}
else {
packageJson = packageNameOrPackageJson;
if (checkVersion === undefined &&
typeof versionOrCheckVersion === 'boolean') {
checkVersion = versionOrCheckVersion;
}
}
const { name, version: pkgVersion, optionalDependencies } = packageJson;
const { napi, version = pkgVersion } = (0, helpers_js_1.getNapiInfoFromPackageJson)(packageJson, checkVersion);
if (checkVersion && pkgVersion !== version) {
throw new Error((0, helpers_js_1.errorMessage)(`Inconsistent package versions found for \`${name}\` v${pkgVersion} vs \`${napi.packageName}\` v${version}.`));
}
const targets = (0, helpers_js_1.getNapiNativeTargets)();
for (const target of targets) {
const pkg = `${napi.packageName}-${target}`;
if (!optionalDependencies?.[pkg]) {
continue;
}
const isWasm32Wasi = target === constants_js_1.WASM32_WASI;
const binaryPrefix = napi.binaryName ? `${napi.binaryName}.` : '';
const subpath = `${binaryPrefix}${target}.${isWasm32Wasi ? 'wasm' : 'node'}`;
try {
require.resolve(`${pkg}/${subpath}`);
break;
}
catch {
try {
require.resolve(`${name}/${subpath}`);
break;
}
catch { }
if (isPnp()) {
if (isWasm32Wasi) {
try {
(0, node_child_process_1.execSync)(`yarn add -D ${pkg}@${version}`);
}
catch (err) {
(0, helpers_js_1.errorLog)(`Failed to install package \`${pkg}\` automatically in the yarn P'n'P environment`, (0, helpers_js_1.getErrorMessage)(err));
(0, helpers_js_1.errorLog)("You'll have to install it manually in this case.");
}
}
return;
}
if (!isNpm()) {
(0, helpers_js_1.errorLog)(`Failed to find package "${pkg}" on the file system
This can happen if you use the "--no-optional" flag. The "optionalDependencies"
${constants_js_1.PACKAGE_JSON} feature is used by ${name} to install the correct napi binary
for your current platform. This install script will now attempt to work around
this. If that fails, you need to remove the "--no-optional" flag to use ${name}.
`);
}
let nodePath;
try {
nodePath = (0, helpers_js_1.downloadedNodePath)(name, subpath);
}
catch {
const nodeModulesDir = path.resolve(require.resolve(constants_js_1.meta.name + `/${constants_js_1.PACKAGE_JSON}`), '../..');
nodePath = path.join(nodeModulesDir, name, subpath);
fs.mkdirSync(path.dirname(nodePath), { recursive: true });
}
try {
(0, helpers_js_1.errorLog)(`Trying to install package "${pkg}" using npm`);
installUsingNPM(name, pkg, version, target, subpath, nodePath);
break;
}
catch (err) {
(0, helpers_js_1.errorLog)(`Failed to install package "${pkg}" using npm`, (0, helpers_js_1.getErrorMessage)(err));
try {
await downloadDirectlyFromNPM(pkg, version, subpath, nodePath);
break;
}
catch (err) {
throw new Error((0, helpers_js_1.errorMessage)(`Failed to install package "${pkg}"`, (0, helpers_js_1.getErrorMessage)(err)));
}
}
}
}
}
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
import { Target } from './types.js';
export declare function parseTriple(rawTriple: string): Target;
+56
View File
@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseTriple = parseTriple;
const constants_js_1 = require("./constants.js");
const CpuToNodeArch = {
x86_64: 'x64',
aarch64: 'arm64',
i686: 'ia32',
armv7: 'arm',
riscv64gc: 'riscv64',
powerpc64le: 'ppc64',
};
const SysToNodePlatform = {
linux: 'linux',
freebsd: 'freebsd',
darwin: 'darwin',
windows: 'win32',
};
function parseTriple(rawTriple) {
if (rawTriple === constants_js_1.WASM32_WASI ||
rawTriple === `${constants_js_1.WASM32_WASI}-preview1-threads` ||
rawTriple.startsWith(`${constants_js_1.WASM32}-${constants_js_1.WASI}p`)) {
return {
triple: rawTriple,
platformArchABI: constants_js_1.WASM32_WASI,
platform: constants_js_1.WASI,
arch: constants_js_1.WASM32,
abi: constants_js_1.WASI,
};
}
const triple = rawTriple.endsWith(constants_js_1.EABI)
? `${rawTriple.slice(0, -4)}-${constants_js_1.EABI}`
: rawTriple;
const triples = triple.split('-');
let cpu;
let sys;
let abi = null;
if (triples.length === 2) {
;
[cpu, sys] = triples;
}
else {
;
[cpu, , sys, abi = null] = triples;
}
const platform = SysToNodePlatform[sys] ?? sys;
const arch = CpuToNodeArch[cpu] ?? cpu;
return {
triple: rawTriple,
platformArchABI: abi ? `${platform}-${arch}-${abi}` : `${platform}-${arch}`,
platform,
arch,
abi,
};
}
//# sourceMappingURL=target.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"target.js","sourceRoot":"","sources":["../src/target.ts"],"names":[],"mappings":";;AAqCA,kCA0CC;AA7ED,iDAAgE;AAGhE,MAAM,aAAa,GAA+B;IAChD,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,OAAO;CACrB,CAAA;AAED,MAAM,iBAAiB,GAA6B;IAClD,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,OAAO;CACjB,CAAA;AAkBD,SAAgB,WAAW,CAAC,SAAiB;IAC3C,IACE,SAAS,KAAK,0BAAW;QACzB,SAAS,KAAK,GAAG,0BAAW,mBAAmB;QAC/C,SAAS,CAAC,UAAU,CAAC,GAAG,qBAAM,IAAI,mBAAI,GAAG,CAAC,EAC1C,CAAC;QACD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,eAAe,EAAE,0BAAW;YAC5B,QAAQ,EAAE,mBAAI;YACd,IAAI,EAAE,qBAAM;YACZ,GAAG,EAAE,mBAAI;SACV,CAAA;IACH,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,mBAAI,CAAC;QACrC,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,mBAAI,EAAE;QACrC,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACjC,IAAI,GAAW,CAAA;IACf,IAAI,GAAW,CAAA;IACf,IAAI,GAAG,GAAkB,IAAI,CAAA;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAGzB,CAAC;QAAA,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAA;IACvB,CAAC;SAAM,CAAC;QAKN,CAAC;QAAA,CAAC,GAAG,EAAE,AAAD,EAAG,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,OAAO,CAAA;IACrC,CAAC;IAED,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,IAAK,GAAgB,CAAA;IAC5D,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,IAAK,GAAkB,CAAA;IACtD,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,eAAe,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE;QAC3E,QAAQ;QACR,IAAI;QACJ,GAAG;KACJ,CAAA;AACH,CAAC"}
+37
View File
@@ -0,0 +1,37 @@
export interface Napi {
binaryName?: string;
name?: string;
packageName?: string;
package?: {
name: string;
};
targets?: string[];
triples?: {
defaults?: boolean;
additional?: string[];
};
wasm?: {
browser?: {
fs?: boolean;
};
};
}
export interface NapiInfo {
napi: Napi;
version?: string;
}
export interface PackageJson {
name: string;
version: string;
optionalDependencies?: Partial<Record<string, string>>;
napi?: Napi;
}
export type Platform = NodeJS.Platform | 'wasi' | 'wasm';
export type NodeJSArch = NodeJS.Architecture | 'universal' | 'wasm32' | 'x32';
export interface Target {
triple: string;
platformArchABI: string;
platform: Platform;
arch: NodeJSArch;
abi: string | null;
}
+3
View File
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}