@windrun-huaiin/dev-scripts 14.1.3 → 14.1.4

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 (236) hide show
  1. package/dist/commands/create-diaomao-app.d.ts.map +1 -1
  2. package/dist/commands/create-diaomao-app.js +2 -0
  3. package/dist/commands/create-diaomao-app.mjs +2 -0
  4. package/package.json +1 -1
  5. package/dist/_virtual/_commonjsHelpers.js +0 -7
  6. package/dist/_virtual/_commonjsHelpers.mjs +0 -5
  7. package/dist/_virtual/index.js +0 -11
  8. package/dist/_virtual/index.mjs +0 -7
  9. package/dist/_virtual/re.js +0 -5
  10. package/dist/_virtual/re.mjs +0 -3
  11. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +0 -161
  12. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.mjs +0 -159
  13. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +0 -576
  14. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.mjs +0 -574
  15. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +0 -350
  16. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.mjs +0 -348
  17. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +0 -21
  18. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.mjs +0 -19
  19. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +0 -72
  20. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.mjs +0 -70
  21. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +0 -77
  22. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.mjs +0 -75
  23. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +0 -22
  24. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.mjs +0 -20
  25. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +0 -18
  26. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.mjs +0 -16
  27. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +0 -20
  28. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.mjs +0 -18
  29. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +0 -73
  30. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.mjs +0 -71
  31. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +0 -18
  32. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.mjs +0 -16
  33. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +0 -18
  34. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.mjs +0 -16
  35. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +0 -18
  36. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.mjs +0 -16
  37. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +0 -34
  38. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.mjs +0 -32
  39. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +0 -18
  40. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.mjs +0 -16
  41. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +0 -18
  42. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.mjs +0 -16
  43. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +0 -18
  44. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.mjs +0 -16
  45. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +0 -18
  46. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.mjs +0 -16
  47. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +0 -18
  48. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.mjs +0 -16
  49. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +0 -31
  50. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.mjs +0 -29
  51. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +0 -18
  52. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.mjs +0 -16
  53. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +0 -21
  54. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.mjs +0 -19
  55. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +0 -18
  56. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.mjs +0 -16
  57. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +0 -18
  58. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.mjs +0 -16
  59. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +0 -25
  60. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.mjs +0 -23
  61. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +0 -18
  62. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.mjs +0 -16
  63. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +0 -21
  64. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.mjs +0 -19
  65. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +0 -144
  66. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.mjs +0 -142
  67. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +0 -48
  68. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.mjs +0 -46
  69. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +0 -22
  70. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.mjs +0 -20
  71. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +0 -40
  72. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.mjs +0 -38
  73. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +0 -53
  74. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.mjs +0 -51
  75. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +0 -28
  76. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.mjs +0 -26
  77. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +0 -239
  78. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.mjs +0 -237
  79. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +0 -19
  80. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.mjs +0 -17
  81. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +0 -22
  82. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.mjs +0 -20
  83. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +0 -19
  84. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.mjs +0 -17
  85. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +0 -41
  86. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.mjs +0 -39
  87. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +0 -40
  88. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.mjs +0 -38
  89. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +0 -78
  90. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.mjs +0 -76
  91. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +0 -102
  92. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.mjs +0 -100
  93. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +0 -63
  94. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.mjs +0 -61
  95. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +0 -265
  96. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.mjs +0 -263
  97. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +0 -23
  98. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.mjs +0 -21
  99. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +0 -26
  100. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.mjs +0 -24
  101. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -90
  102. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.mjs +0 -88
  103. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -45
  104. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.mjs +0 -43
  105. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.js +0 -105
  106. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.mjs +0 -102
  107. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -88
  108. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +0 -86
  109. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js +0 -219
  110. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.mjs +0 -217
  111. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -117
  112. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +0 -115
  113. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -200
  114. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +0 -198
  115. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -51
  116. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +0 -49
  117. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -39
  118. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.mjs +0 -37
  119. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -209
  120. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +0 -207
  121. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -225
  122. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +0 -223
  123. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -148
  124. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.mjs +0 -146
  125. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -36
  126. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +0 -34
  127. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -28
  128. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +0 -26
  129. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -17
  130. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +0 -15
  131. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -15
  132. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +0 -13
  133. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.js +0 -337
  134. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.mjs +0 -335
  135. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.js +0 -76
  136. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.mjs +0 -71
  137. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -57
  138. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.mjs +0 -55
  139. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.js +0 -90
  140. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.mjs +0 -88
  141. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.js +0 -178
  142. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.mjs +0 -176
  143. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.js +0 -62
  144. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.mjs +0 -57
  145. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.js +0 -9
  146. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.mjs +0 -7
  147. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.js +0 -116
  148. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.mjs +0 -114
  149. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js +0 -151
  150. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.mjs +0 -147
  151. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.js +0 -40
  152. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.mjs +0 -38
  153. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.js +0 -39
  154. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.mjs +0 -36
  155. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -27
  156. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.mjs +0 -24
  157. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -147
  158. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +0 -144
  159. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -115
  160. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +0 -113
  161. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -65
  162. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +0 -63
  163. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.js +0 -53
  164. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.mjs +0 -36
  165. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.js +0 -39
  166. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.mjs +0 -37
  167. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.js +0 -79
  168. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.mjs +0 -73
  169. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.js +0 -719
  170. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.mjs +0 -717
  171. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.js +0 -41
  172. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.mjs +0 -39
  173. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.js +0 -969
  174. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.mjs +0 -967
  175. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.js +0 -68
  176. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.mjs +0 -64
  177. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.js +0 -39
  178. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.mjs +0 -37
  179. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.js +0 -19
  180. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.mjs +0 -17
  181. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.js +0 -17
  182. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.mjs +0 -15
  183. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.js +0 -19
  184. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.mjs +0 -17
  185. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.js +0 -16
  186. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.mjs +0 -14
  187. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.js +0 -21
  188. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.mjs +0 -19
  189. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.js +0 -47
  190. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.mjs +0 -43
  191. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.js +0 -42
  192. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.mjs +0 -38
  193. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.js +0 -25
  194. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.mjs +0 -23
  195. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.js +0 -64
  196. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.mjs +0 -62
  197. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.js +0 -99
  198. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.mjs +0 -96
  199. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -60
  200. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +0 -58
  201. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -29
  202. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +0 -26
  203. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -50
  204. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +0 -46
  205. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -76
  206. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +0 -71
  207. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -68
  208. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +0 -64
  209. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -77
  210. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +0 -74
  211. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -82
  212. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +0 -78
  213. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -41
  214. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +0 -39
  215. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -96
  216. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +0 -93
  217. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -105
  218. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +0 -101
  219. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -151
  220. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +0 -146
  221. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.js +0 -131
  222. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.mjs +0 -128
  223. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -145
  224. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +0 -143
  225. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -24
  226. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +0 -20
  227. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -87
  228. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +0 -85
  229. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -26
  230. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +0 -24
  231. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -152
  232. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +0 -150
  233. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -338
  234. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +0 -336
  235. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.js +0 -148
  236. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.mjs +0 -146
@@ -1,88 +0,0 @@
1
- import { Alias } from '../nodes/Alias.mjs';
2
- import { isDocument, isNode, isPair, MAP, SEQ } from '../nodes/identity.mjs';
3
- import { Scalar } from '../nodes/Scalar.mjs';
4
-
5
- const defaultTagPrefix = 'tag:yaml.org,2002:';
6
- function findTagObject(value, tagName, tags) {
7
- if (tagName) {
8
- const match = tags.filter(t => t.tag === tagName);
9
- const tagObj = match.find(t => !t.format) ?? match[0];
10
- if (!tagObj)
11
- throw new Error(`Tag ${tagName} not found`);
12
- return tagObj;
13
- }
14
- return tags.find(t => t.identify?.(value) && !t.format);
15
- }
16
- function createNode(value, tagName, ctx) {
17
- if (isDocument(value))
18
- value = value.contents;
19
- if (isNode(value))
20
- return value;
21
- if (isPair(value)) {
22
- const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
23
- map.items.push(value);
24
- return map;
25
- }
26
- if (value instanceof String ||
27
- value instanceof Number ||
28
- value instanceof Boolean ||
29
- (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere
30
- ) {
31
- // https://tc39.es/ecma262/#sec-serializejsonproperty
32
- value = value.valueOf();
33
- }
34
- const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;
35
- // Detect duplicate references to the same object & use Alias nodes for all
36
- // after first. The `ref` wrapper allows for circular references to resolve.
37
- let ref = undefined;
38
- if (aliasDuplicateObjects && value && typeof value === 'object') {
39
- ref = sourceObjects.get(value);
40
- if (ref) {
41
- ref.anchor ?? (ref.anchor = onAnchor(value));
42
- return new Alias(ref.anchor);
43
- }
44
- else {
45
- ref = { anchor: null, node: null };
46
- sourceObjects.set(value, ref);
47
- }
48
- }
49
- if (tagName?.startsWith('!!'))
50
- tagName = defaultTagPrefix + tagName.slice(2);
51
- let tagObj = findTagObject(value, tagName, schema.tags);
52
- if (!tagObj) {
53
- if (value && typeof value.toJSON === 'function') {
54
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
55
- value = value.toJSON();
56
- }
57
- if (!value || typeof value !== 'object') {
58
- const node = new Scalar(value);
59
- if (ref)
60
- ref.node = node;
61
- return node;
62
- }
63
- tagObj =
64
- value instanceof Map
65
- ? schema[MAP]
66
- : Symbol.iterator in Object(value)
67
- ? schema[SEQ]
68
- : schema[MAP];
69
- }
70
- if (onTagObj) {
71
- onTagObj(tagObj);
72
- delete ctx.onTagObj;
73
- }
74
- const node = tagObj?.createNode
75
- ? tagObj.createNode(ctx.schema, value, ctx)
76
- : typeof tagObj?.nodeClass?.from === 'function'
77
- ? tagObj.nodeClass.from(ctx.schema, value, ctx)
78
- : new Scalar(value);
79
- if (tagName)
80
- node.tag = tagName;
81
- else if (!tagObj.default)
82
- node.tag = tagObj.tag;
83
- if (ref)
84
- ref.node = node;
85
- return node;
86
- }
87
-
88
- export { createNode };
@@ -1,178 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../nodes/identity.js');
4
- var visit = require('../visit.js');
5
-
6
- const escapeChars = {
7
- '!': '%21',
8
- ',': '%2C',
9
- '[': '%5B',
10
- ']': '%5D',
11
- '{': '%7B',
12
- '}': '%7D'
13
- };
14
- const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]);
15
- class Directives {
16
- constructor(yaml, tags) {
17
- /**
18
- * The directives-end/doc-start marker `---`. If `null`, a marker may still be
19
- * included in the document's stringified representation.
20
- */
21
- this.docStart = null;
22
- /** The doc-end marker `...`. */
23
- this.docEnd = false;
24
- this.yaml = Object.assign({}, Directives.defaultYaml, yaml);
25
- this.tags = Object.assign({}, Directives.defaultTags, tags);
26
- }
27
- clone() {
28
- const copy = new Directives(this.yaml, this.tags);
29
- copy.docStart = this.docStart;
30
- return copy;
31
- }
32
- /**
33
- * During parsing, get a Directives instance for the current document and
34
- * update the stream state according to the current version's spec.
35
- */
36
- atDocument() {
37
- const res = new Directives(this.yaml, this.tags);
38
- switch (this.yaml.version) {
39
- case '1.1':
40
- this.atNextDocument = true;
41
- break;
42
- case '1.2':
43
- this.atNextDocument = false;
44
- this.yaml = {
45
- explicit: Directives.defaultYaml.explicit,
46
- version: '1.2'
47
- };
48
- this.tags = Object.assign({}, Directives.defaultTags);
49
- break;
50
- }
51
- return res;
52
- }
53
- /**
54
- * @param onError - May be called even if the action was successful
55
- * @returns `true` on success
56
- */
57
- add(line, onError) {
58
- if (this.atNextDocument) {
59
- this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };
60
- this.tags = Object.assign({}, Directives.defaultTags);
61
- this.atNextDocument = false;
62
- }
63
- const parts = line.trim().split(/[ \t]+/);
64
- const name = parts.shift();
65
- switch (name) {
66
- case '%TAG': {
67
- if (parts.length !== 2) {
68
- onError(0, '%TAG directive should contain exactly two parts');
69
- if (parts.length < 2)
70
- return false;
71
- }
72
- const [handle, prefix] = parts;
73
- this.tags[handle] = prefix;
74
- return true;
75
- }
76
- case '%YAML': {
77
- this.yaml.explicit = true;
78
- if (parts.length !== 1) {
79
- onError(0, '%YAML directive should contain exactly one part');
80
- return false;
81
- }
82
- const [version] = parts;
83
- if (version === '1.1' || version === '1.2') {
84
- this.yaml.version = version;
85
- return true;
86
- }
87
- else {
88
- const isValid = /^\d+\.\d+$/.test(version);
89
- onError(6, `Unsupported YAML version ${version}`, isValid);
90
- return false;
91
- }
92
- }
93
- default:
94
- onError(0, `Unknown directive ${name}`, true);
95
- return false;
96
- }
97
- }
98
- /**
99
- * Resolves a tag, matching handles to those defined in %TAG directives.
100
- *
101
- * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
102
- * `'!local'` tag, or `null` if unresolvable.
103
- */
104
- tagName(source, onError) {
105
- if (source === '!')
106
- return '!'; // non-specific tag
107
- if (source[0] !== '!') {
108
- onError(`Not a valid tag: ${source}`);
109
- return null;
110
- }
111
- if (source[1] === '<') {
112
- const verbatim = source.slice(2, -1);
113
- if (verbatim === '!' || verbatim === '!!') {
114
- onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
115
- return null;
116
- }
117
- if (source[source.length - 1] !== '>')
118
- onError('Verbatim tags must end with a >');
119
- return verbatim;
120
- }
121
- const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
122
- if (!suffix)
123
- onError(`The ${source} tag has no suffix`);
124
- const prefix = this.tags[handle];
125
- if (prefix) {
126
- try {
127
- return prefix + decodeURIComponent(suffix);
128
- }
129
- catch (error) {
130
- onError(String(error));
131
- return null;
132
- }
133
- }
134
- if (handle === '!')
135
- return source; // local tag
136
- onError(`Could not resolve tag: ${source}`);
137
- return null;
138
- }
139
- /**
140
- * Given a fully resolved tag, returns its printable string form,
141
- * taking into account current tag prefixes and defaults.
142
- */
143
- tagString(tag) {
144
- for (const [handle, prefix] of Object.entries(this.tags)) {
145
- if (tag.startsWith(prefix))
146
- return handle + escapeTagName(tag.substring(prefix.length));
147
- }
148
- return tag[0] === '!' ? tag : `!<${tag}>`;
149
- }
150
- toString(doc) {
151
- const lines = this.yaml.explicit
152
- ? [`%YAML ${this.yaml.version || '1.2'}`]
153
- : [];
154
- const tagEntries = Object.entries(this.tags);
155
- let tagNames;
156
- if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {
157
- const tags = {};
158
- visit.visit(doc.contents, (_key, node) => {
159
- if (identity.isNode(node) && node.tag)
160
- tags[node.tag] = true;
161
- });
162
- tagNames = Object.keys(tags);
163
- }
164
- else
165
- tagNames = [];
166
- for (const [handle, prefix] of tagEntries) {
167
- if (handle === '!!' && prefix === 'tag:yaml.org,2002:')
168
- continue;
169
- if (!doc || tagNames.some(tn => tn.startsWith(prefix)))
170
- lines.push(`%TAG ${handle} ${prefix}`);
171
- }
172
- return lines.join('\n');
173
- }
174
- }
175
- Directives.defaultYaml = { explicit: false, version: '1.2' };
176
- Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' };
177
-
178
- exports.Directives = Directives;
@@ -1,176 +0,0 @@
1
- import { isNode } from '../nodes/identity.mjs';
2
- import { visit } from '../visit.mjs';
3
-
4
- const escapeChars = {
5
- '!': '%21',
6
- ',': '%2C',
7
- '[': '%5B',
8
- ']': '%5D',
9
- '{': '%7B',
10
- '}': '%7D'
11
- };
12
- const escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, ch => escapeChars[ch]);
13
- class Directives {
14
- constructor(yaml, tags) {
15
- /**
16
- * The directives-end/doc-start marker `---`. If `null`, a marker may still be
17
- * included in the document's stringified representation.
18
- */
19
- this.docStart = null;
20
- /** The doc-end marker `...`. */
21
- this.docEnd = false;
22
- this.yaml = Object.assign({}, Directives.defaultYaml, yaml);
23
- this.tags = Object.assign({}, Directives.defaultTags, tags);
24
- }
25
- clone() {
26
- const copy = new Directives(this.yaml, this.tags);
27
- copy.docStart = this.docStart;
28
- return copy;
29
- }
30
- /**
31
- * During parsing, get a Directives instance for the current document and
32
- * update the stream state according to the current version's spec.
33
- */
34
- atDocument() {
35
- const res = new Directives(this.yaml, this.tags);
36
- switch (this.yaml.version) {
37
- case '1.1':
38
- this.atNextDocument = true;
39
- break;
40
- case '1.2':
41
- this.atNextDocument = false;
42
- this.yaml = {
43
- explicit: Directives.defaultYaml.explicit,
44
- version: '1.2'
45
- };
46
- this.tags = Object.assign({}, Directives.defaultTags);
47
- break;
48
- }
49
- return res;
50
- }
51
- /**
52
- * @param onError - May be called even if the action was successful
53
- * @returns `true` on success
54
- */
55
- add(line, onError) {
56
- if (this.atNextDocument) {
57
- this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };
58
- this.tags = Object.assign({}, Directives.defaultTags);
59
- this.atNextDocument = false;
60
- }
61
- const parts = line.trim().split(/[ \t]+/);
62
- const name = parts.shift();
63
- switch (name) {
64
- case '%TAG': {
65
- if (parts.length !== 2) {
66
- onError(0, '%TAG directive should contain exactly two parts');
67
- if (parts.length < 2)
68
- return false;
69
- }
70
- const [handle, prefix] = parts;
71
- this.tags[handle] = prefix;
72
- return true;
73
- }
74
- case '%YAML': {
75
- this.yaml.explicit = true;
76
- if (parts.length !== 1) {
77
- onError(0, '%YAML directive should contain exactly one part');
78
- return false;
79
- }
80
- const [version] = parts;
81
- if (version === '1.1' || version === '1.2') {
82
- this.yaml.version = version;
83
- return true;
84
- }
85
- else {
86
- const isValid = /^\d+\.\d+$/.test(version);
87
- onError(6, `Unsupported YAML version ${version}`, isValid);
88
- return false;
89
- }
90
- }
91
- default:
92
- onError(0, `Unknown directive ${name}`, true);
93
- return false;
94
- }
95
- }
96
- /**
97
- * Resolves a tag, matching handles to those defined in %TAG directives.
98
- *
99
- * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
100
- * `'!local'` tag, or `null` if unresolvable.
101
- */
102
- tagName(source, onError) {
103
- if (source === '!')
104
- return '!'; // non-specific tag
105
- if (source[0] !== '!') {
106
- onError(`Not a valid tag: ${source}`);
107
- return null;
108
- }
109
- if (source[1] === '<') {
110
- const verbatim = source.slice(2, -1);
111
- if (verbatim === '!' || verbatim === '!!') {
112
- onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
113
- return null;
114
- }
115
- if (source[source.length - 1] !== '>')
116
- onError('Verbatim tags must end with a >');
117
- return verbatim;
118
- }
119
- const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
120
- if (!suffix)
121
- onError(`The ${source} tag has no suffix`);
122
- const prefix = this.tags[handle];
123
- if (prefix) {
124
- try {
125
- return prefix + decodeURIComponent(suffix);
126
- }
127
- catch (error) {
128
- onError(String(error));
129
- return null;
130
- }
131
- }
132
- if (handle === '!')
133
- return source; // local tag
134
- onError(`Could not resolve tag: ${source}`);
135
- return null;
136
- }
137
- /**
138
- * Given a fully resolved tag, returns its printable string form,
139
- * taking into account current tag prefixes and defaults.
140
- */
141
- tagString(tag) {
142
- for (const [handle, prefix] of Object.entries(this.tags)) {
143
- if (tag.startsWith(prefix))
144
- return handle + escapeTagName(tag.substring(prefix.length));
145
- }
146
- return tag[0] === '!' ? tag : `!<${tag}>`;
147
- }
148
- toString(doc) {
149
- const lines = this.yaml.explicit
150
- ? [`%YAML ${this.yaml.version || '1.2'}`]
151
- : [];
152
- const tagEntries = Object.entries(this.tags);
153
- let tagNames;
154
- if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
155
- const tags = {};
156
- visit(doc.contents, (_key, node) => {
157
- if (isNode(node) && node.tag)
158
- tags[node.tag] = true;
159
- });
160
- tagNames = Object.keys(tags);
161
- }
162
- else
163
- tagNames = [];
164
- for (const [handle, prefix] of tagEntries) {
165
- if (handle === '!!' && prefix === 'tag:yaml.org,2002:')
166
- continue;
167
- if (!doc || tagNames.some(tn => tn.startsWith(prefix)))
168
- lines.push(`%TAG ${handle} ${prefix}`);
169
- }
170
- return lines.join('\n');
171
- }
172
- }
173
- Directives.defaultYaml = { explicit: false, version: '1.2' };
174
- Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' };
175
-
176
- export { Directives };
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- class YAMLError extends Error {
4
- constructor(name, pos, code, message) {
5
- super();
6
- this.name = name;
7
- this.code = code;
8
- this.message = message;
9
- this.pos = pos;
10
- }
11
- }
12
- class YAMLParseError extends YAMLError {
13
- constructor(pos, code, message) {
14
- super('YAMLParseError', pos, code, message);
15
- }
16
- }
17
- class YAMLWarning extends YAMLError {
18
- constructor(pos, code, message) {
19
- super('YAMLWarning', pos, code, message);
20
- }
21
- }
22
- const prettifyError = (src, lc) => (error) => {
23
- if (error.pos[0] === -1)
24
- return;
25
- error.linePos = error.pos.map(pos => lc.linePos(pos));
26
- const { line, col } = error.linePos[0];
27
- error.message += ` at line ${line}, column ${col}`;
28
- let ci = col - 1;
29
- let lineStr = src
30
- .substring(lc.lineStarts[line - 1], lc.lineStarts[line])
31
- .replace(/[\n\r]+$/, '');
32
- // Trim to max 80 chars, keeping col position near the middle
33
- if (ci >= 60 && lineStr.length > 80) {
34
- const trimStart = Math.min(ci - 39, lineStr.length - 79);
35
- lineStr = '…' + lineStr.substring(trimStart);
36
- ci -= trimStart - 1;
37
- }
38
- if (lineStr.length > 80)
39
- lineStr = lineStr.substring(0, 79) + '…';
40
- // Include previous line in context if pointing at line start
41
- if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {
42
- // Regexp won't match if start is trimmed
43
- let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);
44
- if (prev.length > 80)
45
- prev = prev.substring(0, 79) + '…\n';
46
- lineStr = prev + lineStr;
47
- }
48
- if (/[^ ]/.test(lineStr)) {
49
- let count = 1;
50
- const end = error.linePos[1];
51
- if (end?.line === line && end.col > col) {
52
- count = Math.max(1, Math.min(end.col - col, 80 - ci));
53
- }
54
- const pointer = ' '.repeat(ci) + '^'.repeat(count);
55
- error.message += `:\n\n${lineStr}\n${pointer}\n`;
56
- }
57
- };
58
-
59
- exports.YAMLError = YAMLError;
60
- exports.YAMLParseError = YAMLParseError;
61
- exports.YAMLWarning = YAMLWarning;
62
- exports.prettifyError = prettifyError;
@@ -1,57 +0,0 @@
1
- class YAMLError extends Error {
2
- constructor(name, pos, code, message) {
3
- super();
4
- this.name = name;
5
- this.code = code;
6
- this.message = message;
7
- this.pos = pos;
8
- }
9
- }
10
- class YAMLParseError extends YAMLError {
11
- constructor(pos, code, message) {
12
- super('YAMLParseError', pos, code, message);
13
- }
14
- }
15
- class YAMLWarning extends YAMLError {
16
- constructor(pos, code, message) {
17
- super('YAMLWarning', pos, code, message);
18
- }
19
- }
20
- const prettifyError = (src, lc) => (error) => {
21
- if (error.pos[0] === -1)
22
- return;
23
- error.linePos = error.pos.map(pos => lc.linePos(pos));
24
- const { line, col } = error.linePos[0];
25
- error.message += ` at line ${line}, column ${col}`;
26
- let ci = col - 1;
27
- let lineStr = src
28
- .substring(lc.lineStarts[line - 1], lc.lineStarts[line])
29
- .replace(/[\n\r]+$/, '');
30
- // Trim to max 80 chars, keeping col position near the middle
31
- if (ci >= 60 && lineStr.length > 80) {
32
- const trimStart = Math.min(ci - 39, lineStr.length - 79);
33
- lineStr = '…' + lineStr.substring(trimStart);
34
- ci -= trimStart - 1;
35
- }
36
- if (lineStr.length > 80)
37
- lineStr = lineStr.substring(0, 79) + '…';
38
- // Include previous line in context if pointing at line start
39
- if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {
40
- // Regexp won't match if start is trimmed
41
- let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);
42
- if (prev.length > 80)
43
- prev = prev.substring(0, 79) + '…\n';
44
- lineStr = prev + lineStr;
45
- }
46
- if (/[^ ]/.test(lineStr)) {
47
- let count = 1;
48
- const end = error.linePos[1];
49
- if (end?.line === line && end.col > col) {
50
- count = Math.max(1, Math.min(end.col - col, 80 - ci));
51
- }
52
- const pointer = ' '.repeat(ci) + '^'.repeat(count);
53
- error.message += `:\n\n${lineStr}\n${pointer}\n`;
54
- }
55
- };
56
-
57
- export { YAMLError, YAMLParseError, YAMLWarning, prettifyError };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- function warn(logLevel, warning) {
4
- if (logLevel === 'debug' || logLevel === 'warn') {
5
- console.warn(warning);
6
- }
7
- }
8
-
9
- exports.warn = warn;
@@ -1,7 +0,0 @@
1
- function warn(logLevel, warning) {
2
- if (logLevel === 'debug' || logLevel === 'warn') {
3
- console.warn(warning);
4
- }
5
- }
6
-
7
- export { warn };
@@ -1,116 +0,0 @@
1
- 'use strict';
2
-
3
- var anchors = require('../doc/anchors.js');
4
- var visit = require('../visit.js');
5
- var identity = require('./identity.js');
6
- var Node = require('./Node.js');
7
- var toJS = require('./toJS.js');
8
-
9
- class Alias extends Node.NodeBase {
10
- constructor(source) {
11
- super(identity.ALIAS);
12
- this.source = source;
13
- Object.defineProperty(this, 'tag', {
14
- set() {
15
- throw new Error('Alias nodes cannot have tags');
16
- }
17
- });
18
- }
19
- /**
20
- * Resolve the value of this alias within `doc`, finding the last
21
- * instance of the `source` anchor before this node.
22
- */
23
- resolve(doc, ctx) {
24
- let nodes;
25
- if (ctx?.aliasResolveCache) {
26
- nodes = ctx.aliasResolveCache;
27
- }
28
- else {
29
- nodes = [];
30
- visit.visit(doc, {
31
- Node: (_key, node) => {
32
- if (identity.isAlias(node) || identity.hasAnchor(node))
33
- nodes.push(node);
34
- }
35
- });
36
- if (ctx)
37
- ctx.aliasResolveCache = nodes;
38
- }
39
- let found = undefined;
40
- for (const node of nodes) {
41
- if (node === this)
42
- break;
43
- if (node.anchor === this.source)
44
- found = node;
45
- }
46
- return found;
47
- }
48
- toJSON(_arg, ctx) {
49
- if (!ctx)
50
- return { source: this.source };
51
- const { anchors, doc, maxAliasCount } = ctx;
52
- const source = this.resolve(doc, ctx);
53
- if (!source) {
54
- const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
55
- throw new ReferenceError(msg);
56
- }
57
- let data = anchors.get(source);
58
- if (!data) {
59
- // Resolve anchors for Node.prototype.toJS()
60
- toJS.toJS(source, null, ctx);
61
- data = anchors.get(source);
62
- }
63
- /* istanbul ignore if */
64
- if (data?.res === undefined) {
65
- const msg = 'This should not happen: Alias anchor was not resolved?';
66
- throw new ReferenceError(msg);
67
- }
68
- if (maxAliasCount >= 0) {
69
- data.count += 1;
70
- if (data.aliasCount === 0)
71
- data.aliasCount = getAliasCount(doc, source, anchors);
72
- if (data.count * data.aliasCount > maxAliasCount) {
73
- const msg = 'Excessive alias count indicates a resource exhaustion attack';
74
- throw new ReferenceError(msg);
75
- }
76
- }
77
- return data.res;
78
- }
79
- toString(ctx, _onComment, _onChompKeep) {
80
- const src = `*${this.source}`;
81
- if (ctx) {
82
- anchors.anchorIsValid(this.source);
83
- if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
84
- const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
85
- throw new Error(msg);
86
- }
87
- if (ctx.implicitKey)
88
- return `${src} `;
89
- }
90
- return src;
91
- }
92
- }
93
- function getAliasCount(doc, node, anchors) {
94
- if (identity.isAlias(node)) {
95
- const source = node.resolve(doc);
96
- const anchor = anchors && source && anchors.get(source);
97
- return anchor ? anchor.count * anchor.aliasCount : 0;
98
- }
99
- else if (identity.isCollection(node)) {
100
- let count = 0;
101
- for (const item of node.items) {
102
- const c = getAliasCount(doc, item, anchors);
103
- if (c > count)
104
- count = c;
105
- }
106
- return count;
107
- }
108
- else if (identity.isPair(node)) {
109
- const kc = getAliasCount(doc, node.key, anchors);
110
- const vc = getAliasCount(doc, node.value, anchors);
111
- return Math.max(kc, vc);
112
- }
113
- return 1;
114
- }
115
-
116
- exports.Alias = Alias;