@skmtc/core 0.0.223 → 0.0.225
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/{script → esm}/_dnt.polyfills.js +1 -2
- package/{script → esm}/_dnt.shims.js +4 -8
- package/{script → esm}/context/CoreContext.js +24 -28
- package/{script → esm}/context/GenerateContext.js +13 -17
- package/{script → esm}/context/LogStore.js +1 -5
- package/{script → esm}/context/ParseContext.js +1 -5
- package/{script → esm}/context/RenderContext.js +17 -47
- package/{script → esm}/context/Trail.js +1 -5
- package/esm/context/types.js +1 -0
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/_validate_binary_like.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/ascii85.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base32.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base58.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64.js +4 -8
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/base64url.js +3 -30
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/hex.js +4 -8
- package/esm/deps/jsr.io/@std/encoding/1.0.1/mod.js +22 -0
- package/{script → esm}/deps/jsr.io/@std/encoding/1.0.1/varint.js +8 -14
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/assert_path.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/basename.js +5 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/common.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/format.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/from_file_url.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/glob_to_reg_exp.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/normalize_string.js +6 -9
- package/esm/deps/jsr.io/@std/path/1.0.0/_common/relative.js +9 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/strip_trailing_separators.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/_common/to_file_url.js +1 -4
- package/esm/deps/jsr.io/@std/path/1.0.0/_os.js +14 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/basename.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/common.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/constants.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/dirname.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/extname.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/format.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/from_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/glob_to_regexp.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_absolute.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/is_glob.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/join_globs.js +7 -10
- package/esm/deps/jsr.io/@std/path/1.0.0/mod.js +54 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/normalize_glob.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/parse.js +5 -8
- package/esm/deps/jsr.io/@std/path/1.0.0/posix/_util.js +8 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/basename.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/constants.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/dirname.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/extname.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/format.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/from_file_url.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/glob_to_regexp.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/is_absolute.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/join_globs.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize.js +8 -11
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/normalize_glob.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/parse.js +10 -13
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/relative.js +14 -17
- package/esm/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +59 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/posix/to_namespaced_path.js +1 -4
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/relative.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/resolve.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/to_namespaced_path.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/types.js +1 -2
- package/esm/deps/jsr.io/@std/path/1.0.0/windows/_util.js +15 -0
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/basename.js +11 -14
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/constants.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/dirname.js +17 -20
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/extname.js +9 -12
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/format.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/from_file_url.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/glob_to_regexp.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/is_absolute.js +9 -12
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join.js +10 -13
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/join_globs.js +7 -10
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize.js +17 -20
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/normalize_glob.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/parse.js +16 -19
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/relative.js +16 -19
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/resolve.js +17 -43
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_file_url.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/path/1.0.0/windows/to_namespaced_path.js +11 -14
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper.js +10 -36
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_dumper/dumper_state.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_error.js +1 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader.js +9 -36
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_loader/loader_state.js +2 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_mark.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_state.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/binary.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/bool.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/float.js +5 -8
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/function.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/int.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/map.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/merge.js +2 -5
- package/esm/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +20 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/nil.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/omap.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/pairs.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/regexp.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/seq.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/set.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/str.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/timestamp.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_type/undefined.js +2 -5
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/_utils.js +15 -32
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/mod.js +4 -20
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/parse.js +5 -9
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/core.js +4 -7
- package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +15 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/extended.js +6 -9
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/failsafe.js +4 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema/json.js +6 -9
- package/esm/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +10 -0
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/schema.js +3 -7
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/stringify.js +3 -6
- package/{script → esm}/deps/jsr.io/@std/yaml/0.215.0/type.js +1 -5
- package/{script → esm}/dsl/ContentSettings.js +1 -5
- package/{script → esm}/dsl/Definition.js +4 -8
- package/{script → esm}/dsl/GeneratedValueList.js +3 -7
- package/{script → esm}/dsl/Identifier.js +8 -12
- package/{script → esm}/dsl/Import.js +2 -7
- package/esm/dsl/ModelCreator.js +1 -0
- package/{script → esm}/dsl/ModelDriver.js +14 -18
- package/esm/dsl/OperationCreator.js +1 -0
- package/{script → esm}/dsl/OperationDriver.js +11 -15
- package/esm/dsl/Stringable.js +1 -0
- package/{script → esm}/dsl/ValueBase.js +1 -5
- package/{script → esm}/dsl/base.js +5 -13
- package/esm/dsl/constants.js +1 -0
- package/{script → esm}/dsl/withConfig.js +9 -15
- package/esm/generate/generate.js +47 -0
- package/esm/generate/generateModels.js +29 -0
- package/esm/generate/generateOperations.js +35 -0
- package/{script → esm}/helpers/logStatus.js +2 -7
- package/esm/helpers/naming.js +25 -0
- package/esm/helpers/refFns.js +24 -0
- package/esm/helpers/strings.js +6 -0
- package/{script → esm}/helpers/verifyType.js +1 -4
- package/esm/mod.js +61 -0
- package/{script → esm}/oas/array/Array.js +2 -6
- package/esm/oas/array/array-types.js +17 -0
- package/esm/oas/array/toArray.js +20 -0
- package/{script → esm}/oas/boolean/Boolean.js +2 -6
- package/esm/oas/boolean/boolean-types.js +8 -0
- package/esm/oas/boolean/toBoolean.js +10 -0
- package/{script → esm}/oas/components/Components.js +2 -6
- package/esm/oas/components/toComponentsV3.js +44 -0
- package/esm/oas/contact/contact-types.js +7 -0
- package/{script → esm}/oas/discriminator/Discriminator.js +2 -6
- package/esm/oas/discriminator/discriminator-types.js +6 -0
- package/esm/oas/discriminator/toDiscriminatorV3.js +11 -0
- package/{script → esm}/oas/document/Document.js +2 -6
- package/esm/oas/document/toDocumentV3.js +24 -0
- package/{script → esm}/oas/example/Example.js +2 -6
- package/esm/oas/example/example-types.js +9 -0
- package/esm/oas/example/toExamplesV3.js +45 -0
- package/{script → esm}/oas/header/Header.js +2 -6
- package/esm/oas/header/toHeadersV3.js +42 -0
- package/{script → esm}/oas/info/Info.js +2 -6
- package/{script → esm}/oas/info/toInfoV3.js +3 -7
- package/{script → esm}/oas/integer/Integer.js +2 -6
- package/esm/oas/integer/integer-types.js +18 -0
- package/esm/oas/integer/toInteger.js +13 -0
- package/{script → esm}/oas/intersection/Intersection.js +2 -6
- package/esm/oas/intersection/intersection-types.js +12 -0
- package/esm/oas/intersection/toIntersection.js +22 -0
- package/esm/oas/license/license-types.js +7 -0
- package/esm/oas/markdown/markdown-types.js +2 -0
- package/{script → esm}/oas/mediaType/MediaType.js +2 -6
- package/esm/oas/mediaType/mediaType-types.js +12 -0
- package/esm/oas/mediaType/toMediaTypeItemV3.js +37 -0
- package/esm/oas/null/null-types.js +8 -0
- package/{script → esm}/oas/number/Number.js +2 -6
- package/esm/oas/number/number-types.js +14 -0
- package/esm/oas/number/toNumber.js +10 -0
- package/{script → esm}/oas/object/Object.js +4 -8
- package/esm/oas/object/object-types.js +27 -0
- package/esm/oas/object/toAdditionalPropertiesV3.js +14 -0
- package/esm/oas/object/toObject.js +23 -0
- package/{script → esm}/oas/operation/Operation.js +2 -6
- package/{script → esm}/oas/operation/toOperationsV3.js +13 -18
- package/{script → esm}/oas/parameter/Parameter.js +2 -6
- package/esm/oas/parameter/parameter-types.js +38 -0
- package/{script → esm}/oas/parameter/toParameterV3.js +22 -28
- package/{script → esm}/oas/pathItem/PathItem.js +2 -6
- package/esm/oas/pathItem/toPathItemV3.js +15 -0
- package/{script → esm}/oas/ref/Ref.js +6 -10
- package/esm/oas/ref/ref-types.js +54 -0
- package/esm/oas/ref/toRefV31.js +11 -0
- package/{script → esm}/oas/requestBody/RequestBody.js +2 -6
- package/esm/oas/requestBody/toRequestBodiesV3.js +46 -0
- package/{script → esm}/oas/response/Response.js +2 -6
- package/esm/oas/response/toResponseV3.js +35 -0
- package/esm/oas/schema/Schema.js +1 -0
- package/esm/oas/schema/schema-types.js +23 -0
- package/esm/oas/schema/toSchemasV3.js +60 -0
- package/{script → esm}/oas/string/String.js +2 -6
- package/esm/oas/string/string-types.js +29 -0
- package/esm/oas/string/toString.js +11 -0
- package/{script → esm}/oas/tag/Tag.js +2 -6
- package/esm/oas/tag/toTagsV3.js +14 -0
- package/{script → esm}/oas/union/Union.js +2 -6
- package/esm/oas/union/toUnion.js +22 -0
- package/esm/oas/union/union-types.js +12 -0
- package/{script → esm}/oas/unknown/Unknown.js +2 -6
- package/esm/oas/unknown/toUnknown.js +9 -0
- package/esm/oas/unknown/unknown-types.js +8 -0
- package/{script → esm}/oas/void/Void.js +4 -8
- package/{script → esm}/oas-elements/OasBase.js +1 -5
- package/esm/package.json +3 -0
- package/esm/parse/parse.js +16 -0
- package/{script → esm}/schemas/client.js +2 -4
- package/{script → esm}/server/createServer.js +24 -51
- package/esm/types/Brand.js +1 -0
- package/{script → esm}/types/CustomValue.js +3 -8
- package/esm/types/GeneratedValue.js +1 -0
- package/{script → esm}/types/GenerationType.js +1 -2
- package/esm/types/GeneratorKeys.js +13 -0
- package/esm/types/Method.js +32 -0
- package/esm/types/Modifiers.js +1 -0
- package/esm/types/RefName.js +1 -0
- package/esm/types/Settings.js +42 -0
- package/esm/types/TypeSystem.js +1 -0
- package/esm/types/prettierConfig.js +46 -0
- package/{script → esm}/typescript/EntityType.js +3 -7
- package/{script → esm}/typescript/FunctionParameter.js +10 -17
- package/{script → esm}/typescript/ReactRouterPathParams.js +2 -6
- package/esm/typescript/identifiers.js +7 -0
- package/esm/typescript/keyValues.js +11 -0
- package/{script → esm}/typescript/toDestructuredObject.js +1 -5
- package/{script → esm}/typescript/toOperationArg.js +7 -14
- package/esm/typescript/toOperationResponse.js +17 -0
- package/esm/typescript/toParamsObject.js +12 -0
- package/esm/typescript/toPathTemplate.js +3 -0
- package/esm/typescript/withDescription.js +3 -0
- package/package.json +14 -8
- package/types/types/Method.d.ts +1 -0
- package/types/types/Method.d.ts.map +1 -1
- package/script/context/types.js +0 -2
- package/script/deps/jsr.io/@std/encoding/1.0.1/mod.js +0 -38
- package/script/deps/jsr.io/@std/path/1.0.0/_common/constants.js +0 -49
- package/script/deps/jsr.io/@std/path/1.0.0/_common/dirname.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/_common/normalize.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/_common/relative.js +0 -12
- package/script/deps/jsr.io/@std/path/1.0.0/_os.js +0 -40
- package/script/deps/jsr.io/@std/path/1.0.0/mod.js +0 -70
- package/script/deps/jsr.io/@std/path/1.0.0/posix/_util.js +0 -11
- package/script/deps/jsr.io/@std/path/1.0.0/posix/resolve.js +0 -85
- package/script/deps/jsr.io/@std/path/1.0.0/windows/_util.js +0 -20
- package/script/deps/jsr.io/@std/yaml/0.215.0/_type/mod.js +0 -39
- package/script/deps/jsr.io/@std/yaml/0.215.0/schema/default.js +0 -18
- package/script/deps/jsr.io/@std/yaml/0.215.0/schema/mod.js +0 -18
- package/script/dsl/ModelCreator.js +0 -2
- package/script/dsl/OperationCreator.js +0 -2
- package/script/dsl/Stringable.js +0 -2
- package/script/dsl/constants.js +0 -4
- package/script/generate/generate.js +0 -75
- package/script/generate/generateModels.js +0 -56
- package/script/generate/generateOperations.js +0 -62
- package/script/helpers/naming.js +0 -33
- package/script/helpers/refFns.js +0 -30
- package/script/helpers/strings.js +0 -11
- package/script/mod.js +0 -77
- package/script/oas/array/array-types.js +0 -20
- package/script/oas/array/toArray.js +0 -24
- package/script/oas/boolean/boolean-types.js +0 -11
- package/script/oas/boolean/toBoolean.js +0 -14
- package/script/oas/components/toComponentsV3.js +0 -48
- package/script/oas/contact/contact-types.js +0 -10
- package/script/oas/discriminator/discriminator-types.js +0 -9
- package/script/oas/discriminator/toDiscriminatorV3.js +0 -15
- package/script/oas/document/toDocumentV3.js +0 -28
- package/script/oas/example/example-types.js +0 -12
- package/script/oas/example/toExamplesV3.js +0 -51
- package/script/oas/header/toHeadersV3.js +0 -46
- package/script/oas/integer/integer-types.js +0 -21
- package/script/oas/integer/toInteger.js +0 -17
- package/script/oas/intersection/intersection-types.js +0 -15
- package/script/oas/intersection/toIntersection.js +0 -26
- package/script/oas/license/license-types.js +0 -10
- package/script/oas/markdown/markdown-types.js +0 -5
- package/script/oas/mediaType/mediaType-types.js +0 -15
- package/script/oas/mediaType/toMediaTypeItemV3.js +0 -43
- package/script/oas/null/null-types.js +0 -11
- package/script/oas/number/number-types.js +0 -17
- package/script/oas/number/toNumber.js +0 -14
- package/script/oas/object/object-types.js +0 -30
- package/script/oas/object/toAdditionalPropertiesV3.js +0 -18
- package/script/oas/object/toObject.js +0 -27
- package/script/oas/parameter/parameter-types.js +0 -41
- package/script/oas/pathItem/toPathItemV3.js +0 -19
- package/script/oas/ref/ref-types.js +0 -57
- package/script/oas/ref/toRefV31.js +0 -15
- package/script/oas/requestBody/toRequestBodiesV3.js +0 -51
- package/script/oas/response/toResponseV3.js +0 -41
- package/script/oas/schema/Schema.js +0 -2
- package/script/oas/schema/schema-types.js +0 -26
- package/script/oas/schema/toSchemasV3.js +0 -67
- package/script/oas/string/string-types.js +0 -32
- package/script/oas/string/toString.js +0 -15
- package/script/oas/tag/toTagsV3.js +0 -18
- package/script/oas/union/toUnion.js +0 -26
- package/script/oas/union/union-types.js +0 -15
- package/script/oas/unknown/toUnknown.js +0 -13
- package/script/oas/unknown/unknown-types.js +0 -11
- package/script/package.json +0 -3
- package/script/parse/parse.js +0 -20
- package/script/types/Brand.js +0 -2
- package/script/types/GeneratedValue.js +0 -2
- package/script/types/GeneratorKeys.js +0 -19
- package/script/types/Method.js +0 -34
- package/script/types/Modifiers.js +0 -2
- package/script/types/RefName.js +0 -2
- package/script/types/Settings.js +0 -45
- package/script/types/TypeSystem.js +0 -2
- package/script/types/prettierConfig.js +0 -49
- package/script/typescript/identifiers.js +0 -12
- package/script/typescript/keyValues.js +0 -15
- package/script/typescript/toOperationResponse.js +0 -21
- package/script/typescript/toParamsObject.js +0 -16
- package/script/typescript/toPathTemplate.js +0 -7
- package/script/typescript/withDescription.js +0 -7
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
9
|
-
exports.map = new type_js_1.Type("tag:yaml.org,2002:map", {
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
export const map = new Type("tag:yaml.org,2002:map", {
|
|
10
7
|
construct(data) {
|
|
11
8
|
return data !== null ? data : {};
|
|
12
9
|
},
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.merge = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
function resolveYamlMerge(data) {
|
|
10
7
|
return data === "<<" || data === null;
|
|
11
8
|
}
|
|
12
|
-
|
|
9
|
+
export const merge = new Type("tag:yaml.org,2002:merge", {
|
|
13
10
|
kind: "scalar",
|
|
14
11
|
resolve: resolveYamlMerge,
|
|
15
12
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
export { binary } from "./binary.js";
|
|
6
|
+
export { bool } from "./bool.js";
|
|
7
|
+
export { float } from "./float.js";
|
|
8
|
+
export { func } from "./function.js";
|
|
9
|
+
export { int } from "./int.js";
|
|
10
|
+
export { map } from "./map.js";
|
|
11
|
+
export { merge } from "./merge.js";
|
|
12
|
+
export { nil } from "./nil.js";
|
|
13
|
+
export { omap } from "./omap.js";
|
|
14
|
+
export { pairs } from "./pairs.js";
|
|
15
|
+
export { regexp } from "./regexp.js";
|
|
16
|
+
export { seq } from "./seq.js";
|
|
17
|
+
export { set } from "./set.js";
|
|
18
|
+
export { str } from "./str.js";
|
|
19
|
+
export { timestamp } from "./timestamp.js";
|
|
20
|
+
export { undefinedType } from "./undefined.js";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.nil = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
function resolveYamlNull(data) {
|
|
10
7
|
const max = data.length;
|
|
11
8
|
return ((max === 1 && data === "~") ||
|
|
@@ -17,7 +14,7 @@ function constructYamlNull() {
|
|
|
17
14
|
function isNull(object) {
|
|
18
15
|
return object === null;
|
|
19
16
|
}
|
|
20
|
-
|
|
17
|
+
export const nil = new Type("tag:yaml.org,2002:null", {
|
|
21
18
|
construct: constructYamlNull,
|
|
22
19
|
defaultStyle: "lowercase",
|
|
23
20
|
kind: "scalar",
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.omap = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
const { hasOwn } = Object;
|
|
10
7
|
const _toString = Object.prototype.toString;
|
|
11
8
|
function resolveYamlOmap(data) {
|
|
@@ -36,7 +33,7 @@ function resolveYamlOmap(data) {
|
|
|
36
33
|
function constructYamlOmap(data) {
|
|
37
34
|
return data !== null ? data : [];
|
|
38
35
|
}
|
|
39
|
-
|
|
36
|
+
export const omap = new Type("tag:yaml.org,2002:omap", {
|
|
40
37
|
construct: constructYamlOmap,
|
|
41
38
|
kind: "sequence",
|
|
42
39
|
resolve: resolveYamlOmap,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.pairs = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
const _toString = Object.prototype.toString;
|
|
10
7
|
function resolveYamlPairs(data) {
|
|
11
8
|
const result = Array.from({ length: data.length });
|
|
@@ -31,7 +28,7 @@ function constructYamlPairs(data) {
|
|
|
31
28
|
}
|
|
32
29
|
return result;
|
|
33
30
|
}
|
|
34
|
-
|
|
31
|
+
export const pairs = new Type("tag:yaml.org,2002:pairs", {
|
|
35
32
|
construct: constructYamlPairs,
|
|
36
33
|
kind: "sequence",
|
|
37
34
|
resolve: resolveYamlPairs,
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported and adapted from js-yaml-js-types v1.0.0:
|
|
3
2
|
// https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.regexp = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
|
|
10
|
-
|
|
7
|
+
export const regexp = new Type("tag:yaml.org,2002:js/regexp", {
|
|
11
8
|
kind: "scalar",
|
|
12
9
|
resolve(data) {
|
|
13
10
|
if ((data === null) || (!data.length)) {
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
9
|
-
exports.seq = new type_js_1.Type("tag:yaml.org,2002:seq", {
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
export const seq = new Type("tag:yaml.org,2002:seq", {
|
|
10
7
|
construct(data) {
|
|
11
8
|
return data !== null ? data : [];
|
|
12
9
|
},
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.set = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
const { hasOwn } = Object;
|
|
10
7
|
function resolveYamlSet(data) {
|
|
11
8
|
if (data === null)
|
|
@@ -21,7 +18,7 @@ function resolveYamlSet(data) {
|
|
|
21
18
|
function constructYamlSet(data) {
|
|
22
19
|
return data !== null ? data : {};
|
|
23
20
|
}
|
|
24
|
-
|
|
21
|
+
export const set = new Type("tag:yaml.org,2002:set", {
|
|
25
22
|
construct: constructYamlSet,
|
|
26
23
|
kind: "mapping",
|
|
27
24
|
resolve: resolveYamlSet,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const type_js_1 = require("../type.js");
|
|
8
|
-
exports.str = new type_js_1.Type("tag:yaml.org,2002:str", {
|
|
4
|
+
import { Type } from "../type.js";
|
|
5
|
+
export const str = new Type("tag:yaml.org,2002:str", {
|
|
9
6
|
construct(data) {
|
|
10
7
|
return data !== null ? data : "";
|
|
11
8
|
},
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.timestamp = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])" + // [1] year
|
|
10
7
|
"-([0-9][0-9])" + // [2] month
|
|
11
8
|
"-([0-9][0-9])$");
|
|
@@ -72,7 +69,7 @@ function constructYamlTimestamp(data) {
|
|
|
72
69
|
function representYamlTimestamp(date) {
|
|
73
70
|
return date.toISOString();
|
|
74
71
|
}
|
|
75
|
-
|
|
72
|
+
export const timestamp = new Type("tag:yaml.org,2002:timestamp", {
|
|
76
73
|
construct: constructYamlTimestamp,
|
|
77
74
|
instanceOf: Date,
|
|
78
75
|
kind: "scalar",
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported and adapted from js-yaml-js-types v1.0.0:
|
|
3
2
|
// https://github.com/nodeca/js-yaml-js-types/tree/ac537e7bbdd3c2cbbd9882ca3919c520c2dc022b
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
9
|
-
exports.undefinedType = new type_js_1.Type("tag:yaml.org,2002:js/undefined", {
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
export const undefinedType = new Type("tag:yaml.org,2002:js/undefined", {
|
|
10
7
|
kind: "scalar",
|
|
11
8
|
resolve() {
|
|
12
9
|
return true;
|
|
@@ -1,74 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
|
|
7
|
-
exports.isNothing = isNothing;
|
|
8
|
-
exports.isArray = isArray;
|
|
9
|
-
exports.isBoolean = isBoolean;
|
|
10
|
-
exports.isNull = isNull;
|
|
11
|
-
exports.isNumber = isNumber;
|
|
12
|
-
exports.isString = isString;
|
|
13
|
-
exports.isSymbol = isSymbol;
|
|
14
|
-
exports.isUndefined = isUndefined;
|
|
15
|
-
exports.isObject = isObject;
|
|
16
|
-
exports.isError = isError;
|
|
17
|
-
exports.isFunction = isFunction;
|
|
18
|
-
exports.isRegExp = isRegExp;
|
|
19
|
-
exports.toArray = toArray;
|
|
20
|
-
exports.repeat = repeat;
|
|
21
|
-
exports.isNegativeZero = isNegativeZero;
|
|
22
|
-
function isNothing(subject) {
|
|
5
|
+
export function isNothing(subject) {
|
|
23
6
|
return typeof subject === "undefined" || subject === null;
|
|
24
7
|
}
|
|
25
|
-
function isArray(value) {
|
|
8
|
+
export function isArray(value) {
|
|
26
9
|
return Array.isArray(value);
|
|
27
10
|
}
|
|
28
|
-
function isBoolean(value) {
|
|
11
|
+
export function isBoolean(value) {
|
|
29
12
|
return typeof value === "boolean" || value instanceof Boolean;
|
|
30
13
|
}
|
|
31
|
-
function isNull(value) {
|
|
14
|
+
export function isNull(value) {
|
|
32
15
|
return value === null;
|
|
33
16
|
}
|
|
34
|
-
function isNumber(value) {
|
|
17
|
+
export function isNumber(value) {
|
|
35
18
|
return typeof value === "number" || value instanceof Number;
|
|
36
19
|
}
|
|
37
|
-
function isString(value) {
|
|
20
|
+
export function isString(value) {
|
|
38
21
|
return typeof value === "string" || value instanceof String;
|
|
39
22
|
}
|
|
40
|
-
function isSymbol(value) {
|
|
23
|
+
export function isSymbol(value) {
|
|
41
24
|
return typeof value === "symbol";
|
|
42
25
|
}
|
|
43
|
-
function isUndefined(value) {
|
|
26
|
+
export function isUndefined(value) {
|
|
44
27
|
return value === undefined;
|
|
45
28
|
}
|
|
46
|
-
function isObject(value) {
|
|
29
|
+
export function isObject(value) {
|
|
47
30
|
return value !== null && typeof value === "object";
|
|
48
31
|
}
|
|
49
|
-
function isError(e) {
|
|
32
|
+
export function isError(e) {
|
|
50
33
|
return e instanceof Error;
|
|
51
34
|
}
|
|
52
|
-
function isFunction(value) {
|
|
35
|
+
export function isFunction(value) {
|
|
53
36
|
return typeof value === "function";
|
|
54
37
|
}
|
|
55
|
-
function isRegExp(value) {
|
|
38
|
+
export function isRegExp(value) {
|
|
56
39
|
return value instanceof RegExp;
|
|
57
40
|
}
|
|
58
|
-
function toArray(sequence) {
|
|
41
|
+
export function toArray(sequence) {
|
|
59
42
|
if (isArray(sequence))
|
|
60
43
|
return sequence;
|
|
61
44
|
if (isNothing(sequence))
|
|
62
45
|
return [];
|
|
63
46
|
return [sequence];
|
|
64
47
|
}
|
|
65
|
-
function repeat(str, count) {
|
|
48
|
+
export function repeat(str, count) {
|
|
66
49
|
let result = "";
|
|
67
50
|
for (let cycle = 0; cycle < count; cycle++) {
|
|
68
51
|
result += str;
|
|
69
52
|
}
|
|
70
53
|
return result;
|
|
71
54
|
}
|
|
72
|
-
function isNegativeZero(i) {
|
|
55
|
+
export function isNegativeZero(i) {
|
|
73
56
|
return i === 0 && Number.NEGATIVE_INFINITY === 1 / i;
|
|
74
57
|
}
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
3
2
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
4
3
|
// This module is browser compatible.
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
4
|
/**
|
|
21
5
|
* {@linkcode parse} and {@linkcode stringify} for handling
|
|
22
6
|
* {@link https://yaml.org/ | YAML} encoded data.
|
|
@@ -61,7 +45,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
61
45
|
*
|
|
62
46
|
* @module
|
|
63
47
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
export * from "./parse.js";
|
|
49
|
+
export * from "./stringify.js";
|
|
50
|
+
export * from "./type.js";
|
|
51
|
+
export * from "./schema/mod.js";
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
exports.parse = parse;
|
|
9
|
-
exports.parseAll = parseAll;
|
|
10
|
-
const loader_js_1 = require("./_loader/loader.js");
|
|
6
|
+
import { load, loadAll } from "./_loader/loader.js";
|
|
11
7
|
/**
|
|
12
8
|
* Parses `content` as single YAML document.
|
|
13
9
|
*
|
|
14
10
|
* Returns a JavaScript object or throws `YAMLError` on error.
|
|
15
11
|
* By default, does not support regexps, functions and undefined. This method is safe for untrusted data.
|
|
16
12
|
*/
|
|
17
|
-
function parse(content, options) {
|
|
18
|
-
return
|
|
13
|
+
export function parse(content, options) {
|
|
14
|
+
return load(content, options);
|
|
19
15
|
}
|
|
20
|
-
function parseAll(content, iterator, options) {
|
|
21
|
-
return
|
|
16
|
+
export function parseAll(content, iterator, options) {
|
|
17
|
+
return loadAll(content, iterator, options);
|
|
22
18
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const schema_js_1 = require("../schema.js");
|
|
10
|
-
const json_js_1 = require("./json.js");
|
|
6
|
+
import { Schema } from "../schema.js";
|
|
7
|
+
import { json } from "./json.js";
|
|
11
8
|
// Standard YAML's Core schema.
|
|
12
9
|
// http://www.yaml.org/spec/1.2/spec.html#id2804923
|
|
13
|
-
|
|
14
|
-
include: [
|
|
10
|
+
export const core = new Schema({
|
|
11
|
+
include: [json],
|
|
15
12
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
import { Schema } from "../schema.js";
|
|
7
|
+
import { binary, merge, omap, pairs, set, timestamp } from "../_type/mod.js";
|
|
8
|
+
import { core } from "./core.js";
|
|
9
|
+
// JS-YAML's default schema for `safeLoad` function.
|
|
10
|
+
// It is not described in the YAML specification.
|
|
11
|
+
export const def = new Schema({
|
|
12
|
+
explicit: [binary, omap, pairs, set],
|
|
13
|
+
implicit: [timestamp, merge],
|
|
14
|
+
include: [core],
|
|
15
|
+
});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
2
|
// This module is browser compatible.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const mod_js_1 = require("../_type/mod.js");
|
|
8
|
-
const default_js_1 = require("./default.js");
|
|
3
|
+
import { Schema } from "../schema.js";
|
|
4
|
+
import { regexp, undefinedType } from "../_type/mod.js";
|
|
5
|
+
import { def } from "./default.js";
|
|
9
6
|
/***
|
|
10
7
|
* Extends JS-YAML default schema with additional JavaScript types
|
|
11
8
|
* It is not described in the YAML specification.
|
|
@@ -34,7 +31,7 @@ const default_js_1 = require("./default.js");
|
|
|
34
31
|
* );
|
|
35
32
|
* ```
|
|
36
33
|
*/
|
|
37
|
-
|
|
38
|
-
explicit: [
|
|
39
|
-
include: [
|
|
34
|
+
export const extended = new Schema({
|
|
35
|
+
explicit: [regexp, undefinedType],
|
|
36
|
+
include: [def],
|
|
40
37
|
});
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const schema_js_1 = require("../schema.js");
|
|
10
|
-
const mod_js_1 = require("../_type/mod.js");
|
|
6
|
+
import { Schema } from "../schema.js";
|
|
7
|
+
import { map, seq, str } from "../_type/mod.js";
|
|
11
8
|
// Standard YAML's Failsafe schema.
|
|
12
9
|
// http://www.yaml.org/spec/1.2/spec.html#id2802346
|
|
13
|
-
|
|
14
|
-
explicit: [
|
|
10
|
+
export const failsafe = new Schema({
|
|
11
|
+
explicit: [str, seq, map],
|
|
15
12
|
});
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const mod_js_1 = require("../_type/mod.js");
|
|
11
|
-
const failsafe_js_1 = require("./failsafe.js");
|
|
6
|
+
import { Schema } from "../schema.js";
|
|
7
|
+
import { bool, float, int, nil } from "../_type/mod.js";
|
|
8
|
+
import { failsafe } from "./failsafe.js";
|
|
12
9
|
// Standard YAML's JSON schema.
|
|
13
10
|
// http://www.yaml.org/spec/1.2/spec.html#id2803231
|
|
14
|
-
|
|
15
|
-
implicit: [
|
|
16
|
-
include: [
|
|
11
|
+
export const json = new Schema({
|
|
12
|
+
implicit: [nil, bool, int, float],
|
|
13
|
+
include: [failsafe],
|
|
17
14
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Ported from js-yaml v3.13.1:
|
|
2
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
3
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
export { core as CORE_SCHEMA } from "./core.js";
|
|
7
|
+
export { def as DEFAULT_SCHEMA } from "./default.js";
|
|
8
|
+
export { extended as EXTENDED_SCHEMA } from "./extended.js";
|
|
9
|
+
export { failsafe as FAILSAFE_SCHEMA } from "./failsafe.js";
|
|
10
|
+
export { json as JSON_SCHEMA } from "./json.js";
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
exports.Schema = void 0;
|
|
9
|
-
const _error_js_1 = require("./_error.js");
|
|
6
|
+
import { YAMLError } from "./_error.js";
|
|
10
7
|
function compileList(schema, name, result) {
|
|
11
8
|
const exclude = [];
|
|
12
9
|
for (const includedSchema of schema.include) {
|
|
@@ -40,7 +37,7 @@ function compileMap(...typesList) {
|
|
|
40
37
|
}
|
|
41
38
|
return result;
|
|
42
39
|
}
|
|
43
|
-
class Schema {
|
|
40
|
+
export class Schema {
|
|
44
41
|
constructor(definition) {
|
|
45
42
|
Object.defineProperty(this, "implicit", {
|
|
46
43
|
enumerable: true,
|
|
@@ -83,7 +80,7 @@ class Schema {
|
|
|
83
80
|
this.include = definition.include || [];
|
|
84
81
|
for (const type of this.implicit) {
|
|
85
82
|
if (type.loadKind && type.loadKind !== "scalar") {
|
|
86
|
-
throw new
|
|
83
|
+
throw new YAMLError("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
this.compiledImplicit = compileList(this, "implicit", []);
|
|
@@ -104,4 +101,3 @@ class Schema {
|
|
|
104
101
|
}
|
|
105
102
|
static create() { }
|
|
106
103
|
}
|
|
107
|
-
exports.Schema = Schema;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
|
|
8
|
-
exports.stringify = stringify;
|
|
9
|
-
const dumper_js_1 = require("./_dumper/dumper.js");
|
|
6
|
+
import { dump } from "./_dumper/dumper.js";
|
|
10
7
|
/**
|
|
11
8
|
* Serializes `object` as a YAML document.
|
|
12
9
|
*
|
|
13
10
|
* You can disable exceptions by setting the skipInvalid option to true.
|
|
14
11
|
*/
|
|
15
|
-
function stringify(obj, options) {
|
|
16
|
-
return
|
|
12
|
+
export function stringify(obj, options) {
|
|
13
|
+
return dump(obj, options);
|
|
17
14
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Ported from js-yaml v3.13.1:
|
|
3
2
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
3
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
5
|
// This module is browser compatible.
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Type = void 0;
|
|
9
6
|
function checkTagFormat(tag) {
|
|
10
7
|
return tag;
|
|
11
8
|
}
|
|
12
|
-
class Type {
|
|
9
|
+
export class Type {
|
|
13
10
|
constructor(tag, options) {
|
|
14
11
|
Object.defineProperty(this, "tag", {
|
|
15
12
|
enumerable: true,
|
|
@@ -84,4 +81,3 @@ class Type {
|
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
83
|
}
|
|
87
|
-
exports.Type = Type;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContentSettings = void 0;
|
|
4
|
-
class ContentSettings {
|
|
1
|
+
export class ContentSettings {
|
|
5
2
|
constructor({ name, selected, exportPath, importFrom }) {
|
|
6
3
|
Object.defineProperty(this, "name", {
|
|
7
4
|
enumerable: true,
|
|
@@ -41,4 +38,3 @@ class ContentSettings {
|
|
|
41
38
|
});
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
|
-
exports.ContentSettings = ContentSettings;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const ValueBase_js_1 = require("./ValueBase.js");
|
|
5
|
-
const withDescription_js_1 = require("../typescript/withDescription.js");
|
|
6
|
-
class Definition extends ValueBase_js_1.ValueBase {
|
|
1
|
+
import { ValueBase } from './ValueBase.js';
|
|
2
|
+
import { withDescription } from '../typescript/withDescription.js';
|
|
3
|
+
export class Definition extends ValueBase {
|
|
7
4
|
constructor({ context, identifier, value, description }) {
|
|
8
5
|
super({ context, generatorKey: value.generatorKey });
|
|
9
6
|
Object.defineProperty(this, "identifier", {
|
|
@@ -33,9 +30,8 @@ class Definition extends ValueBase_js_1.ValueBase {
|
|
|
33
30
|
? `${this.identifier.name}: ${this.identifier.tsType}`
|
|
34
31
|
: this.identifier.name;
|
|
35
32
|
// @TODO move syntax to typescript package to enable language agnostic use
|
|
36
|
-
return
|
|
33
|
+
return withDescription(`export ${this.identifier.entityType} ${identifier} = ${this.value};`, {
|
|
37
34
|
description: this.description
|
|
38
35
|
});
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
|
-
exports.Definition = Definition;
|