@windrun-huaiin/dev-scripts 14.1.3 → 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/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
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { anchorIsValid } from '../doc/anchors.mjs';
|
|
2
|
-
import { visit } from '../visit.mjs';
|
|
3
|
-
import { ALIAS, isAlias, isCollection, isPair, hasAnchor } from './identity.mjs';
|
|
4
|
-
import { NodeBase } from './Node.mjs';
|
|
5
|
-
import { toJS } from './toJS.mjs';
|
|
6
|
-
|
|
7
|
-
class Alias extends NodeBase {
|
|
8
|
-
constructor(source) {
|
|
9
|
-
super(ALIAS);
|
|
10
|
-
this.source = source;
|
|
11
|
-
Object.defineProperty(this, 'tag', {
|
|
12
|
-
set() {
|
|
13
|
-
throw new Error('Alias nodes cannot have tags');
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Resolve the value of this alias within `doc`, finding the last
|
|
19
|
-
* instance of the `source` anchor before this node.
|
|
20
|
-
*/
|
|
21
|
-
resolve(doc, ctx) {
|
|
22
|
-
let nodes;
|
|
23
|
-
if (ctx?.aliasResolveCache) {
|
|
24
|
-
nodes = ctx.aliasResolveCache;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
nodes = [];
|
|
28
|
-
visit(doc, {
|
|
29
|
-
Node: (_key, node) => {
|
|
30
|
-
if (isAlias(node) || hasAnchor(node))
|
|
31
|
-
nodes.push(node);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
if (ctx)
|
|
35
|
-
ctx.aliasResolveCache = nodes;
|
|
36
|
-
}
|
|
37
|
-
let found = undefined;
|
|
38
|
-
for (const node of nodes) {
|
|
39
|
-
if (node === this)
|
|
40
|
-
break;
|
|
41
|
-
if (node.anchor === this.source)
|
|
42
|
-
found = node;
|
|
43
|
-
}
|
|
44
|
-
return found;
|
|
45
|
-
}
|
|
46
|
-
toJSON(_arg, ctx) {
|
|
47
|
-
if (!ctx)
|
|
48
|
-
return { source: this.source };
|
|
49
|
-
const { anchors, doc, maxAliasCount } = ctx;
|
|
50
|
-
const source = this.resolve(doc, ctx);
|
|
51
|
-
if (!source) {
|
|
52
|
-
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
53
|
-
throw new ReferenceError(msg);
|
|
54
|
-
}
|
|
55
|
-
let data = anchors.get(source);
|
|
56
|
-
if (!data) {
|
|
57
|
-
// Resolve anchors for Node.prototype.toJS()
|
|
58
|
-
toJS(source, null, ctx);
|
|
59
|
-
data = anchors.get(source);
|
|
60
|
-
}
|
|
61
|
-
/* istanbul ignore if */
|
|
62
|
-
if (data?.res === undefined) {
|
|
63
|
-
const msg = 'This should not happen: Alias anchor was not resolved?';
|
|
64
|
-
throw new ReferenceError(msg);
|
|
65
|
-
}
|
|
66
|
-
if (maxAliasCount >= 0) {
|
|
67
|
-
data.count += 1;
|
|
68
|
-
if (data.aliasCount === 0)
|
|
69
|
-
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
70
|
-
if (data.count * data.aliasCount > maxAliasCount) {
|
|
71
|
-
const msg = 'Excessive alias count indicates a resource exhaustion attack';
|
|
72
|
-
throw new ReferenceError(msg);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return data.res;
|
|
76
|
-
}
|
|
77
|
-
toString(ctx, _onComment, _onChompKeep) {
|
|
78
|
-
const src = `*${this.source}`;
|
|
79
|
-
if (ctx) {
|
|
80
|
-
anchorIsValid(this.source);
|
|
81
|
-
if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
|
|
82
|
-
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
83
|
-
throw new Error(msg);
|
|
84
|
-
}
|
|
85
|
-
if (ctx.implicitKey)
|
|
86
|
-
return `${src} `;
|
|
87
|
-
}
|
|
88
|
-
return src;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function getAliasCount(doc, node, anchors) {
|
|
92
|
-
if (isAlias(node)) {
|
|
93
|
-
const source = node.resolve(doc);
|
|
94
|
-
const anchor = anchors && source && anchors.get(source);
|
|
95
|
-
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
96
|
-
}
|
|
97
|
-
else if (isCollection(node)) {
|
|
98
|
-
let count = 0;
|
|
99
|
-
for (const item of node.items) {
|
|
100
|
-
const c = getAliasCount(doc, item, anchors);
|
|
101
|
-
if (c > count)
|
|
102
|
-
count = c;
|
|
103
|
-
}
|
|
104
|
-
return count;
|
|
105
|
-
}
|
|
106
|
-
else if (isPair(node)) {
|
|
107
|
-
const kc = getAliasCount(doc, node.key, anchors);
|
|
108
|
-
const vc = getAliasCount(doc, node.value, anchors);
|
|
109
|
-
return Math.max(kc, vc);
|
|
110
|
-
}
|
|
111
|
-
return 1;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { Alias };
|
package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var createNode = require('../doc/createNode.js');
|
|
4
|
-
var identity = require('./identity.js');
|
|
5
|
-
var Node = require('./Node.js');
|
|
6
|
-
|
|
7
|
-
function collectionFromPath(schema, path, value) {
|
|
8
|
-
let v = value;
|
|
9
|
-
for (let i = path.length - 1; i >= 0; --i) {
|
|
10
|
-
const k = path[i];
|
|
11
|
-
if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {
|
|
12
|
-
const a = [];
|
|
13
|
-
a[k] = v;
|
|
14
|
-
v = a;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
v = new Map([[k, v]]);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return createNode.createNode(v, undefined, {
|
|
21
|
-
aliasDuplicateObjects: false,
|
|
22
|
-
keepUndefined: false,
|
|
23
|
-
onAnchor: () => {
|
|
24
|
-
throw new Error('This should not happen, please report a bug.');
|
|
25
|
-
},
|
|
26
|
-
schema,
|
|
27
|
-
sourceObjects: new Map()
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
// Type guard is intentionally a little wrong so as to be more useful,
|
|
31
|
-
// as it does not cover untypable empty non-string iterables (e.g. []).
|
|
32
|
-
const isEmptyPath = (path) => path == null ||
|
|
33
|
-
(typeof path === 'object' && !!path[Symbol.iterator]().next().done);
|
|
34
|
-
class Collection extends Node.NodeBase {
|
|
35
|
-
constructor(type, schema) {
|
|
36
|
-
super(type);
|
|
37
|
-
Object.defineProperty(this, 'schema', {
|
|
38
|
-
value: schema,
|
|
39
|
-
configurable: true,
|
|
40
|
-
enumerable: false,
|
|
41
|
-
writable: true
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Create a copy of this collection.
|
|
46
|
-
*
|
|
47
|
-
* @param schema - If defined, overwrites the original's schema
|
|
48
|
-
*/
|
|
49
|
-
clone(schema) {
|
|
50
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
51
|
-
if (schema)
|
|
52
|
-
copy.schema = schema;
|
|
53
|
-
copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);
|
|
54
|
-
if (this.range)
|
|
55
|
-
copy.range = this.range.slice();
|
|
56
|
-
return copy;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
60
|
-
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
61
|
-
* that already exists in the map.
|
|
62
|
-
*/
|
|
63
|
-
addIn(path, value) {
|
|
64
|
-
if (isEmptyPath(path))
|
|
65
|
-
this.add(value);
|
|
66
|
-
else {
|
|
67
|
-
const [key, ...rest] = path;
|
|
68
|
-
const node = this.get(key, true);
|
|
69
|
-
if (identity.isCollection(node))
|
|
70
|
-
node.addIn(rest, value);
|
|
71
|
-
else if (node === undefined && this.schema)
|
|
72
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
73
|
-
else
|
|
74
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Removes a value from the collection.
|
|
79
|
-
* @returns `true` if the item was found and removed.
|
|
80
|
-
*/
|
|
81
|
-
deleteIn(path) {
|
|
82
|
-
const [key, ...rest] = path;
|
|
83
|
-
if (rest.length === 0)
|
|
84
|
-
return this.delete(key);
|
|
85
|
-
const node = this.get(key, true);
|
|
86
|
-
if (identity.isCollection(node))
|
|
87
|
-
return node.deleteIn(rest);
|
|
88
|
-
else
|
|
89
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
93
|
-
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
94
|
-
* `true` (collections are always returned intact).
|
|
95
|
-
*/
|
|
96
|
-
getIn(path, keepScalar) {
|
|
97
|
-
const [key, ...rest] = path;
|
|
98
|
-
const node = this.get(key, true);
|
|
99
|
-
if (rest.length === 0)
|
|
100
|
-
return !keepScalar && identity.isScalar(node) ? node.value : node;
|
|
101
|
-
else
|
|
102
|
-
return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;
|
|
103
|
-
}
|
|
104
|
-
hasAllNullValues(allowScalar) {
|
|
105
|
-
return this.items.every(node => {
|
|
106
|
-
if (!identity.isPair(node))
|
|
107
|
-
return false;
|
|
108
|
-
const n = node.value;
|
|
109
|
-
return (n == null ||
|
|
110
|
-
(allowScalar &&
|
|
111
|
-
identity.isScalar(n) &&
|
|
112
|
-
n.value == null &&
|
|
113
|
-
!n.commentBefore &&
|
|
114
|
-
!n.comment &&
|
|
115
|
-
!n.tag));
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Checks if the collection includes a value with the key `key`.
|
|
120
|
-
*/
|
|
121
|
-
hasIn(path) {
|
|
122
|
-
const [key, ...rest] = path;
|
|
123
|
-
if (rest.length === 0)
|
|
124
|
-
return this.has(key);
|
|
125
|
-
const node = this.get(key, true);
|
|
126
|
-
return identity.isCollection(node) ? node.hasIn(rest) : false;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
130
|
-
* boolean to add/remove the item from the set.
|
|
131
|
-
*/
|
|
132
|
-
setIn(path, value) {
|
|
133
|
-
const [key, ...rest] = path;
|
|
134
|
-
if (rest.length === 0) {
|
|
135
|
-
this.set(key, value);
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
const node = this.get(key, true);
|
|
139
|
-
if (identity.isCollection(node))
|
|
140
|
-
node.setIn(rest, value);
|
|
141
|
-
else if (node === undefined && this.schema)
|
|
142
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
143
|
-
else
|
|
144
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
exports.Collection = Collection;
|
|
150
|
-
exports.collectionFromPath = collectionFromPath;
|
|
151
|
-
exports.isEmptyPath = isEmptyPath;
|
package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.mjs
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { createNode } from '../doc/createNode.mjs';
|
|
2
|
-
import { isNode, isPair, isCollection, isScalar } from './identity.mjs';
|
|
3
|
-
import { NodeBase } from './Node.mjs';
|
|
4
|
-
|
|
5
|
-
function collectionFromPath(schema, path, value) {
|
|
6
|
-
let v = value;
|
|
7
|
-
for (let i = path.length - 1; i >= 0; --i) {
|
|
8
|
-
const k = path[i];
|
|
9
|
-
if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {
|
|
10
|
-
const a = [];
|
|
11
|
-
a[k] = v;
|
|
12
|
-
v = a;
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
v = new Map([[k, v]]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return createNode(v, undefined, {
|
|
19
|
-
aliasDuplicateObjects: false,
|
|
20
|
-
keepUndefined: false,
|
|
21
|
-
onAnchor: () => {
|
|
22
|
-
throw new Error('This should not happen, please report a bug.');
|
|
23
|
-
},
|
|
24
|
-
schema,
|
|
25
|
-
sourceObjects: new Map()
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
// Type guard is intentionally a little wrong so as to be more useful,
|
|
29
|
-
// as it does not cover untypable empty non-string iterables (e.g. []).
|
|
30
|
-
const isEmptyPath = (path) => path == null ||
|
|
31
|
-
(typeof path === 'object' && !!path[Symbol.iterator]().next().done);
|
|
32
|
-
class Collection extends NodeBase {
|
|
33
|
-
constructor(type, schema) {
|
|
34
|
-
super(type);
|
|
35
|
-
Object.defineProperty(this, 'schema', {
|
|
36
|
-
value: schema,
|
|
37
|
-
configurable: true,
|
|
38
|
-
enumerable: false,
|
|
39
|
-
writable: true
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Create a copy of this collection.
|
|
44
|
-
*
|
|
45
|
-
* @param schema - If defined, overwrites the original's schema
|
|
46
|
-
*/
|
|
47
|
-
clone(schema) {
|
|
48
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
49
|
-
if (schema)
|
|
50
|
-
copy.schema = schema;
|
|
51
|
-
copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it);
|
|
52
|
-
if (this.range)
|
|
53
|
-
copy.range = this.range.slice();
|
|
54
|
-
return copy;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
58
|
-
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
59
|
-
* that already exists in the map.
|
|
60
|
-
*/
|
|
61
|
-
addIn(path, value) {
|
|
62
|
-
if (isEmptyPath(path))
|
|
63
|
-
this.add(value);
|
|
64
|
-
else {
|
|
65
|
-
const [key, ...rest] = path;
|
|
66
|
-
const node = this.get(key, true);
|
|
67
|
-
if (isCollection(node))
|
|
68
|
-
node.addIn(rest, value);
|
|
69
|
-
else if (node === undefined && this.schema)
|
|
70
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
71
|
-
else
|
|
72
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Removes a value from the collection.
|
|
77
|
-
* @returns `true` if the item was found and removed.
|
|
78
|
-
*/
|
|
79
|
-
deleteIn(path) {
|
|
80
|
-
const [key, ...rest] = path;
|
|
81
|
-
if (rest.length === 0)
|
|
82
|
-
return this.delete(key);
|
|
83
|
-
const node = this.get(key, true);
|
|
84
|
-
if (isCollection(node))
|
|
85
|
-
return node.deleteIn(rest);
|
|
86
|
-
else
|
|
87
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
91
|
-
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
92
|
-
* `true` (collections are always returned intact).
|
|
93
|
-
*/
|
|
94
|
-
getIn(path, keepScalar) {
|
|
95
|
-
const [key, ...rest] = path;
|
|
96
|
-
const node = this.get(key, true);
|
|
97
|
-
if (rest.length === 0)
|
|
98
|
-
return !keepScalar && isScalar(node) ? node.value : node;
|
|
99
|
-
else
|
|
100
|
-
return isCollection(node) ? node.getIn(rest, keepScalar) : undefined;
|
|
101
|
-
}
|
|
102
|
-
hasAllNullValues(allowScalar) {
|
|
103
|
-
return this.items.every(node => {
|
|
104
|
-
if (!isPair(node))
|
|
105
|
-
return false;
|
|
106
|
-
const n = node.value;
|
|
107
|
-
return (n == null ||
|
|
108
|
-
(allowScalar &&
|
|
109
|
-
isScalar(n) &&
|
|
110
|
-
n.value == null &&
|
|
111
|
-
!n.commentBefore &&
|
|
112
|
-
!n.comment &&
|
|
113
|
-
!n.tag));
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Checks if the collection includes a value with the key `key`.
|
|
118
|
-
*/
|
|
119
|
-
hasIn(path) {
|
|
120
|
-
const [key, ...rest] = path;
|
|
121
|
-
if (rest.length === 0)
|
|
122
|
-
return this.has(key);
|
|
123
|
-
const node = this.get(key, true);
|
|
124
|
-
return isCollection(node) ? node.hasIn(rest) : false;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
128
|
-
* boolean to add/remove the item from the set.
|
|
129
|
-
*/
|
|
130
|
-
setIn(path, value) {
|
|
131
|
-
const [key, ...rest] = path;
|
|
132
|
-
if (rest.length === 0) {
|
|
133
|
-
this.set(key, value);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
const node = this.get(key, true);
|
|
137
|
-
if (isCollection(node))
|
|
138
|
-
node.setIn(rest, value);
|
|
139
|
-
else if (node === undefined && this.schema)
|
|
140
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
141
|
-
else
|
|
142
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export { Collection, collectionFromPath, isEmptyPath };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var applyReviver = require('../doc/applyReviver.js');
|
|
4
|
-
var identity = require('./identity.js');
|
|
5
|
-
var toJS = require('./toJS.js');
|
|
6
|
-
|
|
7
|
-
class NodeBase {
|
|
8
|
-
constructor(type) {
|
|
9
|
-
Object.defineProperty(this, identity.NODE_TYPE, { value: type });
|
|
10
|
-
}
|
|
11
|
-
/** Create a copy of this node. */
|
|
12
|
-
clone() {
|
|
13
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
14
|
-
if (this.range)
|
|
15
|
-
copy.range = this.range.slice();
|
|
16
|
-
return copy;
|
|
17
|
-
}
|
|
18
|
-
/** A plain JavaScript representation of this node. */
|
|
19
|
-
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
20
|
-
if (!identity.isDocument(doc))
|
|
21
|
-
throw new TypeError('A document argument is required');
|
|
22
|
-
const ctx = {
|
|
23
|
-
anchors: new Map(),
|
|
24
|
-
doc,
|
|
25
|
-
keep: true,
|
|
26
|
-
mapAsMap: mapAsMap === true,
|
|
27
|
-
mapKeyWarned: false,
|
|
28
|
-
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
|
29
|
-
};
|
|
30
|
-
const res = toJS.toJS(this, '', ctx);
|
|
31
|
-
if (typeof onAnchor === 'function')
|
|
32
|
-
for (const { count, res } of ctx.anchors.values())
|
|
33
|
-
onAnchor(res, count);
|
|
34
|
-
return typeof reviver === 'function'
|
|
35
|
-
? applyReviver.applyReviver(reviver, { '': res }, '', res)
|
|
36
|
-
: res;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
exports.NodeBase = NodeBase;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { applyReviver } from '../doc/applyReviver.mjs';
|
|
2
|
-
import { NODE_TYPE, isDocument } from './identity.mjs';
|
|
3
|
-
import { toJS } from './toJS.mjs';
|
|
4
|
-
|
|
5
|
-
class NodeBase {
|
|
6
|
-
constructor(type) {
|
|
7
|
-
Object.defineProperty(this, NODE_TYPE, { value: type });
|
|
8
|
-
}
|
|
9
|
-
/** Create a copy of this node. */
|
|
10
|
-
clone() {
|
|
11
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
12
|
-
if (this.range)
|
|
13
|
-
copy.range = this.range.slice();
|
|
14
|
-
return copy;
|
|
15
|
-
}
|
|
16
|
-
/** A plain JavaScript representation of this node. */
|
|
17
|
-
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
18
|
-
if (!isDocument(doc))
|
|
19
|
-
throw new TypeError('A document argument is required');
|
|
20
|
-
const ctx = {
|
|
21
|
-
anchors: new Map(),
|
|
22
|
-
doc,
|
|
23
|
-
keep: true,
|
|
24
|
-
mapAsMap: mapAsMap === true,
|
|
25
|
-
mapKeyWarned: false,
|
|
26
|
-
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
|
|
27
|
-
};
|
|
28
|
-
const res = toJS(this, '', ctx);
|
|
29
|
-
if (typeof onAnchor === 'function')
|
|
30
|
-
for (const { count, res } of ctx.anchors.values())
|
|
31
|
-
onAnchor(res, count);
|
|
32
|
-
return typeof reviver === 'function'
|
|
33
|
-
? applyReviver(reviver, { '': res }, '', res)
|
|
34
|
-
: res;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { NodeBase };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var createNode = require('../doc/createNode.js');
|
|
4
|
-
var stringifyPair = require('../stringify/stringifyPair.js');
|
|
5
|
-
var addPairToJSMap = require('./addPairToJSMap.js');
|
|
6
|
-
var identity = require('./identity.js');
|
|
7
|
-
|
|
8
|
-
function createPair(key, value, ctx) {
|
|
9
|
-
const k = createNode.createNode(key, undefined, ctx);
|
|
10
|
-
const v = createNode.createNode(value, undefined, ctx);
|
|
11
|
-
return new Pair(k, v);
|
|
12
|
-
}
|
|
13
|
-
class Pair {
|
|
14
|
-
constructor(key, value = null) {
|
|
15
|
-
Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
|
|
16
|
-
this.key = key;
|
|
17
|
-
this.value = value;
|
|
18
|
-
}
|
|
19
|
-
clone(schema) {
|
|
20
|
-
let { key, value } = this;
|
|
21
|
-
if (identity.isNode(key))
|
|
22
|
-
key = key.clone(schema);
|
|
23
|
-
if (identity.isNode(value))
|
|
24
|
-
value = value.clone(schema);
|
|
25
|
-
return new Pair(key, value);
|
|
26
|
-
}
|
|
27
|
-
toJSON(_, ctx) {
|
|
28
|
-
const pair = ctx?.mapAsMap ? new Map() : {};
|
|
29
|
-
return addPairToJSMap.addPairToJSMap(ctx, pair, this);
|
|
30
|
-
}
|
|
31
|
-
toString(ctx, onComment, onChompKeep) {
|
|
32
|
-
return ctx?.doc
|
|
33
|
-
? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)
|
|
34
|
-
: JSON.stringify(this);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.Pair = Pair;
|
|
39
|
-
exports.createPair = createPair;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createNode } from '../doc/createNode.mjs';
|
|
2
|
-
import { stringifyPair } from '../stringify/stringifyPair.mjs';
|
|
3
|
-
import { addPairToJSMap } from './addPairToJSMap.mjs';
|
|
4
|
-
import { NODE_TYPE, PAIR, isNode } from './identity.mjs';
|
|
5
|
-
|
|
6
|
-
function createPair(key, value, ctx) {
|
|
7
|
-
const k = createNode(key, undefined, ctx);
|
|
8
|
-
const v = createNode(value, undefined, ctx);
|
|
9
|
-
return new Pair(k, v);
|
|
10
|
-
}
|
|
11
|
-
class Pair {
|
|
12
|
-
constructor(key, value = null) {
|
|
13
|
-
Object.defineProperty(this, NODE_TYPE, { value: PAIR });
|
|
14
|
-
this.key = key;
|
|
15
|
-
this.value = value;
|
|
16
|
-
}
|
|
17
|
-
clone(schema) {
|
|
18
|
-
let { key, value } = this;
|
|
19
|
-
if (isNode(key))
|
|
20
|
-
key = key.clone(schema);
|
|
21
|
-
if (isNode(value))
|
|
22
|
-
value = value.clone(schema);
|
|
23
|
-
return new Pair(key, value);
|
|
24
|
-
}
|
|
25
|
-
toJSON(_, ctx) {
|
|
26
|
-
const pair = ctx?.mapAsMap ? new Map() : {};
|
|
27
|
-
return addPairToJSMap(ctx, pair, this);
|
|
28
|
-
}
|
|
29
|
-
toString(ctx, onComment, onChompKeep) {
|
|
30
|
-
return ctx?.doc
|
|
31
|
-
? stringifyPair(this, ctx, onComment, onChompKeep)
|
|
32
|
-
: JSON.stringify(this);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { Pair, createPair };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var identity = require('./identity.js');
|
|
4
|
-
var Node = require('./Node.js');
|
|
5
|
-
var toJS = require('./toJS.js');
|
|
6
|
-
|
|
7
|
-
const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
|
|
8
|
-
class Scalar extends Node.NodeBase {
|
|
9
|
-
constructor(value) {
|
|
10
|
-
super(identity.SCALAR);
|
|
11
|
-
this.value = value;
|
|
12
|
-
}
|
|
13
|
-
toJSON(arg, ctx) {
|
|
14
|
-
return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);
|
|
15
|
-
}
|
|
16
|
-
toString() {
|
|
17
|
-
return String(this.value);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED';
|
|
21
|
-
Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL';
|
|
22
|
-
Scalar.PLAIN = 'PLAIN';
|
|
23
|
-
Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
|
|
24
|
-
Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
|
|
25
|
-
|
|
26
|
-
exports.Scalar = Scalar;
|
|
27
|
-
exports.isScalarValue = isScalarValue;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SCALAR } from './identity.mjs';
|
|
2
|
-
import { NodeBase } from './Node.mjs';
|
|
3
|
-
import { toJS } from './toJS.mjs';
|
|
4
|
-
|
|
5
|
-
const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
|
|
6
|
-
class Scalar extends NodeBase {
|
|
7
|
-
constructor(value) {
|
|
8
|
-
super(SCALAR);
|
|
9
|
-
this.value = value;
|
|
10
|
-
}
|
|
11
|
-
toJSON(arg, ctx) {
|
|
12
|
-
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return String(this.value);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED';
|
|
19
|
-
Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL';
|
|
20
|
-
Scalar.PLAIN = 'PLAIN';
|
|
21
|
-
Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
|
|
22
|
-
Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
|
|
23
|
-
|
|
24
|
-
export { Scalar, isScalarValue };
|