@skmtc/core 0.0.659 → 0.0.661

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 (205) hide show
  1. package/esm/context/CoreContext.d.ts +1 -1
  2. package/esm/context/ParseContext.js +1 -1
  3. package/esm/context/RenderContext.d.ts +1 -1
  4. package/esm/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.d.ts.map +1 -1
  5. package/esm/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.js +1 -1
  6. package/esm/deps/jsr.io/@std/fs/1.0.18/exists.d.ts.map +1 -0
  7. package/esm/deps/jsr.io/@std/fs/{1.0.4 → 1.0.18}/exists.js +1 -1
  8. package/esm/deps/jsr.io/@std/log/0.224.6/console_handler.js +1 -1
  9. package/esm/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +1 -1
  10. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.d.ts.map +1 -1
  11. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.js +1 -1
  12. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_dumper_state.d.ts +8 -1
  13. package/esm/deps/jsr.io/@std/yaml/1.0.7/_dumper_state.d.ts.map +1 -0
  14. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_dumper_state.js +14 -5
  15. package/{script/deps/jsr.io/@std/yaml/1.0.5 → esm/deps/jsr.io/@std/yaml/1.0.7}/_loader_state.d.ts +6 -5
  16. package/esm/deps/jsr.io/@std/yaml/1.0.7/_loader_state.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_loader_state.js +113 -122
  18. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.d.ts.map +1 -1
  19. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.js +1 -6
  20. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.d.ts.map +1 -1
  21. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.d.ts.map +1 -1
  22. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.js +1 -1
  23. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.d.ts.map +1 -1
  24. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.js +1 -1
  25. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.d.ts.map +1 -1
  26. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.js +1 -1
  27. package/{script/deps/jsr.io/@std/yaml/1.0.5 → esm/deps/jsr.io/@std/yaml/1.0.7}/_type/map.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/map.js +1 -1
  29. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.d.ts.map +1 -1
  30. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.js +1 -1
  31. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.d.ts.map +1 -1
  32. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.js +1 -1
  33. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.d.ts.map +1 -1
  34. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.js +1 -1
  35. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.d.ts.map +1 -1
  36. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.js +1 -1
  37. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.d.ts.map +1 -1
  38. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.js +1 -1
  39. package/{script/deps/jsr.io/@std/yaml/1.0.5 → esm/deps/jsr.io/@std/yaml/1.0.7}/_type/seq.d.ts.map +1 -1
  40. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/seq.js +1 -1
  41. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.d.ts.map +1 -1
  42. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.js +1 -1
  43. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.d.ts.map +1 -1
  44. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.js +1 -1
  45. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.d.ts.map +1 -1
  46. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.js +1 -1
  47. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.d.ts.map +1 -1
  48. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.js +1 -1
  49. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.d.ts.map +1 -1
  50. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.js +1 -1
  51. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.d.ts.map +1 -1
  52. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.js +1 -1
  53. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.d.ts.map +1 -1
  54. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.js +1 -1
  55. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.d.ts.map +1 -1
  56. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.js +1 -1
  57. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.d.ts.map +1 -1
  58. package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.js +1 -1
  59. package/esm/dsl/model/toModelBase.d.ts +2 -2
  60. package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
  61. package/esm/dsl/operation/toOperationBase.d.ts +2 -2
  62. package/esm/dsl/operation/toOperationEntry.d.ts +1 -1
  63. package/esm/dsl/operation/toOperationEntry.d.ts.map +1 -1
  64. package/esm/dsl/operation/toOperationEntry.js +1 -1
  65. package/esm/mod.d.ts +1 -1
  66. package/esm/mod.js +1 -1
  67. package/esm/run/toArtifacts.d.ts +1 -1
  68. package/esm/run/toV3JsonDocument.js +1 -1
  69. package/esm/types/CustomValue.d.ts +1 -0
  70. package/esm/types/CustomValue.d.ts.map +1 -1
  71. package/esm/types/CustomValue.js +1 -0
  72. package/esm/types/{prettierConfig.d.ts → PrettierConfig.d.ts} +2 -1
  73. package/esm/types/PrettierConfig.d.ts.map +1 -0
  74. package/esm/types/{prettierConfig.js → PrettierConfig.js} +1 -0
  75. package/package.json +11 -2
  76. package/script/context/CoreContext.d.ts +1 -1
  77. package/script/context/ParseContext.js +1 -1
  78. package/script/context/RenderContext.d.ts +1 -1
  79. package/script/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.d.ts.map +1 -1
  80. package/script/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.js +1 -1
  81. package/script/deps/jsr.io/@std/fs/1.0.18/exists.d.ts.map +1 -0
  82. package/script/deps/jsr.io/@std/fs/{1.0.4 → 1.0.18}/exists.js +1 -1
  83. package/script/deps/jsr.io/@std/log/0.224.6/console_handler.js +1 -1
  84. package/script/deps/jsr.io/@std/log/0.224.6/rotating_file_handler.js +1 -1
  85. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.d.ts.map +1 -1
  86. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.js +1 -1
  87. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_dumper_state.d.ts +8 -1
  88. package/script/deps/jsr.io/@std/yaml/1.0.7/_dumper_state.d.ts.map +1 -0
  89. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_dumper_state.js +14 -5
  90. package/{esm/deps/jsr.io/@std/yaml/1.0.5 → script/deps/jsr.io/@std/yaml/1.0.7}/_loader_state.d.ts +6 -5
  91. package/script/deps/jsr.io/@std/yaml/1.0.7/_loader_state.d.ts.map +1 -0
  92. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_loader_state.js +113 -122
  93. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.d.ts.map +1 -1
  94. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.js +1 -6
  95. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.d.ts.map +1 -1
  96. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.d.ts.map +1 -1
  97. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.js +1 -1
  98. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.d.ts.map +1 -1
  99. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.js +1 -1
  100. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.d.ts.map +1 -1
  101. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.js +1 -1
  102. package/{esm/deps/jsr.io/@std/yaml/1.0.5 → script/deps/jsr.io/@std/yaml/1.0.7}/_type/map.d.ts.map +1 -1
  103. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/map.js +1 -1
  104. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.d.ts.map +1 -1
  105. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.js +1 -1
  106. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.d.ts.map +1 -1
  107. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.js +1 -1
  108. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.d.ts.map +1 -1
  109. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.js +1 -1
  110. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.d.ts.map +1 -1
  111. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.js +1 -1
  112. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.d.ts.map +1 -1
  113. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.js +1 -1
  114. package/{esm/deps/jsr.io/@std/yaml/1.0.5 → script/deps/jsr.io/@std/yaml/1.0.7}/_type/seq.d.ts.map +1 -1
  115. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/seq.js +1 -1
  116. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.d.ts.map +1 -1
  117. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.js +1 -1
  118. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.d.ts.map +1 -1
  119. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.js +1 -1
  120. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.d.ts.map +1 -1
  121. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.js +1 -1
  122. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.d.ts.map +1 -1
  123. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.js +1 -1
  124. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.d.ts.map +1 -1
  125. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.js +1 -1
  126. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.d.ts.map +1 -1
  127. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.js +1 -1
  128. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.d.ts.map +1 -1
  129. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.js +1 -1
  130. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.d.ts.map +1 -1
  131. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.js +1 -1
  132. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.d.ts.map +1 -1
  133. package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.js +1 -1
  134. package/script/dsl/model/toModelEntry.d.ts.map +1 -1
  135. package/script/dsl/operation/toOperationEntry.d.ts +1 -1
  136. package/script/dsl/operation/toOperationEntry.d.ts.map +1 -1
  137. package/script/dsl/operation/toOperationEntry.js +3 -3
  138. package/script/mod.d.ts +1 -1
  139. package/script/mod.js +1 -1
  140. package/script/run/toArtifacts.d.ts +1 -1
  141. package/script/run/toV3JsonDocument.js +1 -1
  142. package/script/types/CustomValue.d.ts +1 -0
  143. package/script/types/CustomValue.d.ts.map +1 -1
  144. package/script/types/CustomValue.js +1 -0
  145. package/script/types/{prettierConfig.d.ts → PrettierConfig.d.ts} +2 -1
  146. package/script/types/PrettierConfig.d.ts.map +1 -0
  147. package/script/types/{prettierConfig.js → PrettierConfig.js} +1 -0
  148. package/esm/deps/jsr.io/@std/fs/1.0.4/exists.d.ts.map +0 -1
  149. package/esm/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.d.ts.map +0 -1
  150. package/esm/deps/jsr.io/@std/yaml/1.0.5/_loader_state.d.ts.map +0 -1
  151. package/esm/types/prettierConfig.d.ts.map +0 -1
  152. package/script/deps/jsr.io/@std/fs/1.0.4/exists.d.ts.map +0 -1
  153. package/script/deps/jsr.io/@std/yaml/1.0.5/_dumper_state.d.ts.map +0 -1
  154. package/script/deps/jsr.io/@std/yaml/1.0.5/_loader_state.d.ts.map +0 -1
  155. package/script/types/prettierConfig.d.ts.map +0 -1
  156. /package/esm/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.d.ts +0 -0
  157. /package/esm/deps/jsr.io/@std/fs/{1.0.4 → 1.0.18}/exists.d.ts +0 -0
  158. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.d.ts +0 -0
  159. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.d.ts +0 -0
  160. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.d.ts +0 -0
  161. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.js +0 -0
  162. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.d.ts +0 -0
  163. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.d.ts +0 -0
  164. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.d.ts +0 -0
  165. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/map.d.ts +0 -0
  166. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.d.ts +0 -0
  167. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.d.ts +0 -0
  168. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.d.ts +0 -0
  169. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.d.ts +0 -0
  170. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.d.ts +0 -0
  171. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/seq.d.ts +0 -0
  172. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.d.ts +0 -0
  173. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.d.ts +0 -0
  174. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.d.ts +0 -0
  175. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.d.ts +0 -0
  176. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.d.ts +0 -0
  177. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.d.ts +0 -0
  178. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.d.ts +0 -0
  179. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.d.ts +0 -0
  180. /package/esm/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.d.ts +0 -0
  181. /package/script/deps/jsr.io/@std/fmt/{1.0.2 → 1.0.8}/colors.d.ts +0 -0
  182. /package/script/deps/jsr.io/@std/fs/{1.0.4 → 1.0.18}/exists.d.ts +0 -0
  183. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_chars.d.ts +0 -0
  184. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_schema.d.ts +0 -0
  185. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.d.ts +0 -0
  186. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/binary.js +0 -0
  187. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/bool.d.ts +0 -0
  188. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/float.d.ts +0 -0
  189. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/int.d.ts +0 -0
  190. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/map.d.ts +0 -0
  191. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/merge.d.ts +0 -0
  192. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/nil.d.ts +0 -0
  193. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/omap.d.ts +0 -0
  194. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/pairs.d.ts +0 -0
  195. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/regexp.d.ts +0 -0
  196. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/seq.d.ts +0 -0
  197. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/set.d.ts +0 -0
  198. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/str.d.ts +0 -0
  199. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/timestamp.d.ts +0 -0
  200. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type/undefined.d.ts +0 -0
  201. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_type.d.ts +0 -0
  202. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/_utils.d.ts +0 -0
  203. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/mod.d.ts +0 -0
  204. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/parse.d.ts +0 -0
  205. /package/script/deps/jsr.io/@std/yaml/{1.0.5 → 1.0.7}/stringify.d.ts +0 -0
@@ -2,7 +2,7 @@
2
2
  // Ported from js-yaml v3.13.1:
3
3
  // https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
4
4
  // Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
5
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
5
+ // Copyright 2018-2025 the Deno authors. MIT license.
6
6
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7
7
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8
8
  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");
@@ -246,6 +246,21 @@ class LoaderState {
246
246
  this.version = null;
247
247
  this.readIndent();
248
248
  }
249
+ skipWhitespaces() {
250
+ let ch = this.peek();
251
+ while ((0, _chars_js_1.isWhiteSpace)(ch)) {
252
+ ch = this.next();
253
+ }
254
+ }
255
+ skipComment() {
256
+ let ch = this.peek();
257
+ if (ch !== _chars_js_1.SHARP)
258
+ return;
259
+ ch = this.next();
260
+ while (ch !== 0 && !(0, _chars_js_1.isEOL)(ch)) {
261
+ ch = this.next();
262
+ }
263
+ }
249
264
  readIndent() {
250
265
  let char = this.peek();
251
266
  while (char === _chars_js_1.SPACE) {
@@ -260,28 +275,25 @@ class LoaderState {
260
275
  this.position += 1;
261
276
  return this.peek();
262
277
  }
263
- throwError(message) {
264
- throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, message);
265
- }
266
278
  dispatchWarning(message) {
267
279
  const error = __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, message);
268
280
  this.onWarning?.(error);
269
281
  }
270
282
  yamlDirectiveHandler(...args) {
271
283
  if (this.version !== null) {
272
- return this.throwError("Cannot handle YAML directive: duplication of %YAML directive");
284
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: duplication of %YAML directive");
273
285
  }
274
286
  if (args.length !== 1) {
275
- return this.throwError("Cannot handle YAML directive: YAML directive accepts exactly one argument");
287
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: YAML directive accepts exactly one argument");
276
288
  }
277
289
  const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
278
290
  if (match === null) {
279
- return this.throwError("Cannot handle YAML directive: ill-formed argument");
291
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: ill-formed argument");
280
292
  }
281
293
  const major = parseInt(match[1], 10);
282
294
  const minor = parseInt(match[2], 10);
283
295
  if (major !== 1) {
284
- return this.throwError("Cannot handle YAML directive: unacceptable YAML version");
296
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: unacceptable YAML version");
285
297
  }
286
298
  this.version = args[0] ?? null;
287
299
  this.checkLineBreaks = minor < 2;
@@ -291,57 +303,53 @@ class LoaderState {
291
303
  }
292
304
  tagDirectiveHandler(...args) {
293
305
  if (args.length !== 2) {
294
- return this.throwError(`Cannot handle tag directive: directive accepts exactly two arguments, received ${args.length}`);
306
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: directive accepts exactly two arguments, received ${args.length}`);
295
307
  }
296
308
  const handle = args[0];
297
309
  const prefix = args[1];
298
310
  if (!PATTERN_TAG_HANDLE.test(handle)) {
299
- return this.throwError(`Cannot handle tag directive: ill-formed handle (first argument) in "${handle}"`);
311
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: ill-formed handle (first argument) in "${handle}"`);
300
312
  }
301
313
  if (this.tagMap.has(handle)) {
302
- return this.throwError(`Cannot handle tag directive: previously declared suffix for "${handle}" tag handle`);
314
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: previously declared suffix for "${handle}" tag handle`);
303
315
  }
304
316
  if (!PATTERN_TAG_URI.test(prefix)) {
305
- return this.throwError("Cannot handle tag directive: ill-formed tag prefix (second argument) of the TAG directive");
317
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle tag directive: ill-formed tag prefix (second argument) of the TAG directive");
306
318
  }
307
319
  this.tagMap.set(handle, prefix);
308
320
  }
309
321
  captureSegment(start, end, checkJson) {
310
- let result;
311
322
  if (start < end) {
312
- result = this.input.slice(start, end);
323
+ const result = this.input.slice(start, end);
313
324
  if (checkJson) {
314
325
  for (let position = 0; position < result.length; position++) {
315
326
  const character = result.charCodeAt(position);
316
327
  if (!(character === 0x09 ||
317
328
  (0x20 <= character && character <= 0x10ffff))) {
318
- return this.throwError(`Expected valid JSON character: received "${character}"`);
329
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Expected valid JSON character: received "${character}"`);
319
330
  }
320
331
  }
321
332
  }
322
333
  else if (PATTERN_NON_PRINTABLE.test(result)) {
323
- return this.throwError("Stream contains non-printable characters");
334
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Stream contains non-printable characters");
324
335
  }
325
336
  this.result += result;
326
337
  }
327
338
  }
328
339
  readBlockSequence(nodeIndent) {
329
- let line;
330
- let following;
331
340
  let detected = false;
332
- let ch;
333
341
  const tag = this.tag;
334
342
  const anchor = this.anchor;
335
343
  const result = [];
336
344
  if (this.anchor !== null && typeof this.anchor !== "undefined") {
337
345
  this.anchorMap.set(this.anchor, result);
338
346
  }
339
- ch = this.peek();
347
+ let ch = this.peek();
340
348
  while (ch !== 0) {
341
349
  if (ch !== _chars_js_1.MINUS) {
342
350
  break;
343
351
  }
344
- following = this.peek(1);
352
+ const following = this.peek(1);
345
353
  if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
346
354
  break;
347
355
  }
@@ -354,13 +362,13 @@ class LoaderState {
354
362
  continue;
355
363
  }
356
364
  }
357
- line = this.line;
365
+ const line = this.line;
358
366
  this.composeNode(nodeIndent, CONTEXT_BLOCK_IN, false, true);
359
367
  result.push(this.result);
360
368
  this.skipSeparationSpace(true, -1);
361
369
  ch = this.peek();
362
370
  if ((this.line === line || this.lineIndent > nodeIndent) && ch !== 0) {
363
- return this.throwError("Cannot read block sequence: bad indentation of a sequence entry");
371
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block sequence: bad indentation of a sequence entry");
364
372
  }
365
373
  else if (this.lineIndent < nodeIndent) {
366
374
  break;
@@ -377,7 +385,7 @@ class LoaderState {
377
385
  }
378
386
  mergeMappings(destination, source, overridableKeys) {
379
387
  if (!(0, _utils_js_1.isObject)(source)) {
380
- return this.throwError("Cannot merge mappings: the provided source object is unacceptable");
388
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot merge mappings: the provided source object is unacceptable");
381
389
  }
382
390
  for (const [key, value] of Object.entries(source)) {
383
391
  if (Object.hasOwn(destination, key))
@@ -399,7 +407,7 @@ class LoaderState {
399
407
  keyNode = Array.prototype.slice.call(keyNode);
400
408
  for (let index = 0; index < keyNode.length; index++) {
401
409
  if (Array.isArray(keyNode[index])) {
402
- return this.throwError("Cannot store mapping pair: nested arrays are not supported inside keys");
410
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot store mapping pair: nested arrays are not supported inside keys");
403
411
  }
404
412
  if (typeof keyNode === "object" && (0, _utils_js_1.isPlainObject)(keyNode[index])) {
405
413
  keyNode[index] = "[object Object]";
@@ -429,7 +437,7 @@ class LoaderState {
429
437
  Object.hasOwn(result, keyNode)) {
430
438
  this.line = startLine || this.line;
431
439
  this.position = startPos || this.position;
432
- return this.throwError("Cannot store mapping pair: duplicated key");
440
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot store mapping pair: duplicated key");
433
441
  }
434
442
  Object.defineProperty(result, keyNode, {
435
443
  value: valueNode,
@@ -453,7 +461,7 @@ class LoaderState {
453
461
  }
454
462
  }
455
463
  else {
456
- return this.throwError("Cannot read line: line break not found");
464
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read line: line break not found");
457
465
  }
458
466
  this.line += 1;
459
467
  this.lineStart = this.position;
@@ -462,13 +470,11 @@ class LoaderState {
462
470
  let lineBreaks = 0;
463
471
  let ch = this.peek();
464
472
  while (ch !== 0) {
465
- while ((0, _chars_js_1.isWhiteSpace)(ch)) {
466
- ch = this.next();
467
- }
468
- if (allowComments && ch === _chars_js_1.SHARP) {
469
- do {
470
- ch = this.next();
471
- } while (ch !== _chars_js_1.LINE_FEED && ch !== _chars_js_1.CARRIAGE_RETURN && ch !== 0);
473
+ this.skipWhitespaces();
474
+ ch = this.peek();
475
+ if (allowComments) {
476
+ this.skipComment();
477
+ ch = this.peek();
472
478
  }
473
479
  if ((0, _chars_js_1.isEOL)(ch)) {
474
480
  this.readLineBreak();
@@ -600,18 +606,17 @@ class LoaderState {
600
606
  return false;
601
607
  }
602
608
  readSingleQuotedScalar(nodeIndent) {
603
- let ch;
604
- let captureStart;
605
- let captureEnd;
606
- ch = this.peek();
609
+ let ch = this.peek();
607
610
  if (ch !== _chars_js_1.SINGLE_QUOTE) {
608
611
  return false;
609
612
  }
610
613
  this.kind = "scalar";
611
614
  this.result = "";
612
615
  this.position++;
613
- captureStart = captureEnd = this.position;
614
- while ((ch = this.peek()) !== 0) {
616
+ let captureStart = this.position;
617
+ let captureEnd = this.position;
618
+ ch = this.peek();
619
+ while (ch !== 0) {
615
620
  if (ch === _chars_js_1.SINGLE_QUOTE) {
616
621
  this.captureSegment(captureStart, this.position, true);
617
622
  ch = this.next();
@@ -631,14 +636,15 @@ class LoaderState {
631
636
  }
632
637
  else if (this.position === this.lineStart &&
633
638
  this.testDocumentSeparator()) {
634
- return this.throwError("Unexpected end of the document within a single quoted scalar");
639
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a single quoted scalar");
635
640
  }
636
641
  else {
637
642
  this.position++;
638
643
  captureEnd = this.position;
639
644
  }
645
+ ch = this.peek();
640
646
  }
641
- return this.throwError("Unexpected end of the stream within a single quoted scalar");
647
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a single quoted scalar");
642
648
  }
643
649
  readDoubleQuotedScalar(nodeIndent) {
644
650
  let ch = this.peek();
@@ -651,7 +657,8 @@ class LoaderState {
651
657
  let captureEnd = this.position;
652
658
  let captureStart = this.position;
653
659
  let tmp;
654
- while ((ch = this.peek()) !== 0) {
660
+ ch = this.peek();
661
+ while (ch !== 0) {
655
662
  if (ch === _chars_js_1.DOUBLE_QUOTE) {
656
663
  this.captureSegment(captureStart, this.position, true);
657
664
  this.position++;
@@ -676,14 +683,14 @@ class LoaderState {
676
683
  hexResult = (hexResult << 4) + tmp;
677
684
  }
678
685
  else {
679
- return this.throwError("Cannot read double quoted scalar: expected hexadecimal character");
686
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read double quoted scalar: expected hexadecimal character");
680
687
  }
681
688
  }
682
689
  this.result += codepointToChar(hexResult);
683
690
  this.position++;
684
691
  }
685
692
  else {
686
- return this.throwError("Cannot read double quoted scalar: unknown escape sequence");
693
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read double quoted scalar: unknown escape sequence");
687
694
  }
688
695
  captureStart = captureEnd = this.position;
689
696
  }
@@ -694,14 +701,15 @@ class LoaderState {
694
701
  }
695
702
  else if (this.position === this.lineStart &&
696
703
  this.testDocumentSeparator()) {
697
- return this.throwError("Unexpected end of the document within a double quoted scalar");
704
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a double quoted scalar");
698
705
  }
699
706
  else {
700
707
  this.position++;
701
708
  captureEnd = this.position;
702
709
  }
710
+ ch = this.peek();
703
711
  }
704
- return this.throwError("Unexpected end of the stream within a double quoted scalar");
712
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a double quoted scalar");
705
713
  }
706
714
  readFlowCollection(nodeIndent) {
707
715
  let ch = this.peek();
@@ -746,7 +754,7 @@ class LoaderState {
746
754
  return true;
747
755
  }
748
756
  if (!readNext) {
749
- return this.throwError("Cannot read flow collection: missing comma between flow collection entries");
757
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read flow collection: missing comma between flow collection entries");
750
758
  }
751
759
  keyTag = keyNode = valueNode = null;
752
760
  isPair = isExplicitPair = false;
@@ -790,7 +798,7 @@ class LoaderState {
790
798
  readNext = false;
791
799
  }
792
800
  }
793
- return this.throwError("Cannot read flow collection: unexpected end of the stream within a flow collection");
801
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read flow collection: unexpected end of the stream within a flow collection");
794
802
  }
795
803
  // Handles block scaler styles: e.g. '|', '>', '|-' and '>-'.
796
804
  // https://yaml.org/spec/1.2.2/#81-block-scalar-styles
@@ -822,19 +830,19 @@ class LoaderState {
822
830
  chomping = ch === _chars_js_1.PLUS ? CHOMPING_KEEP : CHOMPING_STRIP;
823
831
  }
824
832
  else {
825
- return this.throwError("Cannot read block: chomping mode identifier repeated");
833
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: chomping mode identifier repeated");
826
834
  }
827
835
  }
828
836
  else if ((tmp = decimalCharCodeToNumber(ch)) >= 0) {
829
837
  if (tmp === 0) {
830
- return this.throwError("Cannot read block: indentation width must be greater than 0");
838
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: indentation width must be greater than 0");
831
839
  }
832
840
  else if (!detectedIndent) {
833
841
  textIndent = nodeIndent + tmp - 1;
834
842
  detectedIndent = true;
835
843
  }
836
844
  else {
837
- return this.throwError("Cannot read block: indentation width identifier repeated");
845
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: indentation width identifier repeated");
838
846
  }
839
847
  }
840
848
  else {
@@ -842,14 +850,9 @@ class LoaderState {
842
850
  }
843
851
  }
844
852
  if ((0, _chars_js_1.isWhiteSpace)(ch)) {
845
- do {
846
- ch = this.next();
847
- } while ((0, _chars_js_1.isWhiteSpace)(ch));
848
- if (ch === _chars_js_1.SHARP) {
849
- do {
850
- ch = this.next();
851
- } while (!(0, _chars_js_1.isEOL)(ch) && ch !== 0);
852
- }
853
+ this.skipWhitespaces();
854
+ this.skipComment();
855
+ ch = this.peek();
853
856
  }
854
857
  while (ch !== 0) {
855
858
  this.readLineBreak();
@@ -928,7 +931,6 @@ class LoaderState {
928
931
  const anchor = this.anchor;
929
932
  const result = {};
930
933
  const overridableKeys = new Set();
931
- let following;
932
934
  let allowCompact = false;
933
935
  let line;
934
936
  let pos;
@@ -937,13 +939,12 @@ class LoaderState {
937
939
  let valueNode = null;
938
940
  let atExplicitKey = false;
939
941
  let detected = false;
940
- let ch;
941
942
  if (this.anchor !== null && typeof this.anchor !== "undefined") {
942
943
  this.anchorMap.set(this.anchor, result);
943
944
  }
944
- ch = this.peek();
945
+ let ch = this.peek();
945
946
  while (ch !== 0) {
946
- following = this.peek(1);
947
+ const following = this.peek(1);
947
948
  line = this.line; // Save the current line.
948
949
  pos = this.position;
949
950
  //
@@ -954,7 +955,9 @@ class LoaderState {
954
955
  if (ch === _chars_js_1.QUESTION) {
955
956
  if (atExplicitKey) {
956
957
  this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
957
- keyTag = keyNode = valueNode = null;
958
+ keyTag = null;
959
+ keyNode = null;
960
+ valueNode = null;
958
961
  }
959
962
  detected = true;
960
963
  atExplicitKey = true;
@@ -966,7 +969,7 @@ class LoaderState {
966
969
  allowCompact = true;
967
970
  }
968
971
  else {
969
- return this.throwError("Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");
972
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");
970
973
  }
971
974
  this.position += 1;
972
975
  ch = following;
@@ -977,17 +980,18 @@ class LoaderState {
977
980
  else if (this.composeNode(flowIndent, CONTEXT_FLOW_OUT, false, true)) {
978
981
  if (this.line === line) {
979
982
  ch = this.peek();
980
- while ((0, _chars_js_1.isWhiteSpace)(ch)) {
981
- ch = this.next();
982
- }
983
+ this.skipWhitespaces();
984
+ ch = this.peek();
983
985
  if (ch === _chars_js_1.COLON) {
984
986
  ch = this.next();
985
987
  if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
986
- return this.throwError("Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
988
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
987
989
  }
988
990
  if (atExplicitKey) {
989
991
  this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
990
- keyTag = keyNode = valueNode = null;
992
+ keyTag = null;
993
+ keyNode = null;
994
+ valueNode = null;
991
995
  }
992
996
  detected = true;
993
997
  atExplicitKey = false;
@@ -996,7 +1000,7 @@ class LoaderState {
996
1000
  keyNode = this.result;
997
1001
  }
998
1002
  else if (detected) {
999
- return this.throwError("Cannot read an implicit mapping pair: missing colon");
1003
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read an implicit mapping pair: missing colon");
1000
1004
  }
1001
1005
  else {
1002
1006
  this.tag = tag;
@@ -1005,7 +1009,7 @@ class LoaderState {
1005
1009
  }
1006
1010
  }
1007
1011
  else if (detected) {
1008
- return this.throwError("Cannot read a block mapping entry: a multiline key may not be an implicit key");
1012
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read a block mapping entry: a multiline key may not be an implicit key");
1009
1013
  }
1010
1014
  else {
1011
1015
  this.tag = tag;
@@ -1036,7 +1040,7 @@ class LoaderState {
1036
1040
  ch = this.peek();
1037
1041
  }
1038
1042
  if (this.lineIndent > nodeIndent && ch !== 0) {
1039
- return this.throwError("Cannot read block: bad indentation of a mapping entry");
1043
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: bad indentation of a mapping entry");
1040
1044
  }
1041
1045
  else if (this.lineIndent < nodeIndent) {
1042
1046
  break;
@@ -1059,17 +1063,15 @@ class LoaderState {
1059
1063
  return detected;
1060
1064
  }
1061
1065
  readTagProperty() {
1062
- let position;
1063
1066
  let isVerbatim = false;
1064
1067
  let isNamed = false;
1065
1068
  let tagHandle = "";
1066
1069
  let tagName;
1067
- let ch;
1068
- ch = this.peek();
1070
+ let ch = this.peek();
1069
1071
  if (ch !== _chars_js_1.EXCLAMATION)
1070
1072
  return false;
1071
1073
  if (this.tag !== null) {
1072
- return this.throwError("Cannot read tag property: duplication of a tag property");
1074
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: duplication of a tag property");
1073
1075
  }
1074
1076
  ch = this.next();
1075
1077
  if (ch === _chars_js_1.SMALLER_THAN) {
@@ -1084,7 +1086,7 @@ class LoaderState {
1084
1086
  else {
1085
1087
  tagHandle = "!";
1086
1088
  }
1087
- position = this.position;
1089
+ let position = this.position;
1088
1090
  if (isVerbatim) {
1089
1091
  do {
1090
1092
  ch = this.next();
@@ -1094,7 +1096,7 @@ class LoaderState {
1094
1096
  ch = this.next();
1095
1097
  }
1096
1098
  else {
1097
- return this.throwError("Cannot read tag property: unexpected end of stream");
1099
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: unexpected end of stream");
1098
1100
  }
1099
1101
  }
1100
1102
  else {
@@ -1103,24 +1105,24 @@ class LoaderState {
1103
1105
  if (!isNamed) {
1104
1106
  tagHandle = this.input.slice(position - 1, this.position + 1);
1105
1107
  if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
1106
- return this.throwError("Cannot read tag property: named tag handle contains invalid characters");
1108
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: named tag handle contains invalid characters");
1107
1109
  }
1108
1110
  isNamed = true;
1109
1111
  position = this.position + 1;
1110
1112
  }
1111
1113
  else {
1112
- return this.throwError("Cannot read tag property: tag suffix cannot contain an exclamation mark");
1114
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain an exclamation mark");
1113
1115
  }
1114
1116
  }
1115
1117
  ch = this.next();
1116
1118
  }
1117
1119
  tagName = this.input.slice(position, this.position);
1118
1120
  if (PATTERN_FLOW_INDICATORS.test(tagName)) {
1119
- return this.throwError("Cannot read tag property: tag suffix cannot contain flow indicator characters");
1121
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain flow indicator characters");
1120
1122
  }
1121
1123
  }
1122
1124
  if (tagName && !PATTERN_TAG_URI.test(tagName)) {
1123
- return this.throwError(`Cannot read tag property: invalid characters in tag name "${tagName}"`);
1125
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read tag property: invalid characters in tag name "${tagName}"`);
1124
1126
  }
1125
1127
  if (isVerbatim) {
1126
1128
  this.tag = tagName;
@@ -1135,7 +1137,7 @@ class LoaderState {
1135
1137
  this.tag = `tag:yaml.org,2002:${tagName}`;
1136
1138
  }
1137
1139
  else {
1138
- return this.throwError(`Cannot read tag property: undeclared tag handle "${tagHandle}"`);
1140
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read tag property: undeclared tag handle "${tagHandle}"`);
1139
1141
  }
1140
1142
  return true;
1141
1143
  }
@@ -1144,7 +1146,7 @@ class LoaderState {
1144
1146
  if (ch !== _chars_js_1.AMPERSAND)
1145
1147
  return false;
1146
1148
  if (this.anchor !== null) {
1147
- return this.throwError("Cannot read anchor property: duplicate anchor property");
1149
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: duplicate anchor property");
1148
1150
  }
1149
1151
  ch = this.next();
1150
1152
  const position = this.position;
@@ -1152,7 +1154,7 @@ class LoaderState {
1152
1154
  ch = this.next();
1153
1155
  }
1154
1156
  if (this.position === position) {
1155
- return this.throwError("Cannot read anchor property: name of an anchor node must contain at least one character");
1157
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: name of an anchor node must contain at least one character");
1156
1158
  }
1157
1159
  this.anchor = this.input.slice(position, this.position);
1158
1160
  return true;
@@ -1166,32 +1168,29 @@ class LoaderState {
1166
1168
  ch = this.next();
1167
1169
  }
1168
1170
  if (this.position === position) {
1169
- return this.throwError("Cannot read alias: alias name must contain at least one character");
1171
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read alias: alias name must contain at least one character");
1170
1172
  }
1171
1173
  const alias = this.input.slice(position, this.position);
1172
1174
  if (!this.anchorMap.has(alias)) {
1173
- return this.throwError(`Cannot read alias: unidentified alias "${alias}"`);
1175
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read alias: unidentified alias "${alias}"`);
1174
1176
  }
1175
1177
  this.result = this.anchorMap.get(alias);
1176
1178
  this.skipSeparationSpace(true, -1);
1177
1179
  return true;
1178
1180
  }
1179
1181
  composeNode(parentIndent, nodeContext, allowToSeek, allowCompact) {
1180
- let allowBlockScalars;
1181
- let allowBlockCollections;
1182
1182
  let indentStatus = 1; // 1: this>parent, 0: this=parent, -1: this<parent
1183
1183
  let atNewLine = false;
1184
1184
  let hasContent = false;
1185
1185
  let type;
1186
- let flowIndent;
1187
- let blockIndent;
1188
1186
  this.tag = null;
1189
1187
  this.anchor = null;
1190
1188
  this.kind = null;
1191
1189
  this.result = null;
1192
- const allowBlockStyles = (allowBlockScalars =
1193
- allowBlockCollections =
1194
- CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext);
1190
+ const allowBlockScalars = CONTEXT_BLOCK_OUT === nodeContext ||
1191
+ CONTEXT_BLOCK_IN === nodeContext;
1192
+ let allowBlockCollections = allowBlockScalars;
1193
+ const allowBlockStyles = allowBlockScalars;
1195
1194
  if (allowToSeek) {
1196
1195
  if (this.skipSeparationSpace(true, -1)) {
1197
1196
  atNewLine = true;
@@ -1232,8 +1231,8 @@ class LoaderState {
1232
1231
  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
1233
1232
  const cond = CONTEXT_FLOW_IN === nodeContext ||
1234
1233
  CONTEXT_FLOW_OUT === nodeContext;
1235
- flowIndent = cond ? parentIndent : parentIndent + 1;
1236
- blockIndent = this.position - this.lineStart;
1234
+ const flowIndent = cond ? parentIndent : parentIndent + 1;
1235
+ const blockIndent = this.position - this.lineStart;
1237
1236
  if (indentStatus === 1) {
1238
1237
  if ((allowBlockCollections &&
1239
1238
  (this.readBlockSequence(blockIndent) ||
@@ -1250,7 +1249,7 @@ class LoaderState {
1250
1249
  else if (this.readAlias()) {
1251
1250
  hasContent = true;
1252
1251
  if (this.tag !== null || this.anchor !== null) {
1253
- return this.throwError("Cannot compose node: alias node should not have any properties");
1252
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot compose node: alias node should not have any properties");
1254
1253
  }
1255
1254
  }
1256
1255
  else if (this.readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
@@ -1293,11 +1292,11 @@ class LoaderState {
1293
1292
  const map = this.typeMap[this.kind ?? "fallback"];
1294
1293
  type = map.get(this.tag);
1295
1294
  if (this.result !== null && type.kind !== this.kind) {
1296
- return this.throwError(`Unacceptable node kind for !<${this.tag}> tag: it should be "${type.kind}", not "${this.kind}"`);
1295
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Unacceptable node kind for !<${this.tag}> tag: it should be "${type.kind}", not "${this.kind}"`);
1297
1296
  }
1298
1297
  if (!type.resolve(this.result)) {
1299
1298
  // `state.result` updated in resolver if matched
1300
- return this.throwError(`Cannot resolve a node with !<${this.tag}> explicit tag`);
1299
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot resolve a node with !<${this.tag}> explicit tag`);
1301
1300
  }
1302
1301
  else {
1303
1302
  this.result = type.construct(this.result);
@@ -1307,23 +1306,20 @@ class LoaderState {
1307
1306
  }
1308
1307
  }
1309
1308
  else {
1310
- return this.throwError(`Cannot resolve unknown tag !<${this.tag}>`);
1309
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot resolve unknown tag !<${this.tag}>`);
1311
1310
  }
1312
1311
  }
1313
1312
  return this.tag !== null || this.anchor !== null || hasContent;
1314
1313
  }
1315
1314
  readDocument() {
1316
1315
  const documentStart = this.position;
1317
- let position;
1318
- let directiveName;
1319
- let directiveArgs;
1320
1316
  let hasDirectives = false;
1321
- let ch;
1322
1317
  this.version = null;
1323
1318
  this.checkLineBreaks = false;
1324
1319
  this.tagMap = new Map();
1325
1320
  this.anchorMap = new Map();
1326
- while ((ch = this.peek()) !== 0) {
1321
+ let ch = this.peek();
1322
+ while (ch !== 0) {
1327
1323
  this.skipSeparationSpace(true, -1);
1328
1324
  ch = this.peek();
1329
1325
  if (this.lineIndent > 0 || ch !== _chars_js_1.PERCENT) {
@@ -1331,25 +1327,19 @@ class LoaderState {
1331
1327
  }
1332
1328
  hasDirectives = true;
1333
1329
  ch = this.next();
1334
- position = this.position;
1330
+ let position = this.position;
1335
1331
  while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
1336
1332
  ch = this.next();
1337
1333
  }
1338
- directiveName = this.input.slice(position, this.position);
1339
- directiveArgs = [];
1334
+ const directiveName = this.input.slice(position, this.position);
1335
+ const directiveArgs = [];
1340
1336
  if (directiveName.length < 1) {
1341
- return this.throwError("Cannot read document: directive name length must be greater than zero");
1337
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: directive name length must be greater than zero");
1342
1338
  }
1343
1339
  while (ch !== 0) {
1344
- while ((0, _chars_js_1.isWhiteSpace)(ch)) {
1345
- ch = this.next();
1346
- }
1347
- if (ch === _chars_js_1.SHARP) {
1348
- do {
1349
- ch = this.next();
1350
- } while (ch !== 0 && !(0, _chars_js_1.isEOL)(ch));
1351
- break;
1352
- }
1340
+ this.skipWhitespaces();
1341
+ this.skipComment();
1342
+ ch = this.peek();
1353
1343
  if ((0, _chars_js_1.isEOL)(ch))
1354
1344
  break;
1355
1345
  position = this.position;
@@ -1371,6 +1361,7 @@ class LoaderState {
1371
1361
  this.dispatchWarning(`unknown document directive "${directiveName}"`);
1372
1362
  break;
1373
1363
  }
1364
+ ch = this.peek();
1374
1365
  }
1375
1366
  this.skipSeparationSpace(true, -1);
1376
1367
  if (this.lineIndent === 0 &&
@@ -1381,7 +1372,7 @@ class LoaderState {
1381
1372
  this.skipSeparationSpace(true, -1);
1382
1373
  }
1383
1374
  else if (hasDirectives) {
1384
- return this.throwError("Cannot read document: directives end mark is expected");
1375
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: directives end mark is expected");
1385
1376
  }
1386
1377
  this.composeNode(this.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
1387
1378
  this.skipSeparationSpace(true, -1);
@@ -1396,7 +1387,7 @@ class LoaderState {
1396
1387
  }
1397
1388
  }
1398
1389
  else if (this.position < this.length - 1) {
1399
- return this.throwError("Cannot read document: end of the stream or a document separator is expected");
1390
+ throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: end of the stream or a document separator is expected");
1400
1391
  }
1401
1392
  return this.result;
1402
1393
  }