ACIL FM
Dark
Refresh
Current DIR:
/lib/node_modules/npm/node_modules/bin-links/lib
/
lib
node_modules
npm
node_modules
bin-links
lib
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
bin-target.js
329 B
chmod
View
DL
Edit
Rename
Delete
check-bin.js
2.07 MB
chmod
View
DL
Edit
Rename
Delete
check-bins.js
493 B
chmod
View
DL
Edit
Rename
Delete
fix-bin.js
1.3 MB
chmod
View
DL
Edit
Rename
Delete
get-node-modules.js
534 B
chmod
View
DL
Edit
Rename
Delete
get-paths.js
1.22 MB
chmod
View
DL
Edit
Rename
Delete
get-prefix.js
147 B
chmod
View
DL
Edit
Rename
Delete
index.js
1.33 MB
chmod
View
DL
Edit
Rename
Delete
is-windows.js
118 B
chmod
View
DL
Edit
Rename
Delete
link-bin.js
343 B
chmod
View
DL
Edit
Rename
Delete
link-bins.js
775 B
chmod
View
DL
Edit
Rename
Delete
link-gently.js
2.72 MB
chmod
View
DL
Edit
Rename
Delete
link-mans.js
1.56 MB
chmod
View
DL
Edit
Rename
Delete
man-target.js
232 B
chmod
View
DL
Edit
Rename
Delete
shim-bin.js
2.11 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib/node_modules/npm/node_modules/bin-links/lib/shim-bin.js
const { promisify } = require('util') const { resolve, dirname } = require('path') const fs = require('fs') const lstat = promisify(fs.lstat) const throwNonEnoent = er => { if (er.code !== 'ENOENT') { throw er } } const cmdShim = require('cmd-shim') const readCmdShim = require('read-cmd-shim') const fixBin = require('./fix-bin.js') // even in --force mode, we never create a shim over a shim we've // already created. you can have multiple packages in a tree trying // to contend for the same bin, which creates a race condition and // nondeterminism. const seen = new Set() const failEEXIST = ({ path, to, from }) => Promise.reject(Object.assign(new Error('EEXIST: file already exists'), { path: to, dest: from, code: 'EEXIST', })) const handleReadCmdShimError = ({ er, from, to }) => er.code === 'ENOENT' ? null : er.code === 'ENOTASHIM' ? failEEXIST({ from, to }) : Promise.reject(er) const SKIP = Symbol('skip - missing or already installed') const shimBin = ({ path, to, from, absFrom, force }) => { const shims = [ to, to + '.cmd', to + '.ps1', ] for (const shim of shims) { if (seen.has(shim)) { return true } seen.add(shim) } return Promise.all([ ...shims, absFrom, ].map(f => lstat(f).catch(throwNonEnoent))).then((stats) => { const [, , , stFrom] = stats if (!stFrom) { return SKIP } if (force) { return false } return Promise.all(shims.map((s, i) => [s, stats[i]]).map(([s, st]) => { if (!st) { return false } return readCmdShim(s) .then(target => { target = resolve(dirname(to), target) if (target.indexOf(resolve(path)) !== 0) { return failEEXIST({ from, to, path }) } return false }, er => handleReadCmdShimError({ er, from, to })) })) }) .then(skip => skip !== SKIP && doShim(absFrom, to)) } const doShim = (absFrom, to) => cmdShim(absFrom, to).then(() => fixBin(absFrom)) const resetSeen = () => { for (const p of seen) { seen.delete(p) } } module.exports = Object.assign(shimBin, { resetSeen })
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply