@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,97 +0,0 @@
|
|
|
1
|
-
const BREAK = Symbol('break visit');
|
|
2
|
-
const SKIP = Symbol('skip children');
|
|
3
|
-
const REMOVE = Symbol('remove item');
|
|
4
|
-
/**
|
|
5
|
-
* Apply a visitor to a CST document or item.
|
|
6
|
-
*
|
|
7
|
-
* Walks through the tree (depth-first) starting from the root, calling a
|
|
8
|
-
* `visitor` function with two arguments when entering each item:
|
|
9
|
-
* - `item`: The current item, which included the following members:
|
|
10
|
-
* - `start: SourceToken[]` – Source tokens before the key or value,
|
|
11
|
-
* possibly including its anchor or tag.
|
|
12
|
-
* - `key?: Token | null` – Set for pair values. May then be `null`, if
|
|
13
|
-
* the key before the `:` separator is empty.
|
|
14
|
-
* - `sep?: SourceToken[]` – Source tokens between the key and the value,
|
|
15
|
-
* which should include the `:` map value indicator if `value` is set.
|
|
16
|
-
* - `value?: Token` – The value of a sequence item, or of a map pair.
|
|
17
|
-
* - `path`: The steps from the root to the current node, as an array of
|
|
18
|
-
* `['key' | 'value', number]` tuples.
|
|
19
|
-
*
|
|
20
|
-
* The return value of the visitor may be used to control the traversal:
|
|
21
|
-
* - `undefined` (default): Do nothing and continue
|
|
22
|
-
* - `visit.SKIP`: Do not visit the children of this token, continue with
|
|
23
|
-
* next sibling
|
|
24
|
-
* - `visit.BREAK`: Terminate traversal completely
|
|
25
|
-
* - `visit.REMOVE`: Remove the current item, then continue with the next one
|
|
26
|
-
* - `number`: Set the index of the next step. This is useful especially if
|
|
27
|
-
* the index of the current token has changed.
|
|
28
|
-
* - `function`: Define the next visitor for this item. After the original
|
|
29
|
-
* visitor is called on item entry, next visitors are called after handling
|
|
30
|
-
* a non-empty `key` and when exiting the item.
|
|
31
|
-
*/
|
|
32
|
-
function visit(cst, visitor) {
|
|
33
|
-
if ('type' in cst && cst.type === 'document')
|
|
34
|
-
cst = { start: cst.start, value: cst.value };
|
|
35
|
-
_visit(Object.freeze([]), cst, visitor);
|
|
36
|
-
}
|
|
37
|
-
// Without the `as symbol` casts, TS declares these in the `visit`
|
|
38
|
-
// namespace using `var`, but then complains about that because
|
|
39
|
-
// `unique symbol` must be `const`.
|
|
40
|
-
/** Terminate visit traversal completely */
|
|
41
|
-
visit.BREAK = BREAK;
|
|
42
|
-
/** Do not visit the children of the current item */
|
|
43
|
-
visit.SKIP = SKIP;
|
|
44
|
-
/** Remove the current item */
|
|
45
|
-
visit.REMOVE = REMOVE;
|
|
46
|
-
/** Find the item at `path` from `cst` as the root */
|
|
47
|
-
visit.itemAtPath = (cst, path) => {
|
|
48
|
-
let item = cst;
|
|
49
|
-
for (const [field, index] of path) {
|
|
50
|
-
const tok = item?.[field];
|
|
51
|
-
if (tok && 'items' in tok) {
|
|
52
|
-
item = tok.items[index];
|
|
53
|
-
}
|
|
54
|
-
else
|
|
55
|
-
return undefined;
|
|
56
|
-
}
|
|
57
|
-
return item;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Get the immediate parent collection of the item at `path` from `cst` as the root.
|
|
61
|
-
*
|
|
62
|
-
* Throws an error if the collection is not found, which should never happen if the item itself exists.
|
|
63
|
-
*/
|
|
64
|
-
visit.parentCollection = (cst, path) => {
|
|
65
|
-
const parent = visit.itemAtPath(cst, path.slice(0, -1));
|
|
66
|
-
const field = path[path.length - 1][0];
|
|
67
|
-
const coll = parent?.[field];
|
|
68
|
-
if (coll && 'items' in coll)
|
|
69
|
-
return coll;
|
|
70
|
-
throw new Error('Parent collection not found');
|
|
71
|
-
};
|
|
72
|
-
function _visit(path, item, visitor) {
|
|
73
|
-
let ctrl = visitor(item, path);
|
|
74
|
-
if (typeof ctrl === 'symbol')
|
|
75
|
-
return ctrl;
|
|
76
|
-
for (const field of ['key', 'value']) {
|
|
77
|
-
const token = item[field];
|
|
78
|
-
if (token && 'items' in token) {
|
|
79
|
-
for (let i = 0; i < token.items.length; ++i) {
|
|
80
|
-
const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
|
|
81
|
-
if (typeof ci === 'number')
|
|
82
|
-
i = ci - 1;
|
|
83
|
-
else if (ci === BREAK)
|
|
84
|
-
return BREAK;
|
|
85
|
-
else if (ci === REMOVE) {
|
|
86
|
-
token.items.splice(i, 1);
|
|
87
|
-
i -= 1;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (typeof ctrl === 'function' && field === 'key')
|
|
91
|
-
ctrl = ctrl(item, path);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export { visit };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js';
|
|
2
|
-
export { stringify } from './cst-stringify.js';
|
|
3
|
-
export { visit } from './cst-visit.js';
|
|
4
|
-
|
|
5
|
-
/** The byte order mark */
|
|
6
|
-
const BOM = '\u{FEFF}';
|
|
7
|
-
/** Start of doc-mode */
|
|
8
|
-
const DOCUMENT = '\x02'; // C0: Start of Text
|
|
9
|
-
/** Unexpected end of flow-mode */
|
|
10
|
-
const FLOW_END = '\x18'; // C0: Cancel
|
|
11
|
-
/** Next token is a scalar value */
|
|
12
|
-
const SCALAR = '\x1f'; // C0: Unit Separator
|
|
13
|
-
/** @returns `true` if `token` is a flow or block collection */
|
|
14
|
-
const isCollection = (token) => !!token && 'items' in token;
|
|
15
|
-
/** @returns `true` if `token` is a flow or block scalar; not an alias */
|
|
16
|
-
const isScalar = (token) => !!token &&
|
|
17
|
-
(token.type === 'scalar' ||
|
|
18
|
-
token.type === 'single-quoted-scalar' ||
|
|
19
|
-
token.type === 'double-quoted-scalar' ||
|
|
20
|
-
token.type === 'block-scalar');
|
|
21
|
-
/* istanbul ignore next */
|
|
22
|
-
/** Get a printable representation of a lexer token */
|
|
23
|
-
function prettyToken(token) {
|
|
24
|
-
switch (token) {
|
|
25
|
-
case BOM:
|
|
26
|
-
return '<BOM>';
|
|
27
|
-
case DOCUMENT:
|
|
28
|
-
return '<DOC>';
|
|
29
|
-
case FLOW_END:
|
|
30
|
-
return '<FLOW_END>';
|
|
31
|
-
case SCALAR:
|
|
32
|
-
return '<SCALAR>';
|
|
33
|
-
default:
|
|
34
|
-
return JSON.stringify(token);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/** Identify the type of a lexer token. May return `null` for unknown tokens. */
|
|
38
|
-
function tokenType(source) {
|
|
39
|
-
switch (source) {
|
|
40
|
-
case BOM:
|
|
41
|
-
return 'byte-order-mark';
|
|
42
|
-
case DOCUMENT:
|
|
43
|
-
return 'doc-mode';
|
|
44
|
-
case FLOW_END:
|
|
45
|
-
return 'flow-error-end';
|
|
46
|
-
case SCALAR:
|
|
47
|
-
return 'scalar';
|
|
48
|
-
case '---':
|
|
49
|
-
return 'doc-start';
|
|
50
|
-
case '...':
|
|
51
|
-
return 'doc-end';
|
|
52
|
-
case '':
|
|
53
|
-
case '\n':
|
|
54
|
-
case '\r\n':
|
|
55
|
-
return 'newline';
|
|
56
|
-
case '-':
|
|
57
|
-
return 'seq-item-ind';
|
|
58
|
-
case '?':
|
|
59
|
-
return 'explicit-key-ind';
|
|
60
|
-
case ':':
|
|
61
|
-
return 'map-value-ind';
|
|
62
|
-
case '{':
|
|
63
|
-
return 'flow-map-start';
|
|
64
|
-
case '}':
|
|
65
|
-
return 'flow-map-end';
|
|
66
|
-
case '[':
|
|
67
|
-
return 'flow-seq-start';
|
|
68
|
-
case ']':
|
|
69
|
-
return 'flow-seq-end';
|
|
70
|
-
case ',':
|
|
71
|
-
return 'comma';
|
|
72
|
-
}
|
|
73
|
-
switch (source[0]) {
|
|
74
|
-
case ' ':
|
|
75
|
-
case '\t':
|
|
76
|
-
return 'space';
|
|
77
|
-
case '#':
|
|
78
|
-
return 'comment';
|
|
79
|
-
case '%':
|
|
80
|
-
return 'directive-line';
|
|
81
|
-
case '*':
|
|
82
|
-
return 'alias';
|
|
83
|
-
case '&':
|
|
84
|
-
return 'anchor';
|
|
85
|
-
case '!':
|
|
86
|
-
return 'tag';
|
|
87
|
-
case "'":
|
|
88
|
-
return 'single-quoted-scalar';
|
|
89
|
-
case '"':
|
|
90
|
-
return 'double-quoted-scalar';
|
|
91
|
-
case '|':
|
|
92
|
-
case '>':
|
|
93
|
-
return 'block-scalar-header';
|
|
94
|
-
}
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export { BOM, DOCUMENT, FLOW_END, SCALAR, isCollection, isScalar, prettyToken, tokenType };
|