@quilted/create 0.2.44 → 0.2.46
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.
- package/CHANGELOG.md +14 -0
- package/build/esm/_virtual/index3.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/index.mjs +2 -2
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/compile.mjs +12 -10
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/constants.mjs +1 -2
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/expand.mjs +9 -9
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/parse.mjs +14 -14
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/stringify.mjs +4 -4
- package/build/esm/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/utils.mjs +9 -3
- package/build/esm/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.mjs +0 -2
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/index.mjs +39 -8
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/managers/tasks.mjs +40 -10
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/filters/deep.mjs +2 -2
- package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.mjs +101 -0
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/matchers/matcher.mjs +1 -6
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/matchers/partial.mjs +6 -6
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/settings.mjs +7 -5
- package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.mjs +79 -0
- package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/pattern.mjs +69 -29
- package/build/esm/node_modules/.pnpm/{fill-range@7.0.1 → fill-range@7.1.1}/node_modules/fill-range/index.mjs +4 -4
- package/build/esm/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.mjs +2 -2
- package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/ignore.mjs +9 -3
- package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/index.mjs +3 -5
- package/build/esm/node_modules/.pnpm/{micromatch@4.0.5 → micromatch@4.0.8}/node_modules/micromatch/index.mjs +9 -3
- package/build/esm/node_modules/.pnpm/{prettier@3.0.0 → prettier@3.5.1}/node_modules/prettier/plugins/babel.mjs +2448 -3000
- package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/estree.mjs +6611 -0
- package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/typescript.mjs +22 -0
- package/build/esm/node_modules/.pnpm/{prettier@3.0.0 → prettier@3.5.1}/node_modules/prettier/plugins/yaml.mjs +1008 -1007
- package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/standalone.mjs +3878 -0
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.mjs +0 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.mjs +1 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.mjs +0 -1
- package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/compose/compose-collection.mjs +67 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-doc.mjs +3 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-node.mjs +13 -3
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +8 -4
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/composer.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +12 -5
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +6 -2
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +10 -7
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +11 -3
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +14 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-props.mjs +20 -7
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +2 -2
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/Document.mjs +13 -10
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/anchors.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/applyReviver.mjs +1 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/createNode.mjs +4 -4
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/directives.mjs +10 -3
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/errors.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/log.mjs +7 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Alias.mjs +9 -2
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Collection.mjs +2 -2
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/Node.mjs +44 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Pair.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Scalar.mjs +2 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +28 -4
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +22 -4
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +53 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1/node_modules/yaml/browser/dist/nodes/Node.mjs → yaml@2.7.0/node_modules/yaml/browser/dist/nodes/identity.mjs} +1 -14
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/toJS.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/cst.mjs +1 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/lexer.mjs +34 -21
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/parser.mjs +16 -9
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/public-api.mjs +2 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/Schema.mjs +2 -3
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/map.mjs +16 -0
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/seq.mjs +16 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/float.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/json/schema.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/tags.mjs +20 -9
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +3 -6
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +1 -1
- package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +48 -0
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +10 -9
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +4 -2
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +2 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +15 -14
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +2 -4
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +19 -10
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringify.mjs +8 -2
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +9 -17
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +40 -17
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +40 -20
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/visit.mjs +1 -1
- package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/index.mjs +2 -1
- package/build/esm/package.mjs +1 -1
- package/build/esm/shared/package-manager.mjs +1 -2
- package/build/esm/shared.mjs +1 -3
- package/build/esnext/_virtual/index3.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/index.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/compile.esnext +10 -9
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/constants.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/expand.esnext +9 -9
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/parse.esnext +14 -14
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/stringify.esnext +4 -4
- package/build/esnext/node_modules/.pnpm/{braces@3.0.2 → braces@3.0.3}/node_modules/braces/lib/utils.esnext +9 -3
- package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/index.esnext +35 -4
- package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/managers/tasks.esnext +14 -2
- package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.esnext +92 -0
- package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/matchers/matcher.esnext +1 -2
- package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/settings.esnext +3 -2
- package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.esnext +58 -0
- package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/pattern.esnext +27 -6
- package/build/esnext/node_modules/.pnpm/{fill-range@7.0.1 → fill-range@7.1.1}/node_modules/fill-range/index.esnext +4 -4
- package/build/esnext/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/ignore.esnext +6 -4
- package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/index.esnext +3 -3
- package/build/esnext/node_modules/.pnpm/{micromatch@4.0.5 → micromatch@4.0.8}/node_modules/micromatch/index.esnext +8 -3
- package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/babel.esnext +6956 -0
- package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/estree.esnext +4320 -0
- package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/typescript.esnext +12888 -0
- package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/yaml.esnext +4156 -0
- package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/standalone.esnext +2369 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/compose/compose-collection.esnext +60 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-doc.esnext +2 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-node.esnext +11 -3
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-scalar.esnext +13 -5
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/composer.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-map.esnext +13 -4
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.esnext +6 -2
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-seq.esnext +11 -6
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.esnext +12 -3
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.esnext +14 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-props.esnext +20 -9
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-map-includes.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/Document.esnext +8 -13
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/anchors.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/createNode.esnext +5 -3
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/directives.esnext +10 -4
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/errors.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/log.esnext +7 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Alias.esnext +8 -2
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Collection.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/Node.esnext +36 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Pair.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Scalar.esnext +2 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLMap.esnext +31 -4
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLSeq.esnext +20 -4
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.esnext +8 -38
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1/node_modules/yaml/browser/dist/nodes/Node.esnext → yaml@2.7.0/node_modules/yaml/browser/dist/nodes/identity.esnext} +1 -13
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/toJS.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/cst.esnext +1 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/lexer.esnext +45 -33
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/parser.esnext +12 -9
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/public-api.esnext +3 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/Schema.esnext +2 -3
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/map.esnext +17 -0
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/seq.esnext +17 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/float.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/json/schema.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/tags.esnext +22 -11
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.esnext +3 -6
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.esnext +50 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.esnext +10 -9
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.esnext +4 -3
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.esnext +2 -0
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.esnext +15 -14
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.esnext +2 -2
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/foldFlowLines.esnext +20 -10
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringify.esnext +9 -2
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyCollection.esnext +20 -28
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyDocument.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyPair.esnext +44 -23
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyString.esnext +38 -20
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/visit.esnext +1 -1
- package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/index.esnext +2 -1
- package/build/esnext/package.esnext +1 -1
- package/build/esnext/shared/package-manager.esnext +1 -1
- package/build/esnext/shared.esnext +5 -6
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/typescript/shared/package-manager.d.ts.map +1 -1
- package/build/typescript/shared.d.ts.map +1 -1
- package/package.json +7 -7
- package/source/shared/package-manager.ts +0 -1
- package/source/shared.ts +1 -2
- package/templates/workspace/_nvmrc +1 -1
- package/templates/workspace/package.json +1 -1
- package/build/esm/_virtual/patterns.mjs +0 -3
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.mjs +0 -32
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.mjs +0 -76
- package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.mjs +0 -45
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.mjs +0 -6172
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.mjs +0 -29
- package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.mjs +0 -4076
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/compose-collection.mjs +0 -58
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/log.mjs +0 -7
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +0 -83
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/map.mjs +0 -37
- package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/seq.mjs +0 -34
- package/build/esnext/_virtual/patterns.esnext +0 -3
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.esnext +0 -21
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.esnext +0 -71
- package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.esnext +0 -38
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.esnext +0 -18
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.esnext +0 -37
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.esnext +0 -29
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.esnext +0 -163
- package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.esnext +0 -36
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/compose-collection.esnext +0 -55
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/log.esnext +0 -10
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/map.esnext +0 -41
- package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/seq.esnext +0 -33
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/async.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/filters/error.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/provider.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/stream.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/sync.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/transformers/entry.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/async.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/reader.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/stream.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/sync.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/array.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/errno.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/fs.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/index.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/stream.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/string.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/utilities.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-end.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/line-counter.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/null.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/string.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/bool.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/int.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/schema.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +0 -0
- /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/async.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/filters/deep.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/filters/error.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/matchers/partial.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/provider.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/stream.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/sync.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/providers/transformers/entry.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/async.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/reader.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/stream.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/readers/sync.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/array.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/errno.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/fs.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/index.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/stream.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{fast-glob@3.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/string.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/utilities.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-end.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-contains-newline.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/applyReviver.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/line-counter.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/null.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/string.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/bool.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/int.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/schema.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyComment.esnext +0 -0
- /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyNumber.esnext +0 -0
|
@@ -11,6 +11,7 @@ function applyReviver(reviver, obj, key, val) {
|
|
|
11
11
|
for (let i = 0, len = val.length; i < len; ++i) {
|
|
12
12
|
const v0 = val[i];
|
|
13
13
|
const v1 = applyReviver(reviver, val, String(i), v0);
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-array-delete
|
|
14
15
|
if (v1 === undefined) delete val[i];else if (v1 !== v0) val[i] = v1;
|
|
15
16
|
}
|
|
16
17
|
} else if (val instanceof Map) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alias } from '../nodes/Alias.mjs';
|
|
2
|
-
import { isDocument, isNode, isPair, MAP, SEQ } from '../nodes/
|
|
2
|
+
import { isDocument, isNode, isPair, MAP, SEQ } from '../nodes/identity.mjs';
|
|
3
3
|
import { Scalar } from '../nodes/Scalar.mjs';
|
|
4
4
|
|
|
5
5
|
const defaultTagPrefix = 'tag:yaml.org,2002:';
|
|
@@ -20,7 +20,7 @@ function createNode(value, tagName, ctx) {
|
|
|
20
20
|
map.items.push(value);
|
|
21
21
|
return map;
|
|
22
22
|
}
|
|
23
|
-
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt
|
|
23
|
+
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== 'undefined' && value instanceof BigInt // not supported everywhere
|
|
24
24
|
) {
|
|
25
25
|
// https://tc39.es/ecma262/#sec-serializejsonproperty
|
|
26
26
|
value = value.valueOf();
|
|
@@ -66,8 +66,8 @@ function createNode(value, tagName, ctx) {
|
|
|
66
66
|
onTagObj(tagObj);
|
|
67
67
|
delete ctx.onTagObj;
|
|
68
68
|
}
|
|
69
|
-
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : new Scalar(value);
|
|
70
|
-
if (tagName) node.tag = tagName;
|
|
69
|
+
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === 'function' ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar(value);
|
|
70
|
+
if (tagName) node.tag = tagName;else if (!tagObj.default) node.tag = tagObj.tag;
|
|
71
71
|
if (ref) ref.node = node;
|
|
72
72
|
return node;
|
|
73
73
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNode } from '../nodes/
|
|
1
|
+
import { isNode } from '../nodes/identity.mjs';
|
|
2
2
|
import { visit } from '../visit.mjs';
|
|
3
3
|
|
|
4
4
|
const escapeChars = {
|
|
@@ -117,10 +117,17 @@ class Directives {
|
|
|
117
117
|
if (source[source.length - 1] !== '>') onError('Verbatim tags must end with a >');
|
|
118
118
|
return verbatim;
|
|
119
119
|
}
|
|
120
|
-
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/);
|
|
120
|
+
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
|
121
121
|
if (!suffix) onError(`The ${source} tag has no suffix`);
|
|
122
122
|
const prefix = this.tags[handle];
|
|
123
|
-
if (prefix)
|
|
123
|
+
if (prefix) {
|
|
124
|
+
try {
|
|
125
|
+
return prefix + decodeURIComponent(suffix);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
onError(String(error));
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
124
131
|
if (handle === '!') return source; // local tag
|
|
125
132
|
onError(`Could not resolve tag: ${source}`);
|
|
126
133
|
return null;
|
|
@@ -45,7 +45,7 @@ const prettifyError = (src, lc) => error => {
|
|
|
45
45
|
let count = 1;
|
|
46
46
|
const end = error.linePos[1];
|
|
47
47
|
if (end && end.line === line && end.col > col) {
|
|
48
|
-
count = Math.min(end.col - col, 80 - ci);
|
|
48
|
+
count = Math.max(1, Math.min(end.col - col, 80 - ci));
|
|
49
49
|
}
|
|
50
50
|
const pointer = ' '.repeat(ci) + '^'.repeat(count);
|
|
51
51
|
error.message += `:\n\n${lineStr}\n${pointer}\n`;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { anchorIsValid } from '../doc/anchors.mjs';
|
|
2
2
|
import { visit } from '../visit.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { ALIAS, isAlias, isCollection, isPair } from './identity.mjs';
|
|
4
|
+
import { NodeBase } from './Node.mjs';
|
|
5
|
+
import { toJS } from './toJS.mjs';
|
|
4
6
|
|
|
5
7
|
class Alias extends NodeBase {
|
|
6
8
|
constructor(source) {
|
|
@@ -40,7 +42,12 @@ class Alias extends NodeBase {
|
|
|
40
42
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
41
43
|
throw new ReferenceError(msg);
|
|
42
44
|
}
|
|
43
|
-
|
|
45
|
+
let data = anchors.get(source);
|
|
46
|
+
if (!data) {
|
|
47
|
+
// Resolve anchors for Node.prototype.toJS()
|
|
48
|
+
toJS(source, null, ctx);
|
|
49
|
+
data = anchors.get(source);
|
|
50
|
+
}
|
|
44
51
|
/* istanbul ignore if */
|
|
45
52
|
if (!data || data.res === undefined) {
|
|
46
53
|
const msg = 'This should not happen: Alias anchor was not resolved?';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createNode } from '../doc/createNode.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { isNode, isPair, isCollection, isScalar } from './identity.mjs';
|
|
3
|
+
import { NodeBase } from './Node.mjs';
|
|
3
4
|
|
|
4
5
|
function collectionFromPath(schema, path, value) {
|
|
5
6
|
let v = value;
|
|
@@ -110,6 +111,5 @@ class Collection extends NodeBase {
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
Collection.maxFlowStringSingleLineLength = 60;
|
|
114
114
|
|
|
115
115
|
export { Collection, collectionFromPath, isEmptyPath };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { applyReviver } from '../doc/applyReviver.mjs';
|
|
2
|
+
import { NODE_TYPE, isDocument } from './identity.mjs';
|
|
3
|
+
import { toJS } from './toJS.mjs';
|
|
4
|
+
|
|
5
|
+
class NodeBase {
|
|
6
|
+
constructor(type) {
|
|
7
|
+
Object.defineProperty(this, NODE_TYPE, {
|
|
8
|
+
value: type
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Create a copy of this node. */
|
|
12
|
+
clone() {
|
|
13
|
+
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
14
|
+
if (this.range) copy.range = this.range.slice();
|
|
15
|
+
return copy;
|
|
16
|
+
}
|
|
17
|
+
/** A plain JavaScript representation of this node. */
|
|
18
|
+
toJS(doc, {
|
|
19
|
+
mapAsMap,
|
|
20
|
+
maxAliasCount,
|
|
21
|
+
onAnchor,
|
|
22
|
+
reviver
|
|
23
|
+
} = {}) {
|
|
24
|
+
if (!isDocument(doc)) throw new TypeError('A document argument is required');
|
|
25
|
+
const ctx = {
|
|
26
|
+
anchors: new Map(),
|
|
27
|
+
doc,
|
|
28
|
+
keep: true,
|
|
29
|
+
mapAsMap: mapAsMap === true,
|
|
30
|
+
mapKeyWarned: false,
|
|
31
|
+
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
|
32
|
+
};
|
|
33
|
+
const res = toJS(this, '', ctx);
|
|
34
|
+
if (typeof onAnchor === 'function') for (const {
|
|
35
|
+
count,
|
|
36
|
+
res
|
|
37
|
+
} of ctx.anchors.values()) onAnchor(res, count);
|
|
38
|
+
return typeof reviver === 'function' ? applyReviver(reviver, {
|
|
39
|
+
'': res
|
|
40
|
+
}, '', res) : res;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { NodeBase };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createNode } from '../doc/createNode.mjs';
|
|
2
2
|
import { stringifyPair } from '../stringify/stringifyPair.mjs';
|
|
3
3
|
import { addPairToJSMap } from './addPairToJSMap.mjs';
|
|
4
|
-
import { NODE_TYPE, PAIR, isNode } from './
|
|
4
|
+
import { NODE_TYPE, PAIR, isNode } from './identity.mjs';
|
|
5
5
|
|
|
6
6
|
function createPair(key, value, ctx) {
|
|
7
7
|
const k = createNode(key, undefined, ctx);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SCALAR } from './identity.mjs';
|
|
2
|
+
import { NodeBase } from './Node.mjs';
|
|
2
3
|
import { toJS } from './toJS.mjs';
|
|
3
4
|
|
|
4
5
|
const isScalarValue = value => !value || typeof value !== 'function' && typeof value !== 'object';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { stringifyCollection } from '../stringify/stringifyCollection.mjs';
|
|
2
2
|
import { addPairToJSMap } from './addPairToJSMap.mjs';
|
|
3
3
|
import { Collection } from './Collection.mjs';
|
|
4
|
-
import { MAP, isPair, isScalar } from './
|
|
5
|
-
import { Pair } from './Pair.mjs';
|
|
4
|
+
import { MAP, isPair, isScalar } from './identity.mjs';
|
|
5
|
+
import { Pair, createPair } from './Pair.mjs';
|
|
6
6
|
import { isScalarValue } from './Scalar.mjs';
|
|
7
7
|
|
|
8
8
|
function findPair(items, key) {
|
|
@@ -16,12 +16,36 @@ function findPair(items, key) {
|
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
18
|
class YAMLMap extends Collection {
|
|
19
|
+
static get tagName() {
|
|
20
|
+
return 'tag:yaml.org,2002:map';
|
|
21
|
+
}
|
|
19
22
|
constructor(schema) {
|
|
20
23
|
super(MAP, schema);
|
|
21
24
|
this.items = [];
|
|
22
25
|
}
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
/**
|
|
27
|
+
* A generic collection parsing method that can be extended
|
|
28
|
+
* to other node classes that inherit from YAMLMap
|
|
29
|
+
*/
|
|
30
|
+
static from(schema, obj, ctx) {
|
|
31
|
+
const {
|
|
32
|
+
keepUndefined,
|
|
33
|
+
replacer
|
|
34
|
+
} = ctx;
|
|
35
|
+
const map = new this(schema);
|
|
36
|
+
const add = (key, value) => {
|
|
37
|
+
if (typeof replacer === 'function') value = replacer.call(obj, key, value);else if (Array.isArray(replacer) && !replacer.includes(key)) return;
|
|
38
|
+
if (value !== undefined || keepUndefined) map.items.push(createPair(key, value, ctx));
|
|
39
|
+
};
|
|
40
|
+
if (obj instanceof Map) {
|
|
41
|
+
for (const [key, value] of obj) add(key, value);
|
|
42
|
+
} else if (obj && typeof obj === 'object') {
|
|
43
|
+
for (const key of Object.keys(obj)) add(key, obj[key]);
|
|
44
|
+
}
|
|
45
|
+
if (typeof schema.sortMapEntries === 'function') {
|
|
46
|
+
map.items.sort(schema.sortMapEntries);
|
|
47
|
+
}
|
|
48
|
+
return map;
|
|
25
49
|
}
|
|
26
50
|
/**
|
|
27
51
|
* Adds a value to the collection.
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { createNode } from '../doc/createNode.mjs';
|
|
1
2
|
import { stringifyCollection } from '../stringify/stringifyCollection.mjs';
|
|
2
3
|
import { Collection } from './Collection.mjs';
|
|
3
|
-
import { SEQ, isScalar } from './
|
|
4
|
+
import { SEQ, isScalar } from './identity.mjs';
|
|
4
5
|
import { isScalarValue } from './Scalar.mjs';
|
|
5
6
|
import { toJS } from './toJS.mjs';
|
|
6
7
|
|
|
7
8
|
class YAMLSeq extends Collection {
|
|
9
|
+
static get tagName() {
|
|
10
|
+
return 'tag:yaml.org,2002:seq';
|
|
11
|
+
}
|
|
8
12
|
constructor(schema) {
|
|
9
13
|
super(SEQ, schema);
|
|
10
14
|
this.items = [];
|
|
11
15
|
}
|
|
12
|
-
static get tagName() {
|
|
13
|
-
return 'tag:yaml.org,2002:seq';
|
|
14
|
-
}
|
|
15
16
|
add(value) {
|
|
16
17
|
this.items.push(value);
|
|
17
18
|
}
|
|
@@ -78,6 +79,23 @@ class YAMLSeq extends Collection {
|
|
|
78
79
|
onComment
|
|
79
80
|
});
|
|
80
81
|
}
|
|
82
|
+
static from(schema, obj, ctx) {
|
|
83
|
+
const {
|
|
84
|
+
replacer
|
|
85
|
+
} = ctx;
|
|
86
|
+
const seq = new this(schema);
|
|
87
|
+
if (obj && Symbol.iterator in Object(obj)) {
|
|
88
|
+
let i = 0;
|
|
89
|
+
for (let it of obj) {
|
|
90
|
+
if (typeof replacer === 'function') {
|
|
91
|
+
const key = obj instanceof Set ? it : String(i++);
|
|
92
|
+
it = replacer.call(obj, key, it);
|
|
93
|
+
}
|
|
94
|
+
seq.items.push(createNode(it, undefined, ctx));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return seq;
|
|
98
|
+
}
|
|
81
99
|
}
|
|
82
100
|
function asItemIndex(key) {
|
|
83
101
|
let idx = isScalar(key) ? key.value : key;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { warn } from '../log.mjs';
|
|
2
|
+
import { isMergeKey, addMergeToJSMap } from '../schema/yaml-1.1/merge.mjs';
|
|
3
|
+
import { createStringifyContext } from '../stringify/stringify.mjs';
|
|
4
|
+
import { isNode } from './identity.mjs';
|
|
5
|
+
import { toJS } from './toJS.mjs';
|
|
6
|
+
|
|
7
|
+
function addPairToJSMap(ctx, map, {
|
|
8
|
+
key,
|
|
9
|
+
value
|
|
10
|
+
}) {
|
|
11
|
+
if (isNode(key) && key.addToJSMap) key.addToJSMap(ctx, map, value);
|
|
12
|
+
// TODO: Should drop this special case for bare << handling
|
|
13
|
+
else if (isMergeKey(ctx, key)) addMergeToJSMap(ctx, map, value);else {
|
|
14
|
+
const jsKey = toJS(key, '', ctx);
|
|
15
|
+
if (map instanceof Map) {
|
|
16
|
+
map.set(jsKey, toJS(value, jsKey, ctx));
|
|
17
|
+
} else if (map instanceof Set) {
|
|
18
|
+
map.add(jsKey);
|
|
19
|
+
} else {
|
|
20
|
+
const stringKey = stringifyKey(key, jsKey, ctx);
|
|
21
|
+
const jsValue = toJS(value, stringKey, ctx);
|
|
22
|
+
if (stringKey in map) Object.defineProperty(map, stringKey, {
|
|
23
|
+
value: jsValue,
|
|
24
|
+
writable: true,
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true
|
|
27
|
+
});else map[stringKey] = jsValue;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return map;
|
|
31
|
+
}
|
|
32
|
+
function stringifyKey(key, jsKey, ctx) {
|
|
33
|
+
if (jsKey === null) return '';
|
|
34
|
+
if (typeof jsKey !== 'object') return String(jsKey);
|
|
35
|
+
if (isNode(key) && ctx?.doc) {
|
|
36
|
+
const strCtx = createStringifyContext(ctx.doc, {});
|
|
37
|
+
strCtx.anchors = new Set();
|
|
38
|
+
for (const node of ctx.anchors.keys()) strCtx.anchors.add(node.anchor);
|
|
39
|
+
strCtx.inFlow = true;
|
|
40
|
+
strCtx.inStringifyKey = true;
|
|
41
|
+
const strKey = key.toString(strCtx);
|
|
42
|
+
if (!ctx.mapKeyWarned) {
|
|
43
|
+
let jsonStr = JSON.stringify(strKey);
|
|
44
|
+
if (jsonStr.length > 40) jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
45
|
+
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.`);
|
|
46
|
+
ctx.mapKeyWarned = true;
|
|
47
|
+
}
|
|
48
|
+
return strKey;
|
|
49
|
+
}
|
|
50
|
+
return JSON.stringify(jsKey);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { addPairToJSMap };
|
|
@@ -30,18 +30,5 @@ function isNode(node) {
|
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
const hasAnchor = node => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
33
|
-
class NodeBase {
|
|
34
|
-
constructor(type) {
|
|
35
|
-
Object.defineProperty(this, NODE_TYPE, {
|
|
36
|
-
value: type
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
/** Create a copy of this node. */
|
|
40
|
-
clone() {
|
|
41
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
42
|
-
if (this.range) copy.range = this.range.slice();
|
|
43
|
-
return copy;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
33
|
|
|
47
|
-
export { ALIAS, DOC, MAP, NODE_TYPE,
|
|
34
|
+
export { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq };
|
|
@@ -79,11 +79,11 @@ function isEmpty(ch) {
|
|
|
79
79
|
return false;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const hexDigits = '0123456789ABCDEFabcdef'
|
|
83
|
-
const tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"
|
|
84
|
-
const
|
|
85
|
-
const invalidAnchorChars = ' ,[]{}\n\r\t'
|
|
86
|
-
const isNotAnchorChar = ch => !ch || invalidAnchorChars.
|
|
82
|
+
const hexDigits = new Set('0123456789ABCDEFabcdef');
|
|
83
|
+
const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
84
|
+
const flowIndicatorChars = new Set(',[]{}');
|
|
85
|
+
const invalidAnchorChars = new Set(' ,[]{}\n\r\t');
|
|
86
|
+
const isNotAnchorChar = ch => !ch || invalidAnchorChars.has(ch);
|
|
87
87
|
/**
|
|
88
88
|
* Splits an input string into lexical tokens, i.e. smaller strings that are
|
|
89
89
|
* easily identifiable by `tokens.tokenType()`.
|
|
@@ -149,6 +149,7 @@ class Lexer {
|
|
|
149
149
|
*/
|
|
150
150
|
*lex(source, incomplete = false) {
|
|
151
151
|
if (source) {
|
|
152
|
+
if (typeof source !== 'string') throw TypeError('source is not a string');
|
|
152
153
|
this.buffer = this.buffer ? this.buffer + source : source;
|
|
153
154
|
this.lineEndPos = null;
|
|
154
155
|
}
|
|
@@ -236,10 +237,15 @@ class Lexer {
|
|
|
236
237
|
}
|
|
237
238
|
if (line[0] === '%') {
|
|
238
239
|
let dirEnd = line.length;
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
let cs = line.indexOf('#');
|
|
241
|
+
while (cs !== -1) {
|
|
241
242
|
const ch = line[cs - 1];
|
|
242
|
-
if (ch === ' ' || ch === '\t')
|
|
243
|
+
if (ch === ' ' || ch === '\t') {
|
|
244
|
+
dirEnd = cs - 1;
|
|
245
|
+
break;
|
|
246
|
+
} else {
|
|
247
|
+
cs = line.indexOf('#', cs + 1);
|
|
248
|
+
}
|
|
243
249
|
}
|
|
244
250
|
while (true) {
|
|
245
251
|
const ch = line[dirEnd - 1];
|
|
@@ -265,14 +271,11 @@ class Lexer {
|
|
|
265
271
|
if (ch === '-' || ch === '.') {
|
|
266
272
|
if (!this.atEnd && !this.hasChars(4)) return this.setNext('line-start');
|
|
267
273
|
const s = this.peek(3);
|
|
268
|
-
if (s === '---' && isEmpty(this.charAt(3))) {
|
|
274
|
+
if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {
|
|
269
275
|
yield* this.pushCount(3);
|
|
270
276
|
this.indentValue = 0;
|
|
271
277
|
this.indentNext = 0;
|
|
272
|
-
return 'doc';
|
|
273
|
-
} else if (s === '...' && isEmpty(this.charAt(3))) {
|
|
274
|
-
yield* this.pushCount(3);
|
|
275
|
-
return 'stream';
|
|
278
|
+
return s === '---' ? 'doc' : 'stream';
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
281
|
this.indentValue = yield* this.pushSpaces(false);
|
|
@@ -476,7 +479,9 @@ class Lexer {
|
|
|
476
479
|
}
|
|
477
480
|
if (!ch && !this.atEnd) return this.setNext('block-scalar');
|
|
478
481
|
if (indent >= this.indentNext) {
|
|
479
|
-
if (this.blockScalarIndent === -1) this.indentNext = indent;else
|
|
482
|
+
if (this.blockScalarIndent === -1) this.indentNext = indent;else {
|
|
483
|
+
this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
|
|
484
|
+
}
|
|
480
485
|
do {
|
|
481
486
|
const cs = this.continueScalar(nl + 1);
|
|
482
487
|
if (cs === -1) break;
|
|
@@ -487,13 +492,21 @@ class Lexer {
|
|
|
487
492
|
nl = this.buffer.length;
|
|
488
493
|
}
|
|
489
494
|
}
|
|
490
|
-
|
|
495
|
+
// Trailing insufficiently indented tabs are invalid.
|
|
496
|
+
// To catch that during parsing, we include them in the block scalar value.
|
|
497
|
+
let i = nl + 1;
|
|
498
|
+
ch = this.buffer[i];
|
|
499
|
+
while (ch === ' ') ch = this.buffer[++i];
|
|
500
|
+
if (ch === '\t') {
|
|
501
|
+
while (ch === '\t' || ch === ' ' || ch === '\r' || ch === '\n') ch = this.buffer[++i];
|
|
502
|
+
nl = i - 1;
|
|
503
|
+
} else if (!this.blockScalarKeep) {
|
|
491
504
|
do {
|
|
492
505
|
let i = nl - 1;
|
|
493
506
|
let ch = this.buffer[i];
|
|
494
507
|
if (ch === '\r') ch = this.buffer[--i];
|
|
495
508
|
const lastChar = i; // Drop the line if last char not more indented
|
|
496
|
-
while (ch === ' '
|
|
509
|
+
while (ch === ' ') ch = this.buffer[--i];
|
|
497
510
|
if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) nl = i;else break;
|
|
498
511
|
} while (true);
|
|
499
512
|
}
|
|
@@ -509,7 +522,7 @@ class Lexer {
|
|
|
509
522
|
while (ch = this.buffer[++i]) {
|
|
510
523
|
if (ch === ':') {
|
|
511
524
|
const next = this.buffer[i + 1];
|
|
512
|
-
if (isEmpty(next) || inFlow && next
|
|
525
|
+
if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) break;
|
|
513
526
|
end = i;
|
|
514
527
|
} else if (isEmpty(ch)) {
|
|
515
528
|
let next = this.buffer[i + 1];
|
|
@@ -520,14 +533,14 @@ class Lexer {
|
|
|
520
533
|
next = this.buffer[i + 1];
|
|
521
534
|
} else end = i;
|
|
522
535
|
}
|
|
523
|
-
if (next === '#' || inFlow &&
|
|
536
|
+
if (next === '#' || inFlow && flowIndicatorChars.has(next)) break;
|
|
524
537
|
if (ch === '\n') {
|
|
525
538
|
const cs = this.continueScalar(i + 1);
|
|
526
539
|
if (cs === -1) break;
|
|
527
540
|
i = Math.max(i, cs - 2); // to advance, but still account for ' #'
|
|
528
541
|
}
|
|
529
542
|
} else {
|
|
530
|
-
if (inFlow &&
|
|
543
|
+
if (inFlow && flowIndicatorChars.has(ch)) break;
|
|
531
544
|
end = i;
|
|
532
545
|
}
|
|
533
546
|
}
|
|
@@ -565,7 +578,7 @@ class Lexer {
|
|
|
565
578
|
{
|
|
566
579
|
const inFlow = this.flowLevel > 0;
|
|
567
580
|
const ch1 = this.charAt(1);
|
|
568
|
-
if (isEmpty(ch1) || inFlow &&
|
|
581
|
+
if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
|
|
569
582
|
if (!inFlow) this.indentNext = this.indentValue + 1;else if (this.flowKey) this.flowKey = false;
|
|
570
583
|
return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators());
|
|
571
584
|
}
|
|
@@ -583,7 +596,7 @@ class Lexer {
|
|
|
583
596
|
let i = this.pos + 1;
|
|
584
597
|
let ch = this.buffer[i];
|
|
585
598
|
while (ch) {
|
|
586
|
-
if (tagChars.
|
|
599
|
+
if (tagChars.has(ch)) ch = this.buffer[++i];else if (ch === '%' && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) {
|
|
587
600
|
ch = this.buffer[i += 3];
|
|
588
601
|
} else break;
|
|
589
602
|
}
|
|
@@ -294,7 +294,7 @@ class Parser {
|
|
|
294
294
|
key: token,
|
|
295
295
|
sep: []
|
|
296
296
|
});
|
|
297
|
-
this.onKeyLine = !
|
|
297
|
+
this.onKeyLine = !it.explicitKey;
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
break;
|
|
@@ -494,7 +494,8 @@ class Parser {
|
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
496
|
if (this.indent >= map.indent) {
|
|
497
|
-
const
|
|
497
|
+
const atMapIndent = !this.onKeyLine && this.indent === map.indent;
|
|
498
|
+
const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== 'seq-item-ind';
|
|
498
499
|
// For empty nodes, assign newline-separated not indented empty tokens to following node
|
|
499
500
|
let start = [];
|
|
500
501
|
if (atNextItem && it.sep && !it.value) {
|
|
@@ -532,12 +533,14 @@ class Parser {
|
|
|
532
533
|
}
|
|
533
534
|
return;
|
|
534
535
|
case 'explicit-key-ind':
|
|
535
|
-
if (!it.sep && !
|
|
536
|
+
if (!it.sep && !it.explicitKey) {
|
|
536
537
|
it.start.push(this.sourceToken);
|
|
538
|
+
it.explicitKey = true;
|
|
537
539
|
} else if (atNextItem || it.value) {
|
|
538
540
|
start.push(this.sourceToken);
|
|
539
541
|
map.items.push({
|
|
540
|
-
start
|
|
542
|
+
start,
|
|
543
|
+
explicitKey: true
|
|
541
544
|
});
|
|
542
545
|
} else {
|
|
543
546
|
this.stack.push({
|
|
@@ -545,14 +548,15 @@ class Parser {
|
|
|
545
548
|
offset: this.offset,
|
|
546
549
|
indent: this.indent,
|
|
547
550
|
items: [{
|
|
548
|
-
start: [this.sourceToken]
|
|
551
|
+
start: [this.sourceToken],
|
|
552
|
+
explicitKey: true
|
|
549
553
|
}]
|
|
550
554
|
});
|
|
551
555
|
}
|
|
552
556
|
this.onKeyLine = true;
|
|
553
557
|
return;
|
|
554
558
|
case 'map-value-ind':
|
|
555
|
-
if (
|
|
559
|
+
if (it.explicitKey) {
|
|
556
560
|
if (!it.sep) {
|
|
557
561
|
if (includesToken(it.start, 'newline')) {
|
|
558
562
|
Object.assign(it, {
|
|
@@ -595,7 +599,9 @@ class Parser {
|
|
|
595
599
|
const sep = it.sep;
|
|
596
600
|
sep.push(this.sourceToken);
|
|
597
601
|
// @ts-expect-error type guard is wrong here
|
|
598
|
-
delete it.key
|
|
602
|
+
delete it.key;
|
|
603
|
+
// @ts-expect-error type guard is wrong here
|
|
604
|
+
delete it.sep;
|
|
599
605
|
this.stack.push({
|
|
600
606
|
type: 'block-map',
|
|
601
607
|
offset: this.offset,
|
|
@@ -669,7 +675,7 @@ class Parser {
|
|
|
669
675
|
{
|
|
670
676
|
const bv = this.startBlockValue(map);
|
|
671
677
|
if (bv) {
|
|
672
|
-
if (
|
|
678
|
+
if (atMapIndent && bv.type !== 'block-seq') {
|
|
673
679
|
map.items.push({
|
|
674
680
|
start
|
|
675
681
|
});
|
|
@@ -885,7 +891,8 @@ class Parser {
|
|
|
885
891
|
offset: this.offset,
|
|
886
892
|
indent: this.indent,
|
|
887
893
|
items: [{
|
|
888
|
-
start
|
|
894
|
+
start,
|
|
895
|
+
explicitKey: true
|
|
889
896
|
}]
|
|
890
897
|
};
|
|
891
898
|
}
|
|
@@ -2,6 +2,7 @@ import { Composer } from './compose/composer.mjs';
|
|
|
2
2
|
import { Document } from './doc/Document.mjs';
|
|
3
3
|
import { prettifyError, YAMLParseError } from './errors.mjs';
|
|
4
4
|
import { warn } from './log.mjs';
|
|
5
|
+
import { isDocument } from './nodes/identity.mjs';
|
|
5
6
|
import { LineCounter } from './parse/line-counter.mjs';
|
|
6
7
|
import { Parser } from './parse/parser.mjs';
|
|
7
8
|
|
|
@@ -74,6 +75,7 @@ function stringify(value, replacer, options) {
|
|
|
74
75
|
} = options ?? replacer ?? {};
|
|
75
76
|
if (!keepUndefined) return undefined;
|
|
76
77
|
}
|
|
78
|
+
if (isDocument(value) && !_replacer) return value.toString(options);
|
|
77
79
|
return new Document(value, _replacer, options).toString(options);
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAP, SCALAR, SEQ } from '../nodes/
|
|
1
|
+
import { MAP, SCALAR, SEQ } from '../nodes/identity.mjs';
|
|
2
2
|
import { map } from './common/map.mjs';
|
|
3
3
|
import { seq } from './common/seq.mjs';
|
|
4
4
|
import { string } from './common/string.mjs';
|
|
@@ -16,10 +16,9 @@ class Schema {
|
|
|
16
16
|
toStringDefaults
|
|
17
17
|
}) {
|
|
18
18
|
this.compat = Array.isArray(compat) ? getTags(compat, 'compat') : compat ? getTags(null, compat) : null;
|
|
19
|
-
this.merge = !!merge;
|
|
20
19
|
this.name = typeof schema === 'string' && schema || 'core';
|
|
21
20
|
this.knownTags = resolveKnownTags ? coreKnownTags : {};
|
|
22
|
-
this.tags = getTags(customTags, this.name);
|
|
21
|
+
this.tags = getTags(customTags, this.name, merge);
|
|
23
22
|
this.toStringOptions = toStringDefaults ?? null;
|
|
24
23
|
Object.defineProperty(this, MAP, {
|
|
25
24
|
value: map
|
package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/map.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isMap } from '../../nodes/identity.mjs';
|
|
2
|
+
import { YAMLMap } from '../../nodes/YAMLMap.mjs';
|
|
3
|
+
|
|
4
|
+
const map = {
|
|
5
|
+
collection: 'map',
|
|
6
|
+
default: true,
|
|
7
|
+
nodeClass: YAMLMap,
|
|
8
|
+
tag: 'tag:yaml.org,2002:map',
|
|
9
|
+
resolve(map, onError) {
|
|
10
|
+
if (!isMap(map)) onError('Expected a mapping for this tag');
|
|
11
|
+
return map;
|
|
12
|
+
},
|
|
13
|
+
createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { map };
|
package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/seq.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isSeq } from '../../nodes/identity.mjs';
|
|
2
|
+
import { YAMLSeq } from '../../nodes/YAMLSeq.mjs';
|
|
3
|
+
|
|
4
|
+
const seq = {
|
|
5
|
+
collection: 'seq',
|
|
6
|
+
default: true,
|
|
7
|
+
nodeClass: YAMLSeq,
|
|
8
|
+
tag: 'tag:yaml.org,2002:seq',
|
|
9
|
+
resolve(seq, onError) {
|
|
10
|
+
if (!isSeq(seq)) onError('Expected a sequence for this tag');
|
|
11
|
+
return seq;
|
|
12
|
+
},
|
|
13
|
+
createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { seq };
|