Lines 1-36javascript
3 * Reasonix ้ฃไนฆ Bot โ ๅธ่ฝฝ่ฟๅ่ๆฌ
4 * ่ฟๅ deploy ๆๅ็ๆๆไฟฎๆน๏ผๆฏๆ้ๆฉๆงไฟ็ๆฐๆฎใ
6 * ๆจ่็จๆณ: npx @u1in/reasonix-feishu-deploy --undeploy
7 * ไนๅฏ็ดๆฅ: node undeploy.mjs
9import { createRequire } from 'module';
10const _require = createRequire(import.meta.url);
14 prompts = _require('prompts');
16 console.log('ๆญฃๅจๅฎ่ฃ
prompts ไพ่ต...');
17 const { execSync } = await import('child_process');
18 // ไผๅ
ๅฎ่ฃ
ๅฐๅ
ๆฌๅฐ๏ผnpx ็ผๅญๅฏ่ฝๅช่ฏป๏ผๅคฑ่ดฅๅ่ฃ
ๅฐๅ
จๅฑ๏ผ
HighChild Process
Package source references child process execution.
scripts/undeploy.mjsView on unpkg ยท L16 HighRuntime Package Install
Package source invokes a package manager install command at runtime.
scripts/undeploy.mjsView on unpkg ยท L5 20 const { fileURLToPath } = await import('url');
21 const { resolve, dirname } = await import('path');
22 const pkgDir = resolve(dirname(fileURLToPath(import.meta.url)), '..');
23 execSync('npm install --no-save prompts 2>/dev/null', { cwd: pkgDir, stdio: 'inherit' });
25 execSync('npm install -g prompts 2>/dev/null', { stdio: 'inherit' });
27 prompts = _require('prompts');
30import { existsSync, readFileSync, writeFileSync, unlinkSync, rmSync, readdirSync, statSync } from 'fs';
31import { homedir } from 'os';
32import { execSync } from 'child_process';
34const HOME = homedir();
35const CONFIG_DIR = `${HOME}/.config/reasonix-bot`;
MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
scripts/undeploy.mjsView on unpkg ยท L16