pixivflow 2.16.0 → 2.17.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/dist/auth/PixivAuth.d.ts +12 -0
- package/dist/auth/PixivAuth.d.ts.map +1 -1
- package/dist/auth/PixivAuth.js +26 -0
- package/dist/auth/PixivAuth.js.map +1 -1
- package/dist/batch/executionResult.d.ts +85 -0
- package/dist/batch/executionResult.d.ts.map +1 -0
- package/dist/batch/executionResult.js +102 -0
- package/dist/batch/executionResult.js.map +1 -0
- package/dist/batch/runDiagnostics.d.ts +48 -0
- package/dist/batch/runDiagnostics.d.ts.map +1 -0
- package/dist/batch/runDiagnostics.js +103 -0
- package/dist/batch/runDiagnostics.js.map +1 -0
- package/dist/commands/Command.d.ts +5 -0
- package/dist/commands/Command.d.ts.map +1 -1
- package/dist/commands/Command.js +7 -0
- package/dist/commands/Command.js.map +1 -1
- package/dist/commands/ExecuteSlotCommand.d.ts +37 -0
- package/dist/commands/ExecuteSlotCommand.d.ts.map +1 -0
- package/dist/commands/ExecuteSlotCommand.js +267 -0
- package/dist/commands/ExecuteSlotCommand.js.map +1 -0
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/scheduler-runtime.d.ts +37 -1
- package/dist/commands/scheduler-runtime.d.ts.map +1 -1
- package/dist/commands/scheduler-runtime.js +52 -19
- package/dist/commands/scheduler-runtime.js.map +1 -1
- package/dist/commands/types.d.ts +6 -0
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/config/types.d.ts +33 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/validation.d.ts +14 -1
- package/dist/config/validation.d.ts.map +1 -1
- package/dist/config/validation.js +109 -33
- package/dist/config/validation.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/delivery/DeliveryDispatcher.d.ts.map +1 -1
- package/dist/delivery/DeliveryDispatcher.js +7 -0
- package/dist/delivery/DeliveryDispatcher.js.map +1 -1
- package/dist/delivery/HttpMultipartDelivery.d.ts +12 -0
- package/dist/delivery/HttpMultipartDelivery.d.ts.map +1 -1
- package/dist/delivery/HttpMultipartDelivery.js +89 -70
- package/dist/delivery/HttpMultipartDelivery.js.map +1 -1
- package/dist/delivery/TelegramReviewDelivery.d.ts +49 -0
- package/dist/delivery/TelegramReviewDelivery.d.ts.map +1 -0
- package/dist/delivery/TelegramReviewDelivery.js +307 -0
- package/dist/delivery/TelegramReviewDelivery.js.map +1 -0
- package/dist/download/DownloadManager.d.ts +10 -0
- package/dist/download/DownloadManager.d.ts.map +1 -1
- package/dist/download/DownloadManager.js +21 -0
- package/dist/download/DownloadManager.js.map +1 -1
- package/dist/download/plan/DownloadPlanner.d.ts +10 -0
- package/dist/download/plan/DownloadPlanner.d.ts.map +1 -1
- package/dist/download/plan/DownloadPlanner.js +19 -0
- package/dist/download/plan/DownloadPlanner.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/notification/NotificationPolicy.d.ts.map +1 -1
- package/dist/notification/NotificationPolicy.js +4 -1
- package/dist/notification/NotificationPolicy.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/pixiv-token-getter-adapter.d.ts +27 -7
- package/dist/pixiv-token-getter-adapter.d.ts.map +1 -1
- package/dist/pixiv-token-getter-adapter.js +44 -27
- package/dist/pixiv-token-getter-adapter.js.map +1 -1
- package/dist/utils/concurrency.d.ts.map +1 -1
- package/dist/utils/concurrency.js +9 -2
- package/dist/utils/concurrency.js.map +1 -1
- package/dist/utils/config-validator-unified.d.ts.map +1 -1
- package/dist/utils/config-validator-unified.js +15 -1
- package/dist/utils/config-validator-unified.js.map +1 -1
- package/dist/utils/token-maintenance.d.ts +0 -4
- package/dist/utils/token-maintenance.d.ts.map +1 -1
- package/dist/utils/token-maintenance.js +5 -25
- package/dist/utils/token-maintenance.js.map +1 -1
- package/dist/version.js +1 -1
- package/dist/webui/package.json +1 -1
- package/node_modules/@redtidev/pixiv-client/LICENSE +21 -0
- package/node_modules/@redtidev/pixiv-client/README.md +103 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/exports.d.ts +6 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/exports.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/exports.js +14 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/exports.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/illustrations.d.ts +30 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/illustrations.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/illustrations.js +137 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/illustrations.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/media.d.ts +16 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/media.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/media.js +25 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/media.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/novels.d.ts +43 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/novels.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/novels.js +250 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/novels.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/options.d.ts +42 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/options.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/options.js +7 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/options.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/tags.d.ts +9 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/tags.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/tags.js +22 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/tags.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/users.d.ts +17 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/users.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/users.js +23 -0
- package/node_modules/@redtidev/pixiv-client/dist/app-api/users.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/auth/types.d.ts +25 -0
- package/node_modules/@redtidev/pixiv-client/dist/auth/types.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/auth/types.js +24 -0
- package/node_modules/@redtidev/pixiv-client/dist/auth/types.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/client.d.ts +42 -0
- package/node_modules/@redtidev/pixiv-client/dist/client.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/client.js +86 -0
- package/node_modules/@redtidev/pixiv-client/dist/client.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/errors/errors.d.ts +117 -0
- package/node_modules/@redtidev/pixiv-client/dist/errors/errors.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/errors/errors.js +169 -0
- package/node_modules/@redtidev/pixiv-client/dist/errors/errors.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/index.d.ts +25 -0
- package/node_modules/@redtidev/pixiv-client/dist/index.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/index.js +50 -0
- package/node_modules/@redtidev/pixiv-client/dist/index.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/logger.d.ts +13 -0
- package/node_modules/@redtidev/pixiv-client/dist/logger.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/logger.js +10 -0
- package/node_modules/@redtidev/pixiv-client/dist/logger.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/models/index.d.ts +112 -0
- package/node_modules/@redtidev/pixiv-client/dist/models/index.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/models/index.js +8 -0
- package/node_modules/@redtidev/pixiv-client/dist/models/index.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/pagination.d.ts +22 -0
- package/node_modules/@redtidev/pixiv-client/dist/pagination.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/pagination.js +41 -0
- package/node_modules/@redtidev/pixiv-client/dist/pagination.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.d.ts +95 -0
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.js +344 -0
- package/node_modules/@redtidev/pixiv-client/dist/rate-limit/RateLimitGate.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/transport/transport.d.ts +65 -0
- package/node_modules/@redtidev/pixiv-client/dist/transport/transport.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/transport/transport.js +410 -0
- package/node_modules/@redtidev/pixiv-client/dist/transport/transport.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/types.d.ts +186 -0
- package/node_modules/@redtidev/pixiv-client/dist/types.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/types.js +3 -0
- package/node_modules/@redtidev/pixiv-client/dist/types.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/web-api/types.d.ts +19 -0
- package/node_modules/@redtidev/pixiv-client/dist/web-api/types.d.ts.map +1 -0
- package/node_modules/@redtidev/pixiv-client/dist/web-api/types.js +3 -0
- package/node_modules/@redtidev/pixiv-client/dist/web-api/types.js.map +1 -0
- package/node_modules/@redtidev/pixiv-client/package.json +55 -0
- package/node_modules/@redtidev/pixiv-client/src/__tests__/independence.test.ts +75 -0
- package/node_modules/@redtidev/pixiv-client/src/__tests__/integration.test.ts +268 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/__tests__/services.test.ts +199 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/exports.ts +5 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/illustrations.ts +144 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/media.ts +20 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/novels.ts +269 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/options.ts +73 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/tags.ts +21 -0
- package/node_modules/@redtidev/pixiv-client/src/app-api/users.ts +22 -0
- package/node_modules/@redtidev/pixiv-client/src/auth/types.ts +33 -0
- package/node_modules/@redtidev/pixiv-client/src/client.ts +105 -0
- package/node_modules/@redtidev/pixiv-client/src/errors/errors.ts +180 -0
- package/node_modules/@redtidev/pixiv-client/src/index.ts +91 -0
- package/node_modules/@redtidev/pixiv-client/src/logger.ts +18 -0
- package/node_modules/@redtidev/pixiv-client/src/models/index.ts +117 -0
- package/node_modules/@redtidev/pixiv-client/src/pagination.ts +46 -0
- package/node_modules/@redtidev/pixiv-client/src/rate-limit/RateLimitGate.ts +365 -0
- package/node_modules/@redtidev/pixiv-client/src/rate-limit/__tests__/RateLimitGate.test.ts +258 -0
- package/node_modules/@redtidev/pixiv-client/src/transport/__tests__/transport.test.ts +282 -0
- package/node_modules/@redtidev/pixiv-client/src/transport/transport.ts +500 -0
- package/node_modules/@redtidev/pixiv-client/src/types.ts +168 -0
- package/node_modules/@redtidev/pixiv-client/src/web-api/types.ts +19 -0
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/README.md +69 -0
- package/node_modules/agent-base/dist/helpers.d.ts +15 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/node_modules/agent-base/dist/helpers.js +66 -0
- package/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/node_modules/agent-base/dist/index.d.ts +41 -0
- package/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/node_modules/agent-base/dist/index.js +178 -0
- package/node_modules/agent-base/dist/index.js.map +1 -0
- package/node_modules/agent-base/package.json +46 -0
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +63 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/axios/CHANGELOG.md +1934 -0
- package/node_modules/axios/LICENSE +7 -0
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2851 -0
- package/node_modules/axios/dist/axios.js +5807 -0
- package/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +5829 -0
- package/node_modules/axios/dist/esm/axios.js +5850 -0
- package/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/node_modules/axios/index.d.cts +766 -0
- package/node_modules/axios/index.d.ts +787 -0
- package/node_modules/axios/index.js +45 -0
- package/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +696 -0
- package/node_modules/axios/lib/adapters/http.js +1490 -0
- package/node_modules/axios/lib/adapters/xhr.js +277 -0
- package/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/axios/lib/core/Axios.js +306 -0
- package/node_modules/axios/lib/core/AxiosError.js +219 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +171 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/buildFullPath.js +76 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +95 -0
- package/node_modules/axios/lib/core/mergeConfig.js +174 -0
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/axios/lib/defaults/index.js +178 -0
- package/node_modules/axios/lib/defaults/transitional.js +10 -0
- package/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/axios/lib/helpers/cookies.js +64 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/axios/lib/helpers/toFormData.js +279 -0
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/axios/lib/utils.js +1150 -0
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/debug/LICENSE +20 -0
- package/node_modules/axios/node_modules/debug/README.md +481 -0
- package/node_modules/axios/node_modules/debug/package.json +64 -0
- package/node_modules/axios/node_modules/debug/src/browser.js +272 -0
- package/node_modules/axios/node_modules/debug/src/common.js +292 -0
- package/node_modules/axios/node_modules/debug/src/index.js +10 -0
- package/node_modules/axios/node_modules/debug/src/node.js +263 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/node_modules/ms/index.js +162 -0
- package/node_modules/axios/node_modules/ms/license.md +21 -0
- package/node_modules/axios/node_modules/ms/package.json +38 -0
- package/node_modules/axios/node_modules/ms/readme.md +59 -0
- package/node_modules/axios/package.json +203 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +25 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +27 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +157 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +709 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md +355 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +4 -0
- package/node_modules/form-data/lib/form_data.js +506 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/package.json +82 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/ip-address/LICENSE +19 -0
- package/node_modules/ip-address/README.md +308 -0
- package/node_modules/ip-address/dist/address-error.d.ts +15 -0
- package/node_modules/ip-address/dist/address-error.js +12 -0
- package/node_modules/ip-address/dist/address-error.js.map +1 -0
- package/node_modules/ip-address/dist/common.d.ts +69 -0
- package/node_modules/ip-address/dist/common.js +142 -0
- package/node_modules/ip-address/dist/common.js.map +1 -0
- package/node_modules/ip-address/dist/ip-address.d.ts +7 -0
- package/node_modules/ip-address/dist/ip-address.js +35 -0
- package/node_modules/ip-address/dist/ip-address.js.map +1 -0
- package/node_modules/ip-address/dist/ipv4.d.ts +340 -0
- package/node_modules/ip-address/dist/ipv4.js +580 -0
- package/node_modules/ip-address/dist/ipv4.js.map +1 -0
- package/node_modules/ip-address/dist/ipv6.d.ts +630 -0
- package/node_modules/ip-address/dist/ipv6.js +1443 -0
- package/node_modules/ip-address/dist/ipv6.js.map +1 -0
- package/node_modules/ip-address/dist/v4/constants.d.ts +16 -0
- package/node_modules/ip-address/dist/v4/constants.js +51 -0
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -0
- package/node_modules/ip-address/dist/v6/constants.d.ts +58 -0
- package/node_modules/ip-address/dist/v6/constants.js +128 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -0
- package/node_modules/ip-address/dist/v6/helpers.d.ts +18 -0
- package/node_modules/ip-address/dist/v6/helpers.js +54 -0
- package/node_modules/ip-address/dist/v6/helpers.js.map +1 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +5 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -0
- package/node_modules/ip-address/package.json +90 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +163 -0
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +103 -0
- package/node_modules/proxy-from-env/package.json +43 -0
- package/node_modules/smart-buffer/.prettierrc.yaml +5 -0
- package/node_modules/smart-buffer/.travis.yml +13 -0
- package/node_modules/smart-buffer/LICENSE +20 -0
- package/node_modules/smart-buffer/README.md +633 -0
- package/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
- package/node_modules/smart-buffer/build/smartbuffer.js.map +1 -0
- package/node_modules/smart-buffer/build/utils.js +108 -0
- package/node_modules/smart-buffer/build/utils.js.map +1 -0
- package/node_modules/smart-buffer/docs/CHANGELOG.md +70 -0
- package/node_modules/smart-buffer/docs/README_v3.md +367 -0
- package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
- package/node_modules/smart-buffer/package.json +79 -0
- package/node_modules/smart-buffer/typings/smartbuffer.d.ts +755 -0
- package/node_modules/smart-buffer/typings/utils.d.ts +66 -0
- package/node_modules/socks/.eslintrc.cjs +11 -0
- package/node_modules/socks/.prettierrc.yaml +7 -0
- package/node_modules/socks/LICENSE +20 -0
- package/node_modules/socks/README.md +686 -0
- package/node_modules/socks/build/client/socksclient.js +793 -0
- package/node_modules/socks/build/client/socksclient.js.map +1 -0
- package/node_modules/socks/build/common/constants.js +108 -0
- package/node_modules/socks/build/common/constants.js.map +1 -0
- package/node_modules/socks/build/common/helpers.js +167 -0
- package/node_modules/socks/build/common/helpers.js.map +1 -0
- package/node_modules/socks/build/common/receivebuffer.js +43 -0
- package/node_modules/socks/build/common/receivebuffer.js.map +1 -0
- package/node_modules/socks/build/common/util.js +25 -0
- package/node_modules/socks/build/common/util.js.map +1 -0
- package/node_modules/socks/build/index.js +18 -0
- package/node_modules/socks/build/index.js.map +1 -0
- package/node_modules/socks/docs/examples/index.md +17 -0
- package/node_modules/socks/docs/examples/javascript/associateExample.md +90 -0
- package/node_modules/socks/docs/examples/javascript/bindExample.md +83 -0
- package/node_modules/socks/docs/examples/javascript/connectExample.md +258 -0
- package/node_modules/socks/docs/examples/typescript/associateExample.md +93 -0
- package/node_modules/socks/docs/examples/typescript/bindExample.md +86 -0
- package/node_modules/socks/docs/examples/typescript/connectExample.md +265 -0
- package/node_modules/socks/docs/index.md +5 -0
- package/node_modules/socks/docs/migratingFromV1.md +86 -0
- package/node_modules/socks/package.json +58 -0
- package/node_modules/socks/typings/client/socksclient.d.ts +162 -0
- package/node_modules/socks/typings/common/constants.d.ts +151 -0
- package/node_modules/socks/typings/common/helpers.d.ts +17 -0
- package/node_modules/socks/typings/common/receivebuffer.d.ts +12 -0
- package/node_modules/socks/typings/common/util.d.ts +14 -0
- package/node_modules/socks/typings/index.d.ts +1 -0
- package/node_modules/socks-proxy-agent/LICENSE +22 -0
- package/node_modules/socks-proxy-agent/README.md +50 -0
- package/node_modules/socks-proxy-agent/dist/index.d.ts +27 -0
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/socks-proxy-agent/dist/index.js +195 -0
- package/node_modules/socks-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/LICENSE +20 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/README.md +481 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/package.json +64 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/src/browser.js +272 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/src/common.js +292 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/src/index.js +10 -0
- package/node_modules/socks-proxy-agent/node_modules/debug/src/node.js +263 -0
- package/node_modules/socks-proxy-agent/node_modules/ms/index.js +162 -0
- package/node_modules/socks-proxy-agent/node_modules/ms/license.md +21 -0
- package/node_modules/socks-proxy-agent/node_modules/ms/package.json +38 -0
- package/node_modules/socks-proxy-agent/node_modules/ms/readme.md +59 -0
- package/node_modules/socks-proxy-agent/package.json +142 -0
- package/node_modules/undici/LICENSE +21 -0
- package/node_modules/undici/README.md +473 -0
- package/node_modules/undici/docs/docs/api/Agent.md +80 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/undici/docs/docs/api/Client.md +277 -0
- package/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +101 -0
- package/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +204 -0
- package/node_modules/undici/docs/docs/api/DispatchInterceptor.md +60 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1347 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +162 -0
- package/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +52 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +540 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +77 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +547 -0
- package/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +131 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +96 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +45 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +117 -0
- package/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +51 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +136 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +20 -0
- package/node_modules/undici/index-fetch.js +35 -0
- package/node_modules/undici/index.d.ts +3 -0
- package/node_modules/undici/index.js +169 -0
- package/node_modules/undici/lib/api/abort-signal.js +57 -0
- package/node_modules/undici/lib/api/api-connect.js +108 -0
- package/node_modules/undici/lib/api/api-pipeline.js +251 -0
- package/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/undici/lib/api/api-stream.js +220 -0
- package/node_modules/undici/lib/api/api-upgrade.js +108 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +385 -0
- package/node_modules/undici/lib/api/util.js +93 -0
- package/node_modules/undici/lib/core/connect.js +240 -0
- package/node_modules/undici/lib/core/constants.js +118 -0
- package/node_modules/undici/lib/core/diagnostics.js +202 -0
- package/node_modules/undici/lib/core/errors.js +425 -0
- package/node_modules/undici/lib/core/request.js +416 -0
- package/node_modules/undici/lib/core/symbols.js +67 -0
- package/node_modules/undici/lib/core/tree.js +152 -0
- package/node_modules/undici/lib/core/util.js +719 -0
- package/node_modules/undici/lib/dispatcher/agent.js +129 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +209 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1496 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +744 -0
- package/node_modules/undici/lib/dispatcher/client.js +623 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +199 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +65 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +160 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +117 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +194 -0
- package/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
- package/node_modules/undici/lib/dispatcher/pool.js +107 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +274 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/undici/lib/global.js +32 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +44 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +232 -0
- package/node_modules/undici/lib/handler/retry-handler.js +408 -0
- package/node_modules/undici/lib/interceptor/dns.js +375 -0
- package/node_modules/undici/lib/interceptor/dump.js +123 -0
- package/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
- package/node_modules/undici/lib/interceptor/redirect.js +24 -0
- package/node_modules/undici/lib/interceptor/response-error.js +86 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/llhttp/constants.js +278 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +5 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +5 -0
- package/node_modules/undici/lib/llhttp/utils.js +15 -0
- package/node_modules/undici/lib/mock/mock-agent.js +160 -0
- package/node_modules/undici/lib/mock/mock-client.js +59 -0
- package/node_modules/undici/lib/mock/mock-errors.js +28 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +207 -0
- package/node_modules/undici/lib/mock/mock-pool.js +59 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +23 -0
- package/node_modules/undici/lib/mock/mock-utils.js +367 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/pluralizer.js +29 -0
- package/node_modules/undici/lib/util/timers.js +423 -0
- package/node_modules/undici/lib/web/cache/cache.js +859 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/symbols.js +5 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +184 -0
- package/node_modules/undici/lib/web/cookies/parse.js +310 -0
- package/node_modules/undici/lib/web/cookies/util.js +352 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +398 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +480 -0
- package/node_modules/undici/lib/web/eventsource/util.js +37 -0
- package/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/undici/lib/web/fetch/body.js +529 -0
- package/node_modules/undici/lib/web/fetch/constants.js +124 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +744 -0
- package/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
- package/node_modules/undici/lib/web/fetch/file.js +126 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +474 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +252 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +687 -0
- package/node_modules/undici/lib/web/fetch/index.js +2272 -0
- package/node_modules/undici/lib/web/fetch/request.js +1037 -0
- package/node_modules/undici/lib/web/fetch/response.js +610 -0
- package/node_modules/undici/lib/web/fetch/symbols.js +9 -0
- package/node_modules/undici/lib/web/fetch/util.js +1632 -0
- package/node_modules/undici/lib/web/fetch/webidl.js +695 -0
- package/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
- package/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
- package/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
- package/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
- package/node_modules/undici/lib/web/fileapi/util.js +391 -0
- package/node_modules/undici/lib/web/websocket/connection.js +371 -0
- package/node_modules/undici/lib/web/websocket/constants.js +66 -0
- package/node_modules/undici/lib/web/websocket/events.js +329 -0
- package/node_modules/undici/lib/web/websocket/frame.js +96 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +513 -0
- package/node_modules/undici/lib/web/websocket/sender.js +104 -0
- package/node_modules/undici/lib/web/websocket/symbols.js +12 -0
- package/node_modules/undici/lib/web/websocket/util.js +322 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +595 -0
- package/node_modules/undici/package.json +160 -0
- package/node_modules/undici/scripts/strip-comments.js +8 -0
- package/node_modules/undici/types/README.md +6 -0
- package/node_modules/undici/types/agent.d.ts +31 -0
- package/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/undici/types/balanced-pool.d.ts +29 -0
- package/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/undici/types/client.d.ts +125 -0
- package/node_modules/undici/types/connector.d.ts +34 -0
- package/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/undici/types/cookies.d.ts +28 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +66 -0
- package/node_modules/undici/types/dispatcher.d.ts +256 -0
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/undici/types/errors.d.ts +155 -0
- package/node_modules/undici/types/eventsource.d.ts +61 -0
- package/node_modules/undici/types/fetch.d.ts +209 -0
- package/node_modules/undici/types/file.d.ts +39 -0
- package/node_modules/undici/types/filereader.d.ts +54 -0
- package/node_modules/undici/types/formdata.d.ts +108 -0
- package/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/undici/types/handlers.d.ts +15 -0
- package/node_modules/undici/types/header.d.ts +4 -0
- package/node_modules/undici/types/index.d.ts +71 -0
- package/node_modules/undici/types/interceptors.d.ts +32 -0
- package/node_modules/undici/types/mock-agent.d.ts +50 -0
- package/node_modules/undici/types/mock-client.d.ts +25 -0
- package/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici/types/mock-pool.d.ts +25 -0
- package/node_modules/undici/types/patch.d.ts +33 -0
- package/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/undici/types/pool.d.ts +39 -0
- package/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/undici/types/readable.d.ts +65 -0
- package/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/undici/types/retry-handler.d.ts +116 -0
- package/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/undici/types/webidl.d.ts +228 -0
- package/node_modules/undici/types/websocket.d.ts +150 -0
- package/package.json +5 -2
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Transport = void 0;
|
|
7
|
+
const undici_1 = require("undici");
|
|
8
|
+
const socks_proxy_agent_1 = require("socks-proxy-agent");
|
|
9
|
+
const axios_1 = __importDefault(require("axios"));
|
|
10
|
+
const types_1 = require("../auth/types");
|
|
11
|
+
const errors_1 = require("../errors/errors");
|
|
12
|
+
const APP_HEADERS = {
|
|
13
|
+
'App-OS': 'ios',
|
|
14
|
+
'App-OS-Version': '14.6',
|
|
15
|
+
'App-Version': '7.13.3',
|
|
16
|
+
};
|
|
17
|
+
function proxyUrl(p) {
|
|
18
|
+
const protocol = (p.protocol ?? 'http').toLowerCase();
|
|
19
|
+
const auth = p.username && p.password
|
|
20
|
+
? `${encodeURIComponent(p.username)}:${encodeURIComponent(p.password)}@`
|
|
21
|
+
: '';
|
|
22
|
+
return `${protocol}://${auth}${p.host}:${p.port}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The ONE HTTP path for every Pixiv call: headers, Bearer auth, timeout,
|
|
26
|
+
* proxy, response classification, transient retry and the shared 429 gate all
|
|
27
|
+
* live here. Services only build URLs and decode payloads.
|
|
28
|
+
*/
|
|
29
|
+
class Transport {
|
|
30
|
+
baseUrl;
|
|
31
|
+
userAgent;
|
|
32
|
+
timeoutMs;
|
|
33
|
+
retries;
|
|
34
|
+
proxy;
|
|
35
|
+
auth;
|
|
36
|
+
gate;
|
|
37
|
+
logger;
|
|
38
|
+
emit;
|
|
39
|
+
fetchImpl;
|
|
40
|
+
coalesce;
|
|
41
|
+
sleeper;
|
|
42
|
+
httpDispatcher;
|
|
43
|
+
axiosInstance;
|
|
44
|
+
inFlight = new Map();
|
|
45
|
+
constructor(cfg) {
|
|
46
|
+
this.baseUrl = cfg.baseUrl;
|
|
47
|
+
this.userAgent = cfg.userAgent;
|
|
48
|
+
this.timeoutMs = cfg.timeoutMs;
|
|
49
|
+
this.retries = cfg.retries;
|
|
50
|
+
this.proxy = cfg.proxy;
|
|
51
|
+
this.auth = cfg.auth;
|
|
52
|
+
this.gate = cfg.gate;
|
|
53
|
+
this.logger = cfg.logger;
|
|
54
|
+
this.emit = cfg.emit;
|
|
55
|
+
this.coalesce = cfg.coalesce;
|
|
56
|
+
this.sleeper =
|
|
57
|
+
cfg.sleep ??
|
|
58
|
+
((ms, signal) => new Promise((resolve, reject) => {
|
|
59
|
+
// Referenced on purpose: an unref'd retry/backoff timer would let a
|
|
60
|
+
// short-lived CLI/script process exit instead of completing the retry.
|
|
61
|
+
const t = setTimeout(resolve, ms);
|
|
62
|
+
signal?.addEventListener('abort', () => {
|
|
63
|
+
clearTimeout(t);
|
|
64
|
+
reject(Object.assign(new Error('aborted'), { name: 'AbortError' }));
|
|
65
|
+
}, { once: true });
|
|
66
|
+
}));
|
|
67
|
+
if (cfg.fetchImpl) {
|
|
68
|
+
this.fetchImpl = cfg.fetchImpl;
|
|
69
|
+
}
|
|
70
|
+
else if (cfg.proxy) {
|
|
71
|
+
const protocol = (cfg.proxy.protocol ?? 'http').toLowerCase();
|
|
72
|
+
const url = proxyUrl(cfg.proxy);
|
|
73
|
+
if (protocol === 'socks' || protocol === 'socks4' || protocol === 'socks5') {
|
|
74
|
+
// undici fetch has no native SOCKS support; axios + socks agent only.
|
|
75
|
+
const socks = new socks_proxy_agent_1.SocksProxyAgent(url);
|
|
76
|
+
this.axiosInstance = axios_1.default.create({ httpAgent: socks, httpsAgent: socks, timeout: this.timeoutMs });
|
|
77
|
+
this.fetchImpl = (u, init) => this.axiosFetch(u, init);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.httpDispatcher = new undici_1.ProxyAgent(url);
|
|
81
|
+
this.fetchImpl = (u, init) => fetch(u, { ...init, dispatcher: this.httpDispatcher });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.fetchImpl = (u, init) => fetch(u, init);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// -- public API ------------------------------------------------------------
|
|
89
|
+
resolveUrl(pathOrUrl) {
|
|
90
|
+
try {
|
|
91
|
+
return new URL(pathOrUrl).toString();
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
const withSlash = pathOrUrl.startsWith('/') ? pathOrUrl : `/${pathOrUrl}`;
|
|
95
|
+
return new URL(withSlash, this.baseUrl).toString();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/** JSON request (also covers plain-text via {@link requestText}). */
|
|
99
|
+
async request(pathOrUrl, options = {}) {
|
|
100
|
+
const raw = await this.send(pathOrUrl, options);
|
|
101
|
+
return JSON.parse(raw.body);
|
|
102
|
+
}
|
|
103
|
+
/** Plain-text request (webview HTML endpoints). */
|
|
104
|
+
async requestText(pathOrUrl, options = {}) {
|
|
105
|
+
return (await this.send(pathOrUrl, options)).body;
|
|
106
|
+
}
|
|
107
|
+
/** Binary fetch for media. Coalesced, gated, typed errors, same proxy stack. */
|
|
108
|
+
async fetchBinary(pathOrUrl, options = {}) {
|
|
109
|
+
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
110
|
+
const url = this.resolveUrl(pathOrUrl);
|
|
111
|
+
const started = Date.now();
|
|
112
|
+
this.emit?.({ type: 'request_start', endpoint: url, method: options.method ?? 'GET' });
|
|
113
|
+
for (let attempt = 0;; attempt++) {
|
|
114
|
+
const { signal, cancel } = this.withTimeout(timeoutMs, options.signal);
|
|
115
|
+
try {
|
|
116
|
+
await this.gate.acquire(options.signal);
|
|
117
|
+
const buf = await this.executeBinary(url, { ...options, signal });
|
|
118
|
+
this.emit?.({ type: 'request_success', endpoint: url, status: 200, elapsedMs: Date.now() - started });
|
|
119
|
+
await this.gate.reportSuccess();
|
|
120
|
+
return buf;
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
const decision = await this.classifyFailure(e, attempt, url, 'GET', !!options.signal?.aborted);
|
|
124
|
+
if (decision.action === 'throw')
|
|
125
|
+
throw decision.error;
|
|
126
|
+
await this.waitRetry(decision.waitMs, options.signal);
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
cancel();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// -- core send with retry --------------------------------------------------
|
|
134
|
+
send(pathOrUrl, options) {
|
|
135
|
+
const url = this.resolveUrl(pathOrUrl);
|
|
136
|
+
if (this.coalesce && (options.method ?? 'GET') === 'GET' && !options.skipCoalesce) {
|
|
137
|
+
const key = this.coalesceKey(url, options);
|
|
138
|
+
const existing = this.inFlight.get(key);
|
|
139
|
+
if (existing)
|
|
140
|
+
return existing;
|
|
141
|
+
const promise = this.executeWithRetry(url, options).finally(() => this.inFlight.delete(key));
|
|
142
|
+
this.inFlight.set(key, promise);
|
|
143
|
+
return promise;
|
|
144
|
+
}
|
|
145
|
+
return this.executeWithRetry(url, options);
|
|
146
|
+
}
|
|
147
|
+
coalesceKey(url, options) {
|
|
148
|
+
// Auth header intentionally excluded: same resource, same token scope.
|
|
149
|
+
return `${options.method ?? 'GET'} ${url}`;
|
|
150
|
+
}
|
|
151
|
+
async executeWithRetry(url, options) {
|
|
152
|
+
const timeoutMs = options.timeoutMs ?? this.timeoutMs;
|
|
153
|
+
const started = Date.now();
|
|
154
|
+
let forceRefresh = false;
|
|
155
|
+
for (let attempt = 0;; attempt++) {
|
|
156
|
+
const { signal, cancel } = this.withTimeout(timeoutMs, options.signal);
|
|
157
|
+
try {
|
|
158
|
+
const { probe } = await this.gate.acquire(options.signal);
|
|
159
|
+
this.emit?.({ type: 'request_start', endpoint: url, method: options.method ?? 'GET' });
|
|
160
|
+
const result = await this.executeOnce(url, { ...options, signal }, forceRefresh);
|
|
161
|
+
const classified = this.classifyStatus(result, url);
|
|
162
|
+
if (classified.kind === 'ok') {
|
|
163
|
+
this.emit?.({ type: 'request_success', endpoint: url, status: result.status, elapsedMs: Date.now() - started });
|
|
164
|
+
await this.gate.reportSuccess();
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
const decision = await this.handleBadStatus(classified, result, url, attempt, probe);
|
|
168
|
+
if (decision.action === 'throw')
|
|
169
|
+
throw decision.error;
|
|
170
|
+
if (decision.action === 'refresh') {
|
|
171
|
+
forceRefresh = true;
|
|
172
|
+
this.emit?.({ type: 'auth_refresh', reason: 'unauthorized' });
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
await this.waitRetry(decision.waitMs, options.signal);
|
|
176
|
+
}
|
|
177
|
+
catch (e) {
|
|
178
|
+
const decision = await this.classifyFailure(e, attempt, url, options.method ?? 'GET', !!options.signal?.aborted);
|
|
179
|
+
if (decision.action === 'throw')
|
|
180
|
+
throw decision.error;
|
|
181
|
+
await this.waitRetry(decision.waitMs, options.signal);
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
cancel();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// -- execution backends ----------------------------------------------------
|
|
189
|
+
async executeOnce(url, options, forceRefresh) {
|
|
190
|
+
const headers = {
|
|
191
|
+
...(options.skipAppHeaders ? {} : APP_HEADERS),
|
|
192
|
+
...(this.userAgent ? { 'User-Agent': this.userAgent } : {}),
|
|
193
|
+
Referer: 'https://app-api.pixiv.net/',
|
|
194
|
+
...options.headers,
|
|
195
|
+
};
|
|
196
|
+
if (!options.skipAuth) {
|
|
197
|
+
const token = forceRefresh && (0, types_1.isRefreshable)(this.auth)
|
|
198
|
+
? await this.auth.refreshAccessToken(options.signal)
|
|
199
|
+
: await this.auth.getAccessToken(options.signal);
|
|
200
|
+
if (token)
|
|
201
|
+
headers.Authorization = `Bearer ${token}`;
|
|
202
|
+
}
|
|
203
|
+
const res = await this.fetchImpl(url, {
|
|
204
|
+
method: options.method ?? 'GET',
|
|
205
|
+
headers,
|
|
206
|
+
body: options.body,
|
|
207
|
+
signal: options.signal,
|
|
208
|
+
});
|
|
209
|
+
const body = await this.safeText(res);
|
|
210
|
+
return { status: res.status, statusText: res.statusText, body, headers: res.headers };
|
|
211
|
+
}
|
|
212
|
+
async executeBinary(url, options) {
|
|
213
|
+
const headers = {
|
|
214
|
+
...(options.skipAppHeaders ? {} : APP_HEADERS),
|
|
215
|
+
...(this.userAgent ? { 'User-Agent': this.userAgent } : {}),
|
|
216
|
+
Referer: 'https://app-api.pixiv.net/',
|
|
217
|
+
...options.headers,
|
|
218
|
+
};
|
|
219
|
+
if (!options.skipAuth) {
|
|
220
|
+
const token = await this.auth.getAccessToken(options.signal);
|
|
221
|
+
if (token)
|
|
222
|
+
headers.Authorization = `Bearer ${token}`;
|
|
223
|
+
}
|
|
224
|
+
const res = await this.fetchImpl(url, {
|
|
225
|
+
method: options.method ?? 'GET',
|
|
226
|
+
headers,
|
|
227
|
+
body: options.body,
|
|
228
|
+
signal: options.signal,
|
|
229
|
+
});
|
|
230
|
+
if (!res.ok) {
|
|
231
|
+
const body = await this.safeText(res);
|
|
232
|
+
throw this.statusError(res.status, res.statusText, body, url);
|
|
233
|
+
}
|
|
234
|
+
return res.arrayBuffer();
|
|
235
|
+
}
|
|
236
|
+
/** SOCKS backend: adapt an axios response to the fetch-like shape. */
|
|
237
|
+
async axiosFetch(url, init) {
|
|
238
|
+
const response = await this.axiosInstance.request({
|
|
239
|
+
url,
|
|
240
|
+
method: init.method ?? 'GET',
|
|
241
|
+
headers: init.headers,
|
|
242
|
+
data: init.body,
|
|
243
|
+
signal: init.signal ?? undefined,
|
|
244
|
+
validateStatus: () => true,
|
|
245
|
+
responseType: 'text',
|
|
246
|
+
transformResponse: (d) => d,
|
|
247
|
+
});
|
|
248
|
+
const headers = new Map();
|
|
249
|
+
for (const [k, v] of Object.entries(response.headers ?? {})) {
|
|
250
|
+
if (typeof v === 'string')
|
|
251
|
+
headers.set(k.toLowerCase(), v);
|
|
252
|
+
}
|
|
253
|
+
const body = typeof response.data === 'string' ? response.data : JSON.stringify(response.data ?? '');
|
|
254
|
+
return {
|
|
255
|
+
status: response.status,
|
|
256
|
+
statusText: response.statusText,
|
|
257
|
+
ok: response.status >= 200 && response.status < 300,
|
|
258
|
+
headers: { get: (name) => headers.get(name.toLowerCase()) ?? null },
|
|
259
|
+
json: async () => JSON.parse(body),
|
|
260
|
+
text: async () => body,
|
|
261
|
+
arrayBuffer: async () => {
|
|
262
|
+
const buf = await this.axiosInstance.request({
|
|
263
|
+
url,
|
|
264
|
+
method: init.method ?? 'GET',
|
|
265
|
+
headers: init.headers,
|
|
266
|
+
data: init.body,
|
|
267
|
+
signal: init.signal ?? undefined,
|
|
268
|
+
validateStatus: () => true,
|
|
269
|
+
responseType: 'arraybuffer',
|
|
270
|
+
});
|
|
271
|
+
return buf.data;
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
// -- classification & retry decisions -------------------------------------
|
|
276
|
+
classifyStatus(result, url) {
|
|
277
|
+
if (result.status >= 200 && result.status < 300)
|
|
278
|
+
return { kind: 'ok' };
|
|
279
|
+
return { kind: 'error', error: this.statusError(result.status, result.statusText, result.body, url) };
|
|
280
|
+
}
|
|
281
|
+
statusError(status, statusText, body, url) {
|
|
282
|
+
const snippet = body ? ` - ${body.slice(0, 200)}` : '';
|
|
283
|
+
const base = { status, endpoint: url, body, retryAfterMs: undefined };
|
|
284
|
+
switch (status) {
|
|
285
|
+
case 400:
|
|
286
|
+
return new errors_1.PixivHttpError(`Pixiv API error: 400 Bad Request${snippet}`, { ...base, retryable: false });
|
|
287
|
+
case 401:
|
|
288
|
+
return new errors_1.PixivAuthenticationError(`Pixiv API error: 401 Unauthorized${snippet}`, base);
|
|
289
|
+
case 403:
|
|
290
|
+
return new errors_1.PixivForbiddenError(`Pixiv API error: 403 Forbidden${snippet}`, base);
|
|
291
|
+
case 404:
|
|
292
|
+
return new errors_1.PixivNotFoundError(`Pixiv API error: 404 Not Found${snippet}`, base);
|
|
293
|
+
case 429:
|
|
294
|
+
return new errors_1.PixivRateLimitError(`Pixiv API error: 429 Rate Limit${snippet}`, base);
|
|
295
|
+
default:
|
|
296
|
+
if (status >= 500)
|
|
297
|
+
return new errors_1.PixivServerError(`Pixiv API error: ${status} ${statusText}${snippet}`, base);
|
|
298
|
+
return new errors_1.PixivHttpError(`Pixiv API error: ${status} ${statusText}${snippet}`, { ...base, retryable: false });
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
async handleBadStatus(classified, result, url, attempt, probe) {
|
|
302
|
+
const error = classified.error;
|
|
303
|
+
if (error instanceof errors_1.PixivAuthenticationError) {
|
|
304
|
+
// One refresh-and-retry, once per call.
|
|
305
|
+
if (attempt === 0 && (0, types_1.isRefreshable)(this.auth))
|
|
306
|
+
return { action: 'refresh' };
|
|
307
|
+
return { action: 'throw', error };
|
|
308
|
+
}
|
|
309
|
+
if (error instanceof errors_1.PixivRateLimitError) {
|
|
310
|
+
const retryAfter = result.headers.get('Retry-After');
|
|
311
|
+
const { waitMs, circuitOpened } = await this.gate.reportRateLimited(retryAfter);
|
|
312
|
+
Object.assign(error, { retryAfterMs: waitMs });
|
|
313
|
+
if (probe)
|
|
314
|
+
await this.gate.reportProbeFailure(waitMs);
|
|
315
|
+
// OPEN past the retry budget: fail fast and let the durable scheduler
|
|
316
|
+
// own the wait instead of blocking one process turn for many minutes.
|
|
317
|
+
if (circuitOpened || attempt >= this.retries) {
|
|
318
|
+
return { action: 'throw', error };
|
|
319
|
+
}
|
|
320
|
+
this.emit?.({ type: 'request_retry', endpoint: url, attempt: attempt + 1, waitMs, reason: 'rate_limited' });
|
|
321
|
+
return { action: 'retry', waitMs };
|
|
322
|
+
}
|
|
323
|
+
if (error instanceof errors_1.PixivServerError) {
|
|
324
|
+
if (probe)
|
|
325
|
+
await this.gate.reportProbeFailure(this.linearBackoffMs(attempt));
|
|
326
|
+
if (attempt >= this.retries)
|
|
327
|
+
return { action: 'throw', error };
|
|
328
|
+
const waitMs = this.linearBackoffMs(attempt);
|
|
329
|
+
this.emit?.({ type: 'request_retry', endpoint: url, attempt: attempt + 1, waitMs, reason: 'server_error' });
|
|
330
|
+
return { action: 'retry', waitMs };
|
|
331
|
+
}
|
|
332
|
+
// 400/403/404 and any other 4xx: never retry.
|
|
333
|
+
return { action: 'throw', error };
|
|
334
|
+
}
|
|
335
|
+
async classifyFailure(e, attempt, url, _method, callerAborted = false) {
|
|
336
|
+
// Typed kit errors are terminal by construction (already classified).
|
|
337
|
+
if (e instanceof errors_1.PixivHttpError)
|
|
338
|
+
return { action: 'throw', error: e };
|
|
339
|
+
if (e instanceof errors_1.PixivCircuitOpenError)
|
|
340
|
+
return { action: 'throw', error: e };
|
|
341
|
+
if (e instanceof errors_1.PixivAbortError) {
|
|
342
|
+
return { action: 'throw', error: e };
|
|
343
|
+
}
|
|
344
|
+
// AbortError from fetch/axios: distinguish our own timeout abort from a
|
|
345
|
+
// caller-provided signal abort. The internal timeout controller has NO
|
|
346
|
+
// external signal, so callerAborted cleanly separates the two cases
|
|
347
|
+
// (undici/axios attach different reasons; do not rely on their internals).
|
|
348
|
+
if (e instanceof Error && e.name === 'AbortError') {
|
|
349
|
+
const reason = e.cause;
|
|
350
|
+
const isOurTimeout = !callerAborted ||
|
|
351
|
+
(reason instanceof Error && reason.message === '__pixiv_timeout__');
|
|
352
|
+
if (isOurTimeout) {
|
|
353
|
+
return this.maybeTransientRetry(new errors_1.PixivTimeoutError(`Request timeout after ${this.timeoutMs}ms`, { endpoint: url, cause: e, code: 'timeout' }), attempt, url);
|
|
354
|
+
}
|
|
355
|
+
return { action: 'throw', error: new errors_1.PixivAbortError('Request aborted', { cause: e, endpoint: url }) };
|
|
356
|
+
}
|
|
357
|
+
if (e instanceof errors_1.PixivTimeoutError) {
|
|
358
|
+
return this.maybeTransientRetry(e, attempt, url);
|
|
359
|
+
}
|
|
360
|
+
// Everything else from the network stack (ECONNRESET, ENOTFOUND, proxy
|
|
361
|
+
// failure, socket hang up, ...) is transient up to the retry budget.
|
|
362
|
+
const network = new errors_1.PixivNetworkError(`Pixiv network error: ${e instanceof Error ? e.message : String(e)}`, { endpoint: url, cause: e, code: e?.code ?? 'network_error' });
|
|
363
|
+
return this.maybeTransientRetry(network, attempt, url);
|
|
364
|
+
}
|
|
365
|
+
maybeTransientRetry(error, attempt, url) {
|
|
366
|
+
if (attempt >= this.retries)
|
|
367
|
+
return { action: 'throw', error };
|
|
368
|
+
const waitMs = this.linearBackoffMs(attempt);
|
|
369
|
+
this.emit?.({ type: 'request_retry', endpoint: url, attempt: attempt + 1, waitMs, reason: 'network' });
|
|
370
|
+
return { action: 'retry', waitMs };
|
|
371
|
+
}
|
|
372
|
+
linearBackoffMs(attempt) {
|
|
373
|
+
return Math.min(1000 * (attempt + 1), 5000);
|
|
374
|
+
}
|
|
375
|
+
async waitRetry(waitMs, signal) {
|
|
376
|
+
if (waitMs <= 0)
|
|
377
|
+
return;
|
|
378
|
+
try {
|
|
379
|
+
await this.sleeper(waitMs, signal);
|
|
380
|
+
}
|
|
381
|
+
catch (e) {
|
|
382
|
+
throw new errors_1.PixivAbortError('aborted while waiting to retry', { cause: e });
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
// -- helpers ---------------------------------------------------------------
|
|
386
|
+
withTimeout(timeoutMs, external) {
|
|
387
|
+
if (external)
|
|
388
|
+
return { signal: external, cancel: () => { } };
|
|
389
|
+
const controller = new AbortController();
|
|
390
|
+
const timer = setTimeout(() => controller.abort(new Error('__pixiv_timeout__')), timeoutMs);
|
|
391
|
+
if (typeof timer.unref === 'function')
|
|
392
|
+
timer.unref();
|
|
393
|
+
return {
|
|
394
|
+
signal: controller.signal,
|
|
395
|
+
cancel: () => {
|
|
396
|
+
clearTimeout(timer);
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
async safeText(res) {
|
|
401
|
+
try {
|
|
402
|
+
return await res.text();
|
|
403
|
+
}
|
|
404
|
+
catch {
|
|
405
|
+
return '';
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
exports.Transport = Transport;
|
|
410
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/transport/transport.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAoC;AACpC,yDAAoD;AACpD,kDAAkD;AAElD,yCAAwE;AACxE,6CAW0B;AA0B1B,MAAM,WAAW,GAAG;IAClB,QAAQ,EAAE,KAAK;IACf,gBAAgB,EAAE,MAAM;IACxB,aAAa,EAAE,QAAQ;CACxB,CAAC;AAGF,SAAS,QAAQ,CAAC,CAAe;IAC/B,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ;QACnC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG;QACxE,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,GAAG,QAAQ,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACpD,CAAC;AASD;;;;GAIG;AACH,MAAa,SAAS;IACH,OAAO,CAAS;IAChB,SAAS,CAAU;IACnB,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,KAAK,CAAgB;IACrB,IAAI,CAAsB;IAC1B,IAAI,CAAgB;IACpB,MAAM,CAAa;IACnB,IAAI,CAAoB;IACxB,SAAS,CAAY;IACrB,QAAQ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AG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAC5F,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;YAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QACrD,OAAO;YACL,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,MAAM,EAAE,GAAG,EAAE;gBACX,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,GAAiB;QACtC,IAAI,CAAC;YACH,OAAO,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF;AA9aD,8BA8aC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import type { AccessTokenProvider } from './auth/types';
|
|
2
|
+
import type { KitLogger } from './logger';
|
|
3
|
+
/** HTTP(S) or SOCKS proxy. The kit never rotates proxies on 429. */
|
|
4
|
+
export interface ProxyOptions {
|
|
5
|
+
protocol?: 'http' | 'https' | 'socks' | 'socks4' | 'socks5';
|
|
6
|
+
host: string;
|
|
7
|
+
port: number;
|
|
8
|
+
username?: string;
|
|
9
|
+
password?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RateLimitOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Minimum spacing between the START of two requests (pacing / slot size).
|
|
14
|
+
* Conservative default: 1000 ms. Override per deployment.
|
|
15
|
+
*/
|
|
16
|
+
minIntervalMs?: number;
|
|
17
|
+
/** Random extra delay as a fraction of minIntervalMs, 0..0.5 recommended. */
|
|
18
|
+
jitterRatio?: number;
|
|
19
|
+
/** Cooldown after the FIRST 429 when no Retry-After hint is present. */
|
|
20
|
+
initialCooldownMs?: number;
|
|
21
|
+
/** Cooldown ceiling for the exponential 429 backoff. */
|
|
22
|
+
maxCooldownMs?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Number of consecutive successful responses required to decay the penalty
|
|
25
|
+
* level by one (so one lucky response never clears a 429 penalty).
|
|
26
|
+
*/
|
|
27
|
+
decaySuccesses?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Penalty level (cooldown exponent) at which the circuit opens and fast
|
|
30
|
+
* fails all requests until a half-open probe succeeds.
|
|
31
|
+
*/
|
|
32
|
+
openThreshold?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Persistence port. Default: in-memory. Hosts inject an SQLite/Redis/...
|
|
35
|
+
* adapter so restarts do not forget an active Pixiv cooldown.
|
|
36
|
+
*/
|
|
37
|
+
stateStore?: RateLimitStateStore;
|
|
38
|
+
/** Logical key inside the state store (e.g. account id). Default 'default'. */
|
|
39
|
+
scope?: string;
|
|
40
|
+
/** Injectable clock (tests). */
|
|
41
|
+
now?: () => number;
|
|
42
|
+
/** Injectable sleeper (tests / cooperative shutdown). */
|
|
43
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
44
|
+
/** Injectable jitter RNG in [0,1) (tests). */
|
|
45
|
+
random?: () => number;
|
|
46
|
+
}
|
|
47
|
+
/** Persisted gate state. All timestamps are epoch milliseconds. */
|
|
48
|
+
export interface RateLimitState {
|
|
49
|
+
/** Earliest time the next request may start (pacing cursor). */
|
|
50
|
+
nextAllowedAt: number;
|
|
51
|
+
/** Cooldown imposed by the latest 429. */
|
|
52
|
+
cooldownUntil: number;
|
|
53
|
+
/** Exponential penalty level (0 = healthy). */
|
|
54
|
+
penaltyLevel: number;
|
|
55
|
+
/** Timestamp of the most recent 429. */
|
|
56
|
+
last429At: number | null;
|
|
57
|
+
/** Circuit state. */
|
|
58
|
+
circuitState: 'closed' | 'open' | 'half_open';
|
|
59
|
+
/** Consecutive successes counted toward penalty decay. */
|
|
60
|
+
consecutiveSuccesses: number;
|
|
61
|
+
updatedAt: number;
|
|
62
|
+
}
|
|
63
|
+
export interface RateLimitStatus {
|
|
64
|
+
circuitState: RateLimitState['circuitState'];
|
|
65
|
+
cooldownRemainingMs: number;
|
|
66
|
+
penaltyLevel: number;
|
|
67
|
+
last429At: number | null;
|
|
68
|
+
nextAllowedInMs: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Persistence port for the shared rate-limit gate.
|
|
72
|
+
* The default implementation is process-local memory; hosts provide durable
|
|
73
|
+
* adapters (e.g. SQLite). Must be safe to call concurrently.
|
|
74
|
+
*/
|
|
75
|
+
export interface RateLimitStateStore {
|
|
76
|
+
load(scope: string): Promise<RateLimitState | null> | RateLimitState | null;
|
|
77
|
+
save(scope: string, state: RateLimitState): Promise<void> | void;
|
|
78
|
+
}
|
|
79
|
+
export type KitEvent = {
|
|
80
|
+
type: 'request_start';
|
|
81
|
+
endpoint: string;
|
|
82
|
+
method: string;
|
|
83
|
+
} | {
|
|
84
|
+
type: 'request_success';
|
|
85
|
+
endpoint: string;
|
|
86
|
+
status: number;
|
|
87
|
+
elapsedMs: number;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'request_retry';
|
|
90
|
+
endpoint: string;
|
|
91
|
+
attempt: number;
|
|
92
|
+
waitMs: number;
|
|
93
|
+
reason: string;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'rate_limited';
|
|
96
|
+
endpoint: string;
|
|
97
|
+
retryAfterMs: number;
|
|
98
|
+
penaltyLevel: number;
|
|
99
|
+
} | {
|
|
100
|
+
type: 'cooldown_started';
|
|
101
|
+
until: number;
|
|
102
|
+
penaltyLevel: number;
|
|
103
|
+
} | {
|
|
104
|
+
type: 'circuit_opened';
|
|
105
|
+
until: number;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'circuit_half_open';
|
|
108
|
+
} | {
|
|
109
|
+
type: 'circuit_closed';
|
|
110
|
+
} | {
|
|
111
|
+
type: 'auth_refresh';
|
|
112
|
+
reason: 'expired' | 'unauthorized';
|
|
113
|
+
};
|
|
114
|
+
export type KitEventListener = (event: KitEvent) => void;
|
|
115
|
+
export interface PixivClientOptions {
|
|
116
|
+
/** REQUIRED: source of Bearer access tokens. */
|
|
117
|
+
auth: AccessTokenProvider;
|
|
118
|
+
/** App API base URL (default https://app-api.pixiv.net). */
|
|
119
|
+
baseUrl?: string;
|
|
120
|
+
/** Default User-Agent header. */
|
|
121
|
+
userAgent?: string;
|
|
122
|
+
/** Per-request timeout in ms (default 30000). Binary downloads may override. */
|
|
123
|
+
timeoutMs?: number;
|
|
124
|
+
/**
|
|
125
|
+
* Retries for TRANSIENT failures only (network error / 5xx). 429 retries are
|
|
126
|
+
* governed by the rate-limit gate, not this counter. Default 2 (3 attempts).
|
|
127
|
+
*/
|
|
128
|
+
retries?: number;
|
|
129
|
+
proxy?: ProxyOptions;
|
|
130
|
+
rateLimit?: RateLimitOptions;
|
|
131
|
+
/** Deduplicate identical in-flight GET requests (default true). */
|
|
132
|
+
coalesceRequests?: boolean;
|
|
133
|
+
logger?: KitLogger;
|
|
134
|
+
/**
|
|
135
|
+
* Injectable sleeper for transient retries (tests supply a fake clock; the
|
|
136
|
+
* 429 gate sleeper is configured via rateLimit.sleep). Default: real timers.
|
|
137
|
+
*/
|
|
138
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
139
|
+
/** Structured network events. Never contains tokens/cookies/passwords. */
|
|
140
|
+
onEvent?: KitEventListener;
|
|
141
|
+
/**
|
|
142
|
+
* Advanced: replace the HTTP executor (tests use a fake fetch). When set,
|
|
143
|
+
* proxy settings are ignored.
|
|
144
|
+
*/
|
|
145
|
+
fetchImpl?: FetchLike;
|
|
146
|
+
}
|
|
147
|
+
export interface RequestOptions {
|
|
148
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
149
|
+
headers?: Record<string, string>;
|
|
150
|
+
body?: string;
|
|
151
|
+
/** Skip the Authorization header (www.pixiv.net ajax endpoints reject it). */
|
|
152
|
+
skipAuth?: boolean;
|
|
153
|
+
/** Omit the App-OS/App-Version mobile client headers (web endpoints). */
|
|
154
|
+
skipAppHeaders?: boolean;
|
|
155
|
+
signal?: AbortSignal;
|
|
156
|
+
timeoutMs?: number;
|
|
157
|
+
/** Bypass in-flight coalescing for this request. */
|
|
158
|
+
skipCoalesce?: boolean;
|
|
159
|
+
}
|
|
160
|
+
/** Minimal subset of the global Fetch contract the transport relies on. */
|
|
161
|
+
export type FetchLike = (url: string, init: RequestInit & {
|
|
162
|
+
dispatcher?: unknown;
|
|
163
|
+
}) => Promise<ResponseLike>;
|
|
164
|
+
export interface ResponseLike {
|
|
165
|
+
status: number;
|
|
166
|
+
statusText: string;
|
|
167
|
+
headers: {
|
|
168
|
+
get(name: string): string | null;
|
|
169
|
+
};
|
|
170
|
+
ok: boolean;
|
|
171
|
+
json(): Promise<unknown>;
|
|
172
|
+
text(): Promise<string>;
|
|
173
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
174
|
+
}
|
|
175
|
+
export interface PaginationOptions {
|
|
176
|
+
/** Max items to collect across pages. */
|
|
177
|
+
limit?: number;
|
|
178
|
+
/** Max pages to walk (safety cap). */
|
|
179
|
+
maxPages?: number;
|
|
180
|
+
/** Opaque cursor returned by a previous call. */
|
|
181
|
+
cursor?: string | null;
|
|
182
|
+
signal?: AbortSignal;
|
|
183
|
+
/** Called with each page; the delay is still governed by the global gate. */
|
|
184
|
+
onPage?: (pageIndex: number, collected: number) => void;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,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,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AAE7G,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC9C,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Transport } from '../transport/transport';
|
|
2
|
+
/**
|
|
3
|
+
* Boundary placeholder for the future Web API backend (www.pixiv.net).
|
|
4
|
+
*
|
|
5
|
+
* The App API and the Web API are deliberately TWO backends, mirroring the
|
|
6
|
+
* upstream protocol split (see PixivKit/pixivpy). The only www.pixiv.net
|
|
7
|
+
* call the host needs today is the novel-text ajax fallback, which is handled
|
|
8
|
+
* inside {@link NovelsApi} as an endpoint-capability fallback.
|
|
9
|
+
*
|
|
10
|
+
* Rules for future expansion:
|
|
11
|
+
* - add concrete web endpoints here only when a second REAL capability gap
|
|
12
|
+
* appears (YAGNI);
|
|
13
|
+
* - backend fallback is allowed ONLY for missing endpoints/compatibility —
|
|
14
|
+
* NEVER to alternate between App/Web on 429 to dodge rate limits.
|
|
15
|
+
*/
|
|
16
|
+
export interface PixivWebApiClient {
|
|
17
|
+
readonly transport: Transport;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|