projen 0.51.4 → 0.51.8

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 (395) hide show
  1. package/.jsii +69 -9
  2. package/API.md +12 -1
  3. package/changelog.md +1 -1
  4. package/lib/awscdk/auto-discover.js +1 -1
  5. package/lib/awscdk/awscdk-app-java.js +1 -1
  6. package/lib/awscdk/awscdk-app-ts.js +1 -1
  7. package/lib/awscdk/awscdk-construct.js +2 -2
  8. package/lib/awscdk/awscdk-deps-java.js +1 -1
  9. package/lib/awscdk/awscdk-deps-js.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +9 -2
  14. package/lib/awscdk/lambda-function.js +2 -2
  15. package/lib/build/build-workflow.js +1 -1
  16. package/lib/cdk/construct-lib.js +1 -1
  17. package/lib/cdk/jsii-docgen.js +1 -1
  18. package/lib/cdk/jsii-project.js +1 -1
  19. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  20. package/lib/cdk8s/cdk8s-construct.js +1 -1
  21. package/lib/cdktf/cdktf-construct.js +1 -1
  22. package/lib/component.js +1 -1
  23. package/lib/dependencies.js +1 -1
  24. package/lib/dev-env.js +1 -1
  25. package/lib/docker-compose.js +2 -2
  26. package/lib/file.js +1 -1
  27. package/lib/gitattributes.js +1 -1
  28. package/lib/github/auto-approve.js +1 -1
  29. package/lib/github/auto-merge.js +1 -1
  30. package/lib/github/dependabot.js +1 -1
  31. package/lib/github/github-project.js +1 -1
  32. package/lib/github/github.js +1 -1
  33. package/lib/github/mergify.js +1 -1
  34. package/lib/github/pr-template.js +1 -1
  35. package/lib/github/pull-request-lint.js +1 -1
  36. package/lib/github/stale-util.js +12 -7
  37. package/lib/github/stale.d.ts +10 -1
  38. package/lib/github/stale.js +10 -2
  39. package/lib/github/task-workflow.js +1 -1
  40. package/lib/github/workflows.js +1 -1
  41. package/lib/gitlab/configuration.js +1 -1
  42. package/lib/gitlab/gitlab-configuration.js +1 -1
  43. package/lib/gitlab/nested-configuration.js +1 -1
  44. package/lib/gitpod.js +1 -1
  45. package/lib/ignore-file.js +1 -1
  46. package/lib/ini.js +1 -1
  47. package/lib/java/java-project.js +1 -1
  48. package/lib/java/junit.js +1 -1
  49. package/lib/java/maven-compile.js +1 -1
  50. package/lib/java/maven-packaging.js +1 -1
  51. package/lib/java/maven-sample.js +1 -1
  52. package/lib/java/pom.js +1 -1
  53. package/lib/java/projenrc.js +1 -1
  54. package/lib/javascript/bundler.js +1 -1
  55. package/lib/javascript/eslint.js +1 -1
  56. package/lib/javascript/jest.js +1 -1
  57. package/lib/javascript/node-package.js +1 -1
  58. package/lib/javascript/node-project.js +1 -1
  59. package/lib/javascript/npm-config.js +1 -1
  60. package/lib/javascript/prettier.js +1 -1
  61. package/lib/javascript/projenrc.js +1 -1
  62. package/lib/javascript/typescript-config.js +1 -1
  63. package/lib/javascript/upgrade-dependencies.js +2 -2
  64. package/lib/json.js +1 -1
  65. package/lib/license.js +1 -1
  66. package/lib/logger.js +1 -1
  67. package/lib/makefile.js +1 -1
  68. package/lib/object-file.js +1 -1
  69. package/lib/project-build.js +1 -1
  70. package/lib/project.js +1 -1
  71. package/lib/projects.js +1 -1
  72. package/lib/projenrc-json.js +1 -1
  73. package/lib/python/pip.js +1 -1
  74. package/lib/python/poetry.js +2 -2
  75. package/lib/python/projenrc.js +1 -1
  76. package/lib/python/pytest.js +1 -1
  77. package/lib/python/python-project.js +1 -1
  78. package/lib/python/python-sample.js +1 -1
  79. package/lib/python/requirements-file.js +1 -1
  80. package/lib/python/setuppy.js +1 -1
  81. package/lib/python/setuptools.js +1 -1
  82. package/lib/python/venv.js +1 -1
  83. package/lib/readme.js +1 -1
  84. package/lib/release/publisher.js +1 -1
  85. package/lib/release/release-trigger.js +1 -1
  86. package/lib/release/release.js +1 -1
  87. package/lib/sample-file.js +2 -2
  88. package/lib/semver.js +1 -1
  89. package/lib/source-code.js +1 -1
  90. package/lib/task-runtime.js +1 -1
  91. package/lib/task.js +1 -1
  92. package/lib/tasks.js +1 -1
  93. package/lib/testing.js +1 -1
  94. package/lib/textfile.js +1 -1
  95. package/lib/toml.js +1 -1
  96. package/lib/typescript/projenrc.js +1 -1
  97. package/lib/typescript/typescript-typedoc.js +1 -1
  98. package/lib/typescript/typescript.js +3 -3
  99. package/lib/version.js +1 -1
  100. package/lib/vscode/devcontainer.js +1 -1
  101. package/lib/vscode/launch-config.js +1 -1
  102. package/lib/vscode/vscode.js +1 -1
  103. package/lib/web/next.js +3 -3
  104. package/lib/web/postcss.js +1 -1
  105. package/lib/web/react.js +4 -4
  106. package/lib/web/tailwind.js +1 -1
  107. package/lib/xmlfile.js +1 -1
  108. package/lib/yaml.d.ts +13 -0
  109. package/lib/yaml.js +8 -3
  110. package/node_modules/{fs-extra/node_modules/universalify → universalify}/LICENSE +0 -0
  111. package/node_modules/{fs-extra/node_modules/universalify → universalify}/README.md +0 -0
  112. package/node_modules/{fs-extra/node_modules/universalify → universalify}/index.js +0 -0
  113. package/node_modules/{fs-extra/node_modules/universalify → universalify}/package.json +0 -0
  114. package/node_modules/yaml/LICENSE +1 -1
  115. package/node_modules/yaml/README.md +57 -41
  116. package/node_modules/yaml/browser/dist/compose/compose-collection.js +59 -0
  117. package/node_modules/yaml/browser/dist/compose/compose-doc.js +40 -0
  118. package/node_modules/yaml/browser/dist/compose/compose-node.js +81 -0
  119. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +81 -0
  120. package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
  121. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +107 -0
  122. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +185 -0
  123. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +45 -0
  124. package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  125. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +200 -0
  126. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
  127. package/node_modules/yaml/browser/dist/compose/resolve-props.js +128 -0
  128. package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  129. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +27 -0
  130. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  131. package/node_modules/yaml/browser/dist/compose/util-map-includes.js +17 -0
  132. package/node_modules/yaml/browser/dist/doc/Document.js +321 -0
  133. package/node_modules/yaml/browser/dist/doc/anchors.js +72 -0
  134. package/node_modules/yaml/browser/dist/doc/applyReviver.js +54 -0
  135. package/node_modules/yaml/browser/dist/doc/createNode.js +84 -0
  136. package/node_modules/yaml/browser/dist/doc/directives.js +166 -0
  137. package/node_modules/yaml/browser/dist/errors.js +57 -0
  138. package/node_modules/yaml/browser/dist/index.js +18 -1002
  139. package/node_modules/yaml/browser/dist/log.js +14 -0
  140. package/node_modules/yaml/browser/dist/node_modules/tslib/tslib.es6.js +164 -0
  141. package/node_modules/yaml/browser/dist/nodes/Alias.js +94 -0
  142. package/node_modules/yaml/browser/dist/nodes/Collection.js +146 -0
  143. package/node_modules/yaml/browser/dist/nodes/Node.js +48 -0
  144. package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  145. package/node_modules/yaml/browser/dist/nodes/Scalar.js +23 -0
  146. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +116 -0
  147. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +105 -0
  148. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +104 -0
  149. package/node_modules/yaml/browser/dist/nodes/toJS.js +35 -0
  150. package/node_modules/yaml/browser/dist/options.js +18 -0
  151. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +215 -0
  152. package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  153. package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  154. package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  155. package/node_modules/yaml/browser/dist/parse/lexer.js +692 -0
  156. package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  157. package/node_modules/yaml/browser/dist/parse/parser.js +882 -0
  158. package/node_modules/yaml/browser/dist/public-api.js +99 -0
  159. package/node_modules/yaml/browser/dist/schema/Schema.js +34 -0
  160. package/node_modules/yaml/browser/dist/schema/common/map.js +42 -0
  161. package/node_modules/yaml/browser/dist/schema/common/null.js +13 -0
  162. package/node_modules/yaml/browser/dist/schema/common/seq.js +33 -0
  163. package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  164. package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  165. package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  166. package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  167. package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  168. package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  169. package/node_modules/yaml/browser/dist/schema/tags.js +83 -0
  170. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +66 -0
  171. package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  172. package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  173. package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  174. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +73 -0
  175. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +77 -0
  176. package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +37 -0
  177. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +87 -0
  178. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  179. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +135 -0
  180. package/node_modules/yaml/browser/dist/stringify/stringify.js +124 -0
  181. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +152 -0
  182. package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +18 -0
  183. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +68 -0
  184. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
  185. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +122 -0
  186. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +314 -0
  187. package/node_modules/yaml/browser/dist/util.js +9 -2
  188. package/node_modules/yaml/browser/dist/visit.js +146 -0
  189. package/node_modules/yaml/browser/index.js +5 -1
  190. package/node_modules/yaml/browser/package.json +3 -0
  191. package/node_modules/yaml/dist/compose/compose-collection.d.ts +5 -0
  192. package/node_modules/yaml/dist/compose/compose-collection.js +61 -0
  193. package/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -0
  194. package/node_modules/yaml/dist/compose/compose-doc.js +42 -0
  195. package/node_modules/yaml/dist/compose/compose-node.d.ts +26 -0
  196. package/node_modules/yaml/dist/compose/compose-node.js +84 -0
  197. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  198. package/node_modules/yaml/dist/compose/compose-scalar.js +83 -0
  199. package/node_modules/yaml/dist/compose/composer.d.ts +62 -0
  200. package/node_modules/yaml/dist/compose/composer.js +223 -0
  201. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  202. package/node_modules/yaml/dist/compose/resolve-block-map.js +109 -0
  203. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +10 -0
  204. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +187 -0
  205. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -0
  206. package/node_modules/yaml/dist/compose/resolve-block-seq.js +47 -0
  207. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  208. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  209. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +6 -0
  210. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +202 -0
  211. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  212. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
  213. package/node_modules/yaml/dist/compose/resolve-props.d.ts +21 -0
  214. package/node_modules/yaml/dist/compose/resolve-props.js +130 -0
  215. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  216. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  217. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  218. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +29 -0
  219. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  220. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  221. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  222. package/node_modules/yaml/dist/compose/util-map-includes.js +19 -0
  223. package/node_modules/yaml/dist/doc/Document.d.ts +139 -0
  224. package/node_modules/yaml/dist/doc/Document.js +323 -0
  225. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  226. package/node_modules/yaml/dist/doc/anchors.js +77 -0
  227. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  228. package/node_modules/yaml/dist/doc/applyReviver.js +56 -0
  229. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  230. package/node_modules/yaml/dist/doc/createNode.js +86 -0
  231. package/node_modules/yaml/dist/doc/directives.d.ts +47 -0
  232. package/node_modules/yaml/dist/doc/directives.js +168 -0
  233. package/node_modules/yaml/dist/errors.d.ts +21 -0
  234. package/node_modules/yaml/dist/errors.js +62 -0
  235. package/node_modules/yaml/dist/index.d.ts +19 -0
  236. package/node_modules/yaml/dist/index.js +49 -77
  237. package/node_modules/yaml/dist/log.d.ts +3 -0
  238. package/node_modules/yaml/dist/log.js +17 -0
  239. package/node_modules/yaml/dist/node_modules/tslib/tslib.es6.js +76 -0
  240. package/node_modules/yaml/dist/nodes/Alias.d.ts +28 -0
  241. package/node_modules/yaml/dist/nodes/Alias.js +96 -0
  242. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  243. package/node_modules/yaml/dist/nodes/Collection.js +150 -0
  244. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  245. package/node_modules/yaml/dist/nodes/Node.js +66 -0
  246. package/node_modules/yaml/dist/nodes/Pair.d.ts +21 -0
  247. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  248. package/node_modules/yaml/dist/nodes/Scalar.d.ts +42 -0
  249. package/node_modules/yaml/dist/nodes/Scalar.js +26 -0
  250. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +41 -0
  251. package/node_modules/yaml/dist/nodes/YAMLMap.js +119 -0
  252. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +55 -0
  253. package/node_modules/yaml/dist/nodes/YAMLSeq.js +107 -0
  254. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -0
  255. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +106 -0
  256. package/node_modules/yaml/dist/nodes/toJS.d.ts +30 -0
  257. package/node_modules/yaml/dist/nodes/toJS.js +37 -0
  258. package/node_modules/yaml/dist/options.d.ts +338 -0
  259. package/node_modules/yaml/dist/options.js +20 -0
  260. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  261. package/node_modules/yaml/dist/parse/cst-scalar.js +219 -0
  262. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  263. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  264. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  265. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  266. package/node_modules/yaml/dist/parse/cst.d.ts +106 -0
  267. package/node_modules/yaml/dist/parse/cst.js +112 -0
  268. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  269. package/node_modules/yaml/dist/parse/lexer.js +694 -0
  270. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  271. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  272. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  273. package/node_modules/yaml/dist/parse/parser.js +886 -0
  274. package/node_modules/yaml/dist/public-api.d.ts +43 -0
  275. package/node_modules/yaml/dist/public-api.js +104 -0
  276. package/node_modules/yaml/dist/schema/Schema.d.ts +18 -0
  277. package/node_modules/yaml/dist/schema/Schema.js +36 -0
  278. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  279. package/node_modules/yaml/dist/schema/common/map.js +44 -0
  280. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  281. package/node_modules/yaml/dist/schema/common/null.js +15 -0
  282. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  283. package/node_modules/yaml/dist/schema/common/seq.js +35 -0
  284. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  285. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  286. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  287. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  288. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  289. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  290. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  291. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  292. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  293. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  294. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  295. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  296. package/node_modules/yaml/dist/schema/tags.d.ts +40 -0
  297. package/node_modules/yaml/dist/schema/tags.js +86 -0
  298. package/node_modules/yaml/dist/schema/types.d.ts +82 -0
  299. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  300. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +68 -0
  301. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  302. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  303. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  304. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  305. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  306. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  307. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +21 -0
  308. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +76 -0
  309. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  310. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +81 -0
  311. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  312. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +39 -0
  313. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +22 -0
  314. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +90 -0
  315. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  316. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  317. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  318. package/node_modules/yaml/dist/stringify/foldFlowLines.js +140 -0
  319. package/node_modules/yaml/dist/stringify/stringify.d.ts +20 -0
  320. package/node_modules/yaml/dist/stringify/stringify.js +127 -0
  321. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  322. package/node_modules/yaml/dist/stringify/stringifyCollection.js +154 -0
  323. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  324. package/node_modules/yaml/dist/stringify/stringifyComment.js +22 -0
  325. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -0
  326. package/node_modules/yaml/dist/stringify/stringifyDocument.js +70 -0
  327. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  328. package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
  329. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  330. package/node_modules/yaml/dist/stringify/stringifyPair.js +124 -0
  331. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +3 -0
  332. package/node_modules/yaml/dist/stringify/stringifyString.js +316 -0
  333. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  334. package/node_modules/yaml/dist/test-events.js +126 -152
  335. package/node_modules/yaml/dist/util.d.ts +9 -0
  336. package/node_modules/yaml/dist/util.js +19 -14
  337. package/node_modules/yaml/dist/visit.d.ts +63 -0
  338. package/node_modules/yaml/dist/visit.js +148 -0
  339. package/node_modules/yaml/package.json +43 -55
  340. package/node_modules/yaml/util.d.ts +3 -86
  341. package/node_modules/yaml/util.js +2 -16
  342. package/package.json +3 -3
  343. package/releasetag.txt +1 -1
  344. package/version.txt +1 -1
  345. package/node_modules/jsonfile/node_modules/universalify/LICENSE +0 -20
  346. package/node_modules/jsonfile/node_modules/universalify/README.md +0 -76
  347. package/node_modules/jsonfile/node_modules/universalify/index.js +0 -24
  348. package/node_modules/jsonfile/node_modules/universalify/package.json +0 -34
  349. package/node_modules/yaml/browser/dist/PlainValue-b8036b75.js +0 -1275
  350. package/node_modules/yaml/browser/dist/Schema-e94716c8.js +0 -682
  351. package/node_modules/yaml/browser/dist/legacy-exports.js +0 -3
  352. package/node_modules/yaml/browser/dist/package.json +0 -1
  353. package/node_modules/yaml/browser/dist/parse-cst.js +0 -1904
  354. package/node_modules/yaml/browser/dist/resolveSeq-492ab440.js +0 -2419
  355. package/node_modules/yaml/browser/dist/types.js +0 -4
  356. package/node_modules/yaml/browser/dist/warnings-df54cb69.js +0 -499
  357. package/node_modules/yaml/browser/map.js +0 -2
  358. package/node_modules/yaml/browser/pair.js +0 -2
  359. package/node_modules/yaml/browser/parse-cst.js +0 -1
  360. package/node_modules/yaml/browser/scalar.js +0 -2
  361. package/node_modules/yaml/browser/schema.js +0 -9
  362. package/node_modules/yaml/browser/seq.js +0 -2
  363. package/node_modules/yaml/browser/types/binary.js +0 -8
  364. package/node_modules/yaml/browser/types/omap.js +0 -3
  365. package/node_modules/yaml/browser/types/pairs.js +0 -3
  366. package/node_modules/yaml/browser/types/set.js +0 -3
  367. package/node_modules/yaml/browser/types/timestamp.js +0 -10
  368. package/node_modules/yaml/browser/types.js +0 -1
  369. package/node_modules/yaml/browser/util.js +0 -1
  370. package/node_modules/yaml/dist/Document-9b4560a1.js +0 -757
  371. package/node_modules/yaml/dist/PlainValue-ec8e588e.js +0 -876
  372. package/node_modules/yaml/dist/Schema-88e323a7.js +0 -525
  373. package/node_modules/yaml/dist/legacy-exports.js +0 -16
  374. package/node_modules/yaml/dist/parse-cst.js +0 -1753
  375. package/node_modules/yaml/dist/resolveSeq-d03cb037.js +0 -2161
  376. package/node_modules/yaml/dist/types.js +0 -23
  377. package/node_modules/yaml/dist/warnings-1000a372.js +0 -416
  378. package/node_modules/yaml/index.d.ts +0 -372
  379. package/node_modules/yaml/index.js +0 -1
  380. package/node_modules/yaml/map.js +0 -2
  381. package/node_modules/yaml/pair.js +0 -2
  382. package/node_modules/yaml/parse-cst.d.ts +0 -191
  383. package/node_modules/yaml/parse-cst.js +0 -1
  384. package/node_modules/yaml/scalar.js +0 -2
  385. package/node_modules/yaml/schema.js +0 -9
  386. package/node_modules/yaml/seq.js +0 -2
  387. package/node_modules/yaml/types/binary.js +0 -8
  388. package/node_modules/yaml/types/omap.js +0 -3
  389. package/node_modules/yaml/types/pairs.js +0 -3
  390. package/node_modules/yaml/types/set.js +0 -3
  391. package/node_modules/yaml/types/timestamp.js +0 -10
  392. package/node_modules/yaml/types.d.ts +0 -407
  393. package/node_modules/yaml/types.js +0 -17
  394. package/node_modules/yaml/types.mjs +0 -17
  395. package/node_modules/yaml/util.mjs +0 -18
@@ -0,0 +1,55 @@
1
+ import type { BlockSequence, FlowCollection } from '../parse/cst.js';
2
+ import type { Schema } from '../schema/Schema.js';
3
+ import type { StringifyContext } from '../stringify/stringify.js';
4
+ import { Collection } from './Collection.js';
5
+ import { ParsedNode, Range } from './Node.js';
6
+ import type { Pair } from './Pair.js';
7
+ import { ToJSContext } from './toJS.js';
8
+ export declare namespace YAMLSeq {
9
+ interface Parsed<T extends ParsedNode | Pair<ParsedNode, ParsedNode | null> = ParsedNode> extends YAMLSeq<T> {
10
+ items: T[];
11
+ range: Range;
12
+ srcToken?: BlockSequence | FlowCollection;
13
+ }
14
+ }
15
+ export declare class YAMLSeq<T = unknown> extends Collection {
16
+ static get tagName(): 'tag:yaml.org,2002:seq';
17
+ items: T[];
18
+ constructor(schema?: Schema);
19
+ add(value: T): void;
20
+ /**
21
+ * Removes a value from the collection.
22
+ *
23
+ * `key` must contain a representation of an integer for this to succeed.
24
+ * It may be wrapped in a `Scalar`.
25
+ *
26
+ * @returns `true` if the item was found and removed.
27
+ */
28
+ delete(key: unknown): boolean;
29
+ /**
30
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
31
+ * scalar values from their surrounding node; to disable set `keepScalar` to
32
+ * `true` (collections are always returned intact).
33
+ *
34
+ * `key` must contain a representation of an integer for this to succeed.
35
+ * It may be wrapped in a `Scalar`.
36
+ */
37
+ get(key: unknown, keepScalar?: boolean): unknown;
38
+ /**
39
+ * Checks if the collection includes a value with the key `key`.
40
+ *
41
+ * `key` must contain a representation of an integer for this to succeed.
42
+ * It may be wrapped in a `Scalar`.
43
+ */
44
+ has(key: unknown): boolean;
45
+ /**
46
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
47
+ * boolean to add/remove the item from the set.
48
+ *
49
+ * If `key` does not contain a representation of an integer, this will throw.
50
+ * It may be wrapped in a `Scalar`.
51
+ */
52
+ set(key: unknown, value: T): void;
53
+ toJSON(_?: unknown, ctx?: ToJSContext): unknown[];
54
+ toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
55
+ }
@@ -0,0 +1,107 @@
1
+ 'use strict';
2
+
3
+ var stringifyCollection = require('../stringify/stringifyCollection.js');
4
+ var Collection = require('./Collection.js');
5
+ var Node = require('./Node.js');
6
+ var Scalar = require('./Scalar.js');
7
+ var toJS = require('./toJS.js');
8
+
9
+ class YAMLSeq extends Collection.Collection {
10
+ constructor(schema) {
11
+ super(Node.SEQ, schema);
12
+ this.items = [];
13
+ }
14
+ static get tagName() {
15
+ return 'tag:yaml.org,2002:seq';
16
+ }
17
+ add(value) {
18
+ this.items.push(value);
19
+ }
20
+ /**
21
+ * Removes a value from the collection.
22
+ *
23
+ * `key` must contain a representation of an integer for this to succeed.
24
+ * It may be wrapped in a `Scalar`.
25
+ *
26
+ * @returns `true` if the item was found and removed.
27
+ */
28
+ delete(key) {
29
+ const idx = asItemIndex(key);
30
+ if (typeof idx !== 'number')
31
+ return false;
32
+ const del = this.items.splice(idx, 1);
33
+ return del.length > 0;
34
+ }
35
+ /**
36
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
37
+ * scalar values from their surrounding node; to disable set `keepScalar` to
38
+ * `true` (collections are always returned intact).
39
+ *
40
+ * `key` must contain a representation of an integer for this to succeed.
41
+ * It may be wrapped in a `Scalar`.
42
+ */
43
+ get(key, keepScalar) {
44
+ const idx = asItemIndex(key);
45
+ if (typeof idx !== 'number')
46
+ return undefined;
47
+ const it = this.items[idx];
48
+ return !keepScalar && Node.isScalar(it) ? it.value : it;
49
+ }
50
+ /**
51
+ * Checks if the collection includes a value with the key `key`.
52
+ *
53
+ * `key` must contain a representation of an integer for this to succeed.
54
+ * It may be wrapped in a `Scalar`.
55
+ */
56
+ has(key) {
57
+ const idx = asItemIndex(key);
58
+ return typeof idx === 'number' && idx < this.items.length;
59
+ }
60
+ /**
61
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
62
+ * boolean to add/remove the item from the set.
63
+ *
64
+ * If `key` does not contain a representation of an integer, this will throw.
65
+ * It may be wrapped in a `Scalar`.
66
+ */
67
+ set(key, value) {
68
+ const idx = asItemIndex(key);
69
+ if (typeof idx !== 'number')
70
+ throw new Error(`Expected a valid index, not ${key}.`);
71
+ const prev = this.items[idx];
72
+ if (Node.isScalar(prev) && Scalar.isScalarValue(value))
73
+ prev.value = value;
74
+ else
75
+ this.items[idx] = value;
76
+ }
77
+ toJSON(_, ctx) {
78
+ const seq = [];
79
+ if (ctx && ctx.onCreate)
80
+ ctx.onCreate(seq);
81
+ let i = 0;
82
+ for (const item of this.items)
83
+ seq.push(toJS.toJS(item, String(i++), ctx));
84
+ return seq;
85
+ }
86
+ toString(ctx, onComment, onChompKeep) {
87
+ if (!ctx)
88
+ return JSON.stringify(this);
89
+ return stringifyCollection.stringifyCollection(this, ctx, {
90
+ blockItemPrefix: '- ',
91
+ flowChars: { start: '[', end: ']' },
92
+ itemIndent: (ctx.indent || '') + ' ',
93
+ onChompKeep,
94
+ onComment
95
+ });
96
+ }
97
+ }
98
+ function asItemIndex(key) {
99
+ let idx = Node.isScalar(key) ? key.value : key;
100
+ if (idx && typeof idx === 'string')
101
+ idx = Number(idx);
102
+ return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0
103
+ ? idx
104
+ : null;
105
+ }
106
+
107
+ exports.YAMLSeq = YAMLSeq;
@@ -0,0 +1,3 @@
1
+ import type { Pair } from './Pair.js';
2
+ import { ToJSContext } from './toJS.js';
3
+ export declare function addPairToJSMap(ctx: ToJSContext | undefined, map: Map<unknown, unknown> | Set<unknown> | Record<string | number | symbol, unknown>, { key, value }: Pair): Map<unknown, unknown> | Set<unknown> | Record<string | number | symbol, unknown>;
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ var log = require('../log.js');
4
+ var stringify = require('../stringify/stringify.js');
5
+ var Node = require('./Node.js');
6
+ var Scalar = require('./Scalar.js');
7
+ var toJS = require('./toJS.js');
8
+
9
+ const MERGE_KEY = '<<';
10
+ function addPairToJSMap(ctx, map, { key, value }) {
11
+ if (ctx && ctx.doc.schema.merge && isMergeKey(key)) {
12
+ value = Node.isAlias(value) ? value.resolve(ctx.doc) : value;
13
+ if (Node.isSeq(value))
14
+ for (const it of value.items)
15
+ mergeToJSMap(ctx, map, it);
16
+ else if (Array.isArray(value))
17
+ for (const it of value)
18
+ mergeToJSMap(ctx, map, it);
19
+ else
20
+ mergeToJSMap(ctx, map, value);
21
+ }
22
+ else {
23
+ const jsKey = toJS.toJS(key, '', ctx);
24
+ if (map instanceof Map) {
25
+ map.set(jsKey, toJS.toJS(value, jsKey, ctx));
26
+ }
27
+ else if (map instanceof Set) {
28
+ map.add(jsKey);
29
+ }
30
+ else {
31
+ const stringKey = stringifyKey(key, jsKey, ctx);
32
+ const jsValue = toJS.toJS(value, stringKey, ctx);
33
+ if (stringKey in map)
34
+ Object.defineProperty(map, stringKey, {
35
+ value: jsValue,
36
+ writable: true,
37
+ enumerable: true,
38
+ configurable: true
39
+ });
40
+ else
41
+ map[stringKey] = jsValue;
42
+ }
43
+ }
44
+ return map;
45
+ }
46
+ const isMergeKey = (key) => key === MERGE_KEY ||
47
+ (Node.isScalar(key) &&
48
+ key.value === MERGE_KEY &&
49
+ (!key.type || key.type === Scalar.Scalar.PLAIN));
50
+ // If the value associated with a merge key is a single mapping node, each of
51
+ // its key/value pairs is inserted into the current mapping, unless the key
52
+ // already exists in it. If the value associated with the merge key is a
53
+ // sequence, then this sequence is expected to contain mapping nodes and each
54
+ // of these nodes is merged in turn according to its order in the sequence.
55
+ // Keys in mapping nodes earlier in the sequence override keys specified in
56
+ // later mapping nodes. -- http://yaml.org/type/merge.html
57
+ function mergeToJSMap(ctx, map, value) {
58
+ const source = ctx && Node.isAlias(value) ? value.resolve(ctx.doc) : value;
59
+ if (!Node.isMap(source))
60
+ throw new Error('Merge sources must be maps or map aliases');
61
+ const srcMap = source.toJSON(null, ctx, Map);
62
+ for (const [key, value] of srcMap) {
63
+ if (map instanceof Map) {
64
+ if (!map.has(key))
65
+ map.set(key, value);
66
+ }
67
+ else if (map instanceof Set) {
68
+ map.add(key);
69
+ }
70
+ else if (!Object.prototype.hasOwnProperty.call(map, key)) {
71
+ Object.defineProperty(map, key, {
72
+ value,
73
+ writable: true,
74
+ enumerable: true,
75
+ configurable: true
76
+ });
77
+ }
78
+ }
79
+ return map;
80
+ }
81
+ function stringifyKey(key, jsKey, ctx) {
82
+ if (jsKey === null)
83
+ return '';
84
+ if (typeof jsKey !== 'object')
85
+ return String(jsKey);
86
+ if (Node.isNode(key) && ctx && ctx.doc) {
87
+ const strCtx = stringify.createStringifyContext(ctx.doc, {});
88
+ strCtx.anchors = new Set();
89
+ for (const node of ctx.anchors.keys())
90
+ strCtx.anchors.add(node.anchor);
91
+ strCtx.inFlow = true;
92
+ strCtx.inStringifyKey = true;
93
+ const strKey = key.toString(strCtx);
94
+ if (!ctx.mapKeyWarned) {
95
+ let jsonStr = JSON.stringify(strKey);
96
+ if (jsonStr.length > 40)
97
+ jsonStr = jsonStr.substring(0, 36) + '..."';
98
+ log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
99
+ ctx.mapKeyWarned = true;
100
+ }
101
+ return strKey;
102
+ }
103
+ return JSON.stringify(jsKey);
104
+ }
105
+
106
+ exports.addPairToJSMap = addPairToJSMap;
@@ -0,0 +1,30 @@
1
+ import type { Document } from '../doc/Document.js';
2
+ import type { stringify } from '../stringify/stringify.js';
3
+ import { Node } from './Node.js';
4
+ export interface AnchorData {
5
+ aliasCount: number;
6
+ count: number;
7
+ res: unknown;
8
+ }
9
+ export interface ToJSContext {
10
+ anchors: Map<Node, AnchorData>;
11
+ doc: Document;
12
+ keep: boolean;
13
+ mapAsMap: boolean;
14
+ mapKeyWarned: boolean;
15
+ maxAliasCount: number;
16
+ onCreate?: (res: unknown) => void;
17
+ /** Requiring this directly in Pair would create circular dependencies */
18
+ stringify: typeof stringify;
19
+ }
20
+ /**
21
+ * Recursively convert any node or its contents to native JavaScript
22
+ *
23
+ * @param value - The input value
24
+ * @param arg - If `value` defines a `toJSON()` method, use this
25
+ * as its first argument
26
+ * @param ctx - Conversion context, originally set in Document#toJS(). If
27
+ * `{ keep: true }` is not set, output should be suitable for JSON
28
+ * stringification.
29
+ */
30
+ export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any;
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ var Node = require('./Node.js');
4
+
5
+ /**
6
+ * Recursively convert any node or its contents to native JavaScript
7
+ *
8
+ * @param value - The input value
9
+ * @param arg - If `value` defines a `toJSON()` method, use this
10
+ * as its first argument
11
+ * @param ctx - Conversion context, originally set in Document#toJS(). If
12
+ * `{ keep: true }` is not set, output should be suitable for JSON
13
+ * stringification.
14
+ */
15
+ function toJS(value, arg, ctx) {
16
+ if (Array.isArray(value))
17
+ return value.map((v, i) => toJS(v, String(i), ctx));
18
+ if (value && typeof value.toJSON === 'function') {
19
+ if (!ctx || !Node.hasAnchor(value))
20
+ return value.toJSON(arg, ctx);
21
+ const data = { aliasCount: 0, count: 1, res: undefined };
22
+ ctx.anchors.set(value, data);
23
+ ctx.onCreate = res => {
24
+ data.res = res;
25
+ delete ctx.onCreate;
26
+ };
27
+ const res = value.toJSON(arg, ctx);
28
+ if (ctx.onCreate)
29
+ ctx.onCreate(res);
30
+ return res;
31
+ }
32
+ if (typeof value === 'bigint' && !(ctx && ctx.keep))
33
+ return Number(value);
34
+ return value;
35
+ }
36
+
37
+ exports.toJS = toJS;
@@ -0,0 +1,338 @@
1
+ import type { Reviver } from './doc/applyReviver.js';
2
+ import type { Directives } from './doc/directives.js';
3
+ import type { LogLevelId } from './log.js';
4
+ import type { ParsedNode } from './nodes/Node.js';
5
+ import type { Pair } from './nodes/Pair.js';
6
+ import type { Scalar } from './nodes/Scalar.js';
7
+ import type { LineCounter } from './parse/line-counter.js';
8
+ import type { Schema } from './schema/Schema.js';
9
+ import type { Tags } from './schema/tags.js';
10
+ import type { CollectionTag, ScalarTag } from './schema/types.js';
11
+ export declare type ParseOptions = {
12
+ /**
13
+ * Whether integers should be parsed into BigInt rather than number values.
14
+ *
15
+ * Default: `false`
16
+ *
17
+ * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/BigInt
18
+ */
19
+ intAsBigInt?: boolean;
20
+ /**
21
+ * Include a `srcToken` value on each parsed `Node`, containing the CST token
22
+ * that was composed into this node.
23
+ *
24
+ * Default: `false`
25
+ */
26
+ keepSourceTokens?: boolean;
27
+ /**
28
+ * If set, newlines will be tracked, to allow for `lineCounter.linePos(offset)`
29
+ * to provide the `{ line, col }` positions within the input.
30
+ */
31
+ lineCounter?: LineCounter;
32
+ /**
33
+ * Include line/col position & node type directly in parse errors.
34
+ *
35
+ * Default: `true`
36
+ */
37
+ prettyErrors?: boolean;
38
+ /**
39
+ * Detect and report errors that are required by the YAML 1.2 spec,
40
+ * but are caused by unambiguous content.
41
+ *
42
+ * Default: `true`
43
+ */
44
+ strict?: boolean;
45
+ /**
46
+ * YAML requires map keys to be unique. By default, this is checked by
47
+ * comparing scalar values with `===`; deep equality is not checked for
48
+ * aliases or collections. If merge keys are enabled by the schema,
49
+ * multiple `<<` keys are allowed.
50
+ *
51
+ * Set `false` to disable, or provide your own comparator function to
52
+ * customise. The comparator will be passed two `ParsedNode` values, and
53
+ * is expected to return a `boolean` indicating their equality.
54
+ *
55
+ * Default: `true`
56
+ */
57
+ uniqueKeys?: boolean | ((a: ParsedNode, b: ParsedNode) => boolean);
58
+ };
59
+ export declare type DocumentOptions = {
60
+ /**
61
+ * Used internally by Composer. If set and includes an explicit version,
62
+ * that overrides the `version` option.
63
+ */
64
+ directives?: Directives;
65
+ /**
66
+ * Control the logging level during parsing
67
+ *
68
+ * Default: `'warn'`
69
+ */
70
+ logLevel?: LogLevelId;
71
+ /**
72
+ * The YAML version used by documents without a `%YAML` directive.
73
+ *
74
+ * Default: `"1.2"`
75
+ */
76
+ version?: '1.1' | '1.2';
77
+ };
78
+ export declare type SchemaOptions = {
79
+ /**
80
+ * When parsing, warn about compatibility issues with the given schema.
81
+ * When stringifying, use scalar styles that are parsed correctly
82
+ * by the `compat` schema as well as the actual schema.
83
+ *
84
+ * Default: `null`
85
+ */
86
+ compat?: string | Tags | null;
87
+ /**
88
+ * Array of additional tags to include in the schema, or a function that may
89
+ * modify the schema's base tag array.
90
+ */
91
+ customTags?: Tags | ((tags: Tags) => Tags) | null;
92
+ /**
93
+ * Enable support for `<<` merge keys.
94
+ *
95
+ * Default: `false` for YAML 1.2, `true` for earlier versions
96
+ */
97
+ merge?: boolean;
98
+ /**
99
+ * When using the `'core'` schema, support parsing values with these
100
+ * explicit YAML 1.1 tags:
101
+ *
102
+ * `!!binary`, `!!omap`, `!!pairs`, `!!set`, `!!timestamp`.
103
+ *
104
+ * Default `true`
105
+ */
106
+ resolveKnownTags?: boolean;
107
+ /**
108
+ * The base schema to use.
109
+ *
110
+ * The core library has built-in support for the following:
111
+ * - `'failsafe'`: A minimal schema that parses all scalars as strings
112
+ * - `'core'`: The YAML 1.2 core schema
113
+ * - `'json'`: The YAML 1.2 JSON schema, with minimal rules for JSON compatibility
114
+ * - `'yaml-1.1'`: The YAML 1.1 schema
115
+ *
116
+ * If using another (custom) schema, the `customTags` array needs to
117
+ * fully define the schema's tags.
118
+ *
119
+ * Default: `'core'` for YAML 1.2, `'yaml-1.1'` for earlier versions
120
+ */
121
+ schema?: string | Schema;
122
+ /**
123
+ * When adding to or stringifying a map, sort the entries.
124
+ * If `true`, sort by comparing key values with `<`.
125
+ * Does not affect item order when parsing.
126
+ *
127
+ * Default: `false`
128
+ */
129
+ sortMapEntries?: boolean | ((a: Pair, b: Pair) => number);
130
+ /**
131
+ * Override default values for `toString()` options.
132
+ */
133
+ toStringDefaults?: ToStringOptions;
134
+ };
135
+ export declare type CreateNodeOptions = {
136
+ /**
137
+ * During node construction, use anchors and aliases to keep strictly equal
138
+ * non-null objects as equivalent in YAML.
139
+ *
140
+ * Default: `true`
141
+ */
142
+ aliasDuplicateObjects?: boolean;
143
+ /**
144
+ * Default prefix for anchors.
145
+ *
146
+ * Default: `'a'`, resulting in anchors `a1`, `a2`, etc.
147
+ */
148
+ anchorPrefix?: string;
149
+ /** Force the top-level collection node to use flow style. */
150
+ flow?: boolean;
151
+ /**
152
+ * Keep `undefined` object values when creating mappings, rather than
153
+ * discarding them.
154
+ *
155
+ * Default: `false`
156
+ */
157
+ keepUndefined?: boolean | null;
158
+ onTagObj?: (tagObj: ScalarTag | CollectionTag) => void;
159
+ /**
160
+ * Specify the top-level collection type, e.g. `"!!omap"`. Note that this
161
+ * requires the corresponding tag to be available in this document's schema.
162
+ */
163
+ tag?: string;
164
+ };
165
+ export declare type ToJSOptions = {
166
+ /**
167
+ * Use Map rather than Object to represent mappings.
168
+ *
169
+ * Default: `false`
170
+ */
171
+ mapAsMap?: boolean;
172
+ /**
173
+ * Prevent exponential entity expansion attacks by limiting data aliasing count;
174
+ * set to `-1` to disable checks; `0` disallows all alias nodes.
175
+ *
176
+ * Default: `100`
177
+ */
178
+ maxAliasCount?: number;
179
+ /**
180
+ * If defined, called with the resolved `value` and reference `count` for
181
+ * each anchor in the document.
182
+ */
183
+ onAnchor?: (value: unknown, count: number) => void;
184
+ /**
185
+ * Optional function that may filter or modify the output JS value
186
+ *
187
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter
188
+ */
189
+ reviver?: Reviver;
190
+ };
191
+ export declare type ToStringOptions = {
192
+ /**
193
+ * Use block quote styles for scalar values where applicable.
194
+ * Set to `false` to disable block quotes completely.
195
+ *
196
+ * Default: `true`
197
+ */
198
+ blockQuote?: boolean | 'folded' | 'literal';
199
+ /**
200
+ * Enforce `'block'` or `'flow'` style on maps and sequences.
201
+ * Empty collections will always be stringified as `{}` or `[]`.
202
+ *
203
+ * Default: `'any'`, allowing each node to set its style separately
204
+ * with its `flow: boolean` (default `false`) property.
205
+ */
206
+ collectionStyle?: 'any' | 'block' | 'flow';
207
+ /**
208
+ * Comment stringifier.
209
+ * Output should be valid for the current schema.
210
+ *
211
+ * By default, empty comment lines are left empty,
212
+ * lines consisting of a single space are replaced by `#`,
213
+ * and all other lines are prefixed with a `#`.
214
+ */
215
+ commentString?: (comment: string) => string;
216
+ /**
217
+ * The default type of string literal used to stringify implicit key values.
218
+ * Output may use other types if required to fully represent the value.
219
+ *
220
+ * If `null`, the value of `defaultStringType` is used.
221
+ *
222
+ * Default: `null`
223
+ */
224
+ defaultKeyType?: Scalar.Type | null;
225
+ /**
226
+ * The default type of string literal used to stringify values in general.
227
+ * Output may use other types if required to fully represent the value.
228
+ *
229
+ * Default: `'PLAIN'`
230
+ */
231
+ defaultStringType?: Scalar.Type;
232
+ /**
233
+ * Include directives in the output.
234
+ *
235
+ * - If `true`, at least the document-start marker `---` is always included.
236
+ * This does not force the `%YAML` directive to be included. To do that,
237
+ * set `doc.directives.yaml.explicit = true`.
238
+ * - If `false`, no directives or marker is ever included. If using the `%TAG`
239
+ * directive, you are expected to include it manually in the stream before
240
+ * its use.
241
+ * - If `null`, directives and marker may be included if required.
242
+ *
243
+ * Default: `null`
244
+ */
245
+ directives?: boolean | null;
246
+ /**
247
+ * Restrict double-quoted strings to use JSON-compatible syntax.
248
+ *
249
+ * Default: `false`
250
+ */
251
+ doubleQuotedAsJSON?: boolean;
252
+ /**
253
+ * Minimum length for double-quoted strings to use multiple lines to
254
+ * represent the value. Ignored if `doubleQuotedAsJSON` is set.
255
+ *
256
+ * Default: `40`
257
+ */
258
+ doubleQuotedMinMultiLineLength?: number;
259
+ /**
260
+ * String representation for `false`.
261
+ * With the core schema, use `'false'`, `'False'`, or `'FALSE'`.
262
+ *
263
+ * Default: `'false'`
264
+ */
265
+ falseStr?: string;
266
+ /**
267
+ * The number of spaces to use when indenting code.
268
+ *
269
+ * Default: `2`
270
+ */
271
+ indent?: number;
272
+ /**
273
+ * Whether block sequences should be indented.
274
+ *
275
+ * Default: `true`
276
+ */
277
+ indentSeq?: boolean;
278
+ /**
279
+ * Maximum line width (set to `0` to disable folding).
280
+ *
281
+ * This is a soft limit, as only double-quoted semantics allow for inserting
282
+ * a line break in the middle of a word, as well as being influenced by the
283
+ * `minContentWidth` option.
284
+ *
285
+ * Default: `80`
286
+ */
287
+ lineWidth?: number;
288
+ /**
289
+ * Minimum line width for highly-indented content (set to `0` to disable).
290
+ *
291
+ * Default: `20`
292
+ */
293
+ minContentWidth?: number;
294
+ /**
295
+ * String representation for `null`.
296
+ * With the core schema, use `'null'`, `'Null'`, `'NULL'`, `'~'`, or an empty
297
+ * string `''`.
298
+ *
299
+ * Default: `'null'`
300
+ */
301
+ nullStr?: string;
302
+ /**
303
+ * Require keys to be scalars and to use implicit rather than explicit notation.
304
+ *
305
+ * Default: `false`
306
+ */
307
+ simpleKeys?: boolean;
308
+ /**
309
+ * Use 'single quote' rather than "double quote" where applicable.
310
+ * Set to `false` to disable single quotes completely.
311
+ *
312
+ * Default: `null`
313
+ */
314
+ singleQuote?: boolean | null;
315
+ /**
316
+ * String representation for `true`.
317
+ * With the core schema, use `'true'`, `'True'`, or `'TRUE'`.
318
+ *
319
+ * Default: `'true'`
320
+ */
321
+ trueStr?: string;
322
+ /**
323
+ * The anchor used by an alias must be defined before the alias node. As it's
324
+ * possible for the document to be modified manually, the order may be
325
+ * verified during stringification.
326
+ *
327
+ * Default: `'true'`
328
+ */
329
+ verifyAliasOrder?: boolean;
330
+ };
331
+ /**
332
+ * `yaml` defines document-specific options in three places: as an argument of
333
+ * parse, create and stringify calls, in the values of `YAML.defaultOptions`,
334
+ * and in the version-dependent `YAML.Document.defaults` object. Values set in
335
+ * `YAML.defaultOptions` override version-dependent defaults, and argument
336
+ * options override both.
337
+ */
338
+ export declare const defaultOptions: Required<Omit<ParseOptions, 'lineCounter'> & Omit<DocumentOptions, 'directives'>>;