@windrun-huaiin/dev-scripts 14.1.2 → 14.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create-diaomao-app.d.ts.map +1 -1
- package/dist/commands/create-diaomao-app.js +2 -0
- package/dist/commands/create-diaomao-app.mjs +2 -0
- package/dist/commands/diaomao-update.d.ts.map +1 -1
- package/dist/commands/diaomao-update.js +13 -5
- package/dist/commands/diaomao-update.mjs +13 -5
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +74 -1
- package/dist/config/schema.mjs +74 -1
- package/package.json +1 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -7
- package/dist/_virtual/_commonjsHelpers.mjs +0 -5
- package/dist/_virtual/index.js +0 -11
- package/dist/_virtual/index.mjs +0 -7
- package/dist/_virtual/re.js +0 -5
- package/dist/_virtual/re.mjs +0 -3
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +0 -161
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.mjs +0 -159
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +0 -576
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.mjs +0 -574
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +0 -350
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.mjs +0 -348
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +0 -21
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.mjs +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +0 -72
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.mjs +0 -70
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +0 -77
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.mjs +0 -75
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.mjs +0 -20
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +0 -20
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.mjs +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +0 -73
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.mjs +0 -71
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +0 -34
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.mjs +0 -32
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +0 -31
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.mjs +0 -29
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +0 -21
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.mjs +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +0 -25
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.mjs +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.mjs +0 -16
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +0 -21
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.mjs +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +0 -144
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.mjs +0 -142
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +0 -48
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.mjs +0 -46
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.mjs +0 -20
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +0 -40
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.mjs +0 -38
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +0 -53
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.mjs +0 -51
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +0 -28
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.mjs +0 -26
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +0 -239
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.mjs +0 -237
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.mjs +0 -17
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.mjs +0 -20
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.mjs +0 -17
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +0 -41
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.mjs +0 -39
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +0 -40
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.mjs +0 -38
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +0 -78
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.mjs +0 -76
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +0 -102
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.mjs +0 -100
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +0 -63
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.mjs +0 -61
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +0 -265
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.mjs +0 -263
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.mjs +0 -21
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +0 -26
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.mjs +0 -24
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -90
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.mjs +0 -88
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -45
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.mjs +0 -43
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.js +0 -105
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.mjs +0 -102
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -88
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +0 -86
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js +0 -219
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.mjs +0 -217
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -117
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +0 -115
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -200
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +0 -198
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -51
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +0 -49
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.mjs +0 -37
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -209
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +0 -207
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -225
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +0 -223
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -148
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.mjs +0 -146
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -36
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +0 -34
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -28
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +0 -26
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -17
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +0 -15
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -15
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +0 -13
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.js +0 -337
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.mjs +0 -335
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.js +0 -76
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.mjs +0 -71
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -57
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.mjs +0 -55
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.js +0 -90
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.mjs +0 -88
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.js +0 -178
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.mjs +0 -176
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.js +0 -62
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.mjs +0 -57
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.js +0 -9
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.mjs +0 -7
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.js +0 -116
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.mjs +0 -114
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js +0 -151
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.mjs +0 -147
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.js +0 -40
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.mjs +0 -38
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.js +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.mjs +0 -36
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -27
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.mjs +0 -24
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -147
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +0 -144
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -115
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +0 -113
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -65
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +0 -63
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.js +0 -53
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.mjs +0 -36
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.js +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.mjs +0 -37
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.js +0 -79
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.mjs +0 -73
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.js +0 -719
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.mjs +0 -717
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.js +0 -41
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.mjs +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.js +0 -969
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.mjs +0 -967
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.js +0 -68
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.mjs +0 -64
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.js +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.mjs +0 -37
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.js +0 -19
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.mjs +0 -17
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.js +0 -17
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.mjs +0 -15
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.js +0 -19
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.mjs +0 -17
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.js +0 -16
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.mjs +0 -14
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.js +0 -21
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.mjs +0 -19
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.js +0 -47
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.mjs +0 -43
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.js +0 -42
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.mjs +0 -38
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.js +0 -25
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.mjs +0 -23
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.js +0 -64
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.mjs +0 -62
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.js +0 -99
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.mjs +0 -96
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -60
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +0 -58
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -29
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +0 -26
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -50
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +0 -46
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -76
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +0 -71
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -68
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +0 -64
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -77
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +0 -74
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -82
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +0 -78
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -41
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +0 -39
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -96
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +0 -93
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -105
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +0 -101
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -151
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +0 -146
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.js +0 -131
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.mjs +0 -128
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -145
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +0 -143
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -24
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +0 -20
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -87
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +0 -85
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -26
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +0 -24
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -152
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +0 -150
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -338
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +0 -336
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.js +0 -148
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.mjs +0 -146
package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var directives = require('../doc/directives.js');
|
|
4
|
-
var Document = require('../doc/Document.js');
|
|
5
|
-
var errors = require('../errors.js');
|
|
6
|
-
var identity = require('../nodes/identity.js');
|
|
7
|
-
var composeDoc = require('./compose-doc.js');
|
|
8
|
-
var resolveEnd = require('./resolve-end.js');
|
|
9
|
-
|
|
10
|
-
function getErrorPos(src) {
|
|
11
|
-
if (typeof src === 'number')
|
|
12
|
-
return [src, src + 1];
|
|
13
|
-
if (Array.isArray(src))
|
|
14
|
-
return src.length === 2 ? src : [src[0], src[1]];
|
|
15
|
-
const { offset, source } = src;
|
|
16
|
-
return [offset, offset + (typeof source === 'string' ? source.length : 1)];
|
|
17
|
-
}
|
|
18
|
-
function parsePrelude(prelude) {
|
|
19
|
-
let comment = '';
|
|
20
|
-
let atComment = false;
|
|
21
|
-
let afterEmptyLine = false;
|
|
22
|
-
for (let i = 0; i < prelude.length; ++i) {
|
|
23
|
-
const source = prelude[i];
|
|
24
|
-
switch (source[0]) {
|
|
25
|
-
case '#':
|
|
26
|
-
comment +=
|
|
27
|
-
(comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') +
|
|
28
|
-
(source.substring(1) || ' ');
|
|
29
|
-
atComment = true;
|
|
30
|
-
afterEmptyLine = false;
|
|
31
|
-
break;
|
|
32
|
-
case '%':
|
|
33
|
-
if (prelude[i + 1]?.[0] !== '#')
|
|
34
|
-
i += 1;
|
|
35
|
-
atComment = false;
|
|
36
|
-
break;
|
|
37
|
-
default:
|
|
38
|
-
// This may be wrong after doc-end, but in that case it doesn't matter
|
|
39
|
-
if (!atComment)
|
|
40
|
-
afterEmptyLine = true;
|
|
41
|
-
atComment = false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return { comment, afterEmptyLine };
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Compose a stream of CST nodes into a stream of YAML Documents.
|
|
48
|
-
*
|
|
49
|
-
* ```ts
|
|
50
|
-
* import { Composer, Parser } from 'yaml'
|
|
51
|
-
*
|
|
52
|
-
* const src: string = ...
|
|
53
|
-
* const tokens = new Parser().parse(src)
|
|
54
|
-
* const docs = new Composer().compose(tokens)
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
class Composer {
|
|
58
|
-
constructor(options = {}) {
|
|
59
|
-
this.doc = null;
|
|
60
|
-
this.atDirectives = false;
|
|
61
|
-
this.prelude = [];
|
|
62
|
-
this.errors = [];
|
|
63
|
-
this.warnings = [];
|
|
64
|
-
this.onError = (source, code, message, warning) => {
|
|
65
|
-
const pos = getErrorPos(source);
|
|
66
|
-
if (warning)
|
|
67
|
-
this.warnings.push(new errors.YAMLWarning(pos, code, message));
|
|
68
|
-
else
|
|
69
|
-
this.errors.push(new errors.YAMLParseError(pos, code, message));
|
|
70
|
-
};
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
72
|
-
this.directives = new directives.Directives({ version: options.version || '1.2' });
|
|
73
|
-
this.options = options;
|
|
74
|
-
}
|
|
75
|
-
decorate(doc, afterDoc) {
|
|
76
|
-
const { comment, afterEmptyLine } = parsePrelude(this.prelude);
|
|
77
|
-
//console.log({ dc: doc.comment, prelude, comment })
|
|
78
|
-
if (comment) {
|
|
79
|
-
const dc = doc.contents;
|
|
80
|
-
if (afterDoc) {
|
|
81
|
-
doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
|
|
82
|
-
}
|
|
83
|
-
else if (afterEmptyLine || doc.directives.docStart || !dc) {
|
|
84
|
-
doc.commentBefore = comment;
|
|
85
|
-
}
|
|
86
|
-
else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
|
|
87
|
-
let it = dc.items[0];
|
|
88
|
-
if (identity.isPair(it))
|
|
89
|
-
it = it.key;
|
|
90
|
-
const cb = it.commentBefore;
|
|
91
|
-
it.commentBefore = cb ? `${comment}\n${cb}` : comment;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
const cb = dc.commentBefore;
|
|
95
|
-
dc.commentBefore = cb ? `${comment}\n${cb}` : comment;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (afterDoc) {
|
|
99
|
-
Array.prototype.push.apply(doc.errors, this.errors);
|
|
100
|
-
Array.prototype.push.apply(doc.warnings, this.warnings);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
doc.errors = this.errors;
|
|
104
|
-
doc.warnings = this.warnings;
|
|
105
|
-
}
|
|
106
|
-
this.prelude = [];
|
|
107
|
-
this.errors = [];
|
|
108
|
-
this.warnings = [];
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Current stream status information.
|
|
112
|
-
*
|
|
113
|
-
* Mostly useful at the end of input for an empty stream.
|
|
114
|
-
*/
|
|
115
|
-
streamInfo() {
|
|
116
|
-
return {
|
|
117
|
-
comment: parsePrelude(this.prelude).comment,
|
|
118
|
-
directives: this.directives,
|
|
119
|
-
errors: this.errors,
|
|
120
|
-
warnings: this.warnings
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Compose tokens into documents.
|
|
125
|
-
*
|
|
126
|
-
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
|
|
127
|
-
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
|
|
128
|
-
*/
|
|
129
|
-
*compose(tokens, forceDoc = false, endOffset = -1) {
|
|
130
|
-
for (const token of tokens)
|
|
131
|
-
yield* this.next(token);
|
|
132
|
-
yield* this.end(forceDoc, endOffset);
|
|
133
|
-
}
|
|
134
|
-
/** Advance the composer by one CST token. */
|
|
135
|
-
*next(token) {
|
|
136
|
-
switch (token.type) {
|
|
137
|
-
case 'directive':
|
|
138
|
-
this.directives.add(token.source, (offset, message, warning) => {
|
|
139
|
-
const pos = getErrorPos(token);
|
|
140
|
-
pos[0] += offset;
|
|
141
|
-
this.onError(pos, 'BAD_DIRECTIVE', message, warning);
|
|
142
|
-
});
|
|
143
|
-
this.prelude.push(token.source);
|
|
144
|
-
this.atDirectives = true;
|
|
145
|
-
break;
|
|
146
|
-
case 'document': {
|
|
147
|
-
const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);
|
|
148
|
-
if (this.atDirectives && !doc.directives.docStart)
|
|
149
|
-
this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');
|
|
150
|
-
this.decorate(doc, false);
|
|
151
|
-
if (this.doc)
|
|
152
|
-
yield this.doc;
|
|
153
|
-
this.doc = doc;
|
|
154
|
-
this.atDirectives = false;
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
case 'byte-order-mark':
|
|
158
|
-
case 'space':
|
|
159
|
-
break;
|
|
160
|
-
case 'comment':
|
|
161
|
-
case 'newline':
|
|
162
|
-
this.prelude.push(token.source);
|
|
163
|
-
break;
|
|
164
|
-
case 'error': {
|
|
165
|
-
const msg = token.source
|
|
166
|
-
? `${token.message}: ${JSON.stringify(token.source)}`
|
|
167
|
-
: token.message;
|
|
168
|
-
const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);
|
|
169
|
-
if (this.atDirectives || !this.doc)
|
|
170
|
-
this.errors.push(error);
|
|
171
|
-
else
|
|
172
|
-
this.doc.errors.push(error);
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
case 'doc-end': {
|
|
176
|
-
if (!this.doc) {
|
|
177
|
-
const msg = 'Unexpected doc-end without preceding document';
|
|
178
|
-
this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
this.doc.directives.docEnd = true;
|
|
182
|
-
const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);
|
|
183
|
-
this.decorate(this.doc, true);
|
|
184
|
-
if (end.comment) {
|
|
185
|
-
const dc = this.doc.comment;
|
|
186
|
-
this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment;
|
|
187
|
-
}
|
|
188
|
-
this.doc.range[2] = end.offset;
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
default:
|
|
192
|
-
this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Call at end of input to yield any remaining document.
|
|
197
|
-
*
|
|
198
|
-
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
|
|
199
|
-
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
|
|
200
|
-
*/
|
|
201
|
-
*end(forceDoc = false, endOffset = -1) {
|
|
202
|
-
if (this.doc) {
|
|
203
|
-
this.decorate(this.doc, true);
|
|
204
|
-
yield this.doc;
|
|
205
|
-
this.doc = null;
|
|
206
|
-
}
|
|
207
|
-
else if (forceDoc) {
|
|
208
|
-
const opts = Object.assign({ _directives: this.directives }, this.options);
|
|
209
|
-
const doc = new Document.Document(undefined, opts);
|
|
210
|
-
if (this.atDirectives)
|
|
211
|
-
this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');
|
|
212
|
-
doc.range = [0, endOffset, endOffset];
|
|
213
|
-
this.decorate(doc, false);
|
|
214
|
-
yield doc;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
exports.Composer = Composer;
|
package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.mjs
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { Directives } from '../doc/directives.mjs';
|
|
2
|
-
import { Document } from '../doc/Document.mjs';
|
|
3
|
-
import { YAMLWarning, YAMLParseError } from '../errors.mjs';
|
|
4
|
-
import { isCollection, isPair } from '../nodes/identity.mjs';
|
|
5
|
-
import { composeDoc } from './compose-doc.mjs';
|
|
6
|
-
import { resolveEnd } from './resolve-end.mjs';
|
|
7
|
-
|
|
8
|
-
function getErrorPos(src) {
|
|
9
|
-
if (typeof src === 'number')
|
|
10
|
-
return [src, src + 1];
|
|
11
|
-
if (Array.isArray(src))
|
|
12
|
-
return src.length === 2 ? src : [src[0], src[1]];
|
|
13
|
-
const { offset, source } = src;
|
|
14
|
-
return [offset, offset + (typeof source === 'string' ? source.length : 1)];
|
|
15
|
-
}
|
|
16
|
-
function parsePrelude(prelude) {
|
|
17
|
-
let comment = '';
|
|
18
|
-
let atComment = false;
|
|
19
|
-
let afterEmptyLine = false;
|
|
20
|
-
for (let i = 0; i < prelude.length; ++i) {
|
|
21
|
-
const source = prelude[i];
|
|
22
|
-
switch (source[0]) {
|
|
23
|
-
case '#':
|
|
24
|
-
comment +=
|
|
25
|
-
(comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') +
|
|
26
|
-
(source.substring(1) || ' ');
|
|
27
|
-
atComment = true;
|
|
28
|
-
afterEmptyLine = false;
|
|
29
|
-
break;
|
|
30
|
-
case '%':
|
|
31
|
-
if (prelude[i + 1]?.[0] !== '#')
|
|
32
|
-
i += 1;
|
|
33
|
-
atComment = false;
|
|
34
|
-
break;
|
|
35
|
-
default:
|
|
36
|
-
// This may be wrong after doc-end, but in that case it doesn't matter
|
|
37
|
-
if (!atComment)
|
|
38
|
-
afterEmptyLine = true;
|
|
39
|
-
atComment = false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return { comment, afterEmptyLine };
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Compose a stream of CST nodes into a stream of YAML Documents.
|
|
46
|
-
*
|
|
47
|
-
* ```ts
|
|
48
|
-
* import { Composer, Parser } from 'yaml'
|
|
49
|
-
*
|
|
50
|
-
* const src: string = ...
|
|
51
|
-
* const tokens = new Parser().parse(src)
|
|
52
|
-
* const docs = new Composer().compose(tokens)
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
class Composer {
|
|
56
|
-
constructor(options = {}) {
|
|
57
|
-
this.doc = null;
|
|
58
|
-
this.atDirectives = false;
|
|
59
|
-
this.prelude = [];
|
|
60
|
-
this.errors = [];
|
|
61
|
-
this.warnings = [];
|
|
62
|
-
this.onError = (source, code, message, warning) => {
|
|
63
|
-
const pos = getErrorPos(source);
|
|
64
|
-
if (warning)
|
|
65
|
-
this.warnings.push(new YAMLWarning(pos, code, message));
|
|
66
|
-
else
|
|
67
|
-
this.errors.push(new YAMLParseError(pos, code, message));
|
|
68
|
-
};
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
70
|
-
this.directives = new Directives({ version: options.version || '1.2' });
|
|
71
|
-
this.options = options;
|
|
72
|
-
}
|
|
73
|
-
decorate(doc, afterDoc) {
|
|
74
|
-
const { comment, afterEmptyLine } = parsePrelude(this.prelude);
|
|
75
|
-
//console.log({ dc: doc.comment, prelude, comment })
|
|
76
|
-
if (comment) {
|
|
77
|
-
const dc = doc.contents;
|
|
78
|
-
if (afterDoc) {
|
|
79
|
-
doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
|
|
80
|
-
}
|
|
81
|
-
else if (afterEmptyLine || doc.directives.docStart || !dc) {
|
|
82
|
-
doc.commentBefore = comment;
|
|
83
|
-
}
|
|
84
|
-
else if (isCollection(dc) && !dc.flow && dc.items.length > 0) {
|
|
85
|
-
let it = dc.items[0];
|
|
86
|
-
if (isPair(it))
|
|
87
|
-
it = it.key;
|
|
88
|
-
const cb = it.commentBefore;
|
|
89
|
-
it.commentBefore = cb ? `${comment}\n${cb}` : comment;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
const cb = dc.commentBefore;
|
|
93
|
-
dc.commentBefore = cb ? `${comment}\n${cb}` : comment;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (afterDoc) {
|
|
97
|
-
Array.prototype.push.apply(doc.errors, this.errors);
|
|
98
|
-
Array.prototype.push.apply(doc.warnings, this.warnings);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
doc.errors = this.errors;
|
|
102
|
-
doc.warnings = this.warnings;
|
|
103
|
-
}
|
|
104
|
-
this.prelude = [];
|
|
105
|
-
this.errors = [];
|
|
106
|
-
this.warnings = [];
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Current stream status information.
|
|
110
|
-
*
|
|
111
|
-
* Mostly useful at the end of input for an empty stream.
|
|
112
|
-
*/
|
|
113
|
-
streamInfo() {
|
|
114
|
-
return {
|
|
115
|
-
comment: parsePrelude(this.prelude).comment,
|
|
116
|
-
directives: this.directives,
|
|
117
|
-
errors: this.errors,
|
|
118
|
-
warnings: this.warnings
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Compose tokens into documents.
|
|
123
|
-
*
|
|
124
|
-
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
|
|
125
|
-
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
|
|
126
|
-
*/
|
|
127
|
-
*compose(tokens, forceDoc = false, endOffset = -1) {
|
|
128
|
-
for (const token of tokens)
|
|
129
|
-
yield* this.next(token);
|
|
130
|
-
yield* this.end(forceDoc, endOffset);
|
|
131
|
-
}
|
|
132
|
-
/** Advance the composer by one CST token. */
|
|
133
|
-
*next(token) {
|
|
134
|
-
switch (token.type) {
|
|
135
|
-
case 'directive':
|
|
136
|
-
this.directives.add(token.source, (offset, message, warning) => {
|
|
137
|
-
const pos = getErrorPos(token);
|
|
138
|
-
pos[0] += offset;
|
|
139
|
-
this.onError(pos, 'BAD_DIRECTIVE', message, warning);
|
|
140
|
-
});
|
|
141
|
-
this.prelude.push(token.source);
|
|
142
|
-
this.atDirectives = true;
|
|
143
|
-
break;
|
|
144
|
-
case 'document': {
|
|
145
|
-
const doc = composeDoc(this.options, this.directives, token, this.onError);
|
|
146
|
-
if (this.atDirectives && !doc.directives.docStart)
|
|
147
|
-
this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');
|
|
148
|
-
this.decorate(doc, false);
|
|
149
|
-
if (this.doc)
|
|
150
|
-
yield this.doc;
|
|
151
|
-
this.doc = doc;
|
|
152
|
-
this.atDirectives = false;
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
case 'byte-order-mark':
|
|
156
|
-
case 'space':
|
|
157
|
-
break;
|
|
158
|
-
case 'comment':
|
|
159
|
-
case 'newline':
|
|
160
|
-
this.prelude.push(token.source);
|
|
161
|
-
break;
|
|
162
|
-
case 'error': {
|
|
163
|
-
const msg = token.source
|
|
164
|
-
? `${token.message}: ${JSON.stringify(token.source)}`
|
|
165
|
-
: token.message;
|
|
166
|
-
const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);
|
|
167
|
-
if (this.atDirectives || !this.doc)
|
|
168
|
-
this.errors.push(error);
|
|
169
|
-
else
|
|
170
|
-
this.doc.errors.push(error);
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
case 'doc-end': {
|
|
174
|
-
if (!this.doc) {
|
|
175
|
-
const msg = 'Unexpected doc-end without preceding document';
|
|
176
|
-
this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
this.doc.directives.docEnd = true;
|
|
180
|
-
const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);
|
|
181
|
-
this.decorate(this.doc, true);
|
|
182
|
-
if (end.comment) {
|
|
183
|
-
const dc = this.doc.comment;
|
|
184
|
-
this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment;
|
|
185
|
-
}
|
|
186
|
-
this.doc.range[2] = end.offset;
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
default:
|
|
190
|
-
this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Call at end of input to yield any remaining document.
|
|
195
|
-
*
|
|
196
|
-
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
|
|
197
|
-
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
|
|
198
|
-
*/
|
|
199
|
-
*end(forceDoc = false, endOffset = -1) {
|
|
200
|
-
if (this.doc) {
|
|
201
|
-
this.decorate(this.doc, true);
|
|
202
|
-
yield this.doc;
|
|
203
|
-
this.doc = null;
|
|
204
|
-
}
|
|
205
|
-
else if (forceDoc) {
|
|
206
|
-
const opts = Object.assign({ _directives: this.directives }, this.options);
|
|
207
|
-
const doc = new Document(undefined, opts);
|
|
208
|
-
if (this.atDirectives)
|
|
209
|
-
this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');
|
|
210
|
-
doc.range = [0, endOffset, endOffset];
|
|
211
|
-
this.decorate(doc, false);
|
|
212
|
-
yield doc;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export { Composer };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Pair = require('../nodes/Pair.js');
|
|
4
|
-
var YAMLMap = require('../nodes/YAMLMap.js');
|
|
5
|
-
var resolveProps = require('./resolve-props.js');
|
|
6
|
-
var utilContainsNewline = require('./util-contains-newline.js');
|
|
7
|
-
var utilFlowIndentCheck = require('./util-flow-indent-check.js');
|
|
8
|
-
var utilMapIncludes = require('./util-map-includes.js');
|
|
9
|
-
|
|
10
|
-
const startColMsg = 'All mapping items must start at the same column';
|
|
11
|
-
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
|
|
12
|
-
const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;
|
|
13
|
-
const map = new NodeClass(ctx.schema);
|
|
14
|
-
if (ctx.atRoot)
|
|
15
|
-
ctx.atRoot = false;
|
|
16
|
-
let offset = bm.offset;
|
|
17
|
-
let commentEnd = null;
|
|
18
|
-
for (const collItem of bm.items) {
|
|
19
|
-
const { start, key, sep, value } = collItem;
|
|
20
|
-
// key properties
|
|
21
|
-
const keyProps = resolveProps.resolveProps(start, {
|
|
22
|
-
indicator: 'explicit-key-ind',
|
|
23
|
-
next: key ?? sep?.[0],
|
|
24
|
-
offset,
|
|
25
|
-
onError,
|
|
26
|
-
parentIndent: bm.indent,
|
|
27
|
-
startOnNewline: true
|
|
28
|
-
});
|
|
29
|
-
const implicitKey = !keyProps.found;
|
|
30
|
-
if (implicitKey) {
|
|
31
|
-
if (key) {
|
|
32
|
-
if (key.type === 'block-seq')
|
|
33
|
-
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');
|
|
34
|
-
else if ('indent' in key && key.indent !== bm.indent)
|
|
35
|
-
onError(offset, 'BAD_INDENT', startColMsg);
|
|
36
|
-
}
|
|
37
|
-
if (!keyProps.anchor && !keyProps.tag && !sep) {
|
|
38
|
-
commentEnd = keyProps.end;
|
|
39
|
-
if (keyProps.comment) {
|
|
40
|
-
if (map.comment)
|
|
41
|
-
map.comment += '\n' + keyProps.comment;
|
|
42
|
-
else
|
|
43
|
-
map.comment = keyProps.comment;
|
|
44
|
-
}
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {
|
|
48
|
-
onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else if (keyProps.found?.indent !== bm.indent) {
|
|
52
|
-
onError(offset, 'BAD_INDENT', startColMsg);
|
|
53
|
-
}
|
|
54
|
-
// key value
|
|
55
|
-
ctx.atKey = true;
|
|
56
|
-
const keyStart = keyProps.end;
|
|
57
|
-
const keyNode = key
|
|
58
|
-
? composeNode(ctx, key, keyProps, onError)
|
|
59
|
-
: composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
|
|
60
|
-
if (ctx.schema.compat)
|
|
61
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);
|
|
62
|
-
ctx.atKey = false;
|
|
63
|
-
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
64
|
-
onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');
|
|
65
|
-
// value properties
|
|
66
|
-
const valueProps = resolveProps.resolveProps(sep ?? [], {
|
|
67
|
-
indicator: 'map-value-ind',
|
|
68
|
-
next: value,
|
|
69
|
-
offset: keyNode.range[2],
|
|
70
|
-
onError,
|
|
71
|
-
parentIndent: bm.indent,
|
|
72
|
-
startOnNewline: !key || key.type === 'block-scalar'
|
|
73
|
-
});
|
|
74
|
-
offset = valueProps.end;
|
|
75
|
-
if (valueProps.found) {
|
|
76
|
-
if (implicitKey) {
|
|
77
|
-
if (value?.type === 'block-map' && !valueProps.hasNewline)
|
|
78
|
-
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');
|
|
79
|
-
if (ctx.options.strict &&
|
|
80
|
-
keyProps.start < valueProps.found.offset - 1024)
|
|
81
|
-
onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');
|
|
82
|
-
}
|
|
83
|
-
// value value
|
|
84
|
-
const valueNode = value
|
|
85
|
-
? composeNode(ctx, value, valueProps, onError)
|
|
86
|
-
: composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
|
|
87
|
-
if (ctx.schema.compat)
|
|
88
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
89
|
-
offset = valueNode.range[2];
|
|
90
|
-
const pair = new Pair.Pair(keyNode, valueNode);
|
|
91
|
-
if (ctx.options.keepSourceTokens)
|
|
92
|
-
pair.srcToken = collItem;
|
|
93
|
-
map.items.push(pair);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
// key with no value
|
|
97
|
-
if (implicitKey)
|
|
98
|
-
onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');
|
|
99
|
-
if (valueProps.comment) {
|
|
100
|
-
if (keyNode.comment)
|
|
101
|
-
keyNode.comment += '\n' + valueProps.comment;
|
|
102
|
-
else
|
|
103
|
-
keyNode.comment = valueProps.comment;
|
|
104
|
-
}
|
|
105
|
-
const pair = new Pair.Pair(keyNode);
|
|
106
|
-
if (ctx.options.keepSourceTokens)
|
|
107
|
-
pair.srcToken = collItem;
|
|
108
|
-
map.items.push(pair);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (commentEnd && commentEnd < offset)
|
|
112
|
-
onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
|
|
113
|
-
map.range = [bm.offset, offset, commentEnd ?? offset];
|
|
114
|
-
return map;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
exports.resolveBlockMap = resolveBlockMap;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Pair } from '../nodes/Pair.mjs';
|
|
2
|
-
import { YAMLMap } from '../nodes/YAMLMap.mjs';
|
|
3
|
-
import { resolveProps } from './resolve-props.mjs';
|
|
4
|
-
import { containsNewline } from './util-contains-newline.mjs';
|
|
5
|
-
import { flowIndentCheck } from './util-flow-indent-check.mjs';
|
|
6
|
-
import { mapIncludes } from './util-map-includes.mjs';
|
|
7
|
-
|
|
8
|
-
const startColMsg = 'All mapping items must start at the same column';
|
|
9
|
-
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
|
|
10
|
-
const NodeClass = tag?.nodeClass ?? YAMLMap;
|
|
11
|
-
const map = new NodeClass(ctx.schema);
|
|
12
|
-
if (ctx.atRoot)
|
|
13
|
-
ctx.atRoot = false;
|
|
14
|
-
let offset = bm.offset;
|
|
15
|
-
let commentEnd = null;
|
|
16
|
-
for (const collItem of bm.items) {
|
|
17
|
-
const { start, key, sep, value } = collItem;
|
|
18
|
-
// key properties
|
|
19
|
-
const keyProps = resolveProps(start, {
|
|
20
|
-
indicator: 'explicit-key-ind',
|
|
21
|
-
next: key ?? sep?.[0],
|
|
22
|
-
offset,
|
|
23
|
-
onError,
|
|
24
|
-
parentIndent: bm.indent,
|
|
25
|
-
startOnNewline: true
|
|
26
|
-
});
|
|
27
|
-
const implicitKey = !keyProps.found;
|
|
28
|
-
if (implicitKey) {
|
|
29
|
-
if (key) {
|
|
30
|
-
if (key.type === 'block-seq')
|
|
31
|
-
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');
|
|
32
|
-
else if ('indent' in key && key.indent !== bm.indent)
|
|
33
|
-
onError(offset, 'BAD_INDENT', startColMsg);
|
|
34
|
-
}
|
|
35
|
-
if (!keyProps.anchor && !keyProps.tag && !sep) {
|
|
36
|
-
commentEnd = keyProps.end;
|
|
37
|
-
if (keyProps.comment) {
|
|
38
|
-
if (map.comment)
|
|
39
|
-
map.comment += '\n' + keyProps.comment;
|
|
40
|
-
else
|
|
41
|
-
map.comment = keyProps.comment;
|
|
42
|
-
}
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (keyProps.newlineAfterProp || containsNewline(key)) {
|
|
46
|
-
onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else if (keyProps.found?.indent !== bm.indent) {
|
|
50
|
-
onError(offset, 'BAD_INDENT', startColMsg);
|
|
51
|
-
}
|
|
52
|
-
// key value
|
|
53
|
-
ctx.atKey = true;
|
|
54
|
-
const keyStart = keyProps.end;
|
|
55
|
-
const keyNode = key
|
|
56
|
-
? composeNode(ctx, key, keyProps, onError)
|
|
57
|
-
: composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
|
|
58
|
-
if (ctx.schema.compat)
|
|
59
|
-
flowIndentCheck(bm.indent, key, onError);
|
|
60
|
-
ctx.atKey = false;
|
|
61
|
-
if (mapIncludes(ctx, map.items, keyNode))
|
|
62
|
-
onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');
|
|
63
|
-
// value properties
|
|
64
|
-
const valueProps = resolveProps(sep ?? [], {
|
|
65
|
-
indicator: 'map-value-ind',
|
|
66
|
-
next: value,
|
|
67
|
-
offset: keyNode.range[2],
|
|
68
|
-
onError,
|
|
69
|
-
parentIndent: bm.indent,
|
|
70
|
-
startOnNewline: !key || key.type === 'block-scalar'
|
|
71
|
-
});
|
|
72
|
-
offset = valueProps.end;
|
|
73
|
-
if (valueProps.found) {
|
|
74
|
-
if (implicitKey) {
|
|
75
|
-
if (value?.type === 'block-map' && !valueProps.hasNewline)
|
|
76
|
-
onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');
|
|
77
|
-
if (ctx.options.strict &&
|
|
78
|
-
keyProps.start < valueProps.found.offset - 1024)
|
|
79
|
-
onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');
|
|
80
|
-
}
|
|
81
|
-
// value value
|
|
82
|
-
const valueNode = value
|
|
83
|
-
? composeNode(ctx, value, valueProps, onError)
|
|
84
|
-
: composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
|
|
85
|
-
if (ctx.schema.compat)
|
|
86
|
-
flowIndentCheck(bm.indent, value, onError);
|
|
87
|
-
offset = valueNode.range[2];
|
|
88
|
-
const pair = new Pair(keyNode, valueNode);
|
|
89
|
-
if (ctx.options.keepSourceTokens)
|
|
90
|
-
pair.srcToken = collItem;
|
|
91
|
-
map.items.push(pair);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
// key with no value
|
|
95
|
-
if (implicitKey)
|
|
96
|
-
onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');
|
|
97
|
-
if (valueProps.comment) {
|
|
98
|
-
if (keyNode.comment)
|
|
99
|
-
keyNode.comment += '\n' + valueProps.comment;
|
|
100
|
-
else
|
|
101
|
-
keyNode.comment = valueProps.comment;
|
|
102
|
-
}
|
|
103
|
-
const pair = new Pair(keyNode);
|
|
104
|
-
if (ctx.options.keepSourceTokens)
|
|
105
|
-
pair.srcToken = collItem;
|
|
106
|
-
map.items.push(pair);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (commentEnd && commentEnd < offset)
|
|
110
|
-
onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
|
|
111
|
-
map.range = [bm.offset, offset, commentEnd ?? offset];
|
|
112
|
-
return map;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export { resolveBlockMap };
|