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