{"name":"minipass-pipeline","version":"3.0.0","description":"create a pipeline of streams using Minipass","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags","prepare":"tshy","typedoc":"typedoc","prepublishOnly":"git push origin --follow-tags","pretest":"npm run prepare","presnap":"npm run prepare","lint":"oxlint --fix src test","format":"prettier --write .","postsnap":"npm run lint","postlint":"npm run format"},"devDependencies":{"@types/node":"^25.5.0","oxlint":"^1.57.0","oxlint-tsgolint":"^0.17.4","prettier":"^3.8.1","tap":"^21.6.2","tshy":"^4.0.0","typedoc":"^0.28.18"},"dependencies":{"minipass":"^7.1.3"},"engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/isaacs/minipass-pipeline.git"},"tshy":{"selfLink":false,"compiler":"tsgo","exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","gitHead":"27fa576dc491306d78f43f48bf730911cdeec278","_id":"minipass-pipeline@3.0.0","bugs":{"url":"https://github.com/isaacs/minipass-pipeline/issues"},"homepage":"https://github.com/isaacs/minipass-pipeline#readme","_nodeVersion":"25.8.2","_npmVersion":"11.11.1","dist":{"integrity":"sha512-9fnYfdiVJtoCazOFbmW143oiiozHc+TLlCCYyvlXWYm7+7Z4f3joq9PuDhxzivVcJCi3EDZ3lpIbFq9xCwP8GQ==","shasum":"23d720574764cc2af60603fda605cba6fd96483b","tarball":"http://registry-npm.ywwl.com/minipass-pipeline/download/minipass-pipeline-3.0.0.tgz","fileCount":3,"unpackedSize":5479,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDqTAig6viFVYlYoLCDI36X7Ese4JW1l++S2cIIlDLpjAIgWPBNxM3u+sWwavb90OtVNCiucPwFpIEKZjdmozbT//A="}],"size":2421,"noattachment":false,"key":"/minipass-pipeline/-/minipass-pipeline-3.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/minipass-pipeline_3.0.0_1774468974486_0.39721430470335184"},"_hasShrinkwrap":false,"readme":"# minipass-pipeline\n\nCreate a pipeline of streams using Minipass.\n\nCalls `.pipe()` on all the streams in the list. Returns a stream where\nwrites got to the first pipe in the chain, and reads are from the last.\n\nErrors are proxied along the chain and emitted on the Pipeline stream.\n\n## USAGE\n\n```js\nconst Pipeline = require('minipass-pipeline')\n\n// the list of streams to pipeline together,\n// a bit like `input | transform | output` in bash\nconst p = new Pipeline(input, transform, output)\n\np.write('foo') // writes to input\np.on('data', chunk => doSomething()) // reads from output stream\n\n// less contrived example (but still pretty contrived)...\nconst decode = new bunzipDecoder()\nconst unpack = tar.extract({ cwd: 'target-dir' })\nconst tbz = new Pipeline(decode, unpack)\n\nfs.createReadStream('archive.tbz').pipe(tbz)\n\n// specify any minipass options if you like, as the first argument\n// it'll only try to pipeline event emitters with a .pipe() method\nconst p = new Pipeline({ objectMode: true }, input, transform, output)\n\n// If you don't know the things to pipe in right away, that's fine.\n// use p.push(stream) to add to the end, or p.unshift(stream) to the front\nconst databaseDecoderStreamDoohickey = connectionInfo => {\n  const p = new Pipeline()\n  logIntoDatabase(connectionInfo).then(connection => {\n    initializeDecoderRing(connectionInfo).then(decoderRing => {\n      p.push(connection, decoderRing)\n      getUpstreamSource(upstream => {\n        p.unshift(upstream)\n      })\n    })\n  })\n  // return to caller right away\n  // emitted data will be upstream -> connection -> decoderRing pipeline\n  return p\n}\n```\n\nPipeline is a [minipass](http://npm.im/minipass) stream, so it's as\nsynchronous as the streams it wraps. It will buffer data until there is a\nreader, but no longer, so make sure to attach your listeners before you\npipe it somewhere else.\n\n## `new Pipeline(opts = {}, ...streams)`\n\nCreate a new Pipeline with the specified Minipass options and any streams\nprovided.\n\n## `pipeline.push(stream, ...)`\n\nAttach one or more streams to the pipeline at the end (read) side of the\npipe chain.\n\n## `pipeline.unshift(stream, ...)`\n\nAttach one or more streams to the pipeline at the start (write) side of the\npipe chain.\n","publish_time":1774468974633,"_cnpm_publish_time":1774468974633,"dist-tags":{"latest":"3.0.1"}}