@windrun-huaiin/dev-scripts 13.1.0 → 14.1.0
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/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.mjs +5 -0
- package/dist/_virtual/index.js +11 -0
- package/dist/_virtual/index.mjs +7 -0
- package/dist/_virtual/re.js +5 -0
- package/dist/_virtual/re.mjs +3 -0
- package/dist/cli.js +33 -1
- package/dist/cli.mjs +33 -1
- package/dist/commands/diaomao-update.d.ts +3 -0
- package/dist/commands/diaomao-update.d.ts.map +1 -0
- package/dist/commands/diaomao-update.js +304 -0
- package/dist/commands/diaomao-update.mjs +302 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +9 -0
- package/dist/config/index.mjs +9 -0
- package/dist/config/schema.d.ts +5 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +5 -0
- package/dist/config/schema.mjs +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.js +161 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/comparator.mjs +159 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.js +576 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/range.mjs +574 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.js +350 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/classes/semver.mjs +348 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/clean.mjs +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.js +72 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/cmp.mjs +70 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.js +77 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/coerce.mjs +75 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.mjs +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.mjs +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.js +73 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/diff.mjs +71 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.js +34 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/inc.mjs +32 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.js +31 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/parse.mjs +29 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/prerelease.mjs +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js +25 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.mjs +23 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js +18 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.mjs +16 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/valid.mjs +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.js +144 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/index.mjs +142 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.js +48 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/constants.mjs +46 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/debug.mjs +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js +40 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.mjs +38 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.js +53 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/lrucache.mjs +51 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/parse-options.mjs +26 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.js +239 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/re.mjs +237 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.mjs +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.js +22 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/intersects.mjs +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.mjs +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js +41 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/max-satisfying.mjs +39 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js +40 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-satisfying.mjs +38 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js +78 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.mjs +76 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.js +102 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/outside.mjs +100 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.js +63 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/simplify.mjs +61 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.js +265 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/subset.mjs +263 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js +23 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.mjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js +26 -0
- package/dist/node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.mjs +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.js +90 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.mjs +88 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.js +45 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.mjs +43 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.js +105 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.mjs +102 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.js +88 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +86 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.mjs +217 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.js +117 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +115 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +200 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +198 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +51 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +49 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.mjs +37 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +209 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +207 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +223 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.js +148 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.mjs +146 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.js +36 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +34 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +28 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +26 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +17 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +15 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.js +15 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +13 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.js +337 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.mjs +335 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.js +76 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.mjs +71 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.js +57 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.mjs +55 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.js +90 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.mjs +88 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.js +178 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.mjs +176 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.js +62 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.mjs +57 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.js +9 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.mjs +7 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.mjs +114 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js +151 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.mjs +147 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.js +40 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.mjs +38 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.mjs +36 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.js +27 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.mjs +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.js +147 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +144 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +115 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +113 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +65 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +63 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.js +53 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.mjs +36 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.mjs +37 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.js +79 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.mjs +73 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.js +719 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.mjs +717 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.js +41 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.mjs +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.js +969 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.mjs +967 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.js +68 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.mjs +64 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.js +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.mjs +37 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.js +19 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.mjs +17 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.js +17 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.mjs +15 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.js +19 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.mjs +17 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.js +16 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.mjs +14 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.js +21 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.mjs +19 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.js +47 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.mjs +43 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.js +42 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.mjs +38 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.js +25 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.mjs +23 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.js +64 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.mjs +62 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.js +99 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.mjs +96 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +60 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +58 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +29 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +26 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +50 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +46 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +76 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +71 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +68 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +64 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +77 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +74 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +82 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +78 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +41 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +39 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +96 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +93 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +101 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +151 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +146 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.js +131 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.mjs +128 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +145 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +143 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.js +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +20 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +87 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +85 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +26 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +24 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.js +152 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +150 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.js +338 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +336 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.js +148 -0
- package/dist/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.mjs +146 -0
- package/package.json +6 -4
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import https from 'https';
|
|
4
|
+
import { parse, stringify } from 'yaml';
|
|
5
|
+
import semver from 'semver';
|
|
6
|
+
|
|
7
|
+
const DEPENDENCY_SECTIONS = [
|
|
8
|
+
'dependencies',
|
|
9
|
+
'devDependencies',
|
|
10
|
+
'peerDependencies',
|
|
11
|
+
'optionalDependencies'
|
|
12
|
+
];
|
|
13
|
+
function fetchText(url) {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
const request = https.get(url, (response) => {
|
|
16
|
+
const statusCode = response.statusCode ?? 0;
|
|
17
|
+
if (statusCode >= 300 && statusCode < 400 && response.headers.location) {
|
|
18
|
+
response.resume();
|
|
19
|
+
fetchText(response.headers.location).then(resolve).catch(reject);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (statusCode < 200 || statusCode >= 300) {
|
|
23
|
+
response.resume();
|
|
24
|
+
reject(new Error(`failed to fetch update source: ${statusCode}`));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
let body = '';
|
|
28
|
+
response.setEncoding('utf8');
|
|
29
|
+
response.on('data', (chunk) => {
|
|
30
|
+
body += chunk;
|
|
31
|
+
});
|
|
32
|
+
response.on('end', () => resolve(body));
|
|
33
|
+
});
|
|
34
|
+
request.on('error', (error) => reject(error));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function findNearestFile(startDir, fileName) {
|
|
38
|
+
let currentDir = startDir;
|
|
39
|
+
while (true) {
|
|
40
|
+
const candidate = path.join(currentDir, fileName);
|
|
41
|
+
if (fs.existsSync(candidate)) {
|
|
42
|
+
return candidate;
|
|
43
|
+
}
|
|
44
|
+
const parentDir = path.dirname(currentDir);
|
|
45
|
+
if (parentDir === currentDir) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
currentDir = parentDir;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function stripProtocolPrefix(version) {
|
|
52
|
+
const protocolPrefixes = ['workspace:', 'npm:'];
|
|
53
|
+
for (const prefix of protocolPrefixes) {
|
|
54
|
+
if (version.startsWith(prefix)) {
|
|
55
|
+
return version.slice(prefix.length);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return version;
|
|
59
|
+
}
|
|
60
|
+
function compareVersionSpecs(currentVersion, targetVersion) {
|
|
61
|
+
if (currentVersion === targetVersion) {
|
|
62
|
+
return 'same';
|
|
63
|
+
}
|
|
64
|
+
const normalizedCurrent = stripProtocolPrefix(currentVersion);
|
|
65
|
+
const normalizedTarget = stripProtocolPrefix(targetVersion);
|
|
66
|
+
if (normalizedCurrent === normalizedTarget) {
|
|
67
|
+
return 'same';
|
|
68
|
+
}
|
|
69
|
+
const currentMin = semver.minVersion(normalizedCurrent);
|
|
70
|
+
const targetMin = semver.minVersion(normalizedTarget);
|
|
71
|
+
if (currentMin && targetMin) {
|
|
72
|
+
const comparison = semver.compare(currentMin, targetMin);
|
|
73
|
+
if (comparison > 0) {
|
|
74
|
+
return 'newer';
|
|
75
|
+
}
|
|
76
|
+
if (comparison === 0) {
|
|
77
|
+
return 'same';
|
|
78
|
+
}
|
|
79
|
+
return 'update';
|
|
80
|
+
}
|
|
81
|
+
return 'update';
|
|
82
|
+
}
|
|
83
|
+
function extractCatalog(workspaceContent) {
|
|
84
|
+
const parsed = parse(workspaceContent);
|
|
85
|
+
const catalog = parsed?.catalog;
|
|
86
|
+
if (!catalog || typeof catalog !== 'object') {
|
|
87
|
+
throw new Error('catalog section not found in remote pnpm-workspace.yaml');
|
|
88
|
+
}
|
|
89
|
+
return catalog;
|
|
90
|
+
}
|
|
91
|
+
function loadJsonFile(filePath) {
|
|
92
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
93
|
+
}
|
|
94
|
+
function loadYamlFile(filePath) {
|
|
95
|
+
return parse(fs.readFileSync(filePath, 'utf8'));
|
|
96
|
+
}
|
|
97
|
+
function saveYamlFile(filePath, data) {
|
|
98
|
+
fs.writeFileSync(filePath, stringify(data), 'utf8');
|
|
99
|
+
}
|
|
100
|
+
function saveJsonFile(filePath, data) {
|
|
101
|
+
fs.writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
|
|
102
|
+
}
|
|
103
|
+
function renderTable(rows, headers) {
|
|
104
|
+
const widths = [
|
|
105
|
+
headers[0].length,
|
|
106
|
+
headers[1].length,
|
|
107
|
+
headers[2].length,
|
|
108
|
+
headers[3]?.length ?? 0
|
|
109
|
+
];
|
|
110
|
+
for (const row of rows) {
|
|
111
|
+
widths[0] = Math.max(widths[0], row.packageName.length);
|
|
112
|
+
widths[1] = Math.max(widths[1], row.currentVersion.length);
|
|
113
|
+
widths[2] = Math.max(widths[2], row.targetVersion.length);
|
|
114
|
+
if ('reason' in row) {
|
|
115
|
+
widths[3] = Math.max(widths[3], row.reason.length);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const hasFourthColumn = Boolean(headers[3]);
|
|
119
|
+
const border = hasFourthColumn
|
|
120
|
+
? `┌${'─'.repeat(widths[0] + 2)}┬${'─'.repeat(widths[1] + 2)}┬${'─'.repeat(widths[2] + 2)}┬${'─'.repeat(widths[3] + 2)}┐`
|
|
121
|
+
: `┌${'─'.repeat(widths[0] + 2)}┬${'─'.repeat(widths[1] + 2)}┬${'─'.repeat(widths[2] + 2)}┐`;
|
|
122
|
+
const separator = hasFourthColumn
|
|
123
|
+
? `├${'─'.repeat(widths[0] + 2)}┼${'─'.repeat(widths[1] + 2)}┼${'─'.repeat(widths[2] + 2)}┼${'─'.repeat(widths[3] + 2)}┤`
|
|
124
|
+
: `├${'─'.repeat(widths[0] + 2)}┼${'─'.repeat(widths[1] + 2)}┼${'─'.repeat(widths[2] + 2)}┤`;
|
|
125
|
+
const footer = hasFourthColumn
|
|
126
|
+
? `└${'─'.repeat(widths[0] + 2)}┴${'─'.repeat(widths[1] + 2)}┴${'─'.repeat(widths[2] + 2)}┴${'─'.repeat(widths[3] + 2)}┘`
|
|
127
|
+
: `└${'─'.repeat(widths[0] + 2)}┴${'─'.repeat(widths[1] + 2)}┴${'─'.repeat(widths[2] + 2)}┘`;
|
|
128
|
+
const formatRow = (columns) => {
|
|
129
|
+
if (hasFourthColumn) {
|
|
130
|
+
return `│ ${columns[0].padEnd(widths[0])} │ ${columns[1].padEnd(widths[1])} │ ${columns[2].padEnd(widths[2])} │ ${columns[3].padEnd(widths[3])} │`;
|
|
131
|
+
}
|
|
132
|
+
return `│ ${columns[0].padEnd(widths[0])} │ ${columns[1].padEnd(widths[1])} │ ${columns[2].padEnd(widths[2])} │`;
|
|
133
|
+
};
|
|
134
|
+
return [
|
|
135
|
+
border,
|
|
136
|
+
formatRow(hasFourthColumn ? [headers[0], headers[1], headers[2], headers[3] || ''] : [headers[0], headers[1], headers[2]]),
|
|
137
|
+
separator,
|
|
138
|
+
...rows.map((row) => formatRow('reason' in row
|
|
139
|
+
? [row.packageName, row.currentVersion, row.targetVersion, row.reason]
|
|
140
|
+
: [row.packageName, row.currentVersion, row.targetVersion])),
|
|
141
|
+
footer
|
|
142
|
+
].join('\n');
|
|
143
|
+
}
|
|
144
|
+
function printSkipDetails(skipRows, compactLog) {
|
|
145
|
+
const newerCount = skipRows.filter((row) => row.reason === 'skipped-newer').length;
|
|
146
|
+
if (compactLog) {
|
|
147
|
+
if (newerCount > 0) {
|
|
148
|
+
console.log(`Skipped ${newerCount} package(s) because local versions are newer than the source.`);
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (skipRows.length === 0) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
console.log('\nSkipped:');
|
|
156
|
+
console.log(renderTable(skipRows, ['Package', 'Before', 'After', 'Reason']));
|
|
157
|
+
}
|
|
158
|
+
async function diaomaoUpdate(config, cwd = typeof process !== 'undefined' ? process.cwd() : '.') {
|
|
159
|
+
const updateConfig = config.diaomaoUpdate || {};
|
|
160
|
+
const sourceUrl = updateConfig.sourceUrl || '';
|
|
161
|
+
const allowedPackages = updateConfig.allowedPackages || [];
|
|
162
|
+
const compactLog = updateConfig.compactLog !== false;
|
|
163
|
+
if (!sourceUrl) {
|
|
164
|
+
throw new Error('diaomaoUpdate.sourceUrl is required');
|
|
165
|
+
}
|
|
166
|
+
if (!Array.isArray(allowedPackages) || allowedPackages.length === 0) {
|
|
167
|
+
throw new Error('diaomaoUpdate.allowedPackages must contain at least one package name');
|
|
168
|
+
}
|
|
169
|
+
const packageJsonPath = path.join(cwd, 'package.json');
|
|
170
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
171
|
+
throw new Error(`package.json not found in ${cwd}`);
|
|
172
|
+
}
|
|
173
|
+
const localWorkspacePath = findNearestFile(cwd, 'pnpm-workspace.yaml');
|
|
174
|
+
const packageJson = loadJsonFile(packageJsonPath);
|
|
175
|
+
const localWorkspace = localWorkspacePath ? loadYamlFile(localWorkspacePath) : null;
|
|
176
|
+
const localCatalog = localWorkspace?.catalog || {};
|
|
177
|
+
console.log(`Reading update source: ${sourceUrl}`);
|
|
178
|
+
const remoteWorkspaceContent = await fetchText(sourceUrl);
|
|
179
|
+
const remoteCatalog = extractCatalog(remoteWorkspaceContent);
|
|
180
|
+
const updatedRows = [];
|
|
181
|
+
const skipRows = [];
|
|
182
|
+
let packageJsonChanged = false;
|
|
183
|
+
let workspaceChanged = false;
|
|
184
|
+
for (const packageName of allowedPackages) {
|
|
185
|
+
const targetVersion = remoteCatalog[packageName];
|
|
186
|
+
if (!targetVersion) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
let matched = false;
|
|
190
|
+
for (const section of DEPENDENCY_SECTIONS) {
|
|
191
|
+
const dependencies = packageJson[section];
|
|
192
|
+
if (!dependencies || !(packageName in dependencies)) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
matched = true;
|
|
196
|
+
const currentSpecifier = dependencies[packageName];
|
|
197
|
+
if (currentSpecifier.startsWith('workspace:')) {
|
|
198
|
+
skipRows.push({
|
|
199
|
+
packageName,
|
|
200
|
+
currentVersion: currentSpecifier,
|
|
201
|
+
targetVersion,
|
|
202
|
+
reason: 'skipped-workspace'
|
|
203
|
+
});
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
if (currentSpecifier === 'catalog:') {
|
|
207
|
+
const localCatalogVersion = localCatalog[packageName];
|
|
208
|
+
if (!localCatalogVersion) {
|
|
209
|
+
skipRows.push({
|
|
210
|
+
packageName,
|
|
211
|
+
currentVersion: currentSpecifier,
|
|
212
|
+
targetVersion,
|
|
213
|
+
reason: 'skipped-unresolved-catalog'
|
|
214
|
+
});
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const decision = compareVersionSpecs(localCatalogVersion, targetVersion);
|
|
218
|
+
if (decision === 'newer') {
|
|
219
|
+
skipRows.push({
|
|
220
|
+
packageName,
|
|
221
|
+
currentVersion: localCatalogVersion,
|
|
222
|
+
targetVersion,
|
|
223
|
+
reason: 'skipped-newer'
|
|
224
|
+
});
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
if (decision === 'same') {
|
|
228
|
+
skipRows.push({
|
|
229
|
+
packageName,
|
|
230
|
+
currentVersion: localCatalogVersion,
|
|
231
|
+
targetVersion,
|
|
232
|
+
reason: 'skipped-same'
|
|
233
|
+
});
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
localCatalog[packageName] = targetVersion;
|
|
237
|
+
workspaceChanged = true;
|
|
238
|
+
updatedRows.push({
|
|
239
|
+
packageName,
|
|
240
|
+
currentVersion: localCatalogVersion,
|
|
241
|
+
targetVersion
|
|
242
|
+
});
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
const decision = compareVersionSpecs(currentSpecifier, targetVersion);
|
|
246
|
+
if (decision === 'newer') {
|
|
247
|
+
skipRows.push({
|
|
248
|
+
packageName,
|
|
249
|
+
currentVersion: currentSpecifier,
|
|
250
|
+
targetVersion,
|
|
251
|
+
reason: 'skipped-newer'
|
|
252
|
+
});
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
if (decision === 'same') {
|
|
256
|
+
skipRows.push({
|
|
257
|
+
packageName,
|
|
258
|
+
currentVersion: currentSpecifier,
|
|
259
|
+
targetVersion,
|
|
260
|
+
reason: 'skipped-same'
|
|
261
|
+
});
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
dependencies[packageName] = targetVersion;
|
|
265
|
+
packageJsonChanged = true;
|
|
266
|
+
updatedRows.push({
|
|
267
|
+
packageName,
|
|
268
|
+
currentVersion: currentSpecifier,
|
|
269
|
+
targetVersion
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
if (!matched) {
|
|
273
|
+
skipRows.push({
|
|
274
|
+
packageName,
|
|
275
|
+
currentVersion: '-',
|
|
276
|
+
targetVersion,
|
|
277
|
+
reason: 'skipped-missing'
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (workspaceChanged && localWorkspacePath && localWorkspace) {
|
|
282
|
+
localWorkspace.catalog = localCatalog;
|
|
283
|
+
saveYamlFile(localWorkspacePath, localWorkspace);
|
|
284
|
+
}
|
|
285
|
+
if (packageJsonChanged) {
|
|
286
|
+
saveJsonFile(packageJsonPath, packageJson);
|
|
287
|
+
}
|
|
288
|
+
if (updatedRows.length > 0) {
|
|
289
|
+
console.log('\nResults:');
|
|
290
|
+
console.log(renderTable(updatedRows, ['Package', 'Before', 'After']));
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
console.log('\nResults:');
|
|
294
|
+
console.log('No package versions were updated.');
|
|
295
|
+
}
|
|
296
|
+
console.log('');
|
|
297
|
+
console.log(`Updated ${updatedRows.length} package version(s).`);
|
|
298
|
+
printSkipDetails(skipRows, compactLog);
|
|
299
|
+
return 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { diaomaoUpdate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,gBAAgB,EAAyB,MAAM,4BAA4B,CAAA;AA6FpG;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAA6D,EAAE,QAAQ,GAAE,OAAO,CAAC,gBAAgB,CAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAkC5K;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,gBAAgB,EAAyB,MAAM,4BAA4B,CAAA;AA6FpG;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAA6D,EAAE,QAAQ,GAAE,OAAO,CAAC,gBAAgB,CAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAkC5K;AAkDD;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAgB7D"}
|
package/dist/config/index.js
CHANGED
|
@@ -152,6 +152,12 @@ function printConfigInfo(config, sources, cwd) {
|
|
|
152
152
|
console.log('\n📤 output:');
|
|
153
153
|
console.log(` logDir: ${config.output.logDir}`);
|
|
154
154
|
console.log(` verbose: ${config.output.verbose}`);
|
|
155
|
+
if (config.diaomaoUpdate) {
|
|
156
|
+
console.log('\n📦 diaomaoUpdate:');
|
|
157
|
+
console.log(` sourceUrl: ${config.diaomaoUpdate.sourceUrl || 'not set'}`);
|
|
158
|
+
console.log(` allowedPackages: [${(config.diaomaoUpdate.allowedPackages || []).join(', ')}]`);
|
|
159
|
+
console.log(` compactLog: ${config.diaomaoUpdate.compactLog !== false}`);
|
|
160
|
+
}
|
|
155
161
|
console.log('');
|
|
156
162
|
}
|
|
157
163
|
/**
|
|
@@ -167,6 +173,9 @@ function validateConfig(config) {
|
|
|
167
173
|
if (config.scan.include.length === 0) {
|
|
168
174
|
throw new Error('at least one scan path is required');
|
|
169
175
|
}
|
|
176
|
+
if (config.diaomaoUpdate?.allowedPackages && !Array.isArray(config.diaomaoUpdate.allowedPackages)) {
|
|
177
|
+
throw new Error('diaomaoUpdate.allowedPackages must be an array');
|
|
178
|
+
}
|
|
170
179
|
}
|
|
171
180
|
|
|
172
181
|
exports.loadConfig = loadConfig;
|
package/dist/config/index.mjs
CHANGED
|
@@ -150,6 +150,12 @@ function printConfigInfo(config, sources, cwd) {
|
|
|
150
150
|
console.log('\n📤 output:');
|
|
151
151
|
console.log(` logDir: ${config.output.logDir}`);
|
|
152
152
|
console.log(` verbose: ${config.output.verbose}`);
|
|
153
|
+
if (config.diaomaoUpdate) {
|
|
154
|
+
console.log('\n📦 diaomaoUpdate:');
|
|
155
|
+
console.log(` sourceUrl: ${config.diaomaoUpdate.sourceUrl || 'not set'}`);
|
|
156
|
+
console.log(` allowedPackages: [${(config.diaomaoUpdate.allowedPackages || []).join(', ')}]`);
|
|
157
|
+
console.log(` compactLog: ${config.diaomaoUpdate.compactLog !== false}`);
|
|
158
|
+
}
|
|
153
159
|
console.log('');
|
|
154
160
|
}
|
|
155
161
|
/**
|
|
@@ -165,6 +171,9 @@ function validateConfig(config) {
|
|
|
165
171
|
if (config.scan.include.length === 0) {
|
|
166
172
|
throw new Error('at least one scan path is required');
|
|
167
173
|
}
|
|
174
|
+
if (config.diaomaoUpdate?.allowedPackages && !Array.isArray(config.diaomaoUpdate.allowedPackages)) {
|
|
175
|
+
throw new Error('diaomaoUpdate.allowedPackages must be an array');
|
|
176
|
+
}
|
|
168
177
|
}
|
|
169
178
|
|
|
170
179
|
export { loadConfig, validateConfig };
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export interface DevScriptsConfig {
|
|
|
21
21
|
verbose?: boolean;
|
|
22
22
|
};
|
|
23
23
|
architectureConfig?: Record<string, string>;
|
|
24
|
+
diaomaoUpdate?: {
|
|
25
|
+
sourceUrl?: string;
|
|
26
|
+
allowedPackages?: string[];
|
|
27
|
+
compactLog?: boolean;
|
|
28
|
+
};
|
|
24
29
|
}
|
|
25
30
|
export interface PackageJsonDevScripts {
|
|
26
31
|
locales?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IAGD,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IAGD,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IAGD,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB,CAAA;IAGD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IAGD,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IAGD,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IAGD,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB,CAAA;IAGD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAG3C,aAAa,CAAC,EAAE;QACd,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;QAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;CACF;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,cAAc,EAAE,gBAqF5B,CAAA"}
|
package/dist/config/schema.js
CHANGED
|
@@ -21,6 +21,11 @@ const DEFAULT_CONFIG = {
|
|
|
21
21
|
logDir: 'logs',
|
|
22
22
|
verbose: false
|
|
23
23
|
},
|
|
24
|
+
diaomaoUpdate: {
|
|
25
|
+
sourceUrl: 'https://raw.githubusercontent.com/caofanCPU/next-ai-build/main/pnpm-workspace.yaml',
|
|
26
|
+
allowedPackages: [],
|
|
27
|
+
compactLog: true
|
|
28
|
+
},
|
|
24
29
|
architectureConfig: {
|
|
25
30
|
".": "项目根目录",
|
|
26
31
|
".env.local": "本地环境变量配置",
|
package/dist/config/schema.mjs
CHANGED
|
@@ -19,6 +19,11 @@ const DEFAULT_CONFIG = {
|
|
|
19
19
|
logDir: 'logs',
|
|
20
20
|
verbose: false
|
|
21
21
|
},
|
|
22
|
+
diaomaoUpdate: {
|
|
23
|
+
sourceUrl: 'https://raw.githubusercontent.com/caofanCPU/next-ai-build/main/pnpm-workspace.yaml',
|
|
24
|
+
allowedPackages: [],
|
|
25
|
+
compactLog: true
|
|
26
|
+
},
|
|
22
27
|
architectureConfig: {
|
|
23
28
|
".": "项目根目录",
|
|
24
29
|
".env.local": "本地环境变量配置",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { checkTranslations } from '@dev-scripts/commands/check-translations';
|
|
2
2
|
export { cleanTranslations } from '@dev-scripts/commands/clean-translations';
|
|
3
3
|
export { generateBlogIndex } from '@dev-scripts/commands/generate-blog-index';
|
|
4
|
+
export { diaomaoUpdate } from '@dev-scripts/commands/diaomao-update';
|
|
4
5
|
export { registerBackendCoreCommands, syncBackendCoreRoutes, listBackendCoreRoutes, syncBackendCorePrisma, syncBackendCoreMigrations } from '@dev-scripts/commands/backend-core';
|
|
5
6
|
export { loadConfig, validateConfig } from '@dev-scripts/config';
|
|
6
7
|
export type { DevScriptsConfig, PackageJsonDevScripts } from '@dev-scripts/config/schema';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,oCAAoC,CAAA;AAG3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAChE,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACpE,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,oCAAoC,CAAA;AAG3C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAChE,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var checkTranslations = require('./commands/check-translations.js');
|
|
4
4
|
var cleanTranslations = require('./commands/clean-translations.js');
|
|
5
5
|
var generateBlogIndex = require('./commands/generate-blog-index.js');
|
|
6
|
+
var diaomaoUpdate = require('./commands/diaomao-update.js');
|
|
6
7
|
var backendCore = require('./commands/backend-core.js');
|
|
7
8
|
var index = require('./config/index.js');
|
|
8
9
|
|
|
@@ -11,6 +12,7 @@ var index = require('./config/index.js');
|
|
|
11
12
|
exports.checkTranslations = checkTranslations.checkTranslations;
|
|
12
13
|
exports.cleanTranslations = cleanTranslations.cleanTranslations;
|
|
13
14
|
exports.generateBlogIndex = generateBlogIndex.generateBlogIndex;
|
|
15
|
+
exports.diaomaoUpdate = diaomaoUpdate.diaomaoUpdate;
|
|
14
16
|
exports.listBackendCoreRoutes = backendCore.listBackendCoreRoutes;
|
|
15
17
|
exports.registerBackendCoreCommands = backendCore.registerBackendCoreCommands;
|
|
16
18
|
exports.syncBackendCoreMigrations = backendCore.syncBackendCoreMigrations;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { checkTranslations } from './commands/check-translations.mjs';
|
|
2
2
|
export { cleanTranslations } from './commands/clean-translations.mjs';
|
|
3
3
|
export { generateBlogIndex } from './commands/generate-blog-index.mjs';
|
|
4
|
+
export { diaomaoUpdate } from './commands/diaomao-update.mjs';
|
|
4
5
|
export { listBackendCoreRoutes, registerBackendCoreCommands, syncBackendCoreMigrations, syncBackendCorePrisma, syncBackendCoreRoutes } from './commands/backend-core.mjs';
|
|
5
6
|
export { loadConfig, validateConfig } from './config/index.mjs';
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var parseOptions = require('../internal/parse-options.js');
|
|
4
|
+
var re = require('../internal/re.js');
|
|
5
|
+
var cmp = require('../functions/cmp.js');
|
|
6
|
+
var debug = require('../internal/debug.js');
|
|
7
|
+
var semver = require('./semver.js');
|
|
8
|
+
var range = require('./range.js');
|
|
9
|
+
|
|
10
|
+
var comparator;
|
|
11
|
+
var hasRequiredComparator;
|
|
12
|
+
|
|
13
|
+
function requireComparator () {
|
|
14
|
+
if (hasRequiredComparator) return comparator;
|
|
15
|
+
hasRequiredComparator = 1;
|
|
16
|
+
|
|
17
|
+
const ANY = Symbol('SemVer ANY');
|
|
18
|
+
// hoisted class for cyclic dependency
|
|
19
|
+
class Comparator {
|
|
20
|
+
static get ANY () {
|
|
21
|
+
return ANY
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
constructor (comp, options) {
|
|
25
|
+
options = parseOptions$1(options);
|
|
26
|
+
|
|
27
|
+
if (comp instanceof Comparator) {
|
|
28
|
+
if (comp.loose === !!options.loose) {
|
|
29
|
+
return comp
|
|
30
|
+
} else {
|
|
31
|
+
comp = comp.value;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
comp = comp.trim().split(/\s+/).join(' ');
|
|
36
|
+
debug$1('comparator', comp, options);
|
|
37
|
+
this.options = options;
|
|
38
|
+
this.loose = !!options.loose;
|
|
39
|
+
this.parse(comp);
|
|
40
|
+
|
|
41
|
+
if (this.semver === ANY) {
|
|
42
|
+
this.value = '';
|
|
43
|
+
} else {
|
|
44
|
+
this.value = this.operator + this.semver.version;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
debug$1('comp', this);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
parse (comp) {
|
|
51
|
+
const r = this.options.loose ? re$1[t.COMPARATORLOOSE] : re$1[t.COMPARATOR];
|
|
52
|
+
const m = comp.match(r);
|
|
53
|
+
|
|
54
|
+
if (!m) {
|
|
55
|
+
throw new TypeError(`Invalid comparator: ${comp}`)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
this.operator = m[1] !== undefined ? m[1] : '';
|
|
59
|
+
if (this.operator === '=') {
|
|
60
|
+
this.operator = '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// if it literally is just '>' or '' then allow anything.
|
|
64
|
+
if (!m[2]) {
|
|
65
|
+
this.semver = ANY;
|
|
66
|
+
} else {
|
|
67
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
toString () {
|
|
72
|
+
return this.value
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
test (version) {
|
|
76
|
+
debug$1('Comparator.test', version, this.options.loose);
|
|
77
|
+
|
|
78
|
+
if (this.semver === ANY || version === ANY) {
|
|
79
|
+
return true
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (typeof version === 'string') {
|
|
83
|
+
try {
|
|
84
|
+
version = new SemVer(version, this.options);
|
|
85
|
+
} catch (er) {
|
|
86
|
+
return false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return cmp$1(version, this.operator, this.semver, this.options)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
intersects (comp, options) {
|
|
94
|
+
if (!(comp instanceof Comparator)) {
|
|
95
|
+
throw new TypeError('a Comparator is required')
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (this.operator === '') {
|
|
99
|
+
if (this.value === '') {
|
|
100
|
+
return true
|
|
101
|
+
}
|
|
102
|
+
return new Range(comp.value, options).test(this.value)
|
|
103
|
+
} else if (comp.operator === '') {
|
|
104
|
+
if (comp.value === '') {
|
|
105
|
+
return true
|
|
106
|
+
}
|
|
107
|
+
return new Range(this.value, options).test(comp.semver)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
options = parseOptions$1(options);
|
|
111
|
+
|
|
112
|
+
// Special cases where nothing can possibly be lower
|
|
113
|
+
if (options.includePrerelease &&
|
|
114
|
+
(this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
|
|
115
|
+
return false
|
|
116
|
+
}
|
|
117
|
+
if (!options.includePrerelease &&
|
|
118
|
+
(this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
|
|
119
|
+
return false
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Same direction increasing (> or >=)
|
|
123
|
+
if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
|
|
124
|
+
return true
|
|
125
|
+
}
|
|
126
|
+
// Same direction decreasing (< or <=)
|
|
127
|
+
if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
|
|
128
|
+
return true
|
|
129
|
+
}
|
|
130
|
+
// same SemVer and both sides are inclusive (<= or >=)
|
|
131
|
+
if (
|
|
132
|
+
(this.semver.version === comp.semver.version) &&
|
|
133
|
+
this.operator.includes('=') && comp.operator.includes('=')) {
|
|
134
|
+
return true
|
|
135
|
+
}
|
|
136
|
+
// opposite directions less than
|
|
137
|
+
if (cmp$1(this.semver, '<', comp.semver, options) &&
|
|
138
|
+
this.operator.startsWith('>') && comp.operator.startsWith('<')) {
|
|
139
|
+
return true
|
|
140
|
+
}
|
|
141
|
+
// opposite directions greater than
|
|
142
|
+
if (cmp$1(this.semver, '>', comp.semver, options) &&
|
|
143
|
+
this.operator.startsWith('<') && comp.operator.startsWith('>')) {
|
|
144
|
+
return true
|
|
145
|
+
}
|
|
146
|
+
return false
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
comparator = Comparator;
|
|
151
|
+
|
|
152
|
+
const parseOptions$1 = parseOptions.__require();
|
|
153
|
+
const { safeRe: re$1, t } = re.__require();
|
|
154
|
+
const cmp$1 = cmp.__require();
|
|
155
|
+
const debug$1 = debug.__require();
|
|
156
|
+
const SemVer = semver.__require();
|
|
157
|
+
const Range = range.__require();
|
|
158
|
+
return comparator;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
exports.__require = requireComparator;
|