@zuplo/cli 7.0.2 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/delete/handler.js +2 -2
- package/dist/delete/handler.js.map +1 -1
- package/dist/deploy/handler.js +1 -1
- package/dist/deploy/handler.js.map +1 -1
- package/dist/deploy/poll-deployment.js +1 -1
- package/dist/deploy/poll-deployment.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@pinojs/redact/.github/dependabot.yml +13 -0
- package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
- package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
- package/node_modules/{event-target-shim → @pinojs/redact}/LICENSE +2 -3
- package/node_modules/@pinojs/redact/README.md +350 -0
- package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
- package/node_modules/@pinojs/redact/eslint.config.js +1 -0
- package/node_modules/@pinojs/redact/index.d.ts +52 -0
- package/node_modules/@pinojs/redact/index.js +529 -0
- package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
- package/node_modules/@pinojs/redact/package.json +37 -0
- package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
- package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
- package/node_modules/@pinojs/redact/test/index.test.js +824 -0
- package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
- package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
- package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
- package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
- package/node_modules/@pinojs/redact/tsconfig.json +19 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +240 -240
- package/node_modules/@zuplo/core/index.minified.js +258 -258
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/{abort-controller → @zuplo/editor/node_modules/fast-copy}/LICENSE +1 -1
- package/node_modules/@zuplo/editor/node_modules/fast-copy/README.md +395 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/dist/cjs/index.cjs +406 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/dist/umd/index.js +412 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/dist/umd/index.js.map +1 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/index.d.ts +55 -0
- package/node_modules/@zuplo/editor/node_modules/fast-copy/package.json +103 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/.github/workflows/ci.yml +97 -0
- package/node_modules/{fast-redact → @zuplo/editor/node_modules/pino-abstract-transport}/LICENSE +3 -3
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/README.md +172 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/index.d.ts +122 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/index.js +128 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/package.json +40 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/base.test.js +445 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/fixtures/transport-async-iteration.js +22 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/fixtures/transport-on-data.js +22 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/fixtures/transport-transform.js +24 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/fixtures/worker-pipeline.js +15 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/types/index.test-d.ts +31 -0
- package/node_modules/@zuplo/editor/node_modules/pino-abstract-transport/test/worker.test.js +357 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/.airtap.yml +7 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/.github/dependabot.yml +13 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/.github/stale.yml +21 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/.github/workflows/ci.yml +137 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/README.md +126 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/ignore.js +35 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/no__proto__.js +40 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/package.json +15 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/remove.js +39 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/throw.js +49 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/benchmarks/valid.js +49 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/index.js +126 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/package.json +41 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/test/index.test.js +505 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/types/index.d.ts +57 -0
- package/node_modules/@zuplo/editor/node_modules/secure-json-parse/types/index.test-d.ts +31 -0
- package/node_modules/@zuplo/editor/node_modules/strip-json-comments/index.d.ts +36 -0
- package/node_modules/@zuplo/editor/node_modules/strip-json-comments/index.js +77 -0
- package/node_modules/@zuplo/editor/node_modules/strip-json-comments/license +9 -0
- package/node_modules/@zuplo/editor/node_modules/strip-json-comments/package.json +47 -0
- package/node_modules/@zuplo/editor/node_modules/strip-json-comments/readme.md +78 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/.claude/settings.local.json +15 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/.github/dependabot.yml +13 -0
- package/node_modules/{pino → @zuplo/editor/node_modules/thread-stream}/.github/workflows/ci.yml +25 -19
- package/node_modules/@zuplo/editor/node_modules/thread-stream/.husky/pre-commit +4 -0
- package/node_modules/@zuplo/editor/node_modules/{process-warning → thread-stream}/LICENSE +1 -1
- package/node_modules/@zuplo/editor/node_modules/thread-stream/README.md +136 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/bench.js +85 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/index.d.ts +92 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/index.js +565 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/lib/indexes.js +11 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/lib/wait.js +61 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/lib/worker.js +186 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/package.json +57 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/base.test.js +258 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/bench.test.js +38 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/bundlers.test.js +60 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/close-on-gc.js +37 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/commonjs-fallback.test.js +80 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/context.test.js +21 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/create-and-exit.js +16 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/custom-worker.js +9 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/dir with spaces/test-package.zip +0 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/emit-event.js +22 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/end.test.js +61 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/error.js +14 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/esm.test.mjs +47 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/event.test.js +23 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/exit.js +14 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/get-context.js +22 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/helper.d.ts +1 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/helper.js +35 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/indexes.test.js +11 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/message-without-code.js +19 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/multibyte-chars.test.mjs +74 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/on-message.js +18 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/pkg/index.js +37 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/pkg/pkg.config.json +15 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/pkg/pkg.test.js +46 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/port.js +16 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/post-message.test.js +24 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/string-limit-2.test.js +41 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/string-limit.test.js +42 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/syntax-error.mjs +2 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/thread-management.test.js +121 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/to-file-on-destroy.js +23 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/to-file-on-final.js +24 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/to-file.js +12 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/to-file.mjs +8 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/to-next.js +9 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/transpiled.test.js +30 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/ts/to-file.ts +10 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/ts/transpile.sh +19 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/ts-commonjs-default-export.zip +0 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/uncaughtException.js +21 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/unhandledRejection.js +21 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/watch-mode.test.js +28 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/test/yarnrc.yml +7 -0
- package/node_modules/@zuplo/editor/node_modules/thread-stream/tsconfig.json +8 -0
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-XLNOQPTE.js → chunk-RS7HF7BL.js} +63 -63
- package/node_modules/@zuplo/runtime/out/esm/chunk-RS7HF7BL.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +16 -19
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +1 -2
- package/node_modules/@zuplo/runtime/out/types/mcp/messages/index.d.ts +1 -2
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +1 -2
- package/node_modules/@zuplo/runtime/out/types/mocks/index.d.ts +1 -2
- package/node_modules/@zuplo/runtime/out/types/sdks/aws/index.d.ts +1 -2
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/fast-copy/LICENSE +1 -1
- package/node_modules/fast-copy/README.md +186 -154
- package/node_modules/fast-copy/dist/cjs/index.cjs +143 -214
- package/node_modules/fast-copy/dist/cjs/index.cjs.map +1 -1
- package/node_modules/fast-copy/dist/cjs/index.d.cts +54 -0
- package/node_modules/fast-copy/dist/es/index.d.mts +54 -0
- package/node_modules/fast-copy/dist/es/index.mjs +331 -0
- package/node_modules/fast-copy/dist/es/index.mjs.map +1 -0
- package/node_modules/fast-copy/dist/umd/index.d.ts +54 -0
- package/node_modules/fast-copy/dist/umd/index.js +143 -214
- package/node_modules/fast-copy/dist/umd/index.js.map +1 -1
- package/node_modules/fast-copy/index.d.ts +37 -38
- package/node_modules/fast-copy/package.json +68 -61
- package/node_modules/pino/CONTRIBUTING.md +4 -4
- package/node_modules/pino/LICENSE +1 -1
- package/node_modules/pino/README.md +18 -2
- package/node_modules/pino/SECURITY.md +19 -0
- package/node_modules/pino/browser.js +76 -13
- package/node_modules/pino/build/sync-version.js +16 -1
- package/node_modules/pino/docs/api.md +128 -5
- package/node_modules/pino/docs/browser.md +51 -0
- package/node_modules/pino/docs/diagnostics.md +16 -0
- package/node_modules/pino/docs/ecosystem.md +15 -12
- package/node_modules/pino/docs/help.md +28 -2
- package/node_modules/pino/docs/transports.md +188 -20
- package/node_modules/pino/docs/web.md +40 -0
- package/node_modules/pino/eslint.config.js +28 -0
- package/node_modules/pino/lib/meta.js +1 -1
- package/node_modules/pino/lib/multistream.js +17 -2
- package/node_modules/pino/lib/proto.js +34 -10
- package/node_modules/pino/lib/redaction.js +9 -13
- package/node_modules/pino/lib/time.js +29 -1
- package/node_modules/pino/lib/tools.js +42 -9
- package/node_modules/pino/lib/transport.js +125 -3
- package/node_modules/pino/package.json +25 -25
- package/node_modules/pino/pino.d.ts +228 -203
- package/node_modules/pino/pino.js +2 -1
- package/node_modules/pino/test/basic.test.js +179 -167
- package/node_modules/pino/test/broken-pipe.test.js +16 -14
- package/node_modules/pino/test/browser-is-level-enabled.test.js +101 -0
- package/node_modules/pino/test/browser.test.js +39 -0
- package/node_modules/pino/test/complex-objects.test.js +8 -6
- package/node_modules/pino/test/crlf.test.js +7 -5
- package/node_modules/pino/test/custom-levels.test.js +80 -66
- package/node_modules/pino/test/diagnostics.test.js +107 -0
- package/node_modules/pino/test/error-key.test.js +37 -0
- package/node_modules/pino/test/error.test.js +47 -42
- package/node_modules/pino/test/escaping.test.js +7 -5
- package/node_modules/pino/test/esm/esm.mjs +5 -3
- package/node_modules/pino/test/esm/index.test.js +14 -27
- package/node_modules/pino/test/esm/named-exports.mjs +8 -6
- package/node_modules/pino/test/exit.test.js +17 -15
- package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
- package/node_modules/pino/test/fixtures/transport-invalid-node-options.js +26 -0
- package/node_modules/pino/test/fixtures/transport-preload-main.mjs +13 -0
- package/node_modules/pino/test/fixtures/transport-preload.mjs +13 -0
- package/node_modules/pino/test/fixtures/transport-worker-name.js +24 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport-native.mts +15 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +1 -1
- package/node_modules/pino/test/formatters.test.js +43 -34
- package/node_modules/pino/test/helper.d.ts +3 -3
- package/node_modules/pino/test/helper.js +36 -9
- package/node_modules/pino/test/hooks.test.js +45 -28
- package/node_modules/pino/test/http.test.js +38 -66
- package/node_modules/pino/test/internals/version.test.js +9 -7
- package/node_modules/pino/test/is-level-enabled.test.js +66 -72
- package/node_modules/pino/test/levels.test.js +191 -153
- package/node_modules/pino/test/metadata.test.js +44 -30
- package/node_modules/pino/test/mixin-merge-strategy.test.js +9 -7
- package/node_modules/pino/test/mixin.test.js +62 -39
- package/node_modules/pino/test/multistream.test.js +173 -117
- package/node_modules/pino/test/redact.test.js +172 -126
- package/node_modules/pino/test/serializers.test.js +61 -57
- package/node_modules/pino/test/stdout-protection.test.js +12 -10
- package/node_modules/pino/test/syncfalse.test.js +24 -26
- package/node_modules/pino/test/timestamp-nano.test.js +37 -0
- package/node_modules/pino/test/timestamp.test.js +37 -34
- package/node_modules/pino/test/transport/big.test.js +8 -9
- package/node_modules/pino/test/transport/bundlers-support.test.js +12 -10
- package/node_modules/pino/test/transport/caller.test.js +8 -7
- package/node_modules/pino/test/transport/core.test.js +232 -143
- package/node_modules/pino/test/transport/core.transpiled.test.ts +15 -13
- package/node_modules/pino/test/transport/crash.test.js +36 -0
- package/node_modules/pino/test/transport/module-link.test.js +17 -15
- package/node_modules/pino/test/transport/native-type-stripping.test.mjs +151 -0
- package/node_modules/pino/test/transport/node-options.test.js +116 -0
- package/node_modules/pino/test/transport/pipeline.test.js +14 -12
- package/node_modules/pino/test/transport/preload.test.js +54 -0
- package/node_modules/pino/test/transport/repl.test.js +4 -3
- package/node_modules/pino/test/transport/{syncfalse.test.js → sync-false.test.js} +15 -16
- package/node_modules/pino/test/transport/{syncTrue.test.js → sync-true.test.js} +6 -4
- package/node_modules/pino/test/transport/targets.test.js +13 -9
- package/node_modules/pino/test/transport/uses-pino-config.test.js +13 -14
- package/node_modules/pino/test/transport-stream.test.js +22 -8
- package/node_modules/pino/test/types/{pino-import.test-d.ts → pino-import.test-d.cts} +4 -3
- package/node_modules/pino/test/types/pino-multistream.test-d.ts +4 -4
- package/node_modules/pino/test/types/pino-top-export.test-d.ts +26 -27
- package/node_modules/pino/test/types/pino-transport.test-d.ts +99 -88
- package/node_modules/pino/test/types/pino-type-only.test-d.ts +55 -44
- package/node_modules/pino/test/types/pino.test-d.ts +500 -281
- package/node_modules/pino/test/types/pino.ts +50 -37
- package/node_modules/pino/tsconfig.json +1 -1
- package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +5 -22
- package/node_modules/pino-abstract-transport/README.md +0 -1
- package/node_modules/pino-abstract-transport/package.json +6 -5
- package/node_modules/pino-abstract-transport/test/base.test.js +108 -80
- package/node_modules/pino-abstract-transport/test/match.js +24 -0
- package/node_modules/pino-abstract-transport/test/worker.test.js +46 -31
- package/node_modules/pino-pretty/.borp.yaml +6 -0
- package/node_modules/pino-pretty/.github/dependabot.yml +1 -1
- package/node_modules/pino-pretty/.github/workflows/ci.yml +5 -12
- package/node_modules/pino-pretty/Readme.md +24 -3
- package/node_modules/pino-pretty/bin.js +5 -4
- package/node_modules/pino-pretty/eslint.config.js +3 -0
- package/node_modules/pino-pretty/index.d.ts +7 -7
- package/node_modules/pino-pretty/index.js +1 -1
- package/node_modules/pino-pretty/lib/colors.js +9 -4
- package/node_modules/pino-pretty/lib/colors.test.js +36 -36
- package/node_modules/pino-pretty/lib/pretty.js +7 -5
- package/node_modules/pino-pretty/lib/utils/build-safe-sonic-boom.js +2 -4
- package/node_modules/pino-pretty/lib/utils/build-safe-sonic-boom.test.js +17 -19
- package/node_modules/pino-pretty/lib/utils/create-date.test.js +7 -7
- package/node_modules/pino-pretty/lib/utils/delete-log-property.test.js +7 -7
- package/node_modules/pino-pretty/lib/utils/filter-log.test.js +33 -40
- package/node_modules/pino-pretty/lib/utils/format-time.js +1 -1
- package/node_modules/pino-pretty/lib/utils/format-time.test.js +25 -25
- package/node_modules/pino-pretty/lib/utils/get-property-value.test.js +11 -11
- package/node_modules/pino-pretty/lib/utils/handle-custom-levels-names-opts.test.js +15 -14
- package/node_modules/pino-pretty/lib/utils/handle-custom-levels-opts.test.js +11 -11
- package/node_modules/pino-pretty/lib/utils/index.test.js +8 -8
- package/node_modules/pino-pretty/lib/utils/interpret-conditionals.test.js +23 -23
- package/node_modules/pino-pretty/lib/utils/is-object.test.js +5 -5
- package/node_modules/pino-pretty/lib/utils/is-valid-date.test.js +6 -6
- package/node_modules/pino-pretty/lib/utils/join-lines-with-indentation.test.js +5 -5
- package/node_modules/pino-pretty/lib/utils/noop.test.js +5 -5
- package/node_modules/pino-pretty/lib/utils/prettify-error-log.test.js +26 -26
- package/node_modules/pino-pretty/lib/utils/prettify-error.test.js +3 -4
- package/node_modules/pino-pretty/lib/utils/prettify-level.test.js +9 -9
- package/node_modules/pino-pretty/lib/utils/prettify-message.js +2 -1
- package/node_modules/pino-pretty/lib/utils/prettify-message.test.js +73 -41
- package/node_modules/pino-pretty/lib/utils/prettify-metadata.test.js +37 -37
- package/node_modules/pino-pretty/lib/utils/prettify-object.js +1 -1
- package/node_modules/pino-pretty/lib/utils/prettify-object.test.js +71 -32
- package/node_modules/pino-pretty/lib/utils/prettify-time.test.js +29 -29
- package/node_modules/pino-pretty/lib/utils/split-property-key.test.js +11 -11
- package/node_modules/pino-pretty/package.json +22 -24
- package/node_modules/pino-pretty/test/basic.test.js +190 -181
- package/node_modules/pino-pretty/test/cli-rc.test.js +93 -73
- package/node_modules/pino-pretty/test/cli.test.js +169 -144
- package/node_modules/pino-pretty/test/crlf.test.js +6 -8
- package/node_modules/pino-pretty/test/error-objects.test.js +85 -90
- package/node_modules/pino-pretty/test/example/example.js +3 -1
- package/node_modules/pino-pretty/test/helper.js +19 -0
- package/node_modules/pino-pretty/test/types/pino-pretty.test-d.ts +4 -1
- package/node_modules/process-warning/.github/dependabot.yml +41 -1
- package/node_modules/process-warning/.github/workflows/ci.yml +12 -3
- package/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/process-warning/README.md +42 -3
- package/node_modules/process-warning/index.js +85 -17
- package/node_modules/process-warning/package.json +7 -8
- package/node_modules/process-warning/test/emit-interpolated-string.test.js +11 -6
- package/node_modules/process-warning/test/emit-once-only.test.js +14 -9
- package/node_modules/process-warning/test/emit-reset.test.js +14 -10
- package/node_modules/process-warning/test/emit-set.test.js +10 -5
- package/node_modules/process-warning/test/emit-unlimited.test.js +14 -9
- package/node_modules/process-warning/test/index.test.js +20 -20
- package/node_modules/process-warning/test/issue-88.test.js +8 -3
- package/node_modules/process-warning/test/jest.test.js +17 -15
- package/node_modules/process-warning/test/no-warnings.test.js +7 -7
- package/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/secure-json-parse/.github/dependabot.yml +1 -1
- package/node_modules/secure-json-parse/.github/workflows/ci.yml +31 -19
- package/node_modules/{ieee754 → secure-json-parse}/LICENSE +9 -1
- package/node_modules/secure-json-parse/README.md +14 -8
- package/node_modules/secure-json-parse/benchmarks/ignore.js +1 -1
- package/node_modules/secure-json-parse/benchmarks/throw.js +3 -3
- package/node_modules/secure-json-parse/index.js +39 -4
- package/node_modules/secure-json-parse/package.json +41 -8
- package/node_modules/secure-json-parse/test/index.test.js +150 -6
- package/node_modules/secure-json-parse/types/index.d.ts +9 -6
- package/node_modules/secure-json-parse/types/index.test-d.ts +13 -1
- package/node_modules/strip-json-comments/index.d.ts +18 -13
- package/node_modules/strip-json-comments/index.js +75 -39
- package/node_modules/strip-json-comments/package.json +14 -5
- package/node_modules/strip-json-comments/readme.md +15 -18
- package/node_modules/thread-stream/.github/workflows/ci.yml +4 -24
- package/node_modules/thread-stream/README.md +2 -0
- package/node_modules/thread-stream/eslint.config.js +10 -0
- package/node_modules/thread-stream/index.d.ts +7 -0
- package/node_modules/thread-stream/index.js +189 -109
- package/node_modules/thread-stream/lib/wait.js +58 -42
- package/node_modules/thread-stream/lib/worker.js +126 -14
- package/node_modules/thread-stream/node_modules/real-require/LICENSE.md +21 -0
- package/node_modules/thread-stream/node_modules/real-require/README.md +51 -0
- package/node_modules/thread-stream/node_modules/real-require/package.json +38 -0
- package/node_modules/thread-stream/node_modules/real-require/src/index.js +14 -0
- package/node_modules/thread-stream/package.json +18 -25
- package/node_modules/thread-stream/test/base.test.js +97 -96
- package/node_modules/thread-stream/test/bench.test.js +3 -3
- package/node_modules/thread-stream/test/bundlers.test.js +8 -9
- package/node_modules/thread-stream/test/commonjs-fallback.test.js +17 -22
- package/node_modules/thread-stream/test/context.test.js +6 -6
- package/node_modules/thread-stream/test/end.test.js +22 -27
- package/node_modules/thread-stream/test/esm.test.mjs +8 -9
- package/node_modules/thread-stream/test/event.test.js +10 -9
- package/node_modules/thread-stream/test/flush-worker.js +68 -0
- package/node_modules/thread-stream/test/flush.test.js +112 -0
- package/node_modules/thread-stream/test/helper.js +1 -10
- package/node_modules/thread-stream/test/indexes.test.js +4 -4
- package/node_modules/thread-stream/test/multibyte-chars.test.mjs +14 -13
- package/node_modules/thread-stream/test/multibyte-overrun.test.mjs +33 -0
- package/node_modules/thread-stream/test/pkg/index.js +23 -23
- package/node_modules/thread-stream/test/pkg/pkg.config.json +3 -4
- package/node_modules/thread-stream/test/pkg/pkg.test.js +5 -6
- package/node_modules/thread-stream/test/post-message.test.js +4 -5
- package/node_modules/thread-stream/test/report-thread-name.js +16 -0
- package/node_modules/thread-stream/test/string-limit-2.test.js +24 -30
- package/node_modules/thread-stream/test/string-limit.test.js +24 -29
- package/node_modules/thread-stream/test/thread-management.test.js +46 -17
- package/node_modules/thread-stream/test/transpiled.test.js +5 -6
- package/node_modules/thread-stream/test/ts-native.test.mjs +35 -0
- package/node_modules/thread-stream/test/ts-node-fallback.test.js +35 -0
- package/node_modules/thread-stream/test/watch-mode.test.js +13 -11
- package/node_modules/thread-stream/test/worker-name.test.js +43 -0
- package/package.json +8 -8
- package/node_modules/@zuplo/editor/node_modules/process-warning/.github/dependabot.yml +0 -53
- package/node_modules/@zuplo/editor/node_modules/process-warning/.github/workflows/ci.yml +0 -33
- package/node_modules/@zuplo/editor/node_modules/process-warning/README.md +0 -157
- package/node_modules/@zuplo/editor/node_modules/process-warning/benchmarks/warn.js +0 -25
- package/node_modules/@zuplo/editor/node_modules/process-warning/examples/example.js +0 -11
- package/node_modules/@zuplo/editor/node_modules/process-warning/index.js +0 -192
- package/node_modules/@zuplo/editor/node_modules/process-warning/package.json +0 -72
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/emit-interpolated-string.test.js +0 -34
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/emit-once-only.test.js +0 -33
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/emit-reset.test.js +0 -40
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/emit-set.test.js +0 -35
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/emit-unlimited.test.js +0 -42
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/index.test.js +0 -99
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/issue-88.test.js +0 -38
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/jest.test.js +0 -24
- package/node_modules/@zuplo/editor/node_modules/process-warning/test/no-warnings.test.js +0 -80
- package/node_modules/@zuplo/editor/node_modules/process-warning/types/index.d.ts +0 -51
- package/node_modules/@zuplo/runtime/out/esm/chunk-XLNOQPTE.js.map +0 -1
- package/node_modules/abort-controller/README.md +0 -98
- package/node_modules/abort-controller/browser.js +0 -13
- package/node_modules/abort-controller/browser.mjs +0 -11
- package/node_modules/abort-controller/dist/abort-controller.d.ts +0 -43
- package/node_modules/abort-controller/dist/abort-controller.js +0 -127
- package/node_modules/abort-controller/dist/abort-controller.js.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.mjs +0 -118
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.umd.js +0 -5
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +0 -1
- package/node_modules/abort-controller/package.json +0 -97
- package/node_modules/abort-controller/polyfill.js +0 -21
- package/node_modules/abort-controller/polyfill.mjs +0 -19
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/buffer/AUTHORS.md +0 -73
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -194
- package/node_modules/buffer/index.js +0 -2106
- package/node_modules/buffer/package.json +0 -93
- package/node_modules/event-target-shim/README.md +0 -293
- package/node_modules/event-target-shim/dist/event-target-shim.js +0 -871
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +0 -862
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +0 -6
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +0 -1
- package/node_modules/event-target-shim/index.d.ts +0 -399
- package/node_modules/event-target-shim/package.json +0 -82
- package/node_modules/events/.airtap.yml +0 -15
- package/node_modules/events/.github/FUNDING.yml +0 -12
- package/node_modules/events/.travis.yml +0 -18
- package/node_modules/events/History.md +0 -118
- package/node_modules/events/LICENSE +0 -22
- package/node_modules/events/Readme.md +0 -50
- package/node_modules/events/events.js +0 -497
- package/node_modules/events/package.json +0 -37
- package/node_modules/events/security.md +0 -10
- package/node_modules/events/tests/add-listeners.js +0 -111
- package/node_modules/events/tests/check-listener-leaks.js +0 -101
- package/node_modules/events/tests/common.js +0 -104
- package/node_modules/events/tests/errors.js +0 -13
- package/node_modules/events/tests/events-list.js +0 -28
- package/node_modules/events/tests/events-once.js +0 -234
- package/node_modules/events/tests/index.js +0 -64
- package/node_modules/events/tests/legacy-compat.js +0 -16
- package/node_modules/events/tests/listener-count.js +0 -37
- package/node_modules/events/tests/listeners-side-effects.js +0 -56
- package/node_modules/events/tests/listeners.js +0 -168
- package/node_modules/events/tests/max-listeners.js +0 -47
- package/node_modules/events/tests/method-names.js +0 -35
- package/node_modules/events/tests/modify-in-emit.js +0 -90
- package/node_modules/events/tests/num-args.js +0 -60
- package/node_modules/events/tests/once.js +0 -83
- package/node_modules/events/tests/prepend.js +0 -31
- package/node_modules/events/tests/remove-all-listeners.js +0 -133
- package/node_modules/events/tests/remove-listeners.js +0 -212
- package/node_modules/events/tests/set-max-listeners-side-effects.js +0 -31
- package/node_modules/events/tests/special-event-names.js +0 -45
- package/node_modules/events/tests/subclass.js +0 -66
- package/node_modules/events/tests/symbols.js +0 -25
- package/node_modules/fast-redact/.github/workflows/ci.yml +0 -37
- package/node_modules/fast-redact/benchmark/index.js +0 -223
- package/node_modules/fast-redact/example/default-usage.js +0 -14
- package/node_modules/fast-redact/example/intermediate-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-depth.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-end.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/serialize-false.js +0 -11
- package/node_modules/fast-redact/example/serialize-function.js +0 -4
- package/node_modules/fast-redact/example/top-wildcard-object.js +0 -9
- package/node_modules/fast-redact/index.js +0 -56
- package/node_modules/fast-redact/lib/modifiers.js +0 -291
- package/node_modules/fast-redact/lib/parse.js +0 -44
- package/node_modules/fast-redact/lib/redactor.js +0 -108
- package/node_modules/fast-redact/lib/restorer.js +0 -92
- package/node_modules/fast-redact/lib/rx.js +0 -16
- package/node_modules/fast-redact/lib/state.js +0 -20
- package/node_modules/fast-redact/lib/validator.js +0 -33
- package/node_modules/fast-redact/package.json +0 -50
- package/node_modules/fast-redact/readme.md +0 -282
- package/node_modules/fast-redact/test/index.js +0 -1502
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/pino/.eslintignore +0 -2
- package/node_modules/pino/.eslintrc +0 -8
- package/node_modules/pino/.github/workflows/bench.yml +0 -61
- package/node_modules/pino/.github/workflows/lock-threads.yml +0 -30
- package/node_modules/pino/.github/workflows/target-main.yml +0 -23
- package/node_modules/pino/.taprc.yaml +0 -8
- package/node_modules/pino/docsify/sidebar.md +0 -26
- package/node_modules/pino/favicon-16x16.png +0 -0
- package/node_modules/pino/favicon-32x32.png +0 -0
- package/node_modules/pino/pino-banner.png +0 -0
- package/node_modules/pino/pino-logo-hire.png +0 -0
- package/node_modules/pino/pino-tree.png +0 -0
- package/node_modules/pino/pretty-demo.png +0 -0
- package/node_modules/pino/test/errorKey.test.js +0 -34
- package/node_modules/pino/test/pkg/index.js +0 -46
- package/node_modules/pino/test/pkg/pkg.config.json +0 -17
- package/node_modules/pino/test/pkg/pkg.test.js +0 -56
- package/node_modules/pino/test/transport/core.test.ts +0 -236
- package/node_modules/process/.eslintrc +0 -21
- package/node_modules/process/LICENSE +0 -22
- package/node_modules/process/README.md +0 -26
- package/node_modules/process/browser.js +0 -184
- package/node_modules/process/index.js +0 -2
- package/node_modules/process/package.json +0 -27
- package/node_modules/process/test.js +0 -199
- package/node_modules/process-warning/.taprc +0 -2
- package/node_modules/process-warning/types/index.test-d.ts +0 -36
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -116
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -4
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -4
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -4
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -4
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -4
- package/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -157
- package/node_modules/readable-stream/lib/internal/streams/compose.js +0 -194
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -290
- package/node_modules/readable-stream/lib/internal/streams/duplex.js +0 -143
- package/node_modules/readable-stream/lib/internal/streams/duplexify.js +0 -378
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -286
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -98
- package/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +0 -51
- package/node_modules/readable-stream/lib/internal/streams/legacy.js +0 -89
- package/node_modules/readable-stream/lib/internal/streams/operators.js +0 -457
- package/node_modules/readable-stream/lib/internal/streams/passthrough.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -471
- package/node_modules/readable-stream/lib/internal/streams/readable.js +0 -1290
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/transform.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/utils.js +0 -327
- package/node_modules/readable-stream/lib/internal/streams/writable.js +0 -819
- package/node_modules/readable-stream/lib/internal/validators.js +0 -530
- package/node_modules/readable-stream/lib/ours/browser.js +0 -35
- package/node_modules/readable-stream/lib/ours/errors.js +0 -343
- package/node_modules/readable-stream/lib/ours/index.js +0 -65
- package/node_modules/readable-stream/lib/ours/primordials.js +0 -124
- package/node_modules/readable-stream/lib/ours/util/inspect.js +0 -55
- package/node_modules/readable-stream/lib/ours/util.js +0 -148
- package/node_modules/readable-stream/lib/stream/promises.js +0 -43
- package/node_modules/readable-stream/lib/stream.js +0 -143
- package/node_modules/readable-stream/package.json +0 -88
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/.release-it.beta.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/.release-it.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/CHANGELOG.md +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/cjs/types/copier.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/cjs/types/index.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/cjs/types/utils.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/esm/index.mjs +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/esm/index.mjs.map +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/esm/types/copier.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/esm/types/index.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/esm/types/utils.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/min/index.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/min/index.js.map +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/min/types/copier.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/min/types/index.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/min/types/utils.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/umd/types/copier.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/umd/types/index.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/dist/umd/types/utils.d.ts +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/flow-typed/fast-copy.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/config.base.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/config.cjs.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/config.esm.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/config.min.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/config.umd.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/rollup/packageJson.js +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/base.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/cjs.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/declarations.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/esm.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/min.json +0 -0
- /package/node_modules/{fast-copy → @zuplo/editor/node_modules/fast-copy}/tsconfig/umd.json +0 -0
- /package/node_modules/{pino → @zuplo/editor/node_modules/pino-abstract-transport}/.github/dependabot.yml +0 -0
- /package/node_modules/{thread-stream → @zuplo/editor/node_modules/pino-abstract-transport}/.husky/pre-commit +0 -0
- /package/node_modules/{secure-json-parse → @zuplo/editor/node_modules/secure-json-parse}/LICENSE.md +0 -0
- /package/node_modules/{thread-stream → @zuplo/editor/node_modules/thread-stream}/.taprc +0 -0
- /package/node_modules/{thread-stream → @zuplo/editor/node_modules/thread-stream}/CLAUDE.md +0 -0
- /package/node_modules/{thread-stream → @zuplo/editor/node_modules/thread-stream}/test/never-drain.test.js +0 -0
- /package/node_modules/{thread-stream → @zuplo/editor/node_modules/thread-stream}/test/ts.test.ts +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-XLNOQPTE.js.LEGAL.txt → chunk-RS7HF7BL.js.LEGAL.txt} +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → process-warning}/.github/workflows/lock-threads.yml +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → process-warning}/test/promise.js +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → process-warning}/test/spy-warning.test.js +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → process-warning}/types/index.tst.ts +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → secure-json-parse}/.gitattributes +0 -0
- /package/node_modules/{@zuplo/editor/node_modules/process-warning → secure-json-parse}/eslint.config.js +0 -0
|
@@ -4,137 +4,77 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["fast-copy"] = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @classdesc Fallback cache for when WeakMap is not natively supported
|
|
12
|
-
*/
|
|
13
|
-
var LegacyCache = /** @class */ (function () {
|
|
14
|
-
function LegacyCache() {
|
|
15
|
-
this._keys = [];
|
|
16
|
-
this._values = [];
|
|
17
|
-
}
|
|
18
|
-
LegacyCache.prototype.has = function (key) {
|
|
19
|
-
return !!~this._keys.indexOf(key);
|
|
20
|
-
};
|
|
21
|
-
LegacyCache.prototype.get = function (key) {
|
|
22
|
-
return this._values[this._keys.indexOf(key)];
|
|
23
|
-
};
|
|
24
|
-
LegacyCache.prototype.set = function (key, value) {
|
|
25
|
-
this._keys.push(key);
|
|
26
|
-
this._values.push(value);
|
|
27
|
-
};
|
|
28
|
-
return LegacyCache;
|
|
29
|
-
}());
|
|
30
|
-
function createCacheLegacy() {
|
|
31
|
-
return new LegacyCache();
|
|
32
|
-
}
|
|
33
|
-
function createCacheModern() {
|
|
34
|
-
return new WeakMap();
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Get a new cache object to prevent circular references.
|
|
38
|
-
*/
|
|
39
|
-
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
8
|
+
const toStringFunction = Function.prototype.toString;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
10
|
+
const toStringObject = Object.prototype.toString;
|
|
40
11
|
/**
|
|
41
12
|
* Get an empty version of the object with the same prototype it has.
|
|
42
13
|
*/
|
|
43
14
|
function getCleanClone(prototype) {
|
|
44
15
|
if (!prototype) {
|
|
45
|
-
return create(null);
|
|
16
|
+
return Object.create(null);
|
|
46
17
|
}
|
|
47
|
-
|
|
18
|
+
const Constructor = prototype.constructor;
|
|
48
19
|
if (Constructor === Object) {
|
|
49
|
-
return prototype === Object.prototype ? {} : create(prototype);
|
|
20
|
+
return prototype === Object.prototype ? {} : Object.create(prototype);
|
|
50
21
|
}
|
|
51
|
-
if (Constructor &&
|
|
52
|
-
~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
22
|
+
if (Constructor && ~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
53
23
|
try {
|
|
54
24
|
return new Constructor();
|
|
55
25
|
}
|
|
56
|
-
catch (_a) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function getRegExpFlagsLegacy(regExp) {
|
|
61
|
-
var flags = '';
|
|
62
|
-
if (regExp.global) {
|
|
63
|
-
flags += 'g';
|
|
64
|
-
}
|
|
65
|
-
if (regExp.ignoreCase) {
|
|
66
|
-
flags += 'i';
|
|
67
|
-
}
|
|
68
|
-
if (regExp.multiline) {
|
|
69
|
-
flags += 'm';
|
|
70
|
-
}
|
|
71
|
-
if (regExp.unicode) {
|
|
72
|
-
flags += 'u';
|
|
73
|
-
}
|
|
74
|
-
if (regExp.sticky) {
|
|
75
|
-
flags += 'y';
|
|
26
|
+
catch (_a) {
|
|
27
|
+
// Ignore
|
|
28
|
+
}
|
|
76
29
|
}
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
function getRegExpFlagsModern(regExp) {
|
|
80
|
-
return regExp.flags;
|
|
30
|
+
return Object.create(prototype);
|
|
81
31
|
}
|
|
82
32
|
/**
|
|
83
|
-
* Get the
|
|
33
|
+
* Get the tag of the value passed, so that the correct copier can be used.
|
|
84
34
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
35
|
+
function getTag(value) {
|
|
36
|
+
const stringTag = value[Symbol.toStringTag];
|
|
37
|
+
if (stringTag) {
|
|
38
|
+
return stringTag;
|
|
39
|
+
}
|
|
40
|
+
const type = toStringObject.call(value);
|
|
88
41
|
return type.substring(8, type.length - 1);
|
|
89
42
|
}
|
|
90
|
-
function getTagModern(value) {
|
|
91
|
-
return value[Symbol.toStringTag] || getTagLegacy(value);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Get the tag of the value passed, so that the correct copier can be used.
|
|
95
|
-
*/
|
|
96
|
-
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
|
97
43
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
45
|
+
const { propertyIsEnumerable } = Object.prototype;
|
|
46
|
+
function copyOwnDescriptor(original, clone, property, state) {
|
|
47
|
+
const ownDescriptor = Object.getOwnPropertyDescriptor(original, property) || {
|
|
48
|
+
configurable: true,
|
|
49
|
+
enumerable: true,
|
|
50
|
+
value: original[property],
|
|
51
|
+
writable: true,
|
|
52
|
+
};
|
|
53
|
+
const descriptor = ownDescriptor.get || ownDescriptor.set
|
|
54
|
+
? ownDescriptor
|
|
55
|
+
: {
|
|
56
|
+
configurable: ownDescriptor.configurable,
|
|
57
|
+
enumerable: ownDescriptor.enumerable,
|
|
58
|
+
value: state.copier(ownDescriptor.value, state),
|
|
59
|
+
writable: ownDescriptor.writable,
|
|
60
|
+
};
|
|
61
|
+
try {
|
|
62
|
+
Object.defineProperty(clone, property, descriptor);
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
// The above can fail on node in extreme edge cases, so fall back to the loose assignment.
|
|
66
|
+
clone[property] = descriptor.get ? descriptor.get() : descriptor.value;
|
|
67
|
+
}
|
|
103
68
|
}
|
|
104
69
|
/**
|
|
105
|
-
*
|
|
106
|
-
*/
|
|
107
|
-
var getStrictProperties = SUPPORTS_SYMBOL
|
|
108
|
-
? getStrictPropertiesModern
|
|
109
|
-
: getOwnPropertyNames;
|
|
110
|
-
/**
|
|
111
|
-
* Striclty copy all properties contained on the object.
|
|
70
|
+
* Strictly copy all properties contained on the object.
|
|
112
71
|
*/
|
|
113
72
|
function copyOwnPropertiesStrict(value, clone, state) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
descriptor = getOwnPropertyDescriptor(value, property);
|
|
121
|
-
if (!descriptor) {
|
|
122
|
-
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
|
123
|
-
// the loose assignment.
|
|
124
|
-
clone[property] = state.copier(value[property], state);
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
// Only clone the value if actually a value, not a getter / setter.
|
|
128
|
-
if (!descriptor.get && !descriptor.set) {
|
|
129
|
-
descriptor.value = state.copier(descriptor.value, state);
|
|
130
|
-
}
|
|
131
|
-
try {
|
|
132
|
-
defineProperty(clone, property, descriptor);
|
|
133
|
-
}
|
|
134
|
-
catch (error) {
|
|
135
|
-
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
|
136
|
-
clone[property] = descriptor.value;
|
|
137
|
-
}
|
|
73
|
+
for (const name of Object.getOwnPropertyNames(value)) {
|
|
74
|
+
copyOwnDescriptor(value, clone, name, state);
|
|
75
|
+
}
|
|
76
|
+
for (const symbol of Object.getOwnPropertySymbols(value)) {
|
|
77
|
+
copyOwnDescriptor(value, clone, symbol, state);
|
|
138
78
|
}
|
|
139
79
|
return clone;
|
|
140
80
|
}
|
|
@@ -142,10 +82,10 @@
|
|
|
142
82
|
* Deeply copy the indexed values in the array.
|
|
143
83
|
*/
|
|
144
84
|
function copyArrayLoose(array, state) {
|
|
145
|
-
|
|
85
|
+
const clone = new state.Constructor();
|
|
146
86
|
// set in the cache immediately to be able to reuse the object recursively
|
|
147
87
|
state.cache.set(array, clone);
|
|
148
|
-
for (
|
|
88
|
+
for (let index = 0; index < array.length; ++index) {
|
|
149
89
|
clone[index] = state.copier(array[index], state);
|
|
150
90
|
}
|
|
151
91
|
return clone;
|
|
@@ -154,7 +94,7 @@
|
|
|
154
94
|
* Deeply copy the indexed values in the array, as well as any custom properties.
|
|
155
95
|
*/
|
|
156
96
|
function copyArrayStrict(array, state) {
|
|
157
|
-
|
|
97
|
+
const clone = new state.Constructor();
|
|
158
98
|
// set in the cache immediately to be able to reuse the object recursively
|
|
159
99
|
state.cache.set(array, clone);
|
|
160
100
|
return copyOwnPropertiesStrict(array, clone, state);
|
|
@@ -187,12 +127,12 @@
|
|
|
187
127
|
* Deeply copy the keys and values of the original.
|
|
188
128
|
*/
|
|
189
129
|
function copyMapLoose(map, state) {
|
|
190
|
-
|
|
130
|
+
const clone = new state.Constructor();
|
|
191
131
|
// set in the cache immediately to be able to reuse the object recursively
|
|
192
132
|
state.cache.set(map, clone);
|
|
193
|
-
|
|
133
|
+
for (const [key, value] of map) {
|
|
194
134
|
clone.set(key, state.copier(value, state));
|
|
195
|
-
}
|
|
135
|
+
}
|
|
196
136
|
return clone;
|
|
197
137
|
}
|
|
198
138
|
/**
|
|
@@ -201,47 +141,29 @@
|
|
|
201
141
|
function copyMapStrict(map, state) {
|
|
202
142
|
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
|
203
143
|
}
|
|
204
|
-
|
|
205
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Deeply copy the properties (keys and symbols) and values of the original.
|
|
146
|
+
*/
|
|
147
|
+
function copyObjectLoose(object, state) {
|
|
148
|
+
const clone = getCleanClone(state.prototype);
|
|
206
149
|
// set in the cache immediately to be able to reuse the object recursively
|
|
207
150
|
state.cache.set(object, clone);
|
|
208
|
-
for (
|
|
209
|
-
|
|
210
|
-
clone[key] = state.copier(object[key], state);
|
|
211
|
-
}
|
|
151
|
+
for (const key of Object.keys(object)) {
|
|
152
|
+
clone[key] = state.copier(object[key], state);
|
|
212
153
|
}
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
function copyObjectLooseModern(object, state) {
|
|
216
|
-
var clone = getCleanClone(state.prototype);
|
|
217
|
-
// set in the cache immediately to be able to reuse the object recursively
|
|
218
|
-
state.cache.set(object, clone);
|
|
219
|
-
for (var key in object) {
|
|
220
|
-
if (hasOwnProperty.call(object, key)) {
|
|
221
|
-
clone[key] = state.copier(object[key], state);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
var symbols = getOwnPropertySymbols(object);
|
|
225
|
-
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
|
226
|
-
symbol = symbols[index];
|
|
154
|
+
for (const symbol of Object.getOwnPropertySymbols(object)) {
|
|
227
155
|
if (propertyIsEnumerable.call(object, symbol)) {
|
|
228
156
|
clone[symbol] = state.copier(object[symbol], state);
|
|
229
157
|
}
|
|
230
158
|
}
|
|
231
159
|
return clone;
|
|
232
160
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Deeply copy the properties (keys and symbols) and values of the original.
|
|
235
|
-
*/
|
|
236
|
-
var copyObjectLoose = SUPPORTS_SYMBOL
|
|
237
|
-
? copyObjectLooseModern
|
|
238
|
-
: copyObjectLooseLegacy;
|
|
239
161
|
/**
|
|
240
162
|
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
|
241
163
|
* as any hidden or non-enumerable properties.
|
|
242
164
|
*/
|
|
243
165
|
function copyObjectStrict(object, state) {
|
|
244
|
-
|
|
166
|
+
const clone = getCleanClone(state.prototype);
|
|
245
167
|
// set in the cache immediately to be able to reuse the object recursively
|
|
246
168
|
state.cache.set(object, clone);
|
|
247
169
|
return copyOwnPropertiesStrict(object, clone, state);
|
|
@@ -256,7 +178,7 @@
|
|
|
256
178
|
* Create a new RegExp based on the value and flags of the original.
|
|
257
179
|
*/
|
|
258
180
|
function copyRegExp(regExp, state) {
|
|
259
|
-
|
|
181
|
+
const clone = new state.Constructor(regExp.source, regExp.flags);
|
|
260
182
|
clone.lastIndex = regExp.lastIndex;
|
|
261
183
|
return clone;
|
|
262
184
|
}
|
|
@@ -273,12 +195,12 @@
|
|
|
273
195
|
* Deeply copy the values of the original.
|
|
274
196
|
*/
|
|
275
197
|
function copySetLoose(set, state) {
|
|
276
|
-
|
|
198
|
+
const clone = new state.Constructor();
|
|
277
199
|
// set in the cache immediately to be able to reuse the object recursively
|
|
278
200
|
state.cache.set(set, clone);
|
|
279
|
-
|
|
201
|
+
for (const value of set) {
|
|
280
202
|
clone.add(state.copier(value, state));
|
|
281
|
-
}
|
|
203
|
+
}
|
|
282
204
|
return clone;
|
|
283
205
|
}
|
|
284
206
|
/**
|
|
@@ -288,68 +210,82 @@
|
|
|
288
210
|
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
|
289
211
|
}
|
|
290
212
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
213
|
+
function createDefaultCache() {
|
|
214
|
+
return new WeakMap();
|
|
215
|
+
}
|
|
216
|
+
function getOptions({ createCache: createCacheOverride, methods: methodsOverride, strict, }) {
|
|
217
|
+
const defaultMethods = {
|
|
218
|
+
array: strict ? copyArrayStrict : copyArrayLoose,
|
|
219
|
+
arrayBuffer: copyArrayBuffer,
|
|
220
|
+
asyncGenerator: copySelf,
|
|
221
|
+
blob: copyBlob,
|
|
222
|
+
dataView: copyDataView,
|
|
223
|
+
date: copyDate,
|
|
224
|
+
error: copySelf,
|
|
225
|
+
generator: copySelf,
|
|
226
|
+
map: strict ? copyMapStrict : copyMapLoose,
|
|
227
|
+
object: strict ? copyObjectStrict : copyObjectLoose,
|
|
228
|
+
regExp: copyRegExp,
|
|
229
|
+
set: strict ? copySetStrict : copySetLoose,
|
|
230
|
+
};
|
|
231
|
+
const methods = methodsOverride ? Object.assign(defaultMethods, methodsOverride) : defaultMethods;
|
|
232
|
+
const copiers = getTagSpecificCopiers(methods);
|
|
233
|
+
const createCache = createCacheOverride || createDefaultCache;
|
|
234
|
+
// Extra safety check to ensure that object and array copiers are always provided,
|
|
235
|
+
// avoiding runtime errors.
|
|
236
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
237
|
+
if (!copiers.Object || !copiers.Array) {
|
|
238
|
+
throw new Error('An object and array copier must be provided.');
|
|
239
|
+
}
|
|
240
|
+
return { createCache, copiers, methods, strict: Boolean(strict) };
|
|
241
|
+
}
|
|
312
242
|
/**
|
|
313
243
|
* Get the copiers used for each specific object tag.
|
|
314
244
|
*/
|
|
315
|
-
function getTagSpecificCopiers(
|
|
245
|
+
function getTagSpecificCopiers(methods) {
|
|
316
246
|
return {
|
|
317
|
-
Arguments:
|
|
318
|
-
Array:
|
|
319
|
-
ArrayBuffer:
|
|
320
|
-
|
|
247
|
+
Arguments: methods.object,
|
|
248
|
+
Array: methods.array,
|
|
249
|
+
ArrayBuffer: methods.arrayBuffer,
|
|
250
|
+
AsyncGenerator: methods.asyncGenerator,
|
|
251
|
+
BigInt64Array: methods.arrayBuffer,
|
|
252
|
+
BigUint64Array: methods.arrayBuffer,
|
|
253
|
+
Blob: methods.blob,
|
|
321
254
|
Boolean: copyPrimitiveWrapper,
|
|
322
|
-
DataView:
|
|
323
|
-
Date:
|
|
324
|
-
Error:
|
|
325
|
-
Float32Array:
|
|
326
|
-
Float64Array:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
255
|
+
DataView: methods.dataView,
|
|
256
|
+
Date: methods.date,
|
|
257
|
+
Error: methods.error,
|
|
258
|
+
Float32Array: methods.arrayBuffer,
|
|
259
|
+
Float64Array: methods.arrayBuffer,
|
|
260
|
+
Generator: methods.generator,
|
|
261
|
+
Int8Array: methods.arrayBuffer,
|
|
262
|
+
Int16Array: methods.arrayBuffer,
|
|
263
|
+
Int32Array: methods.arrayBuffer,
|
|
264
|
+
Map: methods.map,
|
|
331
265
|
Number: copyPrimitiveWrapper,
|
|
332
|
-
Object:
|
|
266
|
+
Object: methods.object,
|
|
333
267
|
Promise: copySelf,
|
|
334
|
-
RegExp:
|
|
335
|
-
Set:
|
|
268
|
+
RegExp: methods.regExp,
|
|
269
|
+
Set: methods.set,
|
|
336
270
|
String: copyPrimitiveWrapper,
|
|
337
271
|
WeakMap: copySelf,
|
|
338
272
|
WeakSet: copySelf,
|
|
339
|
-
Uint8Array:
|
|
340
|
-
Uint8ClampedArray:
|
|
341
|
-
Uint16Array:
|
|
342
|
-
Uint32Array:
|
|
343
|
-
Uint64Array: options.arrayBuffer,
|
|
273
|
+
Uint8Array: methods.arrayBuffer,
|
|
274
|
+
Uint8ClampedArray: methods.arrayBuffer,
|
|
275
|
+
Uint16Array: methods.arrayBuffer,
|
|
276
|
+
Uint32Array: methods.arrayBuffer,
|
|
344
277
|
};
|
|
345
278
|
}
|
|
279
|
+
|
|
346
280
|
/**
|
|
347
|
-
* Create a custom copier based on
|
|
281
|
+
* Create a custom copier based on custom options for any of the following:
|
|
282
|
+
* - `createCache` method to create a cache for copied objects
|
|
283
|
+
* - custom copier `methods` for specific object types
|
|
284
|
+
* - `strict` mode to copy all properties with their descriptors
|
|
348
285
|
*/
|
|
349
|
-
function createCopier(options) {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
|
286
|
+
function createCopier(options = {}) {
|
|
287
|
+
const { createCache, copiers } = getOptions(options);
|
|
288
|
+
const { Array: copyArray, Object: copyObject } = copiers;
|
|
353
289
|
function copier(value, state) {
|
|
354
290
|
state.prototype = state.Constructor = undefined;
|
|
355
291
|
if (!value || typeof value !== 'object') {
|
|
@@ -358,55 +294,48 @@
|
|
|
358
294
|
if (state.cache.has(value)) {
|
|
359
295
|
return state.cache.get(value);
|
|
360
296
|
}
|
|
361
|
-
state.prototype = getPrototypeOf(value);
|
|
297
|
+
state.prototype = Object.getPrototypeOf(value);
|
|
298
|
+
// Using logical AND for speed, since optional chaining transforms to
|
|
299
|
+
// a local variable usage.
|
|
300
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
362
301
|
state.Constructor = state.prototype && state.prototype.constructor;
|
|
363
302
|
// plain objects
|
|
364
303
|
if (!state.Constructor || state.Constructor === Object) {
|
|
365
|
-
return
|
|
304
|
+
return copyObject(value, state);
|
|
366
305
|
}
|
|
367
306
|
// arrays
|
|
368
|
-
if (isArray(value)) {
|
|
369
|
-
return
|
|
307
|
+
if (Array.isArray(value)) {
|
|
308
|
+
return copyArray(value, state);
|
|
370
309
|
}
|
|
371
|
-
|
|
310
|
+
const tagSpecificCopier = copiers[getTag(value)];
|
|
372
311
|
if (tagSpecificCopier) {
|
|
373
312
|
return tagSpecificCopier(value, state);
|
|
374
313
|
}
|
|
375
|
-
return typeof value.then === 'function' ? value :
|
|
314
|
+
return typeof value.then === 'function' ? value : copyObject(value, state);
|
|
376
315
|
}
|
|
377
316
|
return function copy(value) {
|
|
378
317
|
return copier(value, {
|
|
379
318
|
Constructor: undefined,
|
|
380
319
|
cache: createCache(),
|
|
381
|
-
copier
|
|
320
|
+
copier,
|
|
382
321
|
prototype: undefined,
|
|
383
322
|
});
|
|
384
323
|
};
|
|
385
324
|
}
|
|
386
|
-
/**
|
|
387
|
-
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
|
388
|
-
* same internals as `copyStrict`.
|
|
389
|
-
*/
|
|
390
|
-
function createStrictCopier(options) {
|
|
391
|
-
return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
|
|
392
|
-
}
|
|
393
325
|
/**
|
|
394
326
|
* Copy an value deeply as much as possible, where strict recreation of object properties
|
|
395
327
|
* are maintained. All properties (including non-enumerable ones) are copied with their
|
|
396
328
|
* original property descriptors on both objects and arrays.
|
|
397
329
|
*/
|
|
398
|
-
|
|
330
|
+
const copyStrict = createCopier({ strict: true });
|
|
399
331
|
/**
|
|
400
332
|
* Copy an value deeply as much as possible.
|
|
401
333
|
*/
|
|
402
|
-
|
|
334
|
+
const copy = createCopier();
|
|
403
335
|
|
|
336
|
+
exports.copy = copy;
|
|
404
337
|
exports.copyStrict = copyStrict;
|
|
405
338
|
exports.createCopier = createCopier;
|
|
406
|
-
exports.createStrictCopier = createStrictCopier;
|
|
407
|
-
exports.default = index;
|
|
408
|
-
|
|
409
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
410
339
|
|
|
411
340
|
}));
|
|
412
341
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/utils.ts","../../../../src/copier.ts","../../../../src/index.ts"],"sourcesContent":["export interface Cache {\n has: (value: any) => boolean;\n set: (key: any, value: any) => void;\n get: (key: any) => any;\n}\n\nconst { toString: toStringFunction } = Function.prototype;\nconst { create } = Object;\nconst { toString: toStringObject } = Object.prototype;\n\n/**\n * @classdesc Fallback cache for when WeakMap is not natively supported\n */\nclass LegacyCache {\n private _keys: any[] = [];\n private _values: any[] = [];\n\n has(key: any) {\n return !!~this._keys.indexOf(key);\n }\n\n get(key: any) {\n return this._values[this._keys.indexOf(key)];\n }\n\n set(key: any, value: any) {\n this._keys.push(key);\n this._values.push(value);\n }\n}\n\nfunction createCacheLegacy(): Cache {\n return new LegacyCache();\n}\n\nfunction createCacheModern(): Cache {\n return new WeakMap();\n}\n\n/**\n * Get a new cache object to prevent circular references.\n */\nexport const createCache =\n typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;\n\n/**\n * Get an empty version of the object with the same prototype it has.\n */\nexport function getCleanClone(prototype: any): any {\n if (!prototype) {\n return create(null);\n }\n\n const Constructor = prototype.constructor;\n\n if (Constructor === Object) {\n return prototype === Object.prototype ? {} : create(prototype);\n }\n\n if (\n Constructor &&\n ~toStringFunction.call(Constructor).indexOf('[native code]')\n ) {\n try {\n return new Constructor();\n } catch {}\n }\n\n return create(prototype);\n}\n\nfunction getRegExpFlagsLegacy(regExp: RegExp): string {\n let flags = '';\n\n if (regExp.global) {\n flags += 'g';\n }\n\n if (regExp.ignoreCase) {\n flags += 'i';\n }\n\n if (regExp.multiline) {\n flags += 'm';\n }\n\n if (regExp.unicode) {\n flags += 'u';\n }\n\n if (regExp.sticky) {\n flags += 'y';\n }\n\n return flags;\n}\n\nfunction getRegExpFlagsModern(regExp: RegExp): string {\n return regExp.flags;\n}\n\n/**\n * Get the flags to apply to the copied regexp.\n */\nexport const getRegExpFlags =\n /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;\n\nfunction getTagLegacy(value: any): string {\n const type = toStringObject.call(value);\n\n return type.substring(8, type.length - 1);\n}\n\nfunction getTagModern(value: any): string {\n return value[Symbol.toStringTag] || getTagLegacy(value);\n}\n\n/**\n * Get the tag of the value passed, so that the correct copier can be used.\n */\nexport const getTag =\n typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;\n","import { getCleanClone, getRegExpFlags } from './utils';\n\nimport type { Cache } from './utils';\n\nexport type InternalCopier<Value> = (value: Value, state: State) => Value;\n\nexport interface State {\n Constructor: any;\n cache: Cache;\n copier: InternalCopier<any>;\n prototype: any;\n}\n\nconst {\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n} = Object;\nconst { hasOwnProperty, propertyIsEnumerable } = Object.prototype;\n\nconst SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';\n\nfunction getStrictPropertiesModern(object: any): Array<string | symbol> {\n return (getOwnPropertyNames(object) as Array<string | symbol>).concat(\n getOwnPropertySymbols(object)\n );\n}\n\n/**\n * Get the properites used when copying objects strictly. This includes both keys and symbols.\n */\nconst getStrictProperties = SUPPORTS_SYMBOL\n ? getStrictPropertiesModern\n : getOwnPropertyNames;\n\n/**\n * Striclty copy all properties contained on the object.\n */\nfunction copyOwnPropertiesStrict<Value>(\n value: Value,\n clone: Value,\n state: State\n): Value {\n const properties = getStrictProperties(value);\n\n for (\n let index = 0, length = properties.length, property, descriptor;\n index < length;\n ++index\n ) {\n property = properties[index];\n\n if (property === 'callee' || property === 'caller') {\n continue;\n }\n\n descriptor = getOwnPropertyDescriptor(value, property);\n\n if (!descriptor) {\n // In extra edge cases where the property descriptor cannot be retrived, fall back to\n // the loose assignment.\n (clone as any)[property] = state.copier((value as any)[property], state);\n continue;\n }\n\n // Only clone the value if actually a value, not a getter / setter.\n if (!descriptor.get && !descriptor.set) {\n descriptor.value = state.copier(descriptor.value, state);\n }\n\n try {\n defineProperty(clone, property, descriptor);\n } catch (error) {\n // Tee above can fail on node in edge cases, so fall back to the loose assignment.\n (clone as any)[property] = descriptor.value;\n }\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the indexed values in the array.\n */\nexport function copyArrayLoose(array: any[], state: State) {\n const clone = new state.Constructor();\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(array, clone);\n\n for (let index = 0, length = array.length; index < length; ++index) {\n clone[index] = state.copier(array[index], state);\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the indexed values in the array, as well as any custom properties.\n */\nexport function copyArrayStrict<Value extends any[]>(\n array: Value,\n state: State\n) {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(array, clone);\n\n return copyOwnPropertiesStrict(array, clone, state);\n}\n\n/**\n * Copy the contents of the ArrayBuffer.\n */\nexport function copyArrayBuffer<Value extends ArrayBuffer>(\n arrayBuffer: Value,\n _state: State\n): Value {\n return arrayBuffer.slice(0) as Value;\n}\n\n/**\n * Create a new Blob with the contents of the original.\n */\nexport function copyBlob<Value extends Blob>(\n blob: Value,\n _state: State\n): Value {\n return blob.slice(0, blob.size, blob.type) as Value;\n}\n\n/**\n * Create a new DataView with the contents of the original.\n */\nexport function copyDataView<Value extends DataView>(\n dataView: Value,\n state: State\n): Value {\n return new state.Constructor(copyArrayBuffer(dataView.buffer, state));\n}\n\n/**\n * Create a new Date based on the time of the original.\n */\nexport function copyDate<Value extends Date>(date: Value, state: State): Value {\n return new state.Constructor(date.getTime());\n}\n\n/**\n * Deeply copy the keys and values of the original.\n */\nexport function copyMapLoose<Value extends Map<any, any>>(\n map: Value,\n state: State\n): Value {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(map, clone);\n\n map.forEach((value, key) => {\n clone.set(key, state.copier(value, state));\n });\n\n return clone;\n}\n\n/**\n * Deeply copy the keys and values of the original, as well as any custom properties.\n */\nexport function copyMapStrict<Value extends Map<any, any>>(\n map: Value,\n state: State\n) {\n return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);\n}\n\nfunction copyObjectLooseLegacy<Value extends Record<string, any>>(\n object: Value,\n state: State\n): Value {\n const clone: any = getCleanClone(state.prototype);\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(object, clone);\n\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n clone[key] = state.copier(object[key], state);\n }\n }\n\n return clone;\n}\n\nfunction copyObjectLooseModern<Value extends Record<string, any>>(\n object: Value,\n state: State\n): Value {\n const clone = getCleanClone(state.prototype);\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(object, clone);\n\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n clone[key] = state.copier(object[key], state);\n }\n }\n\n const symbols = getOwnPropertySymbols(object);\n\n for (\n let index = 0, length = symbols.length, symbol;\n index < length;\n ++index\n ) {\n symbol = symbols[index];\n\n if (propertyIsEnumerable.call(object, symbol)) {\n clone[symbol] = state.copier((object as any)[symbol], state);\n }\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the properties (keys and symbols) and values of the original.\n */\nexport const copyObjectLoose = SUPPORTS_SYMBOL\n ? copyObjectLooseModern\n : copyObjectLooseLegacy;\n\n/**\n * Deeply copy the properties (keys and symbols) and values of the original, as well\n * as any hidden or non-enumerable properties.\n */\nexport function copyObjectStrict<Value extends Record<string, any>>(\n object: Value,\n state: State\n): Value {\n const clone = getCleanClone(state.prototype);\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(object, clone);\n\n return copyOwnPropertiesStrict(object, clone, state);\n}\n\n/**\n * Create a new primitive wrapper from the value of the original.\n */\nexport function copyPrimitiveWrapper<\n // Specifically use the object constructor types\n // eslint-disable-next-line @typescript-eslint/ban-types\n Value extends Boolean | Number | String\n>(primitiveObject: Value, state: State): Value {\n return new state.Constructor(primitiveObject.valueOf());\n}\n\n/**\n * Create a new RegExp based on the value and flags of the original.\n */\nexport function copyRegExp<Value extends RegExp>(\n regExp: Value,\n state: State\n): Value {\n const clone = new state.Constructor(\n regExp.source,\n getRegExpFlags(regExp)\n ) as Value;\n\n clone.lastIndex = regExp.lastIndex;\n\n return clone;\n}\n\n/**\n * Return the original value (an identity function).\n *\n * @note\n * THis is used for objects that cannot be copied, such as WeakMap.\n */\nexport function copySelf<Value>(value: Value, _state: State): Value {\n return value;\n}\n\n/**\n * Deeply copy the values of the original.\n */\nexport function copySetLoose<Value extends Set<any>>(\n set: Value,\n state: State\n): Value {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(set, clone);\n\n set.forEach((value) => {\n clone.add(state.copier(value, state));\n });\n\n return clone;\n}\n\n/**\n * Deeply copy the values of the original, as well as any custom properties.\n */\nexport function copySetStrict<Value extends Set<any>>(\n set: Value,\n state: State\n): Value {\n return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);\n}\n","import {\n copyArrayBuffer,\n copyArrayLoose,\n copyArrayStrict,\n copyBlob,\n copyDataView,\n copyDate,\n copyMapLoose,\n copyMapStrict,\n copyObjectLoose,\n copyObjectStrict,\n copyPrimitiveWrapper,\n copyRegExp,\n copySelf,\n copySetLoose,\n copySetStrict,\n} from './copier';\nimport { createCache, getTag } from './utils';\n\nimport type { InternalCopier, State } from './copier';\n\nexport type { State } from './copier';\n\nconst { isArray } = Array;\nconst { assign } = Object;\nconst getPrototypeOf = Object.getPrototypeOf || ((obj) => obj.__proto__)\n\nexport interface CreateCopierOptions {\n array?: InternalCopier<any[]>;\n arrayBuffer?: InternalCopier<ArrayBuffer>;\n blob?: InternalCopier<Blob>;\n dataView?: InternalCopier<DataView>;\n date?: InternalCopier<Date>;\n error?: InternalCopier<any>;\n map?: InternalCopier<Map<any, any>>;\n object?: InternalCopier<Record<string, any>>;\n regExp?: InternalCopier<RegExp>;\n set?: InternalCopier<Set<any>>;\n}\n\nconst DEFAULT_LOOSE_OPTIONS: Required<CreateCopierOptions> = {\n array: copyArrayLoose,\n arrayBuffer: copyArrayBuffer,\n blob: copyBlob,\n dataView: copyDataView,\n date: copyDate,\n error: copySelf,\n map: copyMapLoose,\n object: copyObjectLoose,\n regExp: copyRegExp,\n set: copySetLoose,\n};\nconst DEFAULT_STRICT_OPTIONS: Required<CreateCopierOptions> = assign(\n {},\n DEFAULT_LOOSE_OPTIONS,\n {\n array: copyArrayStrict,\n map: copyMapStrict,\n object: copyObjectStrict,\n set: copySetStrict,\n }\n);\n\n/**\n * Get the copiers used for each specific object tag.\n */\nfunction getTagSpecificCopiers(\n options: Required<CreateCopierOptions>\n): Record<string, InternalCopier<any>> {\n return {\n Arguments: options.object,\n Array: options.array,\n ArrayBuffer: options.arrayBuffer,\n Blob: options.blob,\n Boolean: copyPrimitiveWrapper,\n DataView: options.dataView,\n Date: options.date,\n Error: options.error,\n Float32Array: options.arrayBuffer,\n Float64Array: options.arrayBuffer,\n Int8Array: options.arrayBuffer,\n Int16Array: options.arrayBuffer,\n Int32Array: options.arrayBuffer,\n Map: options.map,\n Number: copyPrimitiveWrapper,\n Object: options.object,\n Promise: copySelf,\n RegExp: options.regExp,\n Set: options.set,\n String: copyPrimitiveWrapper,\n WeakMap: copySelf,\n WeakSet: copySelf,\n Uint8Array: options.arrayBuffer,\n Uint8ClampedArray: options.arrayBuffer,\n Uint16Array: options.arrayBuffer,\n Uint32Array: options.arrayBuffer,\n Uint64Array: options.arrayBuffer,\n };\n}\n\n/**\n * Create a custom copier based on the object-specific copy methods passed.\n */\nexport function createCopier(options: CreateCopierOptions) {\n const normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);\n const tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);\n const { Array: array, Object: object } = tagSpecificCopiers;\n\n function copier(value: any, state: State): any {\n state.prototype = state.Constructor = undefined;\n\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n if (state.cache.has(value)) {\n return state.cache.get(value);\n }\n\n state.prototype = getPrototypeOf(value);\n state.Constructor = state.prototype && state.prototype.constructor;\n\n // plain objects\n if (!state.Constructor || state.Constructor === Object) {\n return object(value, state);\n }\n\n // arrays\n if (isArray(value)) {\n return array(value, state);\n }\n\n const tagSpecificCopier = tagSpecificCopiers[getTag(value)];\n\n if (tagSpecificCopier) {\n return tagSpecificCopier(value, state);\n }\n\n return typeof value.then === 'function' ? value : object(value, state);\n }\n\n return function copy<Value>(value: Value): Value {\n return copier(value, {\n Constructor: undefined,\n cache: createCache(),\n copier,\n prototype: undefined,\n });\n };\n}\n\n/**\n * Create a custom copier based on the object-specific copy methods passed, defaulting to the\n * same internals as `copyStrict`.\n */\nexport function createStrictCopier(options: CreateCopierOptions) {\n return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));\n}\n\n/**\n * Copy an value deeply as much as possible, where strict recreation of object properties\n * are maintained. All properties (including non-enumerable ones) are copied with their\n * original property descriptors on both objects and arrays.\n */\nexport const copyStrict = createStrictCopier({});\n\n/**\n * Copy an value deeply as much as possible.\n */\nexport default createCopier({});\n"],"names":[],"mappings":";;;;;;IAMQ,IAAU,gBAAgB,GAAK,QAAQ,CAAC,SAAS,SAAvB,CAAwB;IAClD,IAAA,MAAM,GAAK,MAAM,CAAA,MAAX,CAAY;IAClB,IAAU,cAAc,GAAK,MAAM,CAAC,SAAS,SAArB,CAAsB;IAEtD;;IAEG;IACH,IAAA,WAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,WAAA,GAAA;YACU,IAAK,CAAA,KAAA,GAAU,EAAE,CAAC;YAClB,IAAO,CAAA,OAAA,GAAU,EAAE,CAAC;SAc7B;QAZC,WAAG,CAAA,SAAA,CAAA,GAAA,GAAH,UAAI,GAAQ,EAAA;YACV,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SACnC,CAAA;QAED,WAAG,CAAA,SAAA,CAAA,GAAA,GAAH,UAAI,GAAQ,EAAA;IACV,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,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,SAAS;gBACtB,KAAK,EAAE,WAAW,EAAE;IACpB,YAAA,MAAM,EAAA,MAAA;IACN,YAAA,SAAS,EAAE,SAAS;IACrB,SAAA,CAAC,CAAC;IACL,KAAC,CAAC;IACJ,CAAC;IAED;;;IAGG;IACG,SAAU,kBAAkB,CAAC,OAA4B,EAAA;QAC7D,OAAO,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC,CAAC;IACnE,CAAC;IAED;;;;IAIG;QACU,UAAU,GAAG,kBAAkB,CAAC,EAAE,EAAE;IAEjD;;IAEG;AACH,gBAAe,YAAY,CAAC,EAAE,CAAC;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils.ts","../../../src/copier.ts","../../../src/options.ts","../../../src/index.ts"],"sourcesContent":["export interface Cache {\n has: (value: any) => boolean;\n set: (key: any, value: any) => void;\n get: (key: any) => any;\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toStringFunction = Function.prototype.toString;\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toStringObject = Object.prototype.toString;\n\n/**\n * Get an empty version of the object with the same prototype it has.\n */\nexport function getCleanClone(prototype: any): any {\n if (!prototype) {\n return Object.create(null);\n }\n\n const Constructor = prototype.constructor;\n\n if (Constructor === Object) {\n return prototype === Object.prototype ? {} : Object.create(prototype as object | null);\n }\n\n if (Constructor && ~toStringFunction.call(Constructor).indexOf('[native code]')) {\n try {\n return new Constructor();\n } catch {\n // Ignore\n }\n }\n\n return Object.create(prototype as object | null);\n}\n\n/**\n * Get the tag of the value passed, so that the correct copier can be used.\n */\nexport function getTag(value: any): string {\n const stringTag = value[Symbol.toStringTag];\n\n if (stringTag) {\n return stringTag;\n }\n\n const type = toStringObject.call(value);\n\n return type.substring(8, type.length - 1);\n}\n","import { getCleanClone } from './utils.js';\nimport type { Cache } from './utils.ts';\n\nexport type InternalCopier<Value> = (value: Value, state: State) => Value;\n\nexport interface State {\n Constructor: any;\n cache: Cache;\n copier: InternalCopier<any>;\n prototype: any;\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst { propertyIsEnumerable } = Object.prototype;\n\nfunction copyOwnDescriptor<Value extends object>(\n original: Value,\n clone: Value,\n property: string | symbol,\n state: State,\n): void {\n const ownDescriptor = Object.getOwnPropertyDescriptor(original, property) || {\n configurable: true,\n enumerable: true,\n value: original[property as keyof Value],\n writable: true,\n };\n const descriptor =\n ownDescriptor.get || ownDescriptor.set\n ? ownDescriptor\n : {\n configurable: ownDescriptor.configurable,\n enumerable: ownDescriptor.enumerable,\n value: state.copier(ownDescriptor.value, state),\n writable: ownDescriptor.writable,\n };\n\n try {\n Object.defineProperty(clone, property, descriptor);\n } catch {\n // The above can fail on node in extreme edge cases, so fall back to the loose assignment.\n clone[property as keyof Value] = descriptor.get ? descriptor.get() : descriptor.value;\n }\n}\n\n/**\n * Strictly copy all properties contained on the object.\n */\nfunction copyOwnPropertiesStrict<Value extends object>(value: Value, clone: Value, state: State): Value {\n for (const name of Object.getOwnPropertyNames(value)) {\n copyOwnDescriptor(value, clone, name, state);\n }\n\n for (const symbol of Object.getOwnPropertySymbols(value)) {\n copyOwnDescriptor(value, clone, symbol, state);\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the indexed values in the array.\n */\nexport function copyArrayLoose(array: any[], state: State) {\n const clone = new state.Constructor();\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(array, clone);\n\n for (let index = 0; index < array.length; ++index) {\n clone[index] = state.copier(array[index], state);\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the indexed values in the array, as well as any custom properties.\n */\nexport function copyArrayStrict<Value extends any[]>(array: Value, state: State) {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(array, clone);\n\n return copyOwnPropertiesStrict(array, clone, state);\n}\n\n/**\n * Copy the contents of the ArrayBuffer.\n */\nexport function copyArrayBuffer<Value extends ArrayBufferLike>(arrayBuffer: Value, _state: State): Value {\n return arrayBuffer.slice(0) as Value;\n}\n\n/**\n * Create a new Blob with the contents of the original.\n */\nexport function copyBlob<Value extends Blob>(blob: Value, _state: State): Value {\n return blob.slice(0, blob.size, blob.type) as Value;\n}\n\n/**\n * Create a new DataView with the contents of the original.\n */\nexport function copyDataView<Value extends DataView>(dataView: Value, state: State): Value {\n return new state.Constructor(copyArrayBuffer(dataView.buffer, state));\n}\n\n/**\n * Create a new Date based on the time of the original.\n */\nexport function copyDate<Value extends Date>(date: Value, state: State): Value {\n return new state.Constructor(date.getTime());\n}\n\n/**\n * Deeply copy the keys and values of the original.\n */\nexport function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(map, clone);\n\n for (const [key, value] of map) {\n clone.set(key, state.copier(value, state));\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the keys and values of the original, as well as any custom properties.\n */\nexport function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State) {\n return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);\n}\n\n/**\n * Deeply copy the properties (keys and symbols) and values of the original.\n */\nexport function copyObjectLoose<Value extends Record<string, any>>(object: Value, state: State): Value {\n const clone = getCleanClone(state.prototype);\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(object, clone);\n\n for (const key of Object.keys(object)) {\n clone[key] = state.copier(object[key], state);\n }\n\n for (const symbol of Object.getOwnPropertySymbols(object)) {\n if (propertyIsEnumerable.call(object, symbol)) {\n clone[symbol] = state.copier((object as any)[symbol], state);\n }\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the properties (keys and symbols) and values of the original, as well\n * as any hidden or non-enumerable properties.\n */\nexport function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value {\n const clone = getCleanClone(state.prototype);\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(object, clone);\n\n return copyOwnPropertiesStrict(object, clone, state);\n}\n\n/**\n * Create a new primitive wrapper from the value of the original.\n */\nexport function copyPrimitiveWrapper<\n // Specifically use the object constructor types\n // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n Value extends Boolean | Number | String,\n>(primitiveObject: Value, state: State): Value {\n return new state.Constructor(primitiveObject.valueOf());\n}\n\n/**\n * Create a new RegExp based on the value and flags of the original.\n */\nexport function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value {\n const clone = new state.Constructor(regExp.source, regExp.flags) as Value;\n\n clone.lastIndex = regExp.lastIndex;\n\n return clone;\n}\n\n/**\n * Return the original value (an identity function).\n *\n * @note\n * THis is used for objects that cannot be copied, such as WeakMap.\n */\nexport function copySelf<Value>(value: Value, _state: State): Value {\n return value;\n}\n\n/**\n * Deeply copy the values of the original.\n */\nexport function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value {\n const clone = new state.Constructor() as Value;\n\n // set in the cache immediately to be able to reuse the object recursively\n state.cache.set(set, clone);\n\n for (const value of set) {\n clone.add(state.copier(value, state));\n }\n\n return clone;\n}\n\n/**\n * Deeply copy the values of the original, as well as any custom properties.\n */\nexport function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value {\n return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);\n}\n","import {\n copyArrayBuffer,\n copyArrayLoose,\n copyArrayStrict,\n copyBlob,\n copyDataView,\n copyDate,\n copyMapLoose,\n copyMapStrict,\n copyObjectLoose,\n copyObjectStrict,\n copyPrimitiveWrapper,\n copyRegExp,\n copySelf,\n copySetLoose,\n copySetStrict,\n} from './copier.js';\nimport type { InternalCopier } from './copier.ts';\nimport type { Cache } from './utils.ts';\n\nexport interface CopierMethods {\n array?: InternalCopier<any[]>;\n arrayBuffer?: InternalCopier<ArrayBuffer>;\n asyncGenerator?: InternalCopier<AsyncGenerator>;\n blob?: InternalCopier<Blob>;\n dataView?: InternalCopier<DataView>;\n date?: InternalCopier<Date>;\n error?: InternalCopier<Error>;\n generator?: InternalCopier<Generator>;\n map?: InternalCopier<Map<any, any>>;\n object?: InternalCopier<Record<string, any>>;\n regExp?: InternalCopier<RegExp>;\n set?: InternalCopier<Set<any>>;\n}\n\ninterface Copiers {\n [key: string]: InternalCopier<any> | undefined;\n\n Arguments: InternalCopier<Record<string, any>>;\n Array: InternalCopier<any[]>;\n ArrayBuffer: InternalCopier<ArrayBuffer>;\n AsyncGenerator: InternalCopier<AsyncGenerator>;\n BigInt64Array: InternalCopier<ArrayBuffer>;\n BigUint64Array: InternalCopier<ArrayBuffer>;\n Blob: InternalCopier<Blob>;\n // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n Boolean: InternalCopier<Boolean>;\n DataView: InternalCopier<DataView>;\n Date: InternalCopier<Date>;\n Error: InternalCopier<Error>;\n Float32Array: InternalCopier<ArrayBuffer>;\n Float64Array: InternalCopier<ArrayBuffer>;\n Generator: InternalCopier<Generator>;\n Int8Array: InternalCopier<ArrayBuffer>;\n Int16Array: InternalCopier<ArrayBuffer>;\n Int32Array: InternalCopier<ArrayBuffer>;\n Map: InternalCopier<Map<any, any>>;\n // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n Number: InternalCopier<Number>;\n Object: InternalCopier<Record<string, any>>;\n Promise: InternalCopier<Promise<any>>;\n RegExp: InternalCopier<RegExp>;\n Set: InternalCopier<Set<any>>;\n // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n String: InternalCopier<String>;\n WeakMap: InternalCopier<WeakMap<any, any>>;\n WeakSet: InternalCopier<WeakSet<any>>;\n Uint8Array: InternalCopier<ArrayBuffer>;\n Uint8ClampedArray: InternalCopier<ArrayBuffer>;\n Uint16Array: InternalCopier<ArrayBuffer>;\n Uint32Array: InternalCopier<ArrayBuffer>;\n}\n\nexport interface CreateCopierOptions {\n createCache?: () => Cache;\n methods?: CopierMethods;\n strict?: boolean;\n}\n\nexport interface RequiredCreateCopierOptions extends Omit<Required<CreateCopierOptions>, 'methods'> {\n copiers: Copiers;\n methods: Required<CopierMethods>;\n}\n\nexport function createDefaultCache(): Cache {\n return new WeakMap();\n}\n\nexport function getOptions({\n createCache: createCacheOverride,\n methods: methodsOverride,\n strict,\n}: CreateCopierOptions): RequiredCreateCopierOptions {\n const defaultMethods = {\n array: strict ? copyArrayStrict : copyArrayLoose,\n arrayBuffer: copyArrayBuffer,\n asyncGenerator: copySelf,\n blob: copyBlob,\n dataView: copyDataView,\n date: copyDate,\n error: copySelf,\n generator: copySelf,\n map: strict ? copyMapStrict : copyMapLoose,\n object: strict ? copyObjectStrict : copyObjectLoose,\n regExp: copyRegExp,\n set: strict ? copySetStrict : copySetLoose,\n };\n\n const methods = methodsOverride ? Object.assign(defaultMethods, methodsOverride) : defaultMethods;\n const copiers = getTagSpecificCopiers(methods);\n const createCache = createCacheOverride || createDefaultCache;\n\n // Extra safety check to ensure that object and array copiers are always provided,\n // avoiding runtime errors.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!copiers.Object || !copiers.Array) {\n throw new Error('An object and array copier must be provided.');\n }\n\n return { createCache, copiers, methods, strict: Boolean(strict) };\n}\n\n/**\n * Get the copiers used for each specific object tag.\n */\nexport function getTagSpecificCopiers(methods: Required<CopierMethods>): Copiers {\n return {\n Arguments: methods.object,\n Array: methods.array,\n ArrayBuffer: methods.arrayBuffer,\n AsyncGenerator: methods.asyncGenerator,\n BigInt64Array: methods.arrayBuffer,\n BigUint64Array: methods.arrayBuffer,\n Blob: methods.blob,\n Boolean: copyPrimitiveWrapper,\n DataView: methods.dataView,\n Date: methods.date,\n Error: methods.error,\n Float32Array: methods.arrayBuffer,\n Float64Array: methods.arrayBuffer,\n Generator: methods.generator,\n Int8Array: methods.arrayBuffer,\n Int16Array: methods.arrayBuffer,\n Int32Array: methods.arrayBuffer,\n Map: methods.map,\n Number: copyPrimitiveWrapper,\n Object: methods.object,\n Promise: copySelf,\n RegExp: methods.regExp,\n Set: methods.set,\n String: copyPrimitiveWrapper,\n WeakMap: copySelf,\n WeakSet: copySelf,\n Uint8Array: methods.arrayBuffer,\n Uint8ClampedArray: methods.arrayBuffer,\n Uint16Array: methods.arrayBuffer,\n Uint32Array: methods.arrayBuffer,\n };\n}\n","import type { State } from './copier.ts';\nimport { getOptions } from './options.js';\nimport type { CreateCopierOptions } from './options.ts';\nimport { getTag } from './utils.js';\n\nexport type { State } from './copier.ts';\nexport type { CreateCopierOptions } from './options.ts';\n\n/**\n * Create a custom copier based on custom options for any of the following:\n * - `createCache` method to create a cache for copied objects\n * - custom copier `methods` for specific object types\n * - `strict` mode to copy all properties with their descriptors\n */\nexport function createCopier(options: CreateCopierOptions = {}) {\n const { createCache, copiers } = getOptions(options);\n const { Array: copyArray, Object: copyObject } = copiers;\n\n function copier(value: any, state: State): any {\n state.prototype = state.Constructor = undefined;\n\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n if (state.cache.has(value)) {\n return state.cache.get(value);\n }\n\n state.prototype = Object.getPrototypeOf(value);\n // Using logical AND for speed, since optional chaining transforms to\n // a local variable usage.\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n state.Constructor = state.prototype && state.prototype.constructor;\n\n // plain objects\n if (!state.Constructor || state.Constructor === Object) {\n return copyObject(value as Record<string, any>, state);\n }\n\n // arrays\n if (Array.isArray(value)) {\n return copyArray(value, state);\n }\n\n const tagSpecificCopier = copiers[getTag(value)];\n\n if (tagSpecificCopier) {\n return tagSpecificCopier(value, state);\n }\n\n return typeof value.then === 'function' ? value : copyObject(value as Record<string, any>, state);\n }\n\n return function copy<Value>(value: Value): Value {\n return copier(value, {\n Constructor: undefined,\n cache: createCache(),\n copier,\n prototype: undefined,\n });\n };\n}\n\n/**\n * Copy an value deeply as much as possible, where strict recreation of object properties\n * are maintained. All properties (including non-enumerable ones) are copied with their\n * original property descriptors on both objects and arrays.\n */\nexport const copyStrict = createCopier({ strict: true });\n\n/**\n * Copy an value deeply as much as possible.\n */\nexport const copy = createCopier();\n"],"names":[],"mappings":";;;;;;IAMA;IACA,MAAM,gBA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