���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.nvm
/
versions
/
node
/
v17.6.0
/
lib
/
node_modules
/
npm
/
lib
/
commands
/
Viewing: edit.js
// npm edit <pkg> // open the package folder in the $EDITOR const { resolve } = require('path') const fs = require('graceful-fs') const { spawn } = require('child_process') const splitPackageNames = require('../utils/split-package-names.js') const completion = require('../utils/completion/installed-shallow.js') const BaseCommand = require('../base-command.js') class Edit extends BaseCommand { static description = 'Edit an installed package' static name = 'edit' static usage = ['<pkg>[/<subpkg>...]'] static params = ['editor'] // TODO /* istanbul ignore next */ async completion (opts) { return completion(this.npm, opts) } async exec (args) { if (args.length !== 1) { throw this.usageError() } const path = splitPackageNames(args[0]) const dir = resolve(this.npm.dir, path) // graceful-fs does not promisify await new Promise((resolve, reject) => { fs.lstat(dir, (err) => { if (err) { return reject(err) } const [bin, ...args] = this.npm.config.get('editor').split(/\s+/) const editor = spawn(bin, [...args, dir], { stdio: 'inherit' }) editor.on('exit', (code) => { if (code) { return reject(new Error(`editor process exited with code: ${code}`)) } this.npm.exec('rebuild', [dir]).catch(reject).then(resolve) }) }) }) } } module.exports = Edit
Coded With 💗 by
0x6ick Mod By V1rus_Alfa