@mtkruto/node 0.66.1 → 0.66.3

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 (329) hide show
  1. package/esm/0_deps.d.ts +10 -9
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +10 -9
  4. package/esm/client/2_update_manager.d.ts.map +1 -1
  5. package/esm/client/2_update_manager.js +155 -1
  6. package/esm/client/5_client.d.ts +11 -0
  7. package/esm/client/5_client.d.ts.map +1 -1
  8. package/esm/client/5_client.js +11 -0
  9. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.d.ts.map +1 -1
  10. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.d.ts.map +1 -1
  11. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.js +2 -2
  12. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.d.ts.map +1 -1
  13. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.d.ts.map +1 -1
  14. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.d.ts.map +1 -1
  15. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.d.ts.map +1 -1
  16. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.d.ts.map +1 -1
  17. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.d.ts.map +1 -1
  18. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.d.ts.map +1 -1
  19. package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.d.ts.map +1 -1
  20. package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts.map +1 -1
  21. package/{script/deps/jsr.io/@std/bytes/1.0.5 → esm/deps/jsr.io/@std/bytes/1.0.6}/concat.d.ts +1 -1
  22. package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.d.ts.map +1 -1
  23. package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.d.ts +19 -0
  24. package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.d.ts.map +1 -0
  25. package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +550 -0
  26. package/esm/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.d.ts.map +1 -1
  27. package/esm/deps/jsr.io/@std/datetime/0.225.5/format.d.ts +70 -0
  28. package/esm/deps/jsr.io/@std/datetime/0.225.5/format.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/datetime/0.225.5/format.js +66 -0
  30. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.d.ts.map +1 -1
  31. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.d.ts.map +1 -1
  32. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.d.ts.map +1 -1
  33. package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts +2 -0
  34. package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.js +9 -0
  36. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.d.ts.map +1 -1
  37. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.d.ts.map +1 -1
  38. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.d.ts.map +1 -1
  39. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.d.ts.map +1 -1
  40. package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/basename.d.ts +3 -4
  42. package/esm/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +1 -0
  43. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/basename.js +2 -3
  44. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/extname.d.ts +3 -4
  45. package/esm/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +1 -0
  46. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/extname.js +2 -3
  47. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.d.ts.map +1 -1
  48. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/join.d.ts +4 -4
  49. package/esm/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/join.js +5 -5
  51. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.d.ts.map +1 -1
  52. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/posix/basename.d.ts +3 -4
  53. package/esm/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/basename.js +6 -3
  55. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/extname.d.ts +4 -4
  56. package/esm/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/extname.js +7 -3
  58. package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts +16 -0
  59. package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.js +21 -0
  61. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.d.ts.map +1 -1
  62. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/posix/join.d.ts +4 -6
  63. package/esm/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +1 -0
  64. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/join.js +10 -7
  65. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/normalize.d.ts +3 -6
  66. package/esm/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +1 -0
  67. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/normalize.js +6 -5
  68. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/posix/to_file_url.d.ts.map +1 -1
  69. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/to_file_url.d.ts.map +1 -1
  70. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/_util.d.ts.map +1 -1
  71. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/basename.d.ts +3 -4
  72. package/esm/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +1 -0
  73. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/basename.js +6 -3
  74. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/extname.d.ts +3 -6
  75. package/esm/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +1 -0
  76. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/extname.js +6 -5
  77. package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts +18 -0
  78. package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +1 -0
  79. package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.js +30 -0
  80. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/is_absolute.d.ts.map +1 -1
  81. package/esm/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts +18 -0
  82. package/esm/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +1 -0
  83. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/join.js +9 -6
  84. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/normalize.d.ts +3 -6
  85. package/esm/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +1 -0
  86. package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/normalize.js +6 -5
  87. package/{script/deps/jsr.io/@std/path/1.0.9 → esm/deps/jsr.io/@std/path/1.1.0}/windows/to_file_url.d.ts.map +1 -1
  88. package/esm/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +1 -0
  89. package/esm/deps/jsr.io/@std/streams/{1.0.9 → 1.0.10}/to_array_buffer.js +1 -1
  90. package/esm/session/2_session_encrypted.d.ts.map +1 -1
  91. package/esm/session/2_session_encrypted.js +8 -6
  92. package/esm/utilities/1_logger.d.ts.map +1 -1
  93. package/esm/utilities/1_logger.js +2 -1
  94. package/package.json +1 -1
  95. package/script/0_deps.d.ts +10 -9
  96. package/script/0_deps.d.ts.map +1 -1
  97. package/script/0_deps.js +12 -10
  98. package/script/client/2_update_manager.d.ts.map +1 -1
  99. package/script/client/2_update_manager.js +155 -1
  100. package/script/client/5_client.d.ts +11 -0
  101. package/script/client/5_client.d.ts.map +1 -1
  102. package/script/client/5_client.js +11 -0
  103. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.d.ts.map +1 -1
  104. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.d.ts.map +1 -1
  105. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.js +2 -2
  106. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.d.ts.map +1 -1
  107. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.d.ts.map +1 -1
  108. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.d.ts.map +1 -1
  109. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.d.ts.map +1 -1
  110. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.d.ts.map +1 -1
  111. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.d.ts.map +1 -1
  112. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.d.ts.map +1 -1
  113. package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.d.ts.map +1 -1
  114. package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts.map +1 -1
  115. package/{esm/deps/jsr.io/@std/bytes/1.0.5 → script/deps/jsr.io/@std/bytes/1.0.6}/concat.d.ts +1 -1
  116. package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.d.ts.map +1 -1
  117. package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.d.ts +19 -0
  118. package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.d.ts.map +1 -0
  119. package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +554 -0
  120. package/script/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.d.ts.map +1 -1
  121. package/script/deps/jsr.io/@std/datetime/0.225.5/format.d.ts +70 -0
  122. package/script/deps/jsr.io/@std/datetime/0.225.5/format.d.ts.map +1 -0
  123. package/script/deps/jsr.io/@std/datetime/0.225.5/format.js +69 -0
  124. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.d.ts.map +1 -1
  125. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.d.ts.map +1 -1
  126. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.d.ts.map +1 -1
  127. package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts +2 -0
  128. package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +1 -0
  129. package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.js +12 -0
  130. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.d.ts.map +1 -1
  131. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.d.ts.map +1 -1
  132. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.d.ts.map +1 -1
  133. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.d.ts.map +1 -1
  134. package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +1 -0
  135. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/basename.d.ts +3 -4
  136. package/script/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +1 -0
  137. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/basename.js +2 -3
  138. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/extname.d.ts +3 -4
  139. package/script/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +1 -0
  140. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/extname.js +2 -3
  141. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.d.ts.map +1 -1
  142. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/join.d.ts +4 -4
  143. package/script/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +1 -0
  144. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/join.js +5 -5
  145. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.d.ts.map +1 -1
  146. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/posix/basename.d.ts +3 -4
  147. package/script/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +1 -0
  148. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/basename.js +6 -3
  149. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/extname.d.ts +4 -4
  150. package/script/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +1 -0
  151. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/extname.js +7 -3
  152. package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts +16 -0
  153. package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +1 -0
  154. package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.js +24 -0
  155. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.d.ts.map +1 -1
  156. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/posix/join.d.ts +4 -6
  157. package/script/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +1 -0
  158. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/join.js +10 -7
  159. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/normalize.d.ts +3 -6
  160. package/script/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +1 -0
  161. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/normalize.js +6 -5
  162. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/posix/to_file_url.d.ts.map +1 -1
  163. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/to_file_url.d.ts.map +1 -1
  164. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/_util.d.ts.map +1 -1
  165. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/basename.d.ts +3 -4
  166. package/script/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +1 -0
  167. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/basename.js +6 -3
  168. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/extname.d.ts +3 -6
  169. package/script/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +1 -0
  170. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/extname.js +6 -5
  171. package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts +18 -0
  172. package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +1 -0
  173. package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.js +33 -0
  174. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/is_absolute.d.ts.map +1 -1
  175. package/script/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts +18 -0
  176. package/script/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +1 -0
  177. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/join.js +9 -6
  178. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/normalize.d.ts +3 -6
  179. package/script/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +1 -0
  180. package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/normalize.js +6 -5
  181. package/{esm/deps/jsr.io/@std/path/1.0.9 → script/deps/jsr.io/@std/path/1.1.0}/windows/to_file_url.d.ts.map +1 -1
  182. package/script/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +1 -0
  183. package/script/deps/jsr.io/@std/streams/{1.0.9 → 1.0.10}/to_array_buffer.js +1 -1
  184. package/script/session/2_session_encrypted.d.ts.map +1 -1
  185. package/script/session/2_session_encrypted.js +8 -6
  186. package/script/utilities/1_logger.d.ts.map +1 -1
  187. package/script/utilities/1_logger.js +2 -1
  188. package/esm/deps/jsr.io/@std/path/1.0.9/_os.d.ts.map +0 -1
  189. package/esm/deps/jsr.io/@std/path/1.0.9/basename.d.ts.map +0 -1
  190. package/esm/deps/jsr.io/@std/path/1.0.9/extname.d.ts.map +0 -1
  191. package/esm/deps/jsr.io/@std/path/1.0.9/join.d.ts.map +0 -1
  192. package/esm/deps/jsr.io/@std/path/1.0.9/posix/basename.d.ts.map +0 -1
  193. package/esm/deps/jsr.io/@std/path/1.0.9/posix/extname.d.ts.map +0 -1
  194. package/esm/deps/jsr.io/@std/path/1.0.9/posix/join.d.ts.map +0 -1
  195. package/esm/deps/jsr.io/@std/path/1.0.9/posix/normalize.d.ts.map +0 -1
  196. package/esm/deps/jsr.io/@std/path/1.0.9/windows/basename.d.ts.map +0 -1
  197. package/esm/deps/jsr.io/@std/path/1.0.9/windows/extname.d.ts.map +0 -1
  198. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts +0 -20
  199. package/esm/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts.map +0 -1
  200. package/esm/deps/jsr.io/@std/path/1.0.9/windows/normalize.d.ts.map +0 -1
  201. package/esm/deps/jsr.io/@std/streams/1.0.9/to_array_buffer.d.ts.map +0 -1
  202. package/script/deps/jsr.io/@std/path/1.0.9/_os.d.ts.map +0 -1
  203. package/script/deps/jsr.io/@std/path/1.0.9/basename.d.ts.map +0 -1
  204. package/script/deps/jsr.io/@std/path/1.0.9/extname.d.ts.map +0 -1
  205. package/script/deps/jsr.io/@std/path/1.0.9/join.d.ts.map +0 -1
  206. package/script/deps/jsr.io/@std/path/1.0.9/posix/basename.d.ts.map +0 -1
  207. package/script/deps/jsr.io/@std/path/1.0.9/posix/extname.d.ts.map +0 -1
  208. package/script/deps/jsr.io/@std/path/1.0.9/posix/join.d.ts.map +0 -1
  209. package/script/deps/jsr.io/@std/path/1.0.9/posix/normalize.d.ts.map +0 -1
  210. package/script/deps/jsr.io/@std/path/1.0.9/windows/basename.d.ts.map +0 -1
  211. package/script/deps/jsr.io/@std/path/1.0.9/windows/extname.d.ts.map +0 -1
  212. package/script/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts +0 -20
  213. package/script/deps/jsr.io/@std/path/1.0.9/windows/join.d.ts.map +0 -1
  214. package/script/deps/jsr.io/@std/path/1.0.9/windows/normalize.d.ts.map +0 -1
  215. package/script/deps/jsr.io/@std/streams/1.0.9/to_array_buffer.d.ts.map +0 -1
  216. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.d.ts +0 -0
  217. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.js +0 -0
  218. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.d.ts +0 -0
  219. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.d.ts +0 -0
  220. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.js +0 -0
  221. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.d.ts +0 -0
  222. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.js +0 -0
  223. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.d.ts +0 -0
  224. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.js +0 -0
  225. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.d.ts +0 -0
  226. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.js +0 -0
  227. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.d.ts +0 -0
  228. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.js +0 -0
  229. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.d.ts +0 -0
  230. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.js +0 -0
  231. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.d.ts +0 -0
  232. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.js +0 -0
  233. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.d.ts +0 -0
  234. /package/esm/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.js +0 -0
  235. /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts +0 -0
  236. /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.js +0 -0
  237. /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.js +0 -0
  238. /package/esm/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.d.ts +0 -0
  239. /package/esm/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.js +0 -0
  240. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.d.ts +0 -0
  241. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.js +0 -0
  242. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.d.ts +0 -0
  243. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.js +0 -0
  244. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.d.ts +0 -0
  245. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.js +0 -0
  246. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.d.ts +0 -0
  247. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.js +0 -0
  248. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.d.ts +0 -0
  249. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.js +0 -0
  250. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.d.ts +0 -0
  251. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.js +0 -0
  252. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.d.ts +0 -0
  253. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.js +0 -0
  254. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_os.d.ts +0 -0
  255. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_os.js +0 -0
  256. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.d.ts +0 -0
  257. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.js +0 -0
  258. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.d.ts +0 -0
  259. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.js +0 -0
  260. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.d.ts +0 -0
  261. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.js +0 -0
  262. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/to_file_url.d.ts +0 -0
  263. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/to_file_url.js +0 -0
  264. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/to_file_url.d.ts +0 -0
  265. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/to_file_url.js +0 -0
  266. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/_util.d.ts +0 -0
  267. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/_util.js +0 -0
  268. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/is_absolute.d.ts +0 -0
  269. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/is_absolute.js +0 -0
  270. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/to_file_url.d.ts +0 -0
  271. /package/esm/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/to_file_url.js +0 -0
  272. /package/esm/deps/jsr.io/@std/streams/{1.0.9 → 1.0.10}/to_array_buffer.d.ts +0 -0
  273. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.d.ts +0 -0
  274. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/_util.js +0 -0
  275. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/abortable.d.ts +0 -0
  276. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.d.ts +0 -0
  277. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/deadline.js +0 -0
  278. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.d.ts +0 -0
  279. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/debounce.js +0 -0
  280. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.d.ts +0 -0
  281. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/delay.js +0 -0
  282. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.d.ts +0 -0
  283. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mod.js +0 -0
  284. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.d.ts +0 -0
  285. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/mux_async_iterator.js +0 -0
  286. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.d.ts +0 -0
  287. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/pool.js +0 -0
  288. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.d.ts +0 -0
  289. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/retry.js +0 -0
  290. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.d.ts +0 -0
  291. /package/script/deps/jsr.io/@std/async/{1.0.12 → 1.0.13}/tee.js +0 -0
  292. /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts +0 -0
  293. /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.js +0 -0
  294. /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.js +0 -0
  295. /package/script/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.d.ts +0 -0
  296. /package/script/deps/jsr.io/@std/datetime/{0.225.4 → 0.225.5}/constants.js +0 -0
  297. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.d.ts +0 -0
  298. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/assert_path.js +0 -0
  299. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.d.ts +0 -0
  300. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/basename.js +0 -0
  301. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.d.ts +0 -0
  302. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/constants.js +0 -0
  303. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.d.ts +0 -0
  304. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize.js +0 -0
  305. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.d.ts +0 -0
  306. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/normalize_string.js +0 -0
  307. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.d.ts +0 -0
  308. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/strip_trailing_separators.js +0 -0
  309. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.d.ts +0 -0
  310. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_common/to_file_url.js +0 -0
  311. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_os.d.ts +0 -0
  312. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/_os.js +0 -0
  313. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.d.ts +0 -0
  314. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/is_absolute.js +0 -0
  315. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.d.ts +0 -0
  316. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/_util.js +0 -0
  317. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.d.ts +0 -0
  318. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/is_absolute.js +0 -0
  319. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/to_file_url.d.ts +0 -0
  320. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/posix/to_file_url.js +0 -0
  321. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/to_file_url.d.ts +0 -0
  322. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/to_file_url.js +0 -0
  323. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/_util.d.ts +0 -0
  324. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/_util.js +0 -0
  325. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/is_absolute.d.ts +0 -0
  326. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/is_absolute.js +0 -0
  327. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/to_file_url.d.ts +0 -0
  328. /package/script/deps/jsr.io/@std/path/{1.0.9 → 1.1.0}/windows/to_file_url.js +0 -0
  329. /package/script/deps/jsr.io/@std/streams/{1.0.9 → 1.0.10}/to_array_buffer.d.ts +0 -0
@@ -0,0 +1,554 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
5
+ if (kind === "m") throw new TypeError("Private method is not writable");
6
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
8
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9
+ };
10
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14
+ };
15
+ var _DateTimeFormatter_formatParts;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DateTimeFormatter = void 0;
18
+ function digits(value, count = 2) {
19
+ return String(value).padStart(count, "0");
20
+ }
21
+ const QUOTED_LITERAL_REGEXP = /^(')(?<value>\\.|[^\']*)\1/;
22
+ const LITERAL_REGEXP = /^(?<value>.+?\s*)/;
23
+ const SYMBOL_REGEXP = /^(?<symbol>([a-zA-Z])\2*)/;
24
+ // according to unicode symbols (http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
25
+ function formatToFormatParts(format) {
26
+ const formatParts = [];
27
+ let index = 0;
28
+ while (index < format.length) {
29
+ const substring = format.slice(index);
30
+ const symbol = SYMBOL_REGEXP.exec(substring)?.groups?.symbol;
31
+ switch (symbol) {
32
+ case "yyyy":
33
+ formatParts.push({ type: "year", value: "numeric" });
34
+ index += symbol.length;
35
+ continue;
36
+ case "yy":
37
+ formatParts.push({ type: "year", value: "2-digit" });
38
+ index += symbol.length;
39
+ continue;
40
+ case "MM":
41
+ formatParts.push({ type: "month", value: "2-digit" });
42
+ index += symbol.length;
43
+ continue;
44
+ case "M":
45
+ formatParts.push({ type: "month", value: "numeric" });
46
+ index += symbol.length;
47
+ continue;
48
+ case "dd":
49
+ formatParts.push({ type: "day", value: "2-digit" });
50
+ index += symbol.length;
51
+ continue;
52
+ case "d":
53
+ formatParts.push({ type: "day", value: "numeric" });
54
+ index += symbol.length;
55
+ continue;
56
+ case "HH":
57
+ formatParts.push({ type: "hour", value: "2-digit" });
58
+ index += symbol.length;
59
+ continue;
60
+ case "H":
61
+ formatParts.push({ type: "hour", value: "numeric" });
62
+ index += symbol.length;
63
+ continue;
64
+ case "hh":
65
+ formatParts.push({ type: "hour", value: "2-digit", hour12: true });
66
+ index += symbol.length;
67
+ continue;
68
+ case "h":
69
+ formatParts.push({ type: "hour", value: "numeric", hour12: true });
70
+ index += symbol.length;
71
+ continue;
72
+ case "mm":
73
+ formatParts.push({ type: "minute", value: "2-digit" });
74
+ index += symbol.length;
75
+ continue;
76
+ case "m":
77
+ formatParts.push({ type: "minute", value: "numeric" });
78
+ index += symbol.length;
79
+ continue;
80
+ case "ss":
81
+ formatParts.push({ type: "second", value: "2-digit" });
82
+ index += symbol.length;
83
+ continue;
84
+ case "s":
85
+ formatParts.push({ type: "second", value: "numeric" });
86
+ index += symbol.length;
87
+ continue;
88
+ case "SSS":
89
+ formatParts.push({ type: "fractionalSecond", value: 3 });
90
+ index += symbol.length;
91
+ continue;
92
+ case "SS":
93
+ formatParts.push({ type: "fractionalSecond", value: 2 });
94
+ index += symbol.length;
95
+ continue;
96
+ case "S":
97
+ formatParts.push({ type: "fractionalSecond", value: 1 });
98
+ index += symbol.length;
99
+ continue;
100
+ case "a":
101
+ formatParts.push({ type: "dayPeriod", value: 1 });
102
+ index += symbol.length;
103
+ continue;
104
+ }
105
+ const quotedLiteralMatch = QUOTED_LITERAL_REGEXP.exec(substring);
106
+ if (quotedLiteralMatch) {
107
+ const value = quotedLiteralMatch.groups.value;
108
+ formatParts.push({ type: "literal", value });
109
+ index += quotedLiteralMatch[0].length;
110
+ continue;
111
+ }
112
+ const literalGroups = LITERAL_REGEXP.exec(substring).groups;
113
+ const value = literalGroups.value;
114
+ formatParts.push({ type: "literal", value });
115
+ index += value.length;
116
+ }
117
+ return formatParts;
118
+ }
119
+ function sortDateTimeFormatParts(parts) {
120
+ let result = [];
121
+ const typeArray = [
122
+ "year",
123
+ "month",
124
+ "day",
125
+ "hour",
126
+ "minute",
127
+ "second",
128
+ "fractionalSecond",
129
+ ];
130
+ for (const type of typeArray) {
131
+ const current = parts.findIndex((el) => el.type === type);
132
+ if (current !== -1) {
133
+ result = result.concat(parts.splice(current, 1));
134
+ }
135
+ }
136
+ result = result.concat(parts);
137
+ return result;
138
+ }
139
+ class DateTimeFormatter {
140
+ constructor(formatString) {
141
+ _DateTimeFormatter_formatParts.set(this, void 0);
142
+ __classPrivateFieldSet(this, _DateTimeFormatter_formatParts, formatToFormatParts(formatString), "f");
143
+ }
144
+ format(date, options = {}) {
145
+ let string = "";
146
+ const utc = options.timeZone === "UTC";
147
+ for (const part of __classPrivateFieldGet(this, _DateTimeFormatter_formatParts, "f")) {
148
+ const type = part.type;
149
+ switch (type) {
150
+ case "year": {
151
+ const value = utc ? date.getUTCFullYear() : date.getFullYear();
152
+ switch (part.value) {
153
+ case "numeric": {
154
+ string += value;
155
+ break;
156
+ }
157
+ case "2-digit": {
158
+ string += digits(value, 2).slice(-2);
159
+ break;
160
+ }
161
+ default:
162
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
163
+ }
164
+ break;
165
+ }
166
+ case "month": {
167
+ const value = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
168
+ switch (part.value) {
169
+ case "numeric": {
170
+ string += value;
171
+ break;
172
+ }
173
+ case "2-digit": {
174
+ string += digits(value, 2);
175
+ break;
176
+ }
177
+ default:
178
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
179
+ }
180
+ break;
181
+ }
182
+ case "day": {
183
+ const value = utc ? date.getUTCDate() : date.getDate();
184
+ switch (part.value) {
185
+ case "numeric": {
186
+ string += value;
187
+ break;
188
+ }
189
+ case "2-digit": {
190
+ string += digits(value, 2);
191
+ break;
192
+ }
193
+ default:
194
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
195
+ }
196
+ break;
197
+ }
198
+ case "hour": {
199
+ let value = utc ? date.getUTCHours() : date.getHours();
200
+ if (part.hour12) {
201
+ if (value === 0)
202
+ value = 12;
203
+ else if (value > 12)
204
+ value -= 12;
205
+ }
206
+ switch (part.value) {
207
+ case "numeric": {
208
+ string += value;
209
+ break;
210
+ }
211
+ case "2-digit": {
212
+ string += digits(value, 2);
213
+ break;
214
+ }
215
+ default:
216
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
217
+ }
218
+ break;
219
+ }
220
+ case "minute": {
221
+ const value = utc ? date.getUTCMinutes() : date.getMinutes();
222
+ switch (part.value) {
223
+ case "numeric": {
224
+ string += value;
225
+ break;
226
+ }
227
+ case "2-digit": {
228
+ string += digits(value, 2);
229
+ break;
230
+ }
231
+ default:
232
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
233
+ }
234
+ break;
235
+ }
236
+ case "second": {
237
+ const value = utc ? date.getUTCSeconds() : date.getSeconds();
238
+ switch (part.value) {
239
+ case "numeric": {
240
+ string += value;
241
+ break;
242
+ }
243
+ case "2-digit": {
244
+ string += digits(value, 2);
245
+ break;
246
+ }
247
+ default:
248
+ throw new Error(`FormatterError: value "${part.value}" is not supported`);
249
+ }
250
+ break;
251
+ }
252
+ case "fractionalSecond": {
253
+ const value = utc
254
+ ? date.getUTCMilliseconds()
255
+ : date.getMilliseconds();
256
+ string += digits(value, 3).slice(0, Number(part.value));
257
+ break;
258
+ }
259
+ // FIXME(bartlomieju)
260
+ case "timeZoneName": {
261
+ // string += utc ? "Z" : part.value
262
+ break;
263
+ }
264
+ case "dayPeriod": {
265
+ string += date.getHours() >= 12 ? "PM" : "AM";
266
+ break;
267
+ }
268
+ case "literal": {
269
+ string += part.value;
270
+ break;
271
+ }
272
+ default:
273
+ throw new Error(`FormatterError: { ${part.type} ${part.value} }`);
274
+ }
275
+ }
276
+ return string;
277
+ }
278
+ formatToParts(string) {
279
+ const parts = [];
280
+ for (const part of __classPrivateFieldGet(this, _DateTimeFormatter_formatParts, "f")) {
281
+ const type = part.type;
282
+ let length = 0;
283
+ let value = "";
284
+ switch (part.type) {
285
+ case "year": {
286
+ switch (part.value) {
287
+ case "numeric": {
288
+ value = /^\d{4}/.exec(string)?.[0];
289
+ length = value?.length;
290
+ break;
291
+ }
292
+ case "2-digit": {
293
+ value = /^\d{2}/.exec(string)?.[0];
294
+ length = value?.length;
295
+ break;
296
+ }
297
+ default:
298
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
299
+ }
300
+ break;
301
+ }
302
+ case "month": {
303
+ switch (part.value) {
304
+ case "numeric": {
305
+ value = /^\d{1,2}/.exec(string)?.[0];
306
+ length = value?.length;
307
+ break;
308
+ }
309
+ case "2-digit": {
310
+ value = /^\d{2}/.exec(string)?.[0];
311
+ length = value?.length;
312
+ break;
313
+ }
314
+ case "narrow": {
315
+ value = /^[a-zA-Z]+/.exec(string)?.[0];
316
+ length = value?.length;
317
+ break;
318
+ }
319
+ case "short": {
320
+ value = /^[a-zA-Z]+/.exec(string)?.[0];
321
+ length = value?.length;
322
+ break;
323
+ }
324
+ case "long": {
325
+ value = /^[a-zA-Z]+/.exec(string)?.[0];
326
+ length = value?.length;
327
+ break;
328
+ }
329
+ default:
330
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
331
+ }
332
+ break;
333
+ }
334
+ case "day": {
335
+ switch (part.value) {
336
+ case "numeric": {
337
+ value = /^\d{1,2}/.exec(string)?.[0];
338
+ length = value?.length;
339
+ break;
340
+ }
341
+ case "2-digit": {
342
+ value = /^\d{2}/.exec(string)?.[0];
343
+ length = value?.length;
344
+ break;
345
+ }
346
+ default:
347
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
348
+ }
349
+ break;
350
+ }
351
+ case "hour": {
352
+ switch (part.value) {
353
+ case "numeric": {
354
+ value = /^\d{1,2}/.exec(string)?.[0];
355
+ length = value?.length;
356
+ if (part.hour12 && parseInt(value) > 12) {
357
+ // TODO(iuioiua): Replace with throwing an error
358
+ // deno-lint-ignore no-console
359
+ console.error(`Trying to parse hour greater than 12, use 'H' instead of 'h'.`);
360
+ }
361
+ break;
362
+ }
363
+ case "2-digit": {
364
+ value = /^\d{2}/.exec(string)?.[0];
365
+ length = value?.length;
366
+ if (part.hour12 && parseInt(value) > 12) {
367
+ // TODO(iuioiua): Replace with throwing an error
368
+ // deno-lint-ignore no-console
369
+ console.error(`Trying to parse hour greater than 12, use 'HH' instead of 'hh'.`);
370
+ }
371
+ break;
372
+ }
373
+ default:
374
+ // TODO(iuioiua): Correct error type and message
375
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
376
+ }
377
+ break;
378
+ }
379
+ case "minute": {
380
+ switch (part.value) {
381
+ case "numeric": {
382
+ value = /^\d{1,2}/.exec(string)?.[0];
383
+ length = value?.length;
384
+ break;
385
+ }
386
+ case "2-digit": {
387
+ value = /^\d{2}/.exec(string)?.[0];
388
+ length = value?.length;
389
+ break;
390
+ }
391
+ default:
392
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
393
+ }
394
+ break;
395
+ }
396
+ case "second": {
397
+ switch (part.value) {
398
+ case "numeric": {
399
+ value = /^\d{1,2}/.exec(string)?.[0];
400
+ length = value?.length;
401
+ break;
402
+ }
403
+ case "2-digit": {
404
+ value = /^\d{2}/.exec(string)?.[0];
405
+ length = value?.length;
406
+ break;
407
+ }
408
+ default:
409
+ throw new Error(`ParserError: value "${part.value}" is not supported`);
410
+ }
411
+ break;
412
+ }
413
+ case "fractionalSecond": {
414
+ value = new RegExp(`^\\d{${part.value}}`).exec(string)?.[0];
415
+ length = value?.length;
416
+ break;
417
+ }
418
+ case "timeZoneName": {
419
+ value = part.value;
420
+ length = value?.length;
421
+ break;
422
+ }
423
+ case "dayPeriod": {
424
+ value = /^[AP](?:\.M\.|M\.?)/i.exec(string)?.[0];
425
+ switch (value.toUpperCase()) {
426
+ case "AM":
427
+ value = "AM";
428
+ length = 2;
429
+ break;
430
+ case "AM.":
431
+ value = "AM";
432
+ length = 3;
433
+ break;
434
+ case "A.M.":
435
+ value = "AM";
436
+ length = 4;
437
+ break;
438
+ case "PM":
439
+ value = "PM";
440
+ length = 2;
441
+ break;
442
+ case "PM.":
443
+ value = "PM";
444
+ length = 3;
445
+ break;
446
+ case "P.M.":
447
+ value = "PM";
448
+ length = 4;
449
+ break;
450
+ default:
451
+ throw new Error(`DayPeriod '${value}' is not supported.`);
452
+ }
453
+ break;
454
+ }
455
+ case "literal": {
456
+ if (!string.startsWith(part.value)) {
457
+ throw new Error(`Literal "${part.value}" not found "${string.slice(0, 25)}"`);
458
+ }
459
+ value = part.value;
460
+ length = value?.length;
461
+ break;
462
+ }
463
+ default:
464
+ throw new Error(`Cannot format the date, the value (${part.value}) of the type (${part.type}) is given`);
465
+ }
466
+ if (!value) {
467
+ throw new Error(`Cannot format value: The value is not valid for part { ${type} ${value} } ${string.slice(0, 25)}`);
468
+ }
469
+ parts.push({ type, value });
470
+ string = string.slice(length);
471
+ }
472
+ if (string.length) {
473
+ throw new Error(`datetime string was not fully parsed! ${string.slice(0, 25)}`);
474
+ }
475
+ return parts;
476
+ }
477
+ partsToDate(parts) {
478
+ parts = sortDateTimeFormatParts(parts);
479
+ const date = new Date();
480
+ const utc = parts.find((part) => part.type === "timeZoneName" && part.value === "UTC");
481
+ const dayPart = parts.find((part) => part.type === "day");
482
+ utc ? date.setUTCHours(0, 0, 0, 0) : date.setHours(0, 0, 0, 0);
483
+ for (const part of parts) {
484
+ switch (part.type) {
485
+ case "year": {
486
+ const value = Number(part.value.padStart(4, "20"));
487
+ utc ? date.setUTCFullYear(value) : date.setFullYear(value);
488
+ break;
489
+ }
490
+ case "month": {
491
+ const value = Number(part.value) - 1;
492
+ if (dayPart) {
493
+ utc
494
+ ? date.setUTCMonth(value, Number(dayPart.value))
495
+ : date.setMonth(value, Number(dayPart.value));
496
+ }
497
+ else {
498
+ utc ? date.setUTCMonth(value) : date.setMonth(value);
499
+ }
500
+ break;
501
+ }
502
+ case "day": {
503
+ const value = Number(part.value);
504
+ utc ? date.setUTCDate(value) : date.setDate(value);
505
+ break;
506
+ }
507
+ case "hour": {
508
+ let value = Number(part.value);
509
+ const dayPeriod = parts.find((part) => part.type === "dayPeriod");
510
+ if (dayPeriod) {
511
+ switch (dayPeriod.value.toUpperCase()) {
512
+ case "AM":
513
+ case "AM.":
514
+ case "A.M.":
515
+ // ignore
516
+ break;
517
+ case "PM":
518
+ case "PM.":
519
+ case "P.M.":
520
+ value += 12;
521
+ break;
522
+ default:
523
+ throw new Error(`dayPeriod '${dayPeriod.value}' is not supported.`);
524
+ }
525
+ }
526
+ utc ? date.setUTCHours(value) : date.setHours(value);
527
+ break;
528
+ }
529
+ case "minute": {
530
+ const value = Number(part.value);
531
+ utc ? date.setUTCMinutes(value) : date.setMinutes(value);
532
+ break;
533
+ }
534
+ case "second": {
535
+ const value = Number(part.value);
536
+ utc ? date.setUTCSeconds(value) : date.setSeconds(value);
537
+ break;
538
+ }
539
+ case "fractionalSecond": {
540
+ const value = Number(part.value);
541
+ utc ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);
542
+ break;
543
+ }
544
+ }
545
+ }
546
+ return date;
547
+ }
548
+ parse(string) {
549
+ const parts = this.formatToParts(string);
550
+ return this.partsToDate(parts);
551
+ }
552
+ }
553
+ exports.DateTimeFormatter = DateTimeFormatter;
554
+ _DateTimeFormatter_formatParts = new WeakMap();
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/datetime/0.225.4/constants.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,OAAM,CAAC;AAC1B;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,MAAoB,CAAC;AAC1C;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,MAAoB,CAAC;AACxC;;;;;;;;;GASG;AACH,eAAO,MAAM,GAAG,EAAE,MAAkB,CAAC;AACrC;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,MAAgB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/datetime/0.225.5/constants.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,OAAM,CAAC;AAC1B;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,MAAoB,CAAC;AAC1C;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,MAAoB,CAAC;AACxC;;;;;;;;;GASG;AACH,eAAO,MAAM,GAAG,EAAE,MAAkB,CAAC;AACrC;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,MAAgB,CAAC"}
@@ -0,0 +1,70 @@
1
+ /** Options for {@linkcode format}. */
2
+ export interface FormatOptions {
3
+ /**
4
+ * The timezone the formatted date should be in.
5
+ *
6
+ * @default {undefined}
7
+ */
8
+ timeZone?: "UTC";
9
+ }
10
+ /**
11
+ * Formats a date to a string with the specified format.
12
+ *
13
+ * The following symbols from
14
+ * {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table | unicode LDML}
15
+ * are supported:
16
+ * - `yyyy` - numeric year
17
+ * - `yy` - 2-digit year
18
+ * - `M` - numeric month
19
+ * - `MM` - 2-digit month
20
+ * - `d` - numeric day
21
+ * - `dd` - 2-digit day
22
+ * - `H` - numeric hour (0-23 hours)
23
+ * - `HH` - 2-digit hour (00-23 hours)
24
+ * - `h` - numeric hour (1-12 hours)
25
+ * - `hh` - 2-digit hour (01-12 hours)
26
+ * - `m` - numeric minute
27
+ * - `mm` - 2-digit minute
28
+ * - `s` - numeric second
29
+ * - `ss` - 2-digit second
30
+ * - `S` - 1-digit fractional second
31
+ * - `SS` - 2-digit fractional second
32
+ * - `SSS` - 3-digit fractional second
33
+ * - `a` - dayPeriod, either `AM` or `PM`
34
+ * - `'foo'` - quoted literal
35
+ * - `./-` - unquoted literal
36
+ *
37
+ * @param date The date to be formatted.
38
+ * @param formatString The date time string format.
39
+ * @param options The options to customize the formatting of the date.
40
+ * @return The formatted date string.
41
+ *
42
+ * @example Basic usage
43
+ * ```ts ignore
44
+ * import { format } from "@std/datetime/format";
45
+ * import { assertEquals } from "@std/assert";
46
+ *
47
+ * const date = new Date(2019, 0, 20, 16, 34, 23, 123);
48
+ *
49
+ * assertEquals(format(date, "dd-MM-yyyy"), "20-01-2019");
50
+ *
51
+ * assertEquals(format(date, "MM-dd-yyyy HH:mm:ss.SSS"), "01-20-2019 16:34:23.123");
52
+ *
53
+ * assertEquals(format(date, "'today:' yyyy-MM-dd"), "today: 2019-01-20");
54
+ * ```
55
+ *
56
+ * @example UTC formatting
57
+ *
58
+ * Enable UTC formatting by setting the `timeZone` option to `"UTC"`.
59
+ *
60
+ * ```ts ignore
61
+ * import { format } from "@std/datetime/format";
62
+ * import { assertEquals } from "@std/assert";
63
+ *
64
+ * const date = new Date(2019, 0, 20, 16, 34, 23, 123);
65
+ *
66
+ * assertEquals(format(date, "yyyy-MM-dd HH:mm:ss", { timeZone: "UTC" }), "2019-01-20 05:34:23");
67
+ * ```
68
+ */
69
+ export declare function format(date: Date, formatString: string, options?: FormatOptions): string;
70
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/datetime/0.225.5/format.ts"],"names":[],"mappings":"AAKA,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAGR"}