@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,131 +0,0 @@
1
- 'use strict';
2
-
3
- var anchors = require('../doc/anchors.js');
4
- var identity = require('../nodes/identity.js');
5
- var stringifyComment = require('./stringifyComment.js');
6
- var stringifyString = require('./stringifyString.js');
7
-
8
- function createStringifyContext(doc, options) {
9
- const opt = Object.assign({
10
- blockQuote: true,
11
- commentString: stringifyComment.stringifyComment,
12
- defaultKeyType: null,
13
- defaultStringType: 'PLAIN',
14
- directives: null,
15
- doubleQuotedAsJSON: false,
16
- doubleQuotedMinMultiLineLength: 40,
17
- falseStr: 'false',
18
- flowCollectionPadding: true,
19
- indentSeq: true,
20
- lineWidth: 80,
21
- minContentWidth: 20,
22
- nullStr: 'null',
23
- simpleKeys: false,
24
- singleQuote: null,
25
- trueStr: 'true',
26
- verifyAliasOrder: true
27
- }, doc.schema.toStringOptions, options);
28
- let inFlow;
29
- switch (opt.collectionStyle) {
30
- case 'block':
31
- inFlow = false;
32
- break;
33
- case 'flow':
34
- inFlow = true;
35
- break;
36
- default:
37
- inFlow = null;
38
- }
39
- return {
40
- anchors: new Set(),
41
- doc,
42
- flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',
43
- indent: '',
44
- indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',
45
- inFlow,
46
- options: opt
47
- };
48
- }
49
- function getTagObject(tags, item) {
50
- if (item.tag) {
51
- const match = tags.filter(t => t.tag === item.tag);
52
- if (match.length > 0)
53
- return match.find(t => t.format === item.format) ?? match[0];
54
- }
55
- let tagObj = undefined;
56
- let obj;
57
- if (identity.isScalar(item)) {
58
- obj = item.value;
59
- let match = tags.filter(t => t.identify?.(obj));
60
- if (match.length > 1) {
61
- const testMatch = match.filter(t => t.test);
62
- if (testMatch.length > 0)
63
- match = testMatch;
64
- }
65
- tagObj =
66
- match.find(t => t.format === item.format) ?? match.find(t => !t.format);
67
- }
68
- else {
69
- obj = item;
70
- tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
71
- }
72
- if (!tagObj) {
73
- const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);
74
- throw new Error(`Tag not resolved for ${name} value`);
75
- }
76
- return tagObj;
77
- }
78
- // needs to be called before value stringifier to allow for circular anchor refs
79
- function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {
80
- if (!doc.directives)
81
- return '';
82
- const props = [];
83
- const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;
84
- if (anchor && anchors.anchorIsValid(anchor)) {
85
- anchors$1.add(anchor);
86
- props.push(`&${anchor}`);
87
- }
88
- const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
89
- if (tag)
90
- props.push(doc.directives.tagString(tag));
91
- return props.join(' ');
92
- }
93
- function stringify(item, ctx, onComment, onChompKeep) {
94
- if (identity.isPair(item))
95
- return item.toString(ctx, onComment, onChompKeep);
96
- if (identity.isAlias(item)) {
97
- if (ctx.doc.directives)
98
- return item.toString(ctx);
99
- if (ctx.resolvedAliases?.has(item)) {
100
- throw new TypeError(`Cannot stringify circular structure without alias nodes`);
101
- }
102
- else {
103
- if (ctx.resolvedAliases)
104
- ctx.resolvedAliases.add(item);
105
- else
106
- ctx.resolvedAliases = new Set([item]);
107
- item = item.resolve(ctx.doc);
108
- }
109
- }
110
- let tagObj = undefined;
111
- const node = identity.isNode(item)
112
- ? item
113
- : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
114
- tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
115
- const props = stringifyProps(node, tagObj, ctx);
116
- if (props.length > 0)
117
- ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
118
- const str = typeof tagObj.stringify === 'function'
119
- ? tagObj.stringify(node, ctx, onComment, onChompKeep)
120
- : identity.isScalar(node)
121
- ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)
122
- : node.toString(ctx, onComment, onChompKeep);
123
- if (!props)
124
- return str;
125
- return identity.isScalar(node) || str[0] === '{' || str[0] === '['
126
- ? `${props} ${str}`
127
- : `${props}\n${ctx.indent}${str}`;
128
- }
129
-
130
- exports.createStringifyContext = createStringifyContext;
131
- exports.stringify = stringify;
@@ -1,128 +0,0 @@
1
- import { anchorIsValid } from '../doc/anchors.mjs';
2
- import { isPair, isAlias, isNode, isScalar, isCollection } from '../nodes/identity.mjs';
3
- import { stringifyComment } from './stringifyComment.mjs';
4
- import { stringifyString } from './stringifyString.mjs';
5
-
6
- function createStringifyContext(doc, options) {
7
- const opt = Object.assign({
8
- blockQuote: true,
9
- commentString: stringifyComment,
10
- defaultKeyType: null,
11
- defaultStringType: 'PLAIN',
12
- directives: null,
13
- doubleQuotedAsJSON: false,
14
- doubleQuotedMinMultiLineLength: 40,
15
- falseStr: 'false',
16
- flowCollectionPadding: true,
17
- indentSeq: true,
18
- lineWidth: 80,
19
- minContentWidth: 20,
20
- nullStr: 'null',
21
- simpleKeys: false,
22
- singleQuote: null,
23
- trueStr: 'true',
24
- verifyAliasOrder: true
25
- }, doc.schema.toStringOptions, options);
26
- let inFlow;
27
- switch (opt.collectionStyle) {
28
- case 'block':
29
- inFlow = false;
30
- break;
31
- case 'flow':
32
- inFlow = true;
33
- break;
34
- default:
35
- inFlow = null;
36
- }
37
- return {
38
- anchors: new Set(),
39
- doc,
40
- flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',
41
- indent: '',
42
- indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',
43
- inFlow,
44
- options: opt
45
- };
46
- }
47
- function getTagObject(tags, item) {
48
- if (item.tag) {
49
- const match = tags.filter(t => t.tag === item.tag);
50
- if (match.length > 0)
51
- return match.find(t => t.format === item.format) ?? match[0];
52
- }
53
- let tagObj = undefined;
54
- let obj;
55
- if (isScalar(item)) {
56
- obj = item.value;
57
- let match = tags.filter(t => t.identify?.(obj));
58
- if (match.length > 1) {
59
- const testMatch = match.filter(t => t.test);
60
- if (testMatch.length > 0)
61
- match = testMatch;
62
- }
63
- tagObj =
64
- match.find(t => t.format === item.format) ?? match.find(t => !t.format);
65
- }
66
- else {
67
- obj = item;
68
- tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
69
- }
70
- if (!tagObj) {
71
- const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);
72
- throw new Error(`Tag not resolved for ${name} value`);
73
- }
74
- return tagObj;
75
- }
76
- // needs to be called before value stringifier to allow for circular anchor refs
77
- function stringifyProps(node, tagObj, { anchors, doc }) {
78
- if (!doc.directives)
79
- return '';
80
- const props = [];
81
- const anchor = (isScalar(node) || isCollection(node)) && node.anchor;
82
- if (anchor && anchorIsValid(anchor)) {
83
- anchors.add(anchor);
84
- props.push(`&${anchor}`);
85
- }
86
- const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
87
- if (tag)
88
- props.push(doc.directives.tagString(tag));
89
- return props.join(' ');
90
- }
91
- function stringify(item, ctx, onComment, onChompKeep) {
92
- if (isPair(item))
93
- return item.toString(ctx, onComment, onChompKeep);
94
- if (isAlias(item)) {
95
- if (ctx.doc.directives)
96
- return item.toString(ctx);
97
- if (ctx.resolvedAliases?.has(item)) {
98
- throw new TypeError(`Cannot stringify circular structure without alias nodes`);
99
- }
100
- else {
101
- if (ctx.resolvedAliases)
102
- ctx.resolvedAliases.add(item);
103
- else
104
- ctx.resolvedAliases = new Set([item]);
105
- item = item.resolve(ctx.doc);
106
- }
107
- }
108
- let tagObj = undefined;
109
- const node = isNode(item)
110
- ? item
111
- : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
112
- tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
113
- const props = stringifyProps(node, tagObj, ctx);
114
- if (props.length > 0)
115
- ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
116
- const str = typeof tagObj.stringify === 'function'
117
- ? tagObj.stringify(node, ctx, onComment, onChompKeep)
118
- : isScalar(node)
119
- ? stringifyString(node, ctx, onComment, onChompKeep)
120
- : node.toString(ctx, onComment, onChompKeep);
121
- if (!props)
122
- return str;
123
- return isScalar(node) || str[0] === '{' || str[0] === '['
124
- ? `${props} ${str}`
125
- : `${props}\n${ctx.indent}${str}`;
126
- }
127
-
128
- export { createStringifyContext, stringify };
@@ -1,145 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../nodes/identity.js');
4
- var stringify = require('./stringify.js');
5
- var stringifyComment = require('./stringifyComment.js');
6
-
7
- function stringifyCollection(collection, ctx, options) {
8
- const flow = ctx.inFlow ?? collection.flow;
9
- const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
10
- return stringify(collection, ctx, options);
11
- }
12
- function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
13
- const { indent, options: { commentString } } = ctx;
14
- const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
15
- let chompKeep = false; // flag for the preceding node's status
16
- const lines = [];
17
- for (let i = 0; i < items.length; ++i) {
18
- const item = items[i];
19
- let comment = null;
20
- if (identity.isNode(item)) {
21
- if (!chompKeep && item.spaceBefore)
22
- lines.push('');
23
- addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
24
- if (item.comment)
25
- comment = item.comment;
26
- }
27
- else if (identity.isPair(item)) {
28
- const ik = identity.isNode(item.key) ? item.key : null;
29
- if (ik) {
30
- if (!chompKeep && ik.spaceBefore)
31
- lines.push('');
32
- addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
33
- }
34
- }
35
- chompKeep = false;
36
- let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));
37
- if (comment)
38
- str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
39
- if (chompKeep && comment)
40
- chompKeep = false;
41
- lines.push(blockItemPrefix + str);
42
- }
43
- let str;
44
- if (lines.length === 0) {
45
- str = flowChars.start + flowChars.end;
46
- }
47
- else {
48
- str = lines[0];
49
- for (let i = 1; i < lines.length; ++i) {
50
- const line = lines[i];
51
- str += line ? `\n${indent}${line}` : '\n';
52
- }
53
- }
54
- if (comment) {
55
- str += '\n' + stringifyComment.indentComment(commentString(comment), indent);
56
- if (onComment)
57
- onComment();
58
- }
59
- else if (chompKeep && onChompKeep)
60
- onChompKeep();
61
- return str;
62
- }
63
- function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
64
- const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
65
- itemIndent += indentStep;
66
- const itemCtx = Object.assign({}, ctx, {
67
- indent: itemIndent,
68
- inFlow: true,
69
- type: null
70
- });
71
- let reqNewline = false;
72
- let linesAtValue = 0;
73
- const lines = [];
74
- for (let i = 0; i < items.length; ++i) {
75
- const item = items[i];
76
- let comment = null;
77
- if (identity.isNode(item)) {
78
- if (item.spaceBefore)
79
- lines.push('');
80
- addCommentBefore(ctx, lines, item.commentBefore, false);
81
- if (item.comment)
82
- comment = item.comment;
83
- }
84
- else if (identity.isPair(item)) {
85
- const ik = identity.isNode(item.key) ? item.key : null;
86
- if (ik) {
87
- if (ik.spaceBefore)
88
- lines.push('');
89
- addCommentBefore(ctx, lines, ik.commentBefore, false);
90
- if (ik.comment)
91
- reqNewline = true;
92
- }
93
- const iv = identity.isNode(item.value) ? item.value : null;
94
- if (iv) {
95
- if (iv.comment)
96
- comment = iv.comment;
97
- if (iv.commentBefore)
98
- reqNewline = true;
99
- }
100
- else if (item.value == null && ik?.comment) {
101
- comment = ik.comment;
102
- }
103
- }
104
- if (comment)
105
- reqNewline = true;
106
- let str = stringify.stringify(item, itemCtx, () => (comment = null));
107
- if (i < items.length - 1)
108
- str += ',';
109
- if (comment)
110
- str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
111
- if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
112
- reqNewline = true;
113
- lines.push(str);
114
- linesAtValue = lines.length;
115
- }
116
- const { start, end } = flowChars;
117
- if (lines.length === 0) {
118
- return start + end;
119
- }
120
- else {
121
- if (!reqNewline) {
122
- const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
123
- reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
124
- }
125
- if (reqNewline) {
126
- let str = start;
127
- for (const line of lines)
128
- str += line ? `\n${indentStep}${indent}${line}` : '\n';
129
- return `${str}\n${indent}${end}`;
130
- }
131
- else {
132
- return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;
133
- }
134
- }
135
- }
136
- function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
137
- if (comment && chompKeep)
138
- comment = comment.replace(/^\n+/, '');
139
- if (comment) {
140
- const ic = stringifyComment.indentComment(commentString(comment), indent);
141
- lines.push(ic.trimStart()); // Avoid double indent on first line
142
- }
143
- }
144
-
145
- exports.stringifyCollection = stringifyCollection;
@@ -1,143 +0,0 @@
1
- import { isNode, isPair } from '../nodes/identity.mjs';
2
- import { stringify } from './stringify.mjs';
3
- import { lineComment, indentComment } from './stringifyComment.mjs';
4
-
5
- function stringifyCollection(collection, ctx, options) {
6
- const flow = ctx.inFlow ?? collection.flow;
7
- const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
8
- return stringify(collection, ctx, options);
9
- }
10
- function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
11
- const { indent, options: { commentString } } = ctx;
12
- const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
13
- let chompKeep = false; // flag for the preceding node's status
14
- const lines = [];
15
- for (let i = 0; i < items.length; ++i) {
16
- const item = items[i];
17
- let comment = null;
18
- if (isNode(item)) {
19
- if (!chompKeep && item.spaceBefore)
20
- lines.push('');
21
- addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
22
- if (item.comment)
23
- comment = item.comment;
24
- }
25
- else if (isPair(item)) {
26
- const ik = isNode(item.key) ? item.key : null;
27
- if (ik) {
28
- if (!chompKeep && ik.spaceBefore)
29
- lines.push('');
30
- addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
31
- }
32
- }
33
- chompKeep = false;
34
- let str = stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));
35
- if (comment)
36
- str += lineComment(str, itemIndent, commentString(comment));
37
- if (chompKeep && comment)
38
- chompKeep = false;
39
- lines.push(blockItemPrefix + str);
40
- }
41
- let str;
42
- if (lines.length === 0) {
43
- str = flowChars.start + flowChars.end;
44
- }
45
- else {
46
- str = lines[0];
47
- for (let i = 1; i < lines.length; ++i) {
48
- const line = lines[i];
49
- str += line ? `\n${indent}${line}` : '\n';
50
- }
51
- }
52
- if (comment) {
53
- str += '\n' + indentComment(commentString(comment), indent);
54
- if (onComment)
55
- onComment();
56
- }
57
- else if (chompKeep && onChompKeep)
58
- onChompKeep();
59
- return str;
60
- }
61
- function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
62
- const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
63
- itemIndent += indentStep;
64
- const itemCtx = Object.assign({}, ctx, {
65
- indent: itemIndent,
66
- inFlow: true,
67
- type: null
68
- });
69
- let reqNewline = false;
70
- let linesAtValue = 0;
71
- const lines = [];
72
- for (let i = 0; i < items.length; ++i) {
73
- const item = items[i];
74
- let comment = null;
75
- if (isNode(item)) {
76
- if (item.spaceBefore)
77
- lines.push('');
78
- addCommentBefore(ctx, lines, item.commentBefore, false);
79
- if (item.comment)
80
- comment = item.comment;
81
- }
82
- else if (isPair(item)) {
83
- const ik = isNode(item.key) ? item.key : null;
84
- if (ik) {
85
- if (ik.spaceBefore)
86
- lines.push('');
87
- addCommentBefore(ctx, lines, ik.commentBefore, false);
88
- if (ik.comment)
89
- reqNewline = true;
90
- }
91
- const iv = isNode(item.value) ? item.value : null;
92
- if (iv) {
93
- if (iv.comment)
94
- comment = iv.comment;
95
- if (iv.commentBefore)
96
- reqNewline = true;
97
- }
98
- else if (item.value == null && ik?.comment) {
99
- comment = ik.comment;
100
- }
101
- }
102
- if (comment)
103
- reqNewline = true;
104
- let str = stringify(item, itemCtx, () => (comment = null));
105
- if (i < items.length - 1)
106
- str += ',';
107
- if (comment)
108
- str += lineComment(str, itemIndent, commentString(comment));
109
- if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
110
- reqNewline = true;
111
- lines.push(str);
112
- linesAtValue = lines.length;
113
- }
114
- const { start, end } = flowChars;
115
- if (lines.length === 0) {
116
- return start + end;
117
- }
118
- else {
119
- if (!reqNewline) {
120
- const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
121
- reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
122
- }
123
- if (reqNewline) {
124
- let str = start;
125
- for (const line of lines)
126
- str += line ? `\n${indentStep}${indent}${line}` : '\n';
127
- return `${str}\n${indent}${end}`;
128
- }
129
- else {
130
- return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;
131
- }
132
- }
133
- }
134
- function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
135
- if (comment && chompKeep)
136
- comment = comment.replace(/^\n+/, '');
137
- if (comment) {
138
- const ic = indentComment(commentString(comment), indent);
139
- lines.push(ic.trimStart()); // Avoid double indent on first line
140
- }
141
- }
142
-
143
- export { stringifyCollection };
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Stringifies a comment.
5
- *
6
- * Empty comment lines are left empty,
7
- * lines consisting of a single space are replaced by `#`,
8
- * and all other lines are prefixed with a `#`.
9
- */
10
- const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');
11
- function indentComment(comment, indent) {
12
- if (/^\n+$/.test(comment))
13
- return comment.substring(1);
14
- return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
15
- }
16
- const lineComment = (str, indent, comment) => str.endsWith('\n')
17
- ? indentComment(comment, indent)
18
- : comment.includes('\n')
19
- ? '\n' + indentComment(comment, indent)
20
- : (str.endsWith(' ') ? '' : ' ') + comment;
21
-
22
- exports.indentComment = indentComment;
23
- exports.lineComment = lineComment;
24
- exports.stringifyComment = stringifyComment;
@@ -1,20 +0,0 @@
1
- /**
2
- * Stringifies a comment.
3
- *
4
- * Empty comment lines are left empty,
5
- * lines consisting of a single space are replaced by `#`,
6
- * and all other lines are prefixed with a `#`.
7
- */
8
- const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');
9
- function indentComment(comment, indent) {
10
- if (/^\n+$/.test(comment))
11
- return comment.substring(1);
12
- return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
13
- }
14
- const lineComment = (str, indent, comment) => str.endsWith('\n')
15
- ? indentComment(comment, indent)
16
- : comment.includes('\n')
17
- ? '\n' + indentComment(comment, indent)
18
- : (str.endsWith(' ') ? '' : ' ') + comment;
19
-
20
- export { indentComment, lineComment, stringifyComment };
@@ -1,87 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../nodes/identity.js');
4
- var stringify = require('./stringify.js');
5
- var stringifyComment = require('./stringifyComment.js');
6
-
7
- function stringifyDocument(doc, options) {
8
- const lines = [];
9
- let hasDirectives = options.directives === true;
10
- if (options.directives !== false && doc.directives) {
11
- const dir = doc.directives.toString(doc);
12
- if (dir) {
13
- lines.push(dir);
14
- hasDirectives = true;
15
- }
16
- else if (doc.directives.docStart)
17
- hasDirectives = true;
18
- }
19
- if (hasDirectives)
20
- lines.push('---');
21
- const ctx = stringify.createStringifyContext(doc, options);
22
- const { commentString } = ctx.options;
23
- if (doc.commentBefore) {
24
- if (lines.length !== 1)
25
- lines.unshift('');
26
- const cs = commentString(doc.commentBefore);
27
- lines.unshift(stringifyComment.indentComment(cs, ''));
28
- }
29
- let chompKeep = false;
30
- let contentComment = null;
31
- if (doc.contents) {
32
- if (identity.isNode(doc.contents)) {
33
- if (doc.contents.spaceBefore && hasDirectives)
34
- lines.push('');
35
- if (doc.contents.commentBefore) {
36
- const cs = commentString(doc.contents.commentBefore);
37
- lines.push(stringifyComment.indentComment(cs, ''));
38
- }
39
- // top-level block scalars need to be indented if followed by a comment
40
- ctx.forceBlockIndent = !!doc.comment;
41
- contentComment = doc.contents.comment;
42
- }
43
- const onChompKeep = contentComment ? undefined : () => (chompKeep = true);
44
- let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);
45
- if (contentComment)
46
- body += stringifyComment.lineComment(body, '', commentString(contentComment));
47
- if ((body[0] === '|' || body[0] === '>') &&
48
- lines[lines.length - 1] === '---') {
49
- // Top-level block scalars with a preceding doc marker ought to use the
50
- // same line for their header.
51
- lines[lines.length - 1] = `--- ${body}`;
52
- }
53
- else
54
- lines.push(body);
55
- }
56
- else {
57
- lines.push(stringify.stringify(doc.contents, ctx));
58
- }
59
- if (doc.directives?.docEnd) {
60
- if (doc.comment) {
61
- const cs = commentString(doc.comment);
62
- if (cs.includes('\n')) {
63
- lines.push('...');
64
- lines.push(stringifyComment.indentComment(cs, ''));
65
- }
66
- else {
67
- lines.push(`... ${cs}`);
68
- }
69
- }
70
- else {
71
- lines.push('...');
72
- }
73
- }
74
- else {
75
- let dc = doc.comment;
76
- if (dc && chompKeep)
77
- dc = dc.replace(/^\n+/, '');
78
- if (dc) {
79
- if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')
80
- lines.push('');
81
- lines.push(stringifyComment.indentComment(commentString(dc), ''));
82
- }
83
- }
84
- return lines.join('\n') + '\n';
85
- }
86
-
87
- exports.stringifyDocument = stringifyDocument;