@adviser/cement 0.4.7 → 0.4.8

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