ACIL FM
Dark
Refresh
Current DIR:
/lib/node_modules/npm/node_modules/cacache/lib
/
lib
node_modules
npm
node_modules
cacache
lib
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
content
-
chmod
Open
Rename
Delete
util
-
chmod
Open
Rename
Delete
entry-index.js
10.73 MB
chmod
View
DL
Edit
Rename
Delete
get.js
5.57 MB
chmod
View
DL
Edit
Rename
Delete
index.js
1.35 MB
chmod
View
DL
Edit
Rename
Delete
memoization.js
1.44 MB
chmod
View
DL
Edit
Rename
Delete
put.js
1.93 MB
chmod
View
DL
Edit
Rename
Delete
rm.js
664 B
chmod
View
DL
Edit
Rename
Delete
verify.js
6.57 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib/node_modules/npm/node_modules/cacache/lib/put.js
'use strict' const index = require('./entry-index') const memo = require('./memoization') const write = require('./content/write') const Flush = require('minipass-flush') const { PassThrough } = require('minipass-collect') const Pipeline = require('minipass-pipeline') const putOpts = (opts) => ({ algorithms: ['sha512'], ...opts, }) module.exports = putData async function putData (cache, key, data, opts = {}) { const { memoize } = opts opts = putOpts(opts) const res = await write(cache, data, opts) const entry = await index.insert(cache, key, res.integrity, { ...opts, size: res.size }) if (memoize) { memo.put(cache, entry, data, opts) } return res.integrity } module.exports.stream = putStream function putStream (cache, key, opts = {}) { const { memoize } = opts opts = putOpts(opts) let integrity let size let error let memoData const pipeline = new Pipeline() // first item in the pipeline is the memoizer, because we need // that to end first and get the collected data. if (memoize) { const memoizer = new PassThrough().on('collect', data => { memoData = data }) pipeline.push(memoizer) } // contentStream is a write-only, not a passthrough // no data comes out of it. const contentStream = write.stream(cache, opts) .on('integrity', (int) => { integrity = int }) .on('size', (s) => { size = s }) .on('error', (err) => { error = err }) pipeline.push(contentStream) // last but not least, we write the index and emit hash and size, // and memoize if we're doing that pipeline.push(new Flush({ async flush () { if (!error) { const entry = await index.insert(cache, key, integrity, { ...opts, size }) if (memoize && memoData) { memo.put(cache, entry, memoData, opts) } pipeline.emit('integrity', integrity) pipeline.emit('size', size) } }, })) return pipeline }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply