@adviser/cement 0.3.4 → 0.3.6
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-sys-abstraction-B-PcaG0B.d.ts → base-sys-abstraction-CKI4xiRR.d.ts} +4 -4
- package/{base-sys-abstraction-CLlfCI2Q.d.cts → base-sys-abstraction-DLnSeH4s.d.cts} +4 -4
- package/cf/index.cjs +200 -6
- package/cf/index.cjs.map +1 -1
- package/cf/index.d.cts +3 -3
- package/cf/index.d.ts +3 -3
- package/cf/index.js +3 -3
- package/{chunk-OQ4NGEJR.js → chunk-4QRZPFED.js} +67 -10
- package/chunk-4QRZPFED.js.map +1 -0
- package/{chunk-A7OPSHUV.js → chunk-N5ISHPJ6.js} +14 -5
- package/chunk-N5ISHPJ6.js.map +1 -0
- package/{chunk-MFC4AD5O.js → chunk-OIIUVSUX.js} +3 -3
- package/chunk-OIIUVSUX.js.map +1 -0
- package/{chunk-HFP74WLI.js → chunk-PHS255C5.js} +64 -4
- package/chunk-PHS255C5.js.map +1 -0
- package/chunk-QDDO6NOK.js +194 -0
- package/chunk-QDDO6NOK.js.map +1 -0
- package/{chunk-5GJADB3C.js → chunk-Z7F6652G.js} +19 -226
- package/chunk-Z7F6652G.js.map +1 -0
- package/deno/index.cjs +200 -6
- package/deno/index.cjs.map +1 -1
- package/deno/index.d.cts +3 -3
- package/deno/index.d.ts +3 -3
- package/deno/index.js +2 -2
- package/deno/index.js.map +1 -1
- package/get-params-result-Bhy5997x.d.cts +61 -0
- package/get-params-result-Bhy5997x.d.ts +61 -0
- package/{index-ChpAZoUE.d.ts → index-6ofzOS0J.d.ts} +6 -52
- package/{index-CI2cJ0-W.d.cts → index-CcNS7k5i.d.cts} +6 -52
- package/index-DjN6Y4N2.d.ts +83 -0
- package/index-TZQHtEZo.d.cts +83 -0
- package/index.cjs +241 -173
- package/index.cjs.map +1 -1
- package/index.d.cts +14 -11
- package/index.d.ts +14 -11
- package/index.js +16 -11
- package/index.js.map +1 -1
- package/node/index.cjs +204 -10
- package/node/index.cjs.map +1 -1
- package/node/index.d.cts +3 -3
- package/node/index.d.ts +3 -3
- package/node/index.js +6 -6
- package/node/index.js.map +1 -1
- package/package.json +4 -4
- package/src/base-sys-abstraction.ts +8 -6
- package/src/cf-test-main.ts +5 -0
- package/src/deno/deno-file-service.ts +1 -1
- package/src/http_header.ts +1 -1
- package/src/index.ts +3 -0
- package/src/jsr.json +1 -1
- package/src/log-writer-impl.ts +10 -5
- package/src/logger-impl.ts +9 -8
- package/src/logger.ts +4 -5
- package/src/node/mock-file-service.ts +4 -4
- package/src/resolve-once.ts +6 -5
- package/src/runtime.ts +3 -3
- package/src/sys-env.ts +60 -0
- package/src/test/log-write-stream.ts +2 -1
- package/src/tracer.ts +4 -6
- package/src/uri.ts +4 -69
- package/src/utils/console-write-stream.ts +4 -3
- package/src/utils/fanout-write-stream.ts +1 -1
- package/src/utils/get-params-result.ts +71 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/rebuffer.ts +27 -21
- package/src/utils/relative-path.ts +1 -1
- package/src/utils/stream2string.ts +2 -2
- package/src/utils/stripper.ts +2 -2
- package/src/version.ts +2 -2
- package/src/web/web-sys-abstraction.ts +1 -1
- package/stripper-BpBUUZ9p.d.cts +4 -0
- package/stripper-BpBUUZ9p.d.ts +4 -0
- package/{sys-abstraction-Coxu8BjZ.d.cts → sys-abstraction-BRDT_TIU.d.cts} +8 -1
- package/{sys-abstraction-Coxu8BjZ.d.ts → sys-abstraction-Bd0EzwO6.d.ts} +8 -1
- package/test/index.cjs +407 -355
- package/test/index.cjs.map +1 -1
- package/test/index.d.cts +4 -3
- package/test/index.d.ts +4 -3
- package/test/index.js +5 -5
- package/ts/smoke/smoke.d.ts +2 -0
- package/ts/smoke/smoke.d.ts.map +1 -0
- package/ts/smoke/smoke.js +33 -0
- package/ts/smoke/smoke.js.map +1 -0
- package/ts/{base-sys-abstraction.d.ts → src/base-sys-abstraction.d.ts} +2 -2
- package/ts/src/base-sys-abstraction.d.ts.map +1 -0
- package/ts/{base-sys-abstraction.js → src/base-sys-abstraction.js} +4 -2
- package/ts/src/base-sys-abstraction.js.map +1 -0
- package/ts/src/base-sys-abstraction.test.d.ts.map +1 -0
- package/ts/src/base-sys-abstraction.test.js.map +1 -0
- package/ts/src/bin2text.d.ts.map +1 -0
- package/ts/src/bin2text.js.map +1 -0
- package/ts/{bin2text.test.d.ts.map → src/bin2text.test.d.ts.map} +1 -1
- package/ts/src/bin2text.test.js.map +1 -0
- package/ts/src/cf/cf-env-actions.d.ts.map +1 -0
- package/ts/src/cf/cf-env-actions.js.map +1 -0
- package/ts/src/cf/cf-sys-abstraction.d.ts.map +1 -0
- package/ts/src/cf/cf-sys-abstraction.js.map +1 -0
- package/ts/src/cf/index.d.ts.map +1 -0
- package/ts/src/cf/index.js.map +1 -0
- package/ts/src/cf-test-main.d.ts +5 -0
- package/ts/src/cf-test-main.d.ts.map +1 -0
- package/ts/src/cf-test-main.js +6 -0
- package/ts/src/cf-test-main.js.map +1 -0
- package/ts/src/crypto.d.ts.map +1 -0
- package/ts/src/crypto.js.map +1 -0
- package/ts/{crypto.test.d.ts.map → src/crypto.test.d.ts.map} +1 -1
- package/ts/{crypto.test.js → src/crypto.test.js} +1 -1
- package/ts/src/crypto.test.js.map +1 -0
- package/ts/src/deno/deno-env-actions.d.ts.map +1 -0
- package/ts/src/deno/deno-env-actions.js.map +1 -0
- package/ts/src/deno/deno-file-service.d.ts.map +1 -0
- package/ts/src/deno/deno-file-service.js.map +1 -0
- package/ts/src/deno/deno-sys-abstraction.d.ts.map +1 -0
- package/ts/src/deno/deno-sys-abstraction.js.map +1 -0
- package/ts/src/deno/index.d.ts.map +1 -0
- package/ts/src/deno/index.js.map +1 -0
- package/ts/src/file-service.d.ts.map +1 -0
- package/ts/{file-service.js.map → src/file-service.js.map} +1 -1
- package/ts/src/future.d.ts.map +1 -0
- package/ts/src/future.js.map +1 -0
- package/ts/{future.test.d.ts.map → src/future.test.d.ts.map} +1 -1
- package/ts/src/future.test.js.map +1 -0
- package/ts/src/http_header.d.ts.map +1 -0
- package/ts/src/http_header.js.map +1 -0
- package/ts/src/http_header.test.d.ts.map +1 -0
- package/ts/src/http_header.test.js.map +1 -0
- package/ts/{index.d.ts → src/index.d.ts} +2 -0
- package/ts/src/index.d.ts.map +1 -0
- package/ts/{index.js → src/index.js} +2 -0
- package/ts/src/index.js.map +1 -0
- package/ts/src/log-level-impl.d.ts.map +1 -0
- package/ts/src/log-level-impl.js.map +1 -0
- package/ts/src/log-writer-impl.d.ts.map +1 -0
- package/ts/{log-writer-impl.js → src/log-writer-impl.js} +4 -2
- package/ts/src/log-writer-impl.js.map +1 -0
- package/ts/{logger-impl.d.ts → src/logger-impl.d.ts} +1 -1
- package/ts/src/logger-impl.d.ts.map +1 -0
- package/ts/{logger-impl.js → src/logger-impl.js} +2 -3
- package/ts/src/logger-impl.js.map +1 -0
- package/ts/{logger.d.ts → src/logger.d.ts} +1 -1
- package/ts/src/logger.d.ts.map +1 -0
- package/ts/src/logger.js.map +1 -0
- package/ts/{logger.test.d.ts.map → src/logger.test.d.ts.map} +1 -1
- package/ts/{logger.test.js → src/logger.test.js} +4 -4
- package/ts/src/logger.test.js.map +1 -0
- package/ts/src/node/index.d.ts.map +1 -0
- package/ts/src/node/index.js.map +1 -0
- package/ts/src/node/mock-file-service.d.ts.map +1 -0
- package/ts/{node → src/node}/mock-file-service.js +4 -4
- package/ts/src/node/mock-file-service.js.map +1 -0
- package/ts/src/node/mock-file-service.test.d.ts.map +1 -0
- package/ts/src/node/mock-file-service.test.js.map +1 -0
- package/ts/src/node/node-env-actions.d.ts.map +1 -0
- package/ts/src/node/node-env-actions.js.map +1 -0
- package/ts/src/node/node-file-service.d.ts.map +1 -0
- package/ts/src/node/node-file-service.js.map +1 -0
- package/ts/src/node/node-sys-abstraction.d.ts.map +1 -0
- package/ts/src/node/node-sys-abstraction.js.map +1 -0
- package/ts/src/node/node-sys-abstraction.test.d.ts.map +1 -0
- package/ts/src/node/node-sys-abstraction.test.js.map +1 -0
- package/ts/src/option.d.ts.map +1 -0
- package/ts/src/option.js.map +1 -0
- package/ts/{resolve-once.d.ts → src/resolve-once.d.ts} +1 -1
- package/ts/src/resolve-once.d.ts.map +1 -0
- package/ts/{resolve-once.js → src/resolve-once.js} +5 -4
- package/ts/src/resolve-once.js.map +1 -0
- package/ts/src/resolve-once.test.d.ts.map +1 -0
- package/ts/{resolve-once.test.js → src/resolve-once.test.js} +20 -24
- package/ts/src/resolve-once.test.js.map +1 -0
- package/ts/src/result.d.ts.map +1 -0
- package/ts/src/result.js.map +1 -0
- package/ts/{result.test.d.ts.map → src/result.test.d.ts.map} +1 -1
- package/ts/{result.test.js → src/result.test.js} +2 -4
- package/ts/src/result.test.js.map +1 -0
- package/ts/src/runtime.d.ts.map +1 -0
- package/ts/src/runtime.js.map +1 -0
- package/ts/src/sys-abstraction.d.ts.map +1 -0
- package/ts/src/sys-abstraction.js.map +1 -0
- package/ts/{sys-env.d.ts → src/sys-env.d.ts} +7 -0
- package/ts/src/sys-env.d.ts.map +1 -0
- package/ts/{sys-env.js → src/sys-env.js} +53 -0
- package/ts/src/sys-env.js.map +1 -0
- package/ts/{sys-env.test.d.ts.map → src/sys-env.test.d.ts.map} +1 -1
- package/ts/{sys-env.test.js → src/sys-env.test.js} +68 -0
- package/ts/src/sys-env.test.js.map +1 -0
- package/ts/src/test/index.d.ts.map +1 -0
- package/ts/src/test/index.js.map +1 -0
- package/ts/src/test/log-write-stream.d.ts.map +1 -0
- package/ts/src/test/log-write-stream.js.map +1 -0
- package/ts/src/test/mock-logger.d.ts.map +1 -0
- package/ts/src/test/mock-logger.js.map +1 -0
- package/ts/src/test/mock-logger.test.d.ts.map +1 -0
- package/ts/src/test/mock-logger.test.js.map +1 -0
- package/ts/src/test/test-exit-handler.d.ts.map +1 -0
- package/ts/{test → src/test}/test-exit-handler.js +8 -3
- package/ts/src/test/test-exit-handler.js.map +1 -0
- package/ts/src/time.d.ts.map +1 -0
- package/ts/src/time.js.map +1 -0
- package/ts/src/tracer.d.ts.map +1 -0
- package/ts/src/tracer.js.map +1 -0
- package/ts/{tracer.test.d.ts.map → src/tracer.test.d.ts.map} +1 -1
- package/ts/{tracer.test.js → src/tracer.test.js} +5 -5
- package/ts/src/tracer.test.js.map +1 -0
- package/ts/src/txt-en-decoder.d.ts.map +1 -0
- package/ts/src/txt-en-decoder.js.map +1 -0
- package/ts/{uri.d.ts → src/uri.d.ts} +2 -13
- package/ts/src/uri.d.ts.map +1 -0
- package/ts/{uri.js → src/uri.js} +2 -56
- package/ts/src/uri.js.map +1 -0
- package/ts/{uri.test.d.ts.map → src/uri.test.d.ts.map} +1 -1
- package/ts/{uri.test.js → src/uri.test.js} +7 -7
- package/ts/src/uri.test.js.map +1 -0
- package/ts/{utils → src/utils}/console-write-stream.d.ts +1 -1
- package/ts/src/utils/console-write-stream.d.ts.map +1 -0
- package/ts/{utils → src/utils}/console-write-stream.js +4 -3
- package/ts/src/utils/console-write-stream.js.map +1 -0
- package/ts/{utils → src/utils}/fanout-write-stream.d.ts +1 -1
- package/ts/src/utils/fanout-write-stream.d.ts.map +1 -0
- package/ts/src/utils/fanout-write-stream.js.map +1 -0
- package/ts/src/utils/get-params-result.d.ts +19 -0
- package/ts/src/utils/get-params-result.d.ts.map +1 -0
- package/ts/src/utils/get-params-result.js +58 -0
- package/ts/src/utils/get-params-result.js.map +1 -0
- package/ts/{utils → src/utils}/index.d.ts +2 -0
- package/ts/src/utils/index.d.ts.map +1 -0
- package/ts/{utils → src/utils}/index.js +2 -0
- package/ts/src/utils/index.js.map +1 -0
- package/ts/src/utils/rebuffer.d.ts.map +1 -0
- package/ts/{utils → src/utils}/rebuffer.js +7 -1
- package/ts/src/utils/rebuffer.js.map +1 -0
- package/ts/src/utils/rebuffer.test.d.ts.map +1 -0
- package/ts/src/utils/rebuffer.test.js.map +1 -0
- package/ts/src/utils/relative-path.d.ts.map +1 -0
- package/ts/src/utils/relative-path.js.map +1 -0
- package/ts/src/utils/relative-path.test.d.ts.map +1 -0
- package/ts/src/utils/relative-path.test.js.map +1 -0
- package/ts/src/utils/stream-map.d.ts.map +1 -0
- package/ts/src/utils/stream-map.js.map +1 -0
- package/ts/src/utils/stream-map.test.d.ts.map +1 -0
- package/ts/src/utils/stream-map.test.js.map +1 -0
- package/ts/src/utils/stream-test-helper.d.ts.map +1 -0
- package/ts/{utils → src/utils}/stream-test-helper.js +18 -10
- package/ts/src/utils/stream-test-helper.js.map +1 -0
- package/ts/src/utils/stream2string.d.ts.map +1 -0
- package/ts/src/utils/stream2string.js.map +1 -0
- package/ts/src/utils/stream2string.test.d.ts.map +1 -0
- package/ts/src/utils/stream2string.test.js.map +1 -0
- package/ts/src/utils/string2stream.d.ts.map +1 -0
- package/ts/src/utils/string2stream.js.map +1 -0
- package/ts/src/utils/string2stream.test.d.ts.map +1 -0
- package/ts/src/utils/string2stream.test.js.map +1 -0
- package/ts/src/utils/stripper.d.ts +3 -0
- package/ts/src/utils/stripper.d.ts.map +1 -0
- package/ts/src/utils/stripper.js.map +1 -0
- package/ts/src/utils/stripper.test.d.ts.map +1 -0
- package/ts/src/utils/stripper.test.js.map +1 -0
- package/ts/src/version.d.ts.map +1 -0
- package/ts/src/version.js.map +1 -0
- package/ts/src/web/index.d.ts.map +1 -0
- package/ts/src/web/index.js.map +1 -0
- package/ts/src/web/web-env-actions.d.ts.map +1 -0
- package/ts/src/web/web-env-actions.js.map +1 -0
- package/ts/{web → src/web}/web-sys-abstraction.d.ts +1 -1
- package/ts/src/web/web-sys-abstraction.d.ts.map +1 -0
- package/ts/src/web/web-sys-abstraction.js.map +1 -0
- package/ts/vitest.browser.config.d.ts +3 -0
- package/ts/vitest.browser.config.d.ts.map +1 -0
- package/ts/vitest.browser.config.js +17 -0
- package/ts/vitest.browser.config.js.map +1 -0
- package/ts/vitest.cf-runtime.config.d.ts +3 -0
- package/ts/vitest.cf-runtime.config.d.ts.map +1 -0
- package/ts/vitest.cf-runtime.config.js +16 -0
- package/ts/vitest.cf-runtime.config.js.map +1 -0
- package/ts/vitest.config.d.ts +3 -0
- package/ts/vitest.config.d.ts.map +1 -0
- package/ts/vitest.config.js +8 -0
- package/ts/vitest.config.js.map +1 -0
- package/ts/vitest.node.config.d.ts +3 -0
- package/ts/vitest.node.config.d.ts.map +1 -0
- package/ts/vitest.node.config.js +11 -0
- package/ts/vitest.node.config.js.map +1 -0
- package/ts/vitest.workspace.d.ts +3 -0
- package/ts/vitest.workspace.d.ts.map +1 -0
- package/ts/vitest.workspace.js +6 -0
- package/ts/vitest.workspace.js.map +1 -0
- package/utils/index.cjs +210 -3
- package/utils/index.cjs.map +1 -1
- package/utils/index.d.cts +3 -2
- package/utils/index.d.ts +3 -2
- package/utils/index.js +11 -4
- package/web/index.cjs +200 -6
- package/web/index.cjs.map +1 -1
- package/web/index.d.cts +4 -4
- package/web/index.d.ts +4 -4
- package/web/index.js +3 -3
- package/chunk-5GJADB3C.js.map +0 -1
- package/chunk-A7OPSHUV.js.map +0 -1
- package/chunk-HFP74WLI.js.map +0 -1
- package/chunk-MFC4AD5O.js.map +0 -1
- package/chunk-OQ4NGEJR.js.map +0 -1
- package/chunk-PPS4L4VW.js +0 -38
- package/chunk-PPS4L4VW.js.map +0 -1
- package/index-Q3phXzYr.d.cts +0 -75
- package/index-tIGZMHTc.d.ts +0 -75
- package/ts/base-sys-abstraction.d.ts.map +0 -1
- package/ts/base-sys-abstraction.js.map +0 -1
- package/ts/base-sys-abstraction.test.d.ts.map +0 -1
- package/ts/base-sys-abstraction.test.js.map +0 -1
- package/ts/bin2text.d.ts.map +0 -1
- package/ts/bin2text.js.map +0 -1
- package/ts/bin2text.test.js.map +0 -1
- package/ts/cf/cf-env-actions.d.ts.map +0 -1
- package/ts/cf/cf-env-actions.js.map +0 -1
- package/ts/cf/cf-sys-abstraction.d.ts.map +0 -1
- package/ts/cf/cf-sys-abstraction.js.map +0 -1
- package/ts/cf/index.d.ts.map +0 -1
- package/ts/cf/index.js.map +0 -1
- package/ts/crypto.d.ts.map +0 -1
- package/ts/crypto.js.map +0 -1
- package/ts/crypto.test.js.map +0 -1
- package/ts/deno/deno-env-actions.d.ts.map +0 -1
- package/ts/deno/deno-env-actions.js.map +0 -1
- package/ts/deno/deno-file-service.d.ts.map +0 -1
- package/ts/deno/deno-file-service.js.map +0 -1
- package/ts/deno/deno-sys-abstraction.d.ts.map +0 -1
- package/ts/deno/deno-sys-abstraction.js.map +0 -1
- package/ts/deno/index.d.ts.map +0 -1
- package/ts/deno/index.js.map +0 -1
- package/ts/file-service.d.ts.map +0 -1
- package/ts/future.d.ts.map +0 -1
- package/ts/future.js.map +0 -1
- package/ts/future.test.js.map +0 -1
- package/ts/http_header.d.ts.map +0 -1
- package/ts/http_header.js.map +0 -1
- package/ts/http_header.test.d.ts.map +0 -1
- package/ts/http_header.test.js.map +0 -1
- package/ts/index.d.ts.map +0 -1
- package/ts/index.js.map +0 -1
- package/ts/log-level-impl.d.ts.map +0 -1
- package/ts/log-level-impl.js.map +0 -1
- package/ts/log-writer-impl.d.ts.map +0 -1
- package/ts/log-writer-impl.js.map +0 -1
- package/ts/logger-impl.d.ts.map +0 -1
- package/ts/logger-impl.js.map +0 -1
- package/ts/logger.d.ts.map +0 -1
- package/ts/logger.js.map +0 -1
- package/ts/logger.test.js.map +0 -1
- package/ts/node/index.d.ts.map +0 -1
- package/ts/node/index.js.map +0 -1
- package/ts/node/mock-file-service.d.ts.map +0 -1
- package/ts/node/mock-file-service.js.map +0 -1
- package/ts/node/mock-file-service.test.d.ts.map +0 -1
- package/ts/node/mock-file-service.test.js.map +0 -1
- package/ts/node/node-env-actions.d.ts.map +0 -1
- package/ts/node/node-env-actions.js.map +0 -1
- package/ts/node/node-file-service.d.ts.map +0 -1
- package/ts/node/node-file-service.js.map +0 -1
- package/ts/node/node-sys-abstraction.d.ts.map +0 -1
- package/ts/node/node-sys-abstraction.js.map +0 -1
- package/ts/node/node-sys-abstraction.test.d.ts.map +0 -1
- package/ts/node/node-sys-abstraction.test.js.map +0 -1
- package/ts/option.d.ts.map +0 -1
- package/ts/option.js.map +0 -1
- package/ts/resolve-once.d.ts.map +0 -1
- package/ts/resolve-once.js.map +0 -1
- package/ts/resolve-once.test.d.ts.map +0 -1
- package/ts/resolve-once.test.js.map +0 -1
- package/ts/result.d.ts.map +0 -1
- package/ts/result.js.map +0 -1
- package/ts/result.test.js.map +0 -1
- package/ts/runtime.d.ts.map +0 -1
- package/ts/runtime.js.map +0 -1
- package/ts/sys-abstraction.d.ts.map +0 -1
- package/ts/sys-abstraction.js.map +0 -1
- package/ts/sys-env.d.ts.map +0 -1
- package/ts/sys-env.js.map +0 -1
- package/ts/sys-env.test.js.map +0 -1
- package/ts/test/index.d.ts.map +0 -1
- package/ts/test/index.js.map +0 -1
- package/ts/test/log-write-stream.d.ts.map +0 -1
- package/ts/test/log-write-stream.js.map +0 -1
- package/ts/test/mock-logger.d.ts.map +0 -1
- package/ts/test/mock-logger.js.map +0 -1
- package/ts/test/mock-logger.test.d.ts.map +0 -1
- package/ts/test/mock-logger.test.js.map +0 -1
- package/ts/test/test-exit-handler.d.ts.map +0 -1
- package/ts/test/test-exit-handler.js.map +0 -1
- package/ts/time.d.ts.map +0 -1
- package/ts/time.js.map +0 -1
- package/ts/tracer.d.ts.map +0 -1
- package/ts/tracer.js.map +0 -1
- package/ts/tracer.test.js.map +0 -1
- package/ts/txt-en-decoder.d.ts.map +0 -1
- package/ts/txt-en-decoder.js.map +0 -1
- package/ts/uri.d.ts.map +0 -1
- package/ts/uri.js.map +0 -1
- package/ts/uri.test.js.map +0 -1
- package/ts/utils/console-write-stream.d.ts.map +0 -1
- package/ts/utils/console-write-stream.js.map +0 -1
- package/ts/utils/fanout-write-stream.d.ts.map +0 -1
- package/ts/utils/fanout-write-stream.js.map +0 -1
- package/ts/utils/index.d.ts.map +0 -1
- package/ts/utils/index.js.map +0 -1
- package/ts/utils/rebuffer.d.ts.map +0 -1
- package/ts/utils/rebuffer.js.map +0 -1
- package/ts/utils/rebuffer.test.d.ts.map +0 -1
- package/ts/utils/rebuffer.test.js.map +0 -1
- package/ts/utils/relative-path.d.ts.map +0 -1
- package/ts/utils/relative-path.js.map +0 -1
- package/ts/utils/relative-path.test.d.ts.map +0 -1
- package/ts/utils/relative-path.test.js.map +0 -1
- package/ts/utils/stream-map.d.ts.map +0 -1
- package/ts/utils/stream-map.js.map +0 -1
- package/ts/utils/stream-map.test.d.ts.map +0 -1
- package/ts/utils/stream-map.test.js.map +0 -1
- package/ts/utils/stream-test-helper.d.ts.map +0 -1
- package/ts/utils/stream-test-helper.js.map +0 -1
- package/ts/utils/stream2string.d.ts.map +0 -1
- package/ts/utils/stream2string.js.map +0 -1
- package/ts/utils/stream2string.test.d.ts.map +0 -1
- package/ts/utils/stream2string.test.js.map +0 -1
- package/ts/utils/string2stream.d.ts.map +0 -1
- package/ts/utils/string2stream.js.map +0 -1
- package/ts/utils/string2stream.test.d.ts.map +0 -1
- package/ts/utils/string2stream.test.js.map +0 -1
- package/ts/utils/stripper.d.ts +0 -3
- package/ts/utils/stripper.d.ts.map +0 -1
- package/ts/utils/stripper.js.map +0 -1
- package/ts/utils/stripper.test.d.ts.map +0 -1
- package/ts/utils/stripper.test.js.map +0 -1
- package/ts/version.d.ts.map +0 -1
- package/ts/version.js.map +0 -1
- package/ts/web/index.d.ts.map +0 -1
- package/ts/web/index.js.map +0 -1
- package/ts/web/web-env-actions.d.ts.map +0 -1
- package/ts/web/web-env-actions.js.map +0 -1
- package/ts/web/web-sys-abstraction.d.ts.map +0 -1
- package/ts/web/web-sys-abstraction.js.map +0 -1
- package/txt-en-decoder-CZYJUju2.d.cts +0 -11
- package/txt-en-decoder-CZYJUju2.d.ts +0 -11
- /package/ts/{base-sys-abstraction.test.d.ts → src/base-sys-abstraction.test.d.ts} +0 -0
- /package/ts/{base-sys-abstraction.test.js → src/base-sys-abstraction.test.js} +0 -0
- /package/ts/{bin2text.d.ts → src/bin2text.d.ts} +0 -0
- /package/ts/{bin2text.js → src/bin2text.js} +0 -0
- /package/ts/{bin2text.test.d.ts → src/bin2text.test.d.ts} +0 -0
- /package/ts/{bin2text.test.js → src/bin2text.test.js} +0 -0
- /package/ts/{cf → src/cf}/cf-env-actions.d.ts +0 -0
- /package/ts/{cf → src/cf}/cf-env-actions.js +0 -0
- /package/ts/{cf → src/cf}/cf-sys-abstraction.d.ts +0 -0
- /package/ts/{cf → src/cf}/cf-sys-abstraction.js +0 -0
- /package/ts/{cf → src/cf}/index.d.ts +0 -0
- /package/ts/{cf → src/cf}/index.js +0 -0
- /package/ts/{crypto.d.ts → src/crypto.d.ts} +0 -0
- /package/ts/{crypto.js → src/crypto.js} +0 -0
- /package/ts/{crypto.test.d.ts → src/crypto.test.d.ts} +0 -0
- /package/ts/{deno → src/deno}/deno-env-actions.d.ts +0 -0
- /package/ts/{deno → src/deno}/deno-env-actions.js +0 -0
- /package/ts/{deno → src/deno}/deno-file-service.d.ts +0 -0
- /package/ts/{deno → src/deno}/deno-file-service.js +0 -0
- /package/ts/{deno → src/deno}/deno-sys-abstraction.d.ts +0 -0
- /package/ts/{deno → src/deno}/deno-sys-abstraction.js +0 -0
- /package/ts/{deno → src/deno}/index.d.ts +0 -0
- /package/ts/{deno → src/deno}/index.js +0 -0
- /package/ts/{file-service.d.ts → src/file-service.d.ts} +0 -0
- /package/ts/{file-service.js → src/file-service.js} +0 -0
- /package/ts/{future.d.ts → src/future.d.ts} +0 -0
- /package/ts/{future.js → src/future.js} +0 -0
- /package/ts/{future.test.d.ts → src/future.test.d.ts} +0 -0
- /package/ts/{future.test.js → src/future.test.js} +0 -0
- /package/ts/{http_header.d.ts → src/http_header.d.ts} +0 -0
- /package/ts/{http_header.js → src/http_header.js} +0 -0
- /package/ts/{http_header.test.d.ts → src/http_header.test.d.ts} +0 -0
- /package/ts/{http_header.test.js → src/http_header.test.js} +0 -0
- /package/ts/{log-level-impl.d.ts → src/log-level-impl.d.ts} +0 -0
- /package/ts/{log-level-impl.js → src/log-level-impl.js} +0 -0
- /package/ts/{log-writer-impl.d.ts → src/log-writer-impl.d.ts} +0 -0
- /package/ts/{logger.js → src/logger.js} +0 -0
- /package/ts/{logger.test.d.ts → src/logger.test.d.ts} +0 -0
- /package/ts/{node → src/node}/index.d.ts +0 -0
- /package/ts/{node → src/node}/index.js +0 -0
- /package/ts/{node → src/node}/mock-file-service.d.ts +0 -0
- /package/ts/{node → src/node}/mock-file-service.test.d.ts +0 -0
- /package/ts/{node → src/node}/mock-file-service.test.js +0 -0
- /package/ts/{node → src/node}/node-env-actions.d.ts +0 -0
- /package/ts/{node → src/node}/node-env-actions.js +0 -0
- /package/ts/{node → src/node}/node-file-service.d.ts +0 -0
- /package/ts/{node → src/node}/node-file-service.js +0 -0
- /package/ts/{node → src/node}/node-sys-abstraction.d.ts +0 -0
- /package/ts/{node → src/node}/node-sys-abstraction.js +0 -0
- /package/ts/{node → src/node}/node-sys-abstraction.test.d.ts +0 -0
- /package/ts/{node → src/node}/node-sys-abstraction.test.js +0 -0
- /package/ts/{option.d.ts → src/option.d.ts} +0 -0
- /package/ts/{option.js → src/option.js} +0 -0
- /package/ts/{resolve-once.test.d.ts → src/resolve-once.test.d.ts} +0 -0
- /package/ts/{result.d.ts → src/result.d.ts} +0 -0
- /package/ts/{result.js → src/result.js} +0 -0
- /package/ts/{result.test.d.ts → src/result.test.d.ts} +0 -0
- /package/ts/{runtime.d.ts → src/runtime.d.ts} +0 -0
- /package/ts/{runtime.js → src/runtime.js} +0 -0
- /package/ts/{sys-abstraction.d.ts → src/sys-abstraction.d.ts} +0 -0
- /package/ts/{sys-abstraction.js → src/sys-abstraction.js} +0 -0
- /package/ts/{sys-env.test.d.ts → src/sys-env.test.d.ts} +0 -0
- /package/ts/{test → src/test}/index.d.ts +0 -0
- /package/ts/{test → src/test}/index.js +0 -0
- /package/ts/{test → src/test}/log-write-stream.d.ts +0 -0
- /package/ts/{test → src/test}/log-write-stream.js +0 -0
- /package/ts/{test → src/test}/mock-logger.d.ts +0 -0
- /package/ts/{test → src/test}/mock-logger.js +0 -0
- /package/ts/{test → src/test}/mock-logger.test.d.ts +0 -0
- /package/ts/{test → src/test}/mock-logger.test.js +0 -0
- /package/ts/{test → src/test}/test-exit-handler.d.ts +0 -0
- /package/ts/{time.d.ts → src/time.d.ts} +0 -0
- /package/ts/{time.js → src/time.js} +0 -0
- /package/ts/{tracer.d.ts → src/tracer.d.ts} +0 -0
- /package/ts/{tracer.js → src/tracer.js} +0 -0
- /package/ts/{tracer.test.d.ts → src/tracer.test.d.ts} +0 -0
- /package/ts/{txt-en-decoder.d.ts → src/txt-en-decoder.d.ts} +0 -0
- /package/ts/{txt-en-decoder.js → src/txt-en-decoder.js} +0 -0
- /package/ts/{uri.test.d.ts → src/uri.test.d.ts} +0 -0
- /package/ts/{utils → src/utils}/fanout-write-stream.js +0 -0
- /package/ts/{utils → src/utils}/rebuffer.d.ts +0 -0
- /package/ts/{utils → src/utils}/rebuffer.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/rebuffer.test.js +0 -0
- /package/ts/{utils → src/utils}/relative-path.d.ts +0 -0
- /package/ts/{utils → src/utils}/relative-path.js +0 -0
- /package/ts/{utils → src/utils}/relative-path.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/relative-path.test.js +0 -0
- /package/ts/{utils → src/utils}/stream-map.d.ts +0 -0
- /package/ts/{utils → src/utils}/stream-map.js +0 -0
- /package/ts/{utils → src/utils}/stream-map.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/stream-map.test.js +0 -0
- /package/ts/{utils → src/utils}/stream-test-helper.d.ts +0 -0
- /package/ts/{utils → src/utils}/stream2string.d.ts +0 -0
- /package/ts/{utils → src/utils}/stream2string.js +0 -0
- /package/ts/{utils → src/utils}/stream2string.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/stream2string.test.js +0 -0
- /package/ts/{utils → src/utils}/string2stream.d.ts +0 -0
- /package/ts/{utils → src/utils}/string2stream.js +0 -0
- /package/ts/{utils → src/utils}/string2stream.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/string2stream.test.js +0 -0
- /package/ts/{utils → src/utils}/stripper.js +0 -0
- /package/ts/{utils → src/utils}/stripper.test.d.ts +0 -0
- /package/ts/{utils → src/utils}/stripper.test.js +0 -0
- /package/ts/{version.d.ts → src/version.d.ts} +0 -0
- /package/ts/{version.js → src/version.js} +0 -0
- /package/ts/{web → src/web}/index.d.ts +0 -0
- /package/ts/{web → src/web}/index.js +0 -0
- /package/ts/{web → src/web}/web-env-actions.d.ts +0 -0
- /package/ts/{web → src/web}/web-env-actions.js +0 -0
- /package/ts/{web → src/web}/web-sys-abstraction.js +0 -0
package/index.cjs
CHANGED
@@ -35,8 +35,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
35
35
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
36
36
|
|
37
37
|
// src/index.ts
|
38
|
-
var
|
39
|
-
__export(
|
38
|
+
var index_exports = {};
|
39
|
+
__export(index_exports, {
|
40
40
|
BaseSysAbstraction: () => BaseSysAbstraction,
|
41
41
|
BuildURI: () => BuildURI,
|
42
42
|
ConstTime: () => ConstTime,
|
@@ -95,12 +95,13 @@ __export(src_exports, {
|
|
95
95
|
isURL: () => isURL,
|
96
96
|
key: () => key,
|
97
97
|
logValue: () => logValue,
|
98
|
+
param: () => param2,
|
98
99
|
registerEnvAction: () => registerEnvAction,
|
99
100
|
runtimeFn: () => runtimeFn,
|
100
101
|
toCryptoRuntime: () => toCryptoRuntime,
|
101
102
|
utils: () => utils_exports
|
102
103
|
});
|
103
|
-
module.exports = __toCommonJS(
|
104
|
+
module.exports = __toCommonJS(index_exports);
|
104
105
|
|
105
106
|
// src/logger-impl.ts
|
106
107
|
var import_yaml = __toESM(require("yaml"), 1);
|
@@ -463,13 +464,15 @@ var BaseSysAbstraction = class {
|
|
463
464
|
this._systemService = params.SystemService;
|
464
465
|
this._txtEnDe = params.TxtEnDecoder;
|
465
466
|
const decoder2 = this._txtEnDe;
|
466
|
-
this._stdout = CFWriteableStream(
|
467
|
+
this._stdout = CFWriteableStream((chunk) => {
|
467
468
|
const decoded = decoder2.decode(chunk);
|
468
469
|
console.log(decoded.trimEnd());
|
470
|
+
return Promise.resolve();
|
469
471
|
});
|
470
|
-
this._stderr = CFWriteableStream(
|
472
|
+
this._stderr = CFWriteableStream((chunk) => {
|
471
473
|
const decoded = decoder2.decode(chunk);
|
472
474
|
console.error(decoded.trimEnd());
|
475
|
+
return Promise.resolve();
|
473
476
|
});
|
474
477
|
}
|
475
478
|
};
|
@@ -567,20 +570,21 @@ var ResolveSeq = class {
|
|
567
570
|
}
|
568
571
|
reset() {
|
569
572
|
}
|
570
|
-
|
573
|
+
_step(item) {
|
571
574
|
if (!item) {
|
572
|
-
return;
|
575
|
+
return Promise.resolve();
|
573
576
|
}
|
574
577
|
item.fn(this.ctx).then((value) => item.future.resolve(value)).catch((e) => item.future.reject(e)).finally(() => {
|
575
578
|
this._seqFutures.shift();
|
576
|
-
this._step(this._seqFutures[0]);
|
579
|
+
void this._step(this._seqFutures[0]);
|
577
580
|
});
|
581
|
+
return Promise.resolve();
|
578
582
|
}
|
579
583
|
async add(fn, id) {
|
580
584
|
const future = new Future();
|
581
585
|
this._seqFutures.push({ future, fn, id });
|
582
586
|
if (this._seqFutures.length === 1) {
|
583
|
-
this._step(this._seqFutures[0]);
|
587
|
+
void this._step(this._seqFutures[0]);
|
584
588
|
}
|
585
589
|
return future.asPromise();
|
586
590
|
}
|
@@ -716,7 +720,10 @@ function isSet(value, ref = globalThis) {
|
|
716
720
|
}
|
717
721
|
function runtimeFn() {
|
718
722
|
const gt = globalThis;
|
719
|
-
let isReactNative =
|
723
|
+
let isReactNative = (
|
724
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
725
|
+
isSet("navigator.product") && typeof gt["navigator"] === "object" && gt["navigator"]["product"] === "ReactNative"
|
726
|
+
);
|
720
727
|
let isNodeIsh = false;
|
721
728
|
if (!isSet("Deno")) {
|
722
729
|
isNodeIsh = isSet("process.versions.node") && !isReactNative;
|
@@ -901,6 +908,156 @@ var CFEnvActions = class _CFEnvActions {
|
|
901
908
|
}
|
902
909
|
};
|
903
910
|
|
911
|
+
// src/result.ts
|
912
|
+
var Result = class _Result {
|
913
|
+
static Ok(t) {
|
914
|
+
return new ResultOK(t);
|
915
|
+
}
|
916
|
+
static Err(t) {
|
917
|
+
if (typeof t === "string") {
|
918
|
+
return new ResultError(new Error(t));
|
919
|
+
}
|
920
|
+
if (_Result.Is(t)) {
|
921
|
+
if (t.is_ok()) {
|
922
|
+
return new ResultError(new Error("Result Error is Ok"));
|
923
|
+
}
|
924
|
+
return t;
|
925
|
+
}
|
926
|
+
return new ResultError(t);
|
927
|
+
}
|
928
|
+
static Is(t) {
|
929
|
+
if (!t) {
|
930
|
+
return false;
|
931
|
+
}
|
932
|
+
if (t instanceof _Result) {
|
933
|
+
return true;
|
934
|
+
}
|
935
|
+
const rt = t;
|
936
|
+
if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === "function")) {
|
937
|
+
return true;
|
938
|
+
}
|
939
|
+
return false;
|
940
|
+
}
|
941
|
+
isOk() {
|
942
|
+
return this.is_ok();
|
943
|
+
}
|
944
|
+
isErr() {
|
945
|
+
return this.is_err();
|
946
|
+
}
|
947
|
+
Ok() {
|
948
|
+
return this.unwrap();
|
949
|
+
}
|
950
|
+
Err() {
|
951
|
+
return this.unwrap_err();
|
952
|
+
}
|
953
|
+
};
|
954
|
+
var ResultOK = class extends Result {
|
955
|
+
constructor(t) {
|
956
|
+
super();
|
957
|
+
this._t = t;
|
958
|
+
}
|
959
|
+
is_ok() {
|
960
|
+
return true;
|
961
|
+
}
|
962
|
+
is_err() {
|
963
|
+
return false;
|
964
|
+
}
|
965
|
+
unwrap_err() {
|
966
|
+
throw new Error("Result is Ok");
|
967
|
+
}
|
968
|
+
unwrap() {
|
969
|
+
return this._t;
|
970
|
+
}
|
971
|
+
};
|
972
|
+
var ResultError = class extends Result {
|
973
|
+
constructor(t) {
|
974
|
+
super();
|
975
|
+
this._error = t;
|
976
|
+
}
|
977
|
+
is_ok() {
|
978
|
+
return false;
|
979
|
+
}
|
980
|
+
is_err() {
|
981
|
+
return true;
|
982
|
+
}
|
983
|
+
unwrap() {
|
984
|
+
throw new Error(`Result is Err: ${this._error}`);
|
985
|
+
}
|
986
|
+
unwrap_err() {
|
987
|
+
return this._error;
|
988
|
+
}
|
989
|
+
};
|
990
|
+
function exception2Result(fn) {
|
991
|
+
try {
|
992
|
+
const res = fn();
|
993
|
+
if (res instanceof Promise) {
|
994
|
+
return res.then((value) => Result.Ok(value)).catch((e) => Result.Err(e));
|
995
|
+
}
|
996
|
+
return Result.Ok(res);
|
997
|
+
} catch (e) {
|
998
|
+
return Result.Err(e);
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
// src/utils/get-params-result.ts
|
1003
|
+
var _REQUIRED = class {
|
1004
|
+
constructor() {
|
1005
|
+
this.val = "REQUIRED";
|
1006
|
+
}
|
1007
|
+
};
|
1008
|
+
var _OPTIONAL = class {
|
1009
|
+
constructor() {
|
1010
|
+
this.val = "OPTIONAL";
|
1011
|
+
}
|
1012
|
+
};
|
1013
|
+
var param = {
|
1014
|
+
REQUIRED: new _REQUIRED(),
|
1015
|
+
OPTIONAL: new _OPTIONAL()
|
1016
|
+
};
|
1017
|
+
function getParamsResult(keys, getParam) {
|
1018
|
+
const keyDef = keys.flat().reduce(
|
1019
|
+
(acc, i) => {
|
1020
|
+
if (typeof i === "string") {
|
1021
|
+
acc.push({ key: i, def: void 0, isOptional: false });
|
1022
|
+
} else if (typeof i === "object") {
|
1023
|
+
acc.push(
|
1024
|
+
...Object.keys(i).map((k) => ({
|
1025
|
+
key: k,
|
1026
|
+
def: typeof i[k] === "string" ? i[k] : void 0,
|
1027
|
+
isOptional: i[k] === param.OPTIONAL
|
1028
|
+
}))
|
1029
|
+
);
|
1030
|
+
}
|
1031
|
+
return acc;
|
1032
|
+
},
|
1033
|
+
[]
|
1034
|
+
);
|
1035
|
+
const msgFn = keys.find((k) => typeof k === "function") || ((...keys2) => {
|
1036
|
+
const msg = keys2.join(",");
|
1037
|
+
return `missing parameters: ${msg}`;
|
1038
|
+
});
|
1039
|
+
const errors = [];
|
1040
|
+
const result = {};
|
1041
|
+
for (const kd of keyDef) {
|
1042
|
+
const val = getParam.getParam(kd.key);
|
1043
|
+
if (val === void 0) {
|
1044
|
+
if (typeof kd.def === "string") {
|
1045
|
+
result[kd.key] = kd.def;
|
1046
|
+
} else {
|
1047
|
+
if (!kd.isOptional) {
|
1048
|
+
errors.push(kd.key);
|
1049
|
+
}
|
1050
|
+
}
|
1051
|
+
} else {
|
1052
|
+
result[kd.key] = val;
|
1053
|
+
}
|
1054
|
+
}
|
1055
|
+
if (errors.length) {
|
1056
|
+
return Result.Err(msgFn(...errors));
|
1057
|
+
}
|
1058
|
+
return Result.Ok(result);
|
1059
|
+
}
|
1060
|
+
|
904
1061
|
// src/sys-env.ts
|
905
1062
|
var envActions = [
|
906
1063
|
{ id: "cf", fn: (opts) => CFEnvActions.new(opts) },
|
@@ -932,12 +1089,62 @@ function envFactory(opts = {}) {
|
|
932
1089
|
return ret;
|
933
1090
|
});
|
934
1091
|
}
|
1092
|
+
function isIterable(obj) {
|
1093
|
+
if (obj == null) {
|
1094
|
+
return false;
|
1095
|
+
}
|
1096
|
+
return typeof obj[Symbol.iterator] === "function";
|
1097
|
+
}
|
935
1098
|
var EnvImpl = class {
|
936
1099
|
constructor(map, opts = {}) {
|
937
1100
|
this._onSet = [];
|
938
1101
|
this._map = map;
|
939
1102
|
this._updatePresets(opts.presetEnv);
|
940
1103
|
}
|
1104
|
+
gets(...kparams) {
|
1105
|
+
return getParamsResult(kparams, {
|
1106
|
+
getParam: (k) => this.get(k)
|
1107
|
+
});
|
1108
|
+
}
|
1109
|
+
sets(...keys) {
|
1110
|
+
keys.forEach((key2) => {
|
1111
|
+
if (Array.isArray(key2)) {
|
1112
|
+
if (key2.length === 2) {
|
1113
|
+
const [k, v] = key2;
|
1114
|
+
if (typeof k === "string" && typeof v === "string") {
|
1115
|
+
this.set(k, v);
|
1116
|
+
return;
|
1117
|
+
}
|
1118
|
+
}
|
1119
|
+
for (const item of key2) {
|
1120
|
+
if (Array.isArray(item)) {
|
1121
|
+
if (item.length === 2) {
|
1122
|
+
const [k, v] = item;
|
1123
|
+
if (typeof k === "string" && typeof v === "string") {
|
1124
|
+
this.set(k, v);
|
1125
|
+
}
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
}
|
1129
|
+
} else {
|
1130
|
+
if (isIterable(key2)) {
|
1131
|
+
for (const [k, v] of key2) {
|
1132
|
+
if (typeof k === "string" && typeof v === "string") {
|
1133
|
+
this.set(k, v);
|
1134
|
+
}
|
1135
|
+
}
|
1136
|
+
} else {
|
1137
|
+
const rKey = key2;
|
1138
|
+
for (const k in rKey) {
|
1139
|
+
const v = rKey[k];
|
1140
|
+
if (typeof k === "string" && typeof v === "string") {
|
1141
|
+
this.set(k, v);
|
1142
|
+
}
|
1143
|
+
}
|
1144
|
+
}
|
1145
|
+
}
|
1146
|
+
});
|
1147
|
+
}
|
941
1148
|
_updatePresets(presetEnv) {
|
942
1149
|
if (!presetEnv) {
|
943
1150
|
return;
|
@@ -1079,106 +1286,15 @@ var WebSystemService = class {
|
|
1079
1286
|
}
|
1080
1287
|
};
|
1081
1288
|
var my = void 0;
|
1082
|
-
function WebSysAbstraction(
|
1289
|
+
function WebSysAbstraction(param3) {
|
1083
1290
|
if (!my) {
|
1084
1291
|
my = new BaseSysAbstraction({
|
1085
|
-
TxtEnDecoder: (
|
1292
|
+
TxtEnDecoder: (param3 == null ? void 0 : param3.TxtEnDecoder) || Utf8EnDecoderSingleton(),
|
1086
1293
|
FileSystem: new WebFileService(),
|
1087
1294
|
SystemService: new WebSystemService()
|
1088
1295
|
});
|
1089
1296
|
}
|
1090
|
-
return new WrapperSysAbstraction(my,
|
1091
|
-
}
|
1092
|
-
|
1093
|
-
// src/result.ts
|
1094
|
-
var Result = class _Result {
|
1095
|
-
static Ok(t) {
|
1096
|
-
return new ResultOK(t);
|
1097
|
-
}
|
1098
|
-
static Err(t) {
|
1099
|
-
if (typeof t === "string") {
|
1100
|
-
return new ResultError(new Error(t));
|
1101
|
-
}
|
1102
|
-
if (_Result.Is(t)) {
|
1103
|
-
if (t.is_ok()) {
|
1104
|
-
return new ResultError(new Error("Result Error is Ok"));
|
1105
|
-
}
|
1106
|
-
return t;
|
1107
|
-
}
|
1108
|
-
return new ResultError(t);
|
1109
|
-
}
|
1110
|
-
static Is(t) {
|
1111
|
-
if (!t) {
|
1112
|
-
return false;
|
1113
|
-
}
|
1114
|
-
if (t instanceof _Result) {
|
1115
|
-
return true;
|
1116
|
-
}
|
1117
|
-
const rt = t;
|
1118
|
-
if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === "function")) {
|
1119
|
-
return true;
|
1120
|
-
}
|
1121
|
-
return false;
|
1122
|
-
}
|
1123
|
-
isOk() {
|
1124
|
-
return this.is_ok();
|
1125
|
-
}
|
1126
|
-
isErr() {
|
1127
|
-
return this.is_err();
|
1128
|
-
}
|
1129
|
-
Ok() {
|
1130
|
-
return this.unwrap();
|
1131
|
-
}
|
1132
|
-
Err() {
|
1133
|
-
return this.unwrap_err();
|
1134
|
-
}
|
1135
|
-
};
|
1136
|
-
var ResultOK = class extends Result {
|
1137
|
-
constructor(t) {
|
1138
|
-
super();
|
1139
|
-
this._t = t;
|
1140
|
-
}
|
1141
|
-
is_ok() {
|
1142
|
-
return true;
|
1143
|
-
}
|
1144
|
-
is_err() {
|
1145
|
-
return false;
|
1146
|
-
}
|
1147
|
-
unwrap_err() {
|
1148
|
-
throw new Error("Result is Ok");
|
1149
|
-
}
|
1150
|
-
unwrap() {
|
1151
|
-
return this._t;
|
1152
|
-
}
|
1153
|
-
};
|
1154
|
-
var ResultError = class extends Result {
|
1155
|
-
constructor(t) {
|
1156
|
-
super();
|
1157
|
-
this._error = t;
|
1158
|
-
}
|
1159
|
-
is_ok() {
|
1160
|
-
return false;
|
1161
|
-
}
|
1162
|
-
is_err() {
|
1163
|
-
return true;
|
1164
|
-
}
|
1165
|
-
unwrap() {
|
1166
|
-
throw new Error(`Result is Err: ${this._error}`);
|
1167
|
-
}
|
1168
|
-
unwrap_err() {
|
1169
|
-
return this._error;
|
1170
|
-
}
|
1171
|
-
};
|
1172
|
-
function exception2Result(fn) {
|
1173
|
-
try {
|
1174
|
-
const res = fn();
|
1175
|
-
if (res instanceof Promise) {
|
1176
|
-
return res.then((value) => Result.Ok(value)).catch((e) => Result.Err(e));
|
1177
|
-
}
|
1178
|
-
return Result.Ok(res);
|
1179
|
-
} catch (e) {
|
1180
|
-
return Result.Err(e);
|
1181
|
-
}
|
1297
|
+
return new WrapperSysAbstraction(my, param3);
|
1182
1298
|
}
|
1183
1299
|
|
1184
1300
|
// src/utils/relative-path.ts
|
@@ -1373,20 +1489,7 @@ function localStripper(path, restrips, obj) {
|
|
1373
1489
|
}
|
1374
1490
|
|
1375
1491
|
// src/uri.ts
|
1376
|
-
var
|
1377
|
-
constructor() {
|
1378
|
-
this.val = "REQUIRED";
|
1379
|
-
}
|
1380
|
-
};
|
1381
|
-
var _OPTIONAL = class {
|
1382
|
-
constructor() {
|
1383
|
-
this.val = "OPTIONAL";
|
1384
|
-
}
|
1385
|
-
};
|
1386
|
-
var key = {
|
1387
|
-
REQUIRED: new _REQUIRED(),
|
1388
|
-
OPTIONAL: new _OPTIONAL()
|
1389
|
-
};
|
1492
|
+
var key = param;
|
1390
1493
|
function coerceKey(key2, def) {
|
1391
1494
|
if (typeof key2 === "object") {
|
1392
1495
|
const keys = Object.keys(key2);
|
@@ -1542,49 +1645,6 @@ function getParamResult(key2, val, msgFn = (key3) => {
|
|
1542
1645
|
}
|
1543
1646
|
return Result.Ok(val);
|
1544
1647
|
}
|
1545
|
-
function getParamsResult(keys, getParam) {
|
1546
|
-
const keyDef = keys.flat().reduce(
|
1547
|
-
(acc, i) => {
|
1548
|
-
if (typeof i === "string") {
|
1549
|
-
acc.push({ key: i, def: void 0, isOptional: false });
|
1550
|
-
} else if (typeof i === "object") {
|
1551
|
-
acc.push(
|
1552
|
-
...Object.keys(i).map((k) => ({
|
1553
|
-
key: k,
|
1554
|
-
def: typeof i[k] === "string" ? i[k] : void 0,
|
1555
|
-
isOptional: i[k] instanceof _OPTIONAL
|
1556
|
-
}))
|
1557
|
-
);
|
1558
|
-
}
|
1559
|
-
return acc;
|
1560
|
-
},
|
1561
|
-
[]
|
1562
|
-
);
|
1563
|
-
const msgFn = keys.find((k) => typeof k === "function") || ((...keys2) => {
|
1564
|
-
const msg = keys2.join(",");
|
1565
|
-
return `missing parameters: ${msg}`;
|
1566
|
-
});
|
1567
|
-
const errors = [];
|
1568
|
-
const result = {};
|
1569
|
-
for (const kd of keyDef) {
|
1570
|
-
const val = getParam.getParam(kd.key);
|
1571
|
-
if (val === void 0) {
|
1572
|
-
if (typeof kd.def === "string") {
|
1573
|
-
result[kd.key] = kd.def;
|
1574
|
-
} else {
|
1575
|
-
if (!kd.isOptional) {
|
1576
|
-
errors.push(kd.key);
|
1577
|
-
}
|
1578
|
-
}
|
1579
|
-
} else {
|
1580
|
-
result[kd.key] = val;
|
1581
|
-
}
|
1582
|
-
}
|
1583
|
-
if (errors.length) {
|
1584
|
-
return Result.Err(msgFn(...errors));
|
1585
|
-
}
|
1586
|
-
return Result.Ok(result);
|
1587
|
-
}
|
1588
1648
|
var BuildURI = class _BuildURI {
|
1589
1649
|
// pathname needs this
|
1590
1650
|
constructor(url) {
|
@@ -1844,7 +1904,7 @@ var ConsoleWriterStreamDefaultWriter = class {
|
|
1844
1904
|
this.ready = Promise.resolve(void 0);
|
1845
1905
|
this.closed = Promise.resolve(void 0);
|
1846
1906
|
}
|
1847
|
-
|
1907
|
+
write(chunk) {
|
1848
1908
|
let strObj = this.decoder.decode(chunk).trimEnd();
|
1849
1909
|
let output = "log";
|
1850
1910
|
try {
|
@@ -1862,6 +1922,7 @@ var ConsoleWriterStreamDefaultWriter = class {
|
|
1862
1922
|
default:
|
1863
1923
|
console.log(strObj);
|
1864
1924
|
}
|
1925
|
+
return Promise.resolve();
|
1865
1926
|
}
|
1866
1927
|
};
|
1867
1928
|
var ConsoleWriterStream = class {
|
@@ -1872,8 +1933,8 @@ var ConsoleWriterStream = class {
|
|
1872
1933
|
abort(reason) {
|
1873
1934
|
throw new Error("Method not implemented.");
|
1874
1935
|
}
|
1875
|
-
|
1876
|
-
return;
|
1936
|
+
close() {
|
1937
|
+
return Promise.resolve();
|
1877
1938
|
}
|
1878
1939
|
getWriter() {
|
1879
1940
|
if (this.locked) {
|
@@ -1901,7 +1962,7 @@ var LogWriterStream = class {
|
|
1901
1962
|
const writer = this._out.getWriter();
|
1902
1963
|
await writer.ready;
|
1903
1964
|
await writer.write(encoded);
|
1904
|
-
|
1965
|
+
writer.releaseLock();
|
1905
1966
|
} catch (err) {
|
1906
1967
|
console.error("Chunk error:", err);
|
1907
1968
|
}
|
@@ -1925,7 +1986,9 @@ var LogWriterStream = class {
|
|
1925
1986
|
return;
|
1926
1987
|
}
|
1927
1988
|
const my2 = this._toFlush.shift();
|
1928
|
-
my2 == null ? void 0 : my2().
|
1989
|
+
my2 == null ? void 0 : my2().catch((e) => {
|
1990
|
+
console.error("Flush error:", e);
|
1991
|
+
}).finally(() => {
|
1929
1992
|
this._flush(this._toFlush);
|
1930
1993
|
});
|
1931
1994
|
}
|
@@ -2086,9 +2149,6 @@ function getLen(value, lvs) {
|
|
2086
2149
|
}
|
2087
2150
|
return logValue(() => -1, lvs);
|
2088
2151
|
}
|
2089
|
-
function hash(value) {
|
2090
|
-
return "not implemented";
|
2091
|
-
}
|
2092
2152
|
function toLogValue(lop) {
|
2093
2153
|
if (lop && typeof lop.then === "function") {
|
2094
2154
|
throw new Error("async logValue Not implemented");
|
@@ -2338,11 +2398,9 @@ var LoggerImpl = class _LoggerImpl {
|
|
2338
2398
|
this._attributes[key2] = getLen(value, toLogValueCtx(this.levelHandler));
|
2339
2399
|
return this;
|
2340
2400
|
}
|
2401
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2341
2402
|
Hash(value, key2 = "hash") {
|
2342
|
-
|
2343
|
-
async () => `${getLen(value, toLogValueCtx(this.levelHandler)).value()}:${await hash(value)}`
|
2344
|
-
);
|
2345
|
-
return this;
|
2403
|
+
throw new Error("Not implemented");
|
2346
2404
|
}
|
2347
2405
|
Url(url, key2 = "url") {
|
2348
2406
|
this.Ref(key2, () => URI.from(url).toString());
|
@@ -3039,6 +3097,8 @@ __export(utils_exports, {
|
|
3039
3097
|
FanoutWriteStream: () => FanoutWriteStream,
|
3040
3098
|
array2stream: () => array2stream,
|
3041
3099
|
devnull: () => devnull,
|
3100
|
+
getParamsResult: () => getParamsResult,
|
3101
|
+
param: () => param,
|
3042
3102
|
rebuffer: () => rebuffer,
|
3043
3103
|
rebufferArray: () => rebufferArray,
|
3044
3104
|
stream2array: () => stream2array,
|
@@ -3046,6 +3106,7 @@ __export(utils_exports, {
|
|
3046
3106
|
stream2uint8array: () => stream2uint8array,
|
3047
3107
|
streamMap: () => streamMap,
|
3048
3108
|
string2stream: () => string2stream,
|
3109
|
+
stripper: () => stripper,
|
3049
3110
|
uint8array2stream: () => uint8array2stream
|
3050
3111
|
});
|
3051
3112
|
|
@@ -3152,6 +3213,9 @@ function pump(ps, controller, next) {
|
|
3152
3213
|
ps.tmpLen += value.length;
|
3153
3214
|
}
|
3154
3215
|
pump(ps, controller, next);
|
3216
|
+
}).catch((err) => {
|
3217
|
+
controller.error(err);
|
3218
|
+
next();
|
3155
3219
|
});
|
3156
3220
|
}
|
3157
3221
|
function rebuffer(a, chunkSize) {
|
@@ -3229,6 +3293,9 @@ function uint8array2stream(str) {
|
|
3229
3293
|
}
|
3230
3294
|
});
|
3231
3295
|
}
|
3296
|
+
|
3297
|
+
// src/index.ts
|
3298
|
+
var param2 = param;
|
3232
3299
|
// Annotate the CommonJS export names for ESM import in node:
|
3233
3300
|
0 && (module.exports = {
|
3234
3301
|
BaseSysAbstraction,
|
@@ -3289,6 +3356,7 @@ function uint8array2stream(str) {
|
|
3289
3356
|
isURL,
|
3290
3357
|
key,
|
3291
3358
|
logValue,
|
3359
|
+
param,
|
3292
3360
|
registerEnvAction,
|
3293
3361
|
runtimeFn,
|
3294
3362
|
toCryptoRuntime,
|