@adviser/cement 0.4.6 → 0.4.8
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/base-basic-sys-abstraction.test.d.ts +2 -0
- package/base-basic-sys-abstraction.test.d.ts.map +1 -0
- package/base-basic-sys-abstraction.test.js +88 -0
- package/base-basic-sys-abstraction.test.js.map +1 -0
- package/{base-sys-abstraction-h0dB3nZ5.d.ts → base-sys-abstraction.d.ts} +23 -22
- package/base-sys-abstraction.d.ts.map +1 -0
- package/base-sys-abstraction.js +193 -0
- package/base-sys-abstraction.js.map +1 -0
- package/bin2text.d.ts +3 -0
- package/bin2text.d.ts.map +1 -0
- package/bin2text.js +43 -0
- package/bin2text.js.map +1 -0
- package/bin2text.test.d.ts +2 -0
- package/bin2text.test.d.ts.map +1 -0
- package/bin2text.test.js +51 -0
- package/bin2text.test.js.map +1 -0
- package/cf/cf-basic-sys-abstraction.d.ts +14 -0
- package/cf/cf-basic-sys-abstraction.d.ts.map +1 -0
- package/cf/cf-basic-sys-abstraction.js +67 -0
- package/cf/cf-basic-sys-abstraction.js.map +1 -0
- package/cf/cf-env-actions.d.ts +16 -0
- package/cf/cf-env-actions.d.ts.map +1 -0
- package/cf/cf-env-actions.js +53 -0
- package/cf/cf-env-actions.js.map +1 -0
- package/cf/index.d.ts +3 -30
- package/cf/index.d.ts.map +1 -0
- package/cf/index.js +2 -11
- package/cf/index.js.map +1 -1
- package/cf-test-main.d.ts +5 -0
- package/cf-test-main.d.ts.map +1 -0
- package/cf-test-main.js +12 -0
- package/cf-test-main.js.map +1 -0
- package/coerce-binary.d.ts +6 -0
- package/coerce-binary.d.ts.map +1 -0
- package/coerce-binary.js +32 -0
- package/coerce-binary.js.map +1 -0
- package/coerce-binary.test.d.ts +2 -0
- package/coerce-binary.test.d.ts.map +1 -0
- package/coerce-binary.test.js +39 -0
- package/coerce-binary.test.js.map +1 -0
- package/crypto.d.ts +76 -0
- package/crypto.d.ts.map +1 -0
- package/crypto.js +22 -0
- package/crypto.js.map +1 -0
- package/crypto.test.d.ts +2 -0
- package/crypto.test.d.ts.map +1 -0
- package/crypto.test.js +21 -0
- package/crypto.test.js.map +1 -0
- package/deno/deno-basic-sys-abstraction.d.ts +14 -0
- package/deno/deno-basic-sys-abstraction.d.ts.map +1 -0
- package/deno/deno-basic-sys-abstraction.js +35 -0
- package/deno/deno-basic-sys-abstraction.js.map +1 -0
- package/deno/deno-env-actions.d.ts +23 -0
- package/deno/deno-env-actions.d.ts.map +1 -0
- package/deno/deno-env-actions.js +40 -0
- package/deno/deno-env-actions.js.map +1 -0
- package/deno/deno-file-service.d.ts +17 -0
- package/deno/deno-file-service.d.ts.map +1 -0
- package/deno/deno-file-service.js +67 -0
- package/deno/deno-file-service.js.map +1 -0
- package/deno/deno-sys-abstraction.d.ts +19 -0
- package/deno/deno-sys-abstraction.d.ts.map +1 -0
- package/deno/deno-sys-abstraction.js +96 -0
- package/deno/deno-sys-abstraction.js.map +1 -0
- package/deno/index.d.ts +3 -37
- package/deno/index.d.ts.map +1 -0
- package/deno/index.js +2 -179
- package/deno/index.js.map +1 -1
- package/file-service.d.ts +17 -0
- package/file-service.d.ts.map +1 -0
- package/file-service.js +2 -0
- package/file-service.js.map +1 -0
- package/future.d.ts +8 -0
- package/future.d.ts.map +1 -0
- package/future.js +25 -0
- package/future.js.map +1 -0
- package/future.test.d.ts +2 -0
- package/future.test.d.ts.map +1 -0
- package/future.test.js +32 -0
- package/future.test.js.map +1 -0
- package/http_header.d.ts +29 -0
- package/http_header.d.ts.map +1 -0
- package/http_header.js +157 -0
- package/http_header.js.map +1 -0
- package/http_header.test.d.ts +2 -0
- package/http_header.test.d.ts.map +1 -0
- package/http_header.test.js +96 -0
- package/http_header.test.js.map +1 -0
- package/index.d.ts +29 -396
- package/index.d.ts.map +1 -0
- package/index.js +28 -609
- package/index.js.map +1 -1
- package/is-promise.d.ts +4 -0
- package/is-promise.d.ts.map +1 -0
- package/is-promise.js +10 -0
- package/is-promise.js.map +1 -0
- package/is-promise.test.d.ts +2 -0
- package/is-promise.test.d.ts.map +1 -0
- package/is-promise.test.js +48 -0
- package/is-promise.test.js.map +1 -0
- package/json-en-decoder.d.ts +12 -0
- package/json-en-decoder.d.ts.map +1 -0
- package/json-en-decoder.js +42 -0
- package/json-en-decoder.js.map +1 -0
- package/json-en-decoder.test.d.ts +2 -0
- package/json-en-decoder.test.d.ts.map +1 -0
- package/json-en-decoder.test.js +18 -0
- package/json-en-decoder.test.js.map +1 -0
- package/log-level-impl.d.ts +17 -0
- package/log-level-impl.d.ts.map +1 -0
- package/log-level-impl.js +75 -0
- package/log-level-impl.js.map +1 -0
- package/log-writer-impl.d.ts +11 -0
- package/log-writer-impl.d.ts.map +1 -0
- package/log-writer-impl.js +52 -0
- package/log-writer-impl.js.map +1 -0
- package/logger-impl.d.ts +75 -0
- package/logger-impl.d.ts.map +1 -0
- package/logger-impl.js +505 -0
- package/logger-impl.js.map +1 -0
- package/logger.d.ts +97 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +150 -0
- package/logger.js.map +1 -0
- package/logger.test.d.ts +2 -0
- package/logger.test.d.ts.map +1 -0
- package/logger.test.js +1577 -0
- package/logger.test.js.map +1 -0
- package/lru-map-set.d.ts +33 -0
- package/lru-map-set.d.ts.map +1 -0
- package/lru-map-set.js +116 -0
- package/lru-map-set.js.map +1 -0
- package/lru-map-set.test.d.ts +2 -0
- package/lru-map-set.test.d.ts.map +1 -0
- package/lru-map-set.test.js +81 -0
- package/lru-map-set.test.js.map +1 -0
- package/node/index.d.ts +4 -45
- package/node/index.d.ts.map +1 -0
- package/node/index.js +3 -222
- package/node/index.js.map +1 -1
- package/node/mock-file-service.d.ts +11 -0
- package/node/mock-file-service.d.ts.map +1 -0
- package/node/mock-file-service.js +31 -0
- package/node/mock-file-service.js.map +1 -0
- package/node/mock-file-service.test.d.ts +2 -0
- package/node/mock-file-service.test.d.ts.map +1 -0
- package/node/mock-file-service.test.js +31 -0
- package/node/mock-file-service.test.js.map +1 -0
- package/node/node-basic-sys-abstraction.d.ts +25 -0
- package/node/node-basic-sys-abstraction.d.ts.map +1 -0
- package/node/node-basic-sys-abstraction.js +45 -0
- package/node/node-basic-sys-abstraction.js.map +1 -0
- package/node/node-env-actions.d.ts +15 -0
- package/node/node-env-actions.d.ts.map +1 -0
- package/node/node-env-actions.js +38 -0
- package/node/node-env-actions.js.map +1 -0
- package/node/node-file-service.d.ts +16 -0
- package/node/node-file-service.d.ts.map +1 -0
- package/node/node-file-service.js +72 -0
- package/node/node-file-service.js.map +1 -0
- package/node/node-sys-abstraction.d.ts +19 -0
- package/node/node-sys-abstraction.d.ts.map +1 -0
- package/node/node-sys-abstraction.js +95 -0
- package/node/node-sys-abstraction.js.map +1 -0
- package/node/node-sys-abstraction.test.d.ts +2 -0
- package/node/node-sys-abstraction.test.d.ts.map +1 -0
- package/node/node-sys-abstraction.test.js +83 -0
- package/node/node-sys-abstraction.test.js.map +1 -0
- package/option.d.ts +26 -0
- package/option.d.ts.map +1 -0
- package/option.js +54 -0
- package/option.js.map +1 -0
- package/package.json +4 -10
- package/path-ops.d.ts +7 -0
- package/path-ops.d.ts.map +1 -0
- package/path-ops.js +35 -0
- package/path-ops.js.map +1 -0
- package/path-ops.test.d.ts +2 -0
- package/path-ops.test.d.ts.map +1 -0
- package/path-ops.test.js +39 -0
- package/path-ops.test.js.map +1 -0
- package/resolve-once.d.ts +59 -0
- package/resolve-once.d.ts.map +1 -0
- package/resolve-once.js +212 -0
- package/resolve-once.js.map +1 -0
- package/resolve-once.test.d.ts +2 -0
- package/resolve-once.test.d.ts.map +1 -0
- package/resolve-once.test.js +392 -0
- package/resolve-once.test.js.map +1 -0
- package/result.d.ts +34 -0
- package/result.d.ts.map +1 -0
- package/result.js +94 -0
- package/result.js.map +1 -0
- package/result.test.d.ts +2 -0
- package/result.test.d.ts.map +1 -0
- package/result.test.js +83 -0
- package/result.test.js.map +1 -0
- package/runtime.d.ts +9 -0
- package/runtime.d.ts.map +1 -0
- package/runtime.js +33 -0
- package/runtime.js.map +1 -0
- package/src/jsr.json +1 -1
- package/src/uri.ts +66 -37
- package/sys-abstraction.d.ts +43 -0
- package/sys-abstraction.d.ts.map +1 -0
- package/sys-abstraction.js +28 -0
- package/sys-abstraction.js.map +1 -0
- package/sys-env.d.ts +46 -0
- package/sys-env.d.ts.map +1 -0
- package/sys-env.js +161 -0
- package/sys-env.js.map +1 -0
- package/sys-env.test.d.ts +2 -0
- package/sys-env.test.d.ts.map +1 -0
- package/sys-env.test.js +170 -0
- package/sys-env.test.js.map +1 -0
- package/test/index.d.ts +3 -4
- package/test/index.d.ts.map +1 -0
- package/test/index.js +2 -13
- package/test/index.js.map +1 -1
- package/test/log-write-stream.d.ts +27 -0
- package/test/log-write-stream.d.ts.map +1 -0
- package/test/log-write-stream.js +78 -0
- package/test/log-write-stream.js.map +1 -0
- package/test/mock-logger.d.ts +14 -0
- package/test/mock-logger.d.ts.map +1 -0
- package/test/mock-logger.js +29 -0
- package/test/mock-logger.js.map +1 -0
- package/test/mock-logger.test.d.ts +2 -0
- package/test/mock-logger.test.d.ts.map +1 -0
- package/test/mock-logger.test.js +63 -0
- package/test/mock-logger.test.js.map +1 -0
- package/test/test-exit-handler.d.ts +2 -0
- package/test/test-exit-handler.d.ts.map +1 -0
- package/test/test-exit-handler.js +61 -0
- package/test/test-exit-handler.js.map +1 -0
- package/time.d.ts +14 -0
- package/time.d.ts.map +1 -0
- package/time.js +13 -0
- package/time.js.map +1 -0
- package/tracer.d.ts +59 -0
- package/tracer.d.ts.map +1 -0
- package/tracer.js +174 -0
- package/tracer.js.map +1 -0
- package/tracer.test.d.ts +2 -0
- package/tracer.test.d.ts.map +1 -0
- package/tracer.test.js +304 -0
- package/tracer.test.js.map +1 -0
- package/ts/smoke/smoke.js +1 -1
- package/ts/smoke/smoke.js.map +1 -1
- package/ts/src/base-sys-abstraction.js +20 -8
- package/ts/src/base-sys-abstraction.js.map +1 -1
- package/ts/src/cf/cf-basic-sys-abstraction.js +3 -3
- package/ts/src/cf/cf-basic-sys-abstraction.js.map +1 -1
- package/ts/src/cf/cf-env-actions.js +3 -1
- package/ts/src/cf/cf-env-actions.js.map +1 -1
- package/ts/src/coerce-binary.js +1 -1
- package/ts/src/coerce-binary.js.map +1 -1
- package/ts/src/deno/deno-basic-sys-abstraction.js +3 -3
- package/ts/src/deno/deno-basic-sys-abstraction.js.map +1 -1
- package/ts/src/deno/deno-env-actions.js +3 -9
- package/ts/src/deno/deno-env-actions.js.map +1 -1
- package/ts/src/deno/deno-file-service.js +2 -0
- package/ts/src/deno/deno-file-service.js.map +1 -1
- package/ts/src/deno/deno-sys-abstraction.js +21 -21
- package/ts/src/deno/deno-sys-abstraction.js.map +1 -1
- package/ts/src/future.js +13 -26
- package/ts/src/future.js.map +1 -1
- package/ts/src/http_header.js +2 -3
- package/ts/src/http_header.js.map +1 -1
- package/ts/src/json-en-decoder.js +3 -2
- package/ts/src/json-en-decoder.js.map +1 -1
- package/ts/src/log-level-impl.js +4 -6
- package/ts/src/log-level-impl.js.map +1 -1
- package/ts/src/log-writer-impl.js +9 -5
- package/ts/src/log-writer-impl.js.map +1 -1
- package/ts/src/logger-impl.js +15 -5
- package/ts/src/logger-impl.js.map +1 -1
- package/ts/src/logger.js +3 -3
- package/ts/src/logger.js.map +1 -1
- package/ts/src/logger.test.js +7 -19
- package/ts/src/logger.test.js.map +1 -1
- package/ts/src/lru-map-set.js +3 -1
- package/ts/src/lru-map-set.js.map +1 -1
- package/ts/src/node/mock-file-service.js +1 -4
- package/ts/src/node/mock-file-service.js.map +1 -1
- package/ts/src/node/node-basic-sys-abstraction.js +4 -3
- package/ts/src/node/node-basic-sys-abstraction.js.map +1 -1
- package/ts/src/node/node-env-actions.js +3 -9
- package/ts/src/node/node-env-actions.js.map +1 -1
- package/ts/src/node/node-file-service.js +1 -0
- package/ts/src/node/node-file-service.js.map +1 -1
- package/ts/src/node/node-sys-abstraction.js +21 -21
- package/ts/src/node/node-sys-abstraction.js.map +1 -1
- package/ts/src/option.js +1 -0
- package/ts/src/option.js.map +1 -1
- package/ts/src/path-ops.js +21 -30
- package/ts/src/path-ops.js.map +1 -1
- package/ts/src/resolve-once.js +17 -13
- package/ts/src/resolve-once.js.map +1 -1
- package/ts/src/result.js +2 -0
- package/ts/src/result.js.map +1 -1
- package/ts/src/sys-abstraction.js +1 -1
- package/ts/src/sys-abstraction.js.map +1 -1
- package/ts/src/sys-env.js +2 -1
- package/ts/src/sys-env.js.map +1 -1
- package/ts/src/sys-env.test.js +6 -19
- package/ts/src/sys-env.test.js.map +1 -1
- package/ts/src/test/log-write-stream.js +10 -6
- package/ts/src/test/log-write-stream.js.map +1 -1
- package/ts/src/test/mock-logger.js +6 -6
- package/ts/src/test/mock-logger.js.map +1 -1
- package/ts/src/test/test-exit-handler.js +1 -2
- package/ts/src/test/test-exit-handler.js.map +1 -1
- package/ts/src/tracer.js +10 -3
- package/ts/src/tracer.js.map +1 -1
- package/ts/src/tracer.test.js +5 -9
- package/ts/src/tracer.test.js.map +1 -1
- package/ts/src/txt-en-decoder.js +2 -4
- package/ts/src/txt-en-decoder.js.map +1 -1
- package/ts/src/types.js +2 -6
- package/ts/src/types.js.map +1 -1
- package/ts/src/uri.d.ts +5 -0
- package/ts/src/uri.d.ts.map +1 -1
- package/ts/src/uri.js +57 -34
- package/ts/src/uri.js.map +1 -1
- package/ts/src/uri.test.js +47 -0
- package/ts/src/uri.test.js.map +1 -1
- package/ts/src/utils/console-write-stream.js +8 -5
- package/ts/src/utils/console-write-stream.js.map +1 -1
- package/ts/src/utils/fanout-write-stream.js +4 -1
- package/ts/src/utils/fanout-write-stream.js.map +1 -1
- package/ts/src/utils/rebuffer.test.js +1 -1
- package/ts/src/utils/rebuffer.test.js.map +1 -1
- package/ts/src/utils/relative-path.js +1 -0
- package/ts/src/utils/relative-path.js.map +1 -1
- package/ts/src/utils/stream-map.test.js +1 -1
- package/ts/src/utils/stream-map.test.js.map +1 -1
- package/ts/src/web/web-basic-sys-abstraction.js +3 -3
- package/ts/src/web/web-basic-sys-abstraction.js.map +1 -1
- package/ts/src/web/web-env-actions.js +2 -1
- package/ts/src/web/web-env-actions.js.map +1 -1
- package/txt-en-decoder.d.ts +11 -0
- package/txt-en-decoder.d.ts.map +1 -0
- package/txt-en-decoder.js +37 -0
- package/txt-en-decoder.js.map +1 -0
- package/txt-en-decoder.test.d.ts +2 -0
- package/txt-en-decoder.test.d.ts.map +1 -0
- package/txt-en-decoder.test.js +48 -0
- package/txt-en-decoder.test.js.map +1 -0
- package/types.d.ts +16 -0
- package/types.d.ts.map +1 -0
- package/types.js +11 -0
- package/types.js.map +1 -0
- package/uri.d.ts +137 -0
- package/uri.d.ts.map +1 -0
- package/uri.js +567 -0
- package/uri.js.map +1 -0
- package/uri.test.d.ts +2 -0
- package/uri.test.d.ts.map +1 -0
- package/uri.test.js +633 -0
- package/uri.test.js.map +1 -0
- package/utils/coerce-uint8.d.ts +8 -0
- package/utils/coerce-uint8.d.ts.map +1 -0
- package/utils/coerce-uint8.js +34 -0
- package/utils/coerce-uint8.js.map +1 -0
- package/utils/console-write-stream.d.ts +21 -0
- package/utils/console-write-stream.d.ts.map +1 -0
- package/utils/console-write-stream.js +66 -0
- package/utils/console-write-stream.js.map +1 -0
- package/utils/fanout-write-stream.d.ts +12 -0
- package/utils/fanout-write-stream.d.ts.map +1 -0
- package/utils/fanout-write-stream.js +27 -0
- package/utils/fanout-write-stream.js.map +1 -0
- package/utils/get-params-result.d.ts +8 -0
- package/utils/get-params-result.d.ts.map +1 -0
- package/utils/get-params-result.js +45 -0
- package/utils/get-params-result.js.map +1 -0
- package/utils/index.d.ts +12 -3
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +11 -50
- package/utils/index.js.map +1 -1
- package/utils/rebuffer.d.ts +3 -0
- package/utils/rebuffer.d.ts.map +1 -0
- package/utils/rebuffer.js +66 -0
- package/utils/rebuffer.js.map +1 -0
- package/utils/rebuffer.test.d.ts +2 -0
- package/utils/rebuffer.test.d.ts.map +1 -0
- package/utils/rebuffer.test.js +77 -0
- package/utils/rebuffer.test.js.map +1 -0
- package/utils/relative-path.d.ts +18 -0
- package/utils/relative-path.d.ts.map +1 -0
- package/utils/relative-path.js +148 -0
- package/utils/relative-path.js.map +1 -0
- package/utils/relative-path.test.d.ts +2 -0
- package/utils/relative-path.test.d.ts.map +1 -0
- package/utils/relative-path.test.js +187 -0
- package/utils/relative-path.test.js.map +1 -0
- package/utils/sorted-objec.test.d.ts +2 -0
- package/utils/sorted-objec.test.d.ts.map +1 -0
- package/utils/sorted-objec.test.js +20 -0
- package/utils/sorted-objec.test.js.map +1 -0
- package/utils/sorted-object.d.ts +4 -0
- package/utils/sorted-object.d.ts.map +1 -0
- package/utils/sorted-object.js +16 -0
- package/utils/sorted-object.js.map +1 -0
- package/utils/stream-map.d.ts +9 -0
- package/utils/stream-map.d.ts.map +1 -0
- package/utils/stream-map.js +63 -0
- package/utils/stream-map.js.map +1 -0
- package/utils/stream-map.test.d.ts +2 -0
- package/utils/stream-map.test.d.ts.map +1 -0
- package/utils/stream-map.test.js +87 -0
- package/utils/stream-map.test.js.map +1 -0
- package/utils/stream-test-helper.d.ts +17 -0
- package/utils/stream-test-helper.d.ts.map +1 -0
- package/utils/stream-test-helper.js +45 -0
- package/utils/stream-test-helper.js.map +1 -0
- package/utils/stream2string.d.ts +3 -0
- package/utils/stream2string.d.ts.map +1 -0
- package/utils/stream2string.js +48 -0
- package/utils/stream2string.js.map +1 -0
- package/utils/stream2string.test.d.ts +2 -0
- package/utils/stream2string.test.d.ts.map +1 -0
- package/utils/stream2string.test.js +29 -0
- package/utils/stream2string.test.js.map +1 -0
- package/utils/string2stream.d.ts +4 -0
- package/utils/string2stream.d.ts.map +1 -0
- package/utils/string2stream.js +13 -0
- package/utils/string2stream.js.map +1 -0
- package/utils/string2stream.test.d.ts +2 -0
- package/utils/string2stream.test.d.ts.map +1 -0
- package/utils/string2stream.test.js +6 -0
- package/utils/string2stream.test.js.map +1 -0
- package/utils/stripper.d.ts +3 -0
- package/utils/stripper.d.ts.map +1 -0
- package/utils/stripper.js +59 -0
- package/utils/stripper.js.map +1 -0
- package/utils/stripper.test.d.ts +2 -0
- package/utils/stripper.test.d.ts.map +1 -0
- package/utils/stripper.test.js +128 -0
- package/utils/stripper.test.js.map +1 -0
- package/utils/uint8array-equal.d.ts +2 -0
- package/utils/uint8array-equal.d.ts.map +1 -0
- package/utils/uint8array-equal.js +12 -0
- package/utils/uint8array-equal.js.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +4 -0
- package/version.js.map +1 -0
- package/web/index.d.ts +2 -7
- package/web/index.d.ts.map +1 -0
- package/web/index.js +1 -7
- package/web/index.js.map +1 -1
- package/web/web-basic-sys-abstraction.d.ts +4 -0
- package/web/web-basic-sys-abstraction.d.ts.map +1 -0
- package/web/web-basic-sys-abstraction.js +45 -0
- package/web/web-basic-sys-abstraction.js.map +1 -0
- package/web/web-env-actions.d.ts +14 -0
- package/web/web-env-actions.d.ts.map +1 -0
- package/web/web-env-actions.js +36 -0
- package/web/web-env-actions.js.map +1 -0
- package/base-sys-abstraction-DgTynXGV.d.cts +0 -95
- package/cf/index.cjs +0 -1110
- package/cf/index.cjs.map +0 -1
- package/cf/index.d.cts +0 -30
- package/chunk-FOALXQST.js +0 -89
- package/chunk-FOALXQST.js.map +0 -1
- package/chunk-FURW5CDL.js +0 -792
- package/chunk-FURW5CDL.js.map +0 -1
- package/chunk-NJMNJYN2.js +0 -270
- package/chunk-NJMNJYN2.js.map +0 -1
- package/chunk-NTOGMD33.js +0 -684
- package/chunk-NTOGMD33.js.map +0 -1
- package/chunk-O3CWMM7E.js +0 -1678
- package/chunk-O3CWMM7E.js.map +0 -1
- package/deno/index.cjs +0 -1280
- package/deno/index.cjs.map +0 -1
- package/deno/index.d.cts +0 -37
- package/get-params-result-4xHM5s4_.d.cts +0 -71
- package/get-params-result-4xHM5s4_.d.ts +0 -71
- package/index-CMLb7JSe.d.ts +0 -97
- package/index-DL2hPDP5.d.cts +0 -296
- package/index-DTF3tq6t.d.ts +0 -296
- package/index-LQOsS7gM.d.cts +0 -97
- package/index.cjs +0 -4006
- package/index.cjs.map +0 -1
- package/index.d.cts +0 -396
- package/metafile-cjs.json +0 -1
- package/metafile-esm.json +0 -1
- package/node/index.cjs +0 -1335
- package/node/index.cjs.map +0 -1
- package/node/index.d.cts +0 -45
- package/stripper-BpBUUZ9p.d.cts +0 -4
- package/stripper-BpBUUZ9p.d.ts +0 -4
- package/sys-abstraction-CeAxxg9H.d.ts +0 -117
- package/sys-abstraction-DDAwGTnk.d.cts +0 -117
- package/test/index.cjs +0 -2991
- package/test/index.cjs.map +0 -1
- package/test/index.d.cts +0 -4
- package/utils/index.cjs +0 -778
- package/utils/index.cjs.map +0 -1
- package/utils/index.d.cts +0 -3
- package/web/index.cjs +0 -1153
- package/web/index.cjs.map +0 -1
- package/web/index.d.cts +0 -7
package/chunk-NTOGMD33.js
DELETED
@@ -1,684 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __typeError = (msg) => {
|
3
|
-
throw TypeError(msg);
|
4
|
-
};
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
-
};
|
9
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
10
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
11
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
12
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
13
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
14
|
-
|
15
|
-
// src/is-promise.ts
|
16
|
-
function isPromise(a) {
|
17
|
-
const mayBe = a;
|
18
|
-
return mayBe instanceof Promise || !!(mayBe && mayBe !== null && typeof mayBe.then === "function" && typeof mayBe.catch === "function" && typeof mayBe.finally === "function");
|
19
|
-
}
|
20
|
-
|
21
|
-
// src/result.ts
|
22
|
-
var Result = class _Result {
|
23
|
-
static Ok(t) {
|
24
|
-
return new ResultOK(t);
|
25
|
-
}
|
26
|
-
static Err(t) {
|
27
|
-
if (typeof t === "string") {
|
28
|
-
return new ResultError(new Error(t));
|
29
|
-
}
|
30
|
-
if (_Result.Is(t)) {
|
31
|
-
if (t.is_ok()) {
|
32
|
-
return new ResultError(new Error("Result Error is Ok"));
|
33
|
-
}
|
34
|
-
return t;
|
35
|
-
}
|
36
|
-
return new ResultError(t);
|
37
|
-
}
|
38
|
-
static Is(t) {
|
39
|
-
if (!t) {
|
40
|
-
return false;
|
41
|
-
}
|
42
|
-
if (t instanceof _Result) {
|
43
|
-
return true;
|
44
|
-
}
|
45
|
-
const rt = t;
|
46
|
-
if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === "function")) {
|
47
|
-
return true;
|
48
|
-
}
|
49
|
-
return false;
|
50
|
-
}
|
51
|
-
isOk() {
|
52
|
-
return this.is_ok();
|
53
|
-
}
|
54
|
-
isErr() {
|
55
|
-
return this.is_err();
|
56
|
-
}
|
57
|
-
Ok() {
|
58
|
-
return this.unwrap();
|
59
|
-
}
|
60
|
-
Err() {
|
61
|
-
return this.unwrap_err();
|
62
|
-
}
|
63
|
-
};
|
64
|
-
var ResultOK = class extends Result {
|
65
|
-
constructor(t) {
|
66
|
-
super();
|
67
|
-
this._t = t;
|
68
|
-
}
|
69
|
-
is_ok() {
|
70
|
-
return true;
|
71
|
-
}
|
72
|
-
is_err() {
|
73
|
-
return false;
|
74
|
-
}
|
75
|
-
unwrap_err() {
|
76
|
-
throw new Error("Result is Ok");
|
77
|
-
}
|
78
|
-
unwrap() {
|
79
|
-
return this._t;
|
80
|
-
}
|
81
|
-
};
|
82
|
-
var ResultError = class extends Result {
|
83
|
-
constructor(t) {
|
84
|
-
super();
|
85
|
-
this._error = t;
|
86
|
-
}
|
87
|
-
is_ok() {
|
88
|
-
return false;
|
89
|
-
}
|
90
|
-
is_err() {
|
91
|
-
return true;
|
92
|
-
}
|
93
|
-
unwrap() {
|
94
|
-
throw new Error(`Result is Err: ${this._error}`);
|
95
|
-
}
|
96
|
-
unwrap_err() {
|
97
|
-
return this._error;
|
98
|
-
}
|
99
|
-
};
|
100
|
-
function exception2Result(fn) {
|
101
|
-
try {
|
102
|
-
const res = fn();
|
103
|
-
if (isPromise(res)) {
|
104
|
-
return res.then((value) => Result.Ok(value)).catch((e) => Result.Err(e));
|
105
|
-
}
|
106
|
-
return Result.Ok(res);
|
107
|
-
} catch (e) {
|
108
|
-
return Result.Err(e);
|
109
|
-
}
|
110
|
-
}
|
111
|
-
|
112
|
-
// src/types.ts
|
113
|
-
var _Required = class {
|
114
|
-
constructor() {
|
115
|
-
this.type = "REQUIRED";
|
116
|
-
}
|
117
|
-
};
|
118
|
-
var _Optional = class {
|
119
|
-
constructor() {
|
120
|
-
this.type = "OPTIONAL";
|
121
|
-
}
|
122
|
-
};
|
123
|
-
var param = {
|
124
|
-
REQUIRED: new _Required(),
|
125
|
-
OPTIONAL: new _Optional()
|
126
|
-
};
|
127
|
-
|
128
|
-
// src/utils/get-params-result.ts
|
129
|
-
function getParamsResult(keys, getParam) {
|
130
|
-
const keyDef = keys.flat().reduce(
|
131
|
-
(acc, i) => {
|
132
|
-
if (typeof i === "string") {
|
133
|
-
acc.push({ key: i, def: void 0, isOptional: false });
|
134
|
-
} else if (typeof i === "object") {
|
135
|
-
acc.push(
|
136
|
-
...Object.keys(i).map((k) => ({
|
137
|
-
key: k,
|
138
|
-
def: typeof i[k] === "string" ? i[k] : void 0,
|
139
|
-
isOptional: i[k] === param.OPTIONAL
|
140
|
-
}))
|
141
|
-
);
|
142
|
-
}
|
143
|
-
return acc;
|
144
|
-
},
|
145
|
-
[]
|
146
|
-
);
|
147
|
-
const msgFn = keys.find((k) => typeof k === "function") || ((...keys2) => {
|
148
|
-
const msg = keys2.join(",");
|
149
|
-
return `missing parameters: ${msg}`;
|
150
|
-
});
|
151
|
-
const errors = [];
|
152
|
-
const result = {};
|
153
|
-
for (const kd of keyDef) {
|
154
|
-
const val = getParam.getParam(kd.key);
|
155
|
-
if (val === void 0) {
|
156
|
-
if (typeof kd.def === "string") {
|
157
|
-
result[kd.key] = kd.def;
|
158
|
-
} else {
|
159
|
-
if (!kd.isOptional) {
|
160
|
-
errors.push(kd.key);
|
161
|
-
}
|
162
|
-
}
|
163
|
-
} else {
|
164
|
-
result[kd.key] = val;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
if (errors.length) {
|
168
|
-
return Result.Err(msgFn(...errors));
|
169
|
-
}
|
170
|
-
return Result.Ok(result);
|
171
|
-
}
|
172
|
-
|
173
|
-
// src/future.ts
|
174
|
-
var _promise, _resolveFn, _rejectFn;
|
175
|
-
var Future = class {
|
176
|
-
constructor() {
|
177
|
-
__privateAdd(this, _promise);
|
178
|
-
__privateAdd(this, _resolveFn, () => {
|
179
|
-
throw new Error("This Promise is not working as expected.");
|
180
|
-
});
|
181
|
-
__privateAdd(this, _rejectFn, () => {
|
182
|
-
throw new Error("This Promise is not working as expected.");
|
183
|
-
});
|
184
|
-
__privateSet(this, _promise, new Promise((resolve, reject) => {
|
185
|
-
__privateSet(this, _resolveFn, resolve);
|
186
|
-
__privateSet(this, _rejectFn, reject);
|
187
|
-
}));
|
188
|
-
}
|
189
|
-
async asPromise() {
|
190
|
-
return __privateGet(this, _promise);
|
191
|
-
}
|
192
|
-
resolve(value) {
|
193
|
-
__privateGet(this, _resolveFn).call(this, value);
|
194
|
-
}
|
195
|
-
reject(reason) {
|
196
|
-
__privateGet(this, _rejectFn).call(this, reason);
|
197
|
-
}
|
198
|
-
};
|
199
|
-
_promise = new WeakMap();
|
200
|
-
_resolveFn = new WeakMap();
|
201
|
-
_rejectFn = new WeakMap();
|
202
|
-
|
203
|
-
// src/lru-map-set.ts
|
204
|
-
var LRUSet = class {
|
205
|
-
constructor(param2 = {}) {
|
206
|
-
this._lruMap = new LRUMap(param2);
|
207
|
-
}
|
208
|
-
setParam(param2 = {}) {
|
209
|
-
this._lruMap.setParam(param2);
|
210
|
-
}
|
211
|
-
get size() {
|
212
|
-
return this._lruMap.size;
|
213
|
-
}
|
214
|
-
has(key) {
|
215
|
-
return this._lruMap.has(key);
|
216
|
-
}
|
217
|
-
add(key) {
|
218
|
-
this._lruMap.set(key, key);
|
219
|
-
}
|
220
|
-
delete(key) {
|
221
|
-
this._lruMap.delete(key);
|
222
|
-
}
|
223
|
-
clear() {
|
224
|
-
this._lruMap.clear();
|
225
|
-
}
|
226
|
-
forEach(callbackfn) {
|
227
|
-
this._lruMap.forEach((value) => callbackfn(value, value));
|
228
|
-
}
|
229
|
-
entries() {
|
230
|
-
return this._lruMap.entries();
|
231
|
-
}
|
232
|
-
};
|
233
|
-
var LRUMap = class {
|
234
|
-
constructor(c = {}) {
|
235
|
-
this._map = /* @__PURE__ */ new Map();
|
236
|
-
this.param = {
|
237
|
-
maxEntries: c.maxEntries || 100,
|
238
|
-
maxAge: c.maxAge || 0
|
239
|
-
};
|
240
|
-
}
|
241
|
-
touch(key) {
|
242
|
-
if (!this._map.has(key)) {
|
243
|
-
throw new Error(`key not found in cache: ${key}`);
|
244
|
-
}
|
245
|
-
const value = this._map.get(key);
|
246
|
-
this._map.delete(key);
|
247
|
-
this._map.set(key, value);
|
248
|
-
return value;
|
249
|
-
}
|
250
|
-
setParam(param2 = {}) {
|
251
|
-
if (typeof param2.maxEntries === "number") {
|
252
|
-
this.param.maxEntries = param2.maxEntries;
|
253
|
-
if (param2.maxEntries > 0 && this._map.size > param2.maxEntries) {
|
254
|
-
const toDelete = [];
|
255
|
-
let cacheSize = this._map.size;
|
256
|
-
for (const key of this._map.keys()) {
|
257
|
-
if (cacheSize > param2.maxEntries) {
|
258
|
-
toDelete.push(key);
|
259
|
-
cacheSize--;
|
260
|
-
} else {
|
261
|
-
break;
|
262
|
-
}
|
263
|
-
}
|
264
|
-
for (const key of toDelete) {
|
265
|
-
this._map.delete(key);
|
266
|
-
}
|
267
|
-
}
|
268
|
-
}
|
269
|
-
}
|
270
|
-
has(key) {
|
271
|
-
return this._map.has(key);
|
272
|
-
}
|
273
|
-
get size() {
|
274
|
-
return this._map.size;
|
275
|
-
}
|
276
|
-
async getSet(key, createFN) {
|
277
|
-
const val = this.get(key);
|
278
|
-
if (val) {
|
279
|
-
return val;
|
280
|
-
} else {
|
281
|
-
const val2 = await createFN(key);
|
282
|
-
this.set(key, val2);
|
283
|
-
return val2;
|
284
|
-
}
|
285
|
-
}
|
286
|
-
get(key) {
|
287
|
-
if (this._map.has(key)) {
|
288
|
-
return this.touch(key);
|
289
|
-
}
|
290
|
-
return this._map.get(key);
|
291
|
-
}
|
292
|
-
set(key, value) {
|
293
|
-
this._map.delete(key);
|
294
|
-
if (this.param.maxEntries > 0 && this._map.size >= this.param.maxEntries) {
|
295
|
-
this._map.delete(this._map.keys().next().value);
|
296
|
-
this._map.set(key, value);
|
297
|
-
} else {
|
298
|
-
this._map.set(key, value);
|
299
|
-
}
|
300
|
-
}
|
301
|
-
delete(key) {
|
302
|
-
this._map.delete(key);
|
303
|
-
}
|
304
|
-
clear() {
|
305
|
-
this._map.clear();
|
306
|
-
}
|
307
|
-
forEach(callbackfn) {
|
308
|
-
this._map.forEach(callbackfn);
|
309
|
-
}
|
310
|
-
entries() {
|
311
|
-
return this._map.entries();
|
312
|
-
}
|
313
|
-
// *entries(): IterableIterator<[T, K]> {
|
314
|
-
// for (const x of this._cache.entries()) {
|
315
|
-
// yield x;
|
316
|
-
// }
|
317
|
-
// }
|
318
|
-
// getLeastRecent(): K {
|
319
|
-
// return Array.from(this.cache)[0];
|
320
|
-
// }
|
321
|
-
// getMostRecent(): K {
|
322
|
-
// return Array.from(this.cache)[this.cache.size - 1];
|
323
|
-
// }
|
324
|
-
};
|
325
|
-
|
326
|
-
// src/resolve-once.ts
|
327
|
-
var ResolveSeq = class {
|
328
|
-
constructor(ctx) {
|
329
|
-
this._flushWaiting = [];
|
330
|
-
this._seqFutures = [];
|
331
|
-
this.ctx = ctx;
|
332
|
-
}
|
333
|
-
reset() {
|
334
|
-
}
|
335
|
-
flush() {
|
336
|
-
var _a;
|
337
|
-
if (this._seqFutures.length > 0) {
|
338
|
-
const waitForFlush = new Future();
|
339
|
-
(_a = this._flushWaiting) == null ? void 0 : _a.push(waitForFlush);
|
340
|
-
return waitForFlush.asPromise();
|
341
|
-
}
|
342
|
-
return Promise.resolve();
|
343
|
-
}
|
344
|
-
_step(item) {
|
345
|
-
var _a;
|
346
|
-
if (!item) {
|
347
|
-
this._flushWaiting.forEach((f) => f.resolve());
|
348
|
-
(_a = this._flushWaiting) == null ? void 0 : _a.splice(0, this._flushWaiting.length);
|
349
|
-
return Promise.resolve();
|
350
|
-
}
|
351
|
-
item.fn(this.ctx).then((value) => item.future.resolve(value)).catch((e) => item.future.reject(e)).finally(() => {
|
352
|
-
this._seqFutures.shift();
|
353
|
-
void this._step(this._seqFutures[0]);
|
354
|
-
});
|
355
|
-
return Promise.resolve();
|
356
|
-
}
|
357
|
-
async add(fn, id) {
|
358
|
-
const future = new Future();
|
359
|
-
this._seqFutures.push({ future, fn, id });
|
360
|
-
if (this._seqFutures.length === 1) {
|
361
|
-
void this._step(this._seqFutures[0]);
|
362
|
-
}
|
363
|
-
return future.asPromise();
|
364
|
-
}
|
365
|
-
};
|
366
|
-
var ResolveOnce = class {
|
367
|
-
constructor(ctx) {
|
368
|
-
this._onceDone = false;
|
369
|
-
this._onceFutures = [];
|
370
|
-
this._onceOk = false;
|
371
|
-
this._isPromise = false;
|
372
|
-
this.ctx = ctx;
|
373
|
-
}
|
374
|
-
get ready() {
|
375
|
-
return this._onceDone;
|
376
|
-
}
|
377
|
-
reset() {
|
378
|
-
this._onceDone = false;
|
379
|
-
this._onceOk = false;
|
380
|
-
this._onceValue = void 0;
|
381
|
-
this._onceError = void 0;
|
382
|
-
if (this._inProgress) {
|
383
|
-
const idx = this._onceFutures.findIndex((f) => f === this._inProgress);
|
384
|
-
if (idx >= 0) {
|
385
|
-
this._onceFutures.push(...this._onceFutures.splice(2).slice(1));
|
386
|
-
}
|
387
|
-
} else {
|
388
|
-
this._onceFutures.length = 0;
|
389
|
-
}
|
390
|
-
}
|
391
|
-
// T extends Option<infer U> ? U : T
|
392
|
-
once(fn) {
|
393
|
-
if (this._onceDone) {
|
394
|
-
if (this._onceError) {
|
395
|
-
if (this._isPromise) {
|
396
|
-
return Promise.reject(this._onceError);
|
397
|
-
} else {
|
398
|
-
throw this._onceError;
|
399
|
-
}
|
400
|
-
}
|
401
|
-
if (this._onceOk) {
|
402
|
-
if (this._isPromise) {
|
403
|
-
return Promise.resolve(this._onceValue);
|
404
|
-
} else {
|
405
|
-
return this._onceValue;
|
406
|
-
}
|
407
|
-
}
|
408
|
-
throw new Error("ResolveOnce.once impossible");
|
409
|
-
}
|
410
|
-
const future = new Future();
|
411
|
-
this._onceFutures.push(future);
|
412
|
-
if (this._onceFutures.length === 1) {
|
413
|
-
const okFn = (value) => {
|
414
|
-
this._onceValue = value;
|
415
|
-
this._onceOk = true;
|
416
|
-
this._onceDone = true;
|
417
|
-
if (this._isPromise) {
|
418
|
-
this._onceFutures.forEach((f) => f.resolve(this._onceValue));
|
419
|
-
}
|
420
|
-
this._onceFutures.length = 0;
|
421
|
-
};
|
422
|
-
const catchFn = (e) => {
|
423
|
-
this._onceError = e;
|
424
|
-
this._onceOk = false;
|
425
|
-
this._onceValue = void 0;
|
426
|
-
this._onceDone = true;
|
427
|
-
if (this._isPromise) {
|
428
|
-
this._onceFutures.forEach((f) => f.reject(this._onceError));
|
429
|
-
}
|
430
|
-
this._onceFutures.length = 0;
|
431
|
-
};
|
432
|
-
this._inProgress = future;
|
433
|
-
try {
|
434
|
-
const ret = fn(this.ctx);
|
435
|
-
if (typeof ret.then === "function") {
|
436
|
-
this._isPromise = true;
|
437
|
-
ret.then(okFn).catch(catchFn).finally(() => {
|
438
|
-
this._inProgress = void 0;
|
439
|
-
});
|
440
|
-
} else {
|
441
|
-
okFn(ret);
|
442
|
-
}
|
443
|
-
} catch (e) {
|
444
|
-
catchFn(e);
|
445
|
-
}
|
446
|
-
if (!this._isPromise) {
|
447
|
-
this._inProgress = void 0;
|
448
|
-
}
|
449
|
-
}
|
450
|
-
if (this._isPromise) {
|
451
|
-
return future.asPromise();
|
452
|
-
} else {
|
453
|
-
return this.once(fn);
|
454
|
-
}
|
455
|
-
}
|
456
|
-
};
|
457
|
-
var Keyed = class {
|
458
|
-
constructor(factory, params) {
|
459
|
-
var _a;
|
460
|
-
this.factory = factory;
|
461
|
-
this._map = new LRUMap((_a = params == null ? void 0 : params.lru) != null ? _a : { maxEntries: -1 });
|
462
|
-
}
|
463
|
-
setParam(params) {
|
464
|
-
this._map.setParam(params.lru);
|
465
|
-
}
|
466
|
-
async asyncGet(key) {
|
467
|
-
return this.get(await key());
|
468
|
-
}
|
469
|
-
get(key) {
|
470
|
-
if (typeof key === "function") {
|
471
|
-
key = key();
|
472
|
-
}
|
473
|
-
let keyed = this._map.get(key);
|
474
|
-
if (!keyed) {
|
475
|
-
keyed = this.factory(key);
|
476
|
-
this._map.set(key, keyed);
|
477
|
-
}
|
478
|
-
return keyed;
|
479
|
-
}
|
480
|
-
unget(key) {
|
481
|
-
const keyed = this._map.get(key);
|
482
|
-
keyed == null ? void 0 : keyed.reset();
|
483
|
-
this._map.delete(key);
|
484
|
-
}
|
485
|
-
reset() {
|
486
|
-
this._map.forEach((keyed) => keyed.reset());
|
487
|
-
this._map.clear();
|
488
|
-
}
|
489
|
-
};
|
490
|
-
var KeyedResolvOnce = class extends Keyed {
|
491
|
-
constructor(kp = {}) {
|
492
|
-
super((key) => new ResolveOnce(key), kp);
|
493
|
-
}
|
494
|
-
/**
|
495
|
-
*
|
496
|
-
* @returns The values of the resolved keys
|
497
|
-
*/
|
498
|
-
values() {
|
499
|
-
return Array.from(this._map.entries()).filter(([_, v]) => v._onceDone).map(([k, v]) => {
|
500
|
-
if (v._onceDone) {
|
501
|
-
if (v._onceError) {
|
502
|
-
return {
|
503
|
-
key: k,
|
504
|
-
value: Result.Err(v._onceError)
|
505
|
-
};
|
506
|
-
}
|
507
|
-
return {
|
508
|
-
key: k,
|
509
|
-
value: Result.Ok(v._onceValue)
|
510
|
-
};
|
511
|
-
}
|
512
|
-
throw new Error("KeyedResolvOnce.values impossible");
|
513
|
-
});
|
514
|
-
}
|
515
|
-
};
|
516
|
-
var KeyedResolvSeq = class extends Keyed {
|
517
|
-
constructor(kp = {}) {
|
518
|
-
super((key) => new ResolveSeq(key), kp);
|
519
|
-
}
|
520
|
-
};
|
521
|
-
|
522
|
-
// src/utils/coerce-uint8.ts
|
523
|
-
var globalBuffer = globalThis;
|
524
|
-
function coerceIntoUint8(raw) {
|
525
|
-
if (raw instanceof ArrayBuffer) {
|
526
|
-
return Result.Ok(new Uint8Array(raw));
|
527
|
-
}
|
528
|
-
if (ArrayBuffer.isView(raw)) {
|
529
|
-
return Result.Ok(new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength));
|
530
|
-
}
|
531
|
-
if (raw instanceof Blob) {
|
532
|
-
return Result.Err("Blob not supported");
|
533
|
-
}
|
534
|
-
if (globalBuffer.Buffer && globalBuffer.Buffer.isBuffer(raw)) {
|
535
|
-
return Result.Ok(new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength));
|
536
|
-
}
|
537
|
-
if (raw instanceof Uint8Array) {
|
538
|
-
return Result.Ok(raw);
|
539
|
-
}
|
540
|
-
if (Result.Is(raw)) {
|
541
|
-
if (raw.isErr()) {
|
542
|
-
return Result.Err(raw);
|
543
|
-
}
|
544
|
-
return coerceIntoUint8(raw.unwrap());
|
545
|
-
}
|
546
|
-
return Result.Err("Not a Uint8Array");
|
547
|
-
}
|
548
|
-
async function asyncCoerceIntoUint8(raw) {
|
549
|
-
let resolved = await raw;
|
550
|
-
if (resolved instanceof Blob) {
|
551
|
-
resolved = await resolved.arrayBuffer();
|
552
|
-
}
|
553
|
-
return coerceIntoUint8(resolved);
|
554
|
-
}
|
555
|
-
|
556
|
-
// src/txt-en-decoder.ts
|
557
|
-
var TxtOps = class {
|
558
|
-
constructor() {
|
559
|
-
this.encoder = new TextEncoder();
|
560
|
-
this.decoder = new TextDecoder();
|
561
|
-
}
|
562
|
-
encode(str) {
|
563
|
-
return this.encoder.encode(str);
|
564
|
-
}
|
565
|
-
decode(data) {
|
566
|
-
if (Result.Is(data)) {
|
567
|
-
if (data.isErr()) {
|
568
|
-
throw data.Err();
|
569
|
-
}
|
570
|
-
const unwrapped = data.unwrap();
|
571
|
-
if (typeof unwrapped === "string") {
|
572
|
-
return this.decode(unwrapped);
|
573
|
-
}
|
574
|
-
}
|
575
|
-
if (typeof data === "string") {
|
576
|
-
return data;
|
577
|
-
}
|
578
|
-
return this.decoder.decode(coerceIntoUint8(data).Ok());
|
579
|
-
}
|
580
|
-
async asyncDecode(data) {
|
581
|
-
let resolved = await data;
|
582
|
-
if (resolved instanceof Blob) {
|
583
|
-
resolved = await resolved.arrayBuffer();
|
584
|
-
}
|
585
|
-
return this.decode(resolved);
|
586
|
-
}
|
587
|
-
};
|
588
|
-
var txtEnDecoder = new ResolveOnce();
|
589
|
-
function TxtEnDecoderSingleton() {
|
590
|
-
return txtEnDecoder.once(() => new TxtOps());
|
591
|
-
}
|
592
|
-
|
593
|
-
// src/utils/console-write-stream.ts
|
594
|
-
var ConsoleWriterStreamDefaultWriter = class {
|
595
|
-
constructor(stream) {
|
596
|
-
this.stream = stream;
|
597
|
-
this.desiredSize = null;
|
598
|
-
this.decoder = new TextDecoder();
|
599
|
-
this._stream = stream;
|
600
|
-
this.ready = Promise.resolve(void 0);
|
601
|
-
this.closed = Promise.resolve(void 0);
|
602
|
-
}
|
603
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
604
|
-
abort(reason) {
|
605
|
-
throw new Error("Method not implemented.");
|
606
|
-
}
|
607
|
-
async close() {
|
608
|
-
}
|
609
|
-
releaseLock() {
|
610
|
-
this._stream.locked = false;
|
611
|
-
this.ready = Promise.resolve(void 0);
|
612
|
-
this.closed = Promise.resolve(void 0);
|
613
|
-
}
|
614
|
-
write(chunk) {
|
615
|
-
let strObj = this.decoder.decode(chunk).trimEnd();
|
616
|
-
let output = "log";
|
617
|
-
try {
|
618
|
-
strObj = JSON.parse(strObj);
|
619
|
-
output = strObj.level;
|
620
|
-
} catch (e) {
|
621
|
-
}
|
622
|
-
switch (output) {
|
623
|
-
case "error":
|
624
|
-
console.error(strObj);
|
625
|
-
break;
|
626
|
-
case "warn":
|
627
|
-
console.warn(strObj);
|
628
|
-
break;
|
629
|
-
default:
|
630
|
-
console.log(strObj);
|
631
|
-
}
|
632
|
-
return Promise.resolve();
|
633
|
-
}
|
634
|
-
};
|
635
|
-
var ConsoleWriterStream = class {
|
636
|
-
constructor() {
|
637
|
-
this.locked = false;
|
638
|
-
}
|
639
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
640
|
-
abort(reason) {
|
641
|
-
throw new Error("Method not implemented.");
|
642
|
-
}
|
643
|
-
close() {
|
644
|
-
return Promise.resolve();
|
645
|
-
}
|
646
|
-
getWriter() {
|
647
|
-
if (this.locked) {
|
648
|
-
throw new Error("Stream is locked");
|
649
|
-
}
|
650
|
-
this.locked = true;
|
651
|
-
if (!this._writer) {
|
652
|
-
this._writer = new ConsoleWriterStreamDefaultWriter(this);
|
653
|
-
}
|
654
|
-
return this._writer;
|
655
|
-
}
|
656
|
-
};
|
657
|
-
|
658
|
-
export {
|
659
|
-
__export,
|
660
|
-
__privateGet,
|
661
|
-
__privateAdd,
|
662
|
-
__privateMethod,
|
663
|
-
isPromise,
|
664
|
-
Result,
|
665
|
-
ResultOK,
|
666
|
-
ResultError,
|
667
|
-
exception2Result,
|
668
|
-
param,
|
669
|
-
getParamsResult,
|
670
|
-
Future,
|
671
|
-
LRUSet,
|
672
|
-
LRUMap,
|
673
|
-
ResolveSeq,
|
674
|
-
ResolveOnce,
|
675
|
-
Keyed,
|
676
|
-
KeyedResolvOnce,
|
677
|
-
KeyedResolvSeq,
|
678
|
-
coerceIntoUint8,
|
679
|
-
asyncCoerceIntoUint8,
|
680
|
-
TxtEnDecoderSingleton,
|
681
|
-
ConsoleWriterStreamDefaultWriter,
|
682
|
-
ConsoleWriterStream
|
683
|
-
};
|
684
|
-
//# sourceMappingURL=chunk-NTOGMD33.js.map
|