@quilted/create 0.2.44 → 0.2.45
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 +8 -0
- package/build/esm/_virtual/index3.mjs +1 -1
- package/build/esm/_virtual/index7.mjs +2 -2
- package/build/esm/_virtual/index8.mjs +2 -2
- 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 +1 -3
- 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.2.12 → fast-glob@3.3.3}/node_modules/fast-glob/out/utils/index.mjs +1 -1
- 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/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/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
package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.mjs
CHANGED
|
@@ -79,7 +79,6 @@ function requireDate() {
|
|
|
79
79
|
// Seconds
|
|
80
80
|
9: opts => new Milliseconds(opts) // Fractional seconds
|
|
81
81
|
};
|
|
82
|
-
|
|
83
82
|
const dfltLocales = {
|
|
84
83
|
months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),
|
|
85
84
|
monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
|
package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.mjs
CHANGED
|
@@ -52,7 +52,6 @@ function requireDate() {
|
|
|
52
52
|
// Seconds
|
|
53
53
|
9: opts => new Milliseconds(opts) // Fractional seconds
|
|
54
54
|
};
|
|
55
|
-
|
|
56
55
|
const dfltLocales = {
|
|
57
56
|
months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),
|
|
58
57
|
monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { isNode } from '../nodes/identity.mjs';
|
|
2
|
+
import { Scalar } from '../nodes/Scalar.mjs';
|
|
3
|
+
import { YAMLMap } from '../nodes/YAMLMap.mjs';
|
|
4
|
+
import { YAMLSeq } from '../nodes/YAMLSeq.mjs';
|
|
5
|
+
import { resolveBlockMap } from './resolve-block-map.mjs';
|
|
6
|
+
import { resolveBlockSeq } from './resolve-block-seq.mjs';
|
|
7
|
+
import { resolveFlowCollection } from './resolve-flow-collection.mjs';
|
|
8
|
+
|
|
9
|
+
function resolveCollection(CN, ctx, token, onError, tagName, tag) {
|
|
10
|
+
const coll = token.type === 'block-map' ? resolveBlockMap(CN, ctx, token, onError, tag) : token.type === 'block-seq' ? resolveBlockSeq(CN, ctx, token, onError, tag) : resolveFlowCollection(CN, ctx, token, onError, tag);
|
|
11
|
+
const Coll = coll.constructor;
|
|
12
|
+
// If we got a tagName matching the class, or the tag name is '!',
|
|
13
|
+
// then use the tagName from the node class used to create it.
|
|
14
|
+
if (tagName === '!' || tagName === Coll.tagName) {
|
|
15
|
+
coll.tag = Coll.tagName;
|
|
16
|
+
return coll;
|
|
17
|
+
}
|
|
18
|
+
if (tagName) coll.tag = tagName;
|
|
19
|
+
return coll;
|
|
20
|
+
}
|
|
21
|
+
function composeCollection(CN, ctx, token, props, onError) {
|
|
22
|
+
const tagToken = props.tag;
|
|
23
|
+
const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));
|
|
24
|
+
if (token.type === 'block-seq') {
|
|
25
|
+
const {
|
|
26
|
+
anchor,
|
|
27
|
+
newlineAfterProp: nl
|
|
28
|
+
} = props;
|
|
29
|
+
const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;
|
|
30
|
+
if (lastProp && (!nl || nl.offset < lastProp.offset)) {
|
|
31
|
+
const message = 'Missing newline after block sequence props';
|
|
32
|
+
onError(lastProp, 'MISSING_CHAR', message);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const expType = token.type === 'block-map' ? 'map' : token.type === 'block-seq' ? 'seq' : token.start.source === '{' ? 'map' : 'seq';
|
|
36
|
+
// shortcut: check if it's a generic YAMLMap or YAMLSeq
|
|
37
|
+
// before jumping into the custom tag logic.
|
|
38
|
+
if (!tagToken || !tagName || tagName === '!' || tagName === YAMLMap.tagName && expType === 'map' || tagName === YAMLSeq.tagName && expType === 'seq') {
|
|
39
|
+
return resolveCollection(CN, ctx, token, onError, tagName);
|
|
40
|
+
}
|
|
41
|
+
let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);
|
|
42
|
+
if (!tag) {
|
|
43
|
+
const kt = ctx.schema.knownTags[tagName];
|
|
44
|
+
if (kt && kt.collection === expType) {
|
|
45
|
+
ctx.schema.tags.push(Object.assign({}, kt, {
|
|
46
|
+
default: false
|
|
47
|
+
}));
|
|
48
|
+
tag = kt;
|
|
49
|
+
} else {
|
|
50
|
+
if (kt?.collection) {
|
|
51
|
+
onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
|
|
52
|
+
} else {
|
|
53
|
+
onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);
|
|
54
|
+
}
|
|
55
|
+
return resolveCollection(CN, ctx, token, onError, tagName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
|
|
59
|
+
const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;
|
|
60
|
+
const node = isNode(res) ? res : new Scalar(res);
|
|
61
|
+
node.range = coll.range;
|
|
62
|
+
node.tag = tagName;
|
|
63
|
+
if (tag?.format) node.format = tag.format;
|
|
64
|
+
return node;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { composeCollection };
|
|
@@ -14,6 +14,7 @@ function composeDoc(options, directives, {
|
|
|
14
14
|
}, options);
|
|
15
15
|
const doc = new Document(undefined, opts);
|
|
16
16
|
const ctx = {
|
|
17
|
+
atKey: false,
|
|
17
18
|
atRoot: true,
|
|
18
19
|
directives: doc.directives,
|
|
19
20
|
options: doc.options,
|
|
@@ -24,12 +25,14 @@ function composeDoc(options, directives, {
|
|
|
24
25
|
next: value ?? end?.[0],
|
|
25
26
|
offset,
|
|
26
27
|
onError,
|
|
28
|
+
parentIndent: 0,
|
|
27
29
|
startOnNewline: true
|
|
28
30
|
});
|
|
29
31
|
if (props.found) {
|
|
30
32
|
doc.directives.docStart = true;
|
|
31
33
|
if (value && (value.type === 'block-map' || value.type === 'block-seq') && !props.hasNewline) onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');
|
|
32
34
|
}
|
|
35
|
+
// @ts-expect-error If Contents is set, let's trust the user
|
|
33
36
|
doc.contents = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
|
|
34
37
|
const contentEnd = doc.contents.range[2];
|
|
35
38
|
const re = resolveEnd(end, contentEnd, false, onError);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Alias } from '../nodes/Alias.mjs';
|
|
2
|
+
import { isScalar } from '../nodes/identity.mjs';
|
|
2
3
|
import { composeCollection } from './compose-collection.mjs';
|
|
3
4
|
import { composeScalar } from './compose-scalar.mjs';
|
|
4
5
|
import { resolveEnd } from './resolve-end.mjs';
|
|
@@ -9,6 +10,7 @@ const CN = {
|
|
|
9
10
|
composeEmptyNode
|
|
10
11
|
};
|
|
11
12
|
function composeNode(ctx, token, props, onError) {
|
|
13
|
+
const atKey = ctx.atKey;
|
|
12
14
|
const {
|
|
13
15
|
spaceBefore,
|
|
14
16
|
comment,
|
|
@@ -32,7 +34,7 @@ function composeNode(ctx, token, props, onError) {
|
|
|
32
34
|
case 'block-map':
|
|
33
35
|
case 'block-seq':
|
|
34
36
|
case 'flow-collection':
|
|
35
|
-
node = composeCollection(CN, ctx, token,
|
|
37
|
+
node = composeCollection(CN, ctx, token, props, onError);
|
|
36
38
|
if (anchor) node.anchor = anchor.source.substring(1);
|
|
37
39
|
break;
|
|
38
40
|
default:
|
|
@@ -44,6 +46,10 @@ function composeNode(ctx, token, props, onError) {
|
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
if (anchor && node.anchor === '') onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');
|
|
49
|
+
if (atKey && ctx.options.stringKeys && (!isScalar(node) || typeof node.value !== 'string' || node.tag && node.tag !== 'tag:yaml.org,2002:str')) {
|
|
50
|
+
const msg = 'With stringKeys, all keys must be strings';
|
|
51
|
+
onError(tag ?? token, 'NON_STRING_KEY', msg);
|
|
52
|
+
}
|
|
47
53
|
if (spaceBefore) node.spaceBefore = true;
|
|
48
54
|
if (comment) {
|
|
49
55
|
if (token.type === 'scalar' && token.source === '') node.comment = comment;else node.commentBefore = comment;
|
|
@@ -56,7 +62,8 @@ function composeEmptyNode(ctx, offset, before, pos, {
|
|
|
56
62
|
spaceBefore,
|
|
57
63
|
comment,
|
|
58
64
|
anchor,
|
|
59
|
-
tag
|
|
65
|
+
tag,
|
|
66
|
+
end
|
|
60
67
|
}, onError) {
|
|
61
68
|
const token = {
|
|
62
69
|
type: 'scalar',
|
|
@@ -70,7 +77,10 @@ function composeEmptyNode(ctx, offset, before, pos, {
|
|
|
70
77
|
if (node.anchor === '') onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');
|
|
71
78
|
}
|
|
72
79
|
if (spaceBefore) node.spaceBefore = true;
|
|
73
|
-
if (comment)
|
|
80
|
+
if (comment) {
|
|
81
|
+
node.comment = comment;
|
|
82
|
+
node.range[2] = end;
|
|
83
|
+
}
|
|
74
84
|
return node;
|
|
75
85
|
}
|
|
76
86
|
function composeAlias({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SCALAR, isScalar } from '../nodes/
|
|
1
|
+
import { SCALAR, isScalar } from '../nodes/identity.mjs';
|
|
2
2
|
import { Scalar } from '../nodes/Scalar.mjs';
|
|
3
3
|
import { resolveBlockScalar } from './resolve-block-scalar.mjs';
|
|
4
4
|
import { resolveFlowScalar } from './resolve-flow-scalar.mjs';
|
|
@@ -9,9 +9,12 @@ function composeScalar(ctx, token, tagToken, onError) {
|
|
|
9
9
|
type,
|
|
10
10
|
comment,
|
|
11
11
|
range
|
|
12
|
-
} = token.type === 'block-scalar' ? resolveBlockScalar(
|
|
12
|
+
} = token.type === 'block-scalar' ? resolveBlockScalar(ctx, token, onError) : resolveFlowScalar(token, ctx.options.strict, onError);
|
|
13
13
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) : null;
|
|
14
|
-
|
|
14
|
+
let tag;
|
|
15
|
+
if (ctx.options.stringKeys && ctx.atKey) {
|
|
16
|
+
tag = ctx.schema[SCALAR];
|
|
17
|
+
} else if (tagName) tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);else if (token.type === 'scalar') tag = findScalarTagByTest(ctx, value, token, onError);else tag = ctx.schema[SCALAR];
|
|
15
18
|
let scalar;
|
|
16
19
|
try {
|
|
17
20
|
const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);
|
|
@@ -52,10 +55,11 @@ function findScalarTagByName(schema, value, tagName, tagToken, onError) {
|
|
|
52
55
|
return schema[SCALAR];
|
|
53
56
|
}
|
|
54
57
|
function findScalarTagByTest({
|
|
58
|
+
atKey,
|
|
55
59
|
directives,
|
|
56
60
|
schema
|
|
57
61
|
}, value, token, onError) {
|
|
58
|
-
const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[SCALAR];
|
|
62
|
+
const tag = schema.tags.find(tag => (tag.default === true || atKey && tag.default === 'key') && tag.test?.test(value)) || schema[SCALAR];
|
|
59
63
|
if (schema.compat) {
|
|
60
64
|
const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? schema[SCALAR];
|
|
61
65
|
if (tag.tag !== compat.tag) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Directives } from '../doc/directives.mjs';
|
|
2
2
|
import { Document } from '../doc/Document.mjs';
|
|
3
3
|
import { YAMLWarning, YAMLParseError } from '../errors.mjs';
|
|
4
|
-
import { isCollection, isPair } from '../nodes/
|
|
4
|
+
import { isCollection, isPair } from '../nodes/identity.mjs';
|
|
5
5
|
import { composeDoc } from './compose-doc.mjs';
|
|
6
6
|
import { resolveEnd } from './resolve-end.mjs';
|
|
7
7
|
|
|
@@ -9,10 +9,12 @@ const startColMsg = 'All mapping items must start at the same column';
|
|
|
9
9
|
function resolveBlockMap({
|
|
10
10
|
composeNode,
|
|
11
11
|
composeEmptyNode
|
|
12
|
-
}, ctx, bm, onError) {
|
|
13
|
-
const
|
|
12
|
+
}, ctx, bm, onError, tag) {
|
|
13
|
+
const NodeClass = tag?.nodeClass ?? YAMLMap;
|
|
14
|
+
const map = new NodeClass(ctx.schema);
|
|
14
15
|
if (ctx.atRoot) ctx.atRoot = false;
|
|
15
16
|
let offset = bm.offset;
|
|
17
|
+
let commentEnd = null;
|
|
16
18
|
for (const collItem of bm.items) {
|
|
17
19
|
const {
|
|
18
20
|
start,
|
|
@@ -26,6 +28,7 @@ function resolveBlockMap({
|
|
|
26
28
|
next: key ?? sep?.[0],
|
|
27
29
|
offset,
|
|
28
30
|
onError,
|
|
31
|
+
parentIndent: bm.indent,
|
|
29
32
|
startOnNewline: true
|
|
30
33
|
});
|
|
31
34
|
const implicitKey = !keyProps.found;
|
|
@@ -34,22 +37,24 @@ function resolveBlockMap({
|
|
|
34
37
|
if (key.type === 'block-seq') onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');else if ('indent' in key && key.indent !== bm.indent) onError(offset, 'BAD_INDENT', startColMsg);
|
|
35
38
|
}
|
|
36
39
|
if (!keyProps.anchor && !keyProps.tag && !sep) {
|
|
37
|
-
|
|
40
|
+
commentEnd = keyProps.end;
|
|
38
41
|
if (keyProps.comment) {
|
|
39
42
|
if (map.comment) map.comment += '\n' + keyProps.comment;else map.comment = keyProps.comment;
|
|
40
43
|
}
|
|
41
44
|
continue;
|
|
42
45
|
}
|
|
43
|
-
if (keyProps.
|
|
46
|
+
if (keyProps.newlineAfterProp || containsNewline(key)) {
|
|
44
47
|
onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
|
|
45
48
|
}
|
|
46
49
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
47
50
|
onError(offset, 'BAD_INDENT', startColMsg);
|
|
48
51
|
}
|
|
49
52
|
// key value
|
|
53
|
+
ctx.atKey = true;
|
|
50
54
|
const keyStart = keyProps.end;
|
|
51
55
|
const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
|
|
52
56
|
if (ctx.schema.compat) flowIndentCheck(bm.indent, key, onError);
|
|
57
|
+
ctx.atKey = false;
|
|
53
58
|
if (mapIncludes(ctx, map.items, keyNode)) onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');
|
|
54
59
|
// value properties
|
|
55
60
|
const valueProps = resolveProps(sep ?? [], {
|
|
@@ -57,6 +62,7 @@ function resolveBlockMap({
|
|
|
57
62
|
next: value,
|
|
58
63
|
offset: keyNode.range[2],
|
|
59
64
|
onError,
|
|
65
|
+
parentIndent: bm.indent,
|
|
60
66
|
startOnNewline: !key || key.type === 'block-scalar'
|
|
61
67
|
});
|
|
62
68
|
offset = valueProps.end;
|
|
@@ -83,7 +89,8 @@ function resolveBlockMap({
|
|
|
83
89
|
map.items.push(pair);
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
|
-
|
|
92
|
+
if (commentEnd && commentEnd < offset) onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
|
|
93
|
+
map.range = [bm.offset, offset, commentEnd ?? offset];
|
|
87
94
|
return map;
|
|
88
95
|
}
|
|
89
96
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Scalar } from '../nodes/Scalar.mjs';
|
|
2
2
|
|
|
3
|
-
function resolveBlockScalar(
|
|
3
|
+
function resolveBlockScalar(ctx, scalar, onError) {
|
|
4
4
|
const start = scalar.offset;
|
|
5
|
-
const header = parseBlockScalarHeader(scalar, strict, onError);
|
|
5
|
+
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
|
|
6
6
|
if (!header) return {
|
|
7
7
|
value: '',
|
|
8
8
|
type: null,
|
|
@@ -44,6 +44,10 @@ function resolveBlockScalar(scalar, strict, onError) {
|
|
|
44
44
|
}
|
|
45
45
|
if (header.indent === 0) trimIndent = indent.length;
|
|
46
46
|
contentStart = i;
|
|
47
|
+
if (trimIndent === 0 && !ctx.atRoot) {
|
|
48
|
+
const message = 'Block scalar values in collections must be indented';
|
|
49
|
+
onError(offset, 'BAD_INDENT', message);
|
|
50
|
+
}
|
|
47
51
|
break;
|
|
48
52
|
}
|
|
49
53
|
offset += indent.length + content.length + 1;
|
|
@@ -5,10 +5,13 @@ import { flowIndentCheck } from './util-flow-indent-check.mjs';
|
|
|
5
5
|
function resolveBlockSeq({
|
|
6
6
|
composeNode,
|
|
7
7
|
composeEmptyNode
|
|
8
|
-
}, ctx, bs, onError) {
|
|
9
|
-
const
|
|
8
|
+
}, ctx, bs, onError, tag) {
|
|
9
|
+
const NodeClass = tag?.nodeClass ?? YAMLSeq;
|
|
10
|
+
const seq = new NodeClass(ctx.schema);
|
|
10
11
|
if (ctx.atRoot) ctx.atRoot = false;
|
|
12
|
+
if (ctx.atKey) ctx.atKey = false;
|
|
11
13
|
let offset = bs.offset;
|
|
14
|
+
let commentEnd = null;
|
|
12
15
|
for (const {
|
|
13
16
|
start,
|
|
14
17
|
value
|
|
@@ -18,24 +21,24 @@ function resolveBlockSeq({
|
|
|
18
21
|
next: value,
|
|
19
22
|
offset,
|
|
20
23
|
onError,
|
|
24
|
+
parentIndent: bs.indent,
|
|
21
25
|
startOnNewline: true
|
|
22
26
|
});
|
|
23
|
-
offset = props.end;
|
|
24
27
|
if (!props.found) {
|
|
25
28
|
if (props.anchor || props.tag || value) {
|
|
26
|
-
if (value && value.type === 'block-seq') onError(
|
|
29
|
+
if (value && value.type === 'block-seq') onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');else onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
|
|
27
30
|
} else {
|
|
28
|
-
|
|
31
|
+
commentEnd = props.end;
|
|
29
32
|
if (props.comment) seq.comment = props.comment;
|
|
30
33
|
continue;
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
|
-
const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx,
|
|
36
|
+
const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
|
|
34
37
|
if (ctx.schema.compat) flowIndentCheck(bs.indent, value, onError);
|
|
35
38
|
offset = node.range[2];
|
|
36
39
|
seq.items.push(node);
|
|
37
40
|
}
|
|
38
|
-
seq.range = [bs.offset, offset, offset];
|
|
41
|
+
seq.range = [bs.offset, offset, commentEnd ?? offset];
|
|
39
42
|
return seq;
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPair } from '../nodes/
|
|
1
|
+
import { isPair } from '../nodes/identity.mjs';
|
|
2
2
|
import { Pair } from '../nodes/Pair.mjs';
|
|
3
3
|
import { YAMLMap } from '../nodes/YAMLMap.mjs';
|
|
4
4
|
import { YAMLSeq } from '../nodes/YAMLSeq.mjs';
|
|
@@ -12,13 +12,15 @@ const isBlock = token => token && (token.type === 'block-map' || token.type ===
|
|
|
12
12
|
function resolveFlowCollection({
|
|
13
13
|
composeNode,
|
|
14
14
|
composeEmptyNode
|
|
15
|
-
}, ctx, fc, onError) {
|
|
15
|
+
}, ctx, fc, onError, tag) {
|
|
16
16
|
const isMap = fc.start.source === '{';
|
|
17
17
|
const fcName = isMap ? 'flow map' : 'flow sequence';
|
|
18
|
-
const
|
|
18
|
+
const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq);
|
|
19
|
+
const coll = new NodeClass(ctx.schema);
|
|
19
20
|
coll.flow = true;
|
|
20
21
|
const atRoot = ctx.atRoot;
|
|
21
22
|
if (atRoot) ctx.atRoot = false;
|
|
23
|
+
if (ctx.atKey) ctx.atKey = false;
|
|
22
24
|
let offset = fc.offset + fc.start.source.length;
|
|
23
25
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
24
26
|
const collItem = fc.items[i];
|
|
@@ -34,6 +36,7 @@ function resolveFlowCollection({
|
|
|
34
36
|
next: key ?? sep?.[0],
|
|
35
37
|
offset,
|
|
36
38
|
onError,
|
|
39
|
+
parentIndent: fc.indent,
|
|
37
40
|
startOnNewline: false
|
|
38
41
|
});
|
|
39
42
|
if (!props.found) {
|
|
@@ -85,9 +88,11 @@ function resolveFlowCollection({
|
|
|
85
88
|
} else {
|
|
86
89
|
// item is a key+value pair
|
|
87
90
|
// key value
|
|
91
|
+
ctx.atKey = true;
|
|
88
92
|
const keyStart = props.end;
|
|
89
93
|
const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
|
|
90
94
|
if (isBlock(key)) onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);
|
|
95
|
+
ctx.atKey = false;
|
|
91
96
|
// value properties
|
|
92
97
|
const valueProps = resolveProps(sep ?? [], {
|
|
93
98
|
flow: fcName,
|
|
@@ -95,6 +100,7 @@ function resolveFlowCollection({
|
|
|
95
100
|
next: value,
|
|
96
101
|
offset: keyNode.range[2],
|
|
97
102
|
onError,
|
|
103
|
+
parentIndent: fc.indent,
|
|
98
104
|
startOnNewline: false
|
|
99
105
|
});
|
|
100
106
|
if (valueProps.found) {
|
|
@@ -128,6 +134,8 @@ function resolveFlowCollection({
|
|
|
128
134
|
const map = new YAMLMap(ctx.schema);
|
|
129
135
|
map.flow = true;
|
|
130
136
|
map.items.push(pair);
|
|
137
|
+
const endRange = (valueNode ?? keyNode).range;
|
|
138
|
+
map.range = [keyNode.range[0], endRange[1], endRange[2]];
|
|
131
139
|
coll.items.push(map);
|
|
132
140
|
}
|
|
133
141
|
offset = valueNode ? valueNode.range[2] : valueProps.end;
|
|
@@ -88,7 +88,7 @@ function foldLines(source) {
|
|
|
88
88
|
try {
|
|
89
89
|
first = new RegExp('(.*?)(?<![ \t])[ \t]*\r?\n', 'sy');
|
|
90
90
|
line = new RegExp('[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n', 'sy');
|
|
91
|
-
} catch
|
|
91
|
+
} catch {
|
|
92
92
|
first = /(.*?)[ \t]*\r?\n/sy;
|
|
93
93
|
line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
|
|
94
94
|
}
|
|
@@ -182,18 +182,31 @@ function foldNewline(source, offset) {
|
|
|
182
182
|
}
|
|
183
183
|
const escapeCodes = {
|
|
184
184
|
'0': '\0',
|
|
185
|
+
// null character
|
|
185
186
|
a: '\x07',
|
|
187
|
+
// bell character
|
|
186
188
|
b: '\b',
|
|
189
|
+
// backspace
|
|
187
190
|
e: '\x1b',
|
|
191
|
+
// escape character
|
|
188
192
|
f: '\f',
|
|
193
|
+
// form feed
|
|
189
194
|
n: '\n',
|
|
195
|
+
// line feed
|
|
190
196
|
r: '\r',
|
|
197
|
+
// carriage return
|
|
191
198
|
t: '\t',
|
|
199
|
+
// horizontal tab
|
|
192
200
|
v: '\v',
|
|
201
|
+
// vertical tab
|
|
193
202
|
N: '\u0085',
|
|
203
|
+
// Unicode next line
|
|
194
204
|
_: '\u00a0',
|
|
205
|
+
// Unicode non-breaking space
|
|
195
206
|
L: '\u2028',
|
|
207
|
+
// Unicode line separator
|
|
196
208
|
P: '\u2029',
|
|
209
|
+
// Unicode paragraph separator
|
|
197
210
|
' ': ' ',
|
|
198
211
|
'"': '"',
|
|
199
212
|
'/': '/',
|
|
@@ -4,6 +4,7 @@ function resolveProps(tokens, {
|
|
|
4
4
|
next,
|
|
5
5
|
offset,
|
|
6
6
|
onError,
|
|
7
|
+
parentIndent,
|
|
7
8
|
startOnNewline
|
|
8
9
|
}) {
|
|
9
10
|
let spaceBefore = false;
|
|
@@ -12,10 +13,11 @@ function resolveProps(tokens, {
|
|
|
12
13
|
let comment = '';
|
|
13
14
|
let commentSep = '';
|
|
14
15
|
let hasNewline = false;
|
|
15
|
-
let hasNewlineAfterProp = false;
|
|
16
16
|
let reqSpace = false;
|
|
17
|
+
let tab = null;
|
|
17
18
|
let anchor = null;
|
|
18
19
|
let tag = null;
|
|
20
|
+
let newlineAfterProp = null;
|
|
19
21
|
let comma = null;
|
|
20
22
|
let found = null;
|
|
21
23
|
let start = null;
|
|
@@ -24,12 +26,20 @@ function resolveProps(tokens, {
|
|
|
24
26
|
if (token.type !== 'space' && token.type !== 'newline' && token.type !== 'comma') onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');
|
|
25
27
|
reqSpace = false;
|
|
26
28
|
}
|
|
29
|
+
if (tab) {
|
|
30
|
+
if (atNewline && token.type !== 'comment' && token.type !== 'newline') {
|
|
31
|
+
onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');
|
|
32
|
+
}
|
|
33
|
+
tab = null;
|
|
34
|
+
}
|
|
27
35
|
switch (token.type) {
|
|
28
36
|
case 'space':
|
|
29
37
|
// At the doc level, tabs at line start may be parsed
|
|
30
38
|
// as leading white space rather than indentation.
|
|
31
39
|
// In a flow collection, only the parser handles indent.
|
|
32
|
-
if (!flow &&
|
|
40
|
+
if (!flow && (indicator !== 'doc-start' || next?.type !== 'flow-collection') && token.source.includes('\t')) {
|
|
41
|
+
tab = token;
|
|
42
|
+
}
|
|
33
43
|
hasSpace = true;
|
|
34
44
|
break;
|
|
35
45
|
case 'comment':
|
|
@@ -43,11 +53,11 @@ function resolveProps(tokens, {
|
|
|
43
53
|
}
|
|
44
54
|
case 'newline':
|
|
45
55
|
if (atNewline) {
|
|
46
|
-
if (comment) comment += token.source;else spaceBefore = true;
|
|
56
|
+
if (comment) comment += token.source;else if (!found || indicator !== 'seq-item-ind') spaceBefore = true;
|
|
47
57
|
} else commentSep += token.source;
|
|
48
58
|
atNewline = true;
|
|
49
59
|
hasNewline = true;
|
|
50
|
-
if (anchor || tag)
|
|
60
|
+
if (anchor || tag) newlineAfterProp = token;
|
|
51
61
|
hasSpace = true;
|
|
52
62
|
break;
|
|
53
63
|
case 'anchor':
|
|
@@ -74,7 +84,7 @@ function resolveProps(tokens, {
|
|
|
74
84
|
if (anchor || tag) onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);
|
|
75
85
|
if (found) onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);
|
|
76
86
|
found = token;
|
|
77
|
-
atNewline =
|
|
87
|
+
atNewline = indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';
|
|
78
88
|
hasSpace = false;
|
|
79
89
|
break;
|
|
80
90
|
case 'comma':
|
|
@@ -94,16 +104,19 @@ function resolveProps(tokens, {
|
|
|
94
104
|
}
|
|
95
105
|
const last = tokens[tokens.length - 1];
|
|
96
106
|
const end = last ? last.offset + last.source.length : offset;
|
|
97
|
-
if (reqSpace && next && next.type !== 'space' && next.type !== 'newline' && next.type !== 'comma' && (next.type !== 'scalar' || next.source !== ''))
|
|
107
|
+
if (reqSpace && next && next.type !== 'space' && next.type !== 'newline' && next.type !== 'comma' && (next.type !== 'scalar' || next.source !== '')) {
|
|
108
|
+
onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');
|
|
109
|
+
}
|
|
110
|
+
if (tab && (atNewline && tab.indent <= parentIndent || next?.type === 'block-map' || next?.type === 'block-seq')) onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');
|
|
98
111
|
return {
|
|
99
112
|
comma,
|
|
100
113
|
found,
|
|
101
114
|
spaceBefore,
|
|
102
115
|
comment,
|
|
103
116
|
hasNewline,
|
|
104
|
-
hasNewlineAfterProp,
|
|
105
117
|
anchor,
|
|
106
118
|
tag,
|
|
119
|
+
newlineAfterProp,
|
|
107
120
|
end,
|
|
108
121
|
start: start ?? end
|
|
109
122
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { isScalar } from '../nodes/
|
|
1
|
+
import { isScalar } from '../nodes/identity.mjs';
|
|
2
2
|
|
|
3
3
|
function mapIncludes(ctx, items, search) {
|
|
4
4
|
const {
|
|
5
5
|
uniqueKeys
|
|
6
6
|
} = ctx.options;
|
|
7
7
|
if (uniqueKeys === false) return false;
|
|
8
|
-
const isEqual = typeof uniqueKeys === 'function' ? uniqueKeys : (a, b) => a === b || isScalar(a) && isScalar(b) && a.value === b.value
|
|
8
|
+
const isEqual = typeof uniqueKeys === 'function' ? uniqueKeys : (a, b) => a === b || isScalar(a) && isScalar(b) && a.value === b.value;
|
|
9
9
|
return items.some(pair => isEqual(pair.key, search));
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Alias } from '../nodes/Alias.mjs';
|
|
2
2
|
import { isEmptyPath, collectionFromPath } from '../nodes/Collection.mjs';
|
|
3
|
-
import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/
|
|
3
|
+
import { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.mjs';
|
|
4
4
|
import { Pair } from '../nodes/Pair.mjs';
|
|
5
5
|
import { toJS } from '../nodes/toJS.mjs';
|
|
6
6
|
import { Schema } from '../schema/Schema.mjs';
|
|
7
|
-
import { stringify } from '../stringify/stringify.mjs';
|
|
8
7
|
import { stringifyDocument } from '../stringify/stringifyDocument.mjs';
|
|
9
8
|
import { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.mjs';
|
|
10
9
|
import { applyReviver } from './applyReviver.mjs';
|
|
@@ -37,6 +36,7 @@ class Document {
|
|
|
37
36
|
logLevel: 'warn',
|
|
38
37
|
prettyErrors: true,
|
|
39
38
|
strict: true,
|
|
39
|
+
stringKeys: false,
|
|
40
40
|
uniqueKeys: true,
|
|
41
41
|
version: '1.2'
|
|
42
42
|
}, options);
|
|
@@ -51,9 +51,8 @@ class Document {
|
|
|
51
51
|
version
|
|
52
52
|
});
|
|
53
53
|
this.setSchema(version, options);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
54
|
+
// @ts-expect-error We can't really know that this matches Contents.
|
|
55
|
+
this.contents = value === undefined ? null : this.createNode(value, _replacer, options);
|
|
57
56
|
}
|
|
58
57
|
/**
|
|
59
58
|
* Create a deep copy of this Document and its contents.
|
|
@@ -73,6 +72,7 @@ class Document {
|
|
|
73
72
|
copy.options = Object.assign({}, this.options);
|
|
74
73
|
if (this.directives) copy.directives = this.directives.clone();
|
|
75
74
|
copy.schema = this.schema.clone();
|
|
75
|
+
// @ts-expect-error We can't really know that this matches Contents.
|
|
76
76
|
copy.contents = isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
|
|
77
77
|
if (this.range) copy.range = this.range.slice();
|
|
78
78
|
return copy;
|
|
@@ -171,6 +171,7 @@ class Document {
|
|
|
171
171
|
deleteIn(path) {
|
|
172
172
|
if (isEmptyPath(path)) {
|
|
173
173
|
if (this.contents == null) return false;
|
|
174
|
+
// @ts-expect-error Presumed impossible if Strict extends false
|
|
174
175
|
this.contents = null;
|
|
175
176
|
return true;
|
|
176
177
|
}
|
|
@@ -212,6 +213,7 @@ class Document {
|
|
|
212
213
|
*/
|
|
213
214
|
set(key, value) {
|
|
214
215
|
if (this.contents == null) {
|
|
216
|
+
// @ts-expect-error We can't really know that this matches Contents.
|
|
215
217
|
this.contents = collectionFromPath(this.schema, [key], value);
|
|
216
218
|
} else if (assertCollection(this.contents)) {
|
|
217
219
|
this.contents.set(key, value);
|
|
@@ -222,7 +224,11 @@ class Document {
|
|
|
222
224
|
* boolean to add/remove the item from the set.
|
|
223
225
|
*/
|
|
224
226
|
setIn(path, value) {
|
|
225
|
-
if (isEmptyPath(path))
|
|
227
|
+
if (isEmptyPath(path)) {
|
|
228
|
+
// @ts-expect-error We can't really know that this matches Contents.
|
|
229
|
+
this.contents = value;
|
|
230
|
+
} else if (this.contents == null) {
|
|
231
|
+
// @ts-expect-error We can't really know that this matches Contents.
|
|
226
232
|
this.contents = collectionFromPath(this.schema, Array.from(path), value);
|
|
227
233
|
} else if (assertCollection(this.contents)) {
|
|
228
234
|
this.contents.setIn(path, value);
|
|
@@ -244,7 +250,6 @@ class Document {
|
|
|
244
250
|
version: '1.1'
|
|
245
251
|
});
|
|
246
252
|
opt = {
|
|
247
|
-
merge: true,
|
|
248
253
|
resolveKnownTags: false,
|
|
249
254
|
schema: 'yaml-1.1'
|
|
250
255
|
};
|
|
@@ -255,7 +260,6 @@ class Document {
|
|
|
255
260
|
version
|
|
256
261
|
});
|
|
257
262
|
opt = {
|
|
258
|
-
merge: false,
|
|
259
263
|
resolveKnownTags: true,
|
|
260
264
|
schema: 'core'
|
|
261
265
|
};
|
|
@@ -288,8 +292,7 @@ class Document {
|
|
|
288
292
|
keep: !json,
|
|
289
293
|
mapAsMap: mapAsMap === true,
|
|
290
294
|
mapKeyWarned: false,
|
|
291
|
-
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
|
292
|
-
stringify
|
|
295
|
+
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
|
293
296
|
};
|
|
294
297
|
const res = toJS(this.contents, jsonArg ?? '', ctx);
|
|
295
298
|
if (typeof onAnchor === 'function') for (const {
|