@adviser/cement 0.3.3 → 0.3.5

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.
Files changed (546) hide show
  1. package/{base-sys-abstraction-CR_Z-Ceg.d.ts → base-sys-abstraction-CKI4xiRR.d.ts} +4 -4
  2. package/{base-sys-abstraction-DWtPI7Kg.d.cts → base-sys-abstraction-DLnSeH4s.d.cts} +4 -4
  3. package/cf/index.cjs +298 -284
  4. package/cf/index.cjs.map +1 -1
  5. package/cf/index.d.cts +4 -18
  6. package/cf/index.d.ts +4 -18
  7. package/cf/index.js +39 -6
  8. package/cf/index.js.map +1 -1
  9. package/{chunk-P6LDM7PY.js → chunk-4QRZPFED.js} +112 -506
  10. package/chunk-4QRZPFED.js.map +1 -0
  11. package/{chunk-HFP74WLI.js → chunk-4U6TAOIU.js} +5 -4
  12. package/chunk-4U6TAOIU.js.map +1 -0
  13. package/{chunk-PRCFKZR7.js → chunk-6AG3MRNY.js} +22 -170
  14. package/chunk-6AG3MRNY.js.map +1 -0
  15. package/{chunk-A7OPSHUV.js → chunk-LRJXXDF5.js} +11 -4
  16. package/chunk-LRJXXDF5.js.map +1 -0
  17. package/chunk-OIIUVSUX.js +88 -0
  18. package/chunk-OIIUVSUX.js.map +1 -0
  19. package/chunk-QDDO6NOK.js +194 -0
  20. package/chunk-QDDO6NOK.js.map +1 -0
  21. package/deno/index.cjs +274 -166
  22. package/deno/index.cjs.map +1 -1
  23. package/deno/index.d.cts +4 -24
  24. package/deno/index.d.ts +4 -24
  25. package/deno/index.js +174 -8
  26. package/deno/index.js.map +1 -1
  27. package/get-params-result-Bhy5997x.d.cts +61 -0
  28. package/get-params-result-Bhy5997x.d.ts +61 -0
  29. package/{index-CfSl8Gmj.d.ts → index-1R-hTV11.d.ts} +5 -50
  30. package/{index-BfZxTAe_.d.cts → index-98HXQB3i.d.cts} +5 -50
  31. package/{index-Q3phXzYr.d.cts → index-BMCdndbY.d.cts} +28 -23
  32. package/{index-tIGZMHTc.d.ts → index-IrV5jK1W.d.ts} +28 -23
  33. package/index.cjs +327 -430
  34. package/index.cjs.map +1 -1
  35. package/index.d.cts +13 -11
  36. package/index.d.ts +13 -11
  37. package/index.js +18 -12
  38. package/index.js.map +1 -1
  39. package/node/index.cjs +247 -139
  40. package/node/index.cjs.map +1 -1
  41. package/node/index.d.cts +4 -17
  42. package/node/index.d.ts +4 -17
  43. package/node/index.js +183 -12
  44. package/node/index.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/base-sys-abstraction.ts +8 -6
  47. package/src/cf/cf-env-actions.ts +53 -0
  48. package/src/cf/cf-sys-abstraction.ts +1 -53
  49. package/src/cf-test-main.ts +5 -0
  50. package/src/deno/deno-env-actions.ts +57 -0
  51. package/src/deno/deno-file-service.ts +1 -1
  52. package/src/deno/deno-sys-abstraction.ts +1 -57
  53. package/src/http_header.ts +1 -1
  54. package/src/index.ts +3 -0
  55. package/src/jsr.json +1 -1
  56. package/src/log-writer-impl.ts +10 -5
  57. package/src/logger-impl.ts +9 -8
  58. package/src/logger.ts +4 -5
  59. package/src/node/mock-file-service.ts +4 -4
  60. package/src/node/node-env-actions.ts +45 -0
  61. package/src/node/node-sys-abstraction.ts +1 -45
  62. package/src/resolve-once.ts +6 -5
  63. package/src/runtime.ts +3 -3
  64. package/src/sys-env.ts +64 -4
  65. package/src/test/log-write-stream.ts +2 -1
  66. package/src/tracer.ts +4 -6
  67. package/src/uri.ts +4 -69
  68. package/src/utils/console-write-stream.ts +4 -3
  69. package/src/utils/fanout-write-stream.ts +1 -1
  70. package/src/utils/get-params-result.ts +71 -0
  71. package/src/utils/index.ts +1 -0
  72. package/src/utils/rebuffer.ts +27 -21
  73. package/src/utils/relative-path.ts +1 -1
  74. package/src/utils/stream2string.ts +2 -2
  75. package/src/utils/stripper.ts +2 -2
  76. package/src/version.ts +2 -2
  77. package/src/web/web-env-actions.ts +41 -0
  78. package/src/web/web-sys-abstraction.ts +2 -42
  79. package/{sys-abstraction-GNnBj2sz.d.cts → sys-abstraction-BRDT_TIU.d.cts} +8 -1
  80. package/{sys-abstraction-GNnBj2sz.d.ts → sys-abstraction-Bd0EzwO6.d.ts} +8 -1
  81. package/test/index.cjs +460 -578
  82. package/test/index.cjs.map +1 -1
  83. package/test/index.d.cts +3 -3
  84. package/test/index.d.ts +3 -3
  85. package/test/index.js +5 -4
  86. package/ts/smoke/smoke.d.ts +2 -0
  87. package/ts/smoke/smoke.d.ts.map +1 -0
  88. package/ts/smoke/smoke.js +33 -0
  89. package/ts/smoke/smoke.js.map +1 -0
  90. package/ts/{base-sys-abstraction.d.ts → src/base-sys-abstraction.d.ts} +2 -2
  91. package/ts/src/base-sys-abstraction.d.ts.map +1 -0
  92. package/ts/{base-sys-abstraction.js → src/base-sys-abstraction.js} +4 -2
  93. package/ts/src/base-sys-abstraction.js.map +1 -0
  94. package/ts/src/base-sys-abstraction.test.d.ts.map +1 -0
  95. package/ts/src/base-sys-abstraction.test.js.map +1 -0
  96. package/ts/src/bin2text.d.ts.map +1 -0
  97. package/ts/src/bin2text.js.map +1 -0
  98. package/ts/{bin2text.test.d.ts.map → src/bin2text.test.d.ts.map} +1 -1
  99. package/ts/src/bin2text.test.js.map +1 -0
  100. package/ts/src/cf/cf-env-actions.d.ts +16 -0
  101. package/ts/src/cf/cf-env-actions.d.ts.map +1 -0
  102. package/ts/{cf/cf-sys-abstraction.js → src/cf/cf-env-actions.js} +1 -30
  103. package/ts/src/cf/cf-env-actions.js.map +1 -0
  104. package/ts/src/cf/cf-sys-abstraction.d.ts +11 -0
  105. package/ts/src/cf/cf-sys-abstraction.d.ts.map +1 -0
  106. package/ts/src/cf/cf-sys-abstraction.js +30 -0
  107. package/ts/src/cf/cf-sys-abstraction.js.map +1 -0
  108. package/ts/src/cf/index.d.ts.map +1 -0
  109. package/ts/src/cf/index.js.map +1 -0
  110. package/ts/src/cf-test-main.d.ts +5 -0
  111. package/ts/src/cf-test-main.d.ts.map +1 -0
  112. package/ts/src/cf-test-main.js +6 -0
  113. package/ts/src/cf-test-main.js.map +1 -0
  114. package/ts/src/crypto.d.ts.map +1 -0
  115. package/ts/src/crypto.js.map +1 -0
  116. package/ts/{crypto.test.d.ts.map → src/crypto.test.d.ts.map} +1 -1
  117. package/ts/{crypto.test.js → src/crypto.test.js} +8 -1
  118. package/ts/src/crypto.test.js.map +1 -0
  119. package/ts/src/deno/deno-env-actions.d.ts +23 -0
  120. package/ts/src/deno/deno-env-actions.d.ts.map +1 -0
  121. package/ts/src/deno/deno-env-actions.js +46 -0
  122. package/ts/src/deno/deno-env-actions.js.map +1 -0
  123. package/ts/src/deno/deno-file-service.d.ts.map +1 -0
  124. package/ts/src/deno/deno-file-service.js.map +1 -0
  125. package/ts/{deno → src/deno}/deno-sys-abstraction.d.ts +1 -22
  126. package/ts/src/deno/deno-sys-abstraction.d.ts.map +1 -0
  127. package/ts/{deno → src/deno}/deno-sys-abstraction.js +0 -45
  128. package/ts/src/deno/deno-sys-abstraction.js.map +1 -0
  129. package/ts/src/deno/index.d.ts.map +1 -0
  130. package/ts/src/deno/index.js.map +1 -0
  131. package/ts/src/file-service.d.ts.map +1 -0
  132. package/ts/{file-service.js.map → src/file-service.js.map} +1 -1
  133. package/ts/src/future.d.ts.map +1 -0
  134. package/ts/src/future.js.map +1 -0
  135. package/ts/{future.test.d.ts.map → src/future.test.d.ts.map} +1 -1
  136. package/ts/src/future.test.js.map +1 -0
  137. package/ts/src/http_header.d.ts.map +1 -0
  138. package/ts/src/http_header.js.map +1 -0
  139. package/ts/src/http_header.test.d.ts.map +1 -0
  140. package/ts/src/http_header.test.js.map +1 -0
  141. package/ts/{index.d.ts → src/index.d.ts} +2 -0
  142. package/ts/src/index.d.ts.map +1 -0
  143. package/ts/{index.js → src/index.js} +2 -0
  144. package/ts/src/index.js.map +1 -0
  145. package/ts/src/log-level-impl.d.ts.map +1 -0
  146. package/ts/src/log-level-impl.js.map +1 -0
  147. package/ts/src/log-writer-impl.d.ts.map +1 -0
  148. package/ts/{log-writer-impl.js → src/log-writer-impl.js} +4 -2
  149. package/ts/src/log-writer-impl.js.map +1 -0
  150. package/ts/{logger-impl.d.ts → src/logger-impl.d.ts} +1 -1
  151. package/ts/src/logger-impl.d.ts.map +1 -0
  152. package/ts/{logger-impl.js → src/logger-impl.js} +2 -3
  153. package/ts/src/logger-impl.js.map +1 -0
  154. package/ts/{logger.d.ts → src/logger.d.ts} +1 -1
  155. package/ts/src/logger.d.ts.map +1 -0
  156. package/ts/src/logger.js.map +1 -0
  157. package/ts/{logger.test.d.ts.map → src/logger.test.d.ts.map} +1 -1
  158. package/ts/{logger.test.js → src/logger.test.js} +4 -4
  159. package/ts/src/logger.test.js.map +1 -0
  160. package/ts/src/node/index.d.ts.map +1 -0
  161. package/ts/src/node/index.js.map +1 -0
  162. package/ts/src/node/mock-file-service.d.ts.map +1 -0
  163. package/ts/{node → src/node}/mock-file-service.js +4 -4
  164. package/ts/src/node/mock-file-service.js.map +1 -0
  165. package/ts/src/node/mock-file-service.test.d.ts.map +1 -0
  166. package/ts/src/node/mock-file-service.test.js.map +1 -0
  167. package/ts/src/node/node-env-actions.d.ts +15 -0
  168. package/ts/src/node/node-env-actions.d.ts.map +1 -0
  169. package/ts/src/node/node-env-actions.js +44 -0
  170. package/ts/src/node/node-env-actions.js.map +1 -0
  171. package/ts/src/node/node-file-service.d.ts.map +1 -0
  172. package/ts/src/node/node-file-service.js.map +1 -0
  173. package/ts/{node → src/node}/node-sys-abstraction.d.ts +1 -14
  174. package/ts/src/node/node-sys-abstraction.d.ts.map +1 -0
  175. package/ts/{node → src/node}/node-sys-abstraction.js +0 -43
  176. package/ts/src/node/node-sys-abstraction.js.map +1 -0
  177. package/ts/src/node/node-sys-abstraction.test.d.ts.map +1 -0
  178. package/ts/src/node/node-sys-abstraction.test.js.map +1 -0
  179. package/ts/src/option.d.ts.map +1 -0
  180. package/ts/src/option.js.map +1 -0
  181. package/ts/{resolve-once.d.ts → src/resolve-once.d.ts} +1 -1
  182. package/ts/src/resolve-once.d.ts.map +1 -0
  183. package/ts/{resolve-once.js → src/resolve-once.js} +5 -4
  184. package/ts/src/resolve-once.js.map +1 -0
  185. package/ts/src/resolve-once.test.d.ts.map +1 -0
  186. package/ts/{resolve-once.test.js → src/resolve-once.test.js} +20 -24
  187. package/ts/src/resolve-once.test.js.map +1 -0
  188. package/ts/src/result.d.ts.map +1 -0
  189. package/ts/src/result.js.map +1 -0
  190. package/ts/{result.test.d.ts.map → src/result.test.d.ts.map} +1 -1
  191. package/ts/{result.test.js → src/result.test.js} +2 -4
  192. package/ts/src/result.test.js.map +1 -0
  193. package/ts/src/runtime.d.ts.map +1 -0
  194. package/ts/src/runtime.js.map +1 -0
  195. package/ts/src/sys-abstraction.d.ts.map +1 -0
  196. package/ts/src/sys-abstraction.js.map +1 -0
  197. package/ts/{sys-env.d.ts → src/sys-env.d.ts} +7 -0
  198. package/ts/src/sys-env.d.ts.map +1 -0
  199. package/ts/{sys-env.js → src/sys-env.js} +57 -4
  200. package/ts/src/sys-env.js.map +1 -0
  201. package/ts/{sys-env.test.d.ts.map → src/sys-env.test.d.ts.map} +1 -1
  202. package/ts/{sys-env.test.js → src/sys-env.test.js} +70 -2
  203. package/ts/src/sys-env.test.js.map +1 -0
  204. package/ts/src/test/index.d.ts.map +1 -0
  205. package/ts/src/test/index.js.map +1 -0
  206. package/ts/src/test/log-write-stream.d.ts.map +1 -0
  207. package/ts/src/test/log-write-stream.js.map +1 -0
  208. package/ts/src/test/mock-logger.d.ts.map +1 -0
  209. package/ts/src/test/mock-logger.js.map +1 -0
  210. package/ts/src/test/mock-logger.test.d.ts.map +1 -0
  211. package/ts/src/test/mock-logger.test.js.map +1 -0
  212. package/ts/src/test/test-exit-handler.d.ts.map +1 -0
  213. package/ts/{test → src/test}/test-exit-handler.js +8 -3
  214. package/ts/src/test/test-exit-handler.js.map +1 -0
  215. package/ts/src/time.d.ts.map +1 -0
  216. package/ts/src/time.js.map +1 -0
  217. package/ts/src/tracer.d.ts.map +1 -0
  218. package/ts/src/tracer.js.map +1 -0
  219. package/ts/{tracer.test.d.ts.map → src/tracer.test.d.ts.map} +1 -1
  220. package/ts/{tracer.test.js → src/tracer.test.js} +5 -5
  221. package/ts/src/tracer.test.js.map +1 -0
  222. package/ts/src/txt-en-decoder.d.ts.map +1 -0
  223. package/ts/src/txt-en-decoder.js.map +1 -0
  224. package/ts/{uri.d.ts → src/uri.d.ts} +2 -13
  225. package/ts/src/uri.d.ts.map +1 -0
  226. package/ts/{uri.js → src/uri.js} +2 -56
  227. package/ts/src/uri.js.map +1 -0
  228. package/ts/{uri.test.d.ts.map → src/uri.test.d.ts.map} +1 -1
  229. package/ts/{uri.test.js → src/uri.test.js} +7 -7
  230. package/ts/src/uri.test.js.map +1 -0
  231. package/ts/{utils → src/utils}/console-write-stream.d.ts +1 -1
  232. package/ts/src/utils/console-write-stream.d.ts.map +1 -0
  233. package/ts/{utils → src/utils}/console-write-stream.js +4 -3
  234. package/ts/src/utils/console-write-stream.js.map +1 -0
  235. package/ts/{utils → src/utils}/fanout-write-stream.d.ts +1 -1
  236. package/ts/src/utils/fanout-write-stream.d.ts.map +1 -0
  237. package/ts/src/utils/fanout-write-stream.js.map +1 -0
  238. package/ts/src/utils/get-params-result.d.ts +19 -0
  239. package/ts/src/utils/get-params-result.d.ts.map +1 -0
  240. package/ts/src/utils/get-params-result.js +58 -0
  241. package/ts/src/utils/get-params-result.js.map +1 -0
  242. package/ts/{utils → src/utils}/index.d.ts +1 -0
  243. package/ts/src/utils/index.d.ts.map +1 -0
  244. package/ts/{utils → src/utils}/index.js +1 -0
  245. package/ts/src/utils/index.js.map +1 -0
  246. package/ts/src/utils/rebuffer.d.ts.map +1 -0
  247. package/ts/{utils → src/utils}/rebuffer.js +7 -1
  248. package/ts/src/utils/rebuffer.js.map +1 -0
  249. package/ts/src/utils/rebuffer.test.d.ts.map +1 -0
  250. package/ts/src/utils/rebuffer.test.js.map +1 -0
  251. package/ts/src/utils/relative-path.d.ts.map +1 -0
  252. package/ts/src/utils/relative-path.js.map +1 -0
  253. package/ts/src/utils/relative-path.test.d.ts.map +1 -0
  254. package/ts/src/utils/relative-path.test.js.map +1 -0
  255. package/ts/src/utils/stream-map.d.ts.map +1 -0
  256. package/ts/src/utils/stream-map.js.map +1 -0
  257. package/ts/src/utils/stream-map.test.d.ts.map +1 -0
  258. package/ts/src/utils/stream-map.test.js.map +1 -0
  259. package/ts/src/utils/stream-test-helper.d.ts.map +1 -0
  260. package/ts/{utils → src/utils}/stream-test-helper.js +18 -10
  261. package/ts/src/utils/stream-test-helper.js.map +1 -0
  262. package/ts/src/utils/stream2string.d.ts.map +1 -0
  263. package/ts/src/utils/stream2string.js.map +1 -0
  264. package/ts/src/utils/stream2string.test.d.ts.map +1 -0
  265. package/ts/src/utils/stream2string.test.js.map +1 -0
  266. package/ts/src/utils/string2stream.d.ts.map +1 -0
  267. package/ts/src/utils/string2stream.js.map +1 -0
  268. package/ts/src/utils/string2stream.test.d.ts.map +1 -0
  269. package/ts/src/utils/string2stream.test.js.map +1 -0
  270. package/ts/src/utils/stripper.d.ts +3 -0
  271. package/ts/src/utils/stripper.d.ts.map +1 -0
  272. package/ts/src/utils/stripper.js.map +1 -0
  273. package/ts/src/utils/stripper.test.d.ts.map +1 -0
  274. package/ts/src/utils/stripper.test.js.map +1 -0
  275. package/ts/src/version.d.ts.map +1 -0
  276. package/ts/src/version.js.map +1 -0
  277. package/ts/src/web/index.d.ts.map +1 -0
  278. package/ts/src/web/index.js.map +1 -0
  279. package/ts/src/web/web-env-actions.d.ts +14 -0
  280. package/ts/src/web/web-env-actions.d.ts.map +1 -0
  281. package/ts/src/web/web-env-actions.js +35 -0
  282. package/ts/src/web/web-env-actions.js.map +1 -0
  283. package/ts/{web → src/web}/web-sys-abstraction.d.ts +1 -14
  284. package/ts/src/web/web-sys-abstraction.d.ts.map +1 -0
  285. package/ts/{web → src/web}/web-sys-abstraction.js +0 -34
  286. package/ts/src/web/web-sys-abstraction.js.map +1 -0
  287. package/ts/vitest.browser.config.d.ts +3 -0
  288. package/ts/vitest.browser.config.d.ts.map +1 -0
  289. package/ts/vitest.browser.config.js +17 -0
  290. package/ts/vitest.browser.config.js.map +1 -0
  291. package/ts/vitest.cf-runtime.config.d.ts +3 -0
  292. package/ts/vitest.cf-runtime.config.d.ts.map +1 -0
  293. package/ts/vitest.cf-runtime.config.js +16 -0
  294. package/ts/vitest.cf-runtime.config.js.map +1 -0
  295. package/ts/vitest.config.d.ts +3 -0
  296. package/ts/vitest.config.d.ts.map +1 -0
  297. package/ts/vitest.config.js +8 -0
  298. package/ts/vitest.config.js.map +1 -0
  299. package/ts/vitest.node.config.d.ts +3 -0
  300. package/ts/vitest.node.config.d.ts.map +1 -0
  301. package/ts/vitest.node.config.js +11 -0
  302. package/ts/vitest.node.config.js.map +1 -0
  303. package/ts/vitest.workspace.d.ts +3 -0
  304. package/ts/vitest.workspace.d.ts.map +1 -0
  305. package/ts/vitest.workspace.js +6 -0
  306. package/ts/vitest.workspace.js.map +1 -0
  307. package/utils/index.cjs +150 -3
  308. package/utils/index.cjs.map +1 -1
  309. package/utils/index.d.cts +2 -2
  310. package/utils/index.d.ts +2 -2
  311. package/utils/index.js +8 -3
  312. package/web/index.cjs +251 -239
  313. package/web/index.cjs.map +1 -1
  314. package/web/index.d.cts +5 -17
  315. package/web/index.d.ts +5 -17
  316. package/web/index.js +3 -4
  317. package/chunk-A7OPSHUV.js.map +0 -1
  318. package/chunk-HFP74WLI.js.map +0 -1
  319. package/chunk-P6LDM7PY.js.map +0 -1
  320. package/chunk-PPS4L4VW.js +0 -38
  321. package/chunk-PPS4L4VW.js.map +0 -1
  322. package/chunk-PRCFKZR7.js.map +0 -1
  323. package/ts/base-sys-abstraction.d.ts.map +0 -1
  324. package/ts/base-sys-abstraction.js.map +0 -1
  325. package/ts/base-sys-abstraction.test.d.ts.map +0 -1
  326. package/ts/base-sys-abstraction.test.js.map +0 -1
  327. package/ts/bin2text.d.ts.map +0 -1
  328. package/ts/bin2text.js.map +0 -1
  329. package/ts/bin2text.test.js.map +0 -1
  330. package/ts/cf/cf-sys-abstraction.d.ts +0 -25
  331. package/ts/cf/cf-sys-abstraction.d.ts.map +0 -1
  332. package/ts/cf/cf-sys-abstraction.js.map +0 -1
  333. package/ts/cf/index.d.ts.map +0 -1
  334. package/ts/cf/index.js.map +0 -1
  335. package/ts/crypto.d.ts.map +0 -1
  336. package/ts/crypto.js.map +0 -1
  337. package/ts/crypto.test.js.map +0 -1
  338. package/ts/deno/deno-file-service.d.ts.map +0 -1
  339. package/ts/deno/deno-file-service.js.map +0 -1
  340. package/ts/deno/deno-sys-abstraction.d.ts.map +0 -1
  341. package/ts/deno/deno-sys-abstraction.js.map +0 -1
  342. package/ts/deno/index.d.ts.map +0 -1
  343. package/ts/deno/index.js.map +0 -1
  344. package/ts/file-service.d.ts.map +0 -1
  345. package/ts/future.d.ts.map +0 -1
  346. package/ts/future.js.map +0 -1
  347. package/ts/future.test.js.map +0 -1
  348. package/ts/http_header.d.ts.map +0 -1
  349. package/ts/http_header.js.map +0 -1
  350. package/ts/http_header.test.d.ts.map +0 -1
  351. package/ts/http_header.test.js.map +0 -1
  352. package/ts/index.d.ts.map +0 -1
  353. package/ts/index.js.map +0 -1
  354. package/ts/log-level-impl.d.ts.map +0 -1
  355. package/ts/log-level-impl.js.map +0 -1
  356. package/ts/log-writer-impl.d.ts.map +0 -1
  357. package/ts/log-writer-impl.js.map +0 -1
  358. package/ts/logger-impl.d.ts.map +0 -1
  359. package/ts/logger-impl.js.map +0 -1
  360. package/ts/logger.d.ts.map +0 -1
  361. package/ts/logger.js.map +0 -1
  362. package/ts/logger.test.js.map +0 -1
  363. package/ts/node/index.d.ts.map +0 -1
  364. package/ts/node/index.js.map +0 -1
  365. package/ts/node/mock-file-service.d.ts.map +0 -1
  366. package/ts/node/mock-file-service.js.map +0 -1
  367. package/ts/node/mock-file-service.test.d.ts.map +0 -1
  368. package/ts/node/mock-file-service.test.js.map +0 -1
  369. package/ts/node/node-file-service.d.ts.map +0 -1
  370. package/ts/node/node-file-service.js.map +0 -1
  371. package/ts/node/node-sys-abstraction.d.ts.map +0 -1
  372. package/ts/node/node-sys-abstraction.js.map +0 -1
  373. package/ts/node/node-sys-abstraction.test.d.ts.map +0 -1
  374. package/ts/node/node-sys-abstraction.test.js.map +0 -1
  375. package/ts/option.d.ts.map +0 -1
  376. package/ts/option.js.map +0 -1
  377. package/ts/resolve-once.d.ts.map +0 -1
  378. package/ts/resolve-once.js.map +0 -1
  379. package/ts/resolve-once.test.d.ts.map +0 -1
  380. package/ts/resolve-once.test.js.map +0 -1
  381. package/ts/result.d.ts.map +0 -1
  382. package/ts/result.js.map +0 -1
  383. package/ts/result.test.js.map +0 -1
  384. package/ts/runtime.d.ts.map +0 -1
  385. package/ts/runtime.js.map +0 -1
  386. package/ts/sys-abstraction.d.ts.map +0 -1
  387. package/ts/sys-abstraction.js.map +0 -1
  388. package/ts/sys-env.d.ts.map +0 -1
  389. package/ts/sys-env.js.map +0 -1
  390. package/ts/sys-env.test.js.map +0 -1
  391. package/ts/test/index.d.ts.map +0 -1
  392. package/ts/test/index.js.map +0 -1
  393. package/ts/test/log-write-stream.d.ts.map +0 -1
  394. package/ts/test/log-write-stream.js.map +0 -1
  395. package/ts/test/mock-logger.d.ts.map +0 -1
  396. package/ts/test/mock-logger.js.map +0 -1
  397. package/ts/test/mock-logger.test.d.ts.map +0 -1
  398. package/ts/test/mock-logger.test.js.map +0 -1
  399. package/ts/test/test-exit-handler.d.ts.map +0 -1
  400. package/ts/test/test-exit-handler.js.map +0 -1
  401. package/ts/time.d.ts.map +0 -1
  402. package/ts/time.js.map +0 -1
  403. package/ts/tracer.d.ts.map +0 -1
  404. package/ts/tracer.js.map +0 -1
  405. package/ts/tracer.test.js.map +0 -1
  406. package/ts/txt-en-decoder.d.ts.map +0 -1
  407. package/ts/txt-en-decoder.js.map +0 -1
  408. package/ts/uri.d.ts.map +0 -1
  409. package/ts/uri.js.map +0 -1
  410. package/ts/uri.test.js.map +0 -1
  411. package/ts/utils/console-write-stream.d.ts.map +0 -1
  412. package/ts/utils/console-write-stream.js.map +0 -1
  413. package/ts/utils/fanout-write-stream.d.ts.map +0 -1
  414. package/ts/utils/fanout-write-stream.js.map +0 -1
  415. package/ts/utils/index.d.ts.map +0 -1
  416. package/ts/utils/index.js.map +0 -1
  417. package/ts/utils/rebuffer.d.ts.map +0 -1
  418. package/ts/utils/rebuffer.js.map +0 -1
  419. package/ts/utils/rebuffer.test.d.ts.map +0 -1
  420. package/ts/utils/rebuffer.test.js.map +0 -1
  421. package/ts/utils/relative-path.d.ts.map +0 -1
  422. package/ts/utils/relative-path.js.map +0 -1
  423. package/ts/utils/relative-path.test.d.ts.map +0 -1
  424. package/ts/utils/relative-path.test.js.map +0 -1
  425. package/ts/utils/stream-map.d.ts.map +0 -1
  426. package/ts/utils/stream-map.js.map +0 -1
  427. package/ts/utils/stream-map.test.d.ts.map +0 -1
  428. package/ts/utils/stream-map.test.js.map +0 -1
  429. package/ts/utils/stream-test-helper.d.ts.map +0 -1
  430. package/ts/utils/stream-test-helper.js.map +0 -1
  431. package/ts/utils/stream2string.d.ts.map +0 -1
  432. package/ts/utils/stream2string.js.map +0 -1
  433. package/ts/utils/stream2string.test.d.ts.map +0 -1
  434. package/ts/utils/stream2string.test.js.map +0 -1
  435. package/ts/utils/string2stream.d.ts.map +0 -1
  436. package/ts/utils/string2stream.js.map +0 -1
  437. package/ts/utils/string2stream.test.d.ts.map +0 -1
  438. package/ts/utils/string2stream.test.js.map +0 -1
  439. package/ts/utils/stripper.d.ts +0 -3
  440. package/ts/utils/stripper.d.ts.map +0 -1
  441. package/ts/utils/stripper.js.map +0 -1
  442. package/ts/utils/stripper.test.d.ts.map +0 -1
  443. package/ts/utils/stripper.test.js.map +0 -1
  444. package/ts/version.d.ts.map +0 -1
  445. package/ts/version.js.map +0 -1
  446. package/ts/web/index.d.ts.map +0 -1
  447. package/ts/web/index.js.map +0 -1
  448. package/ts/web/web-sys-abstraction.d.ts.map +0 -1
  449. package/ts/web/web-sys-abstraction.js.map +0 -1
  450. package/txt-en-decoder-CZYJUju2.d.cts +0 -11
  451. package/txt-en-decoder-CZYJUju2.d.ts +0 -11
  452. /package/ts/{base-sys-abstraction.test.d.ts → src/base-sys-abstraction.test.d.ts} +0 -0
  453. /package/ts/{base-sys-abstraction.test.js → src/base-sys-abstraction.test.js} +0 -0
  454. /package/ts/{bin2text.d.ts → src/bin2text.d.ts} +0 -0
  455. /package/ts/{bin2text.js → src/bin2text.js} +0 -0
  456. /package/ts/{bin2text.test.d.ts → src/bin2text.test.d.ts} +0 -0
  457. /package/ts/{bin2text.test.js → src/bin2text.test.js} +0 -0
  458. /package/ts/{cf → src/cf}/index.d.ts +0 -0
  459. /package/ts/{cf → src/cf}/index.js +0 -0
  460. /package/ts/{crypto.d.ts → src/crypto.d.ts} +0 -0
  461. /package/ts/{crypto.js → src/crypto.js} +0 -0
  462. /package/ts/{crypto.test.d.ts → src/crypto.test.d.ts} +0 -0
  463. /package/ts/{deno → src/deno}/deno-file-service.d.ts +0 -0
  464. /package/ts/{deno → src/deno}/deno-file-service.js +0 -0
  465. /package/ts/{deno → src/deno}/index.d.ts +0 -0
  466. /package/ts/{deno → src/deno}/index.js +0 -0
  467. /package/ts/{file-service.d.ts → src/file-service.d.ts} +0 -0
  468. /package/ts/{file-service.js → src/file-service.js} +0 -0
  469. /package/ts/{future.d.ts → src/future.d.ts} +0 -0
  470. /package/ts/{future.js → src/future.js} +0 -0
  471. /package/ts/{future.test.d.ts → src/future.test.d.ts} +0 -0
  472. /package/ts/{future.test.js → src/future.test.js} +0 -0
  473. /package/ts/{http_header.d.ts → src/http_header.d.ts} +0 -0
  474. /package/ts/{http_header.js → src/http_header.js} +0 -0
  475. /package/ts/{http_header.test.d.ts → src/http_header.test.d.ts} +0 -0
  476. /package/ts/{http_header.test.js → src/http_header.test.js} +0 -0
  477. /package/ts/{log-level-impl.d.ts → src/log-level-impl.d.ts} +0 -0
  478. /package/ts/{log-level-impl.js → src/log-level-impl.js} +0 -0
  479. /package/ts/{log-writer-impl.d.ts → src/log-writer-impl.d.ts} +0 -0
  480. /package/ts/{logger.js → src/logger.js} +0 -0
  481. /package/ts/{logger.test.d.ts → src/logger.test.d.ts} +0 -0
  482. /package/ts/{node → src/node}/index.d.ts +0 -0
  483. /package/ts/{node → src/node}/index.js +0 -0
  484. /package/ts/{node → src/node}/mock-file-service.d.ts +0 -0
  485. /package/ts/{node → src/node}/mock-file-service.test.d.ts +0 -0
  486. /package/ts/{node → src/node}/mock-file-service.test.js +0 -0
  487. /package/ts/{node → src/node}/node-file-service.d.ts +0 -0
  488. /package/ts/{node → src/node}/node-file-service.js +0 -0
  489. /package/ts/{node → src/node}/node-sys-abstraction.test.d.ts +0 -0
  490. /package/ts/{node → src/node}/node-sys-abstraction.test.js +0 -0
  491. /package/ts/{option.d.ts → src/option.d.ts} +0 -0
  492. /package/ts/{option.js → src/option.js} +0 -0
  493. /package/ts/{resolve-once.test.d.ts → src/resolve-once.test.d.ts} +0 -0
  494. /package/ts/{result.d.ts → src/result.d.ts} +0 -0
  495. /package/ts/{result.js → src/result.js} +0 -0
  496. /package/ts/{result.test.d.ts → src/result.test.d.ts} +0 -0
  497. /package/ts/{runtime.d.ts → src/runtime.d.ts} +0 -0
  498. /package/ts/{runtime.js → src/runtime.js} +0 -0
  499. /package/ts/{sys-abstraction.d.ts → src/sys-abstraction.d.ts} +0 -0
  500. /package/ts/{sys-abstraction.js → src/sys-abstraction.js} +0 -0
  501. /package/ts/{sys-env.test.d.ts → src/sys-env.test.d.ts} +0 -0
  502. /package/ts/{test → src/test}/index.d.ts +0 -0
  503. /package/ts/{test → src/test}/index.js +0 -0
  504. /package/ts/{test → src/test}/log-write-stream.d.ts +0 -0
  505. /package/ts/{test → src/test}/log-write-stream.js +0 -0
  506. /package/ts/{test → src/test}/mock-logger.d.ts +0 -0
  507. /package/ts/{test → src/test}/mock-logger.js +0 -0
  508. /package/ts/{test → src/test}/mock-logger.test.d.ts +0 -0
  509. /package/ts/{test → src/test}/mock-logger.test.js +0 -0
  510. /package/ts/{test → src/test}/test-exit-handler.d.ts +0 -0
  511. /package/ts/{time.d.ts → src/time.d.ts} +0 -0
  512. /package/ts/{time.js → src/time.js} +0 -0
  513. /package/ts/{tracer.d.ts → src/tracer.d.ts} +0 -0
  514. /package/ts/{tracer.js → src/tracer.js} +0 -0
  515. /package/ts/{tracer.test.d.ts → src/tracer.test.d.ts} +0 -0
  516. /package/ts/{txt-en-decoder.d.ts → src/txt-en-decoder.d.ts} +0 -0
  517. /package/ts/{txt-en-decoder.js → src/txt-en-decoder.js} +0 -0
  518. /package/ts/{uri.test.d.ts → src/uri.test.d.ts} +0 -0
  519. /package/ts/{utils → src/utils}/fanout-write-stream.js +0 -0
  520. /package/ts/{utils → src/utils}/rebuffer.d.ts +0 -0
  521. /package/ts/{utils → src/utils}/rebuffer.test.d.ts +0 -0
  522. /package/ts/{utils → src/utils}/rebuffer.test.js +0 -0
  523. /package/ts/{utils → src/utils}/relative-path.d.ts +0 -0
  524. /package/ts/{utils → src/utils}/relative-path.js +0 -0
  525. /package/ts/{utils → src/utils}/relative-path.test.d.ts +0 -0
  526. /package/ts/{utils → src/utils}/relative-path.test.js +0 -0
  527. /package/ts/{utils → src/utils}/stream-map.d.ts +0 -0
  528. /package/ts/{utils → src/utils}/stream-map.js +0 -0
  529. /package/ts/{utils → src/utils}/stream-map.test.d.ts +0 -0
  530. /package/ts/{utils → src/utils}/stream-map.test.js +0 -0
  531. /package/ts/{utils → src/utils}/stream-test-helper.d.ts +0 -0
  532. /package/ts/{utils → src/utils}/stream2string.d.ts +0 -0
  533. /package/ts/{utils → src/utils}/stream2string.js +0 -0
  534. /package/ts/{utils → src/utils}/stream2string.test.d.ts +0 -0
  535. /package/ts/{utils → src/utils}/stream2string.test.js +0 -0
  536. /package/ts/{utils → src/utils}/string2stream.d.ts +0 -0
  537. /package/ts/{utils → src/utils}/string2stream.js +0 -0
  538. /package/ts/{utils → src/utils}/string2stream.test.d.ts +0 -0
  539. /package/ts/{utils → src/utils}/string2stream.test.js +0 -0
  540. /package/ts/{utils → src/utils}/stripper.js +0 -0
  541. /package/ts/{utils → src/utils}/stripper.test.d.ts +0 -0
  542. /package/ts/{utils → src/utils}/stripper.test.js +0 -0
  543. /package/ts/{version.d.ts → src/version.d.ts} +0 -0
  544. /package/ts/{version.js → src/version.js} +0 -0
  545. /package/ts/{web → src/web}/index.d.ts +0 -0
  546. /package/ts/{web → src/web}/index.js +0 -0
package/web/index.cjs CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __typeError = (msg) => {
9
7
  throw TypeError(msg);
@@ -20,14 +18,6 @@ var __copyProps = (to, from, except, desc) => {
20
18
  }
21
19
  return to;
22
20
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
31
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
22
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
33
23
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
@@ -37,7 +27,6 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
37
27
  // src/web/index.ts
38
28
  var web_exports = {};
39
29
  __export(web_exports, {
40
- BrowserEnvActions: () => BrowserEnvActions,
41
30
  WebFileService: () => WebFileService,
42
31
  WebSysAbstraction: () => WebSysAbstraction
43
32
  });
@@ -57,9 +46,9 @@ var SysTime = class extends Time {
57
46
  return /* @__PURE__ */ new Date();
58
47
  }
59
48
  Sleep(duration) {
60
- return new Promise((resolve2) => {
49
+ return new Promise((resolve) => {
61
50
  setTimeout(() => {
62
- resolve2();
51
+ resolve();
63
52
  }, duration);
64
53
  });
65
54
  }
@@ -172,13 +161,15 @@ var BaseSysAbstraction = class {
172
161
  this._systemService = params.SystemService;
173
162
  this._txtEnDe = params.TxtEnDecoder;
174
163
  const decoder2 = this._txtEnDe;
175
- this._stdout = CFWriteableStream(async (chunk) => {
164
+ this._stdout = CFWriteableStream((chunk) => {
176
165
  const decoded = decoder2.decode(chunk);
177
166
  console.log(decoded.trimEnd());
167
+ return Promise.resolve();
178
168
  });
179
- this._stderr = CFWriteableStream(async (chunk) => {
169
+ this._stderr = CFWriteableStream((chunk) => {
180
170
  const decoded = decoder2.decode(chunk);
181
171
  console.error(decoded.trimEnd());
172
+ return Promise.resolve();
182
173
  });
183
174
  }
184
175
  };
@@ -249,8 +240,8 @@ var Future = class {
249
240
  __privateAdd(this, _rejectFn, () => {
250
241
  throw new Error("This Promise is not working as expected.");
251
242
  });
252
- __privateSet(this, _promise, new Promise((resolve2, reject) => {
253
- __privateSet(this, _resolveFn, resolve2);
243
+ __privateSet(this, _promise, new Promise((resolve, reject) => {
244
+ __privateSet(this, _resolveFn, resolve);
254
245
  __privateSet(this, _rejectFn, reject);
255
246
  }));
256
247
  }
@@ -395,7 +386,10 @@ function isSet(value, ref = globalThis) {
395
386
  }
396
387
  function runtimeFn() {
397
388
  const gt = globalThis;
398
- let isReactNative = isSet("navigator.product") && typeof gt["navigator"] === "object" && gt["navigator"]["product"] === "ReactNative";
389
+ let isReactNative = (
390
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
391
+ isSet("navigator.product") && typeof gt["navigator"] === "object" && gt["navigator"]["product"] === "ReactNative"
392
+ );
399
393
  let isNodeIsh = false;
400
394
  if (!isSet("Deno")) {
401
395
  isNodeIsh = isSet("process.versions.node") && !isReactNative;
@@ -416,28 +410,7 @@ function runtimeFn() {
416
410
  };
417
411
  }
418
412
 
419
- // src/txt-en-decoder.ts
420
- var encoder = new TextEncoder();
421
- var decoder = new TextDecoder();
422
- var Utf8EnDecoder = class {
423
- encode(str) {
424
- return encoder.encode(str);
425
- }
426
- decode(data) {
427
- return decoder.decode(data);
428
- }
429
- };
430
- var utf8EnDecoder = new Utf8EnDecoder();
431
- function Utf8EnDecoderSingleton() {
432
- return utf8EnDecoder;
433
- }
434
-
435
- // src/deno/deno-file-service.ts
436
- var path = __toESM(require("path"), 1);
437
- var Deno = globalThis.Deno;
438
-
439
- // src/deno/deno-sys-abstraction.ts
440
- var Deno2 = globalThis.Deno;
413
+ // src/deno/deno-env-actions.ts
441
414
  var once = new ResolveOnce();
442
415
  var _deno;
443
416
  var _DenoEnvActions = class _DenoEnvActions {
@@ -477,95 +450,8 @@ var _DenoEnvActions = class _DenoEnvActions {
477
450
  };
478
451
  _deno = new WeakMap();
479
452
  var DenoEnvActions = _DenoEnvActions;
480
- var DenoExitServiceImpl = class {
481
- constructor() {
482
- this._exitHandlers = [];
483
- this.invoked = false;
484
- this._handleExit = async () => {
485
- if (this.invoked) {
486
- return;
487
- }
488
- this.invoked = true;
489
- for (const h of this._exitHandlers) {
490
- try {
491
- const ret = h.hdl();
492
- if (typeof ret.then === "function") {
493
- await ret;
494
- }
495
- } finally {
496
- }
497
- }
498
- };
499
- globalThis.addEventListener("unhandledrejection", (e) => {
500
- e.preventDefault();
501
- this.exit(19);
502
- });
503
- globalThis.addEventListener("error", () => {
504
- this.exit(19);
505
- });
506
- globalThis.addEventListener("uncaughtException", () => {
507
- this.exit(19);
508
- });
509
- globalThis.addEventListener("unload", () => {
510
- this.exit(0);
511
- });
512
- Deno2.addSignalListener("SIGQUIT", () => {
513
- this.exit(3);
514
- });
515
- Deno2.addSignalListener("SIGINT", () => {
516
- this.exit(2);
517
- });
518
- Deno2.addSignalListener("SIGTERM", () => {
519
- this.exit(9);
520
- });
521
- }
522
- injectExitHandlers(hdls) {
523
- this._exitHandlers = hdls;
524
- }
525
- exit(code) {
526
- this._handleExit().then(() => {
527
- Deno2.exit(code);
528
- }).catch((err) => {
529
- console.error("ExitService: failed to handle exit", err);
530
- Deno2.exit(code);
531
- });
532
- }
533
- };
534
- var _DenoSystemService = class _DenoSystemService {
535
- constructor() {
536
- this._exitService = new DenoExitServiceImpl();
537
- this._exitService.injectExitHandlers(_DenoSystemService._exitHandlers);
538
- }
539
- Env() {
540
- return envFactory();
541
- }
542
- Args() {
543
- return Deno2.args;
544
- }
545
- OnExit(hdl) {
546
- const id = crypto.randomUUID();
547
- _DenoSystemService._exitHandlers.push({ hdl, id });
548
- return () => {
549
- const idx = _DenoSystemService._exitHandlers.findIndex((h) => h.id === id);
550
- if (idx >= 0) {
551
- _DenoSystemService._exitHandlers.splice(idx, 1);
552
- }
553
- };
554
- }
555
- Exit(code) {
556
- this._exitService.exit(code);
557
- }
558
- };
559
- _DenoSystemService._exitHandlers = [];
560
- var DenoSystemService = _DenoSystemService;
561
-
562
- // src/node/node-file-service.ts
563
- var import_node_path = __toESM(require("path"), 1);
564
- var import_node_fs = __toESM(require("fs"), 1);
565
- var import_node_process = __toESM(require("process"), 1);
566
453
 
567
- // src/node/node-sys-abstraction.ts
568
- var import_node_process2 = __toESM(require("process"), 1);
454
+ // src/node/node-env-actions.ts
569
455
  var once2 = new ResolveOnce();
570
456
  var _node;
571
457
  var _NodeEnvActions = class _NodeEnvActions {
@@ -603,96 +489,51 @@ var _NodeEnvActions = class _NodeEnvActions {
603
489
  };
604
490
  _node = new WeakMap();
605
491
  var NodeEnvActions = _NodeEnvActions;
606
- var NodeExitServiceImpl = class {
607
- constructor() {
608
- this._exitHandlers = [];
609
- this.invoked = false;
610
- this._handleExit = async () => {
611
- if (this.invoked) {
612
- return;
613
- }
614
- this.invoked = true;
615
- for (const h of this._exitHandlers) {
616
- try {
617
- const ret = h.hdl();
618
- if (typeof ret.then === "function") {
619
- await ret;
620
- }
621
- } finally {
622
- }
623
- }
624
- };
625
- import_node_process2.default.on("unhandledRejection", (reason, p) => {
626
- this.exit(19);
627
- });
628
- import_node_process2.default.on("uncaughtException", (error) => {
629
- this.exit(18);
630
- });
631
- import_node_process2.default.on("close", () => {
632
- this.exit(0);
633
- });
634
- import_node_process2.default.on("exit", () => {
635
- this.exit(0);
636
- });
637
- import_node_process2.default.on("SIGQUIT", () => {
638
- this.exit(3);
639
- });
640
- import_node_process2.default.on("SIGINT", () => {
641
- this.exit(2);
642
- });
643
- import_node_process2.default.on("SIGTERM", () => {
644
- this.exit(9);
645
- });
492
+
493
+ // src/web/web-env-actions.ts
494
+ var once3 = new ResolveOnce();
495
+ var BrowserEnvActions = class _BrowserEnvActions {
496
+ constructor(opts) {
497
+ this.env = /* @__PURE__ */ new Map();
498
+ this.opts = opts;
646
499
  }
647
- injectExitHandlers(hdls) {
648
- this._exitHandlers = hdls;
500
+ static new(opts) {
501
+ return once3.once(() => new _BrowserEnvActions(opts));
649
502
  }
650
- exit(code) {
651
- this._handleExit().then(() => {
652
- import_node_process2.default.exit(code);
653
- }).catch((err) => {
654
- console.error("ExitService: failed to handle exit", err);
655
- import_node_process2.default.exit(code);
656
- });
503
+ get(key) {
504
+ return this.env.get(key);
657
505
  }
658
- };
659
- var _NodeSystemService = class _NodeSystemService {
660
- constructor() {
661
- this._exitService = new NodeExitServiceImpl();
662
- this._exitService.injectExitHandlers(_NodeSystemService._exitHandlers);
506
+ set(key, value) {
507
+ if (value) {
508
+ this.env.set(key, value);
509
+ }
663
510
  }
664
- Env() {
665
- return envFactory();
511
+ delete(key) {
512
+ this.env.delete(key);
666
513
  }
667
- Args() {
668
- return import_node_process2.default.argv;
514
+ keys() {
515
+ return Array.from(this.env.keys());
669
516
  }
670
- OnExit(hdl) {
671
- const id = crypto.randomUUID();
672
- _NodeSystemService._exitHandlers.push({ hdl, id });
673
- return () => {
674
- const idx = _NodeSystemService._exitHandlers.findIndex((h) => h.id === id);
675
- if (idx >= 0) {
676
- _NodeSystemService._exitHandlers.splice(idx, 1);
677
- }
678
- };
517
+ active() {
518
+ return true;
679
519
  }
680
- Exit(code) {
681
- this._exitService.exit(code);
520
+ register(env) {
521
+ const sym = Symbol.for(this.opts.symbol || "CP_ENV");
522
+ const browser = globalThis;
523
+ browser[sym] = env;
524
+ return env;
682
525
  }
683
526
  };
684
- _NodeSystemService._exitHandlers = [];
685
- var NodeSystemService = _NodeSystemService;
686
527
 
687
- // src/cf/cf-sys-abstraction.ts
688
- var once3 = new ResolveOnce();
528
+ // src/cf/cf-env-actions.ts
529
+ var once4 = new ResolveOnce();
689
530
  var CFEnvActions = class _CFEnvActions {
690
531
  constructor(env) {
691
532
  this.injectOnRegister = {};
692
533
  this.cfEnv = new Map(Object.entries(env.presetEnv || {}));
693
534
  }
694
535
  static new(opts) {
695
- return once3.once(() => new _CFEnvActions(opts));
536
+ return once4.once(() => new _CFEnvActions(opts));
696
537
  }
697
538
  static inject(o) {
698
539
  const env = _CFEnvActions.new({});
@@ -733,6 +574,145 @@ var CFEnvActions = class _CFEnvActions {
733
574
  }
734
575
  };
735
576
 
577
+ // src/result.ts
578
+ var Result = class _Result {
579
+ static Ok(t) {
580
+ return new ResultOK(t);
581
+ }
582
+ static Err(t) {
583
+ if (typeof t === "string") {
584
+ return new ResultError(new Error(t));
585
+ }
586
+ if (_Result.Is(t)) {
587
+ if (t.is_ok()) {
588
+ return new ResultError(new Error("Result Error is Ok"));
589
+ }
590
+ return t;
591
+ }
592
+ return new ResultError(t);
593
+ }
594
+ static Is(t) {
595
+ if (!t) {
596
+ return false;
597
+ }
598
+ if (t instanceof _Result) {
599
+ return true;
600
+ }
601
+ const rt = t;
602
+ if ([typeof rt.is_ok, typeof rt.is_err, typeof rt.unwrap, typeof rt.unwrap_err].every((x) => x === "function")) {
603
+ return true;
604
+ }
605
+ return false;
606
+ }
607
+ isOk() {
608
+ return this.is_ok();
609
+ }
610
+ isErr() {
611
+ return this.is_err();
612
+ }
613
+ Ok() {
614
+ return this.unwrap();
615
+ }
616
+ Err() {
617
+ return this.unwrap_err();
618
+ }
619
+ };
620
+ var ResultOK = class extends Result {
621
+ constructor(t) {
622
+ super();
623
+ this._t = t;
624
+ }
625
+ is_ok() {
626
+ return true;
627
+ }
628
+ is_err() {
629
+ return false;
630
+ }
631
+ unwrap_err() {
632
+ throw new Error("Result is Ok");
633
+ }
634
+ unwrap() {
635
+ return this._t;
636
+ }
637
+ };
638
+ var ResultError = class extends Result {
639
+ constructor(t) {
640
+ super();
641
+ this._error = t;
642
+ }
643
+ is_ok() {
644
+ return false;
645
+ }
646
+ is_err() {
647
+ return true;
648
+ }
649
+ unwrap() {
650
+ throw new Error(`Result is Err: ${this._error}`);
651
+ }
652
+ unwrap_err() {
653
+ return this._error;
654
+ }
655
+ };
656
+
657
+ // src/utils/get-params-result.ts
658
+ var _REQUIRED = class {
659
+ constructor() {
660
+ this.val = "REQUIRED";
661
+ }
662
+ };
663
+ var _OPTIONAL = class {
664
+ constructor() {
665
+ this.val = "OPTIONAL";
666
+ }
667
+ };
668
+ var param = {
669
+ REQUIRED: new _REQUIRED(),
670
+ OPTIONAL: new _OPTIONAL()
671
+ };
672
+ function getParamsResult(keys, getParam) {
673
+ const keyDef = keys.flat().reduce(
674
+ (acc, i) => {
675
+ if (typeof i === "string") {
676
+ acc.push({ key: i, def: void 0, isOptional: false });
677
+ } else if (typeof i === "object") {
678
+ acc.push(
679
+ ...Object.keys(i).map((k) => ({
680
+ key: k,
681
+ def: typeof i[k] === "string" ? i[k] : void 0,
682
+ isOptional: i[k] === param.OPTIONAL
683
+ }))
684
+ );
685
+ }
686
+ return acc;
687
+ },
688
+ []
689
+ );
690
+ const msgFn = keys.find((k) => typeof k === "function") || ((...keys2) => {
691
+ const msg = keys2.join(",");
692
+ return `missing parameters: ${msg}`;
693
+ });
694
+ const errors = [];
695
+ const result = {};
696
+ for (const kd of keyDef) {
697
+ const val = getParam.getParam(kd.key);
698
+ if (val === void 0) {
699
+ if (typeof kd.def === "string") {
700
+ result[kd.key] = kd.def;
701
+ } else {
702
+ if (!kd.isOptional) {
703
+ errors.push(kd.key);
704
+ }
705
+ }
706
+ } else {
707
+ result[kd.key] = val;
708
+ }
709
+ }
710
+ if (errors.length) {
711
+ return Result.Err(msgFn(...errors));
712
+ }
713
+ return Result.Ok(result);
714
+ }
715
+
736
716
  // src/sys-env.ts
737
717
  var envActions = [
738
718
  { id: "cf", fn: (opts) => CFEnvActions.new(opts) },
@@ -748,17 +728,67 @@ function envFactory(opts = {}) {
748
728
  }
749
729
  return _envFactories.get(found.id).once(() => {
750
730
  const action = found.fn(opts);
751
- const ret = new EnvImpl2(action, opts);
731
+ const ret = new EnvImpl(action, opts);
752
732
  action.register(ret);
753
733
  return ret;
754
734
  });
755
735
  }
756
- var EnvImpl2 = class {
736
+ function isIterable(obj) {
737
+ if (obj == null) {
738
+ return false;
739
+ }
740
+ return typeof obj[Symbol.iterator] === "function";
741
+ }
742
+ var EnvImpl = class {
757
743
  constructor(map, opts = {}) {
758
744
  this._onSet = [];
759
745
  this._map = map;
760
746
  this._updatePresets(opts.presetEnv);
761
747
  }
748
+ gets(...kparams) {
749
+ return getParamsResult(kparams, {
750
+ getParam: (k) => this.get(k)
751
+ });
752
+ }
753
+ sets(...keys) {
754
+ keys.forEach((key) => {
755
+ if (Array.isArray(key)) {
756
+ if (key.length === 2) {
757
+ const [k, v] = key;
758
+ if (typeof k === "string" && typeof v === "string") {
759
+ this.set(k, v);
760
+ return;
761
+ }
762
+ }
763
+ for (const item of key) {
764
+ if (Array.isArray(item)) {
765
+ if (item.length === 2) {
766
+ const [k, v] = item;
767
+ if (typeof k === "string" && typeof v === "string") {
768
+ this.set(k, v);
769
+ }
770
+ }
771
+ }
772
+ }
773
+ } else {
774
+ if (isIterable(key)) {
775
+ for (const [k, v] of key) {
776
+ if (typeof k === "string" && typeof v === "string") {
777
+ this.set(k, v);
778
+ }
779
+ }
780
+ } else {
781
+ const rKey = key;
782
+ for (const k in rKey) {
783
+ const v = rKey[k];
784
+ if (typeof k === "string" && typeof v === "string") {
785
+ this.set(k, v);
786
+ }
787
+ }
788
+ }
789
+ }
790
+ });
791
+ }
762
792
  _updatePresets(presetEnv) {
763
793
  if (!presetEnv) {
764
794
  return;
@@ -821,40 +851,23 @@ var EnvImpl2 = class {
821
851
  }
822
852
  };
823
853
 
824
- // src/web/web-sys-abstraction.ts
825
- var once4 = new ResolveOnce();
826
- var BrowserEnvActions = class _BrowserEnvActions {
827
- constructor(opts) {
828
- this.env = /* @__PURE__ */ new Map();
829
- this.opts = opts;
830
- }
831
- static new(opts) {
832
- return once4.once(() => new _BrowserEnvActions(opts));
833
- }
834
- get(key) {
835
- return this.env.get(key);
836
- }
837
- set(key, value) {
838
- if (value) {
839
- this.env.set(key, value);
840
- }
841
- }
842
- delete(key) {
843
- this.env.delete(key);
844
- }
845
- keys() {
846
- return Array.from(this.env.keys());
847
- }
848
- active() {
849
- return true;
854
+ // src/txt-en-decoder.ts
855
+ var encoder = new TextEncoder();
856
+ var decoder = new TextDecoder();
857
+ var Utf8EnDecoder = class {
858
+ encode(str) {
859
+ return encoder.encode(str);
850
860
  }
851
- register(env) {
852
- const sym = Symbol.for(this.opts.symbol || "CP_ENV");
853
- const browser = globalThis;
854
- browser[sym] = env;
855
- return env;
861
+ decode(data) {
862
+ return decoder.decode(data);
856
863
  }
857
864
  };
865
+ var utf8EnDecoder = new Utf8EnDecoder();
866
+ function Utf8EnDecoderSingleton() {
867
+ return utf8EnDecoder;
868
+ }
869
+
870
+ // src/web/web-sys-abstraction.ts
858
871
  var WebFileService = class {
859
872
  get baseDir() {
860
873
  throw new Error("basedir-Method not implemented.");
@@ -917,19 +930,18 @@ var WebSystemService = class {
917
930
  }
918
931
  };
919
932
  var my = void 0;
920
- function WebSysAbstraction(param) {
933
+ function WebSysAbstraction(param2) {
921
934
  if (!my) {
922
935
  my = new BaseSysAbstraction({
923
- TxtEnDecoder: (param == null ? void 0 : param.TxtEnDecoder) || Utf8EnDecoderSingleton(),
936
+ TxtEnDecoder: (param2 == null ? void 0 : param2.TxtEnDecoder) || Utf8EnDecoderSingleton(),
924
937
  FileSystem: new WebFileService(),
925
938
  SystemService: new WebSystemService()
926
939
  });
927
940
  }
928
- return new WrapperSysAbstraction(my, param);
941
+ return new WrapperSysAbstraction(my, param2);
929
942
  }
930
943
  // Annotate the CommonJS export names for ESM import in node:
931
944
  0 && (module.exports = {
932
- BrowserEnvActions,
933
945
  WebFileService,
934
946
  WebSysAbstraction
935
947
  });