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,682 +0,0 @@
|
|
|
1
|
-
import { _ as _createForOfIteratorHelper, h as _slicedToArray, a as _typeof, b as _createClass, e as _defineProperty, c as _classCallCheck, d as defaultTagPrefix, n as defaultTags } from './PlainValue-b8036b75.js';
|
|
2
|
-
import { d as YAMLMap, g as resolveMap, Y as YAMLSeq, h as resolveSeq, j as resolveString, c as stringifyString, s as strOptions, S as Scalar, n as nullOptions, a as boolOptions, i as intOptions, k as stringifyNumber, N as Node, A as Alias, P as Pair } from './resolveSeq-492ab440.js';
|
|
3
|
-
import { b as binary, o as omap, p as pairs, s as set, i as intTime, f as floatTime, t as timestamp, a as warnOptionDeprecation } from './warnings-df54cb69.js';
|
|
4
|
-
|
|
5
|
-
function createMap(schema, obj, ctx) {
|
|
6
|
-
var map = new YAMLMap(schema);
|
|
7
|
-
|
|
8
|
-
if (obj instanceof Map) {
|
|
9
|
-
var _iterator = _createForOfIteratorHelper(obj),
|
|
10
|
-
_step;
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
14
|
-
var _step$value = _slicedToArray(_step.value, 2),
|
|
15
|
-
key = _step$value[0],
|
|
16
|
-
value = _step$value[1];
|
|
17
|
-
|
|
18
|
-
map.items.push(schema.createPair(key, value, ctx));
|
|
19
|
-
}
|
|
20
|
-
} catch (err) {
|
|
21
|
-
_iterator.e(err);
|
|
22
|
-
} finally {
|
|
23
|
-
_iterator.f();
|
|
24
|
-
}
|
|
25
|
-
} else if (obj && _typeof(obj) === 'object') {
|
|
26
|
-
for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
|
|
27
|
-
var _key = _Object$keys[_i];
|
|
28
|
-
map.items.push(schema.createPair(_key, obj[_key], ctx));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (typeof schema.sortMapEntries === 'function') {
|
|
33
|
-
map.items.sort(schema.sortMapEntries);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return map;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var map = {
|
|
40
|
-
createNode: createMap,
|
|
41
|
-
default: true,
|
|
42
|
-
nodeClass: YAMLMap,
|
|
43
|
-
tag: 'tag:yaml.org,2002:map',
|
|
44
|
-
resolve: resolveMap
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
function createSeq(schema, obj, ctx) {
|
|
48
|
-
var seq = new YAMLSeq(schema);
|
|
49
|
-
|
|
50
|
-
if (obj && obj[Symbol.iterator]) {
|
|
51
|
-
var _iterator = _createForOfIteratorHelper(obj),
|
|
52
|
-
_step;
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
56
|
-
var it = _step.value;
|
|
57
|
-
var v = schema.createNode(it, ctx.wrapScalars, null, ctx);
|
|
58
|
-
seq.items.push(v);
|
|
59
|
-
}
|
|
60
|
-
} catch (err) {
|
|
61
|
-
_iterator.e(err);
|
|
62
|
-
} finally {
|
|
63
|
-
_iterator.f();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return seq;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
var seq = {
|
|
71
|
-
createNode: createSeq,
|
|
72
|
-
default: true,
|
|
73
|
-
nodeClass: YAMLSeq,
|
|
74
|
-
tag: 'tag:yaml.org,2002:seq',
|
|
75
|
-
resolve: resolveSeq
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
var string = {
|
|
79
|
-
identify: function identify(value) {
|
|
80
|
-
return typeof value === 'string';
|
|
81
|
-
},
|
|
82
|
-
default: true,
|
|
83
|
-
tag: 'tag:yaml.org,2002:str',
|
|
84
|
-
resolve: resolveString,
|
|
85
|
-
stringify: function stringify(item, ctx, onComment, onChompKeep) {
|
|
86
|
-
ctx = Object.assign({
|
|
87
|
-
actualString: true
|
|
88
|
-
}, ctx);
|
|
89
|
-
return stringifyString(item, ctx, onComment, onChompKeep);
|
|
90
|
-
},
|
|
91
|
-
options: strOptions
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
var failsafe = [map, seq, string];
|
|
95
|
-
|
|
96
|
-
/* global BigInt */
|
|
97
|
-
|
|
98
|
-
var intIdentify$2 = function intIdentify(value) {
|
|
99
|
-
return typeof value === 'bigint' || Number.isInteger(value);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
var intResolve$1 = function intResolve(src, part, radix) {
|
|
103
|
-
return intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
function intStringify$1(node, radix, prefix) {
|
|
107
|
-
var value = node.value;
|
|
108
|
-
if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);
|
|
109
|
-
return stringifyNumber(node);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
var nullObj = {
|
|
113
|
-
identify: function identify(value) {
|
|
114
|
-
return value == null;
|
|
115
|
-
},
|
|
116
|
-
createNode: function createNode(schema, value, ctx) {
|
|
117
|
-
return ctx.wrapScalars ? new Scalar(null) : null;
|
|
118
|
-
},
|
|
119
|
-
default: true,
|
|
120
|
-
tag: 'tag:yaml.org,2002:null',
|
|
121
|
-
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
122
|
-
resolve: function resolve() {
|
|
123
|
-
return null;
|
|
124
|
-
},
|
|
125
|
-
options: nullOptions,
|
|
126
|
-
stringify: function stringify() {
|
|
127
|
-
return nullOptions.nullStr;
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
var boolObj = {
|
|
131
|
-
identify: function identify(value) {
|
|
132
|
-
return typeof value === 'boolean';
|
|
133
|
-
},
|
|
134
|
-
default: true,
|
|
135
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
136
|
-
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
137
|
-
resolve: function resolve(str) {
|
|
138
|
-
return str[0] === 't' || str[0] === 'T';
|
|
139
|
-
},
|
|
140
|
-
options: boolOptions,
|
|
141
|
-
stringify: function stringify(_ref) {
|
|
142
|
-
var value = _ref.value;
|
|
143
|
-
return value ? boolOptions.trueStr : boolOptions.falseStr;
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
var octObj = {
|
|
147
|
-
identify: function identify(value) {
|
|
148
|
-
return intIdentify$2(value) && value >= 0;
|
|
149
|
-
},
|
|
150
|
-
default: true,
|
|
151
|
-
tag: 'tag:yaml.org,2002:int',
|
|
152
|
-
format: 'OCT',
|
|
153
|
-
test: /^0o([0-7]+)$/,
|
|
154
|
-
resolve: function resolve(str, oct) {
|
|
155
|
-
return intResolve$1(str, oct, 8);
|
|
156
|
-
},
|
|
157
|
-
options: intOptions,
|
|
158
|
-
stringify: function stringify(node) {
|
|
159
|
-
return intStringify$1(node, 8, '0o');
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
var intObj = {
|
|
163
|
-
identify: intIdentify$2,
|
|
164
|
-
default: true,
|
|
165
|
-
tag: 'tag:yaml.org,2002:int',
|
|
166
|
-
test: /^[-+]?[0-9]+$/,
|
|
167
|
-
resolve: function resolve(str) {
|
|
168
|
-
return intResolve$1(str, str, 10);
|
|
169
|
-
},
|
|
170
|
-
options: intOptions,
|
|
171
|
-
stringify: stringifyNumber
|
|
172
|
-
};
|
|
173
|
-
var hexObj = {
|
|
174
|
-
identify: function identify(value) {
|
|
175
|
-
return intIdentify$2(value) && value >= 0;
|
|
176
|
-
},
|
|
177
|
-
default: true,
|
|
178
|
-
tag: 'tag:yaml.org,2002:int',
|
|
179
|
-
format: 'HEX',
|
|
180
|
-
test: /^0x([0-9a-fA-F]+)$/,
|
|
181
|
-
resolve: function resolve(str, hex) {
|
|
182
|
-
return intResolve$1(str, hex, 16);
|
|
183
|
-
},
|
|
184
|
-
options: intOptions,
|
|
185
|
-
stringify: function stringify(node) {
|
|
186
|
-
return intStringify$1(node, 16, '0x');
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
var nanObj = {
|
|
190
|
-
identify: function identify(value) {
|
|
191
|
-
return typeof value === 'number';
|
|
192
|
-
},
|
|
193
|
-
default: true,
|
|
194
|
-
tag: 'tag:yaml.org,2002:float',
|
|
195
|
-
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
|
196
|
-
resolve: function resolve(str, nan) {
|
|
197
|
-
return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
|
198
|
-
},
|
|
199
|
-
stringify: stringifyNumber
|
|
200
|
-
};
|
|
201
|
-
var expObj = {
|
|
202
|
-
identify: function identify(value) {
|
|
203
|
-
return typeof value === 'number';
|
|
204
|
-
},
|
|
205
|
-
default: true,
|
|
206
|
-
tag: 'tag:yaml.org,2002:float',
|
|
207
|
-
format: 'EXP',
|
|
208
|
-
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
209
|
-
resolve: function resolve(str) {
|
|
210
|
-
return parseFloat(str);
|
|
211
|
-
},
|
|
212
|
-
stringify: function stringify(_ref2) {
|
|
213
|
-
var value = _ref2.value;
|
|
214
|
-
return Number(value).toExponential();
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
var floatObj = {
|
|
218
|
-
identify: function identify(value) {
|
|
219
|
-
return typeof value === 'number';
|
|
220
|
-
},
|
|
221
|
-
default: true,
|
|
222
|
-
tag: 'tag:yaml.org,2002:float',
|
|
223
|
-
test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,
|
|
224
|
-
resolve: function resolve(str, frac1, frac2) {
|
|
225
|
-
var frac = frac1 || frac2;
|
|
226
|
-
var node = new Scalar(parseFloat(str));
|
|
227
|
-
if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
|
|
228
|
-
return node;
|
|
229
|
-
},
|
|
230
|
-
stringify: stringifyNumber
|
|
231
|
-
};
|
|
232
|
-
var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);
|
|
233
|
-
|
|
234
|
-
/* global BigInt */
|
|
235
|
-
|
|
236
|
-
var intIdentify$1 = function intIdentify(value) {
|
|
237
|
-
return typeof value === 'bigint' || Number.isInteger(value);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
var stringifyJSON = function stringifyJSON(_ref) {
|
|
241
|
-
var value = _ref.value;
|
|
242
|
-
return JSON.stringify(value);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
var json = [map, seq, {
|
|
246
|
-
identify: function identify(value) {
|
|
247
|
-
return typeof value === 'string';
|
|
248
|
-
},
|
|
249
|
-
default: true,
|
|
250
|
-
tag: 'tag:yaml.org,2002:str',
|
|
251
|
-
resolve: resolveString,
|
|
252
|
-
stringify: stringifyJSON
|
|
253
|
-
}, {
|
|
254
|
-
identify: function identify(value) {
|
|
255
|
-
return value == null;
|
|
256
|
-
},
|
|
257
|
-
createNode: function createNode(schema, value, ctx) {
|
|
258
|
-
return ctx.wrapScalars ? new Scalar(null) : null;
|
|
259
|
-
},
|
|
260
|
-
default: true,
|
|
261
|
-
tag: 'tag:yaml.org,2002:null',
|
|
262
|
-
test: /^null$/,
|
|
263
|
-
resolve: function resolve() {
|
|
264
|
-
return null;
|
|
265
|
-
},
|
|
266
|
-
stringify: stringifyJSON
|
|
267
|
-
}, {
|
|
268
|
-
identify: function identify(value) {
|
|
269
|
-
return typeof value === 'boolean';
|
|
270
|
-
},
|
|
271
|
-
default: true,
|
|
272
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
273
|
-
test: /^true|false$/,
|
|
274
|
-
resolve: function resolve(str) {
|
|
275
|
-
return str === 'true';
|
|
276
|
-
},
|
|
277
|
-
stringify: stringifyJSON
|
|
278
|
-
}, {
|
|
279
|
-
identify: intIdentify$1,
|
|
280
|
-
default: true,
|
|
281
|
-
tag: 'tag:yaml.org,2002:int',
|
|
282
|
-
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
283
|
-
resolve: function resolve(str) {
|
|
284
|
-
return intOptions.asBigInt ? BigInt(str) : parseInt(str, 10);
|
|
285
|
-
},
|
|
286
|
-
stringify: function stringify(_ref2) {
|
|
287
|
-
var value = _ref2.value;
|
|
288
|
-
return intIdentify$1(value) ? value.toString() : JSON.stringify(value);
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
identify: function identify(value) {
|
|
292
|
-
return typeof value === 'number';
|
|
293
|
-
},
|
|
294
|
-
default: true,
|
|
295
|
-
tag: 'tag:yaml.org,2002:float',
|
|
296
|
-
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
297
|
-
resolve: function resolve(str) {
|
|
298
|
-
return parseFloat(str);
|
|
299
|
-
},
|
|
300
|
-
stringify: stringifyJSON
|
|
301
|
-
}];
|
|
302
|
-
|
|
303
|
-
json.scalarFallback = function (str) {
|
|
304
|
-
throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(str)));
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
/* global BigInt */
|
|
308
|
-
|
|
309
|
-
var boolStringify = function boolStringify(_ref) {
|
|
310
|
-
var value = _ref.value;
|
|
311
|
-
return value ? boolOptions.trueStr : boolOptions.falseStr;
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
var intIdentify = function intIdentify(value) {
|
|
315
|
-
return typeof value === 'bigint' || Number.isInteger(value);
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
function intResolve(sign, src, radix) {
|
|
319
|
-
var str = src.replace(/_/g, '');
|
|
320
|
-
|
|
321
|
-
if (intOptions.asBigInt) {
|
|
322
|
-
switch (radix) {
|
|
323
|
-
case 2:
|
|
324
|
-
str = "0b".concat(str);
|
|
325
|
-
break;
|
|
326
|
-
|
|
327
|
-
case 8:
|
|
328
|
-
str = "0o".concat(str);
|
|
329
|
-
break;
|
|
330
|
-
|
|
331
|
-
case 16:
|
|
332
|
-
str = "0x".concat(str);
|
|
333
|
-
break;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
var _n = BigInt(str);
|
|
337
|
-
|
|
338
|
-
return sign === '-' ? BigInt(-1) * _n : _n;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var n = parseInt(str, radix);
|
|
342
|
-
return sign === '-' ? -1 * n : n;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
function intStringify(node, radix, prefix) {
|
|
346
|
-
var value = node.value;
|
|
347
|
-
|
|
348
|
-
if (intIdentify(value)) {
|
|
349
|
-
var str = value.toString(radix);
|
|
350
|
-
return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
return stringifyNumber(node);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
var yaml11 = failsafe.concat([{
|
|
357
|
-
identify: function identify(value) {
|
|
358
|
-
return value == null;
|
|
359
|
-
},
|
|
360
|
-
createNode: function createNode(schema, value, ctx) {
|
|
361
|
-
return ctx.wrapScalars ? new Scalar(null) : null;
|
|
362
|
-
},
|
|
363
|
-
default: true,
|
|
364
|
-
tag: 'tag:yaml.org,2002:null',
|
|
365
|
-
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
366
|
-
resolve: function resolve() {
|
|
367
|
-
return null;
|
|
368
|
-
},
|
|
369
|
-
options: nullOptions,
|
|
370
|
-
stringify: function stringify() {
|
|
371
|
-
return nullOptions.nullStr;
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
identify: function identify(value) {
|
|
375
|
-
return typeof value === 'boolean';
|
|
376
|
-
},
|
|
377
|
-
default: true,
|
|
378
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
379
|
-
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
380
|
-
resolve: function resolve() {
|
|
381
|
-
return true;
|
|
382
|
-
},
|
|
383
|
-
options: boolOptions,
|
|
384
|
-
stringify: boolStringify
|
|
385
|
-
}, {
|
|
386
|
-
identify: function identify(value) {
|
|
387
|
-
return typeof value === 'boolean';
|
|
388
|
-
},
|
|
389
|
-
default: true,
|
|
390
|
-
tag: 'tag:yaml.org,2002:bool',
|
|
391
|
-
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
|
392
|
-
resolve: function resolve() {
|
|
393
|
-
return false;
|
|
394
|
-
},
|
|
395
|
-
options: boolOptions,
|
|
396
|
-
stringify: boolStringify
|
|
397
|
-
}, {
|
|
398
|
-
identify: intIdentify,
|
|
399
|
-
default: true,
|
|
400
|
-
tag: 'tag:yaml.org,2002:int',
|
|
401
|
-
format: 'BIN',
|
|
402
|
-
test: /^([-+]?)0b([0-1_]+)$/,
|
|
403
|
-
resolve: function resolve(str, sign, bin) {
|
|
404
|
-
return intResolve(sign, bin, 2);
|
|
405
|
-
},
|
|
406
|
-
stringify: function stringify(node) {
|
|
407
|
-
return intStringify(node, 2, '0b');
|
|
408
|
-
}
|
|
409
|
-
}, {
|
|
410
|
-
identify: intIdentify,
|
|
411
|
-
default: true,
|
|
412
|
-
tag: 'tag:yaml.org,2002:int',
|
|
413
|
-
format: 'OCT',
|
|
414
|
-
test: /^([-+]?)0([0-7_]+)$/,
|
|
415
|
-
resolve: function resolve(str, sign, oct) {
|
|
416
|
-
return intResolve(sign, oct, 8);
|
|
417
|
-
},
|
|
418
|
-
stringify: function stringify(node) {
|
|
419
|
-
return intStringify(node, 8, '0');
|
|
420
|
-
}
|
|
421
|
-
}, {
|
|
422
|
-
identify: intIdentify,
|
|
423
|
-
default: true,
|
|
424
|
-
tag: 'tag:yaml.org,2002:int',
|
|
425
|
-
test: /^([-+]?)([0-9][0-9_]*)$/,
|
|
426
|
-
resolve: function resolve(str, sign, abs) {
|
|
427
|
-
return intResolve(sign, abs, 10);
|
|
428
|
-
},
|
|
429
|
-
stringify: stringifyNumber
|
|
430
|
-
}, {
|
|
431
|
-
identify: intIdentify,
|
|
432
|
-
default: true,
|
|
433
|
-
tag: 'tag:yaml.org,2002:int',
|
|
434
|
-
format: 'HEX',
|
|
435
|
-
test: /^([-+]?)0x([0-9a-fA-F_]+)$/,
|
|
436
|
-
resolve: function resolve(str, sign, hex) {
|
|
437
|
-
return intResolve(sign, hex, 16);
|
|
438
|
-
},
|
|
439
|
-
stringify: function stringify(node) {
|
|
440
|
-
return intStringify(node, 16, '0x');
|
|
441
|
-
}
|
|
442
|
-
}, {
|
|
443
|
-
identify: function identify(value) {
|
|
444
|
-
return typeof value === 'number';
|
|
445
|
-
},
|
|
446
|
-
default: true,
|
|
447
|
-
tag: 'tag:yaml.org,2002:float',
|
|
448
|
-
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
|
449
|
-
resolve: function resolve(str, nan) {
|
|
450
|
-
return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
|
451
|
-
},
|
|
452
|
-
stringify: stringifyNumber
|
|
453
|
-
}, {
|
|
454
|
-
identify: function identify(value) {
|
|
455
|
-
return typeof value === 'number';
|
|
456
|
-
},
|
|
457
|
-
default: true,
|
|
458
|
-
tag: 'tag:yaml.org,2002:float',
|
|
459
|
-
format: 'EXP',
|
|
460
|
-
test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
461
|
-
resolve: function resolve(str) {
|
|
462
|
-
return parseFloat(str.replace(/_/g, ''));
|
|
463
|
-
},
|
|
464
|
-
stringify: function stringify(_ref2) {
|
|
465
|
-
var value = _ref2.value;
|
|
466
|
-
return Number(value).toExponential();
|
|
467
|
-
}
|
|
468
|
-
}, {
|
|
469
|
-
identify: function identify(value) {
|
|
470
|
-
return typeof value === 'number';
|
|
471
|
-
},
|
|
472
|
-
default: true,
|
|
473
|
-
tag: 'tag:yaml.org,2002:float',
|
|
474
|
-
test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,
|
|
475
|
-
resolve: function resolve(str, frac) {
|
|
476
|
-
var node = new Scalar(parseFloat(str.replace(/_/g, '')));
|
|
477
|
-
|
|
478
|
-
if (frac) {
|
|
479
|
-
var f = frac.replace(/_/g, '');
|
|
480
|
-
if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
return node;
|
|
484
|
-
},
|
|
485
|
-
stringify: stringifyNumber
|
|
486
|
-
}], binary, omap, pairs, set, intTime, floatTime, timestamp);
|
|
487
|
-
|
|
488
|
-
var schemas = {
|
|
489
|
-
core: core,
|
|
490
|
-
failsafe: failsafe,
|
|
491
|
-
json: json,
|
|
492
|
-
yaml11: yaml11
|
|
493
|
-
};
|
|
494
|
-
var tags = {
|
|
495
|
-
binary: binary,
|
|
496
|
-
bool: boolObj,
|
|
497
|
-
float: floatObj,
|
|
498
|
-
floatExp: expObj,
|
|
499
|
-
floatNaN: nanObj,
|
|
500
|
-
floatTime: floatTime,
|
|
501
|
-
int: intObj,
|
|
502
|
-
intHex: hexObj,
|
|
503
|
-
intOct: octObj,
|
|
504
|
-
intTime: intTime,
|
|
505
|
-
map: map,
|
|
506
|
-
null: nullObj,
|
|
507
|
-
omap: omap,
|
|
508
|
-
pairs: pairs,
|
|
509
|
-
seq: seq,
|
|
510
|
-
set: set,
|
|
511
|
-
timestamp: timestamp
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
function findTagObject(value, tagName, tags) {
|
|
515
|
-
if (tagName) {
|
|
516
|
-
var match = tags.filter(function (t) {
|
|
517
|
-
return t.tag === tagName;
|
|
518
|
-
});
|
|
519
|
-
var tagObj = match.find(function (t) {
|
|
520
|
-
return !t.format;
|
|
521
|
-
}) || match[0];
|
|
522
|
-
if (!tagObj) throw new Error("Tag ".concat(tagName, " not found"));
|
|
523
|
-
return tagObj;
|
|
524
|
-
} // TODO: deprecate/remove class check
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
return tags.find(function (t) {
|
|
528
|
-
return (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format;
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
function createNode(value, tagName, ctx) {
|
|
533
|
-
if (value instanceof Node) return value;
|
|
534
|
-
var defaultPrefix = ctx.defaultPrefix,
|
|
535
|
-
onTagObj = ctx.onTagObj,
|
|
536
|
-
prevObjects = ctx.prevObjects,
|
|
537
|
-
schema = ctx.schema,
|
|
538
|
-
wrapScalars = ctx.wrapScalars;
|
|
539
|
-
if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);
|
|
540
|
-
var tagObj = findTagObject(value, tagName, schema.tags);
|
|
541
|
-
|
|
542
|
-
if (!tagObj) {
|
|
543
|
-
if (typeof value.toJSON === 'function') value = value.toJSON();
|
|
544
|
-
if (!value || _typeof(value) !== 'object') return wrapScalars ? new Scalar(value) : value;
|
|
545
|
-
tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
if (onTagObj) {
|
|
549
|
-
onTagObj(tagObj);
|
|
550
|
-
delete ctx.onTagObj;
|
|
551
|
-
} // Detect duplicate references to the same object & use Alias nodes for all
|
|
552
|
-
// after first. The `obj` wrapper allows for circular references to resolve.
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
var obj = {
|
|
556
|
-
value: undefined,
|
|
557
|
-
node: undefined
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
if (value && _typeof(value) === 'object' && prevObjects) {
|
|
561
|
-
var prev = prevObjects.get(value);
|
|
562
|
-
|
|
563
|
-
if (prev) {
|
|
564
|
-
var alias = new Alias(prev); // leaves source dirty; must be cleaned by caller
|
|
565
|
-
|
|
566
|
-
ctx.aliasNodes.push(alias); // defined along with prevObjects
|
|
567
|
-
|
|
568
|
-
return alias;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
obj.value = value;
|
|
572
|
-
prevObjects.set(value, obj);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new Scalar(value) : value;
|
|
576
|
-
if (tagName && obj.node instanceof Node) obj.node.tag = tagName;
|
|
577
|
-
return obj.node;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
function getSchemaTags(schemas, knownTags, customTags, schemaId) {
|
|
581
|
-
var tags = schemas[schemaId.replace(/\W/g, '')]; // 'yaml-1.1' -> 'yaml11'
|
|
582
|
-
|
|
583
|
-
if (!tags) {
|
|
584
|
-
var keys = Object.keys(schemas).map(function (key) {
|
|
585
|
-
return JSON.stringify(key);
|
|
586
|
-
}).join(', ');
|
|
587
|
-
throw new Error("Unknown schema \"".concat(schemaId, "\"; use one of ").concat(keys));
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
if (Array.isArray(customTags)) {
|
|
591
|
-
var _iterator = _createForOfIteratorHelper(customTags),
|
|
592
|
-
_step;
|
|
593
|
-
|
|
594
|
-
try {
|
|
595
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
596
|
-
var tag = _step.value;
|
|
597
|
-
tags = tags.concat(tag);
|
|
598
|
-
}
|
|
599
|
-
} catch (err) {
|
|
600
|
-
_iterator.e(err);
|
|
601
|
-
} finally {
|
|
602
|
-
_iterator.f();
|
|
603
|
-
}
|
|
604
|
-
} else if (typeof customTags === 'function') {
|
|
605
|
-
tags = customTags(tags.slice());
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
for (var i = 0; i < tags.length; ++i) {
|
|
609
|
-
var _tag = tags[i];
|
|
610
|
-
|
|
611
|
-
if (typeof _tag === 'string') {
|
|
612
|
-
var tagObj = knownTags[_tag];
|
|
613
|
-
|
|
614
|
-
if (!tagObj) {
|
|
615
|
-
var _keys = Object.keys(knownTags).map(function (key) {
|
|
616
|
-
return JSON.stringify(key);
|
|
617
|
-
}).join(', ');
|
|
618
|
-
|
|
619
|
-
throw new Error("Unknown custom tag \"".concat(_tag, "\"; use one of ").concat(_keys));
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
tags[i] = tagObj;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
return tags;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
var sortMapEntriesByKey = function sortMapEntriesByKey(a, b) {
|
|
630
|
-
return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
var Schema = /*#__PURE__*/function () {
|
|
634
|
-
// TODO: remove in v2
|
|
635
|
-
// TODO: remove in v2
|
|
636
|
-
function Schema(_ref) {
|
|
637
|
-
var customTags = _ref.customTags,
|
|
638
|
-
merge = _ref.merge,
|
|
639
|
-
schema = _ref.schema,
|
|
640
|
-
sortMapEntries = _ref.sortMapEntries,
|
|
641
|
-
deprecatedCustomTags = _ref.tags;
|
|
642
|
-
|
|
643
|
-
_classCallCheck(this, Schema);
|
|
644
|
-
|
|
645
|
-
this.merge = !!merge;
|
|
646
|
-
this.name = schema;
|
|
647
|
-
this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;
|
|
648
|
-
if (!customTags && deprecatedCustomTags) warnOptionDeprecation('tags', 'customTags');
|
|
649
|
-
this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
_createClass(Schema, [{
|
|
653
|
-
key: "createNode",
|
|
654
|
-
value: function createNode$1(value, wrapScalars, tagName, ctx) {
|
|
655
|
-
var baseCtx = {
|
|
656
|
-
defaultPrefix: Schema.defaultPrefix,
|
|
657
|
-
schema: this,
|
|
658
|
-
wrapScalars: wrapScalars
|
|
659
|
-
};
|
|
660
|
-
var createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;
|
|
661
|
-
return createNode(value, tagName, createCtx);
|
|
662
|
-
}
|
|
663
|
-
}, {
|
|
664
|
-
key: "createPair",
|
|
665
|
-
value: function createPair(key, value, ctx) {
|
|
666
|
-
if (!ctx) ctx = {
|
|
667
|
-
wrapScalars: true
|
|
668
|
-
};
|
|
669
|
-
var k = this.createNode(key, ctx.wrapScalars, null, ctx);
|
|
670
|
-
var v = this.createNode(value, ctx.wrapScalars, null, ctx);
|
|
671
|
-
return new Pair(k, v);
|
|
672
|
-
}
|
|
673
|
-
}]);
|
|
674
|
-
|
|
675
|
-
return Schema;
|
|
676
|
-
}();
|
|
677
|
-
|
|
678
|
-
_defineProperty(Schema, "defaultPrefix", defaultTagPrefix);
|
|
679
|
-
|
|
680
|
-
_defineProperty(Schema, "defaultTags", defaultTags);
|
|
681
|
-
|
|
682
|
-
export { Schema as S };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "type": "module" }
|