@adviser/cement 0.3.15 → 0.3.16

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/metafile-esm.json CHANGED
@@ -1 +1 @@
1
- {"inputs":{"src/file-service.ts":{"bytes":612,"imports":[],"format":"esm"},"src/bin2text.ts":{"bytes":1312,"imports":[],"format":"esm"},"src/logger.ts":{"bytes":8819,"imports":[{"path":"src/bin2text.ts","kind":"import-statement","original":"./bin2text.js"},{"path":"./option.js","kind":"import-statement","external":true},{"path":"./result.js","kind":"import-statement","external":true},{"path":"./txt-en-decoder.js","kind":"import-statement","external":true},{"path":"./uri.js","kind":"import-statement","external":true}],"format":"esm"},"src/sys-abstraction.ts":{"bytes":1264,"imports":[{"path":"./file-service.js","kind":"import-statement","external":true},{"path":"./sys-env.js","kind":"import-statement","external":true},{"path":"./time.js","kind":"import-statement","external":true}],"format":"esm"},"src/time.ts":{"bytes":470,"imports":[],"format":"esm"},"src/base-sys-abstraction.ts":{"bytes":7966,"imports":[{"path":"./file-service.js","kind":"import-statement","external":true},{"path":"src/sys-abstraction.ts","kind":"import-statement","original":"./sys-abstraction.js"},{"path":"src/time.ts","kind":"import-statement","original":"./time.js"},{"path":"./txt-en-decoder.js","kind":"import-statement","external":true}],"format":"esm"},"src/future.ts":{"bytes":637,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/result.ts":{"bytes":3736,"imports":[],"format":"esm"},"src/resolve-once.ts":{"bytes":6450,"imports":[{"path":"src/future.ts","kind":"import-statement","original":"./future.js"},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"}],"format":"esm"},"src/runtime.ts":{"bytes":1395,"imports":[],"format":"esm"},"src/deno/deno-env-actions.ts":{"bytes":1378,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/node/node-env-actions.ts":{"bytes":1363,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/web/web-env-actions.ts":{"bytes":1113,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"../sys-env.js","kind":"import-statement","external":true}],"format":"esm"},"src/cf/cf-env-actions.ts":{"bytes":1529,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":372,"imports":[],"format":"esm"},"src/utils/get-params-result.ts":{"bytes":1635,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"../result.js"},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"}],"format":"esm"},"src/sys-env.ts":{"bytes":5910,"imports":[{"path":"src/deno/deno-env-actions.ts","kind":"import-statement","original":"./deno/deno-env-actions.js"},{"path":"src/node/node-env-actions.ts","kind":"import-statement","original":"./node/node-env-actions.js"},{"path":"src/web/web-env-actions.ts","kind":"import-statement","original":"./web/web-env-actions.js"},{"path":"src/cf/cf-env-actions.ts","kind":"import-statement","original":"./cf/cf-env-actions.js"},{"path":"src/resolve-once.ts","kind":"import-statement","original":"./resolve-once.js"},{"path":"./result.js","kind":"import-statement","external":true},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./utils/get-params-result.js"}],"format":"esm"},"src/utils/coerce-uint8.ts":{"bytes":1657,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"../result.js"}],"format":"esm"},"src/txt-en-decoder.ts":{"bytes":1447,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/utils/coerce-uint8.ts","kind":"import-statement","original":"./utils/coerce-uint8.js"}],"format":"esm"},"src/web/web-sys-abstraction.ts":{"bytes":3102,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/utils/relative-path.ts":{"bytes":4013,"imports":[],"format":"esm"},"src/utils/stripper.ts":{"bytes":2119,"imports":[],"format":"esm"},"src/uri.ts":{"bytes":16910,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./utils/get-params-result.js"},{"path":"src/utils/relative-path.ts","kind":"import-statement","original":"./utils/relative-path.js"},{"path":"src/utils/stripper.ts","kind":"import-statement","original":"./utils/stripper.js"}],"format":"esm"},"src/utils/console-write-stream.ts":{"bytes":2279,"imports":[],"format":"esm"},"src/log-writer-impl.ts":{"bytes":1835,"imports":[],"format":"esm"},"src/option.ts":{"bytes":1099,"imports":[],"format":"esm"},"src/log-level-impl.ts":{"bytes":2445,"imports":[{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/option.ts","kind":"import-statement","original":"./option.js"}],"format":"esm"},"src/logger-impl.ts":{"bytes":17841,"imports":[{"path":"yaml","kind":"import-statement","external":true},{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"./web/web-sys-abstraction.js"},{"path":"./sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/uri.ts","kind":"import-statement","original":"./uri.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"./runtime.js"},{"path":"src/utils/console-write-stream.ts","kind":"import-statement","original":"./utils/console-write-stream.js"},{"path":"src/log-writer-impl.ts","kind":"import-statement","original":"./log-writer-impl.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"},{"path":"src/log-level-impl.ts","kind":"import-statement","original":"./log-level-impl.js"}],"format":"esm"},"src/utils/fanout-write-stream.ts":{"bytes":1138,"imports":[],"format":"esm"},"src/test/log-write-stream.ts":{"bytes":3069,"imports":[{"path":"src/utils/fanout-write-stream.ts","kind":"import-statement","original":"../utils/fanout-write-stream.js"},{"path":"src/future.ts","kind":"import-statement","original":"../future.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/test/mock-logger.ts":{"bytes":1140,"imports":[{"path":"src/log-level-impl.ts","kind":"import-statement","original":"../log-level-impl.js"},{"path":"../logger.js","kind":"import-statement","external":true},{"path":"src/logger-impl.ts","kind":"import-statement","original":"../logger-impl.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/test/log-write-stream.ts","kind":"import-statement","original":"./log-write-stream.js"}],"format":"esm"},"src/test/index.ts":{"bytes":73,"imports":[{"path":"src/test/log-write-stream.ts","kind":"import-statement","original":"./log-write-stream.js"},{"path":"src/test/mock-logger.ts","kind":"import-statement","original":"./mock-logger.js"}],"format":"esm"},"src/tracer.ts":{"bytes":5703,"imports":[{"path":"./time.js","kind":"import-statement","external":true},{"path":"./logger.js","kind":"import-statement","external":true}],"format":"esm"},"src/crypto.ts":{"bytes":3895,"imports":[],"format":"esm"},"src/version.ts":{"bytes":82,"imports":[],"format":"esm"},"src/http_header.ts":{"bytes":4570,"imports":[],"format":"esm"},"src/path-ops.ts":{"bytes":806,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/json-en-decoder.ts":{"bytes":3766,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"}],"format":"esm"},"src/utils/stream-map.ts":{"bytes":1686,"imports":[],"format":"esm"},"src/utils/rebuffer.ts":{"bytes":2278,"imports":[{"path":"src/utils/stream-map.ts","kind":"import-statement","original":"./stream-map.js"}],"format":"esm"},"src/utils/stream2string.ts":{"bytes":1352,"imports":[],"format":"esm"},"src/utils/string2stream.ts":{"bytes":470,"imports":[{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/utils/sorted-object.ts":{"bytes":631,"imports":[],"format":"esm"},"src/utils/uint8array-equal.ts":{"bytes":237,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":402,"imports":[{"path":"src/utils/rebuffer.ts","kind":"import-statement","original":"./rebuffer.js"},{"path":"src/utils/stream-map.ts","kind":"import-statement","original":"./stream-map.js"},{"path":"src/utils/stream2string.ts","kind":"import-statement","original":"./stream2string.js"},{"path":"src/utils/string2stream.ts","kind":"import-statement","original":"./string2stream.js"},{"path":"src/utils/console-write-stream.ts","kind":"import-statement","original":"./console-write-stream.js"},{"path":"src/utils/fanout-write-stream.ts","kind":"import-statement","original":"./fanout-write-stream.js"},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./get-params-result.js"},{"path":"src/utils/stripper.ts","kind":"import-statement","original":"./stripper.js"},{"path":"src/utils/sorted-object.ts","kind":"import-statement","original":"./sorted-object.js"},{"path":"src/utils/uint8array-equal.ts","kind":"import-statement","original":"./uint8array-equal.js"},{"path":"src/utils/coerce-uint8.ts","kind":"import-statement","original":"./coerce-uint8.js"}],"format":"esm"},"src/index.ts":{"bytes":907,"imports":[{"path":"src/file-service.ts","kind":"import-statement","original":"./file-service.js"},{"path":"src/logger-impl.ts","kind":"import-statement","original":"./logger-impl.js"},{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/sys-abstraction.ts","kind":"import-statement","original":"./sys-abstraction.js"},{"path":"src/sys-env.ts","kind":"import-statement","original":"./sys-env.js"},{"path":"src/time.ts","kind":"import-statement","original":"./time.js"},{"path":"src/test/index.ts","kind":"import-statement","original":"./test/index.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"},{"path":"src/log-level-impl.ts","kind":"import-statement","original":"./log-level-impl.js"},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/option.ts","kind":"import-statement","original":"./option.js"},{"path":"src/future.ts","kind":"import-statement","original":"./future.js"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer.js"},{"path":"src/resolve-once.ts","kind":"import-statement","original":"./resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"./runtime.js"},{"path":"src/uri.ts","kind":"import-statement","original":"./uri.js"},{"path":"src/crypto.ts","kind":"import-statement","original":"./crypto.js"},{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"./base-sys-abstraction.js"},{"path":"src/bin2text.ts","kind":"import-statement","original":"./bin2text.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/http_header.ts","kind":"import-statement","original":"./http_header.js"},{"path":"src/path-ops.ts","kind":"import-statement","original":"./path-ops.js"},{"path":"src/json-en-decoder.ts","kind":"import-statement","original":"./json-en-decoder.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/utils/index.ts","kind":"import-statement","original":"./utils/index.js"}],"format":"esm"},"src/cf/cf-sys-abstraction.ts":{"bytes":1264,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"../web/web-sys-abstraction.js"}],"format":"esm"},"src/cf/index.ts":{"bytes":78,"imports":[{"path":"src/cf/cf-sys-abstraction.ts","kind":"import-statement","original":"./cf-sys-abstraction.js"},{"path":"src/cf/cf-env-actions.ts","kind":"import-statement","original":"./cf-env-actions.js"}],"format":"esm"},"src/deno/deno-file-service.ts":{"bytes":2559,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/deno/deno-sys-abstraction.ts":{"bytes":3696,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"src/deno/deno-file-service.ts","kind":"import-statement","original":"./deno-file-service.js"}],"format":"esm"},"src/deno/index.ts":{"bytes":83,"imports":[{"path":"src/deno/deno-sys-abstraction.ts","kind":"import-statement","original":"./deno-sys-abstraction.js"},{"path":"src/deno/deno-file-service.ts","kind":"import-statement","original":"./deno-file-service.js"}],"format":"esm"},"src/node/node-file-service.ts":{"bytes":2365,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/node/node-sys-abstraction.ts":{"bytes":3416,"imports":[{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"node:process","kind":"import-statement","external":true}],"format":"esm"},"src/node/mock-file-service.ts":{"bytes":1079,"imports":[{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"}],"format":"esm"},"src/node/index.ts":{"bytes":123,"imports":[{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"},{"path":"src/node/node-sys-abstraction.ts","kind":"import-statement","original":"./node-sys-abstraction.js"},{"path":"src/node/mock-file-service.ts","kind":"import-statement","original":"./mock-file-service.js"}],"format":"esm"},"src/web/index.ts":{"bytes":42,"imports":[{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"./web-sys-abstraction.js"}],"format":"esm"}},"outputs":{"dist/pkg/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":28918},"dist/pkg/index.js":{"imports":[{"path":"dist/pkg/chunk-WGRZHIFK.js","kind":"import-statement"},{"path":"dist/pkg/chunk-55W4AK2Z.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["BaseSysAbstraction","BuildURI","ConstTime","EnvImpl","Future","HeadersImpl","HttpHeader","IDMode","IdService","IsLogger","JSONEnDecoderSingleton","JSONFormatter","Keyed","KeyedResolvOnce","KeyedResolvSeq","Level","LevelHandlerImpl","LevelHandlerSingleton","LogCollector","LogValue","LogWriteStream","LoggerImpl","Metric","Metrics","MockLogger","MutableURL","None","Option","RandomMode","RandomService","ResolveOnce","ResolveSeq","Result","ResultError","ResultOK","Some","StepTime","String2TimeMode","SysTime","Time","TimeFactory","TimeMode","TimeUnits","TraceNode","TxtEnDecoderSingleton","URI","VERSION","WrapperSysAbstraction","YAMLFormatter","asyncLogValue","bin2string","bin2text","envFactory","exception2Result","hasHostPartProtocols","isCoerceURI","isURL","logValue","param","pathOps","registerEnvAction","runtimeFn","toCryptoRuntime","utils"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/tracer.ts":{"bytesInOutput":3983},"src/crypto.ts":{"bytesInOutput":766},"src/version.ts":{"bytesInOutput":64},"src/http_header.ts":{"bytesInOutput":3697},"src/path-ops.ts":{"bytesInOutput":864},"src/json-en-decoder.ts":{"bytesInOutput":1508}},"bytes":12988},"dist/pkg/cf/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1952},"dist/pkg/cf/index.js":{"imports":[{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["CFEnvActions","CFSysAbstraction","CFSystemService"],"entryPoint":"src/cf/index.ts","inputs":{"src/cf/cf-sys-abstraction.ts":{"bytesInOutput":752},"src/cf/index.ts":{"bytesInOutput":0}},"bytes":1088},"dist/pkg/deno/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9941},"dist/pkg/deno/index.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true}],"exports":["DenoExitServiceImpl","DenoFileService","DenoSysAbstraction","DenoSystemService"],"entryPoint":"src/deno/index.ts","inputs":{"src/deno/deno-file-service.ts":{"bytesInOutput":1700},"src/deno/deno-sys-abstraction.ts":{"bytesInOutput":2391},"src/deno/index.ts":{"bytesInOutput":0}},"bytes":4422},"dist/pkg/node/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":11356},"dist/pkg/node/index.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true}],"exports":["MockFileService","NodeExitServiceImpl","NodeFileService","NodeSysAbstraction","NodeSystemService"],"entryPoint":"src/node/index.ts","inputs":{"src/node/node-file-service.ts":{"bytesInOutput":1829},"src/node/index.ts":{"bytesInOutput":0},"src/node/node-sys-abstraction.ts":{"bytesInOutput":2292},"src/node/mock-file-service.ts":{"bytesInOutput":786}},"bytes":5291},"dist/pkg/test/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/test/index.js":{"imports":[{"path":"dist/pkg/chunk-WGRZHIFK.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["LogCollector","LogWriteStream","MockLogger"],"entryPoint":"src/test/index.ts","inputs":{},"bytes":270},"dist/pkg/chunk-WGRZHIFK.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93260},"dist/pkg/chunk-WGRZHIFK.js":{"imports":[{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"yaml","kind":"import-statement","external":true}],"exports":["BuildURI","IsLogger","JSONFormatter","Level","LevelHandlerImpl","LevelHandlerSingleton","LogCollector","LogValue","LogWriteStream","LoggerImpl","MockLogger","MutableURL","None","Option","Some","URI","YAMLFormatter","asyncLogValue","bin2string","bin2text","hasHostPartProtocols","isCoerceURI","isURL","logValue"],"inputs":{"src/test/log-write-stream.ts":{"bytesInOutput":2031},"src/test/index.ts":{"bytesInOutput":0},"src/bin2text.ts":{"bytesInOutput":1124},"src/logger.ts":{"bytesInOutput":3574},"src/option.ts":{"bytesInOutput":762},"src/log-level-impl.ts":{"bytesInOutput":2031},"src/logger-impl.ts":{"bytesInOutput":12392},"src/utils/relative-path.ts":{"bytesInOutput":3178},"src/uri.ts":{"bytesInOutput":11140},"src/log-writer-impl.ts":{"bytesInOutput":1114},"src/test/mock-logger.ts":{"bytesInOutput":725}},"bytes":39007},"dist/pkg/utils/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/utils/index.js":{"imports":[{"path":"dist/pkg/chunk-55W4AK2Z.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["ConsoleWriterStream","ConsoleWriterStreamDefaultWriter","FanoutWriteStream","UInt8ArrayEqual","array2stream","asyncCoerceIntoUint8","coerceIntoUint8","devnull","getParamsResult","rebuffer","rebufferArray","stream2array","stream2string","stream2uint8array","streamMap","string2stream","stripper","toSortedArray","toSortedObject","toSortedObjectArray","uint8array2stream"],"entryPoint":"src/utils/index.ts","inputs":{},"bytes":912},"dist/pkg/chunk-55W4AK2Z.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12092},"dist/pkg/chunk-55W4AK2Z.js":{"imports":[{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["UInt8ArrayEqual","array2stream","devnull","rebuffer","rebufferArray","stream2array","stream2string","stream2uint8array","streamMap","string2stream","toSortedArray","toSortedObject","toSortedObjectArray","uint8array2stream","utils_exports"],"inputs":{"src/utils/index.ts":{"bytesInOutput":921},"src/utils/stream-map.ts":{"bytesInOutput":1319},"src/utils/rebuffer.ts":{"bytesInOutput":1538},"src/utils/stream2string.ts":{"bytesInOutput":1148},"src/utils/string2stream.ts":{"bytesInOutput":269},"src/utils/sorted-object.ts":{"bytesInOutput":350},"src/utils/uint8array-equal.ts":{"bytesInOutput":197}},"bytes":6480},"dist/pkg/chunk-PHS255C5.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9135},"dist/pkg/chunk-PHS255C5.js":{"imports":[],"exports":["ConsoleWriterStream","ConsoleWriterStreamDefaultWriter","FanoutWriteStream","stripper"],"inputs":{"src/utils/stripper.ts":{"bytesInOutput":1563},"src/utils/console-write-stream.ts":{"bytesInOutput":1582},"src/utils/fanout-write-stream.ts":{"bytesInOutput":739}},"bytes":4088},"dist/pkg/web/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/web/index.js":{"imports":[{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["WebFileService","WebSysAbstraction"],"entryPoint":"src/web/index.ts","inputs":{"src/web/index.ts":{"bytesInOutput":0}},"bytes":190},"dist/pkg/chunk-Z3IR6QEZ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4603},"dist/pkg/chunk-Z3IR6QEZ.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["WebFileService","WebSysAbstraction"],"inputs":{"src/web/web-sys-abstraction.ts":{"bytesInOutput":2340}},"bytes":2588},"dist/pkg/chunk-H3CAVBMO.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":47035},"dist/pkg/chunk-H3CAVBMO.js":{"imports":[{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["BaseSysAbstraction","CFEnvActions","ConstTime","EnvImpl","Future","IDMode","IdService","Keyed","KeyedResolvOnce","KeyedResolvSeq","RandomMode","RandomService","ResolveOnce","ResolveSeq","StepTime","String2TimeMode","SysTime","Time","TimeFactory","TimeMode","TimeUnits","WrapperSysAbstraction","envFactory","registerEnvAction","runtimeFn"],"inputs":{"src/sys-abstraction.ts":{"bytesInOutput":475},"src/time.ts":{"bytesInOutput":269},"src/base-sys-abstraction.ts":{"bytesInOutput":4653},"src/future.ts":{"bytesInOutput":823},"src/resolve-once.ts":{"bytesInOutput":4817},"src/runtime.ts":{"bytesInOutput":1066},"src/cf/cf-env-actions.ts":{"bytesInOutput":1020},"src/deno/deno-env-actions.ts":{"bytesInOutput":800},"src/node/node-env-actions.ts":{"bytesInOutput":792},"src/web/web-env-actions.ts":{"bytesInOutput":672},"src/sys-env.ts":{"bytesInOutput":3624}},"bytes":19783},"dist/pkg/chunk-LXTKPZ6M.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":13798},"dist/pkg/chunk-LXTKPZ6M.js":{"imports":[],"exports":["Result","ResultError","ResultOK","TxtEnDecoderSingleton","__export","__privateAdd","__privateGet","__privateMethod","__privateSet","asyncCoerceIntoUint8","coerceIntoUint8","exception2Result","getParamsResult","param"],"inputs":{"src/result.ts":{"bytesInOutput":1621},"src/types.ts":{"bytesInOutput":228},"src/utils/get-params-result.ts":{"bytesInOutput":1108},"src/utils/coerce-uint8.ts":{"bytesInOutput":925},"src/txt-en-decoder.ts":{"bytesInOutput":876}},"bytes":6069}}}
1
+ {"inputs":{"src/file-service.ts":{"bytes":612,"imports":[],"format":"esm"},"src/bin2text.ts":{"bytes":1312,"imports":[],"format":"esm"},"src/logger.ts":{"bytes":8819,"imports":[{"path":"src/bin2text.ts","kind":"import-statement","original":"./bin2text.js"},{"path":"./option.js","kind":"import-statement","external":true},{"path":"./result.js","kind":"import-statement","external":true},{"path":"./txt-en-decoder.js","kind":"import-statement","external":true},{"path":"./uri.js","kind":"import-statement","external":true}],"format":"esm"},"src/sys-abstraction.ts":{"bytes":1264,"imports":[{"path":"./file-service.js","kind":"import-statement","external":true},{"path":"./sys-env.js","kind":"import-statement","external":true},{"path":"./time.js","kind":"import-statement","external":true}],"format":"esm"},"src/time.ts":{"bytes":470,"imports":[],"format":"esm"},"src/base-sys-abstraction.ts":{"bytes":7966,"imports":[{"path":"./file-service.js","kind":"import-statement","external":true},{"path":"src/sys-abstraction.ts","kind":"import-statement","original":"./sys-abstraction.js"},{"path":"src/time.ts","kind":"import-statement","original":"./time.js"},{"path":"./txt-en-decoder.js","kind":"import-statement","external":true}],"format":"esm"},"src/future.ts":{"bytes":637,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/result.ts":{"bytes":3736,"imports":[],"format":"esm"},"src/resolve-once.ts":{"bytes":6450,"imports":[{"path":"src/future.ts","kind":"import-statement","original":"./future.js"},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"}],"format":"esm"},"src/runtime.ts":{"bytes":1395,"imports":[],"format":"esm"},"src/deno/deno-env-actions.ts":{"bytes":1378,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/node/node-env-actions.ts":{"bytes":1363,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/web/web-env-actions.ts":{"bytes":1113,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"../sys-env.js","kind":"import-statement","external":true}],"format":"esm"},"src/cf/cf-env-actions.ts":{"bytes":1529,"imports":[{"path":"src/resolve-once.ts","kind":"import-statement","original":"../resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"../runtime.js"},{"path":"../sys-env.js","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":372,"imports":[],"format":"esm"},"src/utils/get-params-result.ts":{"bytes":1635,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"../result.js"},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"}],"format":"esm"},"src/sys-env.ts":{"bytes":5910,"imports":[{"path":"src/deno/deno-env-actions.ts","kind":"import-statement","original":"./deno/deno-env-actions.js"},{"path":"src/node/node-env-actions.ts","kind":"import-statement","original":"./node/node-env-actions.js"},{"path":"src/web/web-env-actions.ts","kind":"import-statement","original":"./web/web-env-actions.js"},{"path":"src/cf/cf-env-actions.ts","kind":"import-statement","original":"./cf/cf-env-actions.js"},{"path":"src/resolve-once.ts","kind":"import-statement","original":"./resolve-once.js"},{"path":"./result.js","kind":"import-statement","external":true},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./utils/get-params-result.js"}],"format":"esm"},"src/utils/coerce-uint8.ts":{"bytes":1657,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"../result.js"}],"format":"esm"},"src/txt-en-decoder.ts":{"bytes":1447,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/utils/coerce-uint8.ts","kind":"import-statement","original":"./utils/coerce-uint8.js"}],"format":"esm"},"src/web/web-sys-abstraction.ts":{"bytes":3102,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/utils/relative-path.ts":{"bytes":4013,"imports":[],"format":"esm"},"src/utils/stripper.ts":{"bytes":2119,"imports":[],"format":"esm"},"src/uri.ts":{"bytes":16910,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./utils/get-params-result.js"},{"path":"src/utils/relative-path.ts","kind":"import-statement","original":"./utils/relative-path.js"},{"path":"src/utils/stripper.ts","kind":"import-statement","original":"./utils/stripper.js"}],"format":"esm"},"src/utils/console-write-stream.ts":{"bytes":2279,"imports":[],"format":"esm"},"src/log-writer-impl.ts":{"bytes":1835,"imports":[],"format":"esm"},"src/option.ts":{"bytes":1099,"imports":[],"format":"esm"},"src/log-level-impl.ts":{"bytes":2445,"imports":[{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/option.ts","kind":"import-statement","original":"./option.js"}],"format":"esm"},"src/logger-impl.ts":{"bytes":17841,"imports":[{"path":"yaml","kind":"import-statement","external":true},{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"./web/web-sys-abstraction.js"},{"path":"./sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/uri.ts","kind":"import-statement","original":"./uri.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"./runtime.js"},{"path":"src/utils/console-write-stream.ts","kind":"import-statement","original":"./utils/console-write-stream.js"},{"path":"src/log-writer-impl.ts","kind":"import-statement","original":"./log-writer-impl.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"},{"path":"src/log-level-impl.ts","kind":"import-statement","original":"./log-level-impl.js"}],"format":"esm"},"src/utils/fanout-write-stream.ts":{"bytes":1138,"imports":[],"format":"esm"},"src/test/log-write-stream.ts":{"bytes":3069,"imports":[{"path":"src/utils/fanout-write-stream.ts","kind":"import-statement","original":"../utils/fanout-write-stream.js"},{"path":"src/future.ts","kind":"import-statement","original":"../future.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/test/mock-logger.ts":{"bytes":1140,"imports":[{"path":"src/log-level-impl.ts","kind":"import-statement","original":"../log-level-impl.js"},{"path":"../logger.js","kind":"import-statement","external":true},{"path":"src/logger-impl.ts","kind":"import-statement","original":"../logger-impl.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/test/log-write-stream.ts","kind":"import-statement","original":"./log-write-stream.js"}],"format":"esm"},"src/test/index.ts":{"bytes":73,"imports":[{"path":"src/test/log-write-stream.ts","kind":"import-statement","original":"./log-write-stream.js"},{"path":"src/test/mock-logger.ts","kind":"import-statement","original":"./mock-logger.js"}],"format":"esm"},"src/tracer.ts":{"bytes":5703,"imports":[{"path":"./time.js","kind":"import-statement","external":true},{"path":"./logger.js","kind":"import-statement","external":true}],"format":"esm"},"src/crypto.ts":{"bytes":3895,"imports":[],"format":"esm"},"src/version.ts":{"bytes":82,"imports":[],"format":"esm"},"src/http_header.ts":{"bytes":4570,"imports":[],"format":"esm"},"src/path-ops.ts":{"bytes":806,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/json-en-decoder.ts":{"bytes":3766,"imports":[{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"}],"format":"esm"},"src/lru-cache.ts":{"bytes":1726,"imports":[],"format":"esm"},"src/utils/stream-map.ts":{"bytes":1686,"imports":[],"format":"esm"},"src/utils/rebuffer.ts":{"bytes":2278,"imports":[{"path":"src/utils/stream-map.ts","kind":"import-statement","original":"./stream-map.js"}],"format":"esm"},"src/utils/stream2string.ts":{"bytes":1352,"imports":[],"format":"esm"},"src/utils/string2stream.ts":{"bytes":470,"imports":[{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/utils/sorted-object.ts":{"bytes":631,"imports":[],"format":"esm"},"src/utils/uint8array-equal.ts":{"bytes":237,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":402,"imports":[{"path":"src/utils/rebuffer.ts","kind":"import-statement","original":"./rebuffer.js"},{"path":"src/utils/stream-map.ts","kind":"import-statement","original":"./stream-map.js"},{"path":"src/utils/stream2string.ts","kind":"import-statement","original":"./stream2string.js"},{"path":"src/utils/string2stream.ts","kind":"import-statement","original":"./string2stream.js"},{"path":"src/utils/console-write-stream.ts","kind":"import-statement","original":"./console-write-stream.js"},{"path":"src/utils/fanout-write-stream.ts","kind":"import-statement","original":"./fanout-write-stream.js"},{"path":"src/utils/get-params-result.ts","kind":"import-statement","original":"./get-params-result.js"},{"path":"src/utils/stripper.ts","kind":"import-statement","original":"./stripper.js"},{"path":"src/utils/sorted-object.ts","kind":"import-statement","original":"./sorted-object.js"},{"path":"src/utils/uint8array-equal.ts","kind":"import-statement","original":"./uint8array-equal.js"},{"path":"src/utils/coerce-uint8.ts","kind":"import-statement","original":"./coerce-uint8.js"}],"format":"esm"},"src/index.ts":{"bytes":939,"imports":[{"path":"src/file-service.ts","kind":"import-statement","original":"./file-service.js"},{"path":"src/logger-impl.ts","kind":"import-statement","original":"./logger-impl.js"},{"path":"src/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/sys-abstraction.ts","kind":"import-statement","original":"./sys-abstraction.js"},{"path":"src/sys-env.ts","kind":"import-statement","original":"./sys-env.js"},{"path":"src/time.ts","kind":"import-statement","original":"./time.js"},{"path":"src/test/index.ts","kind":"import-statement","original":"./test/index.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"./txt-en-decoder.js"},{"path":"src/log-level-impl.ts","kind":"import-statement","original":"./log-level-impl.js"},{"path":"src/result.ts","kind":"import-statement","original":"./result.js"},{"path":"src/option.ts","kind":"import-statement","original":"./option.js"},{"path":"src/future.ts","kind":"import-statement","original":"./future.js"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer.js"},{"path":"src/resolve-once.ts","kind":"import-statement","original":"./resolve-once.js"},{"path":"src/runtime.ts","kind":"import-statement","original":"./runtime.js"},{"path":"src/uri.ts","kind":"import-statement","original":"./uri.js"},{"path":"src/crypto.ts","kind":"import-statement","original":"./crypto.js"},{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"./base-sys-abstraction.js"},{"path":"src/bin2text.ts","kind":"import-statement","original":"./bin2text.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/http_header.ts","kind":"import-statement","original":"./http_header.js"},{"path":"src/path-ops.ts","kind":"import-statement","original":"./path-ops.js"},{"path":"src/json-en-decoder.ts","kind":"import-statement","original":"./json-en-decoder.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/lru-cache.ts","kind":"import-statement","original":"./lru-cache.js"},{"path":"src/utils/index.ts","kind":"import-statement","original":"./utils/index.js"}],"format":"esm"},"src/cf/cf-sys-abstraction.ts":{"bytes":1264,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"../web/web-sys-abstraction.js"}],"format":"esm"},"src/cf/index.ts":{"bytes":78,"imports":[{"path":"src/cf/cf-sys-abstraction.ts","kind":"import-statement","original":"./cf-sys-abstraction.js"},{"path":"src/cf/cf-env-actions.ts","kind":"import-statement","original":"./cf-env-actions.js"}],"format":"esm"},"src/deno/deno-file-service.ts":{"bytes":2559,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/deno/deno-sys-abstraction.ts":{"bytes":3696,"imports":[{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"src/deno/deno-file-service.ts","kind":"import-statement","original":"./deno-file-service.js"}],"format":"esm"},"src/deno/index.ts":{"bytes":83,"imports":[{"path":"src/deno/deno-sys-abstraction.ts","kind":"import-statement","original":"./deno-sys-abstraction.js"},{"path":"src/deno/deno-file-service.ts","kind":"import-statement","original":"./deno-file-service.js"}],"format":"esm"},"src/node/node-file-service.ts":{"bytes":2365,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"}],"format":"esm"},"src/node/node-sys-abstraction.ts":{"bytes":3416,"imports":[{"path":"../sys-abstraction.js","kind":"import-statement","external":true},{"path":"src/base-sys-abstraction.ts","kind":"import-statement","original":"../base-sys-abstraction.js"},{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"},{"path":"src/sys-env.ts","kind":"import-statement","original":"../sys-env.js"},{"path":"src/txt-en-decoder.ts","kind":"import-statement","original":"../txt-en-decoder.js"},{"path":"node:process","kind":"import-statement","external":true}],"format":"esm"},"src/node/mock-file-service.ts":{"bytes":1079,"imports":[{"path":"../file-service.js","kind":"import-statement","external":true},{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"}],"format":"esm"},"src/node/index.ts":{"bytes":123,"imports":[{"path":"src/node/node-file-service.ts","kind":"import-statement","original":"./node-file-service.js"},{"path":"src/node/node-sys-abstraction.ts","kind":"import-statement","original":"./node-sys-abstraction.js"},{"path":"src/node/mock-file-service.ts","kind":"import-statement","original":"./mock-file-service.js"}],"format":"esm"},"src/web/index.ts":{"bytes":42,"imports":[{"path":"src/web/web-sys-abstraction.ts","kind":"import-statement","original":"./web-sys-abstraction.js"}],"format":"esm"}},"outputs":{"dist/pkg/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":31717},"dist/pkg/index.js":{"imports":[{"path":"dist/pkg/chunk-WGRZHIFK.js","kind":"import-statement"},{"path":"dist/pkg/chunk-55W4AK2Z.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["BaseSysAbstraction","BuildURI","ConstTime","EnvImpl","Future","HeadersImpl","HttpHeader","IDMode","IdService","IsLogger","JSONEnDecoderSingleton","JSONFormatter","Keyed","KeyedResolvOnce","KeyedResolvSeq","LRUCache","Level","LevelHandlerImpl","LevelHandlerSingleton","LogCollector","LogValue","LogWriteStream","LoggerImpl","Metric","Metrics","MockLogger","MutableURL","None","Option","RandomMode","RandomService","ResolveOnce","ResolveSeq","Result","ResultError","ResultOK","Some","StepTime","String2TimeMode","SysTime","Time","TimeFactory","TimeMode","TimeUnits","TraceNode","TxtEnDecoderSingleton","URI","VERSION","WrapperSysAbstraction","YAMLFormatter","asyncLogValue","bin2string","bin2text","envFactory","exception2Result","hasHostPartProtocols","isCoerceURI","isURL","logValue","param","pathOps","registerEnvAction","runtimeFn","toCryptoRuntime","utils"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/tracer.ts":{"bytesInOutput":3983},"src/crypto.ts":{"bytesInOutput":766},"src/version.ts":{"bytesInOutput":64},"src/http_header.ts":{"bytesInOutput":3697},"src/path-ops.ts":{"bytesInOutput":864},"src/json-en-decoder.ts":{"bytesInOutput":1508},"src/lru-cache.ts":{"bytesInOutput":1122}},"bytes":14143},"dist/pkg/cf/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":1952},"dist/pkg/cf/index.js":{"imports":[{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["CFEnvActions","CFSysAbstraction","CFSystemService"],"entryPoint":"src/cf/index.ts","inputs":{"src/cf/cf-sys-abstraction.ts":{"bytesInOutput":752},"src/cf/index.ts":{"bytesInOutput":0}},"bytes":1088},"dist/pkg/deno/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9941},"dist/pkg/deno/index.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true}],"exports":["DenoExitServiceImpl","DenoFileService","DenoSysAbstraction","DenoSystemService"],"entryPoint":"src/deno/index.ts","inputs":{"src/deno/deno-file-service.ts":{"bytesInOutput":1700},"src/deno/deno-sys-abstraction.ts":{"bytesInOutput":2391},"src/deno/index.ts":{"bytesInOutput":0}},"bytes":4422},"dist/pkg/node/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":11356},"dist/pkg/node/index.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true},{"path":"node:process","kind":"import-statement","external":true}],"exports":["MockFileService","NodeExitServiceImpl","NodeFileService","NodeSysAbstraction","NodeSystemService"],"entryPoint":"src/node/index.ts","inputs":{"src/node/node-file-service.ts":{"bytesInOutput":1829},"src/node/index.ts":{"bytesInOutput":0},"src/node/node-sys-abstraction.ts":{"bytesInOutput":2292},"src/node/mock-file-service.ts":{"bytesInOutput":786}},"bytes":5291},"dist/pkg/test/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/test/index.js":{"imports":[{"path":"dist/pkg/chunk-WGRZHIFK.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["LogCollector","LogWriteStream","MockLogger"],"entryPoint":"src/test/index.ts","inputs":{},"bytes":270},"dist/pkg/chunk-WGRZHIFK.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93260},"dist/pkg/chunk-WGRZHIFK.js":{"imports":[{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"},{"path":"yaml","kind":"import-statement","external":true}],"exports":["BuildURI","IsLogger","JSONFormatter","Level","LevelHandlerImpl","LevelHandlerSingleton","LogCollector","LogValue","LogWriteStream","LoggerImpl","MockLogger","MutableURL","None","Option","Some","URI","YAMLFormatter","asyncLogValue","bin2string","bin2text","hasHostPartProtocols","isCoerceURI","isURL","logValue"],"inputs":{"src/test/log-write-stream.ts":{"bytesInOutput":2031},"src/test/index.ts":{"bytesInOutput":0},"src/bin2text.ts":{"bytesInOutput":1124},"src/logger.ts":{"bytesInOutput":3574},"src/option.ts":{"bytesInOutput":762},"src/log-level-impl.ts":{"bytesInOutput":2031},"src/logger-impl.ts":{"bytesInOutput":12392},"src/utils/relative-path.ts":{"bytesInOutput":3178},"src/uri.ts":{"bytesInOutput":11140},"src/log-writer-impl.ts":{"bytesInOutput":1114},"src/test/mock-logger.ts":{"bytesInOutput":725}},"bytes":39007},"dist/pkg/utils/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/utils/index.js":{"imports":[{"path":"dist/pkg/chunk-55W4AK2Z.js","kind":"import-statement"},{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["ConsoleWriterStream","ConsoleWriterStreamDefaultWriter","FanoutWriteStream","UInt8ArrayEqual","array2stream","asyncCoerceIntoUint8","coerceIntoUint8","devnull","getParamsResult","rebuffer","rebufferArray","stream2array","stream2string","stream2uint8array","streamMap","string2stream","stripper","toSortedArray","toSortedObject","toSortedObjectArray","uint8array2stream"],"entryPoint":"src/utils/index.ts","inputs":{},"bytes":912},"dist/pkg/chunk-55W4AK2Z.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12092},"dist/pkg/chunk-55W4AK2Z.js":{"imports":[{"path":"dist/pkg/chunk-PHS255C5.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["UInt8ArrayEqual","array2stream","devnull","rebuffer","rebufferArray","stream2array","stream2string","stream2uint8array","streamMap","string2stream","toSortedArray","toSortedObject","toSortedObjectArray","uint8array2stream","utils_exports"],"inputs":{"src/utils/index.ts":{"bytesInOutput":921},"src/utils/stream-map.ts":{"bytesInOutput":1319},"src/utils/rebuffer.ts":{"bytesInOutput":1538},"src/utils/stream2string.ts":{"bytesInOutput":1148},"src/utils/string2stream.ts":{"bytesInOutput":269},"src/utils/sorted-object.ts":{"bytesInOutput":350},"src/utils/uint8array-equal.ts":{"bytesInOutput":197}},"bytes":6480},"dist/pkg/chunk-PHS255C5.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9135},"dist/pkg/chunk-PHS255C5.js":{"imports":[],"exports":["ConsoleWriterStream","ConsoleWriterStreamDefaultWriter","FanoutWriteStream","stripper"],"inputs":{"src/utils/stripper.ts":{"bytesInOutput":1563},"src/utils/console-write-stream.ts":{"bytesInOutput":1582},"src/utils/fanout-write-stream.ts":{"bytesInOutput":739}},"bytes":4088},"dist/pkg/web/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/pkg/web/index.js":{"imports":[{"path":"dist/pkg/chunk-Z3IR6QEZ.js","kind":"import-statement"},{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["WebFileService","WebSysAbstraction"],"entryPoint":"src/web/index.ts","inputs":{"src/web/index.ts":{"bytesInOutput":0}},"bytes":190},"dist/pkg/chunk-Z3IR6QEZ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4603},"dist/pkg/chunk-Z3IR6QEZ.js":{"imports":[{"path":"dist/pkg/chunk-H3CAVBMO.js","kind":"import-statement"},{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["WebFileService","WebSysAbstraction"],"inputs":{"src/web/web-sys-abstraction.ts":{"bytesInOutput":2340}},"bytes":2588},"dist/pkg/chunk-H3CAVBMO.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":47035},"dist/pkg/chunk-H3CAVBMO.js":{"imports":[{"path":"dist/pkg/chunk-LXTKPZ6M.js","kind":"import-statement"}],"exports":["BaseSysAbstraction","CFEnvActions","ConstTime","EnvImpl","Future","IDMode","IdService","Keyed","KeyedResolvOnce","KeyedResolvSeq","RandomMode","RandomService","ResolveOnce","ResolveSeq","StepTime","String2TimeMode","SysTime","Time","TimeFactory","TimeMode","TimeUnits","WrapperSysAbstraction","envFactory","registerEnvAction","runtimeFn"],"inputs":{"src/sys-abstraction.ts":{"bytesInOutput":475},"src/time.ts":{"bytesInOutput":269},"src/base-sys-abstraction.ts":{"bytesInOutput":4653},"src/future.ts":{"bytesInOutput":823},"src/resolve-once.ts":{"bytesInOutput":4817},"src/runtime.ts":{"bytesInOutput":1066},"src/cf/cf-env-actions.ts":{"bytesInOutput":1020},"src/deno/deno-env-actions.ts":{"bytesInOutput":800},"src/node/node-env-actions.ts":{"bytesInOutput":792},"src/web/web-env-actions.ts":{"bytesInOutput":672},"src/sys-env.ts":{"bytesInOutput":3624}},"bytes":19783},"dist/pkg/chunk-LXTKPZ6M.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":13798},"dist/pkg/chunk-LXTKPZ6M.js":{"imports":[],"exports":["Result","ResultError","ResultOK","TxtEnDecoderSingleton","__export","__privateAdd","__privateGet","__privateMethod","__privateSet","asyncCoerceIntoUint8","coerceIntoUint8","exception2Result","getParamsResult","param"],"inputs":{"src/result.ts":{"bytesInOutput":1621},"src/types.ts":{"bytesInOutput":228},"src/utils/get-params-result.ts":{"bytesInOutput":1108},"src/utils/coerce-uint8.ts":{"bytesInOutput":925},"src/txt-en-decoder.ts":{"bytesInOutput":876}},"bytes":6069}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adviser/cement",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "better try/catch/finally handling",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -22,6 +22,7 @@ export * from "./http_header.js";
22
22
  export * from "./path-ops.js";
23
23
  export * from "./json-en-decoder.js";
24
24
  export * from "./types.js";
25
+ export * from "./lru-cache.js";
25
26
 
26
27
  // ugly
27
28
  export * as utils from "./utils/index.js";
package/src/jsr.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adviser/cement",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./web": "./web/index.ts",
@@ -0,0 +1,68 @@
1
+ export interface LRUCacheParam {
2
+ readonly maxEntries: number;
3
+ readonly maxAge: number;
4
+ }
5
+ export class LRUCache<T, K> {
6
+ private cache: Map<T, K> = new Map<T, K>();
7
+ private param: LRUCacheParam;
8
+
9
+ constructor(c: Partial<LRUCacheParam> = {}) {
10
+ this.param = {
11
+ maxEntries: c.maxEntries || 100,
12
+ maxAge: c.maxAge || 0,
13
+ };
14
+ }
15
+
16
+ private touch(key: T): K {
17
+ // there could be undefined or null in value
18
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19
+ const value = this.cache.get(key)!;
20
+ this.cache.delete(key);
21
+ this.cache.set(key, value);
22
+ return value;
23
+ }
24
+
25
+ get size(): number {
26
+ return this.cache.size;
27
+ }
28
+
29
+ async getPut(key: T, createFN: (key: T) => Promise<K>): Promise<K | undefined> {
30
+ const val = this.get(key);
31
+ if (val) {
32
+ return val;
33
+ } else {
34
+ const val = await createFN(key);
35
+ this.put(key, val as K);
36
+ return val;
37
+ }
38
+ }
39
+
40
+ get(key: T): K | undefined {
41
+ if (this.cache.has(key)) {
42
+ return this.touch(key);
43
+ }
44
+ return this.cache.get(key);
45
+ }
46
+
47
+ put(key: T, value: K): void {
48
+ this.cache.delete(key);
49
+ if (this.cache.size >= this.param.maxEntries) {
50
+ // delete the least recently accessed
51
+ // const key = Array.from(this.cache.keys())[0];
52
+ // this.cache.delete(key) or
53
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
54
+ this.cache.delete(this.cache.keys().next().value!);
55
+ this.cache.set(key, value);
56
+ } else {
57
+ this.cache.set(key, value);
58
+ }
59
+ }
60
+
61
+ // getLeastRecent(): K {
62
+ // return Array.from(this.cache)[0];
63
+ // }
64
+
65
+ // getMostRecent(): K {
66
+ // return Array.from(this.cache)[this.cache.size - 1];
67
+ // }
68
+ }
package/ts/src/index.d.ts CHANGED
@@ -22,5 +22,6 @@ export * from "./http_header.js";
22
22
  export * from "./path-ops.js";
23
23
  export * from "./json-en-decoder.js";
24
24
  export * from "./types.js";
25
+ export * from "./lru-cache.js";
25
26
  export * as utils from "./utils/index.js";
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
package/ts/src/index.js CHANGED
@@ -22,5 +22,6 @@ export * from "./http_header.js";
22
22
  export * from "./path-ops.js";
23
23
  export * from "./json-en-decoder.js";
24
24
  export * from "./types.js";
25
+ export * from "./lru-cache.js";
25
26
  export * as utils from "./utils/index.js";
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface LRUCacheParam {
2
+ readonly maxEntries: number;
3
+ readonly maxAge: number;
4
+ }
5
+ export declare class LRUCache<T, K> {
6
+ private cache;
7
+ private param;
8
+ constructor(c?: Partial<LRUCacheParam>);
9
+ private touch;
10
+ get size(): number;
11
+ getPut(key: T, createFN: (key: T) => Promise<K>): Promise<K | undefined>;
12
+ get(key: T): K | undefined;
13
+ put(key: T, value: K): void;
14
+ }
15
+ //# sourceMappingURL=lru-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lru-cache.d.ts","sourceRoot":"","sources":["../../../src/lru-cache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IACxB,OAAO,CAAC,KAAK,CAA8B;IAC3C,OAAO,CAAC,KAAK,CAAgB;gBAEjB,CAAC,GAAE,OAAO,CAAC,aAAa,CAAM;IAO1C,OAAO,CAAC,KAAK;IASb,IAAI,IAAI,IAAI,MAAM,CAEjB;IAEK,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAW9E,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAO1B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;CAqB5B"}
@@ -0,0 +1,46 @@
1
+ export class LRUCache {
2
+ constructor(c = {}) {
3
+ this.cache = new Map();
4
+ this.param = {
5
+ maxEntries: c.maxEntries || 100,
6
+ maxAge: c.maxAge || 0,
7
+ };
8
+ }
9
+ touch(key) {
10
+ const value = this.cache.get(key);
11
+ this.cache.delete(key);
12
+ this.cache.set(key, value);
13
+ return value;
14
+ }
15
+ get size() {
16
+ return this.cache.size;
17
+ }
18
+ async getPut(key, createFN) {
19
+ const val = this.get(key);
20
+ if (val) {
21
+ return val;
22
+ }
23
+ else {
24
+ const val = await createFN(key);
25
+ this.put(key, val);
26
+ return val;
27
+ }
28
+ }
29
+ get(key) {
30
+ if (this.cache.has(key)) {
31
+ return this.touch(key);
32
+ }
33
+ return this.cache.get(key);
34
+ }
35
+ put(key, value) {
36
+ this.cache.delete(key);
37
+ if (this.cache.size >= this.param.maxEntries) {
38
+ this.cache.delete(this.cache.keys().next().value);
39
+ this.cache.set(key, value);
40
+ }
41
+ else {
42
+ this.cache.set(key, value);
43
+ }
44
+ }
45
+ }
46
+ //# sourceMappingURL=lru-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lru-cache.js","sourceRoot":"","sources":["../../../src/lru-cache.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,QAAQ;IAInB,YAAY,IAA4B,EAAE;QAHlC,UAAK,GAAc,IAAI,GAAG,EAAQ,CAAC;QAIzC,IAAI,CAAC,KAAK,GAAG;YACX,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,GAAG;YAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC;SACtB,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,GAAM;QAGlB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAM,EAAE,QAAgC;QACnD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,GAAG,CAAC;QACb,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAQ,CAAC,CAAC;YACxB,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IAED,GAAG,CAAC,GAAM;QACR,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,GAAM,EAAE,KAAQ;QAClB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;YAK7C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAM,CAAC,CAAC;YACnD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;CASF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lru-cache.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lru-cache.test.d.ts","sourceRoot":"","sources":["../../../src/lru-cache.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ import { LRUCache } from "@adviser/cement";
2
+ it("get-put without createFN", () => {
3
+ const cache = new LRUCache({
4
+ maxEntries: 1,
5
+ });
6
+ expect(cache.size).toBe(0);
7
+ cache.put("a", 1);
8
+ expect(cache.size).toBe(1);
9
+ cache.put("a", 1);
10
+ expect(cache.size).toBe(1);
11
+ cache.put("b", 2);
12
+ expect(cache.size).toBe(1);
13
+ cache.put("b", 2);
14
+ expect(cache.size).toBe(1);
15
+ });
16
+ it("get-put evict in order", () => {
17
+ const cache = new LRUCache({
18
+ maxEntries: 2,
19
+ });
20
+ expect(cache.size).toBe(0);
21
+ cache.put("a", 1);
22
+ cache.put("b", 2);
23
+ expect(cache.size).toBe(2);
24
+ cache.put("c", 3);
25
+ expect(cache.size).toBe(2);
26
+ expect(cache.get("a")).toBe(undefined);
27
+ expect(cache.get("b")).toBe(2);
28
+ expect(cache.get("c")).toBe(3);
29
+ expect(cache.get("b")).toBe(2);
30
+ cache.put("d", 4);
31
+ expect(cache.get("a")).toBe(undefined);
32
+ expect(cache.get("b")).toBe(2);
33
+ expect(cache.get("c")).toBe(undefined);
34
+ expect(cache.get("d")).toBe(4);
35
+ });
36
+ it("get-put with createFN", async () => {
37
+ const cache = new LRUCache({
38
+ maxEntries: 2,
39
+ });
40
+ expect(cache.size).toBe(0);
41
+ expect(await cache.getPut("a", () => Promise.resolve(1))).toBe(1);
42
+ expect(await cache.getPut("b", () => Promise.resolve(2))).toBe(2);
43
+ expect(await cache.getPut("c", () => Promise.resolve(3))).toBe(3);
44
+ expect(await cache.getPut("d", () => Promise.resolve(4))).toBe(4);
45
+ expect(cache.size).toBe(2);
46
+ expect(await cache.getPut("c", () => Promise.resolve(5))).toBe(3);
47
+ expect(cache.size).toBe(2);
48
+ expect(await cache.getPut("e", () => Promise.resolve(5))).toBe(5);
49
+ expect(await cache.getPut("f", () => Promise.resolve(6))).toBe(6);
50
+ expect(cache.size).toBe(2);
51
+ expect(await cache.getPut("c", () => Promise.resolve(7))).toBe(7);
52
+ expect(cache.size).toBe(2);
53
+ });
54
+ //# sourceMappingURL=lru-cache.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lru-cache.test.js","sourceRoot":"","sources":["../../../src/lru-cache.test.ts"],"names":[],"mappings":"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"}