@adviser/cement 0.4.7 → 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 +62 -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 +4 -0
- package/ts/src/uri.d.ts.map +1 -1
- package/ts/src/uri.js +54 -34
- package/ts/src/uri.js.map +1 -1
- package/ts/src/uri.test.js +27 -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-2DWEYXJH.js +0 -1681
- package/chunk-2DWEYXJH.js.map +0 -1
- 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/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-DH243CLH.d.cts +0 -297
- package/index-LQOsS7gM.d.cts +0 -97
- package/index-RMC1sv15.d.ts +0 -297
- package/index.cjs +0 -4009
- 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 -2994
- 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/utils/index.cjs
DELETED
@@ -1,778 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __typeError = (msg) => {
|
7
|
-
throw TypeError(msg);
|
8
|
-
};
|
9
|
-
var __export = (target, all) => {
|
10
|
-
for (var name in all)
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
12
|
-
};
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
15
|
-
for (let key of __getOwnPropNames(from))
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
18
|
-
}
|
19
|
-
return to;
|
20
|
-
};
|
21
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
22
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
23
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
24
|
-
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);
|
25
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
26
|
-
|
27
|
-
// src/utils/index.ts
|
28
|
-
var utils_exports = {};
|
29
|
-
__export(utils_exports, {
|
30
|
-
ConsoleWriterStream: () => ConsoleWriterStream,
|
31
|
-
ConsoleWriterStreamDefaultWriter: () => ConsoleWriterStreamDefaultWriter,
|
32
|
-
FanoutWriteStream: () => FanoutWriteStream,
|
33
|
-
UInt8ArrayEqual: () => UInt8ArrayEqual,
|
34
|
-
array2stream: () => array2stream,
|
35
|
-
asyncCoerceIntoUint8: () => asyncCoerceIntoUint8,
|
36
|
-
coerceIntoUint8: () => coerceIntoUint8,
|
37
|
-
devnull: () => devnull,
|
38
|
-
getParamsResult: () => getParamsResult,
|
39
|
-
rebuffer: () => rebuffer,
|
40
|
-
rebufferArray: () => rebufferArray,
|
41
|
-
stream2array: () => stream2array,
|
42
|
-
stream2string: () => stream2string,
|
43
|
-
stream2uint8array: () => stream2uint8array,
|
44
|
-
streamMap: () => streamMap,
|
45
|
-
string2stream: () => string2stream,
|
46
|
-
stripper: () => stripper,
|
47
|
-
toSortedArray: () => toSortedArray,
|
48
|
-
toSortedObject: () => toSortedObject,
|
49
|
-
toSortedObjectArray: () => toSortedObjectArray,
|
50
|
-
uint8array2stream: () => uint8array2stream
|
51
|
-
});
|
52
|
-
module.exports = __toCommonJS(utils_exports);
|
53
|
-
|
54
|
-
// src/is-promise.ts
|
55
|
-
function isPromise(a) {
|
56
|
-
const mayBe = a;
|
57
|
-
return mayBe instanceof Promise || !!(mayBe && mayBe !== null && typeof mayBe.then === "function" && typeof mayBe.catch === "function" && typeof mayBe.finally === "function");
|
58
|
-
}
|
59
|
-
|
60
|
-
// src/utils/stream-map.ts
|
61
|
-
function streamMap(s, sm) {
|
62
|
-
const state = { reader: s.getReader(), streamMap: sm, idx: 0 };
|
63
|
-
return new ReadableStream({
|
64
|
-
async pull(controller) {
|
65
|
-
const { done, value } = await state.reader.read();
|
66
|
-
if (done) {
|
67
|
-
if (state.streamMap.Close) {
|
68
|
-
state.streamMap.Close();
|
69
|
-
}
|
70
|
-
controller.close();
|
71
|
-
return;
|
72
|
-
}
|
73
|
-
const promiseOrU = state.streamMap.Map(value, state.idx++);
|
74
|
-
let mapped;
|
75
|
-
if (isPromise(promiseOrU)) {
|
76
|
-
mapped = await promiseOrU;
|
77
|
-
} else {
|
78
|
-
mapped = promiseOrU;
|
79
|
-
}
|
80
|
-
controller.enqueue(mapped);
|
81
|
-
}
|
82
|
-
});
|
83
|
-
}
|
84
|
-
async function devnull(a) {
|
85
|
-
const reader = a.getReader();
|
86
|
-
let cnt = 0;
|
87
|
-
while (true) {
|
88
|
-
const { done } = await reader.read();
|
89
|
-
if (done) {
|
90
|
-
break;
|
91
|
-
}
|
92
|
-
cnt++;
|
93
|
-
}
|
94
|
-
return cnt;
|
95
|
-
}
|
96
|
-
function array2stream(a) {
|
97
|
-
let i = 0;
|
98
|
-
return new ReadableStream({
|
99
|
-
pull(controller) {
|
100
|
-
if (i >= a.length) {
|
101
|
-
controller.close();
|
102
|
-
return;
|
103
|
-
}
|
104
|
-
controller.enqueue(a[i]);
|
105
|
-
i++;
|
106
|
-
}
|
107
|
-
});
|
108
|
-
}
|
109
|
-
async function stream2array(a) {
|
110
|
-
const ret = [];
|
111
|
-
const reader = a.getReader();
|
112
|
-
while (true) {
|
113
|
-
const { done, value } = await reader.read();
|
114
|
-
if (done) {
|
115
|
-
break;
|
116
|
-
}
|
117
|
-
ret.push(value);
|
118
|
-
}
|
119
|
-
return ret;
|
120
|
-
}
|
121
|
-
|
122
|
-
// src/utils/rebuffer.ts
|
123
|
-
async function rebufferArray(a, chunkSize) {
|
124
|
-
return stream2array(rebuffer(array2stream(a), chunkSize));
|
125
|
-
}
|
126
|
-
function reChunk(cs, chunkSize) {
|
127
|
-
const len = cs.reduce((acc, v) => acc + v.length, 0);
|
128
|
-
const last = cs[cs.length - 1];
|
129
|
-
const lastOfs = len - last.length;
|
130
|
-
const rest = last.subarray(chunkSize - lastOfs);
|
131
|
-
cs[cs.length - 1] = last.subarray(0, chunkSize - lastOfs);
|
132
|
-
const chunk = new Uint8Array(chunkSize);
|
133
|
-
let ofs = 0;
|
134
|
-
for (const c of cs) {
|
135
|
-
chunk.set(c, ofs);
|
136
|
-
ofs += c.length;
|
137
|
-
}
|
138
|
-
return { rest, chunk };
|
139
|
-
}
|
140
|
-
function pump(ps, controller, next) {
|
141
|
-
ps.reader.read().then(({ done, value }) => {
|
142
|
-
if (done) {
|
143
|
-
if (ps.tmpLen > 0) {
|
144
|
-
controller.enqueue(reChunk(ps.tmp, ps.tmpLen).chunk);
|
145
|
-
}
|
146
|
-
controller.close();
|
147
|
-
next();
|
148
|
-
return;
|
149
|
-
}
|
150
|
-
if (ps.tmpLen + value.length > ps.chunkSize) {
|
151
|
-
ps.tmp.push(value);
|
152
|
-
const res = reChunk(ps.tmp, ps.chunkSize);
|
153
|
-
controller.enqueue(res.chunk);
|
154
|
-
ps.tmp = [res.rest];
|
155
|
-
ps.tmpLen = res.rest.length;
|
156
|
-
next();
|
157
|
-
return;
|
158
|
-
} else if (value.length) {
|
159
|
-
ps.tmp.push(value);
|
160
|
-
ps.tmpLen += value.length;
|
161
|
-
}
|
162
|
-
pump(ps, controller, next);
|
163
|
-
}).catch((err) => {
|
164
|
-
controller.error(err);
|
165
|
-
next();
|
166
|
-
});
|
167
|
-
}
|
168
|
-
function rebuffer(a, chunkSize) {
|
169
|
-
const state = {
|
170
|
-
reader: a.getReader(),
|
171
|
-
tmp: [],
|
172
|
-
tmpLen: 0,
|
173
|
-
chunkSize
|
174
|
-
};
|
175
|
-
return new ReadableStream({
|
176
|
-
async pull(controller) {
|
177
|
-
return new Promise((resolve) => {
|
178
|
-
pump(state, controller, resolve);
|
179
|
-
});
|
180
|
-
}
|
181
|
-
});
|
182
|
-
}
|
183
|
-
|
184
|
-
// src/utils/stream2string.ts
|
185
|
-
async function stream2string(stream, maxSize) {
|
186
|
-
if (!stream) {
|
187
|
-
return Promise.resolve("");
|
188
|
-
}
|
189
|
-
const reader = stream.getReader();
|
190
|
-
let res = "";
|
191
|
-
const decoder = new TextDecoder();
|
192
|
-
let rSize = 0;
|
193
|
-
while (typeof maxSize === "undefined" || rSize < maxSize) {
|
194
|
-
try {
|
195
|
-
const read = await reader.read();
|
196
|
-
if (read.done) {
|
197
|
-
break;
|
198
|
-
}
|
199
|
-
if (maxSize && rSize + read.value.length > maxSize) {
|
200
|
-
read.value = read.value.slice(0, maxSize - rSize);
|
201
|
-
}
|
202
|
-
const block = decoder.decode(read.value, { stream: true });
|
203
|
-
rSize += read.value.length;
|
204
|
-
res += block;
|
205
|
-
} catch (err) {
|
206
|
-
return Promise.reject(err);
|
207
|
-
}
|
208
|
-
}
|
209
|
-
return Promise.resolve(res);
|
210
|
-
}
|
211
|
-
async function stream2uint8array(stream) {
|
212
|
-
if (!stream) {
|
213
|
-
return Promise.resolve(new Uint8Array());
|
214
|
-
}
|
215
|
-
const reader = stream.getReader();
|
216
|
-
let res = new Uint8Array();
|
217
|
-
while (1) {
|
218
|
-
try {
|
219
|
-
const { done, value } = await reader.read();
|
220
|
-
if (done) {
|
221
|
-
break;
|
222
|
-
}
|
223
|
-
res = new Uint8Array([...res, ...value]);
|
224
|
-
} catch (err) {
|
225
|
-
return Promise.reject(err);
|
226
|
-
}
|
227
|
-
}
|
228
|
-
return Promise.resolve(res);
|
229
|
-
}
|
230
|
-
|
231
|
-
// src/future.ts
|
232
|
-
var _promise, _resolveFn, _rejectFn;
|
233
|
-
var Future = class {
|
234
|
-
constructor() {
|
235
|
-
__privateAdd(this, _promise);
|
236
|
-
__privateAdd(this, _resolveFn, () => {
|
237
|
-
throw new Error("This Promise is not working as expected.");
|
238
|
-
});
|
239
|
-
__privateAdd(this, _rejectFn, () => {
|
240
|
-
throw new Error("This Promise is not working as expected.");
|
241
|
-
});
|
242
|
-
__privateSet(this, _promise, new Promise((resolve, reject) => {
|
243
|
-
__privateSet(this, _resolveFn, resolve);
|
244
|
-
__privateSet(this, _rejectFn, reject);
|
245
|
-
}));
|
246
|
-
}
|
247
|
-
async asPromise() {
|
248
|
-
return __privateGet(this, _promise);
|
249
|
-
}
|
250
|
-
resolve(value) {
|
251
|
-
__privateGet(this, _resolveFn).call(this, value);
|
252
|
-
}
|
253
|
-
reject(reason) {
|
254
|
-
__privateGet(this, _rejectFn).call(this, reason);
|
255
|
-
}
|
256
|
-
};
|
257
|
-
_promise = new WeakMap();
|
258
|
-
_resolveFn = new WeakMap();
|
259
|
-
_rejectFn = new WeakMap();
|
260
|
-
|
261
|
-
// src/result.ts
|
262
|
-
var Result = class _Result {
|
263
|
-
static Ok(t) {
|
264
|
-
return new ResultOK(t);
|
265
|
-
}
|
266
|
-
static Err(t) {
|
267
|
-
if (typeof t === "string") {
|
268
|
-
return new ResultError(new Error(t));
|
269
|
-
}
|
270
|
-
if (_Result.Is(t)) {
|
271
|
-
if (t.is_ok()) {
|
272
|
-
return new ResultError(new Error("Result Error is Ok"));
|
273
|
-
}
|
274
|
-
return t;
|
275
|
-
}
|
276
|
-
return new ResultError(t);
|
277
|
-
}
|
278
|
-
static Is(t) {
|
279
|
-
if (!t) {
|
280
|
-
return false;
|
281
|
-
}
|
282
|
-
if (t instanceof _Result) {
|
283
|
-
return true;
|
284
|
-
}
|
285
|
-
const rt = t;
|
286
|
-
if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === "function")) {
|
287
|
-
return true;
|
288
|
-
}
|
289
|
-
return false;
|
290
|
-
}
|
291
|
-
isOk() {
|
292
|
-
return this.is_ok();
|
293
|
-
}
|
294
|
-
isErr() {
|
295
|
-
return this.is_err();
|
296
|
-
}
|
297
|
-
Ok() {
|
298
|
-
return this.unwrap();
|
299
|
-
}
|
300
|
-
Err() {
|
301
|
-
return this.unwrap_err();
|
302
|
-
}
|
303
|
-
};
|
304
|
-
var ResultOK = class extends Result {
|
305
|
-
constructor(t) {
|
306
|
-
super();
|
307
|
-
this._t = t;
|
308
|
-
}
|
309
|
-
is_ok() {
|
310
|
-
return true;
|
311
|
-
}
|
312
|
-
is_err() {
|
313
|
-
return false;
|
314
|
-
}
|
315
|
-
unwrap_err() {
|
316
|
-
throw new Error("Result is Ok");
|
317
|
-
}
|
318
|
-
unwrap() {
|
319
|
-
return this._t;
|
320
|
-
}
|
321
|
-
};
|
322
|
-
var ResultError = class extends Result {
|
323
|
-
constructor(t) {
|
324
|
-
super();
|
325
|
-
this._error = t;
|
326
|
-
}
|
327
|
-
is_ok() {
|
328
|
-
return false;
|
329
|
-
}
|
330
|
-
is_err() {
|
331
|
-
return true;
|
332
|
-
}
|
333
|
-
unwrap() {
|
334
|
-
throw new Error(`Result is Err: ${this._error}`);
|
335
|
-
}
|
336
|
-
unwrap_err() {
|
337
|
-
return this._error;
|
338
|
-
}
|
339
|
-
};
|
340
|
-
|
341
|
-
// src/resolve-once.ts
|
342
|
-
var ResolveOnce = class {
|
343
|
-
constructor(ctx) {
|
344
|
-
this._onceDone = false;
|
345
|
-
this._onceFutures = [];
|
346
|
-
this._onceOk = false;
|
347
|
-
this._isPromise = false;
|
348
|
-
this.ctx = ctx;
|
349
|
-
}
|
350
|
-
get ready() {
|
351
|
-
return this._onceDone;
|
352
|
-
}
|
353
|
-
reset() {
|
354
|
-
this._onceDone = false;
|
355
|
-
this._onceOk = false;
|
356
|
-
this._onceValue = void 0;
|
357
|
-
this._onceError = void 0;
|
358
|
-
if (this._inProgress) {
|
359
|
-
const idx = this._onceFutures.findIndex((f) => f === this._inProgress);
|
360
|
-
if (idx >= 0) {
|
361
|
-
this._onceFutures.push(...this._onceFutures.splice(2).slice(1));
|
362
|
-
}
|
363
|
-
} else {
|
364
|
-
this._onceFutures.length = 0;
|
365
|
-
}
|
366
|
-
}
|
367
|
-
// T extends Option<infer U> ? U : T
|
368
|
-
once(fn) {
|
369
|
-
if (this._onceDone) {
|
370
|
-
if (this._onceError) {
|
371
|
-
if (this._isPromise) {
|
372
|
-
return Promise.reject(this._onceError);
|
373
|
-
} else {
|
374
|
-
throw this._onceError;
|
375
|
-
}
|
376
|
-
}
|
377
|
-
if (this._onceOk) {
|
378
|
-
if (this._isPromise) {
|
379
|
-
return Promise.resolve(this._onceValue);
|
380
|
-
} else {
|
381
|
-
return this._onceValue;
|
382
|
-
}
|
383
|
-
}
|
384
|
-
throw new Error("ResolveOnce.once impossible");
|
385
|
-
}
|
386
|
-
const future = new Future();
|
387
|
-
this._onceFutures.push(future);
|
388
|
-
if (this._onceFutures.length === 1) {
|
389
|
-
const okFn = (value) => {
|
390
|
-
this._onceValue = value;
|
391
|
-
this._onceOk = true;
|
392
|
-
this._onceDone = true;
|
393
|
-
if (this._isPromise) {
|
394
|
-
this._onceFutures.forEach((f) => f.resolve(this._onceValue));
|
395
|
-
}
|
396
|
-
this._onceFutures.length = 0;
|
397
|
-
};
|
398
|
-
const catchFn = (e) => {
|
399
|
-
this._onceError = e;
|
400
|
-
this._onceOk = false;
|
401
|
-
this._onceValue = void 0;
|
402
|
-
this._onceDone = true;
|
403
|
-
if (this._isPromise) {
|
404
|
-
this._onceFutures.forEach((f) => f.reject(this._onceError));
|
405
|
-
}
|
406
|
-
this._onceFutures.length = 0;
|
407
|
-
};
|
408
|
-
this._inProgress = future;
|
409
|
-
try {
|
410
|
-
const ret = fn(this.ctx);
|
411
|
-
if (typeof ret.then === "function") {
|
412
|
-
this._isPromise = true;
|
413
|
-
ret.then(okFn).catch(catchFn).finally(() => {
|
414
|
-
this._inProgress = void 0;
|
415
|
-
});
|
416
|
-
} else {
|
417
|
-
okFn(ret);
|
418
|
-
}
|
419
|
-
} catch (e) {
|
420
|
-
catchFn(e);
|
421
|
-
}
|
422
|
-
if (!this._isPromise) {
|
423
|
-
this._inProgress = void 0;
|
424
|
-
}
|
425
|
-
}
|
426
|
-
if (this._isPromise) {
|
427
|
-
return future.asPromise();
|
428
|
-
} else {
|
429
|
-
return this.once(fn);
|
430
|
-
}
|
431
|
-
}
|
432
|
-
};
|
433
|
-
|
434
|
-
// src/utils/coerce-uint8.ts
|
435
|
-
var globalBuffer = globalThis;
|
436
|
-
function coerceIntoUint8(raw) {
|
437
|
-
if (raw instanceof ArrayBuffer) {
|
438
|
-
return Result.Ok(new Uint8Array(raw));
|
439
|
-
}
|
440
|
-
if (ArrayBuffer.isView(raw)) {
|
441
|
-
return Result.Ok(new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength));
|
442
|
-
}
|
443
|
-
if (raw instanceof Blob) {
|
444
|
-
return Result.Err("Blob not supported");
|
445
|
-
}
|
446
|
-
if (globalBuffer.Buffer && globalBuffer.Buffer.isBuffer(raw)) {
|
447
|
-
return Result.Ok(new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength));
|
448
|
-
}
|
449
|
-
if (raw instanceof Uint8Array) {
|
450
|
-
return Result.Ok(raw);
|
451
|
-
}
|
452
|
-
if (Result.Is(raw)) {
|
453
|
-
if (raw.isErr()) {
|
454
|
-
return Result.Err(raw);
|
455
|
-
}
|
456
|
-
return coerceIntoUint8(raw.unwrap());
|
457
|
-
}
|
458
|
-
return Result.Err("Not a Uint8Array");
|
459
|
-
}
|
460
|
-
async function asyncCoerceIntoUint8(raw) {
|
461
|
-
let resolved = await raw;
|
462
|
-
if (resolved instanceof Blob) {
|
463
|
-
resolved = await resolved.arrayBuffer();
|
464
|
-
}
|
465
|
-
return coerceIntoUint8(resolved);
|
466
|
-
}
|
467
|
-
|
468
|
-
// src/txt-en-decoder.ts
|
469
|
-
var TxtOps = class {
|
470
|
-
constructor() {
|
471
|
-
this.encoder = new TextEncoder();
|
472
|
-
this.decoder = new TextDecoder();
|
473
|
-
}
|
474
|
-
encode(str) {
|
475
|
-
return this.encoder.encode(str);
|
476
|
-
}
|
477
|
-
decode(data) {
|
478
|
-
if (Result.Is(data)) {
|
479
|
-
if (data.isErr()) {
|
480
|
-
throw data.Err();
|
481
|
-
}
|
482
|
-
const unwrapped = data.unwrap();
|
483
|
-
if (typeof unwrapped === "string") {
|
484
|
-
return this.decode(unwrapped);
|
485
|
-
}
|
486
|
-
}
|
487
|
-
if (typeof data === "string") {
|
488
|
-
return data;
|
489
|
-
}
|
490
|
-
return this.decoder.decode(coerceIntoUint8(data).Ok());
|
491
|
-
}
|
492
|
-
async asyncDecode(data) {
|
493
|
-
let resolved = await data;
|
494
|
-
if (resolved instanceof Blob) {
|
495
|
-
resolved = await resolved.arrayBuffer();
|
496
|
-
}
|
497
|
-
return this.decode(resolved);
|
498
|
-
}
|
499
|
-
};
|
500
|
-
var txtEnDecoder = new ResolveOnce();
|
501
|
-
function TxtEnDecoderSingleton() {
|
502
|
-
return txtEnDecoder.once(() => new TxtOps());
|
503
|
-
}
|
504
|
-
|
505
|
-
// src/utils/string2stream.ts
|
506
|
-
function string2stream(str, ende = TxtEnDecoderSingleton()) {
|
507
|
-
return uint8array2stream(ende.encode(str));
|
508
|
-
}
|
509
|
-
function uint8array2stream(str) {
|
510
|
-
return new ReadableStream({
|
511
|
-
start(controller) {
|
512
|
-
controller.enqueue(str);
|
513
|
-
controller.close();
|
514
|
-
}
|
515
|
-
});
|
516
|
-
}
|
517
|
-
|
518
|
-
// src/utils/console-write-stream.ts
|
519
|
-
var ConsoleWriterStreamDefaultWriter = class {
|
520
|
-
constructor(stream) {
|
521
|
-
this.stream = stream;
|
522
|
-
this.desiredSize = null;
|
523
|
-
this.decoder = new TextDecoder();
|
524
|
-
this._stream = stream;
|
525
|
-
this.ready = Promise.resolve(void 0);
|
526
|
-
this.closed = Promise.resolve(void 0);
|
527
|
-
}
|
528
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
529
|
-
abort(reason) {
|
530
|
-
throw new Error("Method not implemented.");
|
531
|
-
}
|
532
|
-
async close() {
|
533
|
-
}
|
534
|
-
releaseLock() {
|
535
|
-
this._stream.locked = false;
|
536
|
-
this.ready = Promise.resolve(void 0);
|
537
|
-
this.closed = Promise.resolve(void 0);
|
538
|
-
}
|
539
|
-
write(chunk) {
|
540
|
-
let strObj = this.decoder.decode(chunk).trimEnd();
|
541
|
-
let output = "log";
|
542
|
-
try {
|
543
|
-
strObj = JSON.parse(strObj);
|
544
|
-
output = strObj.level;
|
545
|
-
} catch (e) {
|
546
|
-
}
|
547
|
-
switch (output) {
|
548
|
-
case "error":
|
549
|
-
console.error(strObj);
|
550
|
-
break;
|
551
|
-
case "warn":
|
552
|
-
console.warn(strObj);
|
553
|
-
break;
|
554
|
-
default:
|
555
|
-
console.log(strObj);
|
556
|
-
}
|
557
|
-
return Promise.resolve();
|
558
|
-
}
|
559
|
-
};
|
560
|
-
var ConsoleWriterStream = class {
|
561
|
-
constructor() {
|
562
|
-
this.locked = false;
|
563
|
-
}
|
564
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
565
|
-
abort(reason) {
|
566
|
-
throw new Error("Method not implemented.");
|
567
|
-
}
|
568
|
-
close() {
|
569
|
-
return Promise.resolve();
|
570
|
-
}
|
571
|
-
getWriter() {
|
572
|
-
if (this.locked) {
|
573
|
-
throw new Error("Stream is locked");
|
574
|
-
}
|
575
|
-
this.locked = true;
|
576
|
-
if (!this._writer) {
|
577
|
-
this._writer = new ConsoleWriterStreamDefaultWriter(this);
|
578
|
-
}
|
579
|
-
return this._writer;
|
580
|
-
}
|
581
|
-
};
|
582
|
-
|
583
|
-
// src/utils/fanout-write-stream.ts
|
584
|
-
var FanoutWriteStream = class {
|
585
|
-
constructor(writers) {
|
586
|
-
this.desiredSize = null;
|
587
|
-
this._writers = writers;
|
588
|
-
this.ready = Promise.all(this._writers.map((w) => w.ready)).then(() => void 0);
|
589
|
-
this.closed = Promise.all(this._writers.map((w) => w.closed)).then(() => void 0);
|
590
|
-
}
|
591
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
592
|
-
abort(reason) {
|
593
|
-
return Promise.all(this._writers.map((w) => w.abort(reason))).then(() => {
|
594
|
-
});
|
595
|
-
}
|
596
|
-
close() {
|
597
|
-
return Promise.all(this._writers.map((w) => w.close())).then(() => {
|
598
|
-
});
|
599
|
-
}
|
600
|
-
releaseLock() {
|
601
|
-
this._writers.map((w) => w.releaseLock());
|
602
|
-
}
|
603
|
-
write(chunk) {
|
604
|
-
return Promise.all(this._writers.map((w) => w.write(chunk))).then(() => {
|
605
|
-
});
|
606
|
-
}
|
607
|
-
};
|
608
|
-
|
609
|
-
// src/types.ts
|
610
|
-
var _Required = class {
|
611
|
-
constructor() {
|
612
|
-
this.type = "REQUIRED";
|
613
|
-
}
|
614
|
-
};
|
615
|
-
var _Optional = class {
|
616
|
-
constructor() {
|
617
|
-
this.type = "OPTIONAL";
|
618
|
-
}
|
619
|
-
};
|
620
|
-
var param = {
|
621
|
-
REQUIRED: new _Required(),
|
622
|
-
OPTIONAL: new _Optional()
|
623
|
-
};
|
624
|
-
|
625
|
-
// src/utils/get-params-result.ts
|
626
|
-
function getParamsResult(keys, getParam) {
|
627
|
-
const keyDef = keys.flat().reduce(
|
628
|
-
(acc, i) => {
|
629
|
-
if (typeof i === "string") {
|
630
|
-
acc.push({ key: i, def: void 0, isOptional: false });
|
631
|
-
} else if (typeof i === "object") {
|
632
|
-
acc.push(
|
633
|
-
...Object.keys(i).map((k) => ({
|
634
|
-
key: k,
|
635
|
-
def: typeof i[k] === "string" ? i[k] : void 0,
|
636
|
-
isOptional: i[k] === param.OPTIONAL
|
637
|
-
}))
|
638
|
-
);
|
639
|
-
}
|
640
|
-
return acc;
|
641
|
-
},
|
642
|
-
[]
|
643
|
-
);
|
644
|
-
const msgFn = keys.find((k) => typeof k === "function") || ((...keys2) => {
|
645
|
-
const msg = keys2.join(",");
|
646
|
-
return `missing parameters: ${msg}`;
|
647
|
-
});
|
648
|
-
const errors = [];
|
649
|
-
const result = {};
|
650
|
-
for (const kd of keyDef) {
|
651
|
-
const val = getParam.getParam(kd.key);
|
652
|
-
if (val === void 0) {
|
653
|
-
if (typeof kd.def === "string") {
|
654
|
-
result[kd.key] = kd.def;
|
655
|
-
} else {
|
656
|
-
if (!kd.isOptional) {
|
657
|
-
errors.push(kd.key);
|
658
|
-
}
|
659
|
-
}
|
660
|
-
} else {
|
661
|
-
result[kd.key] = val;
|
662
|
-
}
|
663
|
-
}
|
664
|
-
if (errors.length) {
|
665
|
-
return Result.Err(msgFn(...errors));
|
666
|
-
}
|
667
|
-
return Result.Ok(result);
|
668
|
-
}
|
669
|
-
|
670
|
-
// src/utils/stripper.ts
|
671
|
-
function stripper(strip, obj) {
|
672
|
-
const strips = Array.isArray(strip) ? strip : [strip];
|
673
|
-
const restrips = strips.map((s) => {
|
674
|
-
if (typeof s === "string") {
|
675
|
-
const escaped = s.replace(/[-\\[\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\^\\$\\|]/g, "\\$&");
|
676
|
-
return new RegExp(`^${escaped}$`);
|
677
|
-
}
|
678
|
-
return s;
|
679
|
-
});
|
680
|
-
return localStripper(void 0, restrips, obj);
|
681
|
-
}
|
682
|
-
function localStripper(path, restrips, obj) {
|
683
|
-
if (typeof obj !== "object" || obj === null) {
|
684
|
-
return obj;
|
685
|
-
}
|
686
|
-
if (Array.isArray(obj)) {
|
687
|
-
return obj.map((i) => localStripper(path, restrips, i));
|
688
|
-
}
|
689
|
-
const ret = { ...obj };
|
690
|
-
const matcher = (key, nextPath) => {
|
691
|
-
for (const re of restrips) {
|
692
|
-
if (re.test(key) || re.test(nextPath)) {
|
693
|
-
return true;
|
694
|
-
}
|
695
|
-
}
|
696
|
-
return false;
|
697
|
-
};
|
698
|
-
for (const key in ret) {
|
699
|
-
if (Object.prototype.hasOwnProperty.call(ret, key)) {
|
700
|
-
let nextPath;
|
701
|
-
if (path) {
|
702
|
-
nextPath = [path, key].join(".");
|
703
|
-
} else {
|
704
|
-
nextPath = key;
|
705
|
-
}
|
706
|
-
if (matcher(key, nextPath)) {
|
707
|
-
delete ret[key];
|
708
|
-
continue;
|
709
|
-
}
|
710
|
-
if (typeof ret[key] === "object") {
|
711
|
-
if (Array.isArray(ret[key])) {
|
712
|
-
ret[key] = ret[key].reduce((acc, v, i) => {
|
713
|
-
const toDelete = matcher(key, `${nextPath}[${i}]`);
|
714
|
-
if (!toDelete) {
|
715
|
-
acc.push(localStripper(`${nextPath}[${i}]`, restrips, v));
|
716
|
-
}
|
717
|
-
return acc;
|
718
|
-
}, []);
|
719
|
-
} else {
|
720
|
-
ret[key] = localStripper(nextPath, restrips, ret[key]);
|
721
|
-
}
|
722
|
-
}
|
723
|
-
}
|
724
|
-
}
|
725
|
-
return ret;
|
726
|
-
}
|
727
|
-
|
728
|
-
// src/utils/sorted-object.ts
|
729
|
-
function toSortedObjectArray(set) {
|
730
|
-
if (!set) return [];
|
731
|
-
return toSortedArray(set).map(([k, v]) => ({ [k]: v }));
|
732
|
-
}
|
733
|
-
function toSortedArray(set) {
|
734
|
-
if (!set) return [];
|
735
|
-
return Object.entries(set).sort(([a], [b]) => a.localeCompare(b));
|
736
|
-
}
|
737
|
-
function toSortedObject(set) {
|
738
|
-
if (!set) return set;
|
739
|
-
return Object.fromEntries(toSortedArray(set));
|
740
|
-
}
|
741
|
-
|
742
|
-
// src/utils/uint8array-equal.ts
|
743
|
-
function UInt8ArrayEqual(a, b) {
|
744
|
-
if (a.length !== b.length) {
|
745
|
-
return false;
|
746
|
-
}
|
747
|
-
for (let i = 0; i < a.length; i++) {
|
748
|
-
if (a[i] !== b[i]) {
|
749
|
-
return false;
|
750
|
-
}
|
751
|
-
}
|
752
|
-
return true;
|
753
|
-
}
|
754
|
-
// Annotate the CommonJS export names for ESM import in node:
|
755
|
-
0 && (module.exports = {
|
756
|
-
ConsoleWriterStream,
|
757
|
-
ConsoleWriterStreamDefaultWriter,
|
758
|
-
FanoutWriteStream,
|
759
|
-
UInt8ArrayEqual,
|
760
|
-
array2stream,
|
761
|
-
asyncCoerceIntoUint8,
|
762
|
-
coerceIntoUint8,
|
763
|
-
devnull,
|
764
|
-
getParamsResult,
|
765
|
-
rebuffer,
|
766
|
-
rebufferArray,
|
767
|
-
stream2array,
|
768
|
-
stream2string,
|
769
|
-
stream2uint8array,
|
770
|
-
streamMap,
|
771
|
-
string2stream,
|
772
|
-
stripper,
|
773
|
-
toSortedArray,
|
774
|
-
toSortedObject,
|
775
|
-
toSortedObjectArray,
|
776
|
-
uint8array2stream
|
777
|
-
});
|
778
|
-
//# sourceMappingURL=index.cjs.map
|