@yanglaofish/fishtools 0.5.1 → 0.5.3
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/README.md +25 -11
- package/manual/README.md +25 -11
- package/manual/docs/deployment.md +3 -3
- package/manual/docs/examples/action-plugin/package.json +1 -1
- package/manual/docs/modules.md +2 -0
- package/manual/docs/plugin-development.md +18 -5
- package/manual/docs/releases.md +56 -6
- package/manual/docs/superpowers/plans/2026-10-13-command-shortcuts.md +108 -0
- package/manual/docs/superpowers/plans/2026-10-13-global-plugins.md +56 -0
- package/manual/docs/superpowers/plans/2026-10-13-tui-readable-sessions.md +21 -0
- package/manual/docs/superpowers/reviews/2026-10-13-0.5.0-followup-review.md +4 -1
- package/manual/docs/superpowers/reviews/2026-10-13-0.5.3-review.md +28 -0
- package/manual/docs/superpowers/reviews/2026-10-13-command-shortcuts-review.md +70 -0
- package/manual/docs/superpowers/reviews/2026-10-13-tui-sessions-review.md +55 -0
- package/manual/docs/superpowers/specs/2026-10-12-workflow-variation-design.md +1 -1
- package/manual/docs/superpowers/specs/2026-10-13-command-shortcuts-design.md +56 -0
- package/manual/docs/superpowers/specs/2026-10-13-issue-4-workflow-menu.md +51 -0
- package/manual/docs/superpowers/specs/2026-10-13-issue-5-results-and-history.md +20 -0
- package/manual/docs/terminal-commands.md +72 -0
- package/manual/docs/verification.md +56 -1
- package/manual/packages/core/README.md +5 -1
- package/manual/packages/core/package.json +2 -1
- package/manual/packages/core/src/application.js +203 -57
- package/manual/packages/core/src/development-watch-worker.js +10 -1
- package/manual/packages/core/src/development.js +1 -1
- package/manual/packages/core/src/export-snapshot.js +20 -1
- package/manual/packages/core/src/plugin-catalog.js +42 -0
- package/manual/packages/core/src/version.js +1 -1
- package/manual/packages/fst-cli/README.md +6 -0
- package/manual/packages/fst-cli/bin/fst.js +7 -6
- package/manual/packages/fst-cli/package.json +1 -1
- package/manual/packages/fst-cli/src/development.js +6 -1
- package/manual/packages/fst-cli/src/terminal/command-menu.js +191 -0
- package/manual/packages/fst-cli/src/terminal/navigation.js +6 -3
- package/manual/packages/fst-cli/src/terminal/presentation.js +4 -3
- package/manual/packages/fst-cli/src/terminal/run-feed.js +69 -13
- package/manual/packages/fst-cli/src/terminal/run-presentation.js +55 -12
- package/manual/packages/fst-cli/src/terminal/run-viewer.js +26 -10
- package/manual/packages/fst-cli/src/terminal/session-history.js +82 -0
- package/manual/packages/fst-cli/src/terminal/session.js +153 -43
- package/manual/packages/fst-cli/src/terminal/view.js +74 -16
- package/manual/packages/fst-cli/src/terminal/workflow-menu.js +15 -15
- package/manual/packages/fst-devtools/package.json +2 -2
- package/manual/packages/fst-devtools/src/documentation.js +2 -1
- package/manual/packages/fst-devtools/src/plugin-tools.js +1 -1
- package/manual/packages/fst-logs/README.md +23 -2
- package/manual/packages/fst-logs/package.json +2 -1
- package/manual/packages/fst-logs/src/file-identity.js +23 -0
- package/manual/packages/fst-logs/src/markdown-log.js +4 -3
- package/manual/packages/fst-logs/src/run-logs.js +3 -2
- package/manual/packages/fst-logs/src/session-history.js +180 -0
- package/manual/packages/fst-platform/README.md +15 -0
- package/manual/packages/fst-platform/package.json +4 -3
- package/manual/packages/fst-platform/src/process.js +15 -8
- package/manual/packages/fst-platform/src/shell.js +103 -0
- package/manual/packages/fst-plugin/package.json +1 -1
- package/manual/packages/fst-plugin/src/contracts.js +6 -2
- package/manual/packages/fst-plugin/src/host.js +31 -23
- package/manual/packages/fst-workflow/package.json +1 -1
- package/manual/packages/fst-workflow/src/engine.js +1 -1
- package/manual/packages/fst-workspace/README.md +5 -0
- package/manual/packages/fst-workspace/package.json +3 -1
- package/manual/packages/fst-workspace/src/plugin-registry.js +58 -0
- package/manual/packages/fst-workspace/src/plugins.js +7 -4
- package/manual/packages/fst-workspace/src/shortcuts.js +119 -0
- package/manual/packages/fst-workspace/src/workflows.js +5 -3
- package/manual/packages/pack/index.js +1 -1
- package/manual/packages/pack/package.json +3 -3
- package/manual/packages/pack/runtime-cache.js +26 -0
- package/manual/packages/pack/runtime.js +6 -10
- package/manual/plugins/commands/LICENSE +21 -0
- package/manual/plugins/commands/README.md +41 -0
- package/manual/plugins/commands/index.js +94 -0
- package/manual/plugins/commands/package.json +17 -0
- package/node_modules/@mytools/commands/LICENSE +21 -0
- package/node_modules/@mytools/commands/README.md +41 -0
- package/node_modules/@mytools/commands/index.js +94 -0
- package/node_modules/@mytools/commands/package.json +17 -0
- package/node_modules/@mytools/core/README.md +5 -1
- package/node_modules/@mytools/core/package.json +2 -1
- package/node_modules/@mytools/core/src/application.js +203 -57
- package/node_modules/@mytools/core/src/development-watch-worker.js +10 -1
- package/node_modules/@mytools/core/src/development.js +1 -1
- package/node_modules/@mytools/core/src/export-snapshot.js +20 -1
- package/node_modules/@mytools/core/src/plugin-catalog.js +42 -0
- package/node_modules/@mytools/core/src/version.js +1 -1
- package/node_modules/@mytools/fst-cli/README.md +6 -0
- package/node_modules/@mytools/fst-cli/bin/fst.js +7 -6
- package/node_modules/@mytools/fst-cli/package.json +1 -1
- package/node_modules/@mytools/fst-cli/src/development.js +6 -1
- package/node_modules/@mytools/fst-cli/src/terminal/command-menu.js +191 -0
- package/node_modules/@mytools/fst-cli/src/terminal/navigation.js +6 -3
- package/node_modules/@mytools/fst-cli/src/terminal/presentation.js +4 -3
- package/node_modules/@mytools/fst-cli/src/terminal/run-feed.js +69 -13
- package/node_modules/@mytools/fst-cli/src/terminal/run-presentation.js +55 -12
- package/node_modules/@mytools/fst-cli/src/terminal/run-viewer.js +26 -10
- package/node_modules/@mytools/fst-cli/src/terminal/session-history.js +82 -0
- package/node_modules/@mytools/fst-cli/src/terminal/session.js +153 -43
- package/node_modules/@mytools/fst-cli/src/terminal/view.js +74 -16
- package/node_modules/@mytools/fst-cli/src/terminal/workflow-menu.js +15 -15
- package/node_modules/@mytools/fst-devtools/package.json +2 -2
- package/node_modules/@mytools/fst-devtools/src/documentation.js +2 -1
- package/node_modules/@mytools/fst-devtools/src/plugin-tools.js +1 -1
- package/node_modules/@mytools/fst-logs/README.md +23 -2
- package/node_modules/@mytools/fst-logs/package.json +2 -1
- package/node_modules/@mytools/fst-logs/src/file-identity.js +23 -0
- package/node_modules/@mytools/fst-logs/src/markdown-log.js +4 -3
- package/node_modules/@mytools/fst-logs/src/run-logs.js +3 -2
- package/node_modules/@mytools/fst-logs/src/session-history.js +180 -0
- package/node_modules/@mytools/fst-platform/README.md +15 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/LICENSE +21 -0
- package/node_modules/{undici/docs/docs/index.md → @mytools/fst-platform/node_modules/undici/README.md} +85 -137
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Client.md +288 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Cookies.md +128 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +317 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Dispatcher.md +1393 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/crawling.md +1 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/docs/docs/best-practices/undici-vs-builtin-fetch.md +8 -10
- package/node_modules/@mytools/fst-platform/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index.d.ts +3 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/index.js +234 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-connect.js +110 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-pipeline.js +252 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-stream.js +209 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/api-upgrade.js +111 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/api/readable.js +580 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/memory-cache-store.js +3 -3
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/cache/sqlite-cache-store.js +1 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/constants.js +143 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/request.js +485 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/symbols.js +75 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/core/util.js +992 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/agent.js +158 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/balanced-pool.js +221 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h1.js +1746 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client-h2.js +1060 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/client.js +668 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/h2c-client.js +4 -4
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/pool.js +118 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/round-robin-pool.js +10 -32
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/dispatcher/socks5-proxy-agent.js +63 -153
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/global.js +59 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-handler.js +7 -49
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/cache-revalidation-handler.js +0 -10
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/decorator-handler.js +67 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/handler/deduplication-handler.js +10 -29
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/redirect-handler.js +238 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/retry-handler.js +504 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/cache.js +26 -79
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/decompress.js +3 -13
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/interceptor/deduplicate.js +4 -5
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/dump.js +99 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/mock-call-history.js +1 -1
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/mock-utils.js +486 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-agent.js +7 -25
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-recorder.js +3 -38
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/cache.js +10 -92
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/promise.js +28 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/runtime-features.js +34 -3
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cache.js +864 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/parse.js +314 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/cookies/util.js +352 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/body.js +509 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/formdata.js +259 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/index.js +2413 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/infra/index.js +1 -16
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/webidl/index.js +21 -7
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/connection.js +339 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/frame.js +133 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/permessage-deflate.js +105 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/receiver.js +507 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketerror.js +10 -13
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/websocket/stream/websocketstream.js +14 -29
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/lib/web/websocket/websocket.js +758 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/package.json +152 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/README.md +6 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/agent.d.ts +32 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/client.d.ts +139 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/connector.d.ts +36 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/dispatcher.d.ts +275 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/errors.d.ts +177 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/fetch.d.ts +231 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/formdata.d.ts +114 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/h2c-client.d.ts +6 -6
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/handlers.d.ts +14 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/header.d.ts +160 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/index.d.ts +91 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/interceptors.d.ts +82 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/pool.d.ts +41 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/round-robin-pool.d.ts +2 -0
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/snapshot-agent.d.ts +0 -4
- package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/socks5-proxy-agent.d.ts +2 -4
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/webidl.d.ts +347 -0
- package/node_modules/@mytools/fst-platform/node_modules/undici/types/websocket.d.ts +188 -0
- package/node_modules/@mytools/fst-platform/package.json +4 -3
- package/node_modules/@mytools/fst-platform/src/process.js +15 -8
- package/node_modules/@mytools/fst-platform/src/shell.js +103 -0
- package/node_modules/@mytools/fst-plugin/package.json +1 -1
- package/node_modules/@mytools/fst-plugin/src/contracts.js +6 -2
- package/node_modules/@mytools/fst-plugin/src/host.js +31 -23
- package/node_modules/@mytools/fst-workflow/package.json +1 -1
- package/node_modules/@mytools/fst-workflow/src/engine.js +1 -1
- package/node_modules/@mytools/fst-workspace/README.md +5 -0
- package/node_modules/@mytools/fst-workspace/package.json +3 -1
- package/node_modules/@mytools/fst-workspace/src/plugin-registry.js +58 -0
- package/node_modules/@mytools/fst-workspace/src/plugins.js +7 -4
- package/node_modules/@mytools/fst-workspace/src/shortcuts.js +119 -0
- package/node_modules/@mytools/fst-workspace/src/workflows.js +5 -3
- package/node_modules/@mytools/pack/index.js +1 -1
- package/node_modules/@mytools/pack/package.json +3 -3
- package/node_modules/@mytools/pack/runtime-cache.js +26 -0
- package/node_modules/@mytools/pack/runtime.js +6 -10
- package/node_modules/@mytools/web/public/THIRD_PARTY_NOTICES.txt +1246 -1232
- package/node_modules/@npmcli/agent/lib/agents.js +0 -10
- package/node_modules/@npmcli/agent/package.json +12 -11
- package/node_modules/@npmcli/arborist/README.md +2 -2
- package/node_modules/@npmcli/arborist/bin/index.js +2 -1
- package/node_modules/@npmcli/arborist/bin/shrinkwrap.js +7 -0
- package/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +25 -159
- package/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js +49 -11
- package/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +0 -67
- package/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +37 -5
- package/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +8 -15
- package/node_modules/@npmcli/arborist/lib/arborist/reify.js +42 -59
- package/node_modules/@npmcli/arborist/lib/consistent-resolve.js +1 -1
- package/node_modules/@npmcli/arborist/lib/diff.js +22 -17
- package/node_modules/@npmcli/arborist/lib/edge.js +2 -22
- package/node_modules/@npmcli/arborist/lib/index.js +0 -2
- package/node_modules/@npmcli/arborist/lib/isolated-classes.js +1 -4
- package/node_modules/@npmcli/arborist/lib/node.js +9 -13
- package/node_modules/@npmcli/arborist/lib/place-dep.js +0 -6
- package/node_modules/@npmcli/arborist/lib/printable.js +5 -0
- package/node_modules/@npmcli/arborist/lib/shrinkwrap.js +32 -55
- package/node_modules/@npmcli/arborist/package.json +26 -32
- package/node_modules/@npmcli/fs/lib/move-file.js +5 -5
- package/node_modules/@npmcli/fs/package.json +5 -5
- package/node_modules/@npmcli/git/package.json +12 -13
- package/node_modules/@npmcli/installed-package-contents/package.json +7 -7
- package/node_modules/@npmcli/map-workspaces/package.json +7 -7
- package/node_modules/@npmcli/metavuln-calculator/package.json +16 -10
- package/node_modules/@npmcli/name-from-folder/package.json +16 -13
- package/node_modules/@npmcli/node-gyp/package.json +5 -5
- package/node_modules/@npmcli/package-json/lib/index.js +1 -2
- package/node_modules/@npmcli/package-json/lib/normalize.js +22 -23
- package/node_modules/@npmcli/package-json/package.json +10 -11
- package/node_modules/@npmcli/promise-spawn/README.md +2 -1
- package/node_modules/@npmcli/promise-spawn/package.json +5 -5
- package/node_modules/@npmcli/redact/package.json +4 -4
- package/node_modules/@npmcli/run-script/lib/is-server-package.js +11 -0
- package/node_modules/@npmcli/run-script/lib/make-spawn-args.js +6 -5
- package/node_modules/@npmcli/run-script/lib/run-script-pkg.js +13 -4
- package/node_modules/@npmcli/run-script/lib/run-script.js +2 -1
- package/node_modules/@npmcli/run-script/package.json +11 -12
- package/node_modules/@sigstore/bundle/README.md +1 -1
- package/node_modules/@sigstore/bundle/dist/error.js +0 -1
- package/node_modules/@sigstore/bundle/package.json +2 -2
- package/node_modules/@sigstore/core/README.md +1 -1
- package/node_modules/@sigstore/core/dist/asn1/length.js +1 -12
- package/node_modules/@sigstore/core/dist/asn1/obj.js +7 -25
- package/node_modules/@sigstore/core/dist/asn1/parse.js +5 -24
- package/node_modules/@sigstore/core/package.json +2 -2
- package/node_modules/@sigstore/sign/README.md +1 -1
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +1 -1
- package/node_modules/@sigstore/sign/package.json +9 -9
- package/node_modules/@sigstore/tuf/README.md +1 -1
- package/node_modules/@sigstore/tuf/package.json +4 -4
- package/node_modules/@sigstore/tuf/seeds.json +1 -1
- package/node_modules/@sigstore/verify/README.md +1 -1
- package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +0 -1
- package/node_modules/@sigstore/verify/dist/bundle/dsse.js +0 -6
- package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +0 -1
- package/node_modules/@sigstore/verify/dist/bundle/message.js +0 -5
- package/node_modules/@sigstore/verify/dist/policy.d.ts +1 -1
- package/node_modules/@sigstore/verify/dist/policy.js +2 -0
- package/node_modules/@sigstore/verify/dist/shared.types.d.ts +1 -6
- package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +3 -17
- package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +4 -4
- package/node_modules/@sigstore/verify/dist/tlog/index.js +1 -13
- package/node_modules/@sigstore/verify/dist/tlog/merkle.js +1 -12
- package/node_modules/@sigstore/verify/dist/verifier.js +5 -13
- package/node_modules/@sigstore/verify/package.json +5 -5
- package/node_modules/@tufjs/models/package.json +3 -3
- package/node_modules/abbrev/package.json +8 -9
- package/node_modules/agent-base/dist/helpers.d.ts +5 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -1
- package/node_modules/agent-base/dist/helpers.js +34 -5
- package/node_modules/agent-base/dist/helpers.js.map +1 -1
- package/node_modules/agent-base/dist/index.d.ts +5 -1
- package/node_modules/agent-base/dist/index.d.ts.map +1 -1
- package/node_modules/agent-base/dist/index.js +40 -8
- package/node_modules/agent-base/dist/index.js.map +1 -1
- package/node_modules/agent-base/package.json +12 -12
- package/node_modules/bin-links/README.md +4 -5
- package/node_modules/bin-links/lib/fix-bin.js +1 -3
- package/node_modules/bin-links/lib/index.js +16 -8
- package/node_modules/bin-links/lib/link-mans.js +53 -0
- package/node_modules/bin-links/package.json +12 -11
- package/node_modules/cacache/lib/content/write.js +0 -2
- package/node_modules/cacache/lib/entry-index.js +0 -3
- package/node_modules/cacache/lib/rm.js +0 -1
- package/node_modules/cacache/lib/util/tmp.js +1 -5
- package/node_modules/cacache/lib/verify.js +2 -2
- package/node_modules/cacache/package.json +7 -7
- package/node_modules/cmd-shim/lib/index.js +32 -67
- package/node_modules/cmd-shim/package.json +5 -5
- package/node_modules/hosted-git-info/README.md +1 -1
- package/node_modules/hosted-git-info/lib/parse-url.js +3 -1
- package/node_modules/hosted-git-info/package.json +4 -4
- package/node_modules/http-proxy-agent/dist/index.d.ts +5 -8
- package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/http-proxy-agent/dist/index.js +42 -26
- package/node_modules/http-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/http-proxy-agent/package.json +14 -15
- package/node_modules/https-proxy-agent/dist/index.d.ts +5 -9
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/https-proxy-agent/dist/index.js +44 -98
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +3 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +10 -3
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -1
- package/node_modules/https-proxy-agent/package.json +15 -16
- package/node_modules/ignore-walk/package.json +4 -4
- package/node_modules/ini/package.json +5 -5
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/json-parse-even-better-errors/lib/index.js +1 -3
- package/node_modules/json-parse-even-better-errors/package.json +17 -13
- package/node_modules/make-fetch-happen/package.json +11 -11
- package/node_modules/minipass-fetch/package.json +4 -4
- package/node_modules/node-gyp/.release-please-manifest.json +1 -1
- package/node_modules/node-gyp/CHANGELOG.md +0 -102
- package/node_modules/node-gyp/README.md +2 -3
- package/node_modules/node-gyp/eslint.config.js +1 -4
- package/node_modules/node-gyp/gyp/.release-please-manifest.json +1 -1
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +19 -14
- package/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +2 -7
- package/node_modules/node-gyp/gyp/pyproject.toml +1 -1
- package/node_modules/node-gyp/lib/build.js +6 -18
- package/node_modules/node-gyp/lib/create-config-gypi.js +0 -5
- package/node_modules/node-gyp/lib/node-gyp.js +2 -9
- package/node_modules/node-gyp/lib/rebuild.js +3 -3
- package/node_modules/node-gyp/package.json +9 -11
- package/node_modules/nopt/README.md +4 -2
- package/node_modules/nopt/lib/debug.js +5 -0
- package/node_modules/nopt/lib/nopt-lib.js +43 -7
- package/node_modules/nopt/lib/nopt.js +4 -2
- package/node_modules/nopt/lib/type-defs.js +13 -8
- package/node_modules/nopt/package.json +17 -15
- package/node_modules/npm-bundled/package.json +6 -6
- package/node_modules/npm-install-checks/package.json +5 -5
- package/node_modules/npm-normalize-package-bin/package.json +16 -13
- package/node_modules/npm-package-arg/package.json +7 -7
- package/node_modules/npm-packlist/README.md +30 -45
- package/node_modules/npm-packlist/lib/index.js +47 -115
- package/node_modules/npm-packlist/package.json +8 -10
- package/node_modules/npm-pick-manifest/package.json +19 -15
- package/node_modules/npm-registry-fetch/lib/errors.js +3 -8
- package/node_modules/npm-registry-fetch/package.json +12 -12
- package/node_modules/pacote/lib/dir.js +5 -60
- package/node_modules/pacote/lib/fetcher.js +0 -4
- package/node_modules/pacote/lib/git.js +3 -11
- package/node_modules/pacote/lib/util/add-git-sha.js +1 -1
- package/node_modules/pacote/package.json +18 -19
- package/node_modules/parse-conflict-json/package.json +6 -6
- package/node_modules/proc-log/package.json +4 -4
- package/node_modules/read-cmd-shim/lib/index.js +1 -1
- package/node_modules/read-cmd-shim/package.json +18 -14
- package/node_modules/sigstore/README.md +1 -1
- package/node_modules/sigstore/package.json +10 -10
- package/node_modules/socks-proxy-agent/dist/index.d.ts +3 -1
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -1
- package/node_modules/socks-proxy-agent/dist/index.js +43 -17
- package/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
- package/node_modules/socks-proxy-agent/package.json +15 -15
- package/node_modules/ssri/package.json +4 -4
- package/node_modules/tuf-js/dist/config.d.ts +2 -2
- package/node_modules/tuf-js/dist/fetcher.d.ts +4 -4
- package/node_modules/tuf-js/dist/fetcher.js +16 -55
- package/node_modules/tuf-js/dist/updater.js +2 -2
- package/node_modules/tuf-js/package.json +8 -8
- package/node_modules/undici/README.md +72 -405
- package/node_modules/undici/docs/docs/api/Agent.md +41 -252
- package/node_modules/undici/docs/docs/api/BalancedPool.md +48 -246
- package/node_modules/undici/docs/docs/api/CacheStorage.md +13 -171
- package/node_modules/undici/docs/docs/api/Client.md +139 -395
- package/node_modules/undici/docs/docs/api/Connector.md +35 -118
- package/node_modules/undici/docs/docs/api/ContentType.md +25 -65
- package/node_modules/undici/docs/docs/api/Cookies.md +47 -125
- package/node_modules/undici/docs/docs/api/Debug.md +31 -47
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +97 -409
- package/node_modules/undici/docs/docs/api/DispatchInterceptor.md +60 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1011 -500
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +96 -105
- package/node_modules/undici/docs/docs/api/Errors.md +28 -528
- package/node_modules/undici/docs/docs/api/EventSource.md +13 -326
- package/node_modules/undici/docs/docs/api/Fetch.md +24 -693
- package/node_modules/undici/docs/docs/api/MockAgent.md +264 -346
- package/node_modules/undici/docs/docs/api/MockClient.md +31 -153
- package/node_modules/undici/docs/docs/api/MockErrors.md +5 -56
- package/node_modules/undici/docs/docs/api/MockPool.md +253 -324
- package/node_modules/undici/docs/docs/api/Pool.md +41 -235
- package/node_modules/undici/docs/docs/api/PoolStats.md +13 -119
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +81 -198
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +58 -238
- package/node_modules/undici/docs/docs/api/RetryAgent.md +28 -119
- package/node_modules/undici/docs/docs/api/RetryHandler.md +78 -161
- package/node_modules/undici/docs/docs/api/Util.md +11 -68
- package/node_modules/undici/docs/docs/api/WebSocket.md +24 -509
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +33 -101
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -2
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +2 -58
- package/node_modules/undici/docs/docs/best-practices/proxy.md +1 -3
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -45
- package/node_modules/undici/index-fetch.js +4 -34
- package/node_modules/undici/index.d.ts +1 -1
- package/node_modules/undici/index.js +20 -87
- package/node_modules/undici/lib/api/abort-signal.js +0 -2
- package/node_modules/undici/lib/api/api-connect.js +11 -15
- package/node_modules/undici/lib/api/api-pipeline.js +19 -33
- package/node_modules/undici/lib/api/api-request.js +59 -89
- package/node_modules/undici/lib/api/api-stream.js +64 -114
- package/node_modules/undici/lib/api/api-upgrade.js +13 -26
- package/node_modules/undici/lib/api/readable.js +87 -317
- package/node_modules/undici/lib/api/util.js +93 -0
- package/node_modules/undici/lib/core/connect.js +125 -77
- package/node_modules/undici/lib/core/constants.js +9 -11
- package/node_modules/undici/lib/core/diagnostics.js +129 -154
- package/node_modules/undici/lib/core/errors.js +50 -122
- package/node_modules/undici/lib/core/request.js +87 -172
- package/node_modules/undici/lib/core/symbols.js +2 -14
- package/node_modules/undici/lib/core/tree.js +2 -10
- package/node_modules/undici/lib/core/util.js +190 -481
- package/node_modules/undici/lib/dispatcher/agent.js +35 -83
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +38 -46
- package/node_modules/undici/lib/dispatcher/client-h1.js +199 -492
- package/node_modules/undici/lib/dispatcher/client-h2.js +380 -1409
- package/node_modules/undici/lib/dispatcher/client.js +130 -253
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +52 -50
- package/node_modules/undici/lib/dispatcher/dispatcher.js +24 -17
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +45 -75
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +50 -68
- package/node_modules/undici/lib/dispatcher/pool-base.js +54 -153
- package/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
- package/node_modules/undici/lib/dispatcher/pool.js +16 -135
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +41 -175
- package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
- package/node_modules/undici/lib/global.js +9 -59
- package/node_modules/undici/lib/handler/decorator-handler.js +15 -43
- package/node_modules/undici/lib/handler/redirect-handler.js +116 -127
- package/node_modules/undici/lib/handler/retry-handler.js +182 -398
- package/node_modules/undici/lib/interceptor/dns.js +47 -254
- package/node_modules/undici/lib/interceptor/dump.js +56 -32
- package/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
- package/node_modules/undici/lib/interceptor/redirect.js +14 -11
- package/node_modules/undici/lib/interceptor/response-error.js +22 -31
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/llhttp/constants.js +193 -446
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -11
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -11
- package/node_modules/undici/lib/llhttp/utils.js +12 -9
- package/node_modules/undici/lib/mock/mock-agent.js +22 -106
- package/node_modules/undici/lib/mock/mock-client.js +4 -13
- package/node_modules/undici/lib/mock/mock-errors.js +2 -3
- package/node_modules/undici/lib/mock/mock-interceptor.js +13 -33
- package/node_modules/undici/lib/mock/mock-pool.js +4 -13
- package/node_modules/undici/lib/mock/mock-symbols.js +1 -10
- package/node_modules/undici/lib/mock/mock-utils.js +51 -404
- package/node_modules/undici/lib/mock/pluralizer.js +29 -0
- package/node_modules/undici/lib/util/timers.js +9 -11
- package/node_modules/undici/lib/web/cache/cache.js +51 -63
- package/node_modules/undici/lib/web/cache/cachestorage.js +7 -13
- package/node_modules/undici/lib/web/cache/symbols.js +5 -0
- package/node_modules/undici/lib/web/cookies/index.js +18 -45
- package/node_modules/undici/lib/web/cookies/parse.js +149 -157
- package/node_modules/undici/lib/web/cookies/util.js +2 -4
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +9 -37
- package/node_modules/undici/lib/web/eventsource/eventsource.js +64 -108
- package/node_modules/undici/lib/web/eventsource/util.js +5 -28
- package/node_modules/undici/lib/web/fetch/body.js +148 -173
- package/node_modules/undici/lib/web/fetch/constants.js +6 -13
- package/node_modules/undici/lib/web/fetch/data-url.js +167 -19
- package/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
- package/node_modules/undici/lib/web/fetch/file.js +126 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +117 -229
- package/node_modules/undici/lib/web/fetch/formdata.js +65 -85
- package/node_modules/undici/lib/web/fetch/headers.js +108 -143
- package/node_modules/undici/lib/web/fetch/index.js +446 -627
- package/node_modules/undici/lib/web/fetch/request.js +115 -217
- package/node_modules/undici/lib/web/fetch/response.js +82 -110
- package/node_modules/undici/lib/web/fetch/symbols.js +9 -0
- package/node_modules/undici/lib/web/fetch/util.js +393 -291
- package/node_modules/undici/lib/web/fetch/webidl.js +695 -0
- package/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
- package/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
- package/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
- package/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
- package/node_modules/undici/lib/web/fileapi/util.js +391 -0
- package/node_modules/undici/lib/web/websocket/connection.js +160 -139
- package/node_modules/undici/lib/web/websocket/constants.js +10 -70
- package/node_modules/undici/lib/web/websocket/events.js +30 -49
- package/node_modules/undici/lib/web/websocket/frame.js +20 -51
- package/node_modules/undici/lib/web/websocket/receiver.js +87 -83
- package/node_modules/undici/lib/web/websocket/sender.js +13 -18
- package/node_modules/undici/lib/web/websocket/symbols.js +12 -0
- package/node_modules/undici/lib/web/websocket/util.js +90 -115
- package/node_modules/undici/lib/web/websocket/websocket.js +171 -359
- package/node_modules/undici/package.json +57 -49
- package/node_modules/undici/scripts/strip-comments.js +1 -3
- package/node_modules/undici/types/agent.d.ts +13 -12
- package/node_modules/undici/types/api.d.ts +26 -26
- package/node_modules/undici/types/balanced-pool.d.ts +12 -13
- package/node_modules/undici/types/client.d.ts +39 -98
- package/node_modules/undici/types/connector.d.ts +2 -5
- package/node_modules/undici/types/cookies.d.ts +1 -3
- package/node_modules/undici/types/diagnostics-channel.d.ts +11 -20
- package/node_modules/undici/types/dispatcher.d.ts +139 -136
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici/types/errors.d.ts +54 -86
- package/node_modules/undici/types/eventsource.d.ts +4 -9
- package/node_modules/undici/types/fetch.d.ts +25 -51
- package/node_modules/undici/types/file.d.ts +39 -0
- package/node_modules/undici/types/filereader.d.ts +54 -0
- package/node_modules/undici/types/formdata.d.ts +7 -7
- package/node_modules/undici/types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici/types/global-origin.d.ts +5 -5
- package/node_modules/undici/types/handlers.d.ts +9 -10
- package/node_modules/undici/types/header.d.ts +1 -162
- package/node_modules/undici/types/index.d.ts +47 -69
- package/node_modules/undici/types/interceptors.d.ts +12 -62
- package/node_modules/undici/types/mock-agent.d.ts +27 -46
- package/node_modules/undici/types/mock-client.d.ts +4 -6
- package/node_modules/undici/types/mock-errors.d.ts +3 -3
- package/node_modules/undici/types/mock-interceptor.d.ts +21 -26
- package/node_modules/undici/types/mock-pool.d.ts +4 -6
- package/node_modules/undici/types/patch.d.ts +4 -0
- package/node_modules/undici/types/pool-stats.d.ts +8 -8
- package/node_modules/undici/types/pool.d.ts +14 -14
- package/node_modules/undici/types/proxy-agent.d.ts +6 -13
- package/node_modules/undici/types/readable.d.ts +16 -19
- package/node_modules/undici/types/retry-agent.d.ts +1 -1
- package/node_modules/undici/types/retry-handler.d.ts +9 -18
- package/node_modules/undici/types/util.d.ts +3 -3
- package/node_modules/undici/types/webidl.d.ts +32 -156
- package/node_modules/undici/types/websocket.d.ts +10 -48
- package/node_modules/validate-npm-package-name/package.json +4 -4
- package/node_modules/which/package.json +4 -4
- package/node_modules/write-file-atomic/package.json +4 -4
- package/package.json +58 -60
- package/node_modules/@npmcli/arborist/lib/npm-extension.js +0 -237
- package/node_modules/@npmcli/arborist/lib/package-extensions.js +0 -236
- package/node_modules/@npmcli/arborist/lib/patch.js +0 -111
- package/node_modules/@npmcli/arborist/lib/patched-dependencies.js +0 -168
- package/node_modules/cacache/lib/util/cache-dir.js +0 -29
- package/node_modules/diff/CONTRIBUTING.md +0 -28
- package/node_modules/diff/LICENSE +0 -29
- package/node_modules/diff/README.md +0 -388
- package/node_modules/diff/dist/diff.js +0 -1782
- package/node_modules/diff/dist/diff.min.js +0 -1
- package/node_modules/diff/eslint.config.mjs +0 -182
- package/node_modules/diff/libcjs/convert/dmp.d.ts +0 -8
- package/node_modules/diff/libcjs/convert/dmp.d.ts.map +0 -1
- package/node_modules/diff/libcjs/convert/dmp.js +0 -24
- package/node_modules/diff/libcjs/convert/xml.d.ts +0 -6
- package/node_modules/diff/libcjs/convert/xml.d.ts.map +0 -1
- package/node_modules/diff/libcjs/convert/xml.js +0 -34
- package/node_modules/diff/libcjs/diff/array.d.ts +0 -19
- package/node_modules/diff/libcjs/diff/array.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/array.js +0 -40
- package/node_modules/diff/libcjs/diff/base.d.ts +0 -20
- package/node_modules/diff/libcjs/diff/base.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/base.js +0 -265
- package/node_modules/diff/libcjs/diff/character.d.ts +0 -19
- package/node_modules/diff/libcjs/diff/character.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/character.js +0 -31
- package/node_modules/diff/libcjs/diff/css.d.ts +0 -18
- package/node_modules/diff/libcjs/diff/css.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/css.js +0 -34
- package/node_modules/diff/libcjs/diff/json.d.ts +0 -24
- package/node_modules/diff/libcjs/diff/json.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/json.js +0 -105
- package/node_modules/diff/libcjs/diff/line.d.ts +0 -24
- package/node_modules/diff/libcjs/diff/line.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/line.js +0 -89
- package/node_modules/diff/libcjs/diff/sentence.d.ts +0 -21
- package/node_modules/diff/libcjs/diff/sentence.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/sentence.js +0 -67
- package/node_modules/diff/libcjs/diff/word.d.ts +0 -35
- package/node_modules/diff/libcjs/diff/word.d.ts.map +0 -1
- package/node_modules/diff/libcjs/diff/word.js +0 -312
- package/node_modules/diff/libcjs/index.d.ts +0 -20
- package/node_modules/diff/libcjs/index.d.ts.map +0 -1
- package/node_modules/diff/libcjs/index.js +0 -64
- package/node_modules/diff/libcjs/package.json +0 -1
- package/node_modules/diff/libcjs/patch/apply.d.ts +0 -62
- package/node_modules/diff/libcjs/patch/apply.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/apply.js +0 -267
- package/node_modules/diff/libcjs/patch/create.d.ts +0 -122
- package/node_modules/diff/libcjs/patch/create.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/create.js +0 -251
- package/node_modules/diff/libcjs/patch/line-endings.d.ts +0 -17
- package/node_modules/diff/libcjs/patch/line-endings.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/line-endings.js +0 -61
- package/node_modules/diff/libcjs/patch/parse.d.ts +0 -8
- package/node_modules/diff/libcjs/patch/parse.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/parse.js +0 -150
- package/node_modules/diff/libcjs/patch/reverse.d.ts +0 -9
- package/node_modules/diff/libcjs/patch/reverse.d.ts.map +0 -1
- package/node_modules/diff/libcjs/patch/reverse.js +0 -37
- package/node_modules/diff/libcjs/types.d.ts +0 -213
- package/node_modules/diff/libcjs/types.d.ts.map +0 -1
- package/node_modules/diff/libcjs/types.js +0 -2
- package/node_modules/diff/libcjs/util/array.d.ts +0 -3
- package/node_modules/diff/libcjs/util/array.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/array.js +0 -21
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts +0 -2
- package/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/distance-iterator.js +0 -40
- package/node_modules/diff/libcjs/util/params.d.ts +0 -4
- package/node_modules/diff/libcjs/util/params.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/params.js +0 -17
- package/node_modules/diff/libcjs/util/string.d.ts +0 -30
- package/node_modules/diff/libcjs/util/string.d.ts.map +0 -1
- package/node_modules/diff/libcjs/util/string.js +0 -200
- package/node_modules/diff/libesm/convert/dmp.d.ts +0 -8
- package/node_modules/diff/libesm/convert/dmp.d.ts.map +0 -1
- package/node_modules/diff/libesm/convert/dmp.js +0 -21
- package/node_modules/diff/libesm/convert/xml.d.ts +0 -6
- package/node_modules/diff/libesm/convert/xml.d.ts.map +0 -1
- package/node_modules/diff/libesm/convert/xml.js +0 -31
- package/node_modules/diff/libesm/diff/array.d.ts +0 -19
- package/node_modules/diff/libesm/diff/array.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/array.js +0 -16
- package/node_modules/diff/libesm/diff/base.d.ts +0 -20
- package/node_modules/diff/libesm/diff/base.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/base.js +0 -253
- package/node_modules/diff/libesm/diff/character.d.ts +0 -19
- package/node_modules/diff/libesm/diff/character.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/character.js +0 -7
- package/node_modules/diff/libesm/diff/css.d.ts +0 -18
- package/node_modules/diff/libesm/diff/css.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/css.js +0 -10
- package/node_modules/diff/libesm/diff/json.d.ts +0 -24
- package/node_modules/diff/libesm/diff/json.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/json.js +0 -78
- package/node_modules/diff/libesm/diff/line.d.ts +0 -24
- package/node_modules/diff/libesm/diff/line.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/line.js +0 -65
- package/node_modules/diff/libesm/diff/sentence.d.ts +0 -21
- package/node_modules/diff/libesm/diff/sentence.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/sentence.js +0 -43
- package/node_modules/diff/libesm/diff/word.d.ts +0 -35
- package/node_modules/diff/libesm/diff/word.d.ts.map +0 -1
- package/node_modules/diff/libesm/diff/word.js +0 -281
- package/node_modules/diff/libesm/index.d.ts +0 -20
- package/node_modules/diff/libesm/index.d.ts.map +0 -1
- package/node_modules/diff/libesm/index.js +0 -30
- package/node_modules/diff/libesm/package.json +0 -1
- package/node_modules/diff/libesm/patch/apply.d.ts +0 -62
- package/node_modules/diff/libesm/patch/apply.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/apply.js +0 -257
- package/node_modules/diff/libesm/patch/create.d.ts +0 -122
- package/node_modules/diff/libesm/patch/create.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/create.js +0 -228
- package/node_modules/diff/libesm/patch/line-endings.d.ts +0 -17
- package/node_modules/diff/libesm/patch/line-endings.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/line-endings.js +0 -44
- package/node_modules/diff/libesm/patch/parse.d.ts +0 -8
- package/node_modules/diff/libesm/patch/parse.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/parse.js +0 -147
- package/node_modules/diff/libesm/patch/reverse.d.ts +0 -9
- package/node_modules/diff/libesm/patch/reverse.d.ts.map +0 -1
- package/node_modules/diff/libesm/patch/reverse.js +0 -23
- package/node_modules/diff/libesm/types.d.ts +0 -213
- package/node_modules/diff/libesm/types.d.ts.map +0 -1
- package/node_modules/diff/libesm/types.js +0 -1
- package/node_modules/diff/libesm/util/array.d.ts +0 -3
- package/node_modules/diff/libesm/util/array.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/array.js +0 -17
- package/node_modules/diff/libesm/util/distance-iterator.d.ts +0 -2
- package/node_modules/diff/libesm/util/distance-iterator.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/distance-iterator.js +0 -37
- package/node_modules/diff/libesm/util/params.d.ts +0 -4
- package/node_modules/diff/libesm/util/params.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/params.js +0 -14
- package/node_modules/diff/libesm/util/string.d.ts +0 -30
- package/node_modules/diff/libesm/util/string.d.ts.map +0 -1
- package/node_modules/diff/libesm/util/string.js +0 -184
- package/node_modules/diff/package.json +0 -130
- package/node_modules/diff/release-notes.md +0 -432
- package/node_modules/node-gyp/commitlint.config.mjs +0 -3
- package/node_modules/node-gyp/gyp/commitlint.config.js +0 -6
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake_test.py +0 -105
- package/node_modules/node-gyp/zizmor.yml +0 -5
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts +0 -14
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts.map +0 -1
- package/node_modules/proxy-agent-negotiate/dist/index.js +0 -35
- package/node_modules/proxy-agent-negotiate/dist/index.js.map +0 -1
- package/node_modules/proxy-agent-negotiate/package.json +0 -47
- package/node_modules/undici/docs/docs/api/CacheStore.md +0 -360
- package/node_modules/undici/docs/docs/api/ClientStats.md +0 -93
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -121
- package/node_modules/undici/docs/docs/api/H2CClient.md +0 -385
- package/node_modules/undici/docs/docs/api/Interceptors.md +0 -419
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -371
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -206
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -239
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -361
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -256
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
- package/node_modules/undici/docs/docs/getting-started.md +0 -281
- package/node_modules/undici/docs/docs/site.json +0 -125
- package/node_modules/undici/docs/docs/type-map.json +0 -79
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -110
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-client.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/core/socks5-utils.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/encoding/index.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/constants.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/llhttp/utils.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/mock/snapshot-utils.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/date.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/util/stats.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/Readme.md +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/lib/web/subresource-integrity/subresource-integrity.js +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/cache-interceptor.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/client-stats.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/mock-call-history.d.ts +0 -0
- /package/node_modules/{undici → @mytools/fst-platform/node_modules/undici}/types/utility.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/util/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQtE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK1F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS1F;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAkCD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,CAW3E;AAgBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAuB7E;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAQ5E;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GACzB,CAAC,MAAM,EAAE,MAAM,CAAC,CAelB"}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.longestCommonPrefix = longestCommonPrefix;
|
|
4
|
-
exports.longestCommonSuffix = longestCommonSuffix;
|
|
5
|
-
exports.replacePrefix = replacePrefix;
|
|
6
|
-
exports.replaceSuffix = replaceSuffix;
|
|
7
|
-
exports.removePrefix = removePrefix;
|
|
8
|
-
exports.removeSuffix = removeSuffix;
|
|
9
|
-
exports.maximumOverlap = maximumOverlap;
|
|
10
|
-
exports.hasOnlyWinLineEndings = hasOnlyWinLineEndings;
|
|
11
|
-
exports.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings;
|
|
12
|
-
exports.segment = segment;
|
|
13
|
-
exports.trailingWs = trailingWs;
|
|
14
|
-
exports.leadingWs = leadingWs;
|
|
15
|
-
exports.leadingAndTrailingWs = leadingAndTrailingWs;
|
|
16
|
-
function longestCommonPrefix(str1, str2) {
|
|
17
|
-
var i;
|
|
18
|
-
for (i = 0; i < str1.length && i < str2.length; i++) {
|
|
19
|
-
if (str1[i] != str2[i]) {
|
|
20
|
-
return str1.slice(0, i);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return str1.slice(0, i);
|
|
24
|
-
}
|
|
25
|
-
function longestCommonSuffix(str1, str2) {
|
|
26
|
-
var i;
|
|
27
|
-
// Unlike longestCommonPrefix, we need a special case to handle all scenarios
|
|
28
|
-
// where we return the empty string since str1.slice(-0) will return the
|
|
29
|
-
// entire string.
|
|
30
|
-
if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) {
|
|
31
|
-
return '';
|
|
32
|
-
}
|
|
33
|
-
for (i = 0; i < str1.length && i < str2.length; i++) {
|
|
34
|
-
if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) {
|
|
35
|
-
return str1.slice(-i);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return str1.slice(-i);
|
|
39
|
-
}
|
|
40
|
-
function replacePrefix(string, oldPrefix, newPrefix) {
|
|
41
|
-
if (string.slice(0, oldPrefix.length) != oldPrefix) {
|
|
42
|
-
throw Error("string ".concat(JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug"));
|
|
43
|
-
}
|
|
44
|
-
return newPrefix + string.slice(oldPrefix.length);
|
|
45
|
-
}
|
|
46
|
-
function replaceSuffix(string, oldSuffix, newSuffix) {
|
|
47
|
-
if (!oldSuffix) {
|
|
48
|
-
return string + newSuffix;
|
|
49
|
-
}
|
|
50
|
-
if (string.slice(-oldSuffix.length) != oldSuffix) {
|
|
51
|
-
throw Error("string ".concat(JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug"));
|
|
52
|
-
}
|
|
53
|
-
return string.slice(0, -oldSuffix.length) + newSuffix;
|
|
54
|
-
}
|
|
55
|
-
function removePrefix(string, oldPrefix) {
|
|
56
|
-
return replacePrefix(string, oldPrefix, '');
|
|
57
|
-
}
|
|
58
|
-
function removeSuffix(string, oldSuffix) {
|
|
59
|
-
return replaceSuffix(string, oldSuffix, '');
|
|
60
|
-
}
|
|
61
|
-
function maximumOverlap(string1, string2) {
|
|
62
|
-
return string2.slice(0, overlapCount(string1, string2));
|
|
63
|
-
}
|
|
64
|
-
// Nicked from https://stackoverflow.com/a/60422853/1709587
|
|
65
|
-
function overlapCount(a, b) {
|
|
66
|
-
// Deal with cases where the strings differ in length
|
|
67
|
-
var startA = 0;
|
|
68
|
-
if (a.length > b.length) {
|
|
69
|
-
startA = a.length - b.length;
|
|
70
|
-
}
|
|
71
|
-
var endB = b.length;
|
|
72
|
-
if (a.length < b.length) {
|
|
73
|
-
endB = a.length;
|
|
74
|
-
}
|
|
75
|
-
// Create a back-reference for each index
|
|
76
|
-
// that should be followed in case of a mismatch.
|
|
77
|
-
// We only need B to make these references:
|
|
78
|
-
var map = Array(endB);
|
|
79
|
-
var k = 0; // Index that lags behind j
|
|
80
|
-
map[0] = 0;
|
|
81
|
-
for (var j = 1; j < endB; j++) {
|
|
82
|
-
if (b[j] == b[k]) {
|
|
83
|
-
map[j] = map[k]; // skip over the same character (optional optimisation)
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
map[j] = k;
|
|
87
|
-
}
|
|
88
|
-
while (k > 0 && b[j] != b[k]) {
|
|
89
|
-
k = map[k];
|
|
90
|
-
}
|
|
91
|
-
if (b[j] == b[k]) {
|
|
92
|
-
k++;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// Phase 2: use these references while iterating over A
|
|
96
|
-
k = 0;
|
|
97
|
-
for (var i = startA; i < a.length; i++) {
|
|
98
|
-
while (k > 0 && a[i] != b[k]) {
|
|
99
|
-
k = map[k];
|
|
100
|
-
}
|
|
101
|
-
if (a[i] == b[k]) {
|
|
102
|
-
k++;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return k;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Returns true if the string consistently uses Windows line endings.
|
|
109
|
-
*/
|
|
110
|
-
function hasOnlyWinLineEndings(string) {
|
|
111
|
-
return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Returns true if the string consistently uses Unix line endings.
|
|
115
|
-
*/
|
|
116
|
-
function hasOnlyUnixLineEndings(string) {
|
|
117
|
-
return !string.includes('\r\n') && string.includes('\n');
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Split a string into segments using a word segmenter, merging consecutive
|
|
121
|
-
* segments if they are both whitespace segments. Whitespace segments can
|
|
122
|
-
* appear adjacent to one another for two reasons:
|
|
123
|
-
* - newlines always get their own segment
|
|
124
|
-
* - where a diacritic is attached to a whitespace character in the text, the
|
|
125
|
-
* segment ends after the diacritic, so e.g. " \u0300 " becomes two segments.
|
|
126
|
-
* This function therefore runs the segmenter's .segment() method and then
|
|
127
|
-
* merges consecutive segments of whitespace into a single part.
|
|
128
|
-
*/
|
|
129
|
-
function segment(string, segmenter) {
|
|
130
|
-
var parts = [];
|
|
131
|
-
for (var _i = 0, _a = Array.from(segmenter.segment(string)); _i < _a.length; _i++) {
|
|
132
|
-
var segmentObj = _a[_i];
|
|
133
|
-
var segment_1 = segmentObj.segment;
|
|
134
|
-
if (parts.length && (/\s/).test(parts[parts.length - 1]) && (/\s/).test(segment_1)) {
|
|
135
|
-
parts[parts.length - 1] += segment_1;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
parts.push(segment_1);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return parts;
|
|
142
|
-
}
|
|
143
|
-
// The functions below take a `segmenter` argument so that, when called from
|
|
144
|
-
// diffWords when it is using a segmenter, they can use a notion of what
|
|
145
|
-
// constitutes "whitespace" that is consistent with the segmenter.
|
|
146
|
-
//
|
|
147
|
-
// USUALLY this will be identical to the result of the non-segmenter-based
|
|
148
|
-
// logic, but it differs in at least one case: when whitespace characters are
|
|
149
|
-
// modified by diacritics. A word segmenter considers these diacritics to be
|
|
150
|
-
// part of the whitespace, whereas our non-segmenter-based logic does not.
|
|
151
|
-
//
|
|
152
|
-
// Because the segmenter-based approach necessarily requires segmenting the
|
|
153
|
-
// entire string, we offer a leadingAndTrailingWs function to allow getting the
|
|
154
|
-
// whitespace prefix AND whitespace suffix with a single call to the segmenter,
|
|
155
|
-
// for efficiency's sake.
|
|
156
|
-
function trailingWs(string, segmenter) {
|
|
157
|
-
if (segmenter) {
|
|
158
|
-
return leadingAndTrailingWs(string, segmenter)[1];
|
|
159
|
-
}
|
|
160
|
-
// Yes, this looks overcomplicated and dumb - why not replace the whole function with
|
|
161
|
-
// return string.match(/\s*$/)[0]
|
|
162
|
-
// you ask? Because:
|
|
163
|
-
// 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing
|
|
164
|
-
// this would cause this function to take O(n²) time in the worst case (specifically when
|
|
165
|
-
// there is a massive run of NON-TRAILING whitespace in `string`), and
|
|
166
|
-
// 2. the fix proposed in the same blog post, of using a negative lookbehind, is incompatible
|
|
167
|
-
// with old Safari versions that we'd like to not break if possible (see
|
|
168
|
-
// https://github.com/kpdecker/jsdiff/pull/550)
|
|
169
|
-
// It feels absurd to do this with an explicit loop instead of a regex, but I really can't see a
|
|
170
|
-
// better way that doesn't result in broken behaviour.
|
|
171
|
-
var i;
|
|
172
|
-
for (i = string.length - 1; i >= 0; i--) {
|
|
173
|
-
if (!string[i].match(/\s/)) {
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return string.substring(i + 1);
|
|
178
|
-
}
|
|
179
|
-
function leadingWs(string, segmenter) {
|
|
180
|
-
if (segmenter) {
|
|
181
|
-
return leadingAndTrailingWs(string, segmenter)[0];
|
|
182
|
-
}
|
|
183
|
-
// Thankfully the annoying considerations described in trailingWs don't apply here:
|
|
184
|
-
var match = string.match(/^\s*/);
|
|
185
|
-
return match ? match[0] : '';
|
|
186
|
-
}
|
|
187
|
-
function leadingAndTrailingWs(string, segmenter) {
|
|
188
|
-
if (!segmenter) {
|
|
189
|
-
return [leadingWs(string), trailingWs(string)];
|
|
190
|
-
}
|
|
191
|
-
if (segmenter.resolvedOptions().granularity != 'word') {
|
|
192
|
-
throw new Error('The segmenter passed must have a granularity of "word"');
|
|
193
|
-
}
|
|
194
|
-
var segments = segment(string, segmenter);
|
|
195
|
-
var firstSeg = segments[0];
|
|
196
|
-
var lastSeg = segments[segments.length - 1];
|
|
197
|
-
var head = (/\s/).test(firstSeg) ? firstSeg : '';
|
|
198
|
-
var tail = (/\s/).test(lastSeg) ? lastSeg : '';
|
|
199
|
-
return [head, tail];
|
|
200
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ChangeObject } from '../types.js';
|
|
2
|
-
type DmpOperation = 1 | 0 | -1;
|
|
3
|
-
/**
|
|
4
|
-
* converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library
|
|
5
|
-
*/
|
|
6
|
-
export declare function convertChangesToDMP<ValueT>(changes: ChangeObject<ValueT>[]): [DmpOperation, ValueT][];
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=dmp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dmp.d.ts","sourceRoot":"","sources":["../../src/convert/dmp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/B;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAiBrG"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library
|
|
3
|
-
*/
|
|
4
|
-
export function convertChangesToDMP(changes) {
|
|
5
|
-
const ret = [];
|
|
6
|
-
let change, operation;
|
|
7
|
-
for (let i = 0; i < changes.length; i++) {
|
|
8
|
-
change = changes[i];
|
|
9
|
-
if (change.added) {
|
|
10
|
-
operation = 1;
|
|
11
|
-
}
|
|
12
|
-
else if (change.removed) {
|
|
13
|
-
operation = -1;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
operation = 0;
|
|
17
|
-
}
|
|
18
|
-
ret.push([operation, change.value]);
|
|
19
|
-
}
|
|
20
|
-
return ret;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../src/convert/xml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAmB3E"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* converts a list of change objects to a serialized XML format
|
|
3
|
-
*/
|
|
4
|
-
export function convertChangesToXML(changes) {
|
|
5
|
-
const ret = [];
|
|
6
|
-
for (let i = 0; i < changes.length; i++) {
|
|
7
|
-
const change = changes[i];
|
|
8
|
-
if (change.added) {
|
|
9
|
-
ret.push('<ins>');
|
|
10
|
-
}
|
|
11
|
-
else if (change.removed) {
|
|
12
|
-
ret.push('<del>');
|
|
13
|
-
}
|
|
14
|
-
ret.push(escapeHTML(change.value));
|
|
15
|
-
if (change.added) {
|
|
16
|
-
ret.push('</ins>');
|
|
17
|
-
}
|
|
18
|
-
else if (change.removed) {
|
|
19
|
-
ret.push('</del>');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return ret.join('');
|
|
23
|
-
}
|
|
24
|
-
function escapeHTML(s) {
|
|
25
|
-
let n = s;
|
|
26
|
-
n = n.replace(/&/g, '&');
|
|
27
|
-
n = n.replace(/</g, '<');
|
|
28
|
-
n = n.replace(/>/g, '>');
|
|
29
|
-
n = n.replace(/"/g, '"');
|
|
30
|
-
return n;
|
|
31
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
import type { ChangeObject, DiffArraysOptionsNonabortable, CallbackOptionNonabortable, DiffArraysOptionsAbortable, DiffCallbackNonabortable, CallbackOptionAbortable } from '../types.js';
|
|
3
|
-
declare class ArrayDiff<T> extends Diff<T, Array<T>> {
|
|
4
|
-
tokenize(value: Array<T>): T[];
|
|
5
|
-
join(value: Array<T>): T[];
|
|
6
|
-
removeEmpty(value: Array<T>): T[];
|
|
7
|
-
}
|
|
8
|
-
export declare const arrayDiff: ArrayDiff<unknown>;
|
|
9
|
-
/**
|
|
10
|
-
* diffs two arrays of tokens, comparing each item for strict equality (===).
|
|
11
|
-
* @returns a list of change objects.
|
|
12
|
-
*/
|
|
13
|
-
export declare function diffArrays<T>(oldArr: T[], newArr: T[], options: DiffCallbackNonabortable<T[]>): undefined;
|
|
14
|
-
export declare function diffArrays<T>(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable<T> & CallbackOptionAbortable<T[]>): undefined;
|
|
15
|
-
export declare function diffArrays<T>(oldArr: T[], newArr: T[], options: DiffArraysOptionsNonabortable<T> & CallbackOptionNonabortable<T[]>): undefined;
|
|
16
|
-
export declare function diffArrays<T>(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable<T>): ChangeObject<T[]>[] | undefined;
|
|
17
|
-
export declare function diffArrays<T>(oldArr: T[], newArr: T[], options?: DiffArraysOptionsNonabortable<T>): ChangeObject<T[]>[];
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=array.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/diff/array.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAC,YAAY,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAExL,cAAM,SAAS,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIxB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIpB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AAED,eAAO,MAAM,SAAS,oBAAkB,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,GACrC,SAAS,CAAC;AACb,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,GACpE,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,6BAA6B,CAAC,CAAC,CAAC,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,GAC1E,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACrC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;AAClC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,GACzC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
class ArrayDiff extends Diff {
|
|
3
|
-
tokenize(value) {
|
|
4
|
-
return value.slice();
|
|
5
|
-
}
|
|
6
|
-
join(value) {
|
|
7
|
-
return value;
|
|
8
|
-
}
|
|
9
|
-
removeEmpty(value) {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export const arrayDiff = new ArrayDiff();
|
|
14
|
-
export function diffArrays(oldArr, newArr, options) {
|
|
15
|
-
return arrayDiff.diff(oldArr, newArr, options);
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ChangeObject, AllDiffOptions, AbortableDiffOptions, DiffCallbackNonabortable, CallbackOptionAbortable, CallbackOptionNonabortable } from '../types.js';
|
|
2
|
-
export default class Diff<TokenT, ValueT extends Iterable<TokenT> = Iterable<TokenT>, InputValueT = ValueT> {
|
|
3
|
-
diff(oldStr: InputValueT, newStr: InputValueT, options: DiffCallbackNonabortable<ValueT>): undefined;
|
|
4
|
-
diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions & CallbackOptionAbortable<ValueT>): undefined;
|
|
5
|
-
diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & CallbackOptionNonabortable<ValueT>): undefined;
|
|
6
|
-
diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions): ChangeObject<ValueT>[] | undefined;
|
|
7
|
-
diff(oldStr: InputValueT, newStr: InputValueT, options?: AllDiffOptions): ChangeObject<ValueT>[];
|
|
8
|
-
private diffWithOptionsObj;
|
|
9
|
-
private addToPath;
|
|
10
|
-
private extractCommon;
|
|
11
|
-
equals(left: TokenT, right: TokenT, options: AllDiffOptions): boolean;
|
|
12
|
-
removeEmpty(array: TokenT[]): TokenT[];
|
|
13
|
-
castInput(value: InputValueT, options: AllDiffOptions): ValueT;
|
|
14
|
-
tokenize(value: ValueT, options: AllDiffOptions): TokenT[];
|
|
15
|
-
join(chars: TokenT[]): ValueT;
|
|
16
|
-
postProcess(changeObjects: ChangeObject<ValueT>[], options: AllDiffOptions): ChangeObject<ValueT>[];
|
|
17
|
-
get useLongestToken(): boolean;
|
|
18
|
-
private buildValues;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/diff/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAA4D,MAAM,aAAa,CAAC;AAuB9N,MAAM,CAAC,OAAO,OAAO,IAAI,CACvB,MAAM,EACN,MAAM,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EAClD,WAAW,GAAG,MAAM;IAEpB,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAC/E,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC3D,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAC7C,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS;IACrC,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,YAAY,CAAC,MAAM,CAAC,EAAE;IAwBzB,OAAO,CAAC,kBAAkB;IA0I1B,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,aAAa;IA8BrB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO;IASrE,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWtC,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM;IAK9D,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE;IAI1D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAQ7B,WAAW,CACT,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAErC,OAAO,EAAE,cAAc,GACtB,YAAY,CAAC,MAAM,CAAC,EAAE;IAIzB,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,WAAW;CAkDpB"}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
export default class Diff {
|
|
2
|
-
diff(oldStr, newStr,
|
|
3
|
-
// Type below is not accurate/complete - see above for full possibilities - but it compiles
|
|
4
|
-
options = {}) {
|
|
5
|
-
let callback;
|
|
6
|
-
if (typeof options === 'function') {
|
|
7
|
-
callback = options;
|
|
8
|
-
options = {};
|
|
9
|
-
}
|
|
10
|
-
else if ('callback' in options) {
|
|
11
|
-
callback = options.callback;
|
|
12
|
-
}
|
|
13
|
-
// Allow subclasses to massage the input prior to running
|
|
14
|
-
const oldString = this.castInput(oldStr, options);
|
|
15
|
-
const newString = this.castInput(newStr, options);
|
|
16
|
-
const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
|
|
17
|
-
const newTokens = this.removeEmpty(this.tokenize(newString, options));
|
|
18
|
-
return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
|
|
19
|
-
}
|
|
20
|
-
diffWithOptionsObj(oldTokens, newTokens, options, callback) {
|
|
21
|
-
var _a;
|
|
22
|
-
const done = (value) => {
|
|
23
|
-
value = this.postProcess(value, options);
|
|
24
|
-
if (callback) {
|
|
25
|
-
setTimeout(function () { callback(value); }, 0);
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
33
|
-
let editLength = 1;
|
|
34
|
-
let maxEditLength = newLen + oldLen;
|
|
35
|
-
if (options.maxEditLength != null) {
|
|
36
|
-
maxEditLength = Math.min(maxEditLength, options.maxEditLength);
|
|
37
|
-
}
|
|
38
|
-
const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
|
|
39
|
-
const abortAfterTimestamp = Date.now() + maxExecutionTime;
|
|
40
|
-
const bestPath = [{ oldPos: -1, lastComponent: undefined }];
|
|
41
|
-
// Seed editLength = 0, i.e. the content starts with the same values
|
|
42
|
-
let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
|
|
43
|
-
if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
|
44
|
-
// Identity per the equality and tokenizer
|
|
45
|
-
return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
|
|
46
|
-
}
|
|
47
|
-
// Once we hit the right edge of the edit graph on some diagonal k, we can
|
|
48
|
-
// definitely reach the end of the edit graph in no more than k edits, so
|
|
49
|
-
// there's no point in considering any moves to diagonal k+1 any more (from
|
|
50
|
-
// which we're guaranteed to need at least k+1 more edits).
|
|
51
|
-
// Similarly, once we've reached the bottom of the edit graph, there's no
|
|
52
|
-
// point considering moves to lower diagonals.
|
|
53
|
-
// We record this fact by setting minDiagonalToConsider and
|
|
54
|
-
// maxDiagonalToConsider to some finite value once we've hit the edge of
|
|
55
|
-
// the edit graph.
|
|
56
|
-
// This optimization is not faithful to the original algorithm presented in
|
|
57
|
-
// Myers's paper, which instead pointlessly extends D-paths off the end of
|
|
58
|
-
// the edit graph - see page 7 of Myers's paper which notes this point
|
|
59
|
-
// explicitly and illustrates it with a diagram. This has major performance
|
|
60
|
-
// implications for some common scenarios. For instance, to compute a diff
|
|
61
|
-
// where the new text simply appends d characters on the end of the
|
|
62
|
-
// original text of length n, the true Myers algorithm will take O(n+d^2)
|
|
63
|
-
// time while this optimization needs only O(n+d) time.
|
|
64
|
-
let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
|
|
65
|
-
// Main worker method. checks all permutations of a given edit length for acceptance.
|
|
66
|
-
const execEditLength = () => {
|
|
67
|
-
for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
|
|
68
|
-
let basePath;
|
|
69
|
-
const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
|
|
70
|
-
if (removePath) {
|
|
71
|
-
// No one else is going to attempt to use this value, clear it
|
|
72
|
-
// @ts-expect-error - perf optimisation. This type-violating value will never be read.
|
|
73
|
-
bestPath[diagonalPath - 1] = undefined;
|
|
74
|
-
}
|
|
75
|
-
let canAdd = false;
|
|
76
|
-
if (addPath) {
|
|
77
|
-
// what newPos will be after we do an insertion:
|
|
78
|
-
const addPathNewPos = addPath.oldPos - diagonalPath;
|
|
79
|
-
canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
|
|
80
|
-
}
|
|
81
|
-
const canRemove = removePath && removePath.oldPos + 1 < oldLen;
|
|
82
|
-
if (!canAdd && !canRemove) {
|
|
83
|
-
// If this path is a terminal then prune
|
|
84
|
-
// @ts-expect-error - perf optimisation. This type-violating value will never be read.
|
|
85
|
-
bestPath[diagonalPath] = undefined;
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
// Select the diagonal that we want to branch from. We select the prior
|
|
89
|
-
// path whose position in the old string is the farthest from the origin
|
|
90
|
-
// and does not pass the bounds of the diff graph
|
|
91
|
-
if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) {
|
|
92
|
-
basePath = this.addToPath(addPath, true, false, 0, options);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
basePath = this.addToPath(removePath, false, true, 1, options);
|
|
96
|
-
}
|
|
97
|
-
newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
|
|
98
|
-
if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
|
99
|
-
// If we have hit the end of both strings, then we are done
|
|
100
|
-
return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
bestPath[diagonalPath] = basePath;
|
|
104
|
-
if (basePath.oldPos + 1 >= oldLen) {
|
|
105
|
-
maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
|
|
106
|
-
}
|
|
107
|
-
if (newPos + 1 >= newLen) {
|
|
108
|
-
minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
editLength++;
|
|
113
|
-
};
|
|
114
|
-
// Performs the length of edit iteration. Is a bit fugly as this has to support the
|
|
115
|
-
// sync and async mode which is never fun. Loops over execEditLength until a value
|
|
116
|
-
// is produced, or until the edit length exceeds options.maxEditLength (if given),
|
|
117
|
-
// in which case it will return undefined.
|
|
118
|
-
if (callback) {
|
|
119
|
-
(function exec() {
|
|
120
|
-
setTimeout(function () {
|
|
121
|
-
if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
|
|
122
|
-
return callback(undefined);
|
|
123
|
-
}
|
|
124
|
-
if (!execEditLength()) {
|
|
125
|
-
exec();
|
|
126
|
-
}
|
|
127
|
-
}, 0);
|
|
128
|
-
}());
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
|
|
132
|
-
const ret = execEditLength();
|
|
133
|
-
if (ret) {
|
|
134
|
-
return ret;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
addToPath(path, added, removed, oldPosInc, options) {
|
|
140
|
-
const last = path.lastComponent;
|
|
141
|
-
if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
|
|
142
|
-
return {
|
|
143
|
-
oldPos: path.oldPos + oldPosInc,
|
|
144
|
-
lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent }
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
return {
|
|
149
|
-
oldPos: path.oldPos + oldPosInc,
|
|
150
|
-
lastComponent: { count: 1, added: added, removed: removed, previousComponent: last }
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
|
|
155
|
-
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
156
|
-
let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
|
|
157
|
-
while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
|
|
158
|
-
newPos++;
|
|
159
|
-
oldPos++;
|
|
160
|
-
commonCount++;
|
|
161
|
-
if (options.oneChangePerToken) {
|
|
162
|
-
basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (commonCount && !options.oneChangePerToken) {
|
|
166
|
-
basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };
|
|
167
|
-
}
|
|
168
|
-
basePath.oldPos = oldPos;
|
|
169
|
-
return newPos;
|
|
170
|
-
}
|
|
171
|
-
equals(left, right, options) {
|
|
172
|
-
if (options.comparator) {
|
|
173
|
-
return options.comparator(left, right);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
return left === right
|
|
177
|
-
|| (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase());
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
removeEmpty(array) {
|
|
181
|
-
const ret = [];
|
|
182
|
-
for (let i = 0; i < array.length; i++) {
|
|
183
|
-
if (array[i]) {
|
|
184
|
-
ret.push(array[i]);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return ret;
|
|
188
|
-
}
|
|
189
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
190
|
-
castInput(value, options) {
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
194
|
-
tokenize(value, options) {
|
|
195
|
-
return Array.from(value);
|
|
196
|
-
}
|
|
197
|
-
join(chars) {
|
|
198
|
-
// Assumes ValueT is string, which is the case for most subclasses.
|
|
199
|
-
// When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op)
|
|
200
|
-
// Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF
|
|
201
|
-
// assume tokens and values are strings, but not completely - is weird and janky.
|
|
202
|
-
return chars.join('');
|
|
203
|
-
}
|
|
204
|
-
postProcess(changeObjects,
|
|
205
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
206
|
-
options) {
|
|
207
|
-
return changeObjects;
|
|
208
|
-
}
|
|
209
|
-
get useLongestToken() {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
buildValues(lastComponent, newTokens, oldTokens) {
|
|
213
|
-
// First we convert our linked list of components in reverse order to an
|
|
214
|
-
// array in the right order:
|
|
215
|
-
const components = [];
|
|
216
|
-
let nextComponent;
|
|
217
|
-
while (lastComponent) {
|
|
218
|
-
components.push(lastComponent);
|
|
219
|
-
nextComponent = lastComponent.previousComponent;
|
|
220
|
-
delete lastComponent.previousComponent;
|
|
221
|
-
lastComponent = nextComponent;
|
|
222
|
-
}
|
|
223
|
-
components.reverse();
|
|
224
|
-
const componentLen = components.length;
|
|
225
|
-
let componentPos = 0, newPos = 0, oldPos = 0;
|
|
226
|
-
for (; componentPos < componentLen; componentPos++) {
|
|
227
|
-
const component = components[componentPos];
|
|
228
|
-
if (!component.removed) {
|
|
229
|
-
if (!component.added && this.useLongestToken) {
|
|
230
|
-
let value = newTokens.slice(newPos, newPos + component.count);
|
|
231
|
-
value = value.map(function (value, i) {
|
|
232
|
-
const oldValue = oldTokens[oldPos + i];
|
|
233
|
-
return oldValue.length > value.length ? oldValue : value;
|
|
234
|
-
});
|
|
235
|
-
component.value = this.join(value);
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
component.value = this.join(newTokens.slice(newPos, newPos + component.count));
|
|
239
|
-
}
|
|
240
|
-
newPos += component.count;
|
|
241
|
-
// Common case
|
|
242
|
-
if (!component.added) {
|
|
243
|
-
oldPos += component.count;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
|
|
248
|
-
oldPos += component.count;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return components;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable } from '../types.js';
|
|
3
|
-
declare class CharacterDiff extends Diff<string, string> {
|
|
4
|
-
}
|
|
5
|
-
export declare const characterDiff: CharacterDiff;
|
|
6
|
-
/**
|
|
7
|
-
* diffs two blocks of text, treating each character as a token.
|
|
8
|
-
*
|
|
9
|
-
* ("Characters" here means Unicode code points - the elements you get when you loop over a string with a `for ... of ...` loop.)
|
|
10
|
-
*
|
|
11
|
-
* @returns a list of change objects.
|
|
12
|
-
*/
|
|
13
|
-
export declare function diffChars(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined;
|
|
14
|
-
export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable & CallbackOptionAbortable<string>): undefined;
|
|
15
|
-
export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsNonabortable & CallbackOptionNonabortable<string>): undefined;
|
|
16
|
-
export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable): ChangeObject<string>[] | undefined;
|
|
17
|
-
export declare function diffChars(oldStr: string, newStr: string, options?: DiffCharsOptionsNonabortable): ChangeObject<string>[];
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=character.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/diff/character.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAEvL,cAAM,aAAc,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;CAAG;AAEnD,eAAO,MAAM,aAAa,eAAsB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Diff from './base.js';
|
|
2
|
-
import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable } from '../types.js';
|
|
3
|
-
declare class CssDiff extends Diff<string, string> {
|
|
4
|
-
tokenize(value: string): string[];
|
|
5
|
-
}
|
|
6
|
-
export declare const cssDiff: CssDiff;
|
|
7
|
-
/**
|
|
8
|
-
* diffs two blocks of text, comparing CSS tokens.
|
|
9
|
-
*
|
|
10
|
-
* @returns a list of change objects.
|
|
11
|
-
*/
|
|
12
|
-
export declare function diffCss(oldStr: string, newStr: string, options: DiffCallbackNonabortable<string>): undefined;
|
|
13
|
-
export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable & CallbackOptionAbortable<string>): undefined;
|
|
14
|
-
export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsNonabortable & CallbackOptionNonabortable<string>): undefined;
|
|
15
|
-
export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable): ChangeObject<string>[] | undefined;
|
|
16
|
-
export declare function diffCss(oldStr: string, newStr: string, options?: DiffCssOptionsNonabortable): ChangeObject<string>[];
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=css.d.ts.map
|