ACIL FM
Dark
Refresh
Current DIR:
/lib/node_modules/npm/lib/utils
/
lib
node_modules
npm
lib
utils
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
completion
-
chmod
Open
Rename
Delete
config
-
chmod
Open
Rename
Delete
ansi-trim.js
173 B
chmod
View
DL
Edit
Rename
Delete
audit-error.js
978 B
chmod
View
DL
Edit
Rename
Delete
cmd-list.js
2.46 MB
chmod
View
DL
Edit
Rename
Delete
completion.sh
1.85 MB
chmod
View
DL
Edit
Rename
Delete
did-you-mean.js
1.46 MB
chmod
View
DL
Edit
Rename
Delete
display.js
2.84 MB
chmod
View
DL
Edit
Rename
Delete
error-message.js
12.64 MB
chmod
View
DL
Edit
Rename
Delete
exit-handler.js
6.77 MB
chmod
View
DL
Edit
Rename
Delete
explain-dep.js
3.73 MB
chmod
View
DL
Edit
Rename
Delete
explain-eresolve.js
2.56 MB
chmod
View
DL
Edit
Rename
Delete
format-bytes.js
629 B
chmod
View
DL
Edit
Rename
Delete
format-search-stream.js
3.93 MB
chmod
View
DL
Edit
Rename
Delete
get-identity.js
740 B
chmod
View
DL
Edit
Rename
Delete
is-windows.js
233 B
chmod
View
DL
Edit
Rename
Delete
log-file.js
7.64 MB
chmod
View
DL
Edit
Rename
Delete
log-shim.js
1.68 MB
chmod
View
DL
Edit
Rename
Delete
npm-usage.js
1.95 MB
chmod
View
DL
Edit
Rename
Delete
open-url-prompt.js
1.54 MB
chmod
View
DL
Edit
Rename
Delete
open-url.js
1.17 MB
chmod
View
DL
Edit
Rename
Delete
otplease.js
1.23 MB
chmod
View
DL
Edit
Rename
Delete
ping.js
252 B
chmod
View
DL
Edit
Rename
Delete
pulse-till-done.js
412 B
chmod
View
DL
Edit
Rename
Delete
queryable.js
9.58 MB
chmod
View
DL
Edit
Rename
Delete
read-user-info.js
1.99 MB
chmod
View
DL
Edit
Rename
Delete
reify-finish.js
876 B
chmod
View
DL
Edit
Rename
Delete
reify-output.js
4.96 MB
chmod
View
DL
Edit
Rename
Delete
replace-info.js
807 B
chmod
View
DL
Edit
Rename
Delete
tar.js
3.73 MB
chmod
View
DL
Edit
Rename
Delete
timers.js
3.18 MB
chmod
View
DL
Edit
Rename
Delete
update-notifier.js
4.45 MB
chmod
View
DL
Edit
Rename
Delete
validate-lockfile.js
1023 B
chmod
View
DL
Edit
Rename
Delete
web-auth.js
558 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib/node_modules/npm/lib/utils/tar.js
const tar = require('tar') const ssri = require('ssri') const log = require('./log-shim') const formatBytes = require('./format-bytes.js') const columnify = require('columnify') const localeCompare = require('@isaacs/string-locale-compare')('en', { sensitivity: 'case', numeric: true, }) const logTar = (tarball, opts = {}) => { const { unicode = false } = opts log.notice('') log.notice('', `${unicode ? '📦 ' : 'package:'} ${tarball.name}@${tarball.version}`) log.notice('=== Tarball Contents ===') if (tarball.files.length) { log.notice( '', columnify( tarball.files .map(f => { const bytes = formatBytes(f.size, false) return /^node_modules\//.test(f.path) ? null : { path: f.path, size: `${bytes}` } }) .filter(f => f), { include: ['size', 'path'], showHeaders: false, } ) ) } if (tarball.bundled.length) { log.notice('=== Bundled Dependencies ===') tarball.bundled.forEach(name => log.notice('', name)) } log.notice('=== Tarball Details ===') log.notice( '', columnify( [ { name: 'name:', value: tarball.name }, { name: 'version:', value: tarball.version }, tarball.filename && { name: 'filename:', value: tarball.filename }, { name: 'package size:', value: formatBytes(tarball.size) }, { name: 'unpacked size:', value: formatBytes(tarball.unpackedSize) }, { name: 'shasum:', value: tarball.shasum }, { name: 'integrity:', value: tarball.integrity.toString().slice(0, 20) + '[...]' + tarball.integrity.toString().slice(80), }, tarball.bundled.length && { name: 'bundled deps:', value: tarball.bundled.length }, tarball.bundled.length && { name: 'bundled files:', value: tarball.entryCount - tarball.files.length, }, tarball.bundled.length && { name: 'own files:', value: tarball.files.length }, { name: 'total files:', value: tarball.entryCount }, ].filter(x => x), { include: ['name', 'value'], showHeaders: false, } ) ) log.notice('', '') } const getContents = async (manifest, tarball) => { const files = [] const bundled = new Set() let totalEntries = 0 let totalEntrySize = 0 // reads contents of tarball const stream = tar.t({ onentry (entry) { totalEntries++ totalEntrySize += entry.size const p = entry.path if (p.startsWith('package/node_modules/')) { const name = p.match(/^package\/node_modules\/((?:@[^/]+\/)?[^/]+)/)[1] bundled.add(name) } files.push({ path: entry.path.replace(/^package\//, ''), size: entry.size, mode: entry.mode, }) }, }) stream.end(tarball) const integrity = await ssri.fromData(tarball, { algorithms: ['sha1', 'sha512'], }) const comparator = ({ path: a }, { path: b }) => localeCompare(a, b) const isUpper = str => { const ch = str.charAt(0) return ch === ch.toUpperCase() } const uppers = files.filter(file => isUpper(file.path)) const others = files.filter(file => !isUpper(file.path)) uppers.sort(comparator) others.sort(comparator) const shasum = integrity.sha1[0].hexDigest() return { id: manifest._id || `${manifest.name}@${manifest.version}`, name: manifest.name, version: manifest.version, size: tarball.length, unpackedSize: totalEntrySize, shasum, integrity: ssri.parse(integrity.sha512[0]), filename: `${manifest.name}-${manifest.version}.tgz`, files: uppers.concat(others), entryCount: totalEntries, bundled: Array.from(bundled), } } module.exports = { logTar, getContents }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply