@capyclaw/publisher 0.1.3 → 0.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/package.json +3 -11
- package/server/archive.mjs +69 -35
- package/server/drop.mjs +9 -3
- package/server/impl.mjs +133 -97
- package/server/tools.mjs +1 -1
- package/node_modules/@capyclaw/foundation/README.md +0 -51
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +0 -86
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +0 -63
- package/node_modules/@capyclaw/foundation/abi/index.mjs +0 -35
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +0 -271
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +0 -345
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +0 -98
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +0 -255
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +0 -24
- package/node_modules/@capyclaw/foundation/abi/version.mjs +0 -82
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +0 -5
- package/node_modules/@capyclaw/foundation/kit/index.mjs +0 -6
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +0 -98
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +0 -35
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +0 -69
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +0 -55
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +0 -113
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +0 -68
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +0 -113
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +0 -77
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +0 -56
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +0 -50
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +0 -64
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +0 -42
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +0 -34
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +0 -85
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +0 -50
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +0 -160
- package/node_modules/@capyclaw/foundation/lib/host.mjs +0 -23
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +0 -185
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +0 -87
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +0 -60
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +0 -51
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +0 -188
- package/node_modules/@capyclaw/foundation/package.json +0 -53
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +0 -20
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +0 -100
- package/node_modules/@capyclaw/plugin-kit/README.md +0 -70
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +0 -103
- package/node_modules/@capyclaw/plugin-kit/package.json +0 -69
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +0 -56
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +0 -142
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +0 -129
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +0 -139
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +0 -219
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +0 -13
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +0 -13
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +0 -230
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +0 -128
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +0 -307
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +0 -45
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +0 -113
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +0 -150
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +0 -131
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +0 -82
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +0 -109
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +0 -17
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +0 -89
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +0 -57
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +0 -150
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +0 -82
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +0 -132
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +0 -130
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +0 -656
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +0 -181
- package/node_modules/@capyclaw/plugin-validator/bin/cli.mjs +0 -49
- package/node_modules/@capyclaw/plugin-validator/lib/index.mjs +0 -303
- package/node_modules/@capyclaw/plugin-validator/package.json +0 -28
- package/node_modules/@capyclaw/tool-host/README.md +0 -56
- package/node_modules/@capyclaw/tool-host/cordis.patch.yml +0 -4
- package/node_modules/@capyclaw/tool-host/dsh-suite.json +0 -30
- package/node_modules/@capyclaw/tool-host/lib/host.mjs +0 -16
- package/node_modules/@capyclaw/tool-host/package.json +0 -59
- package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +0 -166
- package/node_modules/@capyclaw/tool-host/src/index.mjs +0 -416
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -680
- package/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -577
- package/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- package/node_modules/semver/internal/constants.js +0 -67
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/internal/trim-comparator-whitespace.js +0 -438
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -17
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/yaml/LICENSE +0 -13
- package/node_modules/yaml/README.md +0 -172
- package/node_modules/yaml/bin.mjs +0 -11
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -88
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -43
- package/node_modules/yaml/browser/dist/compose/compose-node.js +0 -109
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -86
- package/node_modules/yaml/browser/dist/compose/composer.js +0 -219
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -115
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -198
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -49
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -37
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -207
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -226
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -146
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -34
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -26
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -15
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -13
- package/node_modules/yaml/browser/dist/doc/Document.js +0 -335
- package/node_modules/yaml/browser/dist/doc/anchors.js +0 -71
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -55
- package/node_modules/yaml/browser/dist/doc/createNode.js +0 -88
- package/node_modules/yaml/browser/dist/doc/directives.js +0 -176
- package/node_modules/yaml/browser/dist/errors.js +0 -57
- package/node_modules/yaml/browser/dist/index.js +0 -17
- package/node_modules/yaml/browser/dist/log.js +0 -11
- package/node_modules/yaml/browser/dist/nodes/Alias.js +0 -118
- package/node_modules/yaml/browser/dist/nodes/Collection.js +0 -147
- package/node_modules/yaml/browser/dist/nodes/Node.js +0 -38
- package/node_modules/yaml/browser/dist/nodes/Pair.js +0 -36
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -24
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -144
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -113
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -63
- package/node_modules/yaml/browser/dist/nodes/identity.js +0 -36
- package/node_modules/yaml/browser/dist/nodes/toJS.js +0 -37
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -214
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +0 -61
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +0 -97
- package/node_modules/yaml/browser/dist/parse/cst.js +0 -98
- package/node_modules/yaml/browser/dist/parse/lexer.js +0 -721
- package/node_modules/yaml/browser/dist/parse/line-counter.js +0 -39
- package/node_modules/yaml/browser/dist/parse/parser.js +0 -975
- package/node_modules/yaml/browser/dist/public-api.js +0 -102
- package/node_modules/yaml/browser/dist/schema/Schema.js +0 -37
- package/node_modules/yaml/browser/dist/schema/common/map.js +0 -17
- package/node_modules/yaml/browser/dist/schema/common/null.js +0 -15
- package/node_modules/yaml/browser/dist/schema/common/seq.js +0 -17
- package/node_modules/yaml/browser/dist/schema/common/string.js +0 -14
- package/node_modules/yaml/browser/dist/schema/core/bool.js +0 -19
- package/node_modules/yaml/browser/dist/schema/core/float.js +0 -43
- package/node_modules/yaml/browser/dist/schema/core/int.js +0 -38
- package/node_modules/yaml/browser/dist/schema/core/schema.js +0 -23
- package/node_modules/yaml/browser/dist/schema/json/schema.js +0 -62
- package/node_modules/yaml/browser/dist/schema/tags.js +0 -96
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -58
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -26
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -46
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -71
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -67
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -74
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -78
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -39
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -93
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -101
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -146
- package/node_modules/yaml/browser/dist/stringify/stringify.js +0 -129
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -153
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -20
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -85
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -25
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -150
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -336
- package/node_modules/yaml/browser/dist/util.js +0 -11
- package/node_modules/yaml/browser/dist/visit.js +0 -233
- package/node_modules/yaml/browser/index.js +0 -5
- package/node_modules/yaml/browser/package.json +0 -3
- package/node_modules/yaml/dist/cli.d.ts +0 -8
- package/node_modules/yaml/dist/cli.mjs +0 -201
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +0 -11
- package/node_modules/yaml/dist/compose/compose-collection.js +0 -90
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +0 -7
- package/node_modules/yaml/dist/compose/compose-doc.js +0 -45
- package/node_modules/yaml/dist/compose/compose-node.d.ts +0 -29
- package/node_modules/yaml/dist/compose/compose-node.js +0 -112
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +0 -5
- package/node_modules/yaml/dist/compose/compose-scalar.js +0 -88
- package/node_modules/yaml/dist/compose/composer.d.ts +0 -63
- package/node_modules/yaml/dist/compose/composer.js +0 -224
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +0 -6
- package/node_modules/yaml/dist/compose/resolve-block-map.js +0 -117
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +0 -11
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +0 -200
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +0 -6
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +0 -51
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +0 -6
- package/node_modules/yaml/dist/compose/resolve-end.js +0 -39
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +0 -7
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +0 -209
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +0 -10
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +0 -228
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +0 -23
- package/node_modules/yaml/dist/compose/resolve-props.js +0 -148
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +0 -2
- package/node_modules/yaml/dist/compose/util-contains-newline.js +0 -36
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +0 -2
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +0 -28
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +0 -3
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +0 -17
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +0 -4
- package/node_modules/yaml/dist/compose/util-map-includes.js +0 -15
- package/node_modules/yaml/dist/doc/Document.d.ts +0 -141
- package/node_modules/yaml/dist/doc/Document.js +0 -337
- package/node_modules/yaml/dist/doc/anchors.d.ts +0 -24
- package/node_modules/yaml/dist/doc/anchors.js +0 -76
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +0 -9
- package/node_modules/yaml/dist/doc/applyReviver.js +0 -57
- package/node_modules/yaml/dist/doc/createNode.d.ts +0 -17
- package/node_modules/yaml/dist/doc/createNode.js +0 -90
- package/node_modules/yaml/dist/doc/directives.d.ts +0 -49
- package/node_modules/yaml/dist/doc/directives.js +0 -178
- package/node_modules/yaml/dist/errors.d.ts +0 -21
- package/node_modules/yaml/dist/errors.js +0 -62
- package/node_modules/yaml/dist/index.d.ts +0 -25
- package/node_modules/yaml/dist/index.js +0 -50
- package/node_modules/yaml/dist/log.d.ts +0 -3
- package/node_modules/yaml/dist/log.js +0 -19
- package/node_modules/yaml/dist/nodes/Alias.d.ts +0 -29
- package/node_modules/yaml/dist/nodes/Alias.js +0 -120
- package/node_modules/yaml/dist/nodes/Collection.d.ts +0 -73
- package/node_modules/yaml/dist/nodes/Collection.js +0 -151
- package/node_modules/yaml/dist/nodes/Node.d.ts +0 -53
- package/node_modules/yaml/dist/nodes/Node.js +0 -40
- package/node_modules/yaml/dist/nodes/Pair.d.ts +0 -22
- package/node_modules/yaml/dist/nodes/Pair.js +0 -39
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +0 -47
- package/node_modules/yaml/dist/nodes/Scalar.js +0 -27
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +0 -53
- package/node_modules/yaml/dist/nodes/YAMLMap.js +0 -147
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +0 -60
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +0 -115
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +0 -4
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +0 -65
- package/node_modules/yaml/dist/nodes/identity.d.ts +0 -23
- package/node_modules/yaml/dist/nodes/identity.js +0 -53
- package/node_modules/yaml/dist/nodes/toJS.d.ts +0 -29
- package/node_modules/yaml/dist/nodes/toJS.js +0 -39
- package/node_modules/yaml/dist/options.d.ts +0 -350
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +0 -64
- package/node_modules/yaml/dist/parse/cst-scalar.js +0 -218
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +0 -8
- package/node_modules/yaml/dist/parse/cst-stringify.js +0 -63
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +0 -39
- package/node_modules/yaml/dist/parse/cst-visit.js +0 -99
- package/node_modules/yaml/dist/parse/cst.d.ts +0 -109
- package/node_modules/yaml/dist/parse/cst.js +0 -112
- package/node_modules/yaml/dist/parse/lexer.d.ts +0 -87
- package/node_modules/yaml/dist/parse/lexer.js +0 -723
- package/node_modules/yaml/dist/parse/line-counter.d.ts +0 -22
- package/node_modules/yaml/dist/parse/line-counter.js +0 -41
- package/node_modules/yaml/dist/parse/parser.d.ts +0 -84
- package/node_modules/yaml/dist/parse/parser.js +0 -980
- package/node_modules/yaml/dist/public-api.d.ts +0 -44
- package/node_modules/yaml/dist/public-api.js +0 -107
- package/node_modules/yaml/dist/schema/Schema.d.ts +0 -17
- package/node_modules/yaml/dist/schema/Schema.js +0 -39
- package/node_modules/yaml/dist/schema/common/map.d.ts +0 -2
- package/node_modules/yaml/dist/schema/common/map.js +0 -19
- package/node_modules/yaml/dist/schema/common/null.d.ts +0 -4
- package/node_modules/yaml/dist/schema/common/null.js +0 -17
- package/node_modules/yaml/dist/schema/common/seq.d.ts +0 -2
- package/node_modules/yaml/dist/schema/common/seq.js +0 -19
- package/node_modules/yaml/dist/schema/common/string.d.ts +0 -2
- package/node_modules/yaml/dist/schema/common/string.js +0 -16
- package/node_modules/yaml/dist/schema/core/bool.d.ts +0 -4
- package/node_modules/yaml/dist/schema/core/bool.js +0 -21
- package/node_modules/yaml/dist/schema/core/float.d.ts +0 -4
- package/node_modules/yaml/dist/schema/core/float.js +0 -47
- package/node_modules/yaml/dist/schema/core/int.d.ts +0 -4
- package/node_modules/yaml/dist/schema/core/int.js +0 -42
- package/node_modules/yaml/dist/schema/core/schema.d.ts +0 -1
- package/node_modules/yaml/dist/schema/core/schema.js +0 -25
- package/node_modules/yaml/dist/schema/json/schema.d.ts +0 -2
- package/node_modules/yaml/dist/schema/json/schema.js +0 -64
- package/node_modules/yaml/dist/schema/json-schema.d.ts +0 -69
- package/node_modules/yaml/dist/schema/tags.d.ts +0 -48
- package/node_modules/yaml/dist/schema/tags.js +0 -99
- package/node_modules/yaml/dist/schema/types.d.ts +0 -92
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +0 -2
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +0 -70
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +0 -7
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +0 -29
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +0 -4
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +0 -50
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +0 -5
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +0 -76
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +0 -9
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +0 -71
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +0 -22
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +0 -77
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +0 -10
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +0 -82
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +0 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +0 -41
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +0 -28
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +0 -96
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +0 -6
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +0 -105
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +0 -34
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +0 -151
- package/node_modules/yaml/dist/stringify/stringify.d.ts +0 -21
- package/node_modules/yaml/dist/stringify/stringify.js +0 -132
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +0 -17
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +0 -155
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +0 -10
- package/node_modules/yaml/dist/stringify/stringifyComment.js +0 -24
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +0 -4
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +0 -87
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +0 -2
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +0 -27
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +0 -3
- package/node_modules/yaml/dist/stringify/stringifyPair.js +0 -152
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +0 -9
- package/node_modules/yaml/dist/stringify/stringifyString.js +0 -338
- package/node_modules/yaml/dist/test-events.d.ts +0 -4
- package/node_modules/yaml/dist/test-events.js +0 -134
- package/node_modules/yaml/dist/util.d.ts +0 -16
- package/node_modules/yaml/dist/util.js +0 -28
- package/node_modules/yaml/dist/visit.d.ts +0 -102
- package/node_modules/yaml/dist/visit.js +0 -236
- package/node_modules/yaml/package.json +0 -97
- package/node_modules/yaml/util.js +0 -2
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const debug = require('../internal/debug')
|
|
4
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
|
|
5
|
-
const { safeRe: re, t } = require('../internal/re')
|
|
6
|
-
|
|
7
|
-
const parseOptions = require('../internal/parse-options')
|
|
8
|
-
const { compareIdentifiers } = require('../internal/identifiers')
|
|
9
|
-
|
|
10
|
-
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
11
|
-
const identifiers = identifier.split('.')
|
|
12
|
-
if (identifiers.length > prerelease.length) {
|
|
13
|
-
return false
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
for (let i = 0; i < identifiers.length; i++) {
|
|
17
|
-
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
18
|
-
return false
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return true
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
class SemVer {
|
|
26
|
-
constructor (version, options) {
|
|
27
|
-
options = parseOptions(options)
|
|
28
|
-
|
|
29
|
-
if (version instanceof SemVer) {
|
|
30
|
-
if (version.loose === !!options.loose &&
|
|
31
|
-
version.includePrerelease === !!options.includePrerelease) {
|
|
32
|
-
return version
|
|
33
|
-
} else {
|
|
34
|
-
version = version.version
|
|
35
|
-
}
|
|
36
|
-
} else if (typeof version !== 'string') {
|
|
37
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (version.length > MAX_LENGTH) {
|
|
41
|
-
throw new TypeError(
|
|
42
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
debug('SemVer', version, options)
|
|
47
|
-
this.options = options
|
|
48
|
-
this.loose = !!options.loose
|
|
49
|
-
// this isn't actually relevant for versions, but keep it so that we
|
|
50
|
-
// don't run into trouble passing this.options around.
|
|
51
|
-
this.includePrerelease = !!options.includePrerelease
|
|
52
|
-
|
|
53
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
|
54
|
-
|
|
55
|
-
if (!m) {
|
|
56
|
-
throw new TypeError(`Invalid Version: ${version}`)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
this.raw = version
|
|
60
|
-
|
|
61
|
-
// these are actually numbers
|
|
62
|
-
this.major = +m[1]
|
|
63
|
-
this.minor = +m[2]
|
|
64
|
-
this.patch = +m[3]
|
|
65
|
-
|
|
66
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
67
|
-
throw new TypeError('Invalid major version')
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
71
|
-
throw new TypeError('Invalid minor version')
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
75
|
-
throw new TypeError('Invalid patch version')
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// numberify any prerelease numeric ids
|
|
79
|
-
if (!m[4]) {
|
|
80
|
-
this.prerelease = []
|
|
81
|
-
} else {
|
|
82
|
-
this.prerelease = m[4].split('.').map((id) => {
|
|
83
|
-
if (/^[0-9]+$/.test(id)) {
|
|
84
|
-
const num = +id
|
|
85
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
86
|
-
return num
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return id
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
this.build = m[5] ? m[5].split('.') : []
|
|
94
|
-
this.format()
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
format () {
|
|
98
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`
|
|
99
|
-
if (this.prerelease.length) {
|
|
100
|
-
this.version += `-${this.prerelease.join('.')}`
|
|
101
|
-
}
|
|
102
|
-
return this.version
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
toString () {
|
|
106
|
-
return this.version
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
compare (other) {
|
|
110
|
-
debug('SemVer.compare', this.version, this.options, other)
|
|
111
|
-
if (!(other instanceof SemVer)) {
|
|
112
|
-
if (typeof other === 'string' && other === this.version) {
|
|
113
|
-
return 0
|
|
114
|
-
}
|
|
115
|
-
other = new SemVer(other, this.options)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (other.version === this.version) {
|
|
119
|
-
return 0
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return this.compareMain(other) || this.comparePre(other)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
compareMain (other) {
|
|
126
|
-
if (!(other instanceof SemVer)) {
|
|
127
|
-
other = new SemVer(other, this.options)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (this.major < other.major) {
|
|
131
|
-
return -1
|
|
132
|
-
}
|
|
133
|
-
if (this.major > other.major) {
|
|
134
|
-
return 1
|
|
135
|
-
}
|
|
136
|
-
if (this.minor < other.minor) {
|
|
137
|
-
return -1
|
|
138
|
-
}
|
|
139
|
-
if (this.minor > other.minor) {
|
|
140
|
-
return 1
|
|
141
|
-
}
|
|
142
|
-
if (this.patch < other.patch) {
|
|
143
|
-
return -1
|
|
144
|
-
}
|
|
145
|
-
if (this.patch > other.patch) {
|
|
146
|
-
return 1
|
|
147
|
-
}
|
|
148
|
-
return 0
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
comparePre (other) {
|
|
152
|
-
if (!(other instanceof SemVer)) {
|
|
153
|
-
other = new SemVer(other, this.options)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// NOT having a prerelease is > having one
|
|
157
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
158
|
-
return -1
|
|
159
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
160
|
-
return 1
|
|
161
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
162
|
-
return 0
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
let i = 0
|
|
166
|
-
do {
|
|
167
|
-
const a = this.prerelease[i]
|
|
168
|
-
const b = other.prerelease[i]
|
|
169
|
-
debug('prerelease compare', i, a, b)
|
|
170
|
-
if (a === undefined && b === undefined) {
|
|
171
|
-
return 0
|
|
172
|
-
} else if (b === undefined) {
|
|
173
|
-
return 1
|
|
174
|
-
} else if (a === undefined) {
|
|
175
|
-
return -1
|
|
176
|
-
} else if (a === b) {
|
|
177
|
-
continue
|
|
178
|
-
} else {
|
|
179
|
-
return compareIdentifiers(a, b)
|
|
180
|
-
}
|
|
181
|
-
} while (++i)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
compareBuild (other) {
|
|
185
|
-
if (!(other instanceof SemVer)) {
|
|
186
|
-
other = new SemVer(other, this.options)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
let i = 0
|
|
190
|
-
do {
|
|
191
|
-
const a = this.build[i]
|
|
192
|
-
const b = other.build[i]
|
|
193
|
-
debug('build compare', i, a, b)
|
|
194
|
-
if (a === undefined && b === undefined) {
|
|
195
|
-
return 0
|
|
196
|
-
} else if (b === undefined) {
|
|
197
|
-
return 1
|
|
198
|
-
} else if (a === undefined) {
|
|
199
|
-
return -1
|
|
200
|
-
} else if (a === b) {
|
|
201
|
-
continue
|
|
202
|
-
} else {
|
|
203
|
-
return compareIdentifiers(a, b)
|
|
204
|
-
}
|
|
205
|
-
} while (++i)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
209
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
210
|
-
inc (release, identifier, identifierBase) {
|
|
211
|
-
if (release.startsWith('pre')) {
|
|
212
|
-
if (!identifier && identifierBase === false) {
|
|
213
|
-
throw new Error('invalid increment argument: identifier is empty')
|
|
214
|
-
}
|
|
215
|
-
// Avoid an invalid semver results
|
|
216
|
-
if (identifier) {
|
|
217
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
|
|
218
|
-
if (!match || match[1] !== identifier) {
|
|
219
|
-
throw new Error(`invalid identifier: ${identifier}`)
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
switch (release) {
|
|
225
|
-
case 'premajor':
|
|
226
|
-
this.prerelease.length = 0
|
|
227
|
-
this.patch = 0
|
|
228
|
-
this.minor = 0
|
|
229
|
-
this.major++
|
|
230
|
-
this.inc('pre', identifier, identifierBase)
|
|
231
|
-
break
|
|
232
|
-
case 'preminor':
|
|
233
|
-
this.prerelease.length = 0
|
|
234
|
-
this.patch = 0
|
|
235
|
-
this.minor++
|
|
236
|
-
this.inc('pre', identifier, identifierBase)
|
|
237
|
-
break
|
|
238
|
-
case 'prepatch':
|
|
239
|
-
// If this is already a prerelease, it will bump to the next version
|
|
240
|
-
// drop any prereleases that might already exist, since they are not
|
|
241
|
-
// relevant at this point.
|
|
242
|
-
this.prerelease.length = 0
|
|
243
|
-
this.inc('patch', identifier, identifierBase)
|
|
244
|
-
this.inc('pre', identifier, identifierBase)
|
|
245
|
-
break
|
|
246
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
247
|
-
// prepatch.
|
|
248
|
-
case 'prerelease':
|
|
249
|
-
if (this.prerelease.length === 0) {
|
|
250
|
-
this.inc('patch', identifier, identifierBase)
|
|
251
|
-
}
|
|
252
|
-
this.inc('pre', identifier, identifierBase)
|
|
253
|
-
break
|
|
254
|
-
case 'release':
|
|
255
|
-
if (this.prerelease.length === 0) {
|
|
256
|
-
throw new Error(`version ${this.raw} is not a prerelease`)
|
|
257
|
-
}
|
|
258
|
-
this.prerelease.length = 0
|
|
259
|
-
break
|
|
260
|
-
|
|
261
|
-
case 'major':
|
|
262
|
-
// If this is a pre-major version, bump up to the same major version.
|
|
263
|
-
// Otherwise increment major.
|
|
264
|
-
// 1.0.0-5 bumps to 1.0.0
|
|
265
|
-
// 1.1.0 bumps to 2.0.0
|
|
266
|
-
if (
|
|
267
|
-
this.minor !== 0 ||
|
|
268
|
-
this.patch !== 0 ||
|
|
269
|
-
this.prerelease.length === 0
|
|
270
|
-
) {
|
|
271
|
-
this.major++
|
|
272
|
-
}
|
|
273
|
-
this.minor = 0
|
|
274
|
-
this.patch = 0
|
|
275
|
-
this.prerelease = []
|
|
276
|
-
break
|
|
277
|
-
case 'minor':
|
|
278
|
-
// If this is a pre-minor version, bump up to the same minor version.
|
|
279
|
-
// Otherwise increment minor.
|
|
280
|
-
// 1.2.0-5 bumps to 1.2.0
|
|
281
|
-
// 1.2.1 bumps to 1.3.0
|
|
282
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
283
|
-
this.minor++
|
|
284
|
-
}
|
|
285
|
-
this.patch = 0
|
|
286
|
-
this.prerelease = []
|
|
287
|
-
break
|
|
288
|
-
case 'patch':
|
|
289
|
-
// If this is not a pre-release version, it will increment the patch.
|
|
290
|
-
// If it is a pre-release it will bump up to the same patch version.
|
|
291
|
-
// 1.2.0-5 patches to 1.2.0
|
|
292
|
-
// 1.2.0 patches to 1.2.1
|
|
293
|
-
if (this.prerelease.length === 0) {
|
|
294
|
-
this.patch++
|
|
295
|
-
}
|
|
296
|
-
this.prerelease = []
|
|
297
|
-
break
|
|
298
|
-
// This probably shouldn't be used publicly.
|
|
299
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
300
|
-
case 'pre': {
|
|
301
|
-
const base = Number(identifierBase) ? 1 : 0
|
|
302
|
-
|
|
303
|
-
if (this.prerelease.length === 0) {
|
|
304
|
-
this.prerelease = [base]
|
|
305
|
-
} else {
|
|
306
|
-
let i = this.prerelease.length
|
|
307
|
-
while (--i >= 0) {
|
|
308
|
-
if (typeof this.prerelease[i] === 'number') {
|
|
309
|
-
this.prerelease[i]++
|
|
310
|
-
i = -2
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
if (i === -1) {
|
|
314
|
-
// didn't increment anything
|
|
315
|
-
if (identifier === this.prerelease.join('.') && identifierBase === false) {
|
|
316
|
-
throw new Error('invalid increment argument: identifier already exists')
|
|
317
|
-
}
|
|
318
|
-
this.prerelease.push(base)
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
if (identifier) {
|
|
322
|
-
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
323
|
-
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
324
|
-
let prerelease = [identifier, base]
|
|
325
|
-
if (identifierBase === false) {
|
|
326
|
-
prerelease = [identifier]
|
|
327
|
-
}
|
|
328
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
329
|
-
const prereleaseBase = this.prerelease[identifier.split('.').length]
|
|
330
|
-
if (isNaN(prereleaseBase)) {
|
|
331
|
-
this.prerelease = prerelease
|
|
332
|
-
}
|
|
333
|
-
} else {
|
|
334
|
-
this.prerelease = prerelease
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
break
|
|
338
|
-
}
|
|
339
|
-
default:
|
|
340
|
-
throw new Error(`invalid increment argument: ${release}`)
|
|
341
|
-
}
|
|
342
|
-
this.raw = this.format()
|
|
343
|
-
if (this.build.length) {
|
|
344
|
-
this.raw += `+${this.build.join('.')}`
|
|
345
|
-
}
|
|
346
|
-
return this
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
module.exports = SemVer
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const eq = require('./eq')
|
|
4
|
-
const neq = require('./neq')
|
|
5
|
-
const gt = require('./gt')
|
|
6
|
-
const gte = require('./gte')
|
|
7
|
-
const lt = require('./lt')
|
|
8
|
-
const lte = require('./lte')
|
|
9
|
-
|
|
10
|
-
const cmp = (a, op, b, loose) => {
|
|
11
|
-
switch (op) {
|
|
12
|
-
case '===':
|
|
13
|
-
if (typeof a === 'object') {
|
|
14
|
-
a = a.version
|
|
15
|
-
}
|
|
16
|
-
if (typeof b === 'object') {
|
|
17
|
-
b = b.version
|
|
18
|
-
}
|
|
19
|
-
return a === b
|
|
20
|
-
|
|
21
|
-
case '!==':
|
|
22
|
-
if (typeof a === 'object') {
|
|
23
|
-
a = a.version
|
|
24
|
-
}
|
|
25
|
-
if (typeof b === 'object') {
|
|
26
|
-
b = b.version
|
|
27
|
-
}
|
|
28
|
-
return a !== b
|
|
29
|
-
|
|
30
|
-
case '':
|
|
31
|
-
case '=':
|
|
32
|
-
case '==':
|
|
33
|
-
return eq(a, b, loose)
|
|
34
|
-
|
|
35
|
-
case '!=':
|
|
36
|
-
return neq(a, b, loose)
|
|
37
|
-
|
|
38
|
-
case '>':
|
|
39
|
-
return gt(a, b, loose)
|
|
40
|
-
|
|
41
|
-
case '>=':
|
|
42
|
-
return gte(a, b, loose)
|
|
43
|
-
|
|
44
|
-
case '<':
|
|
45
|
-
return lt(a, b, loose)
|
|
46
|
-
|
|
47
|
-
case '<=':
|
|
48
|
-
return lte(a, b, loose)
|
|
49
|
-
|
|
50
|
-
default:
|
|
51
|
-
throw new TypeError(`Invalid operator: ${op}`)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
module.exports = cmp
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const SemVer = require('../classes/semver')
|
|
4
|
-
const parse = require('./parse')
|
|
5
|
-
const { safeRe: re, t } = require('../internal/re')
|
|
6
|
-
|
|
7
|
-
const coerce = (version, options) => {
|
|
8
|
-
if (version instanceof SemVer) {
|
|
9
|
-
return version
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (typeof version === 'number') {
|
|
13
|
-
version = String(version)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (typeof version !== 'string') {
|
|
17
|
-
return null
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
options = options || {}
|
|
21
|
-
|
|
22
|
-
let match = null
|
|
23
|
-
if (!options.rtl) {
|
|
24
|
-
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
|
|
25
|
-
} else {
|
|
26
|
-
// Find the right-most coercible string that does not share
|
|
27
|
-
// a terminus with a more left-ward coercible string.
|
|
28
|
-
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
|
29
|
-
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
|
|
30
|
-
//
|
|
31
|
-
// Walk through the string checking with a /g regexp
|
|
32
|
-
// Manually set the index so as to pick up overlapping matches.
|
|
33
|
-
// Stop when we get a match that ends at the string end, since no
|
|
34
|
-
// coercible string can be more right-ward without the same terminus.
|
|
35
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
|
|
36
|
-
let next
|
|
37
|
-
while ((next = coerceRtlRegex.exec(version)) &&
|
|
38
|
-
(!match || match.index + match[0].length !== version.length)
|
|
39
|
-
) {
|
|
40
|
-
if (!match ||
|
|
41
|
-
next.index + next[0].length !== match.index + match[0].length) {
|
|
42
|
-
match = next
|
|
43
|
-
}
|
|
44
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
|
|
45
|
-
}
|
|
46
|
-
// leave it in a clean state
|
|
47
|
-
coerceRtlRegex.lastIndex = -1
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (match === null) {
|
|
51
|
-
return null
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const major = match[2]
|
|
55
|
-
const minor = match[3] || '0'
|
|
56
|
-
const patch = match[4] || '0'
|
|
57
|
-
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
|
|
58
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
|
|
59
|
-
|
|
60
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
|
61
|
-
}
|
|
62
|
-
module.exports = coerce
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const SemVer = require('../classes/semver')
|
|
4
|
-
const compareBuild = (a, b, loose) => {
|
|
5
|
-
const versionA = new SemVer(a, loose)
|
|
6
|
-
const versionB = new SemVer(b, loose)
|
|
7
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB)
|
|
8
|
-
}
|
|
9
|
-
module.exports = compareBuild
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const parse = require('./parse.js')
|
|
4
|
-
|
|
5
|
-
const diff = (version1, version2) => {
|
|
6
|
-
const v1 = parse(version1, null, true)
|
|
7
|
-
const v2 = parse(version2, null, true)
|
|
8
|
-
const comparison = v1.compare(v2)
|
|
9
|
-
|
|
10
|
-
if (comparison === 0) {
|
|
11
|
-
return null
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const v1Higher = comparison > 0
|
|
15
|
-
const highVersion = v1Higher ? v1 : v2
|
|
16
|
-
const lowVersion = v1Higher ? v2 : v1
|
|
17
|
-
const highHasPre = !!highVersion.prerelease.length
|
|
18
|
-
const lowHasPre = !!lowVersion.prerelease.length
|
|
19
|
-
|
|
20
|
-
if (lowHasPre && !highHasPre) {
|
|
21
|
-
// Going from prerelease -> no prerelease requires some special casing
|
|
22
|
-
|
|
23
|
-
// If the low version has only a major, then it will always be a major
|
|
24
|
-
// Some examples:
|
|
25
|
-
// 1.0.0-1 -> 1.0.0
|
|
26
|
-
// 1.0.0-1 -> 1.1.1
|
|
27
|
-
// 1.0.0-1 -> 2.0.0
|
|
28
|
-
if (!lowVersion.patch && !lowVersion.minor) {
|
|
29
|
-
return 'major'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// If the main part has no difference
|
|
33
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
34
|
-
if (lowVersion.minor && !lowVersion.patch) {
|
|
35
|
-
return 'minor'
|
|
36
|
-
}
|
|
37
|
-
return 'patch'
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// add the `pre` prefix if we are going to a prerelease version
|
|
42
|
-
const prefix = highHasPre ? 'pre' : ''
|
|
43
|
-
|
|
44
|
-
if (v1.major !== v2.major) {
|
|
45
|
-
return prefix + 'major'
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (v1.minor !== v2.minor) {
|
|
49
|
-
return prefix + 'minor'
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (v1.patch !== v2.patch) {
|
|
53
|
-
return prefix + 'patch'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// high and low are prereleases
|
|
57
|
-
return 'prerelease'
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
module.exports = diff
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const SemVer = require('../classes/semver')
|
|
4
|
-
|
|
5
|
-
const inc = (version, release, options, identifier, identifierBase) => {
|
|
6
|
-
if (typeof (options) === 'string') {
|
|
7
|
-
identifierBase = identifier
|
|
8
|
-
identifier = options
|
|
9
|
-
options = undefined
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
return new SemVer(
|
|
14
|
-
version instanceof SemVer ? version.version : version,
|
|
15
|
-
options
|
|
16
|
-
).inc(release, identifier, identifierBase).version
|
|
17
|
-
} catch (er) {
|
|
18
|
-
return null
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
module.exports = inc
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const SemVer = require('../classes/semver')
|
|
4
|
-
const parse = (version, options, throwErrors = false) => {
|
|
5
|
-
if (version instanceof SemVer) {
|
|
6
|
-
return version
|
|
7
|
-
}
|
|
8
|
-
try {
|
|
9
|
-
return new SemVer(version, options)
|
|
10
|
-
} catch (er) {
|
|
11
|
-
if (!throwErrors) {
|
|
12
|
-
return null
|
|
13
|
-
}
|
|
14
|
-
throw er
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = parse
|