@skmtc/core 0.0.273 → 0.0.275

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 (359) hide show
  1. package/esm/context/CoreContext.d.ts +32 -3
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +131 -26
  4. package/esm/context/GenerateContext.d.ts +4 -0
  5. package/esm/context/GenerateContext.d.ts.map +1 -1
  6. package/esm/context/GenerateContext.js +13 -1
  7. package/esm/context/RenderContext.d.ts +4 -2
  8. package/esm/context/RenderContext.d.ts.map +1 -1
  9. package/esm/context/RenderContext.js +17 -1
  10. package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts +700 -0
  11. package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@std/fmt/1.0.1/colors.js +903 -0
  13. package/esm/deps/jsr.io/@std/fs/1.0.2/exists.d.ts +198 -0
  14. package/esm/deps/jsr.io/@std/fs/1.0.2/exists.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/fs/1.0.2/exists.js +251 -0
  16. package/esm/deps/jsr.io/@std/io/0.224.6/types.d.ts +95 -0
  17. package/esm/deps/jsr.io/@std/io/0.224.6/types.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@std/io/0.224.6/types.js +3 -0
  19. package/esm/deps/jsr.io/@std/io/0.224.6/write_all.d.ts +51 -0
  20. package/esm/deps/jsr.io/@std/io/0.224.6/write_all.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@std/io/0.224.6/write_all.js +61 -0
  22. package/esm/deps/jsr.io/@std/log/0.224.6/_config.d.ts +4 -0
  23. package/esm/deps/jsr.io/@std/log/0.224.6/_config.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/log/0.224.6/_config.js +14 -0
  25. package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts +8 -0
  26. package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.js +8 -0
  28. package/esm/deps/jsr.io/@std/log/0.224.6/_state.d.ts +8 -0
  29. package/esm/deps/jsr.io/@std/log/0.224.6/_state.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@std/log/0.224.6/_state.js +7 -0
  31. package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts +22 -0
  32. package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@std/log/0.224.6/base_handler.js +60 -0
  34. package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts +18 -0
  35. package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.js +58 -0
  37. package/esm/deps/jsr.io/@std/log/0.224.6/critical.d.ts +5 -0
  38. package/esm/deps/jsr.io/@std/log/0.224.6/critical.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/log/0.224.6/critical.js +10 -0
  40. package/esm/deps/jsr.io/@std/log/0.224.6/debug.d.ts +5 -0
  41. package/esm/deps/jsr.io/@std/log/0.224.6/debug.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/log/0.224.6/debug.js +10 -0
  43. package/esm/deps/jsr.io/@std/log/0.224.6/error.d.ts +5 -0
  44. package/esm/deps/jsr.io/@std/log/0.224.6/error.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@std/log/0.224.6/error.js +10 -0
  46. package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts +51 -0
  47. package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/log/0.224.6/file_handler.js +135 -0
  49. package/esm/deps/jsr.io/@std/log/0.224.6/formatters.d.ts +6 -0
  50. package/esm/deps/jsr.io/@std/log/0.224.6/formatters.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@std/log/0.224.6/formatters.js +19 -0
  52. package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts +4 -0
  53. package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@std/log/0.224.6/get_logger.js +21 -0
  55. package/esm/deps/jsr.io/@std/log/0.224.6/info.d.ts +5 -0
  56. package/esm/deps/jsr.io/@std/log/0.224.6/info.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@std/log/0.224.6/info.js +10 -0
  58. package/esm/deps/jsr.io/@std/log/0.224.6/levels.d.ts +26 -0
  59. package/esm/deps/jsr.io/@std/log/0.224.6/levels.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/log/0.224.6/levels.js +43 -0
  61. package/esm/deps/jsr.io/@std/log/0.224.6/logger.d.ts +62 -0
  62. package/esm/deps/jsr.io/@std/log/0.224.6/logger.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/log/0.224.6/logger.js +179 -0
  64. package/esm/deps/jsr.io/@std/log/0.224.6/mod.d.ts +390 -0
  65. package/esm/deps/jsr.io/@std/log/0.224.6/mod.d.ts.map +1 -0
  66. package/esm/deps/jsr.io/@std/log/0.224.6/mod.js +390 -0
  67. package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts +53 -0
  68. package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts.map +1 -0
  69. package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +125 -0
  70. package/esm/deps/jsr.io/@std/log/0.224.6/setup.d.ts +4 -0
  71. package/esm/deps/jsr.io/@std/log/0.224.6/setup.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/log/0.224.6/setup.js +41 -0
  73. package/esm/deps/jsr.io/@std/log/0.224.6/warn.d.ts +5 -0
  74. package/esm/deps/jsr.io/@std/log/0.224.6/warn.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/log/0.224.6/warn.js +10 -0
  76. package/esm/dsl/OasBase.d.ts.map +1 -0
  77. package/esm/{oas-elements → dsl}/OasBase.js +5 -4
  78. package/esm/generate/generate.d.ts +3 -1
  79. package/esm/generate/generate.d.ts.map +1 -1
  80. package/esm/generate/generate.js +5 -2
  81. package/esm/generate/generateModels.d.ts.map +1 -1
  82. package/esm/generate/generateModels.js +18 -5
  83. package/esm/generate/generateOperations.d.ts.map +1 -1
  84. package/esm/generate/generateOperations.js +20 -6
  85. package/esm/helpers/isImported.d.ts +2 -0
  86. package/esm/helpers/isImported.d.ts.map +1 -0
  87. package/esm/helpers/isImported.js +4 -0
  88. package/esm/helpers/refFns.d.ts +0 -1
  89. package/esm/helpers/refFns.d.ts.map +1 -1
  90. package/esm/helpers/refFns.js +0 -5
  91. package/esm/mod.d.ts +1 -2
  92. package/esm/mod.d.ts.map +1 -1
  93. package/esm/mod.js +1 -2
  94. package/esm/oas/array/Array.d.ts +1 -1
  95. package/esm/oas/array/Array.d.ts.map +1 -1
  96. package/esm/oas/array/Array.js +1 -1
  97. package/esm/oas/boolean/Boolean.d.ts +1 -1
  98. package/esm/oas/boolean/Boolean.d.ts.map +1 -1
  99. package/esm/oas/boolean/Boolean.js +1 -1
  100. package/esm/oas/components/Components.d.ts +1 -1
  101. package/esm/oas/components/Components.d.ts.map +1 -1
  102. package/esm/oas/components/Components.js +1 -1
  103. package/esm/oas/discriminator/Discriminator.d.ts +1 -1
  104. package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
  105. package/esm/oas/discriminator/Discriminator.js +1 -1
  106. package/esm/oas/document/Document.d.ts +1 -1
  107. package/esm/oas/document/Document.d.ts.map +1 -1
  108. package/esm/oas/document/Document.js +1 -1
  109. package/esm/oas/example/Example.d.ts +1 -1
  110. package/esm/oas/example/Example.d.ts.map +1 -1
  111. package/esm/oas/example/Example.js +1 -1
  112. package/esm/oas/example/toExamplesV3.js +1 -1
  113. package/esm/oas/header/Header.d.ts +1 -1
  114. package/esm/oas/header/Header.d.ts.map +1 -1
  115. package/esm/oas/header/Header.js +1 -1
  116. package/esm/oas/info/Info.d.ts +1 -1
  117. package/esm/oas/info/Info.d.ts.map +1 -1
  118. package/esm/oas/info/Info.js +1 -1
  119. package/esm/oas/integer/Integer.d.ts +1 -1
  120. package/esm/oas/integer/Integer.d.ts.map +1 -1
  121. package/esm/oas/integer/Integer.js +1 -1
  122. package/esm/oas/intersection/Intersection.d.ts +1 -1
  123. package/esm/oas/intersection/Intersection.d.ts.map +1 -1
  124. package/esm/oas/intersection/Intersection.js +1 -1
  125. package/esm/oas/mediaType/MediaType.d.ts +1 -1
  126. package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
  127. package/esm/oas/mediaType/MediaType.js +1 -1
  128. package/esm/oas/number/Number.d.ts +1 -1
  129. package/esm/oas/number/Number.d.ts.map +1 -1
  130. package/esm/oas/number/Number.js +1 -1
  131. package/esm/oas/object/Object.d.ts +1 -1
  132. package/esm/oas/object/Object.d.ts.map +1 -1
  133. package/esm/oas/object/Object.js +1 -1
  134. package/esm/oas/operation/Operation.d.ts +1 -1
  135. package/esm/oas/operation/Operation.d.ts.map +1 -1
  136. package/esm/oas/operation/Operation.js +1 -1
  137. package/esm/oas/parameter/Parameter.d.ts +1 -1
  138. package/esm/oas/parameter/Parameter.d.ts.map +1 -1
  139. package/esm/oas/parameter/Parameter.js +1 -1
  140. package/esm/oas/pathItem/PathItem.d.ts +1 -1
  141. package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
  142. package/esm/oas/pathItem/PathItem.js +1 -1
  143. package/esm/oas/ref/Ref.d.ts +1 -1
  144. package/esm/oas/ref/Ref.d.ts.map +1 -1
  145. package/esm/oas/ref/Ref.js +1 -1
  146. package/esm/oas/requestBody/RequestBody.d.ts +1 -1
  147. package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
  148. package/esm/oas/requestBody/RequestBody.js +1 -1
  149. package/esm/oas/response/Response.d.ts +1 -1
  150. package/esm/oas/response/Response.d.ts.map +1 -1
  151. package/esm/oas/response/Response.js +1 -1
  152. package/esm/oas/string/String.d.ts +1 -1
  153. package/esm/oas/string/String.d.ts.map +1 -1
  154. package/esm/oas/string/String.js +1 -1
  155. package/esm/oas/tag/Tag.d.ts +1 -1
  156. package/esm/oas/tag/Tag.d.ts.map +1 -1
  157. package/esm/oas/tag/Tag.js +1 -1
  158. package/esm/oas/union/Union.d.ts +1 -1
  159. package/esm/oas/union/Union.d.ts.map +1 -1
  160. package/esm/oas/union/Union.js +1 -1
  161. package/esm/oas/unknown/Unknown.d.ts +1 -1
  162. package/esm/oas/unknown/Unknown.d.ts.map +1 -1
  163. package/esm/oas/unknown/Unknown.js +1 -1
  164. package/esm/oas/void/Void.d.ts +1 -1
  165. package/esm/oas/void/Void.d.ts.map +1 -1
  166. package/esm/oas/void/Void.js +1 -1
  167. package/esm/server/createServer.d.ts.map +1 -1
  168. package/esm/server/createServer.js +8 -4
  169. package/esm/types/Manifest.d.ts +61 -1
  170. package/esm/types/Manifest.d.ts.map +1 -1
  171. package/esm/types/Manifest.js +13 -0
  172. package/package.json +1 -1
  173. package/script/context/CoreContext.d.ts +32 -3
  174. package/script/context/CoreContext.d.ts.map +1 -1
  175. package/script/context/CoreContext.js +132 -26
  176. package/script/context/GenerateContext.d.ts +4 -0
  177. package/script/context/GenerateContext.d.ts.map +1 -1
  178. package/script/context/GenerateContext.js +12 -0
  179. package/script/context/RenderContext.d.ts +4 -2
  180. package/script/context/RenderContext.d.ts.map +1 -1
  181. package/script/context/RenderContext.js +17 -1
  182. package/script/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts +700 -0
  183. package/script/deps/jsr.io/@std/fmt/1.0.1/colors.d.ts.map +1 -0
  184. package/script/deps/jsr.io/@std/fmt/1.0.1/colors.js +976 -0
  185. package/script/deps/jsr.io/@std/fs/1.0.2/exists.d.ts +198 -0
  186. package/script/deps/jsr.io/@std/fs/1.0.2/exists.d.ts.map +1 -0
  187. package/script/deps/jsr.io/@std/fs/1.0.2/exists.js +278 -0
  188. package/script/deps/jsr.io/@std/io/0.224.6/types.d.ts +95 -0
  189. package/script/deps/jsr.io/@std/io/0.224.6/types.d.ts.map +1 -0
  190. package/script/deps/jsr.io/@std/io/0.224.6/types.js +4 -0
  191. package/script/deps/jsr.io/@std/io/0.224.6/write_all.d.ts +51 -0
  192. package/script/deps/jsr.io/@std/io/0.224.6/write_all.d.ts.map +1 -0
  193. package/script/deps/jsr.io/@std/io/0.224.6/write_all.js +65 -0
  194. package/script/deps/jsr.io/@std/log/0.224.6/_config.d.ts +4 -0
  195. package/script/deps/jsr.io/@std/log/0.224.6/_config.d.ts.map +1 -0
  196. package/script/deps/jsr.io/@std/log/0.224.6/_config.js +17 -0
  197. package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts +8 -0
  198. package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.d.ts.map +1 -0
  199. package/script/deps/jsr.io/@std/log/0.224.6/_file_handler_symbols.js +11 -0
  200. package/script/deps/jsr.io/@std/log/0.224.6/_state.d.ts +8 -0
  201. package/script/deps/jsr.io/@std/log/0.224.6/_state.d.ts.map +1 -0
  202. package/script/deps/jsr.io/@std/log/0.224.6/_state.js +10 -0
  203. package/script/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts +22 -0
  204. package/script/deps/jsr.io/@std/log/0.224.6/base_handler.d.ts.map +1 -0
  205. package/script/deps/jsr.io/@std/log/0.224.6/base_handler.js +64 -0
  206. package/script/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts +18 -0
  207. package/script/deps/jsr.io/@std/log/0.224.6/console_handler.d.ts.map +1 -0
  208. package/script/deps/jsr.io/@std/log/0.224.6/console_handler.js +62 -0
  209. package/script/deps/jsr.io/@std/log/0.224.6/critical.d.ts +5 -0
  210. package/script/deps/jsr.io/@std/log/0.224.6/critical.d.ts.map +1 -0
  211. package/script/deps/jsr.io/@std/log/0.224.6/critical.js +13 -0
  212. package/script/deps/jsr.io/@std/log/0.224.6/debug.d.ts +5 -0
  213. package/script/deps/jsr.io/@std/log/0.224.6/debug.d.ts.map +1 -0
  214. package/script/deps/jsr.io/@std/log/0.224.6/debug.js +13 -0
  215. package/script/deps/jsr.io/@std/log/0.224.6/error.d.ts +5 -0
  216. package/script/deps/jsr.io/@std/log/0.224.6/error.d.ts.map +1 -0
  217. package/script/deps/jsr.io/@std/log/0.224.6/error.js +13 -0
  218. package/script/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts +51 -0
  219. package/script/deps/jsr.io/@std/log/0.224.6/file_handler.d.ts.map +1 -0
  220. package/script/deps/jsr.io/@std/log/0.224.6/file_handler.js +162 -0
  221. package/script/deps/jsr.io/@std/log/0.224.6/formatters.d.ts +6 -0
  222. package/script/deps/jsr.io/@std/log/0.224.6/formatters.d.ts.map +1 -0
  223. package/script/deps/jsr.io/@std/log/0.224.6/formatters.js +23 -0
  224. package/script/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts +4 -0
  225. package/script/deps/jsr.io/@std/log/0.224.6/get_logger.d.ts.map +1 -0
  226. package/script/deps/jsr.io/@std/log/0.224.6/get_logger.js +24 -0
  227. package/script/deps/jsr.io/@std/log/0.224.6/info.d.ts +5 -0
  228. package/script/deps/jsr.io/@std/log/0.224.6/info.d.ts.map +1 -0
  229. package/script/deps/jsr.io/@std/log/0.224.6/info.js +13 -0
  230. package/script/deps/jsr.io/@std/log/0.224.6/levels.d.ts +26 -0
  231. package/script/deps/jsr.io/@std/log/0.224.6/levels.d.ts.map +1 -0
  232. package/script/deps/jsr.io/@std/log/0.224.6/levels.js +48 -0
  233. package/script/deps/jsr.io/@std/log/0.224.6/logger.d.ts +62 -0
  234. package/script/deps/jsr.io/@std/log/0.224.6/logger.d.ts.map +1 -0
  235. package/script/deps/jsr.io/@std/log/0.224.6/logger.js +185 -0
  236. package/script/deps/jsr.io/@std/log/0.224.6/mod.d.ts +390 -0
  237. package/script/deps/jsr.io/@std/log/0.224.6/mod.d.ts.map +1 -0
  238. package/script/deps/jsr.io/@std/log/0.224.6/mod.js +406 -0
  239. package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts +53 -0
  240. package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.d.ts.map +1 -0
  241. package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +152 -0
  242. package/script/deps/jsr.io/@std/log/0.224.6/setup.d.ts +4 -0
  243. package/script/deps/jsr.io/@std/log/0.224.6/setup.d.ts.map +1 -0
  244. package/script/deps/jsr.io/@std/log/0.224.6/setup.js +44 -0
  245. package/script/deps/jsr.io/@std/log/0.224.6/warn.d.ts +5 -0
  246. package/script/deps/jsr.io/@std/log/0.224.6/warn.d.ts.map +1 -0
  247. package/script/deps/jsr.io/@std/log/0.224.6/warn.js +13 -0
  248. package/script/dsl/OasBase.d.ts.map +1 -0
  249. package/script/{oas-elements → dsl}/OasBase.js +5 -4
  250. package/script/generate/generate.d.ts +3 -1
  251. package/script/generate/generate.d.ts.map +1 -1
  252. package/script/generate/generate.js +5 -2
  253. package/script/generate/generateModels.d.ts.map +1 -1
  254. package/script/generate/generateModels.js +18 -5
  255. package/script/generate/generateOperations.d.ts.map +1 -1
  256. package/script/generate/generateOperations.js +20 -6
  257. package/script/helpers/isImported.d.ts +2 -0
  258. package/script/helpers/isImported.d.ts.map +1 -0
  259. package/script/helpers/isImported.js +8 -0
  260. package/script/helpers/refFns.d.ts +0 -1
  261. package/script/helpers/refFns.d.ts.map +1 -1
  262. package/script/helpers/refFns.js +1 -7
  263. package/script/mod.d.ts +1 -2
  264. package/script/mod.d.ts.map +1 -1
  265. package/script/mod.js +1 -2
  266. package/script/oas/array/Array.d.ts +1 -1
  267. package/script/oas/array/Array.d.ts.map +1 -1
  268. package/script/oas/array/Array.js +1 -1
  269. package/script/oas/boolean/Boolean.d.ts +1 -1
  270. package/script/oas/boolean/Boolean.d.ts.map +1 -1
  271. package/script/oas/boolean/Boolean.js +1 -1
  272. package/script/oas/components/Components.d.ts +1 -1
  273. package/script/oas/components/Components.d.ts.map +1 -1
  274. package/script/oas/components/Components.js +1 -1
  275. package/script/oas/discriminator/Discriminator.d.ts +1 -1
  276. package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
  277. package/script/oas/discriminator/Discriminator.js +1 -1
  278. package/script/oas/document/Document.d.ts +1 -1
  279. package/script/oas/document/Document.d.ts.map +1 -1
  280. package/script/oas/document/Document.js +1 -1
  281. package/script/oas/example/Example.d.ts +1 -1
  282. package/script/oas/example/Example.d.ts.map +1 -1
  283. package/script/oas/example/Example.js +1 -1
  284. package/script/oas/example/toExamplesV3.js +1 -1
  285. package/script/oas/header/Header.d.ts +1 -1
  286. package/script/oas/header/Header.d.ts.map +1 -1
  287. package/script/oas/header/Header.js +1 -1
  288. package/script/oas/info/Info.d.ts +1 -1
  289. package/script/oas/info/Info.d.ts.map +1 -1
  290. package/script/oas/info/Info.js +1 -1
  291. package/script/oas/integer/Integer.d.ts +1 -1
  292. package/script/oas/integer/Integer.d.ts.map +1 -1
  293. package/script/oas/integer/Integer.js +1 -1
  294. package/script/oas/intersection/Intersection.d.ts +1 -1
  295. package/script/oas/intersection/Intersection.d.ts.map +1 -1
  296. package/script/oas/intersection/Intersection.js +1 -1
  297. package/script/oas/mediaType/MediaType.d.ts +1 -1
  298. package/script/oas/mediaType/MediaType.d.ts.map +1 -1
  299. package/script/oas/mediaType/MediaType.js +1 -1
  300. package/script/oas/number/Number.d.ts +1 -1
  301. package/script/oas/number/Number.d.ts.map +1 -1
  302. package/script/oas/number/Number.js +1 -1
  303. package/script/oas/object/Object.d.ts +1 -1
  304. package/script/oas/object/Object.d.ts.map +1 -1
  305. package/script/oas/object/Object.js +1 -1
  306. package/script/oas/operation/Operation.d.ts +1 -1
  307. package/script/oas/operation/Operation.d.ts.map +1 -1
  308. package/script/oas/operation/Operation.js +1 -1
  309. package/script/oas/parameter/Parameter.d.ts +1 -1
  310. package/script/oas/parameter/Parameter.d.ts.map +1 -1
  311. package/script/oas/parameter/Parameter.js +1 -1
  312. package/script/oas/pathItem/PathItem.d.ts +1 -1
  313. package/script/oas/pathItem/PathItem.d.ts.map +1 -1
  314. package/script/oas/pathItem/PathItem.js +1 -1
  315. package/script/oas/ref/Ref.d.ts +1 -1
  316. package/script/oas/ref/Ref.d.ts.map +1 -1
  317. package/script/oas/ref/Ref.js +1 -1
  318. package/script/oas/requestBody/RequestBody.d.ts +1 -1
  319. package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
  320. package/script/oas/requestBody/RequestBody.js +1 -1
  321. package/script/oas/response/Response.d.ts +1 -1
  322. package/script/oas/response/Response.d.ts.map +1 -1
  323. package/script/oas/response/Response.js +1 -1
  324. package/script/oas/string/String.d.ts +1 -1
  325. package/script/oas/string/String.d.ts.map +1 -1
  326. package/script/oas/string/String.js +1 -1
  327. package/script/oas/tag/Tag.d.ts +1 -1
  328. package/script/oas/tag/Tag.d.ts.map +1 -1
  329. package/script/oas/tag/Tag.js +1 -1
  330. package/script/oas/union/Union.d.ts +1 -1
  331. package/script/oas/union/Union.d.ts.map +1 -1
  332. package/script/oas/union/Union.js +1 -1
  333. package/script/oas/unknown/Unknown.d.ts +1 -1
  334. package/script/oas/unknown/Unknown.d.ts.map +1 -1
  335. package/script/oas/unknown/Unknown.js +1 -1
  336. package/script/oas/void/Void.d.ts +1 -1
  337. package/script/oas/void/Void.d.ts.map +1 -1
  338. package/script/oas/void/Void.js +1 -1
  339. package/script/server/createServer.d.ts.map +1 -1
  340. package/script/server/createServer.js +8 -4
  341. package/script/types/Manifest.d.ts +61 -1
  342. package/script/types/Manifest.d.ts.map +1 -1
  343. package/script/types/Manifest.js +14 -1
  344. package/esm/context/LogStore.d.ts +0 -25
  345. package/esm/context/LogStore.d.ts.map +0 -1
  346. package/esm/context/LogStore.js +0 -53
  347. package/esm/helpers/logStatus.d.ts +0 -19
  348. package/esm/helpers/logStatus.d.ts.map +0 -1
  349. package/esm/helpers/logStatus.js +0 -16
  350. package/esm/oas-elements/OasBase.d.ts.map +0 -1
  351. package/script/context/LogStore.d.ts +0 -25
  352. package/script/context/LogStore.d.ts.map +0 -1
  353. package/script/context/LogStore.js +0 -57
  354. package/script/helpers/logStatus.d.ts +0 -19
  355. package/script/helpers/logStatus.d.ts.map +0 -1
  356. package/script/helpers/logStatus.js +0 -21
  357. package/script/oas-elements/OasBase.d.ts.map +0 -1
  358. /package/esm/{oas-elements → dsl}/OasBase.d.ts +0 -0
  359. /package/script/{oas-elements → dsl}/OasBase.d.ts +0 -0
@@ -0,0 +1,198 @@
1
+ export interface ExistsOptions {
2
+ /**
3
+ * When `true`, will check if the path is readable by the user as well.
4
+ *
5
+ * @default {false}
6
+ */
7
+ isReadable?: boolean;
8
+ /**
9
+ * When `true`, will check if the path is a directory as well. Directory
10
+ * symlinks are included.
11
+ *
12
+ * @default {false}
13
+ */
14
+ isDirectory?: boolean;
15
+ /**
16
+ * When `true`, will check if the path is a file as well. File symlinks are
17
+ * included.
18
+ *
19
+ * @default {false}
20
+ */
21
+ isFile?: boolean;
22
+ }
23
+ /**
24
+ * Asynchronously test whether or not the given path exists by checking with
25
+ * the file system.
26
+ *
27
+ * Note: Do not use this function if performing a check before another operation
28
+ * on that file. Doing so creates a race condition. Instead, perform the actual
29
+ * file operation directly. This function is not recommended for this use case.
30
+ * See the recommended method below.
31
+ *
32
+ * @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
33
+ * more information on the time-of-check to time-of-use bug.
34
+ *
35
+ * Requires `--allow-read` and `--allow-sys` permissions.
36
+ *
37
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
38
+ * for more information on Deno's permissions system.
39
+ *
40
+ * @param path The path to the file or directory, as a string or URL.
41
+ * @param options Additional options for the check.
42
+ *
43
+ * @returns A promise that resolves with `true` if the path exists, `false`
44
+ * otherwise.
45
+ *
46
+ * @example Recommended method
47
+ * ```ts no-eval
48
+ * // Notice no use of exists
49
+ * try {
50
+ * await Deno.remove("./foo", { recursive: true });
51
+ * } catch (error) {
52
+ * if (!(error instanceof Deno.errors.NotFound)) {
53
+ * throw error;
54
+ * }
55
+ * // Do nothing...
56
+ * }
57
+ * ```
58
+ *
59
+ * Notice that `exists()` is not used in the above example. Doing so avoids a
60
+ * possible race condition. See the above note for details.
61
+ *
62
+ * @example Basic usage
63
+ * ```ts no-eval
64
+ * import { exists } from "@std/fs/exists";
65
+ *
66
+ * await exists("./exists"); // true
67
+ * await exists("./does_not_exist"); // false
68
+ * ```
69
+ *
70
+ * @example Check if a path is readable
71
+ * ```ts no-eval
72
+ * import { exists } from "@std/fs/exists";
73
+ *
74
+ * await exists("./readable", { isReadable: true }); // true
75
+ * await exists("./not_readable", { isReadable: true }); // false
76
+ * ```
77
+ *
78
+ * @example Check if a path is a directory
79
+ * ```ts no-eval
80
+ * import { exists } from "@std/fs/exists";
81
+ *
82
+ * await exists("./directory", { isDirectory: true }); // true
83
+ * await exists("./file", { isDirectory: true }); // false
84
+ * ```
85
+ *
86
+ * @example Check if a path is a file
87
+ * ```ts no-eval
88
+ * import { exists } from "@std/fs/exists";
89
+ *
90
+ * await exists("./file", { isFile: true }); // true
91
+ * await exists("./directory", { isFile: true }); // false
92
+ * ```
93
+ *
94
+ * @example Check if a path is a readable directory
95
+ * ```ts no-eval
96
+ * import { exists } from "@std/fs/exists";
97
+ *
98
+ * await exists("./readable_directory", { isReadable: true, isDirectory: true }); // true
99
+ * await exists("./not_readable_directory", { isReadable: true, isDirectory: true }); // false
100
+ * ```
101
+ *
102
+ * @example Check if a path is a readable file
103
+ * ```ts no-eval
104
+ * import { exists } from "@std/fs/exists";
105
+ *
106
+ * await exists("./readable_file", { isReadable: true, isFile: true }); // true
107
+ * await exists("./not_readable_file", { isReadable: true, isFile: true }); // false
108
+ * ```
109
+ */
110
+ export declare function exists(path: string | URL, options?: ExistsOptions): Promise<boolean>;
111
+ /**
112
+ * Synchronously test whether or not the given path exists by checking with
113
+ * the file system.
114
+ *
115
+ * Note: Do not use this function if performing a check before another operation
116
+ * on that file. Doing so creates a race condition. Instead, perform the actual
117
+ * file operation directly. This function is not recommended for this use case.
118
+ * See the recommended method below.
119
+ *
120
+ * @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
121
+ * more information on the time-of-check to time-of-use bug.
122
+ *
123
+ * Requires `--allow-read` and `--allow-sys` permissions.
124
+ *
125
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
126
+ * for more information on Deno's permissions system.
127
+ *
128
+ * @param path The path to the file or directory, as a string or URL.
129
+ * @param options Additional options for the check.
130
+ *
131
+ * @returns `true` if the path exists, `false` otherwise.
132
+ *
133
+ * @example Recommended method
134
+ * ```ts no-eval
135
+ * // Notice no use of exists
136
+ * try {
137
+ * Deno.removeSync("./foo", { recursive: true });
138
+ * } catch (error) {
139
+ * if (!(error instanceof Deno.errors.NotFound)) {
140
+ * throw error;
141
+ * }
142
+ * // Do nothing...
143
+ * }
144
+ * ```
145
+ *
146
+ * Notice that `existsSync()` is not used in the above example. Doing so avoids
147
+ * a possible race condition. See the above note for details.
148
+ *
149
+ * @example Basic usage
150
+ * ```ts no-eval
151
+ * import { existsSync } from "@std/fs/exists";
152
+ *
153
+ * existsSync("./exists"); // true
154
+ * existsSync("./does_not_exist"); // false
155
+ * ```
156
+ *
157
+ * @example Check if a path is readable
158
+ * ```ts no-eval
159
+ * import { existsSync } from "@std/fs/exists";
160
+ *
161
+ * existsSync("./readable", { isReadable: true }); // true
162
+ * existsSync("./not_readable", { isReadable: true }); // false
163
+ * ```
164
+ *
165
+ * @example Check if a path is a directory
166
+ * ```ts no-eval
167
+ * import { existsSync } from "@std/fs/exists";
168
+ *
169
+ * existsSync("./directory", { isDirectory: true }); // true
170
+ * existsSync("./file", { isDirectory: true }); // false
171
+ * ```
172
+ *
173
+ * @example Check if a path is a file
174
+ * ```ts no-eval
175
+ * import { existsSync } from "@std/fs/exists";
176
+ *
177
+ * existsSync("./file", { isFile: true }); // true
178
+ * existsSync("./directory", { isFile: true }); // false
179
+ * ```
180
+ *
181
+ * @example Check if a path is a readable directory
182
+ * ```ts no-eval
183
+ * import { existsSync } from "@std/fs/exists";
184
+ *
185
+ * existsSync("./readable_directory", { isReadable: true, isDirectory: true }); // true
186
+ * existsSync("./not_readable_directory", { isReadable: true, isDirectory: true }); // false
187
+ * ```
188
+ *
189
+ * @example Check if a path is a readable file
190
+ * ```ts no-eval
191
+ * import { existsSync } from "@std/fs/exists";
192
+ *
193
+ * existsSync("./readable_file", { isReadable: true, isFile: true }); // true
194
+ * existsSync("./not_readable_file", { isReadable: true, isFile: true }); // false
195
+ * ```
196
+ */
197
+ export declare function existsSync(path: string | URL, options?: ExistsOptions): boolean;
198
+ //# sourceMappingURL=exists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.2/exists.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,wBAAsB,MAAM,CAC1B,IAAI,EAAE,MAAM,GAAG,GAAG,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,CAsClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GAAG,GAAG,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAqCT"}
@@ -0,0 +1,251 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ /** Options for {@linkcode exists} and {@linkcode existsSync.} */
3
+ import * as dntShim from "../../../../../_dnt.shims.js";
4
+ /**
5
+ * Asynchronously test whether or not the given path exists by checking with
6
+ * the file system.
7
+ *
8
+ * Note: Do not use this function if performing a check before another operation
9
+ * on that file. Doing so creates a race condition. Instead, perform the actual
10
+ * file operation directly. This function is not recommended for this use case.
11
+ * See the recommended method below.
12
+ *
13
+ * @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
14
+ * more information on the time-of-check to time-of-use bug.
15
+ *
16
+ * Requires `--allow-read` and `--allow-sys` permissions.
17
+ *
18
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
19
+ * for more information on Deno's permissions system.
20
+ *
21
+ * @param path The path to the file or directory, as a string or URL.
22
+ * @param options Additional options for the check.
23
+ *
24
+ * @returns A promise that resolves with `true` if the path exists, `false`
25
+ * otherwise.
26
+ *
27
+ * @example Recommended method
28
+ * ```ts no-eval
29
+ * // Notice no use of exists
30
+ * try {
31
+ * await Deno.remove("./foo", { recursive: true });
32
+ * } catch (error) {
33
+ * if (!(error instanceof Deno.errors.NotFound)) {
34
+ * throw error;
35
+ * }
36
+ * // Do nothing...
37
+ * }
38
+ * ```
39
+ *
40
+ * Notice that `exists()` is not used in the above example. Doing so avoids a
41
+ * possible race condition. See the above note for details.
42
+ *
43
+ * @example Basic usage
44
+ * ```ts no-eval
45
+ * import { exists } from "@std/fs/exists";
46
+ *
47
+ * await exists("./exists"); // true
48
+ * await exists("./does_not_exist"); // false
49
+ * ```
50
+ *
51
+ * @example Check if a path is readable
52
+ * ```ts no-eval
53
+ * import { exists } from "@std/fs/exists";
54
+ *
55
+ * await exists("./readable", { isReadable: true }); // true
56
+ * await exists("./not_readable", { isReadable: true }); // false
57
+ * ```
58
+ *
59
+ * @example Check if a path is a directory
60
+ * ```ts no-eval
61
+ * import { exists } from "@std/fs/exists";
62
+ *
63
+ * await exists("./directory", { isDirectory: true }); // true
64
+ * await exists("./file", { isDirectory: true }); // false
65
+ * ```
66
+ *
67
+ * @example Check if a path is a file
68
+ * ```ts no-eval
69
+ * import { exists } from "@std/fs/exists";
70
+ *
71
+ * await exists("./file", { isFile: true }); // true
72
+ * await exists("./directory", { isFile: true }); // false
73
+ * ```
74
+ *
75
+ * @example Check if a path is a readable directory
76
+ * ```ts no-eval
77
+ * import { exists } from "@std/fs/exists";
78
+ *
79
+ * await exists("./readable_directory", { isReadable: true, isDirectory: true }); // true
80
+ * await exists("./not_readable_directory", { isReadable: true, isDirectory: true }); // false
81
+ * ```
82
+ *
83
+ * @example Check if a path is a readable file
84
+ * ```ts no-eval
85
+ * import { exists } from "@std/fs/exists";
86
+ *
87
+ * await exists("./readable_file", { isReadable: true, isFile: true }); // true
88
+ * await exists("./not_readable_file", { isReadable: true, isFile: true }); // false
89
+ * ```
90
+ */
91
+ export async function exists(path, options) {
92
+ try {
93
+ const stat = await dntShim.Deno.stat(path);
94
+ if (options &&
95
+ (options.isReadable || options.isDirectory || options.isFile)) {
96
+ if (options.isDirectory && options.isFile) {
97
+ throw new TypeError("ExistsOptions.options.isDirectory and ExistsOptions.options.isFile must not be true together");
98
+ }
99
+ if ((options.isDirectory && !stat.isDirectory) ||
100
+ (options.isFile && !stat.isFile)) {
101
+ return false;
102
+ }
103
+ if (options.isReadable) {
104
+ return fileIsReadable(stat);
105
+ }
106
+ }
107
+ return true;
108
+ }
109
+ catch (error) {
110
+ if (error instanceof dntShim.Deno.errors.NotFound) {
111
+ return false;
112
+ }
113
+ if (error instanceof dntShim.Deno.errors.PermissionDenied) {
114
+ if ((await dntShim.Deno.permissions.query({ name: "read", path })).state ===
115
+ "granted") {
116
+ // --allow-read not missing
117
+ return !options?.isReadable; // PermissionDenied was raised by file system, so the item exists, but can't be read
118
+ }
119
+ }
120
+ throw error;
121
+ }
122
+ }
123
+ /**
124
+ * Synchronously test whether or not the given path exists by checking with
125
+ * the file system.
126
+ *
127
+ * Note: Do not use this function if performing a check before another operation
128
+ * on that file. Doing so creates a race condition. Instead, perform the actual
129
+ * file operation directly. This function is not recommended for this use case.
130
+ * See the recommended method below.
131
+ *
132
+ * @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
133
+ * more information on the time-of-check to time-of-use bug.
134
+ *
135
+ * Requires `--allow-read` and `--allow-sys` permissions.
136
+ *
137
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
138
+ * for more information on Deno's permissions system.
139
+ *
140
+ * @param path The path to the file or directory, as a string or URL.
141
+ * @param options Additional options for the check.
142
+ *
143
+ * @returns `true` if the path exists, `false` otherwise.
144
+ *
145
+ * @example Recommended method
146
+ * ```ts no-eval
147
+ * // Notice no use of exists
148
+ * try {
149
+ * Deno.removeSync("./foo", { recursive: true });
150
+ * } catch (error) {
151
+ * if (!(error instanceof Deno.errors.NotFound)) {
152
+ * throw error;
153
+ * }
154
+ * // Do nothing...
155
+ * }
156
+ * ```
157
+ *
158
+ * Notice that `existsSync()` is not used in the above example. Doing so avoids
159
+ * a possible race condition. See the above note for details.
160
+ *
161
+ * @example Basic usage
162
+ * ```ts no-eval
163
+ * import { existsSync } from "@std/fs/exists";
164
+ *
165
+ * existsSync("./exists"); // true
166
+ * existsSync("./does_not_exist"); // false
167
+ * ```
168
+ *
169
+ * @example Check if a path is readable
170
+ * ```ts no-eval
171
+ * import { existsSync } from "@std/fs/exists";
172
+ *
173
+ * existsSync("./readable", { isReadable: true }); // true
174
+ * existsSync("./not_readable", { isReadable: true }); // false
175
+ * ```
176
+ *
177
+ * @example Check if a path is a directory
178
+ * ```ts no-eval
179
+ * import { existsSync } from "@std/fs/exists";
180
+ *
181
+ * existsSync("./directory", { isDirectory: true }); // true
182
+ * existsSync("./file", { isDirectory: true }); // false
183
+ * ```
184
+ *
185
+ * @example Check if a path is a file
186
+ * ```ts no-eval
187
+ * import { existsSync } from "@std/fs/exists";
188
+ *
189
+ * existsSync("./file", { isFile: true }); // true
190
+ * existsSync("./directory", { isFile: true }); // false
191
+ * ```
192
+ *
193
+ * @example Check if a path is a readable directory
194
+ * ```ts no-eval
195
+ * import { existsSync } from "@std/fs/exists";
196
+ *
197
+ * existsSync("./readable_directory", { isReadable: true, isDirectory: true }); // true
198
+ * existsSync("./not_readable_directory", { isReadable: true, isDirectory: true }); // false
199
+ * ```
200
+ *
201
+ * @example Check if a path is a readable file
202
+ * ```ts no-eval
203
+ * import { existsSync } from "@std/fs/exists";
204
+ *
205
+ * existsSync("./readable_file", { isReadable: true, isFile: true }); // true
206
+ * existsSync("./not_readable_file", { isReadable: true, isFile: true }); // false
207
+ * ```
208
+ */
209
+ export function existsSync(path, options) {
210
+ try {
211
+ const stat = dntShim.Deno.statSync(path);
212
+ if (options &&
213
+ (options.isReadable || options.isDirectory || options.isFile)) {
214
+ if (options.isDirectory && options.isFile) {
215
+ throw new TypeError("ExistsOptions.options.isDirectory and ExistsOptions.options.isFile must not be true together");
216
+ }
217
+ if ((options.isDirectory && !stat.isDirectory) ||
218
+ (options.isFile && !stat.isFile)) {
219
+ return false;
220
+ }
221
+ if (options.isReadable) {
222
+ return fileIsReadable(stat);
223
+ }
224
+ }
225
+ return true;
226
+ }
227
+ catch (error) {
228
+ if (error instanceof dntShim.Deno.errors.NotFound) {
229
+ return false;
230
+ }
231
+ if (error instanceof dntShim.Deno.errors.PermissionDenied) {
232
+ if (dntShim.Deno.permissions.querySync({ name: "read", path }).state === "granted") {
233
+ // --allow-read not missing
234
+ return !options?.isReadable; // PermissionDenied was raised by file system, so the item exists, but can't be read
235
+ }
236
+ }
237
+ throw error;
238
+ }
239
+ }
240
+ function fileIsReadable(stat) {
241
+ if (stat.mode === null) {
242
+ return true; // Exclusive on Non-POSIX systems
243
+ }
244
+ else if (dntShim.Deno.uid() === stat.uid) {
245
+ return (stat.mode & 0o400) === 0o400; // User is owner and can read?
246
+ }
247
+ else if (dntShim.Deno.gid() === stat.gid) {
248
+ return (stat.mode & 0o040) === 0o040; // User group is owner and can read?
249
+ }
250
+ return (stat.mode & 0o004) === 0o004; // Others can read?
251
+ }
@@ -0,0 +1,95 @@
1
+ /**
2
+ * An abstract interface which when implemented provides an interface to read bytes into an array buffer asynchronously.
3
+ */
4
+ export interface Reader {
5
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
6
+ * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
7
+ * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
8
+ * use all of `p` as scratch space during the call. If some data is
9
+ * available but not `p.byteLength` bytes, `read()` conventionally resolves
10
+ * to what is available instead of waiting for more.
11
+ *
12
+ * When `read()` encounters end-of-file condition, it resolves to EOF
13
+ * (`null`).
14
+ *
15
+ * When `read()` encounters an error, it rejects with an error.
16
+ *
17
+ * Callers should always process the `n` > `0` bytes returned before
18
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
19
+ * happen after reading some bytes and also both of the allowed EOF
20
+ * behaviors.
21
+ *
22
+ * Implementations should not retain a reference to `p`.
23
+ *
24
+ * Use
25
+ * {@linkcode @std/io/to-iterator.ts?s=toIterator}
26
+ * to turn a {@linkcode Reader} into an {@linkcode AsyncIterableIterator}.
27
+ */
28
+ read(p: Uint8Array): Promise<number | null>;
29
+ }
30
+ /**
31
+ * An abstract interface which when implemented provides an interface to read bytes into an array buffer synchronously.
32
+ */
33
+ export interface ReaderSync {
34
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
35
+ * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
36
+ * encountered. Even if `read()` returns `n` < `p.byteLength`, it may use
37
+ * all of `p` as scratch space during the call. If some data is available
38
+ * but not `p.byteLength` bytes, `read()` conventionally returns what is
39
+ * available instead of waiting for more.
40
+ *
41
+ * When `readSync()` encounters end-of-file condition, it returns EOF
42
+ * (`null`).
43
+ *
44
+ * When `readSync()` encounters an error, it throws with an error.
45
+ *
46
+ * Callers should always process the `n` > `0` bytes returned before
47
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that happen
48
+ * after reading some bytes and also both of the allowed EOF behaviors.
49
+ *
50
+ * Implementations should not retain a reference to `p`.
51
+ *
52
+ * Use
53
+ * {@linkcode @std/io/to-iterator.ts?s=toIteratorSync}
54
+ * to turn a {@linkcode ReaderSync} into an {@linkcode IterableIterator}.
55
+ */
56
+ readSync(p: Uint8Array): number | null;
57
+ }
58
+ /**
59
+ * An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource asynchronously.
60
+ */
61
+ export interface Writer {
62
+ /** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
63
+ * resolves to the number of bytes written from `p` (`0` <= `n` <=
64
+ * `p.byteLength`) or reject with the error encountered that caused the
65
+ * write to stop early. `write()` must reject with a non-null error if
66
+ * would resolve to `n` < `p.byteLength`. `write()` must not modify the
67
+ * slice data, even temporarily.
68
+ *
69
+ * Implementations should not retain a reference to `p`.
70
+ */
71
+ write(p: Uint8Array): Promise<number>;
72
+ }
73
+ /**
74
+ * An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource synchronously.
75
+ */
76
+ export interface WriterSync {
77
+ /** Writes `p.byteLength` bytes from `p` to the underlying data
78
+ * stream. It returns the number of bytes written from `p` (`0` <= `n`
79
+ * <= `p.byteLength`) and any error encountered that caused the write to
80
+ * stop early. `writeSync()` must throw a non-null error if it returns `n` <
81
+ * `p.byteLength`. `writeSync()` must not modify the slice data, even
82
+ * temporarily.
83
+ *
84
+ * Implementations should not retain a reference to `p`.
85
+ */
86
+ writeSync(p: Uint8Array): number;
87
+ }
88
+ /**
89
+ * An abstract interface which when implemented provides an interface to close files/resources that were previously opened.
90
+ */
91
+ export interface Closer {
92
+ /** Closes the resource, "freeing" the backing file/resource. */
93
+ close(): void;
94
+ }
95
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.224.6/types.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;OAQG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AACD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;OAQG;IACH,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,3 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ export {};
@@ -0,0 +1,51 @@
1
+ import type { Writer, WriterSync } from "./types.js";
2
+ /**
3
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
4
+ *
5
+ * @example Writing to stdout
6
+ * ```ts no-assert
7
+ * import { writeAll } from "@std/io/write-all";
8
+ *
9
+ * const contentBytes = new TextEncoder().encode("Hello World");
10
+ * await writeAll(Deno.stdout, contentBytes);
11
+ * ```
12
+ *
13
+ * @example Writing to file
14
+ * ```ts no-eval no-assert
15
+ * import { writeAll } from "@std/io/write-all";
16
+ *
17
+ * const contentBytes = new TextEncoder().encode("Hello World");
18
+ * using file = await Deno.open('test.file', { write: true });
19
+ * await writeAll(file, contentBytes);
20
+ * ```
21
+ *
22
+ * @param writer The writer to write to
23
+ * @param data The data to write
24
+ */
25
+ export declare function writeAll(writer: Writer, data: Uint8Array): Promise<void>;
26
+ /**
27
+ * Synchronously write all the content of the array buffer (`arr`) to the
28
+ * writer (`w`).
29
+ *
30
+ * @example "riting to stdout
31
+ * ```ts no-assert
32
+ * import { writeAllSync } from "@std/io/write-all";
33
+ *
34
+ * const contentBytes = new TextEncoder().encode("Hello World");
35
+ * writeAllSync(Deno.stdout, contentBytes);
36
+ * ```
37
+ *
38
+ * @example Writing to file
39
+ * ```ts no-eval no-assert
40
+ * import { writeAllSync } from "@std/io/write-all";
41
+ *
42
+ * const contentBytes = new TextEncoder().encode("Hello World");
43
+ * using file = Deno.openSync("test.file", { write: true });
44
+ * writeAllSync(file, contentBytes);
45
+ * ```
46
+ *
47
+ * @param writer The writer to write to
48
+ * @param data The data to write
49
+ */
50
+ export declare function writeAllSync(writer: WriterSync, data: Uint8Array): void;
51
+ //# sourceMappingURL=write_all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write_all.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.224.6/write_all.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,iBAK9D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,QAKhE"}
@@ -0,0 +1,61 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
5
+ *
6
+ * @example Writing to stdout
7
+ * ```ts no-assert
8
+ * import { writeAll } from "@std/io/write-all";
9
+ *
10
+ * const contentBytes = new TextEncoder().encode("Hello World");
11
+ * await writeAll(Deno.stdout, contentBytes);
12
+ * ```
13
+ *
14
+ * @example Writing to file
15
+ * ```ts no-eval no-assert
16
+ * import { writeAll } from "@std/io/write-all";
17
+ *
18
+ * const contentBytes = new TextEncoder().encode("Hello World");
19
+ * using file = await Deno.open('test.file', { write: true });
20
+ * await writeAll(file, contentBytes);
21
+ * ```
22
+ *
23
+ * @param writer The writer to write to
24
+ * @param data The data to write
25
+ */
26
+ export async function writeAll(writer, data) {
27
+ let nwritten = 0;
28
+ while (nwritten < data.length) {
29
+ nwritten += await writer.write(data.subarray(nwritten));
30
+ }
31
+ }
32
+ /**
33
+ * Synchronously write all the content of the array buffer (`arr`) to the
34
+ * writer (`w`).
35
+ *
36
+ * @example "riting to stdout
37
+ * ```ts no-assert
38
+ * import { writeAllSync } from "@std/io/write-all";
39
+ *
40
+ * const contentBytes = new TextEncoder().encode("Hello World");
41
+ * writeAllSync(Deno.stdout, contentBytes);
42
+ * ```
43
+ *
44
+ * @example Writing to file
45
+ * ```ts no-eval no-assert
46
+ * import { writeAllSync } from "@std/io/write-all";
47
+ *
48
+ * const contentBytes = new TextEncoder().encode("Hello World");
49
+ * using file = Deno.openSync("test.file", { write: true });
50
+ * writeAllSync(file, contentBytes);
51
+ * ```
52
+ *
53
+ * @param writer The writer to write to
54
+ * @param data The data to write
55
+ */
56
+ export function writeAllSync(writer, data) {
57
+ let nwritten = 0;
58
+ while (nwritten < data.length) {
59
+ nwritten += writer.writeSync(data.subarray(nwritten));
60
+ }
61
+ }
@@ -0,0 +1,4 @@
1
+ import type { LogConfig } from "./logger.js";
2
+ export declare const DEFAULT_LEVEL = "INFO";
3
+ export declare const DEFAULT_CONFIG: LogConfig;
4
+ //# sourceMappingURL=_config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_config.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/log/0.224.6/_config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,eAAO,MAAM,cAAc,EAAE,SAW5B,CAAC"}