@windrun-huaiin/dev-scripts 14.1.2 → 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 (242) 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/dist/commands/diaomao-update.d.ts.map +1 -1
  5. package/dist/commands/diaomao-update.js +13 -5
  6. package/dist/commands/diaomao-update.mjs +13 -5
  7. package/dist/config/schema.d.ts.map +1 -1
  8. package/dist/config/schema.js +74 -1
  9. package/dist/config/schema.mjs +74 -1
  10. package/package.json +1 -1
  11. package/dist/_virtual/_commonjsHelpers.js +0 -7
  12. package/dist/_virtual/_commonjsHelpers.mjs +0 -5
  13. package/dist/_virtual/index.js +0 -11
  14. package/dist/_virtual/index.mjs +0 -7
  15. package/dist/_virtual/re.js +0 -5
  16. package/dist/_virtual/re.mjs +0 -3
  17. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +0 -161
  18. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.mjs +0 -159
  19. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +0 -576
  20. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.mjs +0 -574
  21. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +0 -350
  22. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.mjs +0 -348
  23. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +0 -21
  24. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.mjs +0 -19
  25. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +0 -72
  26. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.mjs +0 -70
  27. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +0 -77
  28. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.mjs +0 -75
  29. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +0 -22
  30. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.mjs +0 -20
  31. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +0 -18
  32. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.mjs +0 -16
  33. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +0 -20
  34. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.mjs +0 -18
  35. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +0 -73
  36. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.mjs +0 -71
  37. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +0 -18
  38. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.mjs +0 -16
  39. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +0 -18
  40. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.mjs +0 -16
  41. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +0 -18
  42. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.mjs +0 -16
  43. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +0 -34
  44. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.mjs +0 -32
  45. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +0 -18
  46. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.mjs +0 -16
  47. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +0 -18
  48. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.mjs +0 -16
  49. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +0 -18
  50. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.mjs +0 -16
  51. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +0 -18
  52. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.mjs +0 -16
  53. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +0 -18
  54. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.mjs +0 -16
  55. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +0 -31
  56. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.mjs +0 -29
  57. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +0 -18
  58. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.mjs +0 -16
  59. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +0 -21
  60. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.mjs +0 -19
  61. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +0 -18
  62. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.mjs +0 -16
  63. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +0 -18
  64. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.mjs +0 -16
  65. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +0 -25
  66. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.mjs +0 -23
  67. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +0 -18
  68. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.mjs +0 -16
  69. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +0 -21
  70. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.mjs +0 -19
  71. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +0 -144
  72. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.mjs +0 -142
  73. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +0 -48
  74. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.mjs +0 -46
  75. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +0 -22
  76. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.mjs +0 -20
  77. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +0 -40
  78. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.mjs +0 -38
  79. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +0 -53
  80. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.mjs +0 -51
  81. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +0 -28
  82. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.mjs +0 -26
  83. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +0 -239
  84. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.mjs +0 -237
  85. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +0 -19
  86. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.mjs +0 -17
  87. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +0 -22
  88. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.mjs +0 -20
  89. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +0 -19
  90. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.mjs +0 -17
  91. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +0 -41
  92. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.mjs +0 -39
  93. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +0 -40
  94. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.mjs +0 -38
  95. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +0 -78
  96. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.mjs +0 -76
  97. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +0 -102
  98. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.mjs +0 -100
  99. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +0 -63
  100. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.mjs +0 -61
  101. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +0 -265
  102. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.mjs +0 -263
  103. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +0 -23
  104. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.mjs +0 -21
  105. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +0 -26
  106. package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.mjs +0 -24
  107. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -90
  108. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.mjs +0 -88
  109. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -45
  110. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.mjs +0 -43
  111. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.js +0 -105
  112. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.mjs +0 -102
  113. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -88
  114. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +0 -86
  115. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js +0 -219
  116. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.mjs +0 -217
  117. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -117
  118. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +0 -115
  119. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -200
  120. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +0 -198
  121. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -51
  122. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +0 -49
  123. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -39
  124. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.mjs +0 -37
  125. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -209
  126. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +0 -207
  127. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -225
  128. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +0 -223
  129. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -148
  130. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.mjs +0 -146
  131. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -36
  132. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +0 -34
  133. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -28
  134. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +0 -26
  135. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -17
  136. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +0 -15
  137. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -15
  138. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +0 -13
  139. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.js +0 -337
  140. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.mjs +0 -335
  141. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.js +0 -76
  142. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.mjs +0 -71
  143. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -57
  144. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.mjs +0 -55
  145. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.js +0 -90
  146. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.mjs +0 -88
  147. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.js +0 -178
  148. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.mjs +0 -176
  149. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.js +0 -62
  150. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.mjs +0 -57
  151. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.js +0 -9
  152. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.mjs +0 -7
  153. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.js +0 -116
  154. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.mjs +0 -114
  155. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js +0 -151
  156. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.mjs +0 -147
  157. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.js +0 -40
  158. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.mjs +0 -38
  159. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.js +0 -39
  160. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.mjs +0 -36
  161. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -27
  162. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.mjs +0 -24
  163. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -147
  164. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +0 -144
  165. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -115
  166. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +0 -113
  167. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -65
  168. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +0 -63
  169. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.js +0 -53
  170. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.mjs +0 -36
  171. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.js +0 -39
  172. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.mjs +0 -37
  173. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.js +0 -79
  174. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.mjs +0 -73
  175. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.js +0 -719
  176. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.mjs +0 -717
  177. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.js +0 -41
  178. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.mjs +0 -39
  179. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.js +0 -969
  180. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.mjs +0 -967
  181. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.js +0 -68
  182. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.mjs +0 -64
  183. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.js +0 -39
  184. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.mjs +0 -37
  185. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.js +0 -19
  186. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.mjs +0 -17
  187. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.js +0 -17
  188. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.mjs +0 -15
  189. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.js +0 -19
  190. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.mjs +0 -17
  191. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.js +0 -16
  192. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.mjs +0 -14
  193. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.js +0 -21
  194. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.mjs +0 -19
  195. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.js +0 -47
  196. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.mjs +0 -43
  197. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.js +0 -42
  198. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.mjs +0 -38
  199. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.js +0 -25
  200. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.mjs +0 -23
  201. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.js +0 -64
  202. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.mjs +0 -62
  203. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.js +0 -99
  204. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.mjs +0 -96
  205. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -60
  206. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +0 -58
  207. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -29
  208. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +0 -26
  209. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -50
  210. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +0 -46
  211. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -76
  212. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +0 -71
  213. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -68
  214. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +0 -64
  215. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -77
  216. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +0 -74
  217. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -82
  218. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +0 -78
  219. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -41
  220. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +0 -39
  221. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -96
  222. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +0 -93
  223. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -105
  224. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +0 -101
  225. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -151
  226. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +0 -146
  227. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.js +0 -131
  228. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.mjs +0 -128
  229. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -145
  230. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +0 -143
  231. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -24
  232. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +0 -20
  233. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -87
  234. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +0 -85
  235. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -26
  236. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +0 -24
  237. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -152
  238. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +0 -150
  239. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -338
  240. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +0 -336
  241. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.js +0 -148
  242. package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.mjs +0 -146
@@ -1,71 +0,0 @@
1
- import { stringifyNumber } from '../../stringify/stringifyNumber.mjs';
2
-
3
- const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);
4
- function intResolve(str, offset, radix, { intAsBigInt }) {
5
- const sign = str[0];
6
- if (sign === '-' || sign === '+')
7
- offset += 1;
8
- str = str.substring(offset).replace(/_/g, '');
9
- if (intAsBigInt) {
10
- switch (radix) {
11
- case 2:
12
- str = `0b${str}`;
13
- break;
14
- case 8:
15
- str = `0o${str}`;
16
- break;
17
- case 16:
18
- str = `0x${str}`;
19
- break;
20
- }
21
- const n = BigInt(str);
22
- return sign === '-' ? BigInt(-1) * n : n;
23
- }
24
- const n = parseInt(str, radix);
25
- return sign === '-' ? -1 * n : n;
26
- }
27
- function intStringify(node, radix, prefix) {
28
- const { value } = node;
29
- if (intIdentify(value)) {
30
- const str = value.toString(radix);
31
- return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
32
- }
33
- return stringifyNumber(node);
34
- }
35
- const intBin = {
36
- identify: intIdentify,
37
- default: true,
38
- tag: 'tag:yaml.org,2002:int',
39
- format: 'BIN',
40
- test: /^[-+]?0b[0-1_]+$/,
41
- resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),
42
- stringify: node => intStringify(node, 2, '0b')
43
- };
44
- const intOct = {
45
- identify: intIdentify,
46
- default: true,
47
- tag: 'tag:yaml.org,2002:int',
48
- format: 'OCT',
49
- test: /^[-+]?0[0-7_]+$/,
50
- resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),
51
- stringify: node => intStringify(node, 8, '0')
52
- };
53
- const int = {
54
- identify: intIdentify,
55
- default: true,
56
- tag: 'tag:yaml.org,2002:int',
57
- test: /^[-+]?[0-9][0-9_]*$/,
58
- resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),
59
- stringify: stringifyNumber
60
- };
61
- const intHex = {
62
- identify: intIdentify,
63
- default: true,
64
- tag: 'tag:yaml.org,2002:int',
65
- format: 'HEX',
66
- test: /^[-+]?0x[0-9a-fA-F_]+$/,
67
- resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
68
- stringify: node => intStringify(node, 16, '0x')
69
- };
70
-
71
- export { int, intBin, intHex, intOct };
@@ -1,68 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../../nodes/identity.js');
4
- var Scalar = require('../../nodes/Scalar.js');
5
-
6
- // If the value associated with a merge key is a single mapping node, each of
7
- // its key/value pairs is inserted into the current mapping, unless the key
8
- // already exists in it. If the value associated with the merge key is a
9
- // sequence, then this sequence is expected to contain mapping nodes and each
10
- // of these nodes is merged in turn according to its order in the sequence.
11
- // Keys in mapping nodes earlier in the sequence override keys specified in
12
- // later mapping nodes. -- http://yaml.org/type/merge.html
13
- const MERGE_KEY = '<<';
14
- const merge = {
15
- identify: value => value === MERGE_KEY ||
16
- (typeof value === 'symbol' && value.description === MERGE_KEY),
17
- default: 'key',
18
- tag: 'tag:yaml.org,2002:merge',
19
- test: /^<<$/,
20
- resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {
21
- addToJSMap: addMergeToJSMap
22
- }),
23
- stringify: () => MERGE_KEY
24
- };
25
- const isMergeKey = (ctx, key) => (merge.identify(key) ||
26
- (identity.isScalar(key) &&
27
- (!key.type || key.type === Scalar.Scalar.PLAIN) &&
28
- merge.identify(key.value))) &&
29
- ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
30
- function addMergeToJSMap(ctx, map, value) {
31
- value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
32
- if (identity.isSeq(value))
33
- for (const it of value.items)
34
- mergeValue(ctx, map, it);
35
- else if (Array.isArray(value))
36
- for (const it of value)
37
- mergeValue(ctx, map, it);
38
- else
39
- mergeValue(ctx, map, value);
40
- }
41
- function mergeValue(ctx, map, value) {
42
- const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
43
- if (!identity.isMap(source))
44
- throw new Error('Merge sources must be maps or map aliases');
45
- const srcMap = source.toJSON(null, ctx, Map);
46
- for (const [key, value] of srcMap) {
47
- if (map instanceof Map) {
48
- if (!map.has(key))
49
- map.set(key, value);
50
- }
51
- else if (map instanceof Set) {
52
- map.add(key);
53
- }
54
- else if (!Object.prototype.hasOwnProperty.call(map, key)) {
55
- Object.defineProperty(map, key, {
56
- value,
57
- writable: true,
58
- enumerable: true,
59
- configurable: true
60
- });
61
- }
62
- }
63
- return map;
64
- }
65
-
66
- exports.addMergeToJSMap = addMergeToJSMap;
67
- exports.isMergeKey = isMergeKey;
68
- exports.merge = merge;
@@ -1,64 +0,0 @@
1
- import { isScalar, isAlias, isSeq, isMap } from '../../nodes/identity.mjs';
2
- import { Scalar } from '../../nodes/Scalar.mjs';
3
-
4
- // If the value associated with a merge key is a single mapping node, each of
5
- // its key/value pairs is inserted into the current mapping, unless the key
6
- // already exists in it. If the value associated with the merge key is a
7
- // sequence, then this sequence is expected to contain mapping nodes and each
8
- // of these nodes is merged in turn according to its order in the sequence.
9
- // Keys in mapping nodes earlier in the sequence override keys specified in
10
- // later mapping nodes. -- http://yaml.org/type/merge.html
11
- const MERGE_KEY = '<<';
12
- const merge = {
13
- identify: value => value === MERGE_KEY ||
14
- (typeof value === 'symbol' && value.description === MERGE_KEY),
15
- default: 'key',
16
- tag: 'tag:yaml.org,2002:merge',
17
- test: /^<<$/,
18
- resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {
19
- addToJSMap: addMergeToJSMap
20
- }),
21
- stringify: () => MERGE_KEY
22
- };
23
- const isMergeKey = (ctx, key) => (merge.identify(key) ||
24
- (isScalar(key) &&
25
- (!key.type || key.type === Scalar.PLAIN) &&
26
- merge.identify(key.value))) &&
27
- ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
28
- function addMergeToJSMap(ctx, map, value) {
29
- value = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
30
- if (isSeq(value))
31
- for (const it of value.items)
32
- mergeValue(ctx, map, it);
33
- else if (Array.isArray(value))
34
- for (const it of value)
35
- mergeValue(ctx, map, it);
36
- else
37
- mergeValue(ctx, map, value);
38
- }
39
- function mergeValue(ctx, map, value) {
40
- const source = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
41
- if (!isMap(source))
42
- throw new Error('Merge sources must be maps or map aliases');
43
- const srcMap = source.toJSON(null, ctx, Map);
44
- for (const [key, value] of srcMap) {
45
- if (map instanceof Map) {
46
- if (!map.has(key))
47
- map.set(key, value);
48
- }
49
- else if (map instanceof Set) {
50
- map.add(key);
51
- }
52
- else if (!Object.prototype.hasOwnProperty.call(map, key)) {
53
- Object.defineProperty(map, key, {
54
- value,
55
- writable: true,
56
- enumerable: true,
57
- configurable: true
58
- });
59
- }
60
- }
61
- return map;
62
- }
63
-
64
- export { addMergeToJSMap, isMergeKey, merge };
@@ -1,77 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../../nodes/identity.js');
4
- var toJS = require('../../nodes/toJS.js');
5
- var YAMLMap = require('../../nodes/YAMLMap.js');
6
- var YAMLSeq = require('../../nodes/YAMLSeq.js');
7
- var pairs = require('./pairs.js');
8
-
9
- class YAMLOMap extends YAMLSeq.YAMLSeq {
10
- constructor() {
11
- super();
12
- this.add = YAMLMap.YAMLMap.prototype.add.bind(this);
13
- this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);
14
- this.get = YAMLMap.YAMLMap.prototype.get.bind(this);
15
- this.has = YAMLMap.YAMLMap.prototype.has.bind(this);
16
- this.set = YAMLMap.YAMLMap.prototype.set.bind(this);
17
- this.tag = YAMLOMap.tag;
18
- }
19
- /**
20
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
21
- * but TypeScript won't allow widening the signature of a child method.
22
- */
23
- toJSON(_, ctx) {
24
- if (!ctx)
25
- return super.toJSON(_);
26
- const map = new Map();
27
- if (ctx?.onCreate)
28
- ctx.onCreate(map);
29
- for (const pair of this.items) {
30
- let key, value;
31
- if (identity.isPair(pair)) {
32
- key = toJS.toJS(pair.key, '', ctx);
33
- value = toJS.toJS(pair.value, key, ctx);
34
- }
35
- else {
36
- key = toJS.toJS(pair, '', ctx);
37
- }
38
- if (map.has(key))
39
- throw new Error('Ordered maps must not include duplicate keys');
40
- map.set(key, value);
41
- }
42
- return map;
43
- }
44
- static from(schema, iterable, ctx) {
45
- const pairs$1 = pairs.createPairs(schema, iterable, ctx);
46
- const omap = new this();
47
- omap.items = pairs$1.items;
48
- return omap;
49
- }
50
- }
51
- YAMLOMap.tag = 'tag:yaml.org,2002:omap';
52
- const omap = {
53
- collection: 'seq',
54
- identify: value => value instanceof Map,
55
- nodeClass: YAMLOMap,
56
- default: false,
57
- tag: 'tag:yaml.org,2002:omap',
58
- resolve(seq, onError) {
59
- const pairs$1 = pairs.resolvePairs(seq, onError);
60
- const seenKeys = [];
61
- for (const { key } of pairs$1.items) {
62
- if (identity.isScalar(key)) {
63
- if (seenKeys.includes(key.value)) {
64
- onError(`Ordered maps must not include duplicate keys: ${key.value}`);
65
- }
66
- else {
67
- seenKeys.push(key.value);
68
- }
69
- }
70
- }
71
- return Object.assign(new YAMLOMap(), pairs$1);
72
- },
73
- createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
74
- };
75
-
76
- exports.YAMLOMap = YAMLOMap;
77
- exports.omap = omap;
@@ -1,74 +0,0 @@
1
- import { isPair, isScalar } from '../../nodes/identity.mjs';
2
- import { toJS } from '../../nodes/toJS.mjs';
3
- import { YAMLMap } from '../../nodes/YAMLMap.mjs';
4
- import { YAMLSeq } from '../../nodes/YAMLSeq.mjs';
5
- import { createPairs, resolvePairs } from './pairs.mjs';
6
-
7
- class YAMLOMap extends YAMLSeq {
8
- constructor() {
9
- super();
10
- this.add = YAMLMap.prototype.add.bind(this);
11
- this.delete = YAMLMap.prototype.delete.bind(this);
12
- this.get = YAMLMap.prototype.get.bind(this);
13
- this.has = YAMLMap.prototype.has.bind(this);
14
- this.set = YAMLMap.prototype.set.bind(this);
15
- this.tag = YAMLOMap.tag;
16
- }
17
- /**
18
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
19
- * but TypeScript won't allow widening the signature of a child method.
20
- */
21
- toJSON(_, ctx) {
22
- if (!ctx)
23
- return super.toJSON(_);
24
- const map = new Map();
25
- if (ctx?.onCreate)
26
- ctx.onCreate(map);
27
- for (const pair of this.items) {
28
- let key, value;
29
- if (isPair(pair)) {
30
- key = toJS(pair.key, '', ctx);
31
- value = toJS(pair.value, key, ctx);
32
- }
33
- else {
34
- key = toJS(pair, '', ctx);
35
- }
36
- if (map.has(key))
37
- throw new Error('Ordered maps must not include duplicate keys');
38
- map.set(key, value);
39
- }
40
- return map;
41
- }
42
- static from(schema, iterable, ctx) {
43
- const pairs = createPairs(schema, iterable, ctx);
44
- const omap = new this();
45
- omap.items = pairs.items;
46
- return omap;
47
- }
48
- }
49
- YAMLOMap.tag = 'tag:yaml.org,2002:omap';
50
- const omap = {
51
- collection: 'seq',
52
- identify: value => value instanceof Map,
53
- nodeClass: YAMLOMap,
54
- default: false,
55
- tag: 'tag:yaml.org,2002:omap',
56
- resolve(seq, onError) {
57
- const pairs = resolvePairs(seq, onError);
58
- const seenKeys = [];
59
- for (const { key } of pairs.items) {
60
- if (isScalar(key)) {
61
- if (seenKeys.includes(key.value)) {
62
- onError(`Ordered maps must not include duplicate keys: ${key.value}`);
63
- }
64
- else {
65
- seenKeys.push(key.value);
66
- }
67
- }
68
- }
69
- return Object.assign(new YAMLOMap(), pairs);
70
- },
71
- createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
72
- };
73
-
74
- export { YAMLOMap, omap };
@@ -1,82 +0,0 @@
1
- 'use strict';
2
-
3
- var identity = require('../../nodes/identity.js');
4
- var Pair = require('../../nodes/Pair.js');
5
- var Scalar = require('../../nodes/Scalar.js');
6
- var YAMLSeq = require('../../nodes/YAMLSeq.js');
7
-
8
- function resolvePairs(seq, onError) {
9
- if (identity.isSeq(seq)) {
10
- for (let i = 0; i < seq.items.length; ++i) {
11
- let item = seq.items[i];
12
- if (identity.isPair(item))
13
- continue;
14
- else if (identity.isMap(item)) {
15
- if (item.items.length > 1)
16
- onError('Each pair must have its own sequence indicator');
17
- const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));
18
- if (item.commentBefore)
19
- pair.key.commentBefore = pair.key.commentBefore
20
- ? `${item.commentBefore}\n${pair.key.commentBefore}`
21
- : item.commentBefore;
22
- if (item.comment) {
23
- const cn = pair.value ?? pair.key;
24
- cn.comment = cn.comment
25
- ? `${item.comment}\n${cn.comment}`
26
- : item.comment;
27
- }
28
- item = pair;
29
- }
30
- seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);
31
- }
32
- }
33
- else
34
- onError('Expected a sequence for this tag');
35
- return seq;
36
- }
37
- function createPairs(schema, iterable, ctx) {
38
- const { replacer } = ctx;
39
- const pairs = new YAMLSeq.YAMLSeq(schema);
40
- pairs.tag = 'tag:yaml.org,2002:pairs';
41
- let i = 0;
42
- if (iterable && Symbol.iterator in Object(iterable))
43
- for (let it of iterable) {
44
- if (typeof replacer === 'function')
45
- it = replacer.call(iterable, String(i++), it);
46
- let key, value;
47
- if (Array.isArray(it)) {
48
- if (it.length === 2) {
49
- key = it[0];
50
- value = it[1];
51
- }
52
- else
53
- throw new TypeError(`Expected [key, value] tuple: ${it}`);
54
- }
55
- else if (it && it instanceof Object) {
56
- const keys = Object.keys(it);
57
- if (keys.length === 1) {
58
- key = keys[0];
59
- value = it[key];
60
- }
61
- else {
62
- throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
63
- }
64
- }
65
- else {
66
- key = it;
67
- }
68
- pairs.items.push(Pair.createPair(key, value, ctx));
69
- }
70
- return pairs;
71
- }
72
- const pairs = {
73
- collection: 'seq',
74
- default: false,
75
- tag: 'tag:yaml.org,2002:pairs',
76
- resolve: resolvePairs,
77
- createNode: createPairs
78
- };
79
-
80
- exports.createPairs = createPairs;
81
- exports.pairs = pairs;
82
- exports.resolvePairs = resolvePairs;
@@ -1,78 +0,0 @@
1
- import { isSeq, isPair, isMap } from '../../nodes/identity.mjs';
2
- import { createPair, Pair } from '../../nodes/Pair.mjs';
3
- import { Scalar } from '../../nodes/Scalar.mjs';
4
- import { YAMLSeq } from '../../nodes/YAMLSeq.mjs';
5
-
6
- function resolvePairs(seq, onError) {
7
- if (isSeq(seq)) {
8
- for (let i = 0; i < seq.items.length; ++i) {
9
- let item = seq.items[i];
10
- if (isPair(item))
11
- continue;
12
- else if (isMap(item)) {
13
- if (item.items.length > 1)
14
- onError('Each pair must have its own sequence indicator');
15
- const pair = item.items[0] || new Pair(new Scalar(null));
16
- if (item.commentBefore)
17
- pair.key.commentBefore = pair.key.commentBefore
18
- ? `${item.commentBefore}\n${pair.key.commentBefore}`
19
- : item.commentBefore;
20
- if (item.comment) {
21
- const cn = pair.value ?? pair.key;
22
- cn.comment = cn.comment
23
- ? `${item.comment}\n${cn.comment}`
24
- : item.comment;
25
- }
26
- item = pair;
27
- }
28
- seq.items[i] = isPair(item) ? item : new Pair(item);
29
- }
30
- }
31
- else
32
- onError('Expected a sequence for this tag');
33
- return seq;
34
- }
35
- function createPairs(schema, iterable, ctx) {
36
- const { replacer } = ctx;
37
- const pairs = new YAMLSeq(schema);
38
- pairs.tag = 'tag:yaml.org,2002:pairs';
39
- let i = 0;
40
- if (iterable && Symbol.iterator in Object(iterable))
41
- for (let it of iterable) {
42
- if (typeof replacer === 'function')
43
- it = replacer.call(iterable, String(i++), it);
44
- let key, value;
45
- if (Array.isArray(it)) {
46
- if (it.length === 2) {
47
- key = it[0];
48
- value = it[1];
49
- }
50
- else
51
- throw new TypeError(`Expected [key, value] tuple: ${it}`);
52
- }
53
- else if (it && it instanceof Object) {
54
- const keys = Object.keys(it);
55
- if (keys.length === 1) {
56
- key = keys[0];
57
- value = it[key];
58
- }
59
- else {
60
- throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
61
- }
62
- }
63
- else {
64
- key = it;
65
- }
66
- pairs.items.push(createPair(key, value, ctx));
67
- }
68
- return pairs;
69
- }
70
- const pairs = {
71
- collection: 'seq',
72
- default: false,
73
- tag: 'tag:yaml.org,2002:pairs',
74
- resolve: resolvePairs,
75
- createNode: createPairs
76
- };
77
-
78
- export { createPairs, pairs, resolvePairs };
@@ -1,41 +0,0 @@
1
- 'use strict';
2
-
3
- var map = require('../common/map.js');
4
- var _null = require('../common/null.js');
5
- var seq = require('../common/seq.js');
6
- var string = require('../common/string.js');
7
- var binary = require('./binary.js');
8
- var bool = require('./bool.js');
9
- var float = require('./float.js');
10
- var int = require('./int.js');
11
- var merge = require('./merge.js');
12
- var omap = require('./omap.js');
13
- var pairs = require('./pairs.js');
14
- var set = require('./set.js');
15
- var timestamp = require('./timestamp.js');
16
-
17
- const schema = [
18
- map.map,
19
- seq.seq,
20
- string.string,
21
- _null.nullTag,
22
- bool.trueTag,
23
- bool.falseTag,
24
- int.intBin,
25
- int.intOct,
26
- int.int,
27
- int.intHex,
28
- float.floatNaN,
29
- float.floatExp,
30
- float.float,
31
- binary.binary,
32
- merge.merge,
33
- omap.omap,
34
- pairs.pairs,
35
- set.set,
36
- timestamp.intTime,
37
- timestamp.floatTime,
38
- timestamp.timestamp
39
- ];
40
-
41
- exports.schema = schema;
@@ -1,39 +0,0 @@
1
- import { map } from '../common/map.mjs';
2
- import { nullTag } from '../common/null.mjs';
3
- import { seq } from '../common/seq.mjs';
4
- import { string } from '../common/string.mjs';
5
- import { binary } from './binary.mjs';
6
- import { trueTag, falseTag } from './bool.mjs';
7
- import { floatNaN, floatExp, float } from './float.mjs';
8
- import { intBin, intOct, int, intHex } from './int.mjs';
9
- import { merge } from './merge.mjs';
10
- import { omap } from './omap.mjs';
11
- import { pairs } from './pairs.mjs';
12
- import { set } from './set.mjs';
13
- import { intTime, floatTime, timestamp } from './timestamp.mjs';
14
-
15
- const schema = [
16
- map,
17
- seq,
18
- string,
19
- nullTag,
20
- trueTag,
21
- falseTag,
22
- intBin,
23
- intOct,
24
- int,
25
- intHex,
26
- floatNaN,
27
- floatExp,
28
- float,
29
- binary,
30
- merge,
31
- omap,
32
- pairs,
33
- set,
34
- intTime,
35
- floatTime,
36
- timestamp
37
- ];
38
-
39
- export { schema };