@socialgen_user/socialgen 0.0.0-stage → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +15 -0
- package/.output/public/_nuxt/0Br9Vc0s.js +1 -0
- package/.output/public/_nuxt/8VnlkoEA.js +1 -0
- package/.output/public/_nuxt/BPLr5diI.js +1 -0
- package/.output/public/_nuxt/BUd27fqX.js +4 -0
- package/.output/public/_nuxt/CElmFakF.js +1 -0
- package/.output/public/_nuxt/DQwlrwii.js +1 -0
- package/.output/public/_nuxt/De9_qv1a.js +1 -0
- package/.output/public/_nuxt/_mode_.XsuGEG0A.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/fa4e5120-60d5-43d9-b50d-f9369f818427.json +1 -0
- package/.output/public/_nuxt/error-404.DL_4WIao.css +1 -0
- package/.output/public/_nuxt/error-500.I1Dtv2V5.css +1 -0
- package/.output/public/_nuxt/pages.Df3hoeGN.css +1 -0
- package/.output/public/audio/cyber_future_tech.mp3 +0 -0
- package/.output/public/audio/dark_phonk_pulse.mp3 +0 -0
- package/.output/public/audio/deep_finance_groove.mp3 +0 -0
- package/.output/public/audio/lofi_viral_study.mp3 +0 -0
- package/.output/public/audio/motivation_cinematic.mp3 +0 -0
- package/.output/public/videos/cyber_blue.mp4 +0 -0
- package/.output/public/videos/cyber_matrix_stream.mp4 +0 -0
- package/.output/public/videos/cyber_pulse.mp4 +0 -0
- package/.output/public/videos/dark_luxury_particles.mp4 +0 -0
- package/.output/public/videos/default_bg.mp4 +0 -0
- package/.output/public/videos/emerald_flow.mp4 +0 -0
- package/.output/public/videos/financial_pulse_flow.mp4 +0 -0
- package/.output/public/videos/neon_cyber_grid.mp4 +0 -0
- package/.output/server/chunks/_/error-500.mjs +19 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/_/nitro.mjs +5716 -0
- package/.output/server/chunks/_/nitro.mjs.map +1 -0
- package/.output/server/chunks/_/storage.mjs +73 -0
- package/.output/server/chunks/_/storage.mjs.map +1 -0
- package/.output/server/chunks/_/topicMatrix.mjs +147 -0
- package/.output/server/chunks/_/topicMatrix.mjs.map +1 -0
- package/.output/server/chunks/build/TableCard-C_ouH7xZ.mjs +674 -0
- package/.output/server/chunks/build/TableCard-C_ouH7xZ.mjs.map +1 -0
- package/.output/server/chunks/build/_mode_-Bqv8WY_m.mjs +65 -0
- package/.output/server/chunks/build/_mode_-Bqv8WY_m.mjs.map +1 -0
- package/.output/server/chunks/build/_mode_-styles.CcOMAYS9.mjs +8 -0
- package/.output/server/chunks/build/_mode_-styles.CcOMAYS9.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles.C2d8MIct.mjs +8 -0
- package/.output/server/chunks/build/entry-styles.C2d8MIct.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-D7pndyXD.mjs +403 -0
- package/.output/server/chunks/build/error-404-D7pndyXD.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.ir-5M2eu.mjs +8 -0
- package/.output/server/chunks/build/error-404-styles.ir-5M2eu.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-D0twnCBi.mjs +76 -0
- package/.output/server/chunks/build/error-500-D0twnCBi.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.DiQTnuqt.mjs +8 -0
- package/.output/server/chunks/build/error-500-styles.DiQTnuqt.mjs.map +1 -0
- package/.output/server/chunks/build/index-styles.CQioNwpv.mjs +8 -0
- package/.output/server/chunks/build/index-styles.CQioNwpv.mjs.map +1 -0
- package/.output/server/chunks/build/pages-BHQfewv9.mjs +671 -0
- package/.output/server/chunks/build/pages-BHQfewv9.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +1115 -0
- package/.output/server/chunks/build/server.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +11 -0
- package/.output/server/chunks/build/styles.mjs.map +1 -0
- package/.output/server/chunks/build/v3-CmUYmHkx.mjs +22 -0
- package/.output/server/chunks/build/v3-CmUYmHkx.mjs.map +1 -0
- package/.output/server/chunks/routes/api/auto-topic.post.mjs +508 -0
- package/.output/server/chunks/routes/api/auto-topic.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/copy-prompt.get.mjs +217 -0
- package/.output/server/chunks/routes/api/copy-prompt.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/download.get.mjs +35 -0
- package/.output/server/chunks/routes/api/download.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/drafts.get.mjs +41 -0
- package/.output/server/chunks/routes/api/drafts.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/drafts.post.mjs +42 -0
- package/.output/server/chunks/routes/api/drafts.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/files/_...path_.get.mjs +36 -0
- package/.output/server/chunks/routes/api/files/_...path_.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/generate.post.mjs +510 -0
- package/.output/server/chunks/routes/api/generate.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/media.get.mjs +53 -0
- package/.output/server/chunks/routes/api/media.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/open-folder.post.mjs +29 -0
- package/.output/server/chunks/routes/api/open-folder.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/render-data.get.mjs +34 -0
- package/.output/server/chunks/routes/api/render-data.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/status.get.mjs +27 -0
- package/.output/server/chunks/routes/api/status.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/upload-media.post.mjs +76 -0
- package/.output/server/chunks/routes/api/upload-media.post.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +462 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +39 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/decode-codepoint.js +72 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/decode.js +497 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/escape.js +117 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/dist/esm/package.json +3 -0
- package/.output/server/node_modules/.nitro/entities@6.0.1/package.json +118 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/decode-codepoint.js +77 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/decode.js +568 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/.nitro/entities@7.0.1/package.json +120 -0
- package/.output/server/node_modules/.nitro/minimatch@5.1.9/lib/path.js +4 -0
- package/.output/server/node_modules/.nitro/minimatch@5.1.9/minimatch.js +996 -0
- package/.output/server/node_modules/.nitro/minimatch@5.1.9/package.json +35 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/assert-valid-pattern.js +14 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/ast.js +747 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/brace-expressions.js +152 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/escape.js +22 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/index.js +1023 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/dist/commonjs/unescape.js +24 -0
- package/.output/server/node_modules/.nitro/minimatch@9.0.9/package.json +82 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/_stream_duplex.js +131 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/_stream_passthrough.js +47 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/_stream_readable.js +1019 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/_stream_transform.js +214 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/_stream_writable.js +685 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/internal/streams/BufferList.js +78 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/internal/streams/destroy.js +84 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/lib/internal/streams/stream.js +1 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/package.json +52 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/passthrough.js +1 -0
- package/.output/server/node_modules/.nitro/readable-stream@2.3.8/readable.js +19 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/shims/process.js +19 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/add-abort-signal.js +52 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/buffer_list.js +157 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/compose.js +194 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/destroy.js +290 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/duplex.js +143 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/duplexify.js +378 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/end-of-stream.js +286 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/from.js +98 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/legacy.js +94 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/operators.js +457 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/passthrough.js +39 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/pipeline.js +471 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/readable.js +1290 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/state.js +39 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/transform.js +180 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/utils.js +327 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/streams/writable.js +819 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/internal/validators.js +530 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/ours/errors.js +343 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/ours/index.js +65 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/ours/primordials.js +124 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/ours/util/inspect.js +55 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/ours/util.js +148 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/stream/promises.js +43 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/lib/stream.js +143 -0
- package/.output/server/node_modules/.nitro/readable-stream@4.8.0/package.json +89 -0
- package/.output/server/node_modules/.nitro/safe-buffer@5.1.2/index.js +62 -0
- package/.output/server/node_modules/.nitro/safe-buffer@5.1.2/package.json +37 -0
- package/.output/server/node_modules/.nitro/safe-buffer@5.2.1/index.js +65 -0
- package/.output/server/node_modules/.nitro/safe-buffer@5.2.1/package.json +51 -0
- package/.output/server/node_modules/.nitro/string_decoder@1.1.1/lib/string_decoder.js +296 -0
- package/.output/server/node_modules/.nitro/string_decoder@1.1.1/package.json +31 -0
- package/.output/server/node_modules/.nitro/string_decoder@1.3.0/lib/string_decoder.js +296 -0
- package/.output/server/node_modules/.nitro/string_decoder@1.3.0/package.json +34 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14990 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@google/genai/dist/node/index.mjs +32052 -0
- package/.output/server/node_modules/@google/genai/package.json +175 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6806 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +729 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1460 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/api.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/app.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/component.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/context.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/hooks.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/index.js +22 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/api/util.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/const.js +5 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/env.js +17 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/index.js +45 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/plugin.js +2 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/proxy.js +111 -0
- package/.output/server/node_modules/@vue/devtools-api/lib/cjs/time.js +28 -0
- package/.output/server/node_modules/@vue/devtools-api/package.json +37 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1937 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +7260 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1932 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +951 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +53 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +657 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/abort-controller/dist/abort-controller.js +127 -0
- package/.output/server/node_modules/abort-controller/package.json +97 -0
- package/.output/server/node_modules/agent-base/dist/helpers.js +66 -0
- package/.output/server/node_modules/agent-base/dist/index.js +178 -0
- package/.output/server/node_modules/agent-base/package.json +46 -0
- package/.output/server/node_modules/archiver/index.js +84 -0
- package/.output/server/node_modules/archiver/lib/core.js +974 -0
- package/.output/server/node_modules/archiver/lib/error.js +40 -0
- package/.output/server/node_modules/archiver/lib/plugins/json.js +110 -0
- package/.output/server/node_modules/archiver/lib/plugins/tar.js +167 -0
- package/.output/server/node_modules/archiver/lib/plugins/zip.js +120 -0
- package/.output/server/node_modules/archiver/package.json +60 -0
- package/.output/server/node_modules/archiver-utils/file.js +209 -0
- package/.output/server/node_modules/archiver-utils/index.js +155 -0
- package/.output/server/node_modules/archiver-utils/package.json +48 -0
- package/.output/server/node_modules/async/dist/async.js +6061 -0
- package/.output/server/node_modules/async/package.json +75 -0
- package/.output/server/node_modules/b4a/index.js +193 -0
- package/.output/server/node_modules/b4a/package.json +54 -0
- package/.output/server/node_modules/balanced-match/index.js +62 -0
- package/.output/server/node_modules/balanced-match/package.json +48 -0
- package/.output/server/node_modules/base64-js/index.js +150 -0
- package/.output/server/node_modules/base64-js/package.json +47 -0
- package/.output/server/node_modules/bignumber.js/bignumber.js +2922 -0
- package/.output/server/node_modules/bignumber.js/package.json +60 -0
- package/.output/server/node_modules/brace-expansion/index.js +633 -0
- package/.output/server/node_modules/brace-expansion/package.json +52 -0
- package/.output/server/node_modules/buffer-crc32/dist/index.cjs +306 -0
- package/.output/server/node_modules/buffer-crc32/package.json +54 -0
- package/.output/server/node_modules/buffer-equal-constant-time/index.js +41 -0
- package/.output/server/node_modules/buffer-equal-constant-time/package.json +21 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/archive-entry.js +16 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/archive-output-stream.js +118 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/constants.js +71 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js +101 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/unix-stat.js +53 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/util.js +74 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +413 -0
- package/.output/server/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +437 -0
- package/.output/server/node_modules/compress-commons/lib/compress-commons.js +13 -0
- package/.output/server/node_modules/compress-commons/lib/util/index.js +27 -0
- package/.output/server/node_modules/compress-commons/package.json +46 -0
- package/.output/server/node_modules/core-util-is/lib/util.js +107 -0
- package/.output/server/node_modules/core-util-is/package.json +38 -0
- package/.output/server/node_modules/crc-32/crc32.js +115 -0
- package/.output/server/node_modules/crc-32/package.json +67 -0
- package/.output/server/node_modules/crc32-stream/lib/crc32-stream.js +48 -0
- package/.output/server/node_modules/crc32-stream/lib/deflate-crc32-stream.js +62 -0
- package/.output/server/node_modules/crc32-stream/lib/index.js +14 -0
- package/.output/server/node_modules/crc32-stream/package.json +45 -0
- package/.output/server/node_modules/data-uri-to-buffer/dist/index.js +53 -0
- package/.output/server/node_modules/data-uri-to-buffer/package.json +62 -0
- package/.output/server/node_modules/debug/package.json +64 -0
- package/.output/server/node_modules/debug/src/browser.js +272 -0
- package/.output/server/node_modules/debug/src/common.js +292 -0
- package/.output/server/node_modules/debug/src/index.js +10 -0
- package/.output/server/node_modules/debug/src/node.js +263 -0
- package/.output/server/node_modules/devalue/index.js +17 -0
- package/.output/server/node_modules/devalue/package.json +39 -0
- package/.output/server/node_modules/devalue/src/base64.js +60 -0
- package/.output/server/node_modules/devalue/src/constants.js +12 -0
- package/.output/server/node_modules/devalue/src/operations.js +221 -0
- package/.output/server/node_modules/devalue/src/parse.js +279 -0
- package/.output/server/node_modules/devalue/src/stringify.js +433 -0
- package/.output/server/node_modules/devalue/src/uneval.js +698 -0
- package/.output/server/node_modules/devalue/src/utils.js +190 -0
- package/.output/server/node_modules/ecdsa-sig-formatter/package.json +46 -0
- package/.output/server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +187 -0
- package/.output/server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +23 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/event-target-shim/dist/event-target-shim.js +871 -0
- package/.output/server/node_modules/event-target-shim/package.json +82 -0
- package/.output/server/node_modules/events-universal/default.js +1 -0
- package/.output/server/node_modules/events-universal/package.json +39 -0
- package/.output/server/node_modules/extend/index.js +117 -0
- package/.output/server/node_modules/extend/package.json +42 -0
- package/.output/server/node_modules/fast-fifo/fixed-size.js +39 -0
- package/.output/server/node_modules/fast-fifo/index.js +48 -0
- package/.output/server/node_modules/fast-fifo/package.json +28 -0
- package/.output/server/node_modules/fetch-blob/file.js +49 -0
- package/.output/server/node_modules/fetch-blob/from.js +100 -0
- package/.output/server/node_modules/fetch-blob/index.js +250 -0
- package/.output/server/node_modules/fetch-blob/package.json +56 -0
- package/.output/server/node_modules/fetch-blob/streams.cjs +51 -0
- package/.output/server/node_modules/formdata-polyfill/esm.min.js +40 -0
- package/.output/server/node_modules/formdata-polyfill/package.json +50 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/common.js +311 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/gaxios.js +564 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/index.js +48 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/interceptor.js +22 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/retry.js +165 -0
- package/.output/server/node_modules/gaxios/build/cjs/src/util.cjs +16 -0
- package/.output/server/node_modules/gaxios/package.json +105 -0
- package/.output/server/node_modules/gcp-metadata/build/src/gcp-residency.js +114 -0
- package/.output/server/node_modules/gcp-metadata/build/src/index.js +402 -0
- package/.output/server/node_modules/gcp-metadata/package.json +77 -0
- package/.output/server/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/.output/server/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/.output/server/node_modules/glob/dist/commonjs/index.js +68 -0
- package/.output/server/node_modules/glob/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/.output/server/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/.output/server/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/.output/server/node_modules/glob/package.json +99 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/authclient.js +286 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/awsclient.js +154 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/awsrequestsigner.js +213 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/baseexternalclient.js +477 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.js +223 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/computeclient.js +118 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.js +199 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/downscopedclient.js +273 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/envDetect.js +97 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/executable-response.js +178 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js +233 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/externalclient.js +68 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.js +84 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/gdchclient.js +307 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/googleauth.js +921 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/iam.js +44 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/identitypoolclient.js +131 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/idtokenclient.js +56 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/impersonated.js +197 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/jwtaccess.js +201 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/jwtclient.js +301 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/loginticket.js +60 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/oauth2client.js +820 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/oauth2common.js +189 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/passthrough.js +60 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js +220 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js +174 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/refreshclient.js +160 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/stscredentials.js +107 -0
- package/.output/server/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.js +71 -0
- package/.output/server/node_modules/google-auth-library/build/src/crypto/browser/crypto.js +127 -0
- package/.output/server/node_modules/google-auth-library/build/src/crypto/crypto.js +54 -0
- package/.output/server/node_modules/google-auth-library/build/src/crypto/node/crypto.js +88 -0
- package/.output/server/node_modules/google-auth-library/build/src/crypto/shared.js +32 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/errorWithCode.js +25 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/getCredentials.js +132 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/getToken.js +66 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/googleToken.js +125 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/jwsSign.js +54 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/revokeToken.js +34 -0
- package/.output/server/node_modules/google-auth-library/build/src/gtoken/tokenHandler.js +97 -0
- package/.output/server/node_modules/google-auth-library/build/src/index.js +88 -0
- package/.output/server/node_modules/google-auth-library/build/src/shared.cjs +22 -0
- package/.output/server/node_modules/google-auth-library/build/src/util.js +176 -0
- package/.output/server/node_modules/google-auth-library/package.json +90 -0
- package/.output/server/node_modules/google-logging-utils/build/src/colours.js +81 -0
- package/.output/server/node_modules/google-logging-utils/build/src/index.js +31 -0
- package/.output/server/node_modules/google-logging-utils/build/src/logging-utils.js +437 -0
- package/.output/server/node_modules/google-logging-utils/package.json +45 -0
- package/.output/server/node_modules/graceful-fs/clone.js +23 -0
- package/.output/server/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/.output/server/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/.output/server/node_modules/graceful-fs/package.json +52 -0
- package/.output/server/node_modules/graceful-fs/polyfills.js +355 -0
- package/.output/server/node_modules/has-flag/index.js +8 -0
- package/.output/server/node_modules/has-flag/package.json +46 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +257 -0
- package/.output/server/node_modules/hookable/package.json +54 -0
- package/.output/server/node_modules/https-proxy-agent/dist/index.js +180 -0
- package/.output/server/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
- package/.output/server/node_modules/https-proxy-agent/package.json +50 -0
- package/.output/server/node_modules/inherits/inherits.js +9 -0
- package/.output/server/node_modules/inherits/inherits_browser.js +27 -0
- package/.output/server/node_modules/inherits/package.json +29 -0
- package/.output/server/node_modules/is-stream/index.js +28 -0
- package/.output/server/node_modules/is-stream/package.json +42 -0
- package/.output/server/node_modules/isarray/index.js +5 -0
- package/.output/server/node_modules/isarray/package.json +45 -0
- package/.output/server/node_modules/json-bigint/index.js +12 -0
- package/.output/server/node_modules/json-bigint/lib/parse.js +443 -0
- package/.output/server/node_modules/json-bigint/lib/stringify.js +384 -0
- package/.output/server/node_modules/json-bigint/package.json +34 -0
- package/.output/server/node_modules/jwa/index.js +266 -0
- package/.output/server/node_modules/jwa/package.json +37 -0
- package/.output/server/node_modules/jws/index.js +22 -0
- package/.output/server/node_modules/jws/lib/data-stream.js +55 -0
- package/.output/server/node_modules/jws/lib/sign-stream.js +83 -0
- package/.output/server/node_modules/jws/lib/tostring.js +10 -0
- package/.output/server/node_modules/jws/lib/verify-stream.js +125 -0
- package/.output/server/node_modules/jws/package.json +34 -0
- package/.output/server/node_modules/lazystream/lib/lazystream.js +54 -0
- package/.output/server/node_modules/lazystream/package.json +46 -0
- package/.output/server/node_modules/lodash/_Hash.js +32 -0
- package/.output/server/node_modules/lodash/_ListCache.js +32 -0
- package/.output/server/node_modules/lodash/_Map.js +7 -0
- package/.output/server/node_modules/lodash/_MapCache.js +32 -0
- package/.output/server/node_modules/lodash/_Set.js +7 -0
- package/.output/server/node_modules/lodash/_SetCache.js +27 -0
- package/.output/server/node_modules/lodash/_Symbol.js +6 -0
- package/.output/server/node_modules/lodash/_apply.js +21 -0
- package/.output/server/node_modules/lodash/_arrayIncludes.js +17 -0
- package/.output/server/node_modules/lodash/_arrayIncludesWith.js +22 -0
- package/.output/server/node_modules/lodash/_arrayLikeKeys.js +49 -0
- package/.output/server/node_modules/lodash/_arrayMap.js +21 -0
- package/.output/server/node_modules/lodash/_arrayPush.js +20 -0
- package/.output/server/node_modules/lodash/_assocIndexOf.js +21 -0
- package/.output/server/node_modules/lodash/_baseDifference.js +67 -0
- package/.output/server/node_modules/lodash/_baseFindIndex.js +24 -0
- package/.output/server/node_modules/lodash/_baseFlatten.js +38 -0
- package/.output/server/node_modules/lodash/_baseGetTag.js +28 -0
- package/.output/server/node_modules/lodash/_baseIndexOf.js +20 -0
- package/.output/server/node_modules/lodash/_baseIsArguments.js +18 -0
- package/.output/server/node_modules/lodash/_baseIsNaN.js +12 -0
- package/.output/server/node_modules/lodash/_baseIsNative.js +47 -0
- package/.output/server/node_modules/lodash/_baseIsTypedArray.js +60 -0
- package/.output/server/node_modules/lodash/_baseKeysIn.js +33 -0
- package/.output/server/node_modules/lodash/_baseRest.js +17 -0
- package/.output/server/node_modules/lodash/_baseSetToString.js +22 -0
- package/.output/server/node_modules/lodash/_baseTimes.js +20 -0
- package/.output/server/node_modules/lodash/_baseUnary.js +14 -0
- package/.output/server/node_modules/lodash/_baseUniq.js +72 -0
- package/.output/server/node_modules/lodash/_cacheHas.js +13 -0
- package/.output/server/node_modules/lodash/_coreJsData.js +6 -0
- package/.output/server/node_modules/lodash/_createSet.js +19 -0
- package/.output/server/node_modules/lodash/_defineProperty.js +11 -0
- package/.output/server/node_modules/lodash/_freeGlobal.js +4 -0
- package/.output/server/node_modules/lodash/_getMapData.js +18 -0
- package/.output/server/node_modules/lodash/_getNative.js +17 -0
- package/.output/server/node_modules/lodash/_getPrototype.js +6 -0
- package/.output/server/node_modules/lodash/_getRawTag.js +46 -0
- package/.output/server/node_modules/lodash/_getValue.js +13 -0
- package/.output/server/node_modules/lodash/_hashClear.js +15 -0
- package/.output/server/node_modules/lodash/_hashDelete.js +17 -0
- package/.output/server/node_modules/lodash/_hashGet.js +30 -0
- package/.output/server/node_modules/lodash/_hashHas.js +23 -0
- package/.output/server/node_modules/lodash/_hashSet.js +23 -0
- package/.output/server/node_modules/lodash/_isFlattenable.js +20 -0
- package/.output/server/node_modules/lodash/_isIndex.js +25 -0
- package/.output/server/node_modules/lodash/_isIterateeCall.js +30 -0
- package/.output/server/node_modules/lodash/_isKeyable.js +15 -0
- package/.output/server/node_modules/lodash/_isMasked.js +20 -0
- package/.output/server/node_modules/lodash/_isPrototype.js +18 -0
- package/.output/server/node_modules/lodash/_listCacheClear.js +13 -0
- package/.output/server/node_modules/lodash/_listCacheDelete.js +35 -0
- package/.output/server/node_modules/lodash/_listCacheGet.js +19 -0
- package/.output/server/node_modules/lodash/_listCacheHas.js +16 -0
- package/.output/server/node_modules/lodash/_listCacheSet.js +26 -0
- package/.output/server/node_modules/lodash/_mapCacheClear.js +21 -0
- package/.output/server/node_modules/lodash/_mapCacheDelete.js +18 -0
- package/.output/server/node_modules/lodash/_mapCacheGet.js +16 -0
- package/.output/server/node_modules/lodash/_mapCacheHas.js +16 -0
- package/.output/server/node_modules/lodash/_mapCacheSet.js +22 -0
- package/.output/server/node_modules/lodash/_nativeCreate.js +6 -0
- package/.output/server/node_modules/lodash/_nativeKeysIn.js +20 -0
- package/.output/server/node_modules/lodash/_nodeUtil.js +30 -0
- package/.output/server/node_modules/lodash/_objectToString.js +22 -0
- package/.output/server/node_modules/lodash/_overArg.js +15 -0
- package/.output/server/node_modules/lodash/_overRest.js +36 -0
- package/.output/server/node_modules/lodash/_root.js +9 -0
- package/.output/server/node_modules/lodash/_setCacheAdd.js +19 -0
- package/.output/server/node_modules/lodash/_setCacheHas.js +14 -0
- package/.output/server/node_modules/lodash/_setToArray.js +18 -0
- package/.output/server/node_modules/lodash/_setToString.js +14 -0
- package/.output/server/node_modules/lodash/_shortOut.js +37 -0
- package/.output/server/node_modules/lodash/_strictIndexOf.js +23 -0
- package/.output/server/node_modules/lodash/_toSource.js +26 -0
- package/.output/server/node_modules/lodash/constant.js +26 -0
- package/.output/server/node_modules/lodash/defaults.js +64 -0
- package/.output/server/node_modules/lodash/difference.js +33 -0
- package/.output/server/node_modules/lodash/eq.js +37 -0
- package/.output/server/node_modules/lodash/flatten.js +22 -0
- package/.output/server/node_modules/lodash/identity.js +21 -0
- package/.output/server/node_modules/lodash/isArguments.js +36 -0
- package/.output/server/node_modules/lodash/isArray.js +26 -0
- package/.output/server/node_modules/lodash/isArrayLike.js +33 -0
- package/.output/server/node_modules/lodash/isArrayLikeObject.js +33 -0
- package/.output/server/node_modules/lodash/isBuffer.js +38 -0
- package/.output/server/node_modules/lodash/isFunction.js +37 -0
- package/.output/server/node_modules/lodash/isLength.js +35 -0
- package/.output/server/node_modules/lodash/isObject.js +31 -0
- package/.output/server/node_modules/lodash/isObjectLike.js +29 -0
- package/.output/server/node_modules/lodash/isPlainObject.js +62 -0
- package/.output/server/node_modules/lodash/isTypedArray.js +27 -0
- package/.output/server/node_modules/lodash/keysIn.js +32 -0
- package/.output/server/node_modules/lodash/noop.js +17 -0
- package/.output/server/node_modules/lodash/package.json +19 -0
- package/.output/server/node_modules/lodash/stubFalse.js +18 -0
- package/.output/server/node_modules/lodash/union.js +26 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/lru-cache/package.json +116 -0
- package/.output/server/node_modules/lucide-vue-next/dist/cjs/lucide-vue-next.js +21273 -0
- package/.output/server/node_modules/lucide-vue-next/package.json +64 -0
- package/.output/server/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/.output/server/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minipass/package.json +77 -0
- package/.output/server/node_modules/ms/index.js +162 -0
- package/.output/server/node_modules/ms/package.json +38 -0
- package/.output/server/node_modules/node-domexception/index.js +16 -0
- package/.output/server/node_modules/node-domexception/package.json +29 -0
- package/.output/server/node_modules/node-fetch/package.json +131 -0
- package/.output/server/node_modules/node-fetch/src/body.js +397 -0
- package/.output/server/node_modules/node-fetch/src/errors/abort-error.js +10 -0
- package/.output/server/node_modules/node-fetch/src/errors/base.js +17 -0
- package/.output/server/node_modules/node-fetch/src/errors/fetch-error.js +26 -0
- package/.output/server/node_modules/node-fetch/src/headers.js +267 -0
- package/.output/server/node_modules/node-fetch/src/index.js +417 -0
- package/.output/server/node_modules/node-fetch/src/request.js +313 -0
- package/.output/server/node_modules/node-fetch/src/response.js +160 -0
- package/.output/server/node_modules/node-fetch/src/utils/get-search.js +9 -0
- package/.output/server/node_modules/node-fetch/src/utils/is-redirect.js +11 -0
- package/.output/server/node_modules/node-fetch/src/utils/is.js +87 -0
- package/.output/server/node_modules/node-fetch/src/utils/multipart-parser.js +432 -0
- package/.output/server/node_modules/node-fetch/src/utils/referrer.js +340 -0
- package/.output/server/node_modules/normalize-path/index.js +35 -0
- package/.output/server/node_modules/normalize-path/package.json +77 -0
- package/.output/server/node_modules/p-retry/index.js +85 -0
- package/.output/server/node_modules/p-retry/package.json +51 -0
- package/.output/server/node_modules/parse5/dist/common/doctype.js +114 -0
- package/.output/server/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/.output/server/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/.output/server/node_modules/parse5/dist/common/html.js +523 -0
- package/.output/server/node_modules/parse5/dist/common/token.js +20 -0
- package/.output/server/node_modules/parse5/dist/common/unicode.js +62 -0
- package/.output/server/node_modules/parse5/dist/index.js +42 -0
- package/.output/server/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/.output/server/node_modules/parse5/dist/parser/index.js +3245 -0
- package/.output/server/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/.output/server/node_modules/parse5/dist/serializer/index.js +168 -0
- package/.output/server/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/.output/server/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/.output/server/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/.output/server/node_modules/parse5/package.json +50 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/path-scurry/package.json +89 -0
- package/.output/server/node_modules/playwright/index.mjs +18 -0
- package/.output/server/node_modules/playwright/package.json +50 -0
- package/.output/server/node_modules/playwright-core/browsers.json +52 -0
- package/.output/server/node_modules/playwright-core/index.js +17 -0
- package/.output/server/node_modules/playwright-core/index.mjs +28 -0
- package/.output/server/node_modules/playwright-core/lib/bootstrap.js +149 -0
- package/.output/server/node_modules/playwright-core/lib/coreBundle.js +78764 -0
- package/.output/server/node_modules/playwright-core/lib/utilsBundle.js +92408 -0
- package/.output/server/node_modules/playwright-core/package.json +34 -0
- package/.output/server/node_modules/process/index.js +2 -0
- package/.output/server/node_modules/process/package.json +27 -0
- package/.output/server/node_modules/process-nextick-args/index.js +45 -0
- package/.output/server/node_modules/process-nextick-args/package.json +25 -0
- package/.output/server/node_modules/readdir-glob/index.js +243 -0
- package/.output/server/node_modules/readdir-glob/package.json +43 -0
- package/.output/server/node_modules/retry/index.js +1 -0
- package/.output/server/node_modules/retry/lib/retry.js +100 -0
- package/.output/server/node_modules/retry/lib/retry_operation.js +162 -0
- package/.output/server/node_modules/retry/package.json +36 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +123 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +136 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +68 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +115 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +84 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +211 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1314 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +486 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +446 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +613 -0
- package/.output/server/node_modules/source-map-js/package.json +78 -0
- package/.output/server/node_modules/source-map-js/source-map.js +10 -0
- package/.output/server/node_modules/streamx/index.js +1314 -0
- package/.output/server/node_modules/streamx/lib/errors.js +47 -0
- package/.output/server/node_modules/streamx/package.json +51 -0
- package/.output/server/node_modules/supports-color/index.js +135 -0
- package/.output/server/node_modules/supports-color/package.json +53 -0
- package/.output/server/node_modules/tar-stream/constants.js +14 -0
- package/.output/server/node_modules/tar-stream/extract.js +418 -0
- package/.output/server/node_modules/tar-stream/headers.js +322 -0
- package/.output/server/node_modules/tar-stream/index.js +2 -0
- package/.output/server/node_modules/tar-stream/pack.js +287 -0
- package/.output/server/node_modules/tar-stream/package.json +50 -0
- package/.output/server/node_modules/text-decoder/index.js +64 -0
- package/.output/server/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
- package/.output/server/node_modules/text-decoder/lib/utf8-decoder.js +185 -0
- package/.output/server/node_modules/text-decoder/package.json +39 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
- package/.output/server/node_modules/ufo/package.json +48 -0
- package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +103 -0
- package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +191 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.0TIQaUam.mjs +244 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.AtIkjM2B.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.AvDFlk_u.mjs +39 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.B0o2oYhg.mjs +317 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.ByHeIeZd.mjs +184 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.C-69jnXc.mjs +44 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.ChXiQvI8.mjs +76 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DWXHYkPf.mjs +366 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.h_KkEIE6.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.ylJpsHyA.mjs +255 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +106 -0
- package/.output/server/node_modules/util-deprecate/node.js +6 -0
- package/.output/server/node_modules/util-deprecate/package.json +27 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/dependencies-VCG-RX19.mjs +118 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +673 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +66 -0
- package/.output/server/node_modules/vue-router/dist/devtools-C3Hva4Qk.mjs +1220 -0
- package/.output/server/node_modules/vue-router/dist/vue-router.mjs +1561 -0
- package/.output/server/node_modules/vue-router/package.json +156 -0
- package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
- package/.output/server/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +4737 -0
- package/.output/server/node_modules/web-streams-polyfill/package.json +83 -0
- package/.output/server/node_modules/ws/lib/buffer-util.js +142 -0
- package/.output/server/node_modules/ws/lib/constants.js +19 -0
- package/.output/server/node_modules/ws/lib/event-target.js +292 -0
- package/.output/server/node_modules/ws/lib/extension.js +203 -0
- package/.output/server/node_modules/ws/lib/limiter.js +55 -0
- package/.output/server/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/.output/server/node_modules/ws/lib/receiver.js +751 -0
- package/.output/server/node_modules/ws/lib/sender.js +610 -0
- package/.output/server/node_modules/ws/lib/stream.js +161 -0
- package/.output/server/node_modules/ws/lib/subprotocol.js +62 -0
- package/.output/server/node_modules/ws/lib/validation.js +152 -0
- package/.output/server/node_modules/ws/lib/websocket-server.js +565 -0
- package/.output/server/node_modules/ws/lib/websocket.js +1471 -0
- package/.output/server/node_modules/ws/package.json +74 -0
- package/.output/server/node_modules/ws/wrapper.mjs +21 -0
- package/.output/server/node_modules/zip-stream/index.js +187 -0
- package/.output/server/node_modules/zip-stream/package.json +49 -0
- package/.output/server/node_modules/zod/index.js +4 -0
- package/.output/server/node_modules/zod/package.json +118 -0
- package/.output/server/node_modules/zod/v3/ZodError.js +133 -0
- package/.output/server/node_modules/zod/v3/errors.js +9 -0
- package/.output/server/node_modules/zod/v3/external.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
- package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v3/types.js +3693 -0
- package/.output/server/package.json +99 -0
- package/README.md +116 -2
- package/bin/cli.js +189 -0
- package/data/drafts.json +1 -0
- package/data/history.json +59 -0
- package/package.json +39 -4
- package/public/audio/cyber_future_tech.mp3 +0 -0
- package/public/audio/dark_phonk_pulse.mp3 +0 -0
- package/public/audio/deep_finance_groove.mp3 +0 -0
- package/public/audio/lofi_viral_study.mp3 +0 -0
- package/public/audio/motivation_cinematic.mp3 +0 -0
- package/public/videos/cyber_blue.mp4 +0 -0
- package/public/videos/cyber_matrix_stream.mp4 +0 -0
- package/public/videos/cyber_pulse.mp4 +0 -0
- package/public/videos/dark_luxury_particles.mp4 +0 -0
- package/public/videos/default_bg.mp4 +0 -0
- package/public/videos/emerald_flow.mp4 +0 -0
- package/public/videos/financial_pulse_flow.mp4 +0 -0
- package/public/videos/neon_cyber_grid.mp4 +0 -0
|
@@ -0,0 +1,1314 @@
|
|
|
1
|
+
const { EventEmitter } = require('events-universal')
|
|
2
|
+
const FIFO = require('fast-fifo')
|
|
3
|
+
const TextDecoder = require('text-decoder')
|
|
4
|
+
|
|
5
|
+
const StreamError = require('./lib/errors.js')
|
|
6
|
+
|
|
7
|
+
// if we do a future major, expect queue microtask to be there always, for now a bit defensive
|
|
8
|
+
const qmt =
|
|
9
|
+
typeof queueMicrotask === 'undefined' ? (fn) => global.process.nextTick(fn) : queueMicrotask
|
|
10
|
+
|
|
11
|
+
// 29 bits used total (4 from shared, 14 from read, and 11 from write)
|
|
12
|
+
const MAX = (1 << 29) - 1
|
|
13
|
+
|
|
14
|
+
// Shared state
|
|
15
|
+
const OPENING = 0b0001
|
|
16
|
+
const PREDESTROYING = 0b0010
|
|
17
|
+
const DESTROYING = 0b0100
|
|
18
|
+
const DESTROYED = 0b1000
|
|
19
|
+
|
|
20
|
+
const NOT_OPENING = MAX ^ OPENING
|
|
21
|
+
const NOT_PREDESTROYING = MAX ^ PREDESTROYING
|
|
22
|
+
|
|
23
|
+
// Read state (4 bit offset from shared state)
|
|
24
|
+
const READ_ACTIVE = 0b00000000000001 << 4
|
|
25
|
+
const READ_UPDATING = 0b00000000000010 << 4
|
|
26
|
+
const READ_PRIMARY = 0b00000000000100 << 4
|
|
27
|
+
const READ_QUEUED = 0b00000000001000 << 4
|
|
28
|
+
const READ_RESUMED = 0b00000000010000 << 4
|
|
29
|
+
const READ_PIPE_DRAINED = 0b00000000100000 << 4
|
|
30
|
+
const READ_ENDING = 0b00000001000000 << 4
|
|
31
|
+
const READ_EMIT_DATA = 0b00000010000000 << 4
|
|
32
|
+
const READ_EMIT_READABLE = 0b00000100000000 << 4
|
|
33
|
+
const READ_EMITTED_READABLE = 0b00001000000000 << 4
|
|
34
|
+
const READ_DONE = 0b00010000000000 << 4
|
|
35
|
+
const READ_NEXT_TICK = 0b00100000000000 << 4
|
|
36
|
+
const READ_NEEDS_PUSH = 0b01000000000000 << 4
|
|
37
|
+
const READ_READ_AHEAD = 0b10000000000000 << 4
|
|
38
|
+
|
|
39
|
+
// Combined read state
|
|
40
|
+
const READ_FLOWING = READ_RESUMED | READ_PIPE_DRAINED
|
|
41
|
+
const READ_ACTIVE_AND_NEEDS_PUSH = READ_ACTIVE | READ_NEEDS_PUSH
|
|
42
|
+
const READ_PRIMARY_AND_ACTIVE = READ_PRIMARY | READ_ACTIVE
|
|
43
|
+
const READ_EMIT_READABLE_AND_QUEUED = READ_EMIT_READABLE | READ_QUEUED
|
|
44
|
+
const READ_RESUMED_READ_AHEAD = READ_RESUMED | READ_READ_AHEAD
|
|
45
|
+
|
|
46
|
+
const READ_NOT_ACTIVE = MAX ^ READ_ACTIVE
|
|
47
|
+
const READ_NON_PRIMARY = MAX ^ READ_PRIMARY
|
|
48
|
+
const READ_NON_PRIMARY_AND_PUSHED = MAX ^ (READ_PRIMARY | READ_NEEDS_PUSH)
|
|
49
|
+
const READ_PUSHED = MAX ^ READ_NEEDS_PUSH
|
|
50
|
+
const READ_PAUSED = MAX ^ READ_RESUMED
|
|
51
|
+
const READ_NOT_QUEUED = MAX ^ (READ_QUEUED | READ_EMITTED_READABLE)
|
|
52
|
+
const READ_NOT_ENDING = MAX ^ READ_ENDING
|
|
53
|
+
const READ_PIPE_NOT_DRAINED = MAX ^ READ_FLOWING
|
|
54
|
+
const READ_NOT_NEXT_TICK = MAX ^ READ_NEXT_TICK
|
|
55
|
+
const READ_NOT_UPDATING = MAX ^ READ_UPDATING
|
|
56
|
+
const READ_NO_READ_AHEAD = MAX ^ READ_READ_AHEAD
|
|
57
|
+
const READ_PAUSED_NO_READ_AHEAD = MAX ^ READ_RESUMED_READ_AHEAD
|
|
58
|
+
|
|
59
|
+
// Write state (18 bit offset, 4 bit offset from shared state and 14 from read state)
|
|
60
|
+
const WRITE_ACTIVE = 0b00000000001 << 18
|
|
61
|
+
const WRITE_UPDATING = 0b00000000010 << 18
|
|
62
|
+
const WRITE_PRIMARY = 0b00000000100 << 18
|
|
63
|
+
const WRITE_QUEUED = 0b00000001000 << 18
|
|
64
|
+
const WRITE_UNDRAINED = 0b00000010000 << 18
|
|
65
|
+
const WRITE_DONE = 0b00000100000 << 18
|
|
66
|
+
const WRITE_EMIT_DRAIN = 0b00001000000 << 18
|
|
67
|
+
const WRITE_NEXT_TICK = 0b00010000000 << 18
|
|
68
|
+
const WRITE_WRITING = 0b00100000000 << 18
|
|
69
|
+
const WRITE_FINISHING = 0b01000000000 << 18
|
|
70
|
+
const WRITE_CORKED = 0b10000000000 << 18
|
|
71
|
+
|
|
72
|
+
const WRITE_NOT_ACTIVE = MAX ^ (WRITE_ACTIVE | WRITE_WRITING)
|
|
73
|
+
const WRITE_NON_PRIMARY = MAX ^ WRITE_PRIMARY
|
|
74
|
+
const WRITE_NOT_FINISHING = MAX ^ (WRITE_ACTIVE | WRITE_FINISHING)
|
|
75
|
+
const WRITE_DRAINED = MAX ^ WRITE_UNDRAINED
|
|
76
|
+
const WRITE_NOT_QUEUED = MAX ^ WRITE_QUEUED
|
|
77
|
+
const WRITE_NOT_NEXT_TICK = MAX ^ WRITE_NEXT_TICK
|
|
78
|
+
const WRITE_NOT_UPDATING = MAX ^ WRITE_UPDATING
|
|
79
|
+
const WRITE_NOT_CORKED = MAX ^ WRITE_CORKED
|
|
80
|
+
|
|
81
|
+
// Combined shared state
|
|
82
|
+
const ACTIVE = READ_ACTIVE | WRITE_ACTIVE
|
|
83
|
+
const NOT_ACTIVE = MAX ^ ACTIVE
|
|
84
|
+
const DONE = READ_DONE | WRITE_DONE
|
|
85
|
+
const DESTROY_STATUS = DESTROYING | DESTROYED | PREDESTROYING
|
|
86
|
+
const OPEN_STATUS = DESTROY_STATUS | OPENING
|
|
87
|
+
const AUTO_DESTROY = DESTROY_STATUS | DONE
|
|
88
|
+
const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY
|
|
89
|
+
const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK
|
|
90
|
+
const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE
|
|
91
|
+
const IS_OPENING = OPEN_STATUS | TICKING
|
|
92
|
+
|
|
93
|
+
// Combined shared state and read state
|
|
94
|
+
const READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE
|
|
95
|
+
const READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED
|
|
96
|
+
const READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED
|
|
97
|
+
const READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE
|
|
98
|
+
const SHOULD_NOT_READ =
|
|
99
|
+
OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH | READ_READ_AHEAD
|
|
100
|
+
const READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE
|
|
101
|
+
const READ_UPDATE_SYNC_STATUS = READ_UPDATING | OPEN_STATUS | READ_NEXT_TICK | READ_PRIMARY
|
|
102
|
+
const READ_NEXT_TICK_OR_OPENING = READ_NEXT_TICK | OPENING
|
|
103
|
+
|
|
104
|
+
// Combined write state
|
|
105
|
+
const WRITE_PRIMARY_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_DONE
|
|
106
|
+
const WRITE_QUEUED_AND_UNDRAINED = WRITE_QUEUED | WRITE_UNDRAINED
|
|
107
|
+
const WRITE_QUEUED_AND_ACTIVE = WRITE_QUEUED | WRITE_ACTIVE
|
|
108
|
+
const WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE
|
|
109
|
+
const WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED
|
|
110
|
+
const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE
|
|
111
|
+
const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING
|
|
112
|
+
const WRITE_FINISHING_STATUS = OPEN_STATUS | WRITE_FINISHING | WRITE_QUEUED_AND_ACTIVE | WRITE_DONE
|
|
113
|
+
const WRITE_BACKPRESSURE_STATUS = WRITE_UNDRAINED | DESTROY_STATUS | WRITE_FINISHING | WRITE_DONE
|
|
114
|
+
const WRITE_UPDATE_SYNC_STATUS = WRITE_UPDATING | OPEN_STATUS | WRITE_NEXT_TICK | WRITE_PRIMARY
|
|
115
|
+
const WRITE_DROP_DATA = WRITE_FINISHING | WRITE_DONE | DESTROY_STATUS
|
|
116
|
+
|
|
117
|
+
const asyncIterator = Symbol.asyncIterator || Symbol('asyncIterator')
|
|
118
|
+
|
|
119
|
+
class WritableState {
|
|
120
|
+
constructor(
|
|
121
|
+
stream,
|
|
122
|
+
{ highWaterMark = 16384, map = null, mapWritable, byteLength, byteLengthWritable } = {}
|
|
123
|
+
) {
|
|
124
|
+
this.stream = stream
|
|
125
|
+
this.queue = new FIFO()
|
|
126
|
+
this.highWaterMark = highWaterMark
|
|
127
|
+
this.buffered = 0
|
|
128
|
+
this.error = null
|
|
129
|
+
this.pipeline = null
|
|
130
|
+
this.drains = null // if we add more seldomly used helpers we might them into a subobject so its a single ptr
|
|
131
|
+
this.byteLength = byteLengthWritable || byteLength || defaultByteLength
|
|
132
|
+
this.map = mapWritable || map
|
|
133
|
+
this.afterWrite = afterWrite.bind(this)
|
|
134
|
+
this.afterUpdateNextTick = updateWriteNT.bind(this)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
get ending() {
|
|
138
|
+
return (this.stream._duplexState & WRITE_FINISHING) !== 0
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get ended() {
|
|
142
|
+
return (this.stream._duplexState & WRITE_DONE) !== 0
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
push(data) {
|
|
146
|
+
if ((this.stream._duplexState & WRITE_DROP_DATA) !== 0) return false
|
|
147
|
+
if (this.map !== null) data = this.map(data)
|
|
148
|
+
|
|
149
|
+
this.buffered += this.byteLength(data)
|
|
150
|
+
this.queue.push(data)
|
|
151
|
+
|
|
152
|
+
if (this.buffered < this.highWaterMark) {
|
|
153
|
+
this.stream._duplexState |= WRITE_QUEUED
|
|
154
|
+
return true
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
this.stream._duplexState |= WRITE_QUEUED_AND_UNDRAINED
|
|
158
|
+
return false
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
shift() {
|
|
162
|
+
const data = this.queue.shift()
|
|
163
|
+
|
|
164
|
+
this.buffered -= this.byteLength(data)
|
|
165
|
+
if (this.buffered === 0) this.stream._duplexState &= WRITE_NOT_QUEUED
|
|
166
|
+
|
|
167
|
+
return data
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
end(data) {
|
|
171
|
+
if (typeof data === 'function') {
|
|
172
|
+
this.stream.once('finish', data)
|
|
173
|
+
} else if (data !== undefined && data !== null) {
|
|
174
|
+
this.push(data)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
this.stream._duplexState = (this.stream._duplexState | WRITE_FINISHING) & WRITE_NON_PRIMARY
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
autoBatch(data, cb) {
|
|
181
|
+
const buffer = []
|
|
182
|
+
const stream = this.stream
|
|
183
|
+
|
|
184
|
+
buffer.push(data)
|
|
185
|
+
while ((stream._duplexState & WRITE_STATUS) === WRITE_QUEUED_AND_ACTIVE) {
|
|
186
|
+
buffer.push(stream._writableState.shift())
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if ((stream._duplexState & OPEN_STATUS) !== 0) return cb(null)
|
|
190
|
+
stream._writev(buffer, cb)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
update() {
|
|
194
|
+
const stream = this.stream
|
|
195
|
+
|
|
196
|
+
stream._duplexState |= WRITE_UPDATING
|
|
197
|
+
|
|
198
|
+
do {
|
|
199
|
+
while ((stream._duplexState & WRITE_STATUS) === WRITE_QUEUED) {
|
|
200
|
+
const data = this.shift()
|
|
201
|
+
stream._duplexState |= WRITE_ACTIVE_AND_WRITING
|
|
202
|
+
stream._write(data, this.afterWrite)
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if ((stream._duplexState & WRITE_PRIMARY_AND_ACTIVE) === 0) this.updateNonPrimary()
|
|
206
|
+
} while (this.continueUpdate() === true)
|
|
207
|
+
|
|
208
|
+
stream._duplexState &= WRITE_NOT_UPDATING
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
updateNonPrimary() {
|
|
212
|
+
const stream = this.stream
|
|
213
|
+
|
|
214
|
+
if ((stream._duplexState & WRITE_FINISHING_STATUS) === WRITE_FINISHING) {
|
|
215
|
+
stream._duplexState = stream._duplexState | WRITE_ACTIVE
|
|
216
|
+
stream._final(afterFinal.bind(this))
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if ((stream._duplexState & DESTROY_STATUS) === DESTROYING) {
|
|
221
|
+
if ((stream._duplexState & ACTIVE_OR_TICKING) === 0) {
|
|
222
|
+
stream._duplexState |= ACTIVE
|
|
223
|
+
stream._destroy(afterDestroy.bind(this))
|
|
224
|
+
}
|
|
225
|
+
return
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if ((stream._duplexState & IS_OPENING) === OPENING) {
|
|
229
|
+
stream._duplexState = (stream._duplexState | ACTIVE) & NOT_OPENING
|
|
230
|
+
stream._open(afterOpen.bind(this))
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
continueUpdate() {
|
|
235
|
+
if ((this.stream._duplexState & WRITE_NEXT_TICK) === 0) return false
|
|
236
|
+
this.stream._duplexState &= WRITE_NOT_NEXT_TICK
|
|
237
|
+
return true
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
updateCallback() {
|
|
241
|
+
if ((this.stream._duplexState & WRITE_UPDATE_SYNC_STATUS) === WRITE_PRIMARY) {
|
|
242
|
+
this.update()
|
|
243
|
+
} else {
|
|
244
|
+
this.updateNextTick()
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
updateNextTick() {
|
|
249
|
+
if ((this.stream._duplexState & WRITE_NEXT_TICK) !== 0) return
|
|
250
|
+
this.stream._duplexState |= WRITE_NEXT_TICK
|
|
251
|
+
if ((this.stream._duplexState & WRITE_UPDATING) === 0) qmt(this.afterUpdateNextTick)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
class ReadableState {
|
|
256
|
+
constructor(
|
|
257
|
+
stream,
|
|
258
|
+
{ highWaterMark = 16384, map = null, mapReadable, byteLength, byteLengthReadable } = {}
|
|
259
|
+
) {
|
|
260
|
+
this.stream = stream
|
|
261
|
+
this.queue = new FIFO()
|
|
262
|
+
this.highWaterMark = highWaterMark === 0 ? 1 : highWaterMark
|
|
263
|
+
this.buffered = 0
|
|
264
|
+
this.readAhead = highWaterMark > 0
|
|
265
|
+
this.error = null
|
|
266
|
+
this.pipeline = null
|
|
267
|
+
this.byteLength = byteLengthReadable || byteLength || defaultByteLength
|
|
268
|
+
this.map = mapReadable || map
|
|
269
|
+
this.pipeTo = null
|
|
270
|
+
this.afterRead = afterRead.bind(this)
|
|
271
|
+
this.afterUpdateNextTick = updateReadNT.bind(this)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
get ending() {
|
|
275
|
+
return (this.stream._duplexState & READ_ENDING) !== 0
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
get ended() {
|
|
279
|
+
return (this.stream._duplexState & READ_DONE) !== 0
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
pipe(pipeTo, cb) {
|
|
283
|
+
if (this.pipeTo !== null) throw StreamError.BAD_ARGUMENT('Can only pipe to one destination')
|
|
284
|
+
if (typeof cb !== 'function') cb = null
|
|
285
|
+
|
|
286
|
+
this.stream._duplexState |= READ_PIPE_DRAINED
|
|
287
|
+
this.pipeTo = pipeTo
|
|
288
|
+
this.pipeline = new Pipeline(this.stream, pipeTo, cb)
|
|
289
|
+
|
|
290
|
+
if (cb) this.stream.on('error', noop) // We already error handle this so supress crashes
|
|
291
|
+
|
|
292
|
+
if (isStreamx(pipeTo)) {
|
|
293
|
+
pipeTo._writableState.pipeline = this.pipeline
|
|
294
|
+
if (cb) pipeTo.on('error', noop) // We already error handle this so supress crashes
|
|
295
|
+
pipeTo.on('finish', this.pipeline.finished.bind(this.pipeline)) // TODO: just call finished from pipeTo itself
|
|
296
|
+
} else {
|
|
297
|
+
const onerror = this.pipeline.done.bind(this.pipeline, pipeTo)
|
|
298
|
+
const onclose = this.pipeline.done.bind(this.pipeline, pipeTo, null) // onclose has a weird bool arg
|
|
299
|
+
pipeTo.on('error', onerror)
|
|
300
|
+
pipeTo.on('close', onclose)
|
|
301
|
+
pipeTo.on('finish', this.pipeline.finished.bind(this.pipeline))
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
pipeTo.on('drain', afterDrain.bind(this))
|
|
305
|
+
this.stream.emit('piping', pipeTo)
|
|
306
|
+
pipeTo.emit('pipe', this.stream)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
push(data) {
|
|
310
|
+
const stream = this.stream
|
|
311
|
+
|
|
312
|
+
if (data === null) {
|
|
313
|
+
this.highWaterMark = 0
|
|
314
|
+
stream._duplexState = (stream._duplexState | READ_ENDING) & READ_NON_PRIMARY_AND_PUSHED
|
|
315
|
+
return false
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (this.map !== null) {
|
|
319
|
+
data = this.map(data)
|
|
320
|
+
if (data === null) {
|
|
321
|
+
stream._duplexState &= READ_PUSHED
|
|
322
|
+
return this.buffered < this.highWaterMark
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
this.buffered += this.byteLength(data)
|
|
327
|
+
this.queue.push(data)
|
|
328
|
+
|
|
329
|
+
stream._duplexState = (stream._duplexState | READ_QUEUED) & READ_PUSHED
|
|
330
|
+
|
|
331
|
+
return this.buffered < this.highWaterMark
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
shift() {
|
|
335
|
+
const data = this.queue.shift()
|
|
336
|
+
|
|
337
|
+
this.buffered -= this.byteLength(data)
|
|
338
|
+
if (this.buffered === 0) {
|
|
339
|
+
this.stream._duplexState &= READ_NOT_QUEUED
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return data
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
unshift(data) {
|
|
346
|
+
const pending = [this.map !== null ? this.map(data) : data]
|
|
347
|
+
while (this.buffered > 0) pending.push(this.shift())
|
|
348
|
+
|
|
349
|
+
for (let i = 0; i < pending.length - 1; i++) {
|
|
350
|
+
const data = pending[i]
|
|
351
|
+
this.buffered += this.byteLength(data)
|
|
352
|
+
this.queue.push(data)
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
this.push(pending[pending.length - 1])
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
read() {
|
|
359
|
+
const stream = this.stream
|
|
360
|
+
|
|
361
|
+
if ((stream._duplexState & READ_STATUS) === READ_QUEUED) {
|
|
362
|
+
const data = this.shift()
|
|
363
|
+
|
|
364
|
+
if (this.pipeTo !== null && this.pipeTo.write(data) === false) {
|
|
365
|
+
stream._duplexState &= READ_PIPE_NOT_DRAINED
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if ((stream._duplexState & READ_EMIT_DATA) !== 0) {
|
|
369
|
+
stream.emit('data', data)
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return data
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (this.readAhead === false) {
|
|
376
|
+
stream._duplexState |= READ_READ_AHEAD
|
|
377
|
+
this.updateNextTick()
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return null
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
drain() {
|
|
384
|
+
const stream = this.stream
|
|
385
|
+
|
|
386
|
+
while (
|
|
387
|
+
(stream._duplexState & READ_STATUS) === READ_QUEUED &&
|
|
388
|
+
(stream._duplexState & READ_FLOWING) !== 0
|
|
389
|
+
) {
|
|
390
|
+
const data = this.shift()
|
|
391
|
+
|
|
392
|
+
if (this.pipeTo !== null && this.pipeTo.write(data) === false) {
|
|
393
|
+
stream._duplexState &= READ_PIPE_NOT_DRAINED
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
if ((stream._duplexState & READ_EMIT_DATA) !== 0) {
|
|
397
|
+
stream.emit('data', data)
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
update() {
|
|
403
|
+
const stream = this.stream
|
|
404
|
+
|
|
405
|
+
stream._duplexState |= READ_UPDATING
|
|
406
|
+
|
|
407
|
+
do {
|
|
408
|
+
this.drain()
|
|
409
|
+
|
|
410
|
+
while (
|
|
411
|
+
this.buffered < this.highWaterMark &&
|
|
412
|
+
(stream._duplexState & SHOULD_NOT_READ) === READ_READ_AHEAD
|
|
413
|
+
) {
|
|
414
|
+
stream._duplexState |= READ_ACTIVE_AND_NEEDS_PUSH
|
|
415
|
+
stream._read(this.afterRead)
|
|
416
|
+
this.drain()
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if ((stream._duplexState & READ_READABLE_STATUS) === READ_EMIT_READABLE_AND_QUEUED) {
|
|
420
|
+
stream._duplexState |= READ_EMITTED_READABLE
|
|
421
|
+
stream.emit('readable')
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if ((stream._duplexState & READ_PRIMARY_AND_ACTIVE) === 0) {
|
|
425
|
+
this.updateNonPrimary()
|
|
426
|
+
}
|
|
427
|
+
} while (this.continueUpdate() === true)
|
|
428
|
+
|
|
429
|
+
stream._duplexState &= READ_NOT_UPDATING
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
updateNonPrimary() {
|
|
433
|
+
const stream = this.stream
|
|
434
|
+
|
|
435
|
+
if ((stream._duplexState & READ_ENDING_STATUS) === READ_ENDING) {
|
|
436
|
+
stream._duplexState = (stream._duplexState | READ_DONE) & READ_NOT_ENDING
|
|
437
|
+
stream.emit('end')
|
|
438
|
+
|
|
439
|
+
if ((stream._duplexState & AUTO_DESTROY) === DONE) {
|
|
440
|
+
stream._duplexState |= DESTROYING
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (this.pipeTo !== null) {
|
|
444
|
+
this.pipeTo.end()
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
if ((stream._duplexState & DESTROY_STATUS) === DESTROYING) {
|
|
449
|
+
if ((stream._duplexState & ACTIVE_OR_TICKING) === 0) {
|
|
450
|
+
stream._duplexState |= ACTIVE
|
|
451
|
+
stream._destroy(afterDestroy.bind(this))
|
|
452
|
+
}
|
|
453
|
+
return
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if ((stream._duplexState & IS_OPENING) === OPENING) {
|
|
457
|
+
stream._duplexState = (stream._duplexState | ACTIVE) & NOT_OPENING
|
|
458
|
+
stream._open(afterOpen.bind(this))
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
continueUpdate() {
|
|
463
|
+
if ((this.stream._duplexState & READ_NEXT_TICK) === 0) return false
|
|
464
|
+
this.stream._duplexState &= READ_NOT_NEXT_TICK
|
|
465
|
+
return true
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
updateCallback() {
|
|
469
|
+
if ((this.stream._duplexState & READ_UPDATE_SYNC_STATUS) === READ_PRIMARY) {
|
|
470
|
+
this.update()
|
|
471
|
+
} else {
|
|
472
|
+
this.updateNextTick()
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
updateNextTickIfOpen() {
|
|
477
|
+
if ((this.stream._duplexState & READ_NEXT_TICK_OR_OPENING) !== 0) return
|
|
478
|
+
this.stream._duplexState |= READ_NEXT_TICK
|
|
479
|
+
if ((this.stream._duplexState & READ_UPDATING) === 0) qmt(this.afterUpdateNextTick)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
updateNextTick() {
|
|
483
|
+
if ((this.stream._duplexState & READ_NEXT_TICK) !== 0) return
|
|
484
|
+
this.stream._duplexState |= READ_NEXT_TICK
|
|
485
|
+
if ((this.stream._duplexState & READ_UPDATING) === 0) qmt(this.afterUpdateNextTick)
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
class TransformState {
|
|
490
|
+
constructor(stream) {
|
|
491
|
+
this.data = null
|
|
492
|
+
this.afterTransform = afterTransform.bind(stream)
|
|
493
|
+
this.afterFinal = null
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
class Pipeline {
|
|
498
|
+
constructor(src, dst, cb) {
|
|
499
|
+
this.from = src
|
|
500
|
+
this.to = dst
|
|
501
|
+
this.afterPipe = cb
|
|
502
|
+
this.error = null
|
|
503
|
+
this.pipeToFinished = false
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
finished() {
|
|
507
|
+
this.pipeToFinished = true
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
done(stream, err) {
|
|
511
|
+
if (err) this.error = err
|
|
512
|
+
|
|
513
|
+
if (stream === this.to) {
|
|
514
|
+
this.to = null
|
|
515
|
+
|
|
516
|
+
if (this.from !== null) {
|
|
517
|
+
if ((this.from._duplexState & READ_DONE) === 0 || !this.pipeToFinished) {
|
|
518
|
+
this.from.destroy(this.error || StreamError.PREMATURE_CLOSE('Writable stream closed'))
|
|
519
|
+
}
|
|
520
|
+
return
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (stream === this.from) {
|
|
525
|
+
this.from = null
|
|
526
|
+
|
|
527
|
+
if (this.to !== null) {
|
|
528
|
+
if ((stream._duplexState & READ_DONE) === 0) {
|
|
529
|
+
this.to.destroy(this.error || StreamError.PREMATURE_CLOSE('Readable stream closed'))
|
|
530
|
+
}
|
|
531
|
+
return
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (this.afterPipe !== null) this.afterPipe(this.error)
|
|
536
|
+
this.to = this.from = this.afterPipe = null
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
function afterDrain() {
|
|
541
|
+
this.stream._duplexState |= READ_PIPE_DRAINED
|
|
542
|
+
this.updateCallback()
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
function afterFinal(err) {
|
|
546
|
+
const stream = this.stream
|
|
547
|
+
if (err) stream.destroy(err)
|
|
548
|
+
|
|
549
|
+
if ((stream._duplexState & DESTROY_STATUS) === 0) {
|
|
550
|
+
stream._duplexState |= WRITE_DONE
|
|
551
|
+
stream.emit('finish')
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if ((stream._duplexState & AUTO_DESTROY) === DONE) {
|
|
555
|
+
stream._duplexState |= DESTROYING
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
stream._duplexState &= WRITE_NOT_FINISHING
|
|
559
|
+
|
|
560
|
+
// no need to wait the extra tick here, so we short circuit that
|
|
561
|
+
if ((stream._duplexState & WRITE_UPDATING) === 0) {
|
|
562
|
+
this.update()
|
|
563
|
+
} else {
|
|
564
|
+
this.updateNextTick()
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function afterDestroy(err) {
|
|
569
|
+
const stream = this.stream
|
|
570
|
+
|
|
571
|
+
if (!err && !StreamError.isStreamDestroyed(this.error)) err = this.error
|
|
572
|
+
if (err) stream.emit('error', err)
|
|
573
|
+
|
|
574
|
+
stream._duplexState |= DESTROYED
|
|
575
|
+
stream.emit('close')
|
|
576
|
+
|
|
577
|
+
const rs = stream._readableState
|
|
578
|
+
const ws = stream._writableState
|
|
579
|
+
|
|
580
|
+
if (rs !== null && rs.pipeline !== null) {
|
|
581
|
+
rs.pipeline.done(stream, err)
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
if (ws !== null) {
|
|
585
|
+
while (ws.drains !== null && ws.drains.length > 0) {
|
|
586
|
+
ws.drains.shift().resolve(false)
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
if (ws.pipeline !== null) {
|
|
590
|
+
ws.pipeline.done(stream, err)
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function afterWrite(err) {
|
|
596
|
+
const stream = this.stream
|
|
597
|
+
|
|
598
|
+
if (err) stream.destroy(err)
|
|
599
|
+
stream._duplexState &= WRITE_NOT_ACTIVE
|
|
600
|
+
|
|
601
|
+
if (this.drains !== null) tickDrains(this.drains)
|
|
602
|
+
|
|
603
|
+
if ((stream._duplexState & WRITE_DRAIN_STATUS) === WRITE_UNDRAINED) {
|
|
604
|
+
stream._duplexState &= WRITE_DRAINED
|
|
605
|
+
|
|
606
|
+
if ((stream._duplexState & WRITE_EMIT_DRAIN) === WRITE_EMIT_DRAIN) {
|
|
607
|
+
stream.emit('drain')
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
this.updateCallback()
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function afterRead(err) {
|
|
615
|
+
if (err) this.stream.destroy(err)
|
|
616
|
+
this.stream._duplexState &= READ_NOT_ACTIVE
|
|
617
|
+
|
|
618
|
+
if (this.readAhead === false && (this.stream._duplexState & READ_RESUMED) === 0) {
|
|
619
|
+
this.stream._duplexState &= READ_NO_READ_AHEAD
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
this.updateCallback()
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function updateReadNT() {
|
|
626
|
+
if ((this.stream._duplexState & READ_UPDATING) === 0) {
|
|
627
|
+
this.stream._duplexState &= READ_NOT_NEXT_TICK
|
|
628
|
+
this.update()
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function updateWriteNT() {
|
|
633
|
+
if ((this.stream._duplexState & WRITE_UPDATING) === 0) {
|
|
634
|
+
this.stream._duplexState &= WRITE_NOT_NEXT_TICK
|
|
635
|
+
this.update()
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
function tickDrains(drains) {
|
|
640
|
+
for (let i = 0; i < drains.length; i++) {
|
|
641
|
+
// drains.writes are monotonic, so if one is 0 its always the first one
|
|
642
|
+
if (--drains[i].writes === 0) {
|
|
643
|
+
drains.shift().resolve(true)
|
|
644
|
+
i--
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function afterOpen(err) {
|
|
650
|
+
const stream = this.stream
|
|
651
|
+
|
|
652
|
+
if (err) stream.destroy(err)
|
|
653
|
+
|
|
654
|
+
if ((stream._duplexState & DESTROYING) === 0) {
|
|
655
|
+
if ((stream._duplexState & READ_PRIMARY_STATUS) === 0) {
|
|
656
|
+
stream._duplexState |= READ_PRIMARY
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if ((stream._duplexState & WRITE_PRIMARY_STATUS) === 0) {
|
|
660
|
+
stream._duplexState |= WRITE_PRIMARY
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
stream.emit('open')
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
stream._duplexState &= NOT_ACTIVE
|
|
667
|
+
|
|
668
|
+
if (stream._writableState !== null) {
|
|
669
|
+
stream._writableState.updateCallback()
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (stream._readableState !== null) {
|
|
673
|
+
stream._readableState.updateCallback()
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
function afterTransform(err, data) {
|
|
678
|
+
if (data !== undefined && data !== null) this.push(data)
|
|
679
|
+
this._writableState.afterWrite(err)
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
function newListener(name) {
|
|
683
|
+
if (this._readableState !== null) {
|
|
684
|
+
if (name === 'data') {
|
|
685
|
+
this._duplexState |= READ_EMIT_DATA | READ_RESUMED_READ_AHEAD
|
|
686
|
+
this._readableState.updateNextTick()
|
|
687
|
+
}
|
|
688
|
+
if (name === 'readable') {
|
|
689
|
+
this._duplexState |= READ_EMIT_READABLE
|
|
690
|
+
this._readableState.updateNextTick()
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
if (this._writableState !== null) {
|
|
695
|
+
if (name === 'drain') {
|
|
696
|
+
this._duplexState |= WRITE_EMIT_DRAIN
|
|
697
|
+
this._writableState.updateNextTick()
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
class Stream extends EventEmitter {
|
|
703
|
+
constructor(opts) {
|
|
704
|
+
super()
|
|
705
|
+
|
|
706
|
+
this._duplexState = 0
|
|
707
|
+
this._readableState = null
|
|
708
|
+
this._writableState = null
|
|
709
|
+
|
|
710
|
+
if (opts) {
|
|
711
|
+
if (opts.open) this._open = opts.open
|
|
712
|
+
if (opts.destroy) this._destroy = opts.destroy
|
|
713
|
+
if (opts.predestroy) this._predestroy = opts.predestroy
|
|
714
|
+
if (opts.signal) opts.signal.addEventListener('abort', abort.bind(this))
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
this.on('newListener', newListener)
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
_open(cb) {
|
|
721
|
+
cb(null)
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
_destroy(cb) {
|
|
725
|
+
cb(null)
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
_predestroy() {
|
|
729
|
+
// does nothing
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
get readable() {
|
|
733
|
+
return this._readableState !== null ? true : undefined
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
get writable() {
|
|
737
|
+
return this._writableState !== null ? true : undefined
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
get destroyed() {
|
|
741
|
+
return (this._duplexState & DESTROYED) !== 0
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
get destroying() {
|
|
745
|
+
return (this._duplexState & DESTROY_STATUS) !== 0
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
destroy(err) {
|
|
749
|
+
if ((this._duplexState & DESTROY_STATUS) === 0) {
|
|
750
|
+
if (!err) err = StreamError.STREAM_DESTROYED()
|
|
751
|
+
this._duplexState = (this._duplexState | DESTROYING) & NON_PRIMARY
|
|
752
|
+
|
|
753
|
+
if (this._readableState !== null) {
|
|
754
|
+
this._readableState.highWaterMark = 0
|
|
755
|
+
this._readableState.error = err
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
if (this._writableState !== null) {
|
|
759
|
+
this._writableState.highWaterMark = 0
|
|
760
|
+
this._writableState.error = err
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
this._duplexState |= PREDESTROYING
|
|
764
|
+
this._predestroy()
|
|
765
|
+
this._duplexState &= NOT_PREDESTROYING
|
|
766
|
+
|
|
767
|
+
if (this._readableState !== null) {
|
|
768
|
+
this._readableState.updateNextTick()
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
if (this._writableState !== null) {
|
|
772
|
+
this._writableState.updateNextTick()
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
class Readable extends Stream {
|
|
779
|
+
constructor(opts) {
|
|
780
|
+
super(opts)
|
|
781
|
+
|
|
782
|
+
this._duplexState |= OPENING | WRITE_DONE | READ_READ_AHEAD
|
|
783
|
+
this._readableState = new ReadableState(this, opts)
|
|
784
|
+
|
|
785
|
+
if (opts) {
|
|
786
|
+
if (this._readableState.readAhead === false) this._duplexState &= READ_NO_READ_AHEAD
|
|
787
|
+
if (opts.read) this._read = opts.read
|
|
788
|
+
if (opts.eagerOpen) this._readableState.updateNextTick()
|
|
789
|
+
if (opts.encoding) this.setEncoding(opts.encoding)
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
static deferred(fn, opts) {
|
|
794
|
+
const out = new PassThrough(opts)
|
|
795
|
+
|
|
796
|
+
fn()
|
|
797
|
+
.then((src) => {
|
|
798
|
+
if (src === null) return out.end()
|
|
799
|
+
if (out.destroying) return
|
|
800
|
+
pipeline(src, out, noop)
|
|
801
|
+
})
|
|
802
|
+
.catch((err) => out.destroy(err))
|
|
803
|
+
|
|
804
|
+
return out
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
setEncoding(encoding) {
|
|
808
|
+
const dec = new TextDecoder(encoding)
|
|
809
|
+
const map = this._readableState.map || echo
|
|
810
|
+
this._readableState.map = mapOrSkip
|
|
811
|
+
return this
|
|
812
|
+
|
|
813
|
+
function mapOrSkip(data) {
|
|
814
|
+
const next = dec.push(data)
|
|
815
|
+
return next === '' && (data.byteLength !== 0 || dec.remaining > 0) ? null : map(next)
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
_read(cb) {
|
|
820
|
+
cb(null)
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
pipe(dest, cb) {
|
|
824
|
+
this._readableState.updateNextTick()
|
|
825
|
+
this._readableState.pipe(dest, cb)
|
|
826
|
+
return dest
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
read() {
|
|
830
|
+
this._readableState.updateNextTick()
|
|
831
|
+
return this._readableState.read()
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
push(data) {
|
|
835
|
+
this._readableState.updateNextTickIfOpen()
|
|
836
|
+
return this._readableState.push(data)
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
unshift(data) {
|
|
840
|
+
this._readableState.updateNextTickIfOpen()
|
|
841
|
+
return this._readableState.unshift(data)
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
resume() {
|
|
845
|
+
this._duplexState |= READ_RESUMED_READ_AHEAD
|
|
846
|
+
this._readableState.updateNextTick()
|
|
847
|
+
return this
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
pause() {
|
|
851
|
+
this._duplexState &=
|
|
852
|
+
this._readableState.readAhead === false ? READ_PAUSED_NO_READ_AHEAD : READ_PAUSED
|
|
853
|
+
return this
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
static _fromAsyncIterator(ite, opts) {
|
|
857
|
+
let destroy
|
|
858
|
+
|
|
859
|
+
const rs = new Readable({
|
|
860
|
+
...opts,
|
|
861
|
+
read(cb) {
|
|
862
|
+
ite.next().then(push).then(cb.bind(null, null)).catch(cb)
|
|
863
|
+
},
|
|
864
|
+
predestroy() {
|
|
865
|
+
destroy = ite.return()
|
|
866
|
+
},
|
|
867
|
+
destroy(cb) {
|
|
868
|
+
if (!destroy) return cb(null)
|
|
869
|
+
destroy.then(cb.bind(null, null)).catch(cb)
|
|
870
|
+
}
|
|
871
|
+
})
|
|
872
|
+
|
|
873
|
+
return rs
|
|
874
|
+
|
|
875
|
+
function push(data) {
|
|
876
|
+
if (data.done) rs.push(null)
|
|
877
|
+
else rs.push(data.value)
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
static from(data, opts) {
|
|
882
|
+
if (isReadStreamx(data)) return data
|
|
883
|
+
if (data[asyncIterator]) return this._fromAsyncIterator(data[asyncIterator](), opts)
|
|
884
|
+
if (!Array.isArray(data)) data = data === undefined ? [] : [data]
|
|
885
|
+
|
|
886
|
+
let i = 0
|
|
887
|
+
return new Readable({
|
|
888
|
+
...opts,
|
|
889
|
+
read(cb) {
|
|
890
|
+
this.push(i === data.length ? null : data[i++])
|
|
891
|
+
cb(null)
|
|
892
|
+
}
|
|
893
|
+
})
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
static isBackpressured(rs) {
|
|
897
|
+
return (
|
|
898
|
+
(rs._duplexState & READ_BACKPRESSURE_STATUS) !== 0 ||
|
|
899
|
+
rs._readableState.buffered >= rs._readableState.highWaterMark
|
|
900
|
+
)
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
static isPaused(rs) {
|
|
904
|
+
return (rs._duplexState & READ_RESUMED) === 0
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
[asyncIterator]() {
|
|
908
|
+
const stream = this
|
|
909
|
+
|
|
910
|
+
let error = null
|
|
911
|
+
let promiseResolve = null
|
|
912
|
+
let promiseReject = null
|
|
913
|
+
|
|
914
|
+
this.on('error', (err) => {
|
|
915
|
+
error = err
|
|
916
|
+
})
|
|
917
|
+
this.on('readable', onreadable)
|
|
918
|
+
this.on('close', onclose)
|
|
919
|
+
|
|
920
|
+
return {
|
|
921
|
+
[asyncIterator]() {
|
|
922
|
+
return this
|
|
923
|
+
},
|
|
924
|
+
next() {
|
|
925
|
+
return new Promise(function (resolve, reject) {
|
|
926
|
+
promiseResolve = resolve
|
|
927
|
+
promiseReject = reject
|
|
928
|
+
const data = stream.read()
|
|
929
|
+
if (data !== null) ondata(data)
|
|
930
|
+
else if ((stream._duplexState & DESTROYED) !== 0) ondata(null)
|
|
931
|
+
})
|
|
932
|
+
},
|
|
933
|
+
return() {
|
|
934
|
+
return destroy(null)
|
|
935
|
+
},
|
|
936
|
+
throw(err) {
|
|
937
|
+
return destroy(err)
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
function onreadable() {
|
|
942
|
+
if (promiseResolve !== null) ondata(stream.read())
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function onclose() {
|
|
946
|
+
if (promiseResolve !== null) ondata(null)
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
function ondata(data) {
|
|
950
|
+
if (promiseReject === null) return
|
|
951
|
+
if (error) {
|
|
952
|
+
promiseReject(error)
|
|
953
|
+
} else if (data === null && (stream._duplexState & READ_DONE) === 0) {
|
|
954
|
+
promiseReject(StreamError.STREAM_DESTROYED())
|
|
955
|
+
} else {
|
|
956
|
+
promiseResolve({ value: data, done: data === null })
|
|
957
|
+
}
|
|
958
|
+
promiseReject = promiseResolve = null
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
function destroy(err) {
|
|
962
|
+
stream.destroy(err)
|
|
963
|
+
return new Promise((resolve, reject) => {
|
|
964
|
+
if (stream._duplexState & DESTROYED) return resolve({ value: undefined, done: true })
|
|
965
|
+
stream.once('close', function () {
|
|
966
|
+
if (err) reject(err)
|
|
967
|
+
else resolve({ value: undefined, done: true })
|
|
968
|
+
})
|
|
969
|
+
})
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
class Writable extends Stream {
|
|
975
|
+
constructor(opts) {
|
|
976
|
+
super(opts)
|
|
977
|
+
|
|
978
|
+
this._duplexState |= OPENING | READ_DONE
|
|
979
|
+
this._writableState = new WritableState(this, opts)
|
|
980
|
+
|
|
981
|
+
if (opts) {
|
|
982
|
+
if (opts.writev) this._writev = opts.writev
|
|
983
|
+
if (opts.write) this._write = opts.write
|
|
984
|
+
if (opts.final) this._final = opts.final
|
|
985
|
+
if (opts.eagerOpen) this._writableState.updateNextTick()
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
cork() {
|
|
990
|
+
this._duplexState |= WRITE_CORKED
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
uncork() {
|
|
994
|
+
this._duplexState &= WRITE_NOT_CORKED
|
|
995
|
+
this._writableState.updateNextTick()
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
_writev(batch, cb) {
|
|
999
|
+
cb(null)
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
_write(data, cb) {
|
|
1003
|
+
this._writableState.autoBatch(data, cb)
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
_final(cb) {
|
|
1007
|
+
cb(null)
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
static isBackpressured(ws) {
|
|
1011
|
+
return (ws._duplexState & WRITE_BACKPRESSURE_STATUS) !== 0
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
static drained(ws) {
|
|
1015
|
+
if (ws.destroyed) return Promise.resolve(false)
|
|
1016
|
+
|
|
1017
|
+
const state = ws._writableState
|
|
1018
|
+
const pending = isWritev(ws) ? Math.min(1, state.queue.length) : state.queue.length
|
|
1019
|
+
const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0)
|
|
1020
|
+
if (writes === 0) return Promise.resolve(true)
|
|
1021
|
+
|
|
1022
|
+
if (state.drains === null) state.drains = []
|
|
1023
|
+
return new Promise((resolve) => {
|
|
1024
|
+
state.drains.push({ writes, resolve })
|
|
1025
|
+
})
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
write(data) {
|
|
1029
|
+
this._writableState.updateNextTick()
|
|
1030
|
+
return this._writableState.push(data)
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
end(data) {
|
|
1034
|
+
this._writableState.updateNextTick()
|
|
1035
|
+
this._writableState.end(data)
|
|
1036
|
+
return this
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
class Duplex extends Readable {
|
|
1041
|
+
// and Writable
|
|
1042
|
+
constructor(opts) {
|
|
1043
|
+
super(opts)
|
|
1044
|
+
|
|
1045
|
+
this._duplexState = OPENING | (this._duplexState & READ_READ_AHEAD)
|
|
1046
|
+
this._writableState = new WritableState(this, opts)
|
|
1047
|
+
|
|
1048
|
+
if (opts) {
|
|
1049
|
+
if (opts.writev) this._writev = opts.writev
|
|
1050
|
+
if (opts.write) this._write = opts.write
|
|
1051
|
+
if (opts.final) this._final = opts.final
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
cork() {
|
|
1056
|
+
this._duplexState |= WRITE_CORKED
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
uncork() {
|
|
1060
|
+
this._duplexState &= WRITE_NOT_CORKED
|
|
1061
|
+
this._writableState.updateNextTick()
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
_writev(batch, cb) {
|
|
1065
|
+
cb(null)
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
_write(data, cb) {
|
|
1069
|
+
this._writableState.autoBatch(data, cb)
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
_final(cb) {
|
|
1073
|
+
cb(null)
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
write(data) {
|
|
1077
|
+
this._writableState.updateNextTick()
|
|
1078
|
+
return this._writableState.push(data)
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
end(data) {
|
|
1082
|
+
this._writableState.updateNextTick()
|
|
1083
|
+
this._writableState.end(data)
|
|
1084
|
+
return this
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
class Transform extends Duplex {
|
|
1089
|
+
constructor(opts) {
|
|
1090
|
+
super(opts)
|
|
1091
|
+
this._transformState = new TransformState(this)
|
|
1092
|
+
|
|
1093
|
+
if (opts) {
|
|
1094
|
+
if (opts.transform) this._transform = opts.transform
|
|
1095
|
+
if (opts.flush) this._flush = opts.flush
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
_write(data, cb) {
|
|
1100
|
+
if (this._readableState.buffered >= this._readableState.highWaterMark) {
|
|
1101
|
+
this._transformState.data = data
|
|
1102
|
+
} else {
|
|
1103
|
+
this._transform(data, this._transformState.afterTransform)
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
_read(cb) {
|
|
1108
|
+
if (this._transformState.data !== null) {
|
|
1109
|
+
const data = this._transformState.data
|
|
1110
|
+
this._transformState.data = null
|
|
1111
|
+
cb(null)
|
|
1112
|
+
this._transform(data, this._transformState.afterTransform)
|
|
1113
|
+
} else {
|
|
1114
|
+
cb(null)
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
destroy(err) {
|
|
1119
|
+
super.destroy(err)
|
|
1120
|
+
if (this._transformState.data !== null) {
|
|
1121
|
+
this._transformState.data = null
|
|
1122
|
+
this._transformState.afterTransform()
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
_transform(data, cb) {
|
|
1127
|
+
cb(null, data)
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
_flush(cb) {
|
|
1131
|
+
cb(null)
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
_final(cb) {
|
|
1135
|
+
this._transformState.afterFinal = cb
|
|
1136
|
+
this._flush(transformAfterFlush.bind(this))
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
class PassThrough extends Transform {}
|
|
1141
|
+
|
|
1142
|
+
function transformAfterFlush(err, data) {
|
|
1143
|
+
const cb = this._transformState.afterFinal
|
|
1144
|
+
if (err) return cb(err)
|
|
1145
|
+
|
|
1146
|
+
if (data !== null && data !== undefined) this.push(data)
|
|
1147
|
+
this.push(null)
|
|
1148
|
+
cb(null)
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
function pipelinePromise(...streams) {
|
|
1152
|
+
return new Promise((resolve, reject) => {
|
|
1153
|
+
return pipeline(...streams, (err) => {
|
|
1154
|
+
if (err) return reject(err)
|
|
1155
|
+
resolve()
|
|
1156
|
+
})
|
|
1157
|
+
})
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
function pipeline(stream, ...streams) {
|
|
1161
|
+
const all = Array.isArray(stream) ? [...stream, ...streams] : [stream, ...streams]
|
|
1162
|
+
const done = all.length && typeof all[all.length - 1] === 'function' ? all.pop() : null
|
|
1163
|
+
|
|
1164
|
+
if (all.length < 2) throw StreamError.BAD_ARGUMENT('Pipeline requires at least 2 streams')
|
|
1165
|
+
|
|
1166
|
+
let src = all[0]
|
|
1167
|
+
let dest = null
|
|
1168
|
+
let error = null
|
|
1169
|
+
|
|
1170
|
+
for (let i = 1; i < all.length; i++) {
|
|
1171
|
+
dest = all[i]
|
|
1172
|
+
|
|
1173
|
+
if (isStreamx(src)) {
|
|
1174
|
+
src.pipe(dest, onerror)
|
|
1175
|
+
} else {
|
|
1176
|
+
errorHandle(src, true, i > 1, onerror)
|
|
1177
|
+
src.pipe(dest)
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
src = dest
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
if (done) {
|
|
1184
|
+
let fin = false
|
|
1185
|
+
|
|
1186
|
+
const autoDestroy =
|
|
1187
|
+
isStreamx(dest) || !!(dest._writableState && dest._writableState.autoDestroy)
|
|
1188
|
+
|
|
1189
|
+
dest.on('error', (err) => {
|
|
1190
|
+
if (error === null) error = err
|
|
1191
|
+
})
|
|
1192
|
+
|
|
1193
|
+
dest.on('finish', () => {
|
|
1194
|
+
fin = true
|
|
1195
|
+
if (!autoDestroy) done(error)
|
|
1196
|
+
})
|
|
1197
|
+
|
|
1198
|
+
if (autoDestroy) {
|
|
1199
|
+
dest.on('close', () => done(error || (fin ? null : StreamError.PREMATURE_CLOSE())))
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
return dest
|
|
1204
|
+
|
|
1205
|
+
function errorHandle(s, rd, wr, onerror) {
|
|
1206
|
+
s.on('error', onerror)
|
|
1207
|
+
s.on('close', onclose)
|
|
1208
|
+
|
|
1209
|
+
function onclose() {
|
|
1210
|
+
if (rd && s._readableState && !s._readableState.ended) {
|
|
1211
|
+
return onerror(StreamError.PREMATURE_CLOSE())
|
|
1212
|
+
}
|
|
1213
|
+
if (wr && s._writableState && !s._writableState.ended) {
|
|
1214
|
+
return onerror(StreamError.PREMATURE_CLOSE())
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
function onerror(err) {
|
|
1220
|
+
if (!err || error) return
|
|
1221
|
+
error = err
|
|
1222
|
+
|
|
1223
|
+
for (const s of all) {
|
|
1224
|
+
s.destroy(err)
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
function echo(s) {
|
|
1230
|
+
return s
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
function isStream(stream) {
|
|
1234
|
+
return !!stream._readableState || !!stream._writableState
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
function isStreamx(stream) {
|
|
1238
|
+
return typeof stream._duplexState === 'number' && isStream(stream)
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
function isEnding(stream) {
|
|
1242
|
+
return !!stream._readableState && stream._readableState.ending
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
function isEnded(stream) {
|
|
1246
|
+
return !!stream._readableState && stream._readableState.ended
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
function isFinishing(stream) {
|
|
1250
|
+
return !!stream._writableState && stream._writableState.ending
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
function isFinished(stream) {
|
|
1254
|
+
return !!stream._writableState && stream._writableState.ended
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
function getStreamError(stream, opts = {}) {
|
|
1258
|
+
const err =
|
|
1259
|
+
(stream._readableState && stream._readableState.error) ||
|
|
1260
|
+
(stream._writableState && stream._writableState.error)
|
|
1261
|
+
|
|
1262
|
+
// avoid implicit errors by default
|
|
1263
|
+
return !opts.all && StreamError.isStreamDestroyed(err) ? null : err
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
function isReadStreamx(stream) {
|
|
1267
|
+
return isStreamx(stream) && stream.readable
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
function isDisturbed(stream) {
|
|
1271
|
+
return (
|
|
1272
|
+
(stream._duplexState & OPENING) !== OPENING ||
|
|
1273
|
+
(stream._duplexState & DESTROYING) === DESTROYING ||
|
|
1274
|
+
(stream._duplexState & ACTIVE_OR_TICKING) !== 0
|
|
1275
|
+
)
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
function isTypedArray(data) {
|
|
1279
|
+
return typeof data === 'object' && data !== null && typeof data.byteLength === 'number'
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
function defaultByteLength(data) {
|
|
1283
|
+
return isTypedArray(data) ? data.byteLength : 1024
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
function noop() {}
|
|
1287
|
+
|
|
1288
|
+
function abort() {
|
|
1289
|
+
this.destroy(StreamError.ABORTED())
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
function isWritev(s) {
|
|
1293
|
+
return s._writev !== Writable.prototype._writev && s._writev !== Duplex.prototype._writev
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
module.exports = {
|
|
1297
|
+
pipeline,
|
|
1298
|
+
pipelinePromise,
|
|
1299
|
+
isStream,
|
|
1300
|
+
isStreamx,
|
|
1301
|
+
isEnding,
|
|
1302
|
+
isEnded,
|
|
1303
|
+
isFinishing,
|
|
1304
|
+
isFinished,
|
|
1305
|
+
isDisturbed,
|
|
1306
|
+
getStreamError,
|
|
1307
|
+
Stream,
|
|
1308
|
+
Writable,
|
|
1309
|
+
Readable,
|
|
1310
|
+
Duplex,
|
|
1311
|
+
Transform,
|
|
1312
|
+
// Export PassThrough for compatibility with Node.js core's stream module
|
|
1313
|
+
PassThrough
|
|
1314
|
+
}
|