projen 0.51.4 → 0.51.8
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/.jsii +69 -9
- package/API.md +12 -1
- package/changelog.md +1 -1
- package/lib/awscdk/auto-discover.js +1 -1
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +9 -2
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose.js +2 -2
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale-util.js +12 -7
- package/lib/github/stale.d.ts +10 -1
- package/lib/github/stale.js +10 -2
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +1 -1
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +3 -3
- package/lib/version.js +1 -1
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.d.ts +13 -0
- package/lib/yaml.js +8 -3
- package/node_modules/{fs-extra/node_modules/universalify → universalify}/LICENSE +0 -0
- package/node_modules/{fs-extra/node_modules/universalify → universalify}/README.md +0 -0
- package/node_modules/{fs-extra/node_modules/universalify → universalify}/index.js +0 -0
- package/node_modules/{fs-extra/node_modules/universalify → universalify}/package.json +0 -0
- package/node_modules/yaml/LICENSE +1 -1
- package/node_modules/yaml/README.md +57 -41
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +59 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +40 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +81 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +81 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +107 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +185 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +45 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +200 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +128 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +27 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +17 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +321 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +72 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +54 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +84 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +166 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +18 -1002
- package/node_modules/yaml/browser/dist/log.js +14 -0
- package/node_modules/yaml/browser/dist/node_modules/tslib/tslib.es6.js +164 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +94 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +146 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +48 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +23 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +116 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +105 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +104 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +35 -0
- package/node_modules/yaml/browser/dist/options.js +18 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +215 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +692 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +882 -0
- package/node_modules/yaml/browser/dist/public-api.js +99 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +34 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +42 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +13 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +33 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +83 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +66 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +73 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +77 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +87 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +135 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +124 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +152 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +18 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +68 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +122 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +314 -0
- package/node_modules/yaml/browser/dist/util.js +9 -2
- package/node_modules/yaml/browser/dist/visit.js +146 -0
- package/node_modules/yaml/browser/index.js +5 -1
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +61 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +42 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +26 -0
- package/node_modules/yaml/dist/compose/compose-node.js +84 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +83 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +62 -0
- package/node_modules/yaml/dist/compose/composer.js +223 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +109 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +187 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +47 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +202 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +21 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +130 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +29 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +19 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +139 -0
- package/node_modules/yaml/dist/doc/Document.js +323 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +77 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +56 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +86 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +47 -0
- package/node_modules/yaml/dist/doc/directives.js +168 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +19 -0
- package/node_modules/yaml/dist/index.js +49 -77
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +17 -0
- package/node_modules/yaml/dist/node_modules/tslib/tslib.es6.js +76 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +28 -0
- package/node_modules/yaml/dist/nodes/Alias.js +96 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +150 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +66 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +21 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +42 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +26 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +41 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +119 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +55 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +107 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +106 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +30 -0
- package/node_modules/yaml/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/dist/options.d.ts +338 -0
- package/node_modules/yaml/dist/options.js +20 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +219 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +106 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +694 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +886 -0
- package/node_modules/yaml/dist/public-api.d.ts +43 -0
- package/node_modules/yaml/dist/public-api.js +104 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +18 -0
- package/node_modules/yaml/dist/schema/Schema.js +36 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +44 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +35 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +40 -0
- package/node_modules/yaml/dist/schema/tags.js +86 -0
- package/node_modules/yaml/dist/schema/types.d.ts +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +68 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +21 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +81 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +90 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +140 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +20 -0
- package/node_modules/yaml/dist/stringify/stringify.js +127 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +154 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +22 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +70 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +124 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +316 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +126 -152
- package/node_modules/yaml/dist/util.d.ts +9 -0
- package/node_modules/yaml/dist/util.js +19 -14
- package/node_modules/yaml/dist/visit.d.ts +63 -0
- package/node_modules/yaml/dist/visit.js +148 -0
- package/node_modules/yaml/package.json +43 -55
- package/node_modules/yaml/util.d.ts +3 -86
- package/node_modules/yaml/util.js +2 -16
- package/package.json +3 -3
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
- package/node_modules/jsonfile/node_modules/universalify/LICENSE +0 -20
- package/node_modules/jsonfile/node_modules/universalify/README.md +0 -76
- package/node_modules/jsonfile/node_modules/universalify/index.js +0 -24
- package/node_modules/jsonfile/node_modules/universalify/package.json +0 -34
- package/node_modules/yaml/browser/dist/PlainValue-b8036b75.js +0 -1275
- package/node_modules/yaml/browser/dist/Schema-e94716c8.js +0 -682
- package/node_modules/yaml/browser/dist/legacy-exports.js +0 -3
- package/node_modules/yaml/browser/dist/package.json +0 -1
- package/node_modules/yaml/browser/dist/parse-cst.js +0 -1904
- package/node_modules/yaml/browser/dist/resolveSeq-492ab440.js +0 -2419
- package/node_modules/yaml/browser/dist/types.js +0 -4
- package/node_modules/yaml/browser/dist/warnings-df54cb69.js +0 -499
- package/node_modules/yaml/browser/map.js +0 -2
- package/node_modules/yaml/browser/pair.js +0 -2
- package/node_modules/yaml/browser/parse-cst.js +0 -1
- package/node_modules/yaml/browser/scalar.js +0 -2
- package/node_modules/yaml/browser/schema.js +0 -9
- package/node_modules/yaml/browser/seq.js +0 -2
- package/node_modules/yaml/browser/types/binary.js +0 -8
- package/node_modules/yaml/browser/types/omap.js +0 -3
- package/node_modules/yaml/browser/types/pairs.js +0 -3
- package/node_modules/yaml/browser/types/set.js +0 -3
- package/node_modules/yaml/browser/types/timestamp.js +0 -10
- package/node_modules/yaml/browser/types.js +0 -1
- package/node_modules/yaml/browser/util.js +0 -1
- package/node_modules/yaml/dist/Document-9b4560a1.js +0 -757
- package/node_modules/yaml/dist/PlainValue-ec8e588e.js +0 -876
- package/node_modules/yaml/dist/Schema-88e323a7.js +0 -525
- package/node_modules/yaml/dist/legacy-exports.js +0 -16
- package/node_modules/yaml/dist/parse-cst.js +0 -1753
- package/node_modules/yaml/dist/resolveSeq-d03cb037.js +0 -2161
- package/node_modules/yaml/dist/types.js +0 -23
- package/node_modules/yaml/dist/warnings-1000a372.js +0 -416
- package/node_modules/yaml/index.d.ts +0 -372
- package/node_modules/yaml/index.js +0 -1
- package/node_modules/yaml/map.js +0 -2
- package/node_modules/yaml/pair.js +0 -2
- package/node_modules/yaml/parse-cst.d.ts +0 -191
- package/node_modules/yaml/parse-cst.js +0 -1
- package/node_modules/yaml/scalar.js +0 -2
- package/node_modules/yaml/schema.js +0 -9
- package/node_modules/yaml/seq.js +0 -2
- package/node_modules/yaml/types/binary.js +0 -8
- package/node_modules/yaml/types/omap.js +0 -3
- package/node_modules/yaml/types/pairs.js +0 -3
- package/node_modules/yaml/types/set.js +0 -3
- package/node_modules/yaml/types/timestamp.js +0 -10
- package/node_modules/yaml/types.d.ts +0 -407
- package/node_modules/yaml/types.js +0 -17
- package/node_modules/yaml/types.mjs +0 -17
- package/node_modules/yaml/util.mjs +0 -18
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var PlainValue = require('./PlainValue-ec8e588e.js');
|
|
4
|
-
var resolveSeq = require('./resolveSeq-d03cb037.js');
|
|
5
|
-
var warnings = require('./warnings-1000a372.js');
|
|
6
|
-
|
|
7
|
-
function createMap(schema, obj, ctx) {
|
|
8
|
-
const map = new resolveSeq.YAMLMap(schema);
|
|
9
|
-
|
|
10
|
-
if (obj instanceof Map) {
|
|
11
|
-
for (const [key, value] of obj) map.items.push(schema.createPair(key, value, ctx));
|
|
12
|
-
} else if (obj && typeof obj === 'object') {
|
|
13
|
-
for (const key of Object.keys(obj)) map.items.push(schema.createPair(key, obj[key], ctx));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (typeof schema.sortMapEntries === 'function') {
|
|
17
|
-
map.items.sort(schema.sortMapEntries);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return map;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const map = {
|
|
24
|
-
createNode: createMap,
|
|
25
|
-
default: true,
|
|
26
|
-
nodeClass: resolveSeq.YAMLMap,
|
|
27
|
-
tag: 'tag:yaml.org,2002:map',
|
|
28
|
-
resolve: resolveSeq.resolveMap
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function createSeq(schema, obj, ctx) {
|
|
32
|
-
const seq = new resolveSeq.YAMLSeq(schema);
|
|
33
|
-
|
|
34
|
-
if (obj && obj[Symbol.iterator]) {
|
|
35
|
-
for (const it of obj) {
|
|
36
|
-
const v = schema.createNode(it, ctx.wrapScalars, null, ctx);
|
|
37
|
-
seq.items.push(v);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return seq;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const seq = {
|
|
45
|
-
createNode: createSeq,
|
|
46
|
-
default: true,
|
|
47
|
-
nodeClass: resolveSeq.YAMLSeq,
|
|
48
|
-
tag: 'tag:yaml.org,2002:seq',
|
|
49
|
-
resolve: resolveSeq.resolveSeq
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const string = {
|
|
53
|
-
identify: value => typeof value === 'string',
|
|
54
|
-
default: true,
|
|
55
|
-
tag: 'tag:yaml.org,2002:str',
|
|
56
|
-
resolve: resolveSeq.resolveString,
|
|
57
|
-
|
|
58
|
-
stringify(item, ctx, onComment, onChompKeep) {
|
|
59
|
-
ctx = Object.assign({
|
|
60
|
-
actualString: true
|
|
61
|
-
}, ctx);
|
|
62
|
-
return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep);
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
options: resolveSeq.strOptions
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const failsafe = [map, seq, string];
|
|
69
|
-
|
|
70
|
-
/* global BigInt */
|
|
71
|
-
|
|
72
|
-
const intIdentify$2 = value => typeof value === 'bigint' || Number.isInteger(value);
|
|
73
|
-
|
|
74
|
-
const intResolve$1 = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);
|
|
75
|
-
|
|
76
|
-
function intStringify$1(node, radix, prefix) {
|
|
77
|
-
const {
|
|
78
|
-
value
|
|
79
|
-
} = node;
|
|
80
|
-
if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);
|
|
81
|
-
return resolveSeq.stringifyNumber(node);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const nullObj = {
|
|
85
|
-
identify: value => value == null,
|
|
86
|
-
createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,
|
|
87
|
-
default: true,
|
|
88
|
-
tag: 'tag:yaml.org,2002:null',
|
|
89
|
-
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
90
|
-
resolve: () => null,
|
|
91
|
-
options: resolveSeq.nullOptions,
|
|
92
|
-
stringify: () => resolveSeq.nullOptions.nullStr
|
|
93
|
-
};
|
|
94
|
-
const boolObj = {
|
|
95
|
-
identify: value => typeof value === 'boolean',
|
|
96
|
-
default: true,
|
|
97
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
98
|
-
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
99
|
-
resolve: str => str[0] === 't' || str[0] === 'T',
|
|
100
|
-
options: resolveSeq.boolOptions,
|
|
101
|
-
stringify: ({
|
|
102
|
-
value
|
|
103
|
-
}) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr
|
|
104
|
-
};
|
|
105
|
-
const octObj = {
|
|
106
|
-
identify: value => intIdentify$2(value) && value >= 0,
|
|
107
|
-
default: true,
|
|
108
|
-
tag: 'tag:yaml.org,2002:int',
|
|
109
|
-
format: 'OCT',
|
|
110
|
-
test: /^0o([0-7]+)$/,
|
|
111
|
-
resolve: (str, oct) => intResolve$1(str, oct, 8),
|
|
112
|
-
options: resolveSeq.intOptions,
|
|
113
|
-
stringify: node => intStringify$1(node, 8, '0o')
|
|
114
|
-
};
|
|
115
|
-
const intObj = {
|
|
116
|
-
identify: intIdentify$2,
|
|
117
|
-
default: true,
|
|
118
|
-
tag: 'tag:yaml.org,2002:int',
|
|
119
|
-
test: /^[-+]?[0-9]+$/,
|
|
120
|
-
resolve: str => intResolve$1(str, str, 10),
|
|
121
|
-
options: resolveSeq.intOptions,
|
|
122
|
-
stringify: resolveSeq.stringifyNumber
|
|
123
|
-
};
|
|
124
|
-
const hexObj = {
|
|
125
|
-
identify: value => intIdentify$2(value) && value >= 0,
|
|
126
|
-
default: true,
|
|
127
|
-
tag: 'tag:yaml.org,2002:int',
|
|
128
|
-
format: 'HEX',
|
|
129
|
-
test: /^0x([0-9a-fA-F]+)$/,
|
|
130
|
-
resolve: (str, hex) => intResolve$1(str, hex, 16),
|
|
131
|
-
options: resolveSeq.intOptions,
|
|
132
|
-
stringify: node => intStringify$1(node, 16, '0x')
|
|
133
|
-
};
|
|
134
|
-
const nanObj = {
|
|
135
|
-
identify: value => typeof value === 'number',
|
|
136
|
-
default: true,
|
|
137
|
-
tag: 'tag:yaml.org,2002:float',
|
|
138
|
-
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
|
139
|
-
resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
140
|
-
stringify: resolveSeq.stringifyNumber
|
|
141
|
-
};
|
|
142
|
-
const expObj = {
|
|
143
|
-
identify: value => typeof value === 'number',
|
|
144
|
-
default: true,
|
|
145
|
-
tag: 'tag:yaml.org,2002:float',
|
|
146
|
-
format: 'EXP',
|
|
147
|
-
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
148
|
-
resolve: str => parseFloat(str),
|
|
149
|
-
stringify: ({
|
|
150
|
-
value
|
|
151
|
-
}) => Number(value).toExponential()
|
|
152
|
-
};
|
|
153
|
-
const floatObj = {
|
|
154
|
-
identify: value => typeof value === 'number',
|
|
155
|
-
default: true,
|
|
156
|
-
tag: 'tag:yaml.org,2002:float',
|
|
157
|
-
test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,
|
|
158
|
-
|
|
159
|
-
resolve(str, frac1, frac2) {
|
|
160
|
-
const frac = frac1 || frac2;
|
|
161
|
-
const node = new resolveSeq.Scalar(parseFloat(str));
|
|
162
|
-
if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
|
|
163
|
-
return node;
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
stringify: resolveSeq.stringifyNumber
|
|
167
|
-
};
|
|
168
|
-
const core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);
|
|
169
|
-
|
|
170
|
-
/* global BigInt */
|
|
171
|
-
|
|
172
|
-
const intIdentify$1 = value => typeof value === 'bigint' || Number.isInteger(value);
|
|
173
|
-
|
|
174
|
-
const stringifyJSON = ({
|
|
175
|
-
value
|
|
176
|
-
}) => JSON.stringify(value);
|
|
177
|
-
|
|
178
|
-
const json = [map, seq, {
|
|
179
|
-
identify: value => typeof value === 'string',
|
|
180
|
-
default: true,
|
|
181
|
-
tag: 'tag:yaml.org,2002:str',
|
|
182
|
-
resolve: resolveSeq.resolveString,
|
|
183
|
-
stringify: stringifyJSON
|
|
184
|
-
}, {
|
|
185
|
-
identify: value => value == null,
|
|
186
|
-
createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,
|
|
187
|
-
default: true,
|
|
188
|
-
tag: 'tag:yaml.org,2002:null',
|
|
189
|
-
test: /^null$/,
|
|
190
|
-
resolve: () => null,
|
|
191
|
-
stringify: stringifyJSON
|
|
192
|
-
}, {
|
|
193
|
-
identify: value => typeof value === 'boolean',
|
|
194
|
-
default: true,
|
|
195
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
196
|
-
test: /^true|false$/,
|
|
197
|
-
resolve: str => str === 'true',
|
|
198
|
-
stringify: stringifyJSON
|
|
199
|
-
}, {
|
|
200
|
-
identify: intIdentify$1,
|
|
201
|
-
default: true,
|
|
202
|
-
tag: 'tag:yaml.org,2002:int',
|
|
203
|
-
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
204
|
-
resolve: str => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10),
|
|
205
|
-
stringify: ({
|
|
206
|
-
value
|
|
207
|
-
}) => intIdentify$1(value) ? value.toString() : JSON.stringify(value)
|
|
208
|
-
}, {
|
|
209
|
-
identify: value => typeof value === 'number',
|
|
210
|
-
default: true,
|
|
211
|
-
tag: 'tag:yaml.org,2002:float',
|
|
212
|
-
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
213
|
-
resolve: str => parseFloat(str),
|
|
214
|
-
stringify: stringifyJSON
|
|
215
|
-
}];
|
|
216
|
-
|
|
217
|
-
json.scalarFallback = str => {
|
|
218
|
-
throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
/* global BigInt */
|
|
222
|
-
|
|
223
|
-
const boolStringify = ({
|
|
224
|
-
value
|
|
225
|
-
}) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr;
|
|
226
|
-
|
|
227
|
-
const intIdentify = value => typeof value === 'bigint' || Number.isInteger(value);
|
|
228
|
-
|
|
229
|
-
function intResolve(sign, src, radix) {
|
|
230
|
-
let str = src.replace(/_/g, '');
|
|
231
|
-
|
|
232
|
-
if (resolveSeq.intOptions.asBigInt) {
|
|
233
|
-
switch (radix) {
|
|
234
|
-
case 2:
|
|
235
|
-
str = `0b${str}`;
|
|
236
|
-
break;
|
|
237
|
-
|
|
238
|
-
case 8:
|
|
239
|
-
str = `0o${str}`;
|
|
240
|
-
break;
|
|
241
|
-
|
|
242
|
-
case 16:
|
|
243
|
-
str = `0x${str}`;
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
const n = BigInt(str);
|
|
248
|
-
return sign === '-' ? BigInt(-1) * n : n;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const n = parseInt(str, radix);
|
|
252
|
-
return sign === '-' ? -1 * n : n;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function intStringify(node, radix, prefix) {
|
|
256
|
-
const {
|
|
257
|
-
value
|
|
258
|
-
} = node;
|
|
259
|
-
|
|
260
|
-
if (intIdentify(value)) {
|
|
261
|
-
const str = value.toString(radix);
|
|
262
|
-
return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return resolveSeq.stringifyNumber(node);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
const yaml11 = failsafe.concat([{
|
|
269
|
-
identify: value => value == null,
|
|
270
|
-
createNode: (schema, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null,
|
|
271
|
-
default: true,
|
|
272
|
-
tag: 'tag:yaml.org,2002:null',
|
|
273
|
-
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
274
|
-
resolve: () => null,
|
|
275
|
-
options: resolveSeq.nullOptions,
|
|
276
|
-
stringify: () => resolveSeq.nullOptions.nullStr
|
|
277
|
-
}, {
|
|
278
|
-
identify: value => typeof value === 'boolean',
|
|
279
|
-
default: true,
|
|
280
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
281
|
-
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
282
|
-
resolve: () => true,
|
|
283
|
-
options: resolveSeq.boolOptions,
|
|
284
|
-
stringify: boolStringify
|
|
285
|
-
}, {
|
|
286
|
-
identify: value => typeof value === 'boolean',
|
|
287
|
-
default: true,
|
|
288
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
289
|
-
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
|
290
|
-
resolve: () => false,
|
|
291
|
-
options: resolveSeq.boolOptions,
|
|
292
|
-
stringify: boolStringify
|
|
293
|
-
}, {
|
|
294
|
-
identify: intIdentify,
|
|
295
|
-
default: true,
|
|
296
|
-
tag: 'tag:yaml.org,2002:int',
|
|
297
|
-
format: 'BIN',
|
|
298
|
-
test: /^([-+]?)0b([0-1_]+)$/,
|
|
299
|
-
resolve: (str, sign, bin) => intResolve(sign, bin, 2),
|
|
300
|
-
stringify: node => intStringify(node, 2, '0b')
|
|
301
|
-
}, {
|
|
302
|
-
identify: intIdentify,
|
|
303
|
-
default: true,
|
|
304
|
-
tag: 'tag:yaml.org,2002:int',
|
|
305
|
-
format: 'OCT',
|
|
306
|
-
test: /^([-+]?)0([0-7_]+)$/,
|
|
307
|
-
resolve: (str, sign, oct) => intResolve(sign, oct, 8),
|
|
308
|
-
stringify: node => intStringify(node, 8, '0')
|
|
309
|
-
}, {
|
|
310
|
-
identify: intIdentify,
|
|
311
|
-
default: true,
|
|
312
|
-
tag: 'tag:yaml.org,2002:int',
|
|
313
|
-
test: /^([-+]?)([0-9][0-9_]*)$/,
|
|
314
|
-
resolve: (str, sign, abs) => intResolve(sign, abs, 10),
|
|
315
|
-
stringify: resolveSeq.stringifyNumber
|
|
316
|
-
}, {
|
|
317
|
-
identify: intIdentify,
|
|
318
|
-
default: true,
|
|
319
|
-
tag: 'tag:yaml.org,2002:int',
|
|
320
|
-
format: 'HEX',
|
|
321
|
-
test: /^([-+]?)0x([0-9a-fA-F_]+)$/,
|
|
322
|
-
resolve: (str, sign, hex) => intResolve(sign, hex, 16),
|
|
323
|
-
stringify: node => intStringify(node, 16, '0x')
|
|
324
|
-
}, {
|
|
325
|
-
identify: value => typeof value === 'number',
|
|
326
|
-
default: true,
|
|
327
|
-
tag: 'tag:yaml.org,2002:float',
|
|
328
|
-
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
|
329
|
-
resolve: (str, nan) => nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
330
|
-
stringify: resolveSeq.stringifyNumber
|
|
331
|
-
}, {
|
|
332
|
-
identify: value => typeof value === 'number',
|
|
333
|
-
default: true,
|
|
334
|
-
tag: 'tag:yaml.org,2002:float',
|
|
335
|
-
format: 'EXP',
|
|
336
|
-
test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
337
|
-
resolve: str => parseFloat(str.replace(/_/g, '')),
|
|
338
|
-
stringify: ({
|
|
339
|
-
value
|
|
340
|
-
}) => Number(value).toExponential()
|
|
341
|
-
}, {
|
|
342
|
-
identify: value => typeof value === 'number',
|
|
343
|
-
default: true,
|
|
344
|
-
tag: 'tag:yaml.org,2002:float',
|
|
345
|
-
test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,
|
|
346
|
-
|
|
347
|
-
resolve(str, frac) {
|
|
348
|
-
const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, '')));
|
|
349
|
-
|
|
350
|
-
if (frac) {
|
|
351
|
-
const f = frac.replace(/_/g, '');
|
|
352
|
-
if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return node;
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
stringify: resolveSeq.stringifyNumber
|
|
359
|
-
}], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp);
|
|
360
|
-
|
|
361
|
-
const schemas = {
|
|
362
|
-
core,
|
|
363
|
-
failsafe,
|
|
364
|
-
json,
|
|
365
|
-
yaml11
|
|
366
|
-
};
|
|
367
|
-
const tags = {
|
|
368
|
-
binary: warnings.binary,
|
|
369
|
-
bool: boolObj,
|
|
370
|
-
float: floatObj,
|
|
371
|
-
floatExp: expObj,
|
|
372
|
-
floatNaN: nanObj,
|
|
373
|
-
floatTime: warnings.floatTime,
|
|
374
|
-
int: intObj,
|
|
375
|
-
intHex: hexObj,
|
|
376
|
-
intOct: octObj,
|
|
377
|
-
intTime: warnings.intTime,
|
|
378
|
-
map,
|
|
379
|
-
null: nullObj,
|
|
380
|
-
omap: warnings.omap,
|
|
381
|
-
pairs: warnings.pairs,
|
|
382
|
-
seq,
|
|
383
|
-
set: warnings.set,
|
|
384
|
-
timestamp: warnings.timestamp
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
function findTagObject(value, tagName, tags) {
|
|
388
|
-
if (tagName) {
|
|
389
|
-
const match = tags.filter(t => t.tag === tagName);
|
|
390
|
-
const tagObj = match.find(t => !t.format) || match[0];
|
|
391
|
-
if (!tagObj) throw new Error(`Tag ${tagName} not found`);
|
|
392
|
-
return tagObj;
|
|
393
|
-
} // TODO: deprecate/remove class check
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return tags.find(t => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
function createNode(value, tagName, ctx) {
|
|
400
|
-
if (value instanceof resolveSeq.Node) return value;
|
|
401
|
-
const {
|
|
402
|
-
defaultPrefix,
|
|
403
|
-
onTagObj,
|
|
404
|
-
prevObjects,
|
|
405
|
-
schema,
|
|
406
|
-
wrapScalars
|
|
407
|
-
} = ctx;
|
|
408
|
-
if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);
|
|
409
|
-
let tagObj = findTagObject(value, tagName, schema.tags);
|
|
410
|
-
|
|
411
|
-
if (!tagObj) {
|
|
412
|
-
if (typeof value.toJSON === 'function') value = value.toJSON();
|
|
413
|
-
if (!value || typeof value !== 'object') return wrapScalars ? new resolveSeq.Scalar(value) : value;
|
|
414
|
-
tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (onTagObj) {
|
|
418
|
-
onTagObj(tagObj);
|
|
419
|
-
delete ctx.onTagObj;
|
|
420
|
-
} // Detect duplicate references to the same object & use Alias nodes for all
|
|
421
|
-
// after first. The `obj` wrapper allows for circular references to resolve.
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
const obj = {
|
|
425
|
-
value: undefined,
|
|
426
|
-
node: undefined
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
if (value && typeof value === 'object' && prevObjects) {
|
|
430
|
-
const prev = prevObjects.get(value);
|
|
431
|
-
|
|
432
|
-
if (prev) {
|
|
433
|
-
const alias = new resolveSeq.Alias(prev); // leaves source dirty; must be cleaned by caller
|
|
434
|
-
|
|
435
|
-
ctx.aliasNodes.push(alias); // defined along with prevObjects
|
|
436
|
-
|
|
437
|
-
return alias;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
obj.value = value;
|
|
441
|
-
prevObjects.set(value, obj);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value;
|
|
445
|
-
if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName;
|
|
446
|
-
return obj.node;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
function getSchemaTags(schemas, knownTags, customTags, schemaId) {
|
|
450
|
-
let tags = schemas[schemaId.replace(/\W/g, '')]; // 'yaml-1.1' -> 'yaml11'
|
|
451
|
-
|
|
452
|
-
if (!tags) {
|
|
453
|
-
const keys = Object.keys(schemas).map(key => JSON.stringify(key)).join(', ');
|
|
454
|
-
throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
if (Array.isArray(customTags)) {
|
|
458
|
-
for (const tag of customTags) tags = tags.concat(tag);
|
|
459
|
-
} else if (typeof customTags === 'function') {
|
|
460
|
-
tags = customTags(tags.slice());
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
for (let i = 0; i < tags.length; ++i) {
|
|
464
|
-
const tag = tags[i];
|
|
465
|
-
|
|
466
|
-
if (typeof tag === 'string') {
|
|
467
|
-
const tagObj = knownTags[tag];
|
|
468
|
-
|
|
469
|
-
if (!tagObj) {
|
|
470
|
-
const keys = Object.keys(knownTags).map(key => JSON.stringify(key)).join(', ');
|
|
471
|
-
throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
tags[i] = tagObj;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
return tags;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
482
|
-
|
|
483
|
-
class Schema {
|
|
484
|
-
// TODO: remove in v2
|
|
485
|
-
// TODO: remove in v2
|
|
486
|
-
constructor({
|
|
487
|
-
customTags,
|
|
488
|
-
merge,
|
|
489
|
-
schema,
|
|
490
|
-
sortMapEntries,
|
|
491
|
-
tags: deprecatedCustomTags
|
|
492
|
-
}) {
|
|
493
|
-
this.merge = !!merge;
|
|
494
|
-
this.name = schema;
|
|
495
|
-
this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;
|
|
496
|
-
if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation('tags', 'customTags');
|
|
497
|
-
this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
createNode(value, wrapScalars, tagName, ctx) {
|
|
501
|
-
const baseCtx = {
|
|
502
|
-
defaultPrefix: Schema.defaultPrefix,
|
|
503
|
-
schema: this,
|
|
504
|
-
wrapScalars
|
|
505
|
-
};
|
|
506
|
-
const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;
|
|
507
|
-
return createNode(value, tagName, createCtx);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
createPair(key, value, ctx) {
|
|
511
|
-
if (!ctx) ctx = {
|
|
512
|
-
wrapScalars: true
|
|
513
|
-
};
|
|
514
|
-
const k = this.createNode(key, ctx.wrapScalars, null, ctx);
|
|
515
|
-
const v = this.createNode(value, ctx.wrapScalars, null, ctx);
|
|
516
|
-
return new resolveSeq.Pair(k, v);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
PlainValue._defineProperty(Schema, "defaultPrefix", PlainValue.defaultTagPrefix);
|
|
522
|
-
|
|
523
|
-
PlainValue._defineProperty(Schema, "defaultTags", PlainValue.defaultTags);
|
|
524
|
-
|
|
525
|
-
exports.Schema = Schema;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var warnings = require('./warnings-1000a372.js');
|
|
4
|
-
require('./PlainValue-ec8e588e.js');
|
|
5
|
-
require('./resolveSeq-d03cb037.js');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.binary = warnings.binary;
|
|
10
|
-
exports.floatTime = warnings.floatTime;
|
|
11
|
-
exports.intTime = warnings.intTime;
|
|
12
|
-
exports.omap = warnings.omap;
|
|
13
|
-
exports.pairs = warnings.pairs;
|
|
14
|
-
exports.set = warnings.set;
|
|
15
|
-
exports.timestamp = warnings.timestamp;
|
|
16
|
-
exports.warnFileDeprecation = warnings.warnFileDeprecation;
|