@psnext/slingcli 2.4.20260520-2 → 2.4.20260520-4
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/node_modules/@aws-sdk/client-bedrock-runtime/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +23 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +557 -385
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +13 -82
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +61 -144
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +14 -36
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +234 -96
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +85 -55
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +101 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +231 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +114 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +39 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js +50 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +125 -73
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +86 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +85 -56
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +103 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/node.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +23 -10
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +11 -3
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +117 -353
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +35 -32
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +19 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +35 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +24 -10
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +19 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js +13 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +6 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +97 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -1
- package/node_modules/@earendil-works/pi-ai/package.json +15 -20
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js +4 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +45 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +127 -151
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +25 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +17 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +71 -33
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +6 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +39 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +20 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +2 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +7 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +14 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +99 -17
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +83 -41
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +62 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js +52 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +9 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/html.js +40 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/mime.js +59 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/paths.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +118 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/tools-manager.js +80 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/version-check.js +9 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.js +77 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/LICENSE +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +287 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Cookies.md +101 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +315 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +1427 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/GlobalInstallation.md +141 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +98 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RetryAgent.md +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RetryHandler.md +116 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/SnapshotAgent.md +639 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +274 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +231 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/index.js +236 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-connect.js +112 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-pipeline.js +265 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-request.js +238 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-stream.js +270 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/api-upgrade.js +121 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +581 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +234 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +463 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +120 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +535 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +76 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +1019 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +172 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +214 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +1669 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +1326 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +666 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +44 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +107 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +232 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +343 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +159 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +264 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/global.js +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +586 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +66 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +460 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +192 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +407 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +508 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +285 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +112 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +501 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-agent.js +363 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +623 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +408 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/date.js +653 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/runtime-features.js +93 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +862 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +322 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +282 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +503 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +278 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +2403 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +229 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +1004 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +329 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/frame.js +127 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +490 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +491 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +756 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +152 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +1803 -0
- package/node_modules/@earendil-works/pi-coding-agent/package.json +34 -36
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +27 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -5
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +22 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +27 -15
- package/node_modules/@earendil-works/pi-tui/package.json +9 -12
- package/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/cross-spawn/README.md +89 -0
- package/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/cross-spawn/lib/parse.js +91 -0
- package/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/node_modules/cross-spawn/package.json +73 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +61 -0
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/shebang-command/readme.md +34 -0
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/which/README.md +54 -0
- package/node_modules/which/bin/node-which +52 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/package.json +6 -6
- package/slingshot/index.js +259 -255
- package/node_modules/@borewit/text-codec/LICENSE.txt +0 -9
- package/node_modules/@borewit/text-codec/README.md +0 -87
- package/node_modules/@borewit/text-codec/lib/index.d.ts +0 -6
- package/node_modules/@borewit/text-codec/lib/index.js +0 -380
- package/node_modules/@borewit/text-codec/package.json +0 -70
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +0 -92
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +0 -31
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +0 -170
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +0 -90
- package/node_modules/@tokenizer/inflate/LICENSE +0 -15
- package/node_modules/@tokenizer/inflate/README.md +0 -114
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts +0 -6
- package/node_modules/@tokenizer/inflate/lib/GzipHandler.js +0 -19
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +0 -26
- package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +0 -233
- package/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +0 -94
- package/node_modules/@tokenizer/inflate/lib/ZipToken.js +0 -117
- package/node_modules/@tokenizer/inflate/lib/index.d.ts +0 -3
- package/node_modules/@tokenizer/inflate/lib/index.js +0 -2
- package/node_modules/@tokenizer/inflate/package.json +0 -76
- package/node_modules/@tokenizer/token/README.md +0 -19
- package/node_modules/@tokenizer/token/index.d.ts +0 -30
- package/node_modules/@tokenizer/token/package.json +0 -33
- package/node_modules/@tootallnate/quickjs-emscripten/LICENSE +0 -21
- package/node_modules/@tootallnate/quickjs-emscripten/README.md +0 -597
- package/node_modules/@tootallnate/quickjs-emscripten/c/interface.c +0 -819
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.d.ts +0 -24
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js +0 -53
- package/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.d.ts +0 -48
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.d.ts +0 -371
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.js +0 -691
- package/node_modules/@tootallnate/quickjs-emscripten/dist/context.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.d.ts +0 -5
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.js +0 -6
- package/node_modules/@tootallnate/quickjs-emscripten/dist/debug.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.d.ts +0 -75
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.js +0 -96
- package/node_modules/@tootallnate/quickjs-emscripten/dist/deferred-promise.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.d.ts +0 -97
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.js +0 -15
- package/node_modules/@tootallnate/quickjs-emscripten/dist/emscripten-types.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.d.ts +0 -28
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/errors.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.d.ts +0 -9
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.js +0 -19
- package/node_modules/@tootallnate/quickjs-emscripten/dist/esmHelpers.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.d.ts +0 -5
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.js +0 -387
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/emscripten-module.WASM_RELEASE_SYNC.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.d.ts +0 -67
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.js +0 -71
- package/node_modules/@tootallnate/quickjs-emscripten/dist/generated/ffi.WASM_RELEASE_SYNC.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.d.ts +0 -75
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.js +0 -128
- package/node_modules/@tootallnate/quickjs-emscripten/dist/index.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.d.ts +0 -115
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.js +0 -227
- package/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.d.ts +0 -18
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.js +0 -41
- package/node_modules/@tootallnate/quickjs-emscripten/dist/memory.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.d.ts +0 -53
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.js +0 -97
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.d.ts +0 -27
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.js +0 -77
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module-test.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.d.ts +0 -152
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.js +0 -302
- package/node_modules/@tootallnate/quickjs-emscripten/dist/module.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.d.ts +0 -38
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.js +0 -49
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime-asyncify.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.d.ts +0 -174
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.js +0 -300
- package/node_modules/@tootallnate/quickjs-emscripten/dist/runtime.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.d.ts +0 -114
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.js +0 -38
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types-ffi.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.d.ts +0 -158
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.js +0 -58
- package/node_modules/@tootallnate/quickjs-emscripten/dist/types.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.d.ts +0 -113
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.js +0 -169
- package/node_modules/@tootallnate/quickjs-emscripten/dist/variants.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.d.ts +0 -68
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.js +0 -12
- package/node_modules/@tootallnate/quickjs-emscripten/dist/vm-interface.js.map +0 -1
- package/node_modules/@tootallnate/quickjs-emscripten/package.json +0 -60
- package/node_modules/@types/mime-types/LICENSE +0 -21
- package/node_modules/@types/mime-types/README.md +0 -28
- package/node_modules/@types/mime-types/index.d.ts +0 -9
- package/node_modules/@types/mime-types/package.json +0 -25
- package/node_modules/@types/yauzl/LICENSE +0 -21
- package/node_modules/@types/yauzl/README.md +0 -15
- package/node_modules/@types/yauzl/index.d.ts +0 -110
- package/node_modules/@types/yauzl/package.json +0 -27
- package/node_modules/ansi-regex/index.d.ts +0 -33
- package/node_modules/ansi-regex/index.js +0 -14
- package/node_modules/ansi-regex/license +0 -9
- package/node_modules/ansi-regex/package.json +0 -61
- package/node_modules/ansi-regex/readme.md +0 -66
- package/node_modules/ansi-styles/index.d.ts +0 -345
- package/node_modules/ansi-styles/index.js +0 -163
- package/node_modules/ansi-styles/package.json +0 -56
- package/node_modules/ansi-styles/readme.md +0 -152
- package/node_modules/any-promise/.jshintrc +0 -4
- package/node_modules/any-promise/.npmignore +0 -7
- package/node_modules/any-promise/LICENSE +0 -19
- package/node_modules/any-promise/README.md +0 -161
- package/node_modules/any-promise/implementation.d.ts +0 -3
- package/node_modules/any-promise/implementation.js +0 -1
- package/node_modules/any-promise/index.d.ts +0 -73
- package/node_modules/any-promise/index.js +0 -1
- package/node_modules/any-promise/loader.js +0 -78
- package/node_modules/any-promise/optional.js +0 -6
- package/node_modules/any-promise/package.json +0 -45
- package/node_modules/any-promise/register/bluebird.d.ts +0 -1
- package/node_modules/any-promise/register/bluebird.js +0 -2
- package/node_modules/any-promise/register/es6-promise.d.ts +0 -1
- package/node_modules/any-promise/register/es6-promise.js +0 -2
- package/node_modules/any-promise/register/lie.d.ts +0 -1
- package/node_modules/any-promise/register/lie.js +0 -2
- package/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
- package/node_modules/any-promise/register/native-promise-only.js +0 -2
- package/node_modules/any-promise/register/pinkie.d.ts +0 -1
- package/node_modules/any-promise/register/pinkie.js +0 -2
- package/node_modules/any-promise/register/promise.d.ts +0 -1
- package/node_modules/any-promise/register/promise.js +0 -2
- package/node_modules/any-promise/register/q.d.ts +0 -1
- package/node_modules/any-promise/register/q.js +0 -2
- package/node_modules/any-promise/register/rsvp.d.ts +0 -1
- package/node_modules/any-promise/register/rsvp.js +0 -2
- package/node_modules/any-promise/register/vow.d.ts +0 -1
- package/node_modules/any-promise/register/vow.js +0 -2
- package/node_modules/any-promise/register/when.d.ts +0 -1
- package/node_modules/any-promise/register/when.js +0 -2
- package/node_modules/any-promise/register-shim.js +0 -18
- package/node_modules/any-promise/register.d.ts +0 -17
- package/node_modules/any-promise/register.js +0 -94
- package/node_modules/ast-types/.github/dependabot.yml +0 -9
- package/node_modules/ast-types/.github/workflows/main.yml +0 -29
- package/node_modules/ast-types/LICENSE +0 -20
- package/node_modules/ast-types/README.md +0 -512
- package/node_modules/ast-types/def/babel-core.d.ts +0 -2
- package/node_modules/ast-types/def/babel-core.js +0 -256
- package/node_modules/ast-types/def/babel.d.ts +0 -2
- package/node_modules/ast-types/def/babel.js +0 -11
- package/node_modules/ast-types/def/core.d.ts +0 -2
- package/node_modules/ast-types/def/core.js +0 -298
- package/node_modules/ast-types/def/es-proposals.d.ts +0 -2
- package/node_modules/ast-types/def/es-proposals.js +0 -33
- package/node_modules/ast-types/def/es2020.d.ts +0 -2
- package/node_modules/ast-types/def/es2020.js +0 -16
- package/node_modules/ast-types/def/es6.d.ts +0 -2
- package/node_modules/ast-types/def/es6.js +0 -210
- package/node_modules/ast-types/def/es7.d.ts +0 -2
- package/node_modules/ast-types/def/es7.js +0 -34
- package/node_modules/ast-types/def/esprima.d.ts +0 -2
- package/node_modules/ast-types/def/esprima.js +0 -49
- package/node_modules/ast-types/def/flow.d.ts +0 -2
- package/node_modules/ast-types/def/flow.js +0 -292
- package/node_modules/ast-types/def/jsx.d.ts +0 -2
- package/node_modules/ast-types/def/jsx.js +0 -103
- package/node_modules/ast-types/def/type-annotations.d.ts +0 -7
- package/node_modules/ast-types/def/type-annotations.js +0 -40
- package/node_modules/ast-types/def/typescript.d.ts +0 -2
- package/node_modules/ast-types/def/typescript.js +0 -344
- package/node_modules/ast-types/fork.d.ts +0 -42
- package/node_modules/ast-types/fork.js +0 -52
- package/node_modules/ast-types/gen/builders.d.ts +0 -2584
- package/node_modules/ast-types/gen/builders.js +0 -2
- package/node_modules/ast-types/gen/kinds.d.ts +0 -264
- package/node_modules/ast-types/gen/kinds.js +0 -2
- package/node_modules/ast-types/gen/namedTypes.d.ts +0 -1809
- package/node_modules/ast-types/gen/namedTypes.js +0 -6
- package/node_modules/ast-types/gen/visitor.d.ts +0 -268
- package/node_modules/ast-types/gen/visitor.js +0 -2
- package/node_modules/ast-types/lib/equiv.d.ts +0 -5
- package/node_modules/ast-types/lib/equiv.js +0 -154
- package/node_modules/ast-types/lib/node-path.d.ts +0 -22
- package/node_modules/ast-types/lib/node-path.js +0 -411
- package/node_modules/ast-types/lib/path-visitor.d.ts +0 -52
- package/node_modules/ast-types/lib/path-visitor.js +0 -343
- package/node_modules/ast-types/lib/path.d.ts +0 -25
- package/node_modules/ast-types/lib/path.js +0 -331
- package/node_modules/ast-types/lib/scope.d.ts +0 -26
- package/node_modules/ast-types/lib/scope.js +0 -318
- package/node_modules/ast-types/lib/shared.d.ts +0 -13
- package/node_modules/ast-types/lib/shared.js +0 -47
- package/node_modules/ast-types/lib/types.d.ts +0 -136
- package/node_modules/ast-types/lib/types.js +0 -780
- package/node_modules/ast-types/main.d.ts +0 -28
- package/node_modules/ast-types/main.js +0 -53
- package/node_modules/ast-types/package.json +0 -65
- package/node_modules/ast-types/tsconfig.json +0 -21
- package/node_modules/ast-types/types.d.ts +0 -6
- package/node_modules/ast-types/types.js +0 -2
- package/node_modules/basic-ftp/LICENSE.txt +0 -19
- package/node_modules/basic-ftp/README.md +0 -244
- package/node_modules/basic-ftp/dist/Client.d.ts +0 -340
- package/node_modules/basic-ftp/dist/Client.js +0 -785
- package/node_modules/basic-ftp/dist/FileInfo.d.ts +0 -80
- package/node_modules/basic-ftp/dist/FileInfo.js +0 -92
- package/node_modules/basic-ftp/dist/FtpContext.d.ts +0 -175
- package/node_modules/basic-ftp/dist/FtpContext.js +0 -375
- package/node_modules/basic-ftp/dist/ProgressTracker.d.ts +0 -45
- package/node_modules/basic-ftp/dist/ProgressTracker.js +0 -72
- package/node_modules/basic-ftp/dist/StringEncoding.d.ts +0 -1
- package/node_modules/basic-ftp/dist/StringEncoding.js +0 -2
- package/node_modules/basic-ftp/dist/StringWriter.d.ts +0 -10
- package/node_modules/basic-ftp/dist/StringWriter.js +0 -29
- package/node_modules/basic-ftp/dist/index.d.ts +0 -9
- package/node_modules/basic-ftp/dist/index.js +0 -28
- package/node_modules/basic-ftp/dist/netUtils.d.ts +0 -21
- package/node_modules/basic-ftp/dist/netUtils.js +0 -66
- package/node_modules/basic-ftp/dist/parseControlResponse.d.ts +0 -22
- package/node_modules/basic-ftp/dist/parseControlResponse.js +0 -66
- package/node_modules/basic-ftp/dist/parseList.d.ts +0 -5
- package/node_modules/basic-ftp/dist/parseList.js +0 -79
- package/node_modules/basic-ftp/dist/parseListDOS.d.ts +0 -12
- package/node_modules/basic-ftp/dist/parseListDOS.js +0 -52
- package/node_modules/basic-ftp/dist/parseListMLSD.d.ts +0 -20
- package/node_modules/basic-ftp/dist/parseListMLSD.js +0 -187
- package/node_modules/basic-ftp/dist/parseListUnix.d.ts +0 -12
- package/node_modules/basic-ftp/dist/parseListUnix.js +0 -155
- package/node_modules/basic-ftp/dist/transfer.d.ts +0 -39
- package/node_modules/basic-ftp/dist/transfer.js +0 -318
- package/node_modules/basic-ftp/package.json +0 -52
- package/node_modules/buffer-crc32/LICENSE +0 -19
- package/node_modules/buffer-crc32/README.md +0 -47
- package/node_modules/buffer-crc32/index.js +0 -111
- package/node_modules/buffer-crc32/package.json +0 -39
- package/node_modules/cli-highlight/LICENSE.txt +0 -15
- package/node_modules/cli-highlight/README.md +0 -88
- package/node_modules/cli-highlight/bin/highlight +0 -2
- package/node_modules/cli-highlight/dist/cli.d.ts +0 -1
- package/node_modules/cli-highlight/dist/cli.js +0 -102
- package/node_modules/cli-highlight/dist/cli.js.map +0 -1
- package/node_modules/cli-highlight/dist/index.d.ts +0 -53
- package/node_modules/cli-highlight/dist/index.js +0 -112
- package/node_modules/cli-highlight/dist/index.js.map +0 -1
- package/node_modules/cli-highlight/dist/test/test.d.ts +0 -1
- package/node_modules/cli-highlight/dist/test/test.js +0 -62
- package/node_modules/cli-highlight/dist/test/test.js.map +0 -1
- package/node_modules/cli-highlight/dist/theme.d.ts +0 -270
- package/node_modules/cli-highlight/dist/theme.js +0 -265
- package/node_modules/cli-highlight/dist/theme.js.map +0 -1
- package/node_modules/cli-highlight/node_modules/chalk/index.d.ts +0 -415
- package/node_modules/cli-highlight/node_modules/chalk/package.json +0 -68
- package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
- package/node_modules/cli-highlight/node_modules/chalk/source/index.js +0 -229
- package/node_modules/cli-highlight/node_modules/chalk/source/templates.js +0 -134
- package/node_modules/cli-highlight/node_modules/chalk/source/util.js +0 -39
- package/node_modules/cli-highlight/package.json +0 -129
- package/node_modules/cliui/LICENSE.txt +0 -14
- package/node_modules/cliui/README.md +0 -141
- package/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/cliui/build/lib/index.js +0 -287
- package/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/cliui/index.mjs +0 -13
- package/node_modules/cliui/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- package/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/cliui/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
- package/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/cliui/package.json +0 -83
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -839
- package/node_modules/color-convert/index.js +0 -81
- package/node_modules/color-convert/package.json +0 -48
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -28
- package/node_modules/degenerator/README.md +0 -117
- package/node_modules/degenerator/dist/compile.d.ts +0 -11
- package/node_modules/degenerator/dist/compile.d.ts.map +0 -1
- package/node_modules/degenerator/dist/compile.js +0 -107
- package/node_modules/degenerator/dist/compile.js.map +0 -1
- package/node_modules/degenerator/dist/degenerator.d.ts +0 -12
- package/node_modules/degenerator/dist/degenerator.d.ts.map +0 -1
- package/node_modules/degenerator/dist/degenerator.js +0 -156
- package/node_modules/degenerator/dist/degenerator.js.map +0 -1
- package/node_modules/degenerator/dist/index.d.ts +0 -3
- package/node_modules/degenerator/dist/index.d.ts.map +0 -1
- package/node_modules/degenerator/dist/index.js +0 -19
- package/node_modules/degenerator/dist/index.js.map +0 -1
- package/node_modules/degenerator/package.json +0 -42
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/escalade/dist/index.js +0 -22
- package/node_modules/escalade/dist/index.mjs +0 -22
- package/node_modules/escalade/index.d.mts +0 -11
- package/node_modules/escalade/index.d.ts +0 -15
- package/node_modules/escalade/license +0 -9
- package/node_modules/escalade/package.json +0 -74
- package/node_modules/escalade/readme.md +0 -211
- package/node_modules/escalade/sync/index.d.mts +0 -9
- package/node_modules/escalade/sync/index.d.ts +0 -13
- package/node_modules/escalade/sync/index.js +0 -18
- package/node_modules/escalade/sync/index.mjs +0 -18
- package/node_modules/escodegen/LICENSE.BSD +0 -21
- package/node_modules/escodegen/README.md +0 -84
- package/node_modules/escodegen/bin/escodegen.js +0 -77
- package/node_modules/escodegen/bin/esgenerate.js +0 -64
- package/node_modules/escodegen/escodegen.js +0 -2667
- package/node_modules/escodegen/package.json +0 -63
- package/node_modules/esprima/LICENSE.BSD +0 -21
- package/node_modules/esprima/README.md +0 -46
- package/node_modules/esprima/bin/esparse.js +0 -139
- package/node_modules/esprima/bin/esvalidate.js +0 -236
- package/node_modules/esprima/dist/esprima.js +0 -6709
- package/node_modules/esprima/package.json +0 -112
- package/node_modules/estraverse/.jshintrc +0 -16
- package/node_modules/estraverse/LICENSE.BSD +0 -19
- package/node_modules/estraverse/README.md +0 -153
- package/node_modules/estraverse/estraverse.js +0 -805
- package/node_modules/estraverse/gulpfile.js +0 -70
- package/node_modules/estraverse/package.json +0 -40
- package/node_modules/esutils/LICENSE.BSD +0 -19
- package/node_modules/esutils/README.md +0 -174
- package/node_modules/esutils/lib/ast.js +0 -144
- package/node_modules/esutils/lib/code.js +0 -135
- package/node_modules/esutils/lib/keyword.js +0 -165
- package/node_modules/esutils/lib/utils.js +0 -33
- package/node_modules/esutils/package.json +0 -44
- package/node_modules/extract-zip/LICENSE +0 -23
- package/node_modules/extract-zip/cli.js +0 -19
- package/node_modules/extract-zip/index.d.ts +0 -21
- package/node_modules/extract-zip/index.js +0 -173
- package/node_modules/extract-zip/package.json +0 -80
- package/node_modules/extract-zip/readme.md +0 -57
- package/node_modules/fd-slicer/.npmignore +0 -2
- package/node_modules/fd-slicer/.travis.yml +0 -7
- package/node_modules/fd-slicer/CHANGELOG.md +0 -49
- package/node_modules/fd-slicer/LICENSE +0 -21
- package/node_modules/fd-slicer/README.md +0 -199
- package/node_modules/fd-slicer/index.js +0 -296
- package/node_modules/fd-slicer/package.json +0 -36
- package/node_modules/fd-slicer/test/test.js +0 -350
- package/node_modules/file-type/core.d.ts +0 -253
- package/node_modules/file-type/core.js +0 -2899
- package/node_modules/file-type/index.d.ts +0 -98
- package/node_modules/file-type/index.js +0 -163
- package/node_modules/file-type/license +0 -9
- package/node_modules/file-type/package.json +0 -290
- package/node_modules/file-type/readme.md +0 -667
- package/node_modules/file-type/supported.js +0 -360
- package/node_modules/file-type/util.js +0 -60
- package/node_modules/get-caller-file/LICENSE.md +0 -6
- package/node_modules/get-caller-file/README.md +0 -41
- package/node_modules/get-caller-file/index.d.ts +0 -2
- package/node_modules/get-caller-file/index.js +0 -22
- package/node_modules/get-caller-file/index.js.map +0 -1
- package/node_modules/get-caller-file/package.json +0 -42
- package/node_modules/get-stream/buffer-stream.js +0 -52
- package/node_modules/get-stream/index.d.ts +0 -108
- package/node_modules/get-stream/index.js +0 -60
- package/node_modules/get-stream/license +0 -9
- package/node_modules/get-stream/package.json +0 -50
- package/node_modules/get-stream/readme.md +0 -124
- package/node_modules/get-uri/LICENSE +0 -22
- package/node_modules/get-uri/README.md +0 -109
- package/node_modules/get-uri/dist/data.d.ts +0 -16
- package/node_modules/get-uri/dist/data.js +0 -43
- package/node_modules/get-uri/dist/data.js.map +0 -1
- package/node_modules/get-uri/dist/file.d.ts +0 -17
- package/node_modules/get-uri/dist/file.js +0 -57
- package/node_modules/get-uri/dist/file.js.map +0 -1
- package/node_modules/get-uri/dist/ftp.d.ts +0 -14
- package/node_modules/get-uri/dist/ftp.js +0 -93
- package/node_modules/get-uri/dist/ftp.js.map +0 -1
- package/node_modules/get-uri/dist/http-error.d.ts +0 -8
- package/node_modules/get-uri/dist/http-error.js +0 -15
- package/node_modules/get-uri/dist/http-error.js.map +0 -1
- package/node_modules/get-uri/dist/http.d.ts +0 -29
- package/node_modules/get-uri/dist/http.js +0 -191
- package/node_modules/get-uri/dist/http.js.map +0 -1
- package/node_modules/get-uri/dist/https.d.ts +0 -6
- package/node_modules/get-uri/dist/https.js +0 -16
- package/node_modules/get-uri/dist/https.js.map +0 -1
- package/node_modules/get-uri/dist/index.d.ts +0 -37
- package/node_modules/get-uri/dist/index.js +0 -57
- package/node_modules/get-uri/dist/index.js.map +0 -1
- package/node_modules/get-uri/dist/notfound.d.ts +0 -10
- package/node_modules/get-uri/dist/notfound.js +0 -16
- package/node_modules/get-uri/dist/notfound.js.map +0 -1
- package/node_modules/get-uri/dist/notmodified.d.ts +0 -10
- package/node_modules/get-uri/dist/notmodified.js +0 -17
- package/node_modules/get-uri/dist/notmodified.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/LICENSE +0 -22
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md +0 -61
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.d.ts +0 -17
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.js +0 -54
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/common.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.d.ts +0 -8
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.js +0 -48
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/index.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.d.ts +0 -8
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.d.ts.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.js +0 -26
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/dist/node.js.map +0 -1
- package/node_modules/get-uri/node_modules/data-uri-to-buffer/package.json +0 -48
- package/node_modules/get-uri/package.json +0 -58
- package/node_modules/has-flag/index.d.ts +0 -39
- package/node_modules/has-flag/index.js +0 -8
- package/node_modules/has-flag/license +0 -9
- package/node_modules/has-flag/package.json +0 -46
- package/node_modules/has-flag/readme.md +0 -89
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/ip-address/LICENSE +0 -19
- package/node_modules/ip-address/README.md +0 -278
- package/node_modules/ip-address/dist/address-error.d.ts +0 -4
- package/node_modules/ip-address/dist/address-error.js +0 -12
- package/node_modules/ip-address/dist/address-error.js.map +0 -1
- package/node_modules/ip-address/dist/common.d.ts +0 -20
- package/node_modules/ip-address/dist/common.js +0 -67
- package/node_modules/ip-address/dist/common.js.map +0 -1
- package/node_modules/ip-address/dist/ip-address.d.ts +0 -7
- package/node_modules/ip-address/dist/ip-address.js +0 -35
- package/node_modules/ip-address/dist/ip-address.js.map +0 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +0 -267
- package/node_modules/ip-address/dist/ipv4.js +0 -485
- package/node_modules/ip-address/dist/ipv4.js.map +0 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +0 -489
- package/node_modules/ip-address/dist/ipv6.js +0 -1217
- package/node_modules/ip-address/dist/ipv6.js.map +0 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts +0 -4
- package/node_modules/ip-address/dist/v4/constants.js +0 -8
- package/node_modules/ip-address/dist/v4/constants.js.map +0 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +0 -44
- package/node_modules/ip-address/dist/v6/constants.js +0 -81
- package/node_modules/ip-address/dist/v6/constants.js.map +0 -1
- package/node_modules/ip-address/dist/v6/helpers.d.ts +0 -18
- package/node_modules/ip-address/dist/v6/helpers.js +0 -54
- package/node_modules/ip-address/dist/v6/helpers.js.map +0 -1
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -5
- package/node_modules/ip-address/dist/v6/regular-expressions.js +0 -95
- package/node_modules/ip-address/dist/v6/regular-expressions.js.map +0 -1
- package/node_modules/ip-address/package.json +0 -88
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/mime-db/HISTORY.md +0 -541
- package/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/mime-db/README.md +0 -109
- package/node_modules/mime-db/db.json +0 -9342
- package/node_modules/mime-db/index.js +0 -12
- package/node_modules/mime-db/package.json +0 -56
- package/node_modules/mime-types/HISTORY.md +0 -428
- package/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/mime-types/README.md +0 -126
- package/node_modules/mime-types/index.js +0 -211
- package/node_modules/mime-types/mimeScore.js +0 -57
- package/node_modules/mime-types/package.json +0 -49
- package/node_modules/mz/LICENSE +0 -22
- package/node_modules/mz/README.md +0 -106
- package/node_modules/mz/child_process.js +0 -8
- package/node_modules/mz/crypto.js +0 -9
- package/node_modules/mz/dns.js +0 -16
- package/node_modules/mz/fs.js +0 -62
- package/node_modules/mz/index.js +0 -8
- package/node_modules/mz/package.json +0 -44
- package/node_modules/mz/readline.js +0 -64
- package/node_modules/mz/zlib.js +0 -13
- package/node_modules/netmask/CHANGELOG.md +0 -66
- package/node_modules/netmask/LICENSE.md +0 -21
- package/node_modules/netmask/README.md +0 -112
- package/node_modules/netmask/dist/netmask.d.ts +0 -21
- package/node_modules/netmask/dist/netmask.js +0 -68
- package/node_modules/netmask/dist/netmask4.d.ts +0 -20
- package/node_modules/netmask/dist/netmask4.js +0 -189
- package/node_modules/netmask/dist/netmask6.d.ts +0 -20
- package/node_modules/netmask/dist/netmask6.js +0 -187
- package/node_modules/netmask/package.json +0 -45
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -42
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/pac-proxy-agent/LICENSE +0 -22
- package/node_modules/pac-proxy-agent/README.md +0 -27
- package/node_modules/pac-proxy-agent/dist/index.d.ts +0 -60
- package/node_modules/pac-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/pac-proxy-agent/dist/index.js +0 -238
- package/node_modules/pac-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/pac-proxy-agent/package.json +0 -58
- package/node_modules/pac-resolver/LICENSE +0 -22
- package/node_modules/pac-resolver/README.md +0 -59
- package/node_modules/pac-resolver/dist/dateRange.d.ts +0 -67
- package/node_modules/pac-resolver/dist/dateRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dateRange.js +0 -73
- package/node_modules/pac-resolver/dist/dateRange.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainIs.d.ts +0 -23
- package/node_modules/pac-resolver/dist/dnsDomainIs.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainIs.js +0 -30
- package/node_modules/pac-resolver/dist/dnsDomainIs.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainLevels.d.ts +0 -18
- package/node_modules/pac-resolver/dist/dnsDomainLevels.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsDomainLevels.js +0 -28
- package/node_modules/pac-resolver/dist/dnsDomainLevels.js.map +0 -1
- package/node_modules/pac-resolver/dist/dnsResolve.d.ts +0 -16
- package/node_modules/pac-resolver/dist/dnsResolve.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/dnsResolve.js +0 -32
- package/node_modules/pac-resolver/dist/dnsResolve.js.map +0 -1
- package/node_modules/pac-resolver/dist/index.d.ts +0 -50
- package/node_modules/pac-resolver/dist/index.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/index.js +0 -87
- package/node_modules/pac-resolver/dist/index.js.map +0 -1
- package/node_modules/pac-resolver/dist/ip.d.ts +0 -8
- package/node_modules/pac-resolver/dist/ip.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/ip.js +0 -50
- package/node_modules/pac-resolver/dist/ip.js.map +0 -1
- package/node_modules/pac-resolver/dist/isInNet.d.ts +0 -24
- package/node_modules/pac-resolver/dist/isInNet.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isInNet.js +0 -42
- package/node_modules/pac-resolver/dist/isInNet.js.map +0 -1
- package/node_modules/pac-resolver/dist/isPlainHostName.d.ts +0 -18
- package/node_modules/pac-resolver/dist/isPlainHostName.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isPlainHostName.js +0 -23
- package/node_modules/pac-resolver/dist/isPlainHostName.js.map +0 -1
- package/node_modules/pac-resolver/dist/isResolvable.d.ts +0 -8
- package/node_modules/pac-resolver/dist/isResolvable.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/isResolvable.js +0 -23
- package/node_modules/pac-resolver/dist/isResolvable.js.map +0 -1
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.d.ts +0 -26
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.js +0 -40
- package/node_modules/pac-resolver/dist/localHostOrDomainIs.js.map +0 -1
- package/node_modules/pac-resolver/dist/myIpAddress.d.ts +0 -16
- package/node_modules/pac-resolver/dist/myIpAddress.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/myIpAddress.js +0 -50
- package/node_modules/pac-resolver/dist/myIpAddress.js.map +0 -1
- package/node_modules/pac-resolver/dist/shExpMatch.d.ts +0 -23
- package/node_modules/pac-resolver/dist/shExpMatch.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/shExpMatch.js +0 -41
- package/node_modules/pac-resolver/dist/shExpMatch.js.map +0 -1
- package/node_modules/pac-resolver/dist/timeRange.d.ts +0 -43
- package/node_modules/pac-resolver/dist/timeRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/timeRange.js +0 -92
- package/node_modules/pac-resolver/dist/timeRange.js.map +0 -1
- package/node_modules/pac-resolver/dist/util.d.ts +0 -6
- package/node_modules/pac-resolver/dist/util.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/util.js +0 -22
- package/node_modules/pac-resolver/dist/util.js.map +0 -1
- package/node_modules/pac-resolver/dist/weekdayRange.d.ts +0 -45
- package/node_modules/pac-resolver/dist/weekdayRange.d.ts.map +0 -1
- package/node_modules/pac-resolver/dist/weekdayRange.js +0 -91
- package/node_modules/pac-resolver/dist/weekdayRange.js.map +0 -1
- package/node_modules/pac-resolver/package.json +0 -47
- package/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -222
- package/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5/lib/tree-adapters/default.js +0 -217
- package/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
- package/node_modules/parse5-htmlparser2-tree-adapter/lib/index.js +0 -348
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tree-adapters/default.js +0 -221
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -27
- package/node_modules/pend/LICENSE +0 -23
- package/node_modules/pend/README.md +0 -41
- package/node_modules/pend/index.js +0 -55
- package/node_modules/pend/package.json +0 -18
- package/node_modules/pend/test.js +0 -137
- package/node_modules/proxy-agent/LICENSE +0 -22
- package/node_modules/proxy-agent/README.md +0 -59
- package/node_modules/proxy-agent/dist/index.d.ts +0 -62
- package/node_modules/proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/proxy-agent/dist/index.js +0 -138
- package/node_modules/proxy-agent/dist/index.js.map +0 -1
- package/node_modules/proxy-agent/node_modules/lru-cache/LICENSE +0 -15
- package/node_modules/proxy-agent/node_modules/lru-cache/README.md +0 -1117
- package/node_modules/proxy-agent/node_modules/lru-cache/index.d.ts +0 -869
- package/node_modules/proxy-agent/node_modules/lru-cache/index.js +0 -1227
- package/node_modules/proxy-agent/node_modules/lru-cache/index.mjs +0 -1227
- package/node_modules/proxy-agent/node_modules/lru-cache/package.json +0 -96
- package/node_modules/proxy-agent/package.json +0 -60
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -131
- package/node_modules/proxy-from-env/index.js +0 -108
- package/node_modules/proxy-from-env/package.json +0 -34
- package/node_modules/proxy-from-env/test.js +0 -483
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/empty.js +0 -1
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -30
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/require-directory/.jshintrc +0 -67
- package/node_modules/require-directory/.npmignore +0 -1
- package/node_modules/require-directory/.travis.yml +0 -3
- package/node_modules/require-directory/LICENSE +0 -22
- package/node_modules/require-directory/README.markdown +0 -184
- package/node_modules/require-directory/index.js +0 -86
- package/node_modules/require-directory/package.json +0 -40
- package/node_modules/smart-buffer/.prettierrc.yaml +0 -5
- package/node_modules/smart-buffer/.travis.yml +0 -13
- package/node_modules/smart-buffer/LICENSE +0 -20
- package/node_modules/smart-buffer/README.md +0 -633
- package/node_modules/smart-buffer/build/smartbuffer.js +0 -1233
- package/node_modules/smart-buffer/build/smartbuffer.js.map +0 -1
- package/node_modules/smart-buffer/build/utils.js +0 -108
- package/node_modules/smart-buffer/build/utils.js.map +0 -1
- package/node_modules/smart-buffer/docs/CHANGELOG.md +0 -70
- package/node_modules/smart-buffer/docs/README_v3.md +0 -367
- package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
- package/node_modules/smart-buffer/package.json +0 -79
- package/node_modules/smart-buffer/typings/smartbuffer.d.ts +0 -755
- package/node_modules/smart-buffer/typings/utils.d.ts +0 -66
- package/node_modules/socks/.eslintrc.cjs +0 -11
- package/node_modules/socks/.prettierrc.yaml +0 -7
- package/node_modules/socks/LICENSE +0 -20
- package/node_modules/socks/README.md +0 -686
- package/node_modules/socks/build/client/socksclient.js +0 -793
- package/node_modules/socks/build/client/socksclient.js.map +0 -1
- package/node_modules/socks/build/common/constants.js +0 -108
- package/node_modules/socks/build/common/constants.js.map +0 -1
- package/node_modules/socks/build/common/helpers.js +0 -167
- package/node_modules/socks/build/common/helpers.js.map +0 -1
- package/node_modules/socks/build/common/receivebuffer.js +0 -43
- package/node_modules/socks/build/common/receivebuffer.js.map +0 -1
- package/node_modules/socks/build/common/util.js +0 -25
- package/node_modules/socks/build/common/util.js.map +0 -1
- package/node_modules/socks/build/index.js +0 -18
- package/node_modules/socks/build/index.js.map +0 -1
- package/node_modules/socks/docs/examples/index.md +0 -17
- package/node_modules/socks/docs/examples/javascript/associateExample.md +0 -90
- package/node_modules/socks/docs/examples/javascript/bindExample.md +0 -83
- package/node_modules/socks/docs/examples/javascript/connectExample.md +0 -258
- package/node_modules/socks/docs/examples/typescript/associateExample.md +0 -93
- package/node_modules/socks/docs/examples/typescript/bindExample.md +0 -86
- package/node_modules/socks/docs/examples/typescript/connectExample.md +0 -265
- package/node_modules/socks/docs/index.md +0 -5
- package/node_modules/socks/docs/migratingFromV1.md +0 -86
- package/node_modules/socks/package.json +0 -58
- package/node_modules/socks/typings/client/socksclient.d.ts +0 -162
- package/node_modules/socks/typings/common/constants.d.ts +0 -151
- package/node_modules/socks/typings/common/helpers.d.ts +0 -17
- package/node_modules/socks/typings/common/receivebuffer.d.ts +0 -12
- package/node_modules/socks/typings/common/util.d.ts +0 -14
- package/node_modules/socks/typings/index.d.ts +0 -1
- package/node_modules/socks-proxy-agent/LICENSE +0 -22
- package/node_modules/socks-proxy-agent/README.md +0 -50
- package/node_modules/socks-proxy-agent/dist/index.d.ts +0 -27
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/socks-proxy-agent/dist/index.js +0 -195
- package/node_modules/socks-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/socks-proxy-agent/package.json +0 -142
- package/node_modules/source-map/LICENSE +0 -28
- package/node_modules/source-map/README.md +0 -742
- package/node_modules/source-map/dist/source-map.debug.js +0 -3234
- package/node_modules/source-map/dist/source-map.js +0 -3233
- package/node_modules/source-map/dist/source-map.min.js +0 -2
- package/node_modules/source-map/dist/source-map.min.js.map +0 -1
- package/node_modules/source-map/lib/array-set.js +0 -121
- package/node_modules/source-map/lib/base64-vlq.js +0 -140
- package/node_modules/source-map/lib/base64.js +0 -67
- package/node_modules/source-map/lib/binary-search.js +0 -111
- package/node_modules/source-map/lib/mapping-list.js +0 -79
- package/node_modules/source-map/lib/quick-sort.js +0 -114
- package/node_modules/source-map/lib/source-map-consumer.js +0 -1145
- package/node_modules/source-map/lib/source-map-generator.js +0 -425
- package/node_modules/source-map/lib/source-node.js +0 -413
- package/node_modules/source-map/lib/util.js +0 -488
- package/node_modules/source-map/package.json +0 -73
- package/node_modules/source-map/source-map.d.ts +0 -98
- package/node_modules/source-map/source-map.js +0 -8
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/string-width/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/string-width/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
- package/node_modules/string-width/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/strip-ansi/index.d.ts +0 -15
- package/node_modules/strip-ansi/index.js +0 -19
- package/node_modules/strip-ansi/license +0 -9
- package/node_modules/strip-ansi/package.json +0 -59
- package/node_modules/strip-ansi/readme.md +0 -37
- package/node_modules/strtok3/LICENSE.txt +0 -21
- package/node_modules/strtok3/README.md +0 -399
- package/node_modules/strtok3/lib/AbstractTokenizer.d.ts +0 -76
- package/node_modules/strtok3/lib/AbstractTokenizer.js +0 -111
- package/node_modules/strtok3/lib/BlobTokenizer.d.ts +0 -29
- package/node_modules/strtok3/lib/BlobTokenizer.js +0 -53
- package/node_modules/strtok3/lib/BufferTokenizer.d.ts +0 -29
- package/node_modules/strtok3/lib/BufferTokenizer.js +0 -52
- package/node_modules/strtok3/lib/FileTokenizer.d.ts +0 -37
- package/node_modules/strtok3/lib/FileTokenizer.js +0 -61
- package/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +0 -34
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +0 -107
- package/node_modules/strtok3/lib/core.d.ts +0 -40
- package/node_modules/strtok3/lib/core.js +0 -62
- package/node_modules/strtok3/lib/index.d.ts +0 -16
- package/node_modules/strtok3/lib/index.js +0 -22
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +0 -54
- package/node_modules/strtok3/lib/stream/AbstractStreamReader.js +0 -71
- package/node_modules/strtok3/lib/stream/Deferred.d.ts +0 -6
- package/node_modules/strtok3/lib/stream/Deferred.js +0 -10
- package/node_modules/strtok3/lib/stream/Errors.d.ts +0 -10
- package/node_modules/strtok3/lib/stream/Errors.js +0 -16
- package/node_modules/strtok3/lib/stream/StreamReader.d.ts +0 -29
- package/node_modules/strtok3/lib/stream/StreamReader.js +0 -83
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +0 -14
- package/node_modules/strtok3/lib/stream/WebStreamByobReader.js +0 -27
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +0 -19
- package/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +0 -62
- package/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +0 -14
- package/node_modules/strtok3/lib/stream/WebStreamReader.js +0 -13
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +0 -5
- package/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +0 -19
- package/node_modules/strtok3/lib/stream/index.d.ts +0 -6
- package/node_modules/strtok3/lib/stream/index.js +0 -5
- package/node_modules/strtok3/lib/types.d.ts +0 -139
- package/node_modules/strtok3/lib/types.js +0 -1
- package/node_modules/strtok3/package.json +0 -94
- package/node_modules/supports-color/browser.js +0 -5
- package/node_modules/supports-color/index.js +0 -135
- package/node_modules/supports-color/license +0 -9
- package/node_modules/supports-color/package.json +0 -53
- package/node_modules/supports-color/readme.md +0 -76
- package/node_modules/thenify/LICENSE +0 -22
- package/node_modules/thenify/README.md +0 -120
- package/node_modules/thenify/index.js +0 -77
- package/node_modules/thenify/package.json +0 -31
- package/node_modules/thenify-all/LICENSE +0 -22
- package/node_modules/thenify-all/README.md +0 -66
- package/node_modules/thenify-all/index.js +0 -73
- package/node_modules/thenify-all/package.json +0 -34
- package/node_modules/token-types/LICENSE.txt +0 -9
- package/node_modules/token-types/README.md +0 -120
- package/node_modules/token-types/lib/index.d.ts +0 -135
- package/node_modules/token-types/lib/index.js +0 -401
- package/node_modules/token-types/package.json +0 -81
- package/node_modules/uint8array-extras/index.d.ts +0 -331
- package/node_modules/uint8array-extras/index.js +0 -318
- package/node_modules/uint8array-extras/license +0 -9
- package/node_modules/uint8array-extras/package.json +0 -54
- package/node_modules/uint8array-extras/readme.md +0 -318
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -491
- package/node_modules/uuid/dist/index.d.ts +0 -15
- package/node_modules/uuid/dist/index.js +0 -14
- package/node_modules/uuid/dist/max.d.ts +0 -2
- package/node_modules/uuid/dist/max.js +0 -1
- package/node_modules/uuid/dist/md5.d.ts +0 -2
- package/node_modules/uuid/dist/md5.js +0 -135
- package/node_modules/uuid/dist/nil.d.ts +0 -2
- package/node_modules/uuid/dist/nil.js +0 -1
- package/node_modules/uuid/dist/parse.d.ts +0 -3
- package/node_modules/uuid/dist/parse.js +0 -9
- package/node_modules/uuid/dist/regex.d.ts +0 -2
- package/node_modules/uuid/dist/regex.js +0 -1
- package/node_modules/uuid/dist/rng.d.ts +0 -1
- package/node_modules/uuid/dist/rng.js +0 -4
- package/node_modules/uuid/dist/sha1.d.ts +0 -2
- package/node_modules/uuid/dist/sha1.js +0 -70
- package/node_modules/uuid/dist/stringify.d.ts +0 -3
- package/node_modules/uuid/dist/stringify.js +0 -35
- package/node_modules/uuid/dist/types.d.ts +0 -22
- package/node_modules/uuid/dist/types.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.d.ts +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -70
- package/node_modules/uuid/dist/v1.d.ts +0 -11
- package/node_modules/uuid/dist/v1.js +0 -83
- package/node_modules/uuid/dist/v1ToV6.d.ts +0 -3
- package/node_modules/uuid/dist/v1ToV6.js +0 -10
- package/node_modules/uuid/dist/v3.d.ts +0 -9
- package/node_modules/uuid/dist/v3.js +0 -9
- package/node_modules/uuid/dist/v35.d.ts +0 -7
- package/node_modules/uuid/dist/v35.js +0 -39
- package/node_modules/uuid/dist/v4.d.ts +0 -4
- package/node_modules/uuid/dist/v4.js +0 -29
- package/node_modules/uuid/dist/v5.d.ts +0 -9
- package/node_modules/uuid/dist/v5.js +0 -9
- package/node_modules/uuid/dist/v6.d.ts +0 -4
- package/node_modules/uuid/dist/v6.js +0 -20
- package/node_modules/uuid/dist/v6ToV1.d.ts +0 -2
- package/node_modules/uuid/dist/v6ToV1.js +0 -10
- package/node_modules/uuid/dist/v7.d.ts +0 -9
- package/node_modules/uuid/dist/v7.js +0 -65
- package/node_modules/uuid/dist/validate.d.ts +0 -2
- package/node_modules/uuid/dist/validate.js +0 -5
- package/node_modules/uuid/dist/version.d.ts +0 -2
- package/node_modules/uuid/dist/version.js +0 -8
- package/node_modules/uuid/dist-node/bin/uuid +0 -2
- package/node_modules/uuid/dist-node/index.js +0 -14
- package/node_modules/uuid/dist-node/max.js +0 -1
- package/node_modules/uuid/dist-node/md5.js +0 -11
- package/node_modules/uuid/dist-node/nil.js +0 -1
- package/node_modules/uuid/dist-node/parse.js +0 -9
- package/node_modules/uuid/dist-node/regex.js +0 -1
- package/node_modules/uuid/dist-node/rng.js +0 -4
- package/node_modules/uuid/dist-node/sha1.js +0 -11
- package/node_modules/uuid/dist-node/stringify.js +0 -35
- package/node_modules/uuid/dist-node/types.js +0 -1
- package/node_modules/uuid/dist-node/uuid-bin.js +0 -70
- package/node_modules/uuid/dist-node/v1.js +0 -83
- package/node_modules/uuid/dist-node/v1ToV6.js +0 -10
- package/node_modules/uuid/dist-node/v3.js +0 -9
- package/node_modules/uuid/dist-node/v35.js +0 -39
- package/node_modules/uuid/dist-node/v4.js +0 -29
- package/node_modules/uuid/dist-node/v5.js +0 -9
- package/node_modules/uuid/dist-node/v6.js +0 -20
- package/node_modules/uuid/dist-node/v6ToV1.js +0 -10
- package/node_modules/uuid/dist-node/v7.js +0 -65
- package/node_modules/uuid/dist-node/validate.js +0 -5
- package/node_modules/uuid/dist-node/version.js +0 -8
- package/node_modules/uuid/package.json +0 -110
- package/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/wrap-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/y18n/LICENSE +0 -13
- package/node_modules/y18n/README.md +0 -127
- package/node_modules/y18n/build/index.cjs +0 -203
- package/node_modules/y18n/build/lib/cjs.js +0 -6
- package/node_modules/y18n/build/lib/index.js +0 -174
- package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
- package/node_modules/y18n/index.mjs +0 -8
- package/node_modules/y18n/package.json +0 -70
- package/node_modules/yargs/LICENSE +0 -21
- package/node_modules/yargs/README.md +0 -202
- package/node_modules/yargs/browser.mjs +0 -7
- package/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/yargs/build/lib/argsert.js +0 -62
- package/node_modules/yargs/build/lib/command.js +0 -382
- package/node_modules/yargs/build/lib/completion-templates.js +0 -47
- package/node_modules/yargs/build/lib/completion.js +0 -128
- package/node_modules/yargs/build/lib/middleware.js +0 -53
- package/node_modules/yargs/build/lib/parse-command.js +0 -32
- package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
- package/node_modules/yargs/build/lib/usage.js +0 -548
- package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
- package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
- package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -26
- package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
- package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
- package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
- package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
- package/node_modules/yargs/build/lib/validation.js +0 -308
- package/node_modules/yargs/build/lib/yargs-factory.js +0 -1143
- package/node_modules/yargs/build/lib/yerror.js +0 -7
- package/node_modules/yargs/helpers/helpers.mjs +0 -10
- package/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/yargs/helpers/package.json +0 -3
- package/node_modules/yargs/index.cjs +0 -39
- package/node_modules/yargs/index.mjs +0 -8
- package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -92
- package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -67
- package/node_modules/yargs/locales/be.json +0 -46
- package/node_modules/yargs/locales/de.json +0 -46
- package/node_modules/yargs/locales/en.json +0 -51
- package/node_modules/yargs/locales/es.json +0 -46
- package/node_modules/yargs/locales/fi.json +0 -49
- package/node_modules/yargs/locales/fr.json +0 -53
- package/node_modules/yargs/locales/hi.json +0 -49
- package/node_modules/yargs/locales/hu.json +0 -46
- package/node_modules/yargs/locales/id.json +0 -50
- package/node_modules/yargs/locales/it.json +0 -46
- package/node_modules/yargs/locales/ja.json +0 -51
- package/node_modules/yargs/locales/ko.json +0 -49
- package/node_modules/yargs/locales/nb.json +0 -44
- package/node_modules/yargs/locales/nl.json +0 -49
- package/node_modules/yargs/locales/nn.json +0 -44
- package/node_modules/yargs/locales/pirate.json +0 -13
- package/node_modules/yargs/locales/pl.json +0 -49
- package/node_modules/yargs/locales/pt.json +0 -45
- package/node_modules/yargs/locales/pt_BR.json +0 -48
- package/node_modules/yargs/locales/ru.json +0 -46
- package/node_modules/yargs/locales/th.json +0 -46
- package/node_modules/yargs/locales/tr.json +0 -48
- package/node_modules/yargs/locales/zh_CN.json +0 -48
- package/node_modules/yargs/locales/zh_TW.json +0 -47
- package/node_modules/yargs/package.json +0 -122
- package/node_modules/yargs/yargs +0 -9
- package/node_modules/yargs-parser/LICENSE.txt +0 -14
- package/node_modules/yargs-parser/README.md +0 -518
- package/node_modules/yargs-parser/browser.js +0 -29
- package/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/yargs-parser/build/lib/index.js +0 -59
- package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1037
- package/node_modules/yargs-parser/package.json +0 -87
- package/node_modules/yauzl/LICENSE +0 -21
- package/node_modules/yauzl/README.md +0 -658
- package/node_modules/yauzl/index.js +0 -796
- package/node_modules/yauzl/package.json +0 -40
- /package/node_modules/{once → isexe}/LICENSE +0 -0
- /package/node_modules/{ansi-styles → path-key}/license +0 -0
- /package/node_modules/{cli-highlight/node_modules/chalk → shebang-regex}/license +0 -0
- /package/node_modules/{wrappy → which}/LICENSE +0 -0
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Scope = exports.WeakLifetime = exports.StaticLifetime = exports.Lifetime = void 0;
|
|
4
|
-
const asyncify_helpers_1 = require("./asyncify-helpers");
|
|
5
|
-
const debug_1 = require("./debug");
|
|
6
|
-
const errors_1 = require("./errors");
|
|
7
|
-
/**
|
|
8
|
-
* A lifetime prevents access to a value after the lifetime has been
|
|
9
|
-
* [[dispose]]ed.
|
|
10
|
-
*
|
|
11
|
-
* Typically, quickjs-emscripten uses Lifetimes to protect C memory pointers.
|
|
12
|
-
*/
|
|
13
|
-
class Lifetime {
|
|
14
|
-
/**
|
|
15
|
-
* When the Lifetime is disposed, it will call `disposer(_value)`. Use the
|
|
16
|
-
* disposer function to implement whatever cleanup needs to happen at the end
|
|
17
|
-
* of `value`'s lifetime.
|
|
18
|
-
*
|
|
19
|
-
* `_owner` is not used or controlled by the lifetime. It's just metadata for
|
|
20
|
-
* the creator.
|
|
21
|
-
*/
|
|
22
|
-
constructor(_value, copier, disposer, _owner) {
|
|
23
|
-
this._value = _value;
|
|
24
|
-
this.copier = copier;
|
|
25
|
-
this.disposer = disposer;
|
|
26
|
-
this._owner = _owner;
|
|
27
|
-
this._alive = true;
|
|
28
|
-
this._constructorStack = debug_1.QTS_DEBUG ? new Error("Lifetime constructed").stack : undefined;
|
|
29
|
-
}
|
|
30
|
-
get alive() {
|
|
31
|
-
return this._alive;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The value this Lifetime protects. You must never retain the value - it
|
|
35
|
-
* may become invalid, leading to memory errors.
|
|
36
|
-
*
|
|
37
|
-
* @throws If the lifetime has been [[dispose]]d already.
|
|
38
|
-
*/
|
|
39
|
-
get value() {
|
|
40
|
-
this.assertAlive();
|
|
41
|
-
return this._value;
|
|
42
|
-
}
|
|
43
|
-
get owner() {
|
|
44
|
-
return this._owner;
|
|
45
|
-
}
|
|
46
|
-
get dupable() {
|
|
47
|
-
return !!this.copier;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Create a new handle pointing to the same [[value]].
|
|
51
|
-
*/
|
|
52
|
-
dup() {
|
|
53
|
-
this.assertAlive();
|
|
54
|
-
if (!this.copier) {
|
|
55
|
-
throw new Error("Non-dupable lifetime");
|
|
56
|
-
}
|
|
57
|
-
return new Lifetime(this.copier(this._value), this.copier, this.disposer, this._owner);
|
|
58
|
-
}
|
|
59
|
-
consume(map) {
|
|
60
|
-
this.assertAlive();
|
|
61
|
-
const result = map(this);
|
|
62
|
-
this.dispose();
|
|
63
|
-
return result;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Dispose of [[value]] and perform cleanup.
|
|
67
|
-
*/
|
|
68
|
-
dispose() {
|
|
69
|
-
this.assertAlive();
|
|
70
|
-
if (this.disposer) {
|
|
71
|
-
this.disposer(this._value);
|
|
72
|
-
}
|
|
73
|
-
this._alive = false;
|
|
74
|
-
}
|
|
75
|
-
assertAlive() {
|
|
76
|
-
if (!this.alive) {
|
|
77
|
-
if (this._constructorStack) {
|
|
78
|
-
throw new errors_1.QuickJSUseAfterFree(`Lifetime not alive\n${this._constructorStack}\nLifetime used`);
|
|
79
|
-
}
|
|
80
|
-
throw new errors_1.QuickJSUseAfterFree("Lifetime not alive");
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.Lifetime = Lifetime;
|
|
85
|
-
/**
|
|
86
|
-
* A Lifetime that lives forever. Used for constants.
|
|
87
|
-
*/
|
|
88
|
-
class StaticLifetime extends Lifetime {
|
|
89
|
-
constructor(value, owner) {
|
|
90
|
-
super(value, undefined, undefined, owner);
|
|
91
|
-
}
|
|
92
|
-
// Static lifetime doesn't need a copier to be copiable
|
|
93
|
-
get dupable() {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
// Copy returns the same instance.
|
|
97
|
-
dup() {
|
|
98
|
-
return this;
|
|
99
|
-
}
|
|
100
|
-
// Dispose does nothing.
|
|
101
|
-
dispose() { }
|
|
102
|
-
}
|
|
103
|
-
exports.StaticLifetime = StaticLifetime;
|
|
104
|
-
/**
|
|
105
|
-
* A Lifetime that does not own its `value`. A WeakLifetime never calls its
|
|
106
|
-
* `disposer` function, but can be `dup`ed to produce regular lifetimes that
|
|
107
|
-
* do.
|
|
108
|
-
*
|
|
109
|
-
* Used for function arguments.
|
|
110
|
-
*/
|
|
111
|
-
class WeakLifetime extends Lifetime {
|
|
112
|
-
constructor(value, copier, disposer, owner) {
|
|
113
|
-
// We don't care if the disposer doesn't support freeing T
|
|
114
|
-
super(value, copier, disposer, owner);
|
|
115
|
-
}
|
|
116
|
-
dispose() {
|
|
117
|
-
this._alive = false;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
exports.WeakLifetime = WeakLifetime;
|
|
121
|
-
function scopeFinally(scope, blockError) {
|
|
122
|
-
// console.log('scopeFinally', scope, blockError)
|
|
123
|
-
let disposeError;
|
|
124
|
-
try {
|
|
125
|
-
scope.dispose();
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
disposeError = error;
|
|
129
|
-
}
|
|
130
|
-
if (blockError && disposeError) {
|
|
131
|
-
Object.assign(blockError, {
|
|
132
|
-
message: `${blockError.message}\n Then, failed to dispose scope: ${disposeError.message}`,
|
|
133
|
-
disposeError,
|
|
134
|
-
});
|
|
135
|
-
throw blockError;
|
|
136
|
-
}
|
|
137
|
-
if (blockError || disposeError) {
|
|
138
|
-
throw blockError || disposeError;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Scope helps reduce the burden of manually tracking and disposing of
|
|
143
|
-
* Lifetimes. See [[withScope]]. and [[withScopeAsync]].
|
|
144
|
-
*/
|
|
145
|
-
class Scope {
|
|
146
|
-
constructor() {
|
|
147
|
-
this._disposables = new Lifetime(new Set());
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Run `block` with a new Scope instance that will be disposed after the block returns.
|
|
151
|
-
* Inside `block`, call `scope.manage` on each lifetime you create to have the lifetime
|
|
152
|
-
* automatically disposed after the block returns.
|
|
153
|
-
*
|
|
154
|
-
* @warning Do not use with async functions. Instead, use [[withScopeAsync]].
|
|
155
|
-
*/
|
|
156
|
-
static withScope(block) {
|
|
157
|
-
const scope = new Scope();
|
|
158
|
-
let blockError;
|
|
159
|
-
try {
|
|
160
|
-
return block(scope);
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
blockError = error;
|
|
164
|
-
throw error;
|
|
165
|
-
}
|
|
166
|
-
finally {
|
|
167
|
-
scopeFinally(scope, blockError);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
static withScopeMaybeAsync(_this, block) {
|
|
171
|
-
return (0, asyncify_helpers_1.maybeAsync)(undefined, function* (awaited) {
|
|
172
|
-
const scope = new Scope();
|
|
173
|
-
let blockError;
|
|
174
|
-
try {
|
|
175
|
-
return yield* awaited.of(block.call(_this, awaited, scope));
|
|
176
|
-
}
|
|
177
|
-
catch (error) {
|
|
178
|
-
blockError = error;
|
|
179
|
-
throw error;
|
|
180
|
-
}
|
|
181
|
-
finally {
|
|
182
|
-
scopeFinally(scope, blockError);
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Run `block` with a new Scope instance that will be disposed after the
|
|
188
|
-
* block's returned promise settles. Inside `block`, call `scope.manage` on each
|
|
189
|
-
* lifetime you create to have the lifetime automatically disposed after the
|
|
190
|
-
* block returns.
|
|
191
|
-
*/
|
|
192
|
-
static async withScopeAsync(block) {
|
|
193
|
-
const scope = new Scope();
|
|
194
|
-
let blockError;
|
|
195
|
-
try {
|
|
196
|
-
return await block(scope);
|
|
197
|
-
}
|
|
198
|
-
catch (error) {
|
|
199
|
-
blockError = error;
|
|
200
|
-
throw error;
|
|
201
|
-
}
|
|
202
|
-
finally {
|
|
203
|
-
scopeFinally(scope, blockError);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Track `lifetime` so that it is disposed when this scope is disposed.
|
|
208
|
-
*/
|
|
209
|
-
manage(lifetime) {
|
|
210
|
-
this._disposables.value.add(lifetime);
|
|
211
|
-
return lifetime;
|
|
212
|
-
}
|
|
213
|
-
get alive() {
|
|
214
|
-
return this._disposables.alive;
|
|
215
|
-
}
|
|
216
|
-
dispose() {
|
|
217
|
-
const lifetimes = Array.from(this._disposables.value.values()).reverse();
|
|
218
|
-
for (const lifetime of lifetimes) {
|
|
219
|
-
if (lifetime.alive) {
|
|
220
|
-
lifetime.dispose();
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
this._disposables.dispose();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
exports.Scope = Scope;
|
|
227
|
-
//# sourceMappingURL=lifetime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lifetime.js","sourceRoot":"","sources":["../ts/lifetime.ts"],"names":[],"mappings":"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","sourcesContent":["import { maybeAsync, MaybeAsyncBlock } from \"./asyncify-helpers\"\nimport { QTS_DEBUG } from \"./debug\"\nimport { QuickJSUseAfterFree } from \"./errors\"\nimport type { QuickJSHandle } from \"./types\"\n\n/**\n * An object that can be disposed.\n * [[Lifetime]] is the canonical implementation of Disposable.\n * Use [[Scope]] to manage cleaning up multiple disposables.\n */\nexport interface Disposable {\n /**\n * Dispose of the underlying resources used by this object.\n */\n dispose(): void\n\n /**\n * @returns true if the object is alive\n * @returns false after the object has been [[dispose]]d\n */\n alive: boolean\n}\n\n/**\n * A lifetime prevents access to a value after the lifetime has been\n * [[dispose]]ed.\n *\n * Typically, quickjs-emscripten uses Lifetimes to protect C memory pointers.\n */\nexport class Lifetime<T, TCopy = never, Owner = never> implements Disposable {\n protected _alive: boolean = true\n protected _constructorStack = QTS_DEBUG ? new Error(\"Lifetime constructed\").stack : undefined\n\n /**\n * When the Lifetime is disposed, it will call `disposer(_value)`. Use the\n * disposer function to implement whatever cleanup needs to happen at the end\n * of `value`'s lifetime.\n *\n * `_owner` is not used or controlled by the lifetime. It's just metadata for\n * the creator.\n */\n constructor(\n protected readonly _value: T,\n protected readonly copier?: (value: T | TCopy) => TCopy,\n protected readonly disposer?: (value: T | TCopy) => void,\n protected readonly _owner?: Owner\n ) {}\n\n get alive() {\n return this._alive\n }\n\n /**\n * The value this Lifetime protects. You must never retain the value - it\n * may become invalid, leading to memory errors.\n *\n * @throws If the lifetime has been [[dispose]]d already.\n */\n get value() {\n this.assertAlive()\n return this._value\n }\n\n get owner() {\n return this._owner\n }\n\n get dupable() {\n return !!this.copier\n }\n\n /**\n * Create a new handle pointing to the same [[value]].\n */\n dup() {\n this.assertAlive()\n if (!this.copier) {\n throw new Error(\"Non-dupable lifetime\")\n }\n return new Lifetime<TCopy, TCopy, Owner>(\n this.copier(this._value),\n this.copier,\n this.disposer,\n this._owner\n )\n }\n\n /**\n * Call `map` with this lifetime, then dispose the lifetime.\n * @return the result of `map(this)`.\n */\n consume<O>(map: (lifetime: this) => O): O\n // A specific type definition is needed for our common use-case\n // https://github.com/microsoft/TypeScript/issues/30271\n consume<O>(map: (lifetime: QuickJSHandle) => O): O\n consume<O>(map: (lifetime: any) => O): O {\n this.assertAlive()\n const result = map(this)\n this.dispose()\n return result\n }\n\n /**\n * Dispose of [[value]] and perform cleanup.\n */\n dispose() {\n this.assertAlive()\n if (this.disposer) {\n this.disposer(this._value)\n }\n this._alive = false\n }\n\n private assertAlive() {\n if (!this.alive) {\n if (this._constructorStack) {\n throw new QuickJSUseAfterFree(\n `Lifetime not alive\\n${this._constructorStack}\\nLifetime used`\n )\n }\n throw new QuickJSUseAfterFree(\"Lifetime not alive\")\n }\n }\n}\n\n/**\n * A Lifetime that lives forever. Used for constants.\n */\nexport class StaticLifetime<T, Owner = never> extends Lifetime<T, T, Owner> {\n constructor(value: T, owner?: Owner) {\n super(value, undefined, undefined, owner)\n }\n\n // Static lifetime doesn't need a copier to be copiable\n get dupable() {\n return true\n }\n\n // Copy returns the same instance.\n dup() {\n return this\n }\n\n // Dispose does nothing.\n dispose() {}\n}\n\n/**\n * A Lifetime that does not own its `value`. A WeakLifetime never calls its\n * `disposer` function, but can be `dup`ed to produce regular lifetimes that\n * do.\n *\n * Used for function arguments.\n */\nexport class WeakLifetime<T, TCopy = never, Owner = never> extends Lifetime<T, TCopy, Owner> {\n constructor(\n value: T,\n copier?: (value: T | TCopy) => TCopy,\n disposer?: (value: TCopy) => void,\n owner?: Owner\n ) {\n // We don't care if the disposer doesn't support freeing T\n super(value, copier, disposer as (value: T | TCopy) => void, owner)\n }\n\n dispose() {\n this._alive = false\n }\n}\n\nfunction scopeFinally(scope: Scope, blockError: Error | undefined) {\n // console.log('scopeFinally', scope, blockError)\n let disposeError: Error | undefined\n try {\n scope.dispose()\n } catch (error) {\n disposeError = error as any\n }\n\n if (blockError && disposeError) {\n Object.assign(blockError, {\n message: `${blockError.message}\\n Then, failed to dispose scope: ${disposeError.message}`,\n disposeError,\n })\n throw blockError\n }\n\n if (blockError || disposeError) {\n throw blockError || disposeError\n }\n}\n\n/**\n * Scope helps reduce the burden of manually tracking and disposing of\n * Lifetimes. See [[withScope]]. and [[withScopeAsync]].\n */\nexport class Scope implements Disposable {\n /**\n * Run `block` with a new Scope instance that will be disposed after the block returns.\n * Inside `block`, call `scope.manage` on each lifetime you create to have the lifetime\n * automatically disposed after the block returns.\n *\n * @warning Do not use with async functions. Instead, use [[withScopeAsync]].\n */\n static withScope<R>(block: (scope: Scope) => R): R {\n const scope = new Scope()\n let blockError: Error | undefined\n try {\n return block(scope)\n } catch (error) {\n blockError = error as any\n throw error\n } finally {\n scopeFinally(scope, blockError)\n }\n }\n\n static withScopeMaybeAsync<Return, This, Yielded>(\n _this: This,\n block: MaybeAsyncBlock<Return, This, Yielded, [Scope]>\n ): Return | Promise<Return> {\n return maybeAsync(undefined, function* (awaited) {\n const scope = new Scope()\n let blockError: Error | undefined\n try {\n return yield* awaited.of(block.call(_this, awaited, scope))\n } catch (error) {\n blockError = error as any\n throw error\n } finally {\n scopeFinally(scope, blockError)\n }\n })\n }\n\n /**\n * Run `block` with a new Scope instance that will be disposed after the\n * block's returned promise settles. Inside `block`, call `scope.manage` on each\n * lifetime you create to have the lifetime automatically disposed after the\n * block returns.\n */\n static async withScopeAsync<R>(block: (scope: Scope) => Promise<R>): Promise<R> {\n const scope = new Scope()\n let blockError: Error | undefined\n try {\n return await block(scope)\n } catch (error) {\n blockError = error as any\n throw error\n } finally {\n scopeFinally(scope, blockError)\n }\n }\n\n private _disposables: Lifetime<Set<Disposable>> = new Lifetime(new Set())\n\n /**\n * Track `lifetime` so that it is disposed when this scope is disposed.\n */\n manage<T extends Disposable>(lifetime: T): T {\n this._disposables.value.add(lifetime)\n return lifetime\n }\n\n get alive() {\n return this._disposables.alive\n }\n\n dispose() {\n const lifetimes = Array.from(this._disposables.value.values()).reverse()\n for (const lifetime of lifetimes) {\n if (lifetime.alive) {\n lifetime.dispose()\n }\n }\n this._disposables.dispose()\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { EitherModule } from "./emscripten-types";
|
|
2
|
-
import { OwnedHeapCharPointer, JSContextPointerPointer, JSValueConstPointerPointer, JSValuePointerPointer } from "./types-ffi";
|
|
3
|
-
import { Lifetime } from "./lifetime";
|
|
4
|
-
import { QuickJSHandle } from "./types";
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
export declare class ModuleMemory {
|
|
9
|
-
module: EitherModule;
|
|
10
|
-
constructor(module: EitherModule);
|
|
11
|
-
toPointerArray(handleArray: QuickJSHandle[]): Lifetime<JSValueConstPointerPointer>;
|
|
12
|
-
newMutablePointerArray<T extends JSContextPointerPointer | JSValuePointerPointer>(length: number): Lifetime<{
|
|
13
|
-
typedArray: Int32Array;
|
|
14
|
-
ptr: T;
|
|
15
|
-
}>;
|
|
16
|
-
newHeapCharPointer(string: string): Lifetime<OwnedHeapCharPointer>;
|
|
17
|
-
consumeHeapCharPointer(ptr: OwnedHeapCharPointer): string;
|
|
18
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleMemory = void 0;
|
|
4
|
-
const lifetime_1 = require("./lifetime");
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
class ModuleMemory {
|
|
9
|
-
constructor(module) {
|
|
10
|
-
this.module = module;
|
|
11
|
-
}
|
|
12
|
-
toPointerArray(handleArray) {
|
|
13
|
-
const typedArray = new Int32Array(handleArray.map((handle) => handle.value));
|
|
14
|
-
const numBytes = typedArray.length * typedArray.BYTES_PER_ELEMENT;
|
|
15
|
-
const ptr = this.module._malloc(numBytes);
|
|
16
|
-
var heapBytes = new Uint8Array(this.module.HEAPU8.buffer, ptr, numBytes);
|
|
17
|
-
heapBytes.set(new Uint8Array(typedArray.buffer));
|
|
18
|
-
return new lifetime_1.Lifetime(ptr, undefined, (ptr) => this.module._free(ptr));
|
|
19
|
-
}
|
|
20
|
-
newMutablePointerArray(length) {
|
|
21
|
-
const zeros = new Int32Array(new Array(length).fill(0));
|
|
22
|
-
const numBytes = zeros.length * zeros.BYTES_PER_ELEMENT;
|
|
23
|
-
const ptr = this.module._malloc(numBytes);
|
|
24
|
-
const typedArray = new Int32Array(this.module.HEAPU8.buffer, ptr, length);
|
|
25
|
-
typedArray.set(zeros);
|
|
26
|
-
return new lifetime_1.Lifetime({ typedArray, ptr }, undefined, (value) => this.module._free(value.ptr));
|
|
27
|
-
}
|
|
28
|
-
newHeapCharPointer(string) {
|
|
29
|
-
const numBytes = this.module.lengthBytesUTF8(string) + 1;
|
|
30
|
-
const ptr = this.module._malloc(numBytes);
|
|
31
|
-
this.module.stringToUTF8(string, ptr, numBytes);
|
|
32
|
-
return new lifetime_1.Lifetime(ptr, undefined, (value) => this.module._free(value));
|
|
33
|
-
}
|
|
34
|
-
consumeHeapCharPointer(ptr) {
|
|
35
|
-
const str = this.module.UTF8ToString(ptr);
|
|
36
|
-
this.module._free(ptr);
|
|
37
|
-
return str;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.ModuleMemory = ModuleMemory;
|
|
41
|
-
//# sourceMappingURL=memory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../ts/memory.ts"],"names":[],"mappings":";;;AAOA,yCAAqC;AAGrC;;GAEG;AACH,MAAa,YAAY;IACvB,YAAmB,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE3C,cAAc,CAAC,WAA4B;QACzC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,iBAAiB,CAAA;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAA+B,CAAA;QACvE,IAAI,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;QACxE,SAAS,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAA;QAChD,OAAO,IAAI,mBAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,CAAC;IAED,sBAAsB,CACpB,MAAc;QAEd,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,iBAAiB,CAAA;QACvD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAM,CAAA;QAC9C,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;QACzE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACrB,OAAO,IAAI,mBAAQ,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IAC9F,CAAC;IAED,kBAAkB,CAAC,MAAc;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACxD,MAAM,GAAG,GAAyB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAyB,CAAA;QACvF,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;QAC/C,OAAO,IAAI,mBAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAC1E,CAAC;IAED,sBAAsB,CAAC,GAAyB;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACtB,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AAnCD,oCAmCC","sourcesContent":["import { EitherModule } from \"./emscripten-types\"\nimport {\n OwnedHeapCharPointer,\n JSContextPointerPointer,\n JSValueConstPointerPointer,\n JSValuePointerPointer,\n} from \"./types-ffi\"\nimport { Lifetime } from \"./lifetime\"\nimport { EitherFFI, QuickJSHandle } from \"./types\"\n\n/**\n * @private\n */\nexport class ModuleMemory {\n constructor(public module: EitherModule) {}\n\n toPointerArray(handleArray: QuickJSHandle[]): Lifetime<JSValueConstPointerPointer> {\n const typedArray = new Int32Array(handleArray.map((handle) => handle.value))\n const numBytes = typedArray.length * typedArray.BYTES_PER_ELEMENT\n const ptr = this.module._malloc(numBytes) as JSValueConstPointerPointer\n var heapBytes = new Uint8Array(this.module.HEAPU8.buffer, ptr, numBytes)\n heapBytes.set(new Uint8Array(typedArray.buffer))\n return new Lifetime(ptr, undefined, (ptr) => this.module._free(ptr))\n }\n\n newMutablePointerArray<T extends JSContextPointerPointer | JSValuePointerPointer>(\n length: number\n ): Lifetime<{ typedArray: Int32Array; ptr: T }> {\n const zeros = new Int32Array(new Array(length).fill(0))\n const numBytes = zeros.length * zeros.BYTES_PER_ELEMENT\n const ptr = this.module._malloc(numBytes) as T\n const typedArray = new Int32Array(this.module.HEAPU8.buffer, ptr, length)\n typedArray.set(zeros)\n return new Lifetime({ typedArray, ptr }, undefined, (value) => this.module._free(value.ptr))\n }\n\n newHeapCharPointer(string: string): Lifetime<OwnedHeapCharPointer> {\n const numBytes = this.module.lengthBytesUTF8(string) + 1\n const ptr: OwnedHeapCharPointer = this.module._malloc(numBytes) as OwnedHeapCharPointer\n this.module.stringToUTF8(string, ptr, numBytes)\n return new Lifetime(ptr, undefined, (value) => this.module._free(value))\n }\n\n consumeHeapCharPointer(ptr: OwnedHeapCharPointer): string {\n const str = this.module.UTF8ToString(ptr)\n this.module._free(ptr)\n return str\n }\n}\n"]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { QuickJSAsyncContext } from "./context-asyncify";
|
|
2
|
-
import { QuickJSAsyncEmscriptenModule } from "./emscripten-types";
|
|
3
|
-
import { QuickJSAsyncFFI } from "./variants";
|
|
4
|
-
import { ModuleEvalOptions, QuickJSWASMModule } from "./module";
|
|
5
|
-
import { QuickJSAsyncRuntime } from "./runtime-asyncify";
|
|
6
|
-
import { AsyncRuntimeOptions, ContextOptions } from "./types";
|
|
7
|
-
/**
|
|
8
|
-
* Asyncified version of [[QuickJSWASMModule]].
|
|
9
|
-
*
|
|
10
|
-
* Due to limitations of Emscripten's ASYNCIFY process, only a single async
|
|
11
|
-
* function call can happen at a time across the entire WebAssembly module.
|
|
12
|
-
*
|
|
13
|
-
* That means that all runtimes, contexts, functions, etc created inside this
|
|
14
|
-
* WebAssembly are limited to a single concurrent async action.
|
|
15
|
-
* **Multiple concurrent async actions is an error.**
|
|
16
|
-
*
|
|
17
|
-
* To allow for multiple concurrent async actions, you must create multiple WebAssembly
|
|
18
|
-
* modules.
|
|
19
|
-
*/
|
|
20
|
-
export declare class QuickJSAsyncWASMModule extends QuickJSWASMModule {
|
|
21
|
-
/** @private */
|
|
22
|
-
protected ffi: QuickJSAsyncFFI;
|
|
23
|
-
/** @private */
|
|
24
|
-
protected module: QuickJSAsyncEmscriptenModule;
|
|
25
|
-
/** @private */
|
|
26
|
-
constructor(module: QuickJSAsyncEmscriptenModule, ffi: QuickJSAsyncFFI);
|
|
27
|
-
/**
|
|
28
|
-
* Create a new async runtime inside this WebAssembly module. All runtimes inside a
|
|
29
|
-
* module are limited to a single async call at a time. For multiple
|
|
30
|
-
* concurrent async actions, create multiple WebAssembly modules.
|
|
31
|
-
*/
|
|
32
|
-
newRuntime(options?: AsyncRuntimeOptions): QuickJSAsyncRuntime;
|
|
33
|
-
/**
|
|
34
|
-
* A simplified API to create a new [[QuickJSRuntime]] and a
|
|
35
|
-
* [[QuickJSContext]] inside that runtime at the same time. The runtime will
|
|
36
|
-
* be disposed when the context is disposed.
|
|
37
|
-
*/
|
|
38
|
-
newContext(options?: ContextOptions): QuickJSAsyncContext;
|
|
39
|
-
/** Synchronous evalCode is not supported. */
|
|
40
|
-
evalCode(): never;
|
|
41
|
-
/**
|
|
42
|
-
* One-off evaluate code without needing to create a [[QuickJSRuntimeAsync]] or
|
|
43
|
-
* [[QuickJSContextSync]] explicitly.
|
|
44
|
-
*
|
|
45
|
-
* This version allows for asynchronous Ecmascript module loading.
|
|
46
|
-
*
|
|
47
|
-
* Note that only a single async action can occur at a time inside the entire WebAssembly module.
|
|
48
|
-
* **Multiple concurrent async actions is an error.**
|
|
49
|
-
*
|
|
50
|
-
* See the documentation for [[QuickJSWASMModule.evalCode]] for more details.
|
|
51
|
-
*/
|
|
52
|
-
evalCodeAsync(code: string, options: ModuleEvalOptions): Promise<unknown>;
|
|
53
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuickJSAsyncWASMModule = void 0;
|
|
4
|
-
const errors_1 = require("./errors");
|
|
5
|
-
const lifetime_1 = require("./lifetime");
|
|
6
|
-
const module_1 = require("./module");
|
|
7
|
-
const runtime_asyncify_1 = require("./runtime-asyncify");
|
|
8
|
-
/**
|
|
9
|
-
* Asyncified version of [[QuickJSWASMModule]].
|
|
10
|
-
*
|
|
11
|
-
* Due to limitations of Emscripten's ASYNCIFY process, only a single async
|
|
12
|
-
* function call can happen at a time across the entire WebAssembly module.
|
|
13
|
-
*
|
|
14
|
-
* That means that all runtimes, contexts, functions, etc created inside this
|
|
15
|
-
* WebAssembly are limited to a single concurrent async action.
|
|
16
|
-
* **Multiple concurrent async actions is an error.**
|
|
17
|
-
*
|
|
18
|
-
* To allow for multiple concurrent async actions, you must create multiple WebAssembly
|
|
19
|
-
* modules.
|
|
20
|
-
*/
|
|
21
|
-
class QuickJSAsyncWASMModule extends module_1.QuickJSWASMModule {
|
|
22
|
-
/** @private */
|
|
23
|
-
constructor(module, ffi) {
|
|
24
|
-
super(module, ffi);
|
|
25
|
-
this.ffi = ffi;
|
|
26
|
-
this.module = module;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Create a new async runtime inside this WebAssembly module. All runtimes inside a
|
|
30
|
-
* module are limited to a single async call at a time. For multiple
|
|
31
|
-
* concurrent async actions, create multiple WebAssembly modules.
|
|
32
|
-
*/
|
|
33
|
-
newRuntime(options = {}) {
|
|
34
|
-
const rt = new lifetime_1.Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => {
|
|
35
|
-
this.callbacks.deleteRuntime(rt_ptr);
|
|
36
|
-
this.ffi.QTS_FreeRuntime(rt_ptr);
|
|
37
|
-
});
|
|
38
|
-
const runtime = new runtime_asyncify_1.QuickJSAsyncRuntime({
|
|
39
|
-
module: this.module,
|
|
40
|
-
ffi: this.ffi,
|
|
41
|
-
rt,
|
|
42
|
-
callbacks: this.callbacks,
|
|
43
|
-
});
|
|
44
|
-
(0, module_1.applyBaseRuntimeOptions)(runtime, options);
|
|
45
|
-
if (options.moduleLoader) {
|
|
46
|
-
runtime.setModuleLoader(options.moduleLoader);
|
|
47
|
-
}
|
|
48
|
-
return runtime;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* A simplified API to create a new [[QuickJSRuntime]] and a
|
|
52
|
-
* [[QuickJSContext]] inside that runtime at the same time. The runtime will
|
|
53
|
-
* be disposed when the context is disposed.
|
|
54
|
-
*/
|
|
55
|
-
newContext(options = {}) {
|
|
56
|
-
const runtime = this.newRuntime();
|
|
57
|
-
const lifetimes = options.ownedLifetimes ? options.ownedLifetimes.concat([runtime]) : [runtime];
|
|
58
|
-
const context = runtime.newContext({ ...options, ownedLifetimes: lifetimes });
|
|
59
|
-
runtime.context = context;
|
|
60
|
-
return context;
|
|
61
|
-
}
|
|
62
|
-
/** Synchronous evalCode is not supported. */
|
|
63
|
-
evalCode() {
|
|
64
|
-
throw new errors_1.QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead");
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* One-off evaluate code without needing to create a [[QuickJSRuntimeAsync]] or
|
|
68
|
-
* [[QuickJSContextSync]] explicitly.
|
|
69
|
-
*
|
|
70
|
-
* This version allows for asynchronous Ecmascript module loading.
|
|
71
|
-
*
|
|
72
|
-
* Note that only a single async action can occur at a time inside the entire WebAssembly module.
|
|
73
|
-
* **Multiple concurrent async actions is an error.**
|
|
74
|
-
*
|
|
75
|
-
* See the documentation for [[QuickJSWASMModule.evalCode]] for more details.
|
|
76
|
-
*/
|
|
77
|
-
evalCodeAsync(code, options) {
|
|
78
|
-
// TODO: we should really figure out generator for the Promise monad...
|
|
79
|
-
return lifetime_1.Scope.withScopeAsync(async (scope) => {
|
|
80
|
-
const vm = scope.manage(this.newContext());
|
|
81
|
-
(0, module_1.applyModuleEvalRuntimeOptions)(vm.runtime, options);
|
|
82
|
-
const result = await vm.evalCodeAsync(code, "eval.js");
|
|
83
|
-
if (options.memoryLimitBytes !== undefined) {
|
|
84
|
-
// Remove memory limit so we can dump the result without exceeding it.
|
|
85
|
-
vm.runtime.setMemoryLimit(-1);
|
|
86
|
-
}
|
|
87
|
-
if (result.error) {
|
|
88
|
-
const error = vm.dump(scope.manage(result.error));
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
const value = vm.dump(scope.manage(result.value));
|
|
92
|
-
return value;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.QuickJSAsyncWASMModule = QuickJSAsyncWASMModule;
|
|
97
|
-
//# sourceMappingURL=module-asyncify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-asyncify.js","sourceRoot":"","sources":["../ts/module-asyncify.ts"],"names":[],"mappings":"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","sourcesContent":["import { QuickJSAsyncContext } from \"./context-asyncify\"\nimport { QuickJSAsyncEmscriptenModule } from \"./emscripten-types\"\nimport { QuickJSNotImplemented } from \"./errors\"\nimport { QuickJSAsyncFFI } from \"./variants\"\nimport { Lifetime, Scope } from \"./lifetime\"\nimport {\n applyBaseRuntimeOptions,\n applyModuleEvalRuntimeOptions,\n ModuleEvalOptions,\n QuickJSWASMModule,\n} from \"./module\"\nimport { QuickJSAsyncRuntime } from \"./runtime-asyncify\"\nimport { AsyncRuntimeOptions, ContextOptions, RuntimeOptions } from \"./types\"\n\n/**\n * Asyncified version of [[QuickJSWASMModule]].\n *\n * Due to limitations of Emscripten's ASYNCIFY process, only a single async\n * function call can happen at a time across the entire WebAssembly module.\n *\n * That means that all runtimes, contexts, functions, etc created inside this\n * WebAssembly are limited to a single concurrent async action.\n * **Multiple concurrent async actions is an error.**\n *\n * To allow for multiple concurrent async actions, you must create multiple WebAssembly\n * modules.\n */\nexport class QuickJSAsyncWASMModule extends QuickJSWASMModule {\n /** @private */\n protected ffi: QuickJSAsyncFFI\n /** @private */\n protected module: QuickJSAsyncEmscriptenModule\n\n /** @private */\n constructor(module: QuickJSAsyncEmscriptenModule, ffi: QuickJSAsyncFFI) {\n super(module, ffi)\n this.ffi = ffi\n this.module = module\n }\n\n /**\n * Create a new async runtime inside this WebAssembly module. All runtimes inside a\n * module are limited to a single async call at a time. For multiple\n * concurrent async actions, create multiple WebAssembly modules.\n */\n override newRuntime(options: AsyncRuntimeOptions = {}): QuickJSAsyncRuntime {\n const rt = new Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => {\n this.callbacks.deleteRuntime(rt_ptr)\n this.ffi.QTS_FreeRuntime(rt_ptr)\n })\n const runtime = new QuickJSAsyncRuntime({\n module: this.module,\n ffi: this.ffi,\n rt,\n callbacks: this.callbacks,\n })\n\n applyBaseRuntimeOptions(runtime, options)\n\n if (options.moduleLoader) {\n runtime.setModuleLoader(options.moduleLoader)\n }\n\n return runtime\n }\n\n /**\n * A simplified API to create a new [[QuickJSRuntime]] and a\n * [[QuickJSContext]] inside that runtime at the same time. The runtime will\n * be disposed when the context is disposed.\n */\n override newContext(options: ContextOptions = {}): QuickJSAsyncContext {\n const runtime = this.newRuntime()\n const lifetimes = options.ownedLifetimes ? options.ownedLifetimes.concat([runtime]) : [runtime]\n const context = runtime.newContext({ ...options, ownedLifetimes: lifetimes })\n runtime.context = context\n return context\n }\n\n /** Synchronous evalCode is not supported. */\n override evalCode(): never {\n throw new QuickJSNotImplemented(\"QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead\")\n }\n\n /**\n * One-off evaluate code without needing to create a [[QuickJSRuntimeAsync]] or\n * [[QuickJSContextSync]] explicitly.\n *\n * This version allows for asynchronous Ecmascript module loading.\n *\n * Note that only a single async action can occur at a time inside the entire WebAssembly module.\n * **Multiple concurrent async actions is an error.**\n *\n * See the documentation for [[QuickJSWASMModule.evalCode]] for more details.\n */\n evalCodeAsync(code: string, options: ModuleEvalOptions): Promise<unknown> {\n // TODO: we should really figure out generator for the Promise monad...\n return Scope.withScopeAsync(async (scope) => {\n const vm = scope.manage(this.newContext())\n applyModuleEvalRuntimeOptions(vm.runtime, options)\n const result = await vm.evalCodeAsync(code, \"eval.js\")\n\n if (options.memoryLimitBytes !== undefined) {\n // Remove memory limit so we can dump the result without exceeding it.\n vm.runtime.setMemoryLimit(-1)\n }\n\n if (result.error) {\n const error = vm.dump(scope.manage(result.error))\n throw error\n }\n\n const value = vm.dump(scope.manage(result.value))\n return value\n })\n }\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { QuickJSContext } from "./context";
|
|
2
|
-
import type { ModuleEvalOptions, QuickJSWASMModule } from "./module";
|
|
3
|
-
import type { QuickJSRuntime } from "./runtime";
|
|
4
|
-
import type { ContextOptions, RuntimeOptions } from "./types";
|
|
5
|
-
/**
|
|
6
|
-
* A test wrapper of [[QuickJSWASMModule]] that keeps a reference to each
|
|
7
|
-
* context or runtime created.
|
|
8
|
-
*
|
|
9
|
-
* Call [[disposeAll]] to reset these sets and calls `dispose` on any left alive
|
|
10
|
-
* (which may throw an error).
|
|
11
|
-
*
|
|
12
|
-
* Call [[assertNoMemoryAllocated]] at the end of a test, when you expect that you've
|
|
13
|
-
* freed all the memory you've ever allocated.
|
|
14
|
-
*/
|
|
15
|
-
export declare class TestQuickJSWASMModule implements Pick<QuickJSWASMModule, keyof QuickJSWASMModule> {
|
|
16
|
-
private parent;
|
|
17
|
-
contexts: Set<QuickJSContext>;
|
|
18
|
-
runtimes: Set<QuickJSRuntime>;
|
|
19
|
-
constructor(parent: QuickJSWASMModule);
|
|
20
|
-
newRuntime(options?: RuntimeOptions): QuickJSRuntime;
|
|
21
|
-
newContext(options?: ContextOptions): QuickJSContext;
|
|
22
|
-
evalCode(code: string, options?: ModuleEvalOptions): unknown;
|
|
23
|
-
disposeAll(): void;
|
|
24
|
-
assertNoMemoryAllocated(): void;
|
|
25
|
-
/** @private */
|
|
26
|
-
getFFI(): any;
|
|
27
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestQuickJSWASMModule = void 0;
|
|
4
|
-
const errors_1 = require("./errors");
|
|
5
|
-
const lifetime_1 = require("./lifetime");
|
|
6
|
-
/**
|
|
7
|
-
* A test wrapper of [[QuickJSWASMModule]] that keeps a reference to each
|
|
8
|
-
* context or runtime created.
|
|
9
|
-
*
|
|
10
|
-
* Call [[disposeAll]] to reset these sets and calls `dispose` on any left alive
|
|
11
|
-
* (which may throw an error).
|
|
12
|
-
*
|
|
13
|
-
* Call [[assertNoMemoryAllocated]] at the end of a test, when you expect that you've
|
|
14
|
-
* freed all the memory you've ever allocated.
|
|
15
|
-
*/
|
|
16
|
-
class TestQuickJSWASMModule {
|
|
17
|
-
constructor(parent) {
|
|
18
|
-
this.parent = parent;
|
|
19
|
-
this.contexts = new Set();
|
|
20
|
-
this.runtimes = new Set();
|
|
21
|
-
}
|
|
22
|
-
newRuntime(options) {
|
|
23
|
-
const runtime = this.parent.newRuntime({
|
|
24
|
-
...options,
|
|
25
|
-
ownedLifetimes: [
|
|
26
|
-
new lifetime_1.Lifetime(undefined, undefined, () => this.runtimes.delete(runtime)),
|
|
27
|
-
...(options?.ownedLifetimes ?? []),
|
|
28
|
-
],
|
|
29
|
-
});
|
|
30
|
-
this.runtimes.add(runtime);
|
|
31
|
-
return runtime;
|
|
32
|
-
}
|
|
33
|
-
newContext(options) {
|
|
34
|
-
const context = this.parent.newContext({
|
|
35
|
-
...options,
|
|
36
|
-
ownedLifetimes: [
|
|
37
|
-
new lifetime_1.Lifetime(undefined, undefined, () => this.contexts.delete(context)),
|
|
38
|
-
...(options?.ownedLifetimes ?? []),
|
|
39
|
-
],
|
|
40
|
-
});
|
|
41
|
-
this.contexts.add(context);
|
|
42
|
-
return context;
|
|
43
|
-
}
|
|
44
|
-
evalCode(code, options) {
|
|
45
|
-
return this.parent.evalCode(code, options);
|
|
46
|
-
}
|
|
47
|
-
disposeAll() {
|
|
48
|
-
const allDisposables = [...this.contexts, ...this.runtimes];
|
|
49
|
-
this.runtimes.clear();
|
|
50
|
-
this.contexts.clear();
|
|
51
|
-
allDisposables.forEach((d) => {
|
|
52
|
-
if (d.alive) {
|
|
53
|
-
d.dispose();
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
assertNoMemoryAllocated() {
|
|
58
|
-
const leaksDetected = this.getFFI().QTS_RecoverableLeakCheck();
|
|
59
|
-
if (leaksDetected) {
|
|
60
|
-
// Note: this is currently only available when building from source
|
|
61
|
-
// with debug builds.
|
|
62
|
-
throw new errors_1.QuickJSMemoryLeakDetected("Leak sanitizer detected un-freed memory");
|
|
63
|
-
}
|
|
64
|
-
if (this.contexts.size > 0) {
|
|
65
|
-
throw new errors_1.QuickJSMemoryLeakDetected(`${this.contexts.size} contexts leaked`);
|
|
66
|
-
}
|
|
67
|
-
if (this.runtimes.size > 0) {
|
|
68
|
-
throw new errors_1.QuickJSMemoryLeakDetected(`${this.runtimes.size} runtimes leaked`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/** @private */
|
|
72
|
-
getFFI() {
|
|
73
|
-
return this.parent.getFFI();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.TestQuickJSWASMModule = TestQuickJSWASMModule;
|
|
77
|
-
//# sourceMappingURL=module-test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-test.js","sourceRoot":"","sources":["../ts/module-test.ts"],"names":[],"mappings":";;;AAIA,qCAAoD;AACpD,yCAAqC;AAErC;;;;;;;;;GASG;AACH,MAAa,qBAAqB;IAGhC,YAAoB,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QAF7C,aAAQ,GAAG,IAAI,GAAG,EAAkB,CAAA;QACpC,aAAQ,GAAG,IAAI,GAAG,EAAkB,CAAA;IACY,CAAC;IAEjD,UAAU,CAAC,OAAwB;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;YACrC,GAAG,OAAO;YACV,cAAc,EAAE;gBACd,IAAI,mBAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACvE,GAAG,CAAC,OAAO,EAAE,cAAc,IAAI,EAAE,CAAC;aACnC;SACF,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC1B,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,UAAU,CAAC,OAAwB;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;YACrC,GAAG,OAAO;YACV,cAAc,EAAE;gBACd,IAAI,mBAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACvE,GAAG,CAAC,OAAO,EAAE,cAAc,IAAI,EAAE,CAAC;aACnC;SACF,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC1B,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,QAAQ,CAAC,IAAY,EAAE,OAA2B;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC5C,CAAC;IAED,UAAU;QACR,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC3D,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAA;QACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAA;QACrB,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3B,IAAI,CAAC,CAAC,KAAK,EAAE;gBACX,CAAC,CAAC,OAAO,EAAE,CAAA;aACZ;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,uBAAuB;QACrB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,wBAAwB,EAAE,CAAA;QAC9D,IAAI,aAAa,EAAE;YACjB,mEAAmE;YACnE,qBAAqB;YACrB,MAAM,IAAI,kCAAyB,CAAC,yCAAyC,CAAC,CAAA;SAC/E;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE;YAC1B,MAAM,IAAI,kCAAyB,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,CAAA;SAC7E;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE;YAC1B,MAAM,IAAI,kCAAyB,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAAC,CAAA;SAC7E;IACH,CAAC;IAED,eAAe;IACf,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAA;IAC7B,CAAC;CACF;AAjED,sDAiEC","sourcesContent":["import type { QuickJSContext } from \"./context\"\nimport type { ModuleEvalOptions, QuickJSWASMModule } from \"./module\"\nimport type { QuickJSRuntime } from \"./runtime\"\nimport type { ContextOptions, RuntimeOptions } from \"./types\"\nimport { QuickJSMemoryLeakDetected } from \"./errors\"\nimport { Lifetime } from \"./lifetime\"\n\n/**\n * A test wrapper of [[QuickJSWASMModule]] that keeps a reference to each\n * context or runtime created.\n *\n * Call [[disposeAll]] to reset these sets and calls `dispose` on any left alive\n * (which may throw an error).\n *\n * Call [[assertNoMemoryAllocated]] at the end of a test, when you expect that you've\n * freed all the memory you've ever allocated.\n */\nexport class TestQuickJSWASMModule implements Pick<QuickJSWASMModule, keyof QuickJSWASMModule> {\n contexts = new Set<QuickJSContext>()\n runtimes = new Set<QuickJSRuntime>()\n constructor(private parent: QuickJSWASMModule) {}\n\n newRuntime(options?: RuntimeOptions): QuickJSRuntime {\n const runtime = this.parent.newRuntime({\n ...options,\n ownedLifetimes: [\n new Lifetime(undefined, undefined, () => this.runtimes.delete(runtime)),\n ...(options?.ownedLifetimes ?? []),\n ],\n })\n this.runtimes.add(runtime)\n return runtime\n }\n\n newContext(options?: ContextOptions): QuickJSContext {\n const context = this.parent.newContext({\n ...options,\n ownedLifetimes: [\n new Lifetime(undefined, undefined, () => this.contexts.delete(context)),\n ...(options?.ownedLifetimes ?? []),\n ],\n })\n this.contexts.add(context)\n return context\n }\n\n evalCode(code: string, options?: ModuleEvalOptions): unknown {\n return this.parent.evalCode(code, options)\n }\n\n disposeAll() {\n const allDisposables = [...this.contexts, ...this.runtimes]\n this.runtimes.clear()\n this.contexts.clear()\n allDisposables.forEach((d) => {\n if (d.alive) {\n d.dispose()\n }\n })\n }\n\n assertNoMemoryAllocated() {\n const leaksDetected = this.getFFI().QTS_RecoverableLeakCheck()\n if (leaksDetected) {\n // Note: this is currently only available when building from source\n // with debug builds.\n throw new QuickJSMemoryLeakDetected(\"Leak sanitizer detected un-freed memory\")\n }\n\n if (this.contexts.size > 0) {\n throw new QuickJSMemoryLeakDetected(`${this.contexts.size} contexts leaked`)\n }\n\n if (this.runtimes.size > 0) {\n throw new QuickJSMemoryLeakDetected(`${this.runtimes.size} runtimes leaked`)\n }\n }\n\n /** @private */\n getFFI() {\n return this.parent.getFFI()\n }\n}\n"]}
|