Lines 1-30javascript
2import { createHash } from 'node:crypto';
3import { createWriteStream, existsSync } from 'node:fs';
4import { chmod, mkdir, readFile, rm } from 'node:fs/promises';
5import { dirname, join } from 'node:path';
6import { pipeline } from 'node:stream/promises';
7import { fileURLToPath } from 'node:url';
8import { execFileSync } from 'node:child_process';
9import { createRequire } from 'node:module';
11const require = createRequire(import.meta.url);
12const root = dirname(dirname(fileURLToPath(import.meta.url)));
MediumDynamic Require
Package source references dynamic require/import behavior.
scripts/install.jsView on unpkg · L10 13const pkg = require(join(root, 'package.json'));
15if (existsSync(join(root, '..', '..', 'pnpm-workspace.yaml'))) {
19const repo = process.env.INVOKER_RELEASE_REPOSITORY ?? 'Neko-Catpital-Labs/Invoker';
20const baseUrl = process.env.INVOKER_RELEASE_BASE_URL ?? `https://github.com/${repo}/releases/download/v${pkg.version}`;
21const vendor = join(root, 'vendor');
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
scripts/install.jsView on unpkg · L7 23const arch = process.arch;
24const linuxAssetArch = arch === 'x64' ? 'x86_64' : arch;
25const asset = process.platform === 'darwin'
26 ? `Invoker-${pkg.version}-${arch}.zip`
27 : process.platform === 'linux'
28 ? `Invoker-${pkg.version}-${linuxAssetArch}.AppImage`