@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,36 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.resolve = resolve;
|
|
27
1
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
28
2
|
// This module is browser compatible.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
3
|
+
import * as dntShim from "../../../../../../_dnt.shims.js";
|
|
4
|
+
import { CHAR_COLON } from "../_common/constants.js";
|
|
5
|
+
import { normalizeString } from "../_common/normalize_string.js";
|
|
6
|
+
import { assertPath } from "../_common/assert_path.js";
|
|
7
|
+
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
|
34
8
|
/**
|
|
35
9
|
* Resolves path segments into a `path`.
|
|
36
10
|
*
|
|
@@ -46,7 +20,7 @@ const _util_js_1 = require("./_util.js");
|
|
|
46
20
|
* @param pathSegments The path segments to process to path
|
|
47
21
|
* @returns The resolved path
|
|
48
22
|
*/
|
|
49
|
-
function resolve(...pathSegments) {
|
|
23
|
+
export function resolve(...pathSegments) {
|
|
50
24
|
let resolvedDevice = "";
|
|
51
25
|
let resolvedTail = "";
|
|
52
26
|
let resolvedAbsolute = false;
|
|
@@ -75,7 +49,7 @@ function resolve(...pathSegments) {
|
|
|
75
49
|
path = `${resolvedDevice}\\`;
|
|
76
50
|
}
|
|
77
51
|
}
|
|
78
|
-
|
|
52
|
+
assertPath(path);
|
|
79
53
|
const len = path.length;
|
|
80
54
|
// Skip empty entries
|
|
81
55
|
if (len === 0)
|
|
@@ -86,18 +60,18 @@ function resolve(...pathSegments) {
|
|
|
86
60
|
const code = path.charCodeAt(0);
|
|
87
61
|
// Try to match a root
|
|
88
62
|
if (len > 1) {
|
|
89
|
-
if (
|
|
63
|
+
if (isPathSeparator(code)) {
|
|
90
64
|
// Possible UNC root
|
|
91
65
|
// If we started with a separator, we know we at least have an
|
|
92
66
|
// absolute path of some kind (UNC or otherwise)
|
|
93
67
|
isAbsolute = true;
|
|
94
|
-
if (
|
|
68
|
+
if (isPathSeparator(path.charCodeAt(1))) {
|
|
95
69
|
// Matched double path separator at beginning
|
|
96
70
|
let j = 2;
|
|
97
71
|
let last = j;
|
|
98
72
|
// Match 1 or more non-path separators
|
|
99
73
|
for (; j < len; ++j) {
|
|
100
|
-
if (
|
|
74
|
+
if (isPathSeparator(path.charCodeAt(j)))
|
|
101
75
|
break;
|
|
102
76
|
}
|
|
103
77
|
if (j < len && j !== last) {
|
|
@@ -106,7 +80,7 @@ function resolve(...pathSegments) {
|
|
|
106
80
|
last = j;
|
|
107
81
|
// Match 1 or more path separators
|
|
108
82
|
for (; j < len; ++j) {
|
|
109
|
-
if (!
|
|
83
|
+
if (!isPathSeparator(path.charCodeAt(j)))
|
|
110
84
|
break;
|
|
111
85
|
}
|
|
112
86
|
if (j < len && j !== last) {
|
|
@@ -114,7 +88,7 @@ function resolve(...pathSegments) {
|
|
|
114
88
|
last = j;
|
|
115
89
|
// Match 1 or more non-path separators
|
|
116
90
|
for (; j < len; ++j) {
|
|
117
|
-
if (
|
|
91
|
+
if (isPathSeparator(path.charCodeAt(j)))
|
|
118
92
|
break;
|
|
119
93
|
}
|
|
120
94
|
if (j === len) {
|
|
@@ -134,13 +108,13 @@ function resolve(...pathSegments) {
|
|
|
134
108
|
rootEnd = 1;
|
|
135
109
|
}
|
|
136
110
|
}
|
|
137
|
-
else if (
|
|
111
|
+
else if (isWindowsDeviceRoot(code)) {
|
|
138
112
|
// Possible device root
|
|
139
|
-
if (path.charCodeAt(1) ===
|
|
113
|
+
if (path.charCodeAt(1) === CHAR_COLON) {
|
|
140
114
|
device = path.slice(0, 2);
|
|
141
115
|
rootEnd = 2;
|
|
142
116
|
if (len > 2) {
|
|
143
|
-
if (
|
|
117
|
+
if (isPathSeparator(path.charCodeAt(2))) {
|
|
144
118
|
// Treat separator following drive name as an absolute path
|
|
145
119
|
// indicator
|
|
146
120
|
isAbsolute = true;
|
|
@@ -150,7 +124,7 @@ function resolve(...pathSegments) {
|
|
|
150
124
|
}
|
|
151
125
|
}
|
|
152
126
|
}
|
|
153
|
-
else if (
|
|
127
|
+
else if (isPathSeparator(code)) {
|
|
154
128
|
// `path` contains just a path separator
|
|
155
129
|
rootEnd = 1;
|
|
156
130
|
isAbsolute = true;
|
|
@@ -175,6 +149,6 @@ function resolve(...pathSegments) {
|
|
|
175
149
|
// but handle relative paths to be safe (might happen when Deno.cwd()
|
|
176
150
|
// fails)
|
|
177
151
|
// Normalize the tail path
|
|
178
|
-
resolvedTail =
|
|
152
|
+
resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator);
|
|
179
153
|
return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
|
|
180
154
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
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
|
-
const to_file_url_js_1 = require("../_common/to_file_url.js");
|
|
7
|
-
const is_absolute_js_1 = require("./is_absolute.js");
|
|
3
|
+
import { encodeWhitespace } from "../_common/to_file_url.js";
|
|
4
|
+
import { isAbsolute } from "./is_absolute.js";
|
|
8
5
|
/**
|
|
9
6
|
* Converts a path string to a file URL.
|
|
10
7
|
*
|
|
@@ -20,13 +17,13 @@ const is_absolute_js_1 = require("./is_absolute.js");
|
|
|
20
17
|
* @param path The path to convert.
|
|
21
18
|
* @returns The file URL.
|
|
22
19
|
*/
|
|
23
|
-
function toFileUrl(path) {
|
|
24
|
-
if (!
|
|
20
|
+
export function toFileUrl(path) {
|
|
21
|
+
if (!isAbsolute(path)) {
|
|
25
22
|
throw new TypeError("Must be an absolute path.");
|
|
26
23
|
}
|
|
27
24
|
const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
|
|
28
25
|
const url = new URL("file:///");
|
|
29
|
-
url.pathname =
|
|
26
|
+
url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25"));
|
|
30
27
|
if (hostname !== undefined && hostname !== "localhost") {
|
|
31
28
|
url.hostname = hostname;
|
|
32
29
|
if (!url.hostname) {
|
|
@@ -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 _util_js_1 = require("./_util.js");
|
|
8
|
-
const resolve_js_1 = require("./resolve.js");
|
|
3
|
+
import { CHAR_BACKWARD_SLASH, CHAR_COLON, CHAR_DOT, CHAR_QUESTION_MARK, } from "../_common/constants.js";
|
|
4
|
+
import { isWindowsDeviceRoot } from "./_util.js";
|
|
5
|
+
import { resolve } from "./resolve.js";
|
|
9
6
|
/**
|
|
10
7
|
* Resolves path to a namespace path
|
|
11
8
|
*
|
|
@@ -21,28 +18,28 @@ const resolve_js_1 = require("./resolve.js");
|
|
|
21
18
|
* @param path The path to resolve to namespaced path
|
|
22
19
|
* @returns The resolved namespaced path
|
|
23
20
|
*/
|
|
24
|
-
function toNamespacedPath(path) {
|
|
21
|
+
export function toNamespacedPath(path) {
|
|
25
22
|
// Note: this will *probably* throw somewhere.
|
|
26
23
|
if (typeof path !== "string")
|
|
27
24
|
return path;
|
|
28
25
|
if (path.length === 0)
|
|
29
26
|
return "";
|
|
30
|
-
const resolvedPath =
|
|
27
|
+
const resolvedPath = resolve(path);
|
|
31
28
|
if (resolvedPath.length >= 3) {
|
|
32
|
-
if (resolvedPath.charCodeAt(0) ===
|
|
29
|
+
if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {
|
|
33
30
|
// Possible UNC root
|
|
34
|
-
if (resolvedPath.charCodeAt(1) ===
|
|
31
|
+
if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {
|
|
35
32
|
const code = resolvedPath.charCodeAt(2);
|
|
36
|
-
if (code !==
|
|
33
|
+
if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {
|
|
37
34
|
// Matched non-long UNC root, convert the path to a long UNC path
|
|
38
35
|
return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
|
-
else if (
|
|
39
|
+
else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {
|
|
43
40
|
// Possible device root
|
|
44
|
-
if (resolvedPath.charCodeAt(1) ===
|
|
45
|
-
resolvedPath.charCodeAt(2) ===
|
|
41
|
+
if (resolvedPath.charCodeAt(1) === CHAR_COLON &&
|
|
42
|
+
resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
|
|
46
43
|
// Matched device root, convert the path to a long UNC path
|
|
47
44
|
return `\\\\?\\${resolvedPath}`;
|
|
48
45
|
}
|
|
@@ -1,36 +1,10 @@
|
|
|
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
|
-
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.dump = dump;
|
|
31
|
-
const _error_js_1 = require("../_error.js");
|
|
32
|
-
const common = __importStar(require("../_utils.js"));
|
|
33
|
-
const dumper_state_js_1 = require("./dumper_state.js");
|
|
5
|
+
import { YAMLError } from "../_error.js";
|
|
6
|
+
import * as common from "../_utils.js";
|
|
7
|
+
import { DumperState } from "./dumper_state.js";
|
|
34
8
|
const _toString = Object.prototype.toString;
|
|
35
9
|
const { hasOwn } = Object;
|
|
36
10
|
const CHAR_TAB = 0x09; /* Tab */
|
|
@@ -106,7 +80,7 @@ function encodeHex(character) {
|
|
|
106
80
|
length = 8;
|
|
107
81
|
}
|
|
108
82
|
else {
|
|
109
|
-
throw new
|
|
83
|
+
throw new YAMLError("code point within a string may not be greater than 0xFFFFFFFF");
|
|
110
84
|
}
|
|
111
85
|
return `\\${handle}${common.repeat("0", length - string.length)}${string}`;
|
|
112
86
|
}
|
|
@@ -437,7 +411,7 @@ function writeScalar(state, string, level, iskey) {
|
|
|
437
411
|
case STYLE_DOUBLE:
|
|
438
412
|
return `"${escapeString(string)}"`;
|
|
439
413
|
default:
|
|
440
|
-
throw new
|
|
414
|
+
throw new YAMLError("impossible error: invalid scalar style");
|
|
441
415
|
}
|
|
442
416
|
})();
|
|
443
417
|
}
|
|
@@ -516,7 +490,7 @@ function writeBlockMapping(state, level, object, compact = false) {
|
|
|
516
490
|
}
|
|
517
491
|
else if (state.sortKeys) {
|
|
518
492
|
// Something is wrong
|
|
519
|
-
throw new
|
|
493
|
+
throw new YAMLError("sortKeys must be a boolean or a function");
|
|
520
494
|
}
|
|
521
495
|
let pairBuffer = "", objectKey, objectValue, explicitPair;
|
|
522
496
|
for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
@@ -580,7 +554,7 @@ function detectType(state, object, explicit = false) {
|
|
|
580
554
|
_result = type.represent[style](object, style);
|
|
581
555
|
}
|
|
582
556
|
else {
|
|
583
|
-
throw new
|
|
557
|
+
throw new YAMLError(`!<${type.tag}> tag resolver accepts not "${style}" style`);
|
|
584
558
|
}
|
|
585
559
|
state.dump = _result;
|
|
586
560
|
}
|
|
@@ -658,7 +632,7 @@ function writeNode(state, level, object, block, compact, iskey = false) {
|
|
|
658
632
|
else {
|
|
659
633
|
if (state.skipInvalid)
|
|
660
634
|
return false;
|
|
661
|
-
throw new
|
|
635
|
+
throw new YAMLError(`unacceptable kind of an object to dump ${type}`);
|
|
662
636
|
}
|
|
663
637
|
if (state.tag !== null && state.tag !== "?") {
|
|
664
638
|
state.dump = `!<${state.tag}> ${state.dump}`;
|
|
@@ -699,9 +673,9 @@ function getDuplicateReferences(object, state) {
|
|
|
699
673
|
}
|
|
700
674
|
state.usedDuplicates = Array.from({ length });
|
|
701
675
|
}
|
|
702
|
-
function dump(input, options) {
|
|
676
|
+
export function dump(input, options) {
|
|
703
677
|
options = options || {};
|
|
704
|
-
const state = new
|
|
678
|
+
const state = new DumperState(options);
|
|
705
679
|
if (!state.noRefs)
|
|
706
680
|
getDuplicateReferences(input, state);
|
|
707
681
|
if (writeNode(state, 0, input, true, true))
|
|
@@ -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.DumperState = void 0;
|
|
8
|
-
const _state_js_1 = require("../_state.js");
|
|
5
|
+
import { State } from "../_state.js";
|
|
9
6
|
const { hasOwn } = Object;
|
|
10
7
|
function compileStyleMap(schema, map) {
|
|
11
8
|
if (typeof map === "undefined" || map === null)
|
|
@@ -30,7 +27,7 @@ function compileStyleMap(schema, map) {
|
|
|
30
27
|
}
|
|
31
28
|
return result;
|
|
32
29
|
}
|
|
33
|
-
class DumperState extends
|
|
30
|
+
export class DumperState extends State {
|
|
34
31
|
constructor({ schema, indent = 2, noArrayIndent = false, skipInvalid = false, flowLevel = -1, styles = null, sortKeys = false, lineWidth = 80, noRefs = false, noCompatMode = false, condenseFlow = false, }) {
|
|
35
32
|
super(schema);
|
|
36
33
|
Object.defineProperty(this, "indent", {
|
|
@@ -149,4 +146,3 @@ class DumperState extends _state_js_1.State {
|
|
|
149
146
|
this.explicitTypes = this.schema.compiledExplicit;
|
|
150
147
|
}
|
|
151
148
|
}
|
|
152
|
-
exports.DumperState = DumperState;
|
|
@@ -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.YAMLError = void 0;
|
|
8
|
-
class YAMLError extends Error {
|
|
5
|
+
export class YAMLError extends Error {
|
|
9
6
|
constructor(message = "(unknown reason)", mark = "") {
|
|
10
7
|
super(`${message} ${mark}`);
|
|
11
8
|
Object.defineProperty(this, "mark", {
|
|
@@ -20,4 +17,3 @@ class YAMLError extends Error {
|
|
|
20
17
|
return `${this.name}: ${this.message} ${this.mark}`;
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
|
-
exports.YAMLError = YAMLError;
|
|
@@ -1,38 +1,11 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.loadAll = loadAll;
|
|
31
|
-
exports.load = load;
|
|
32
|
-
const _error_js_1 = require("../_error.js");
|
|
33
|
-
const _mark_js_1 = require("../_mark.js");
|
|
34
|
-
const common = __importStar(require("../_utils.js"));
|
|
35
|
-
const loader_state_js_1 = require("./loader_state.js");
|
|
5
|
+
import { YAMLError } from "../_error.js";
|
|
6
|
+
import { Mark } from "../_mark.js";
|
|
7
|
+
import * as common from "../_utils.js";
|
|
8
|
+
import { LoaderState } from "./loader_state.js";
|
|
36
9
|
const { hasOwn } = Object;
|
|
37
10
|
const CONTEXT_FLOW_IN = 1;
|
|
38
11
|
const CONTEXT_FLOW_OUT = 2;
|
|
@@ -152,7 +125,7 @@ for (let i = 0; i < 256; i++) {
|
|
|
152
125
|
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
153
126
|
}
|
|
154
127
|
function generateError(state, message) {
|
|
155
|
-
return new
|
|
128
|
+
return new YAMLError(message, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart));
|
|
156
129
|
}
|
|
157
130
|
function throwError(state, message) {
|
|
158
131
|
throw generateError(state, message);
|
|
@@ -1286,7 +1259,7 @@ function loadDocuments(input, options) {
|
|
|
1286
1259
|
input = input.slice(1);
|
|
1287
1260
|
}
|
|
1288
1261
|
}
|
|
1289
|
-
const state = new
|
|
1262
|
+
const state = new LoaderState(input, options);
|
|
1290
1263
|
// Use 0 as string terminator. That significantly simplifies bounds check.
|
|
1291
1264
|
state.input += "\0";
|
|
1292
1265
|
while (state.input.charCodeAt(state.position) === 0x20 /* Space */) {
|
|
@@ -1301,7 +1274,7 @@ function loadDocuments(input, options) {
|
|
|
1301
1274
|
function isCbFunction(fn) {
|
|
1302
1275
|
return typeof fn === "function";
|
|
1303
1276
|
}
|
|
1304
|
-
function loadAll(input, iteratorOrOption, options) {
|
|
1277
|
+
export function loadAll(input, iteratorOrOption, options) {
|
|
1305
1278
|
if (!isCbFunction(iteratorOrOption)) {
|
|
1306
1279
|
return loadDocuments(input, iteratorOrOption);
|
|
1307
1280
|
}
|
|
@@ -1312,7 +1285,7 @@ function loadAll(input, iteratorOrOption, options) {
|
|
|
1312
1285
|
}
|
|
1313
1286
|
return void 0;
|
|
1314
1287
|
}
|
|
1315
|
-
function load(input, options) {
|
|
1288
|
+
export function load(input, options) {
|
|
1316
1289
|
const documents = loadDocuments(input, options);
|
|
1317
1290
|
if (documents.length === 0) {
|
|
1318
1291
|
return null;
|
|
@@ -1320,5 +1293,5 @@ function load(input, options) {
|
|
|
1320
1293
|
if (documents.length === 1) {
|
|
1321
1294
|
return documents[0];
|
|
1322
1295
|
}
|
|
1323
|
-
throw new
|
|
1296
|
+
throw new YAMLError("expected a single document in the stream, but found more");
|
|
1324
1297
|
}
|
|
@@ -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 _state_js_1 = require("../_state.js");
|
|
9
|
-
class LoaderState extends _state_js_1.State {
|
|
5
|
+
import { State } from "../_state.js";
|
|
6
|
+
export class LoaderState extends State {
|
|
10
7
|
constructor(input, { filename, schema, onWarning, legacy = false, json = false, listener = null, }) {
|
|
11
8
|
super(schema);
|
|
12
9
|
Object.defineProperty(this, "input", {
|
|
@@ -151,4 +148,3 @@ class LoaderState extends _state_js_1.State {
|
|
|
151
148
|
this.length = input.length;
|
|
152
149
|
}
|
|
153
150
|
}
|
|
154
|
-
exports.LoaderState = LoaderState;
|
|
@@ -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 _utils_js_1 = require("./_utils.js");
|
|
9
|
-
class Mark {
|
|
5
|
+
import { repeat } from "./_utils.js";
|
|
6
|
+
export class Mark {
|
|
10
7
|
constructor(name, buffer, position, line, column) {
|
|
11
8
|
Object.defineProperty(this, "name", {
|
|
12
9
|
enumerable: true,
|
|
@@ -65,7 +62,7 @@ class Mark {
|
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
const snippet = this.buffer.slice(start, end);
|
|
68
|
-
return `${
|
|
65
|
+
return `${repeat(" ", indent)}${head}${snippet}${tail}\n${repeat(" ", indent + this.position - start + head.length)}^`;
|
|
69
66
|
}
|
|
70
67
|
toString(compact) {
|
|
71
68
|
let snippet, where = "";
|
|
@@ -82,4 +79,3 @@ class Mark {
|
|
|
82
79
|
return where;
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
|
-
exports.Mark = Mark;
|
|
@@ -1,13 +1,10 @@
|
|
|
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
|
-
|
|
9
|
-
class State {
|
|
10
|
-
constructor(schema = mod_js_1.DEFAULT_SCHEMA) {
|
|
5
|
+
import { DEFAULT_SCHEMA } from "./schema/mod.js";
|
|
6
|
+
export class State {
|
|
7
|
+
constructor(schema = DEFAULT_SCHEMA) {
|
|
11
8
|
Object.defineProperty(this, "schema", {
|
|
12
9
|
enumerable: true,
|
|
13
10
|
configurable: true,
|
|
@@ -16,4 +13,3 @@ class State {
|
|
|
16
13
|
});
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
|
-
exports.State = State;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.binary = void 0;
|
|
4
1
|
// Ported from js-yaml v3.13.1:
|
|
5
2
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
6
3
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
7
4
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
8
|
-
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
// [ 64, 65, 66 ] -> [ padding, CR, LF ]
|
|
10
7
|
const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
11
8
|
function resolveYamlBinary(data) {
|
|
@@ -101,7 +98,7 @@ function representYamlBinary(object) {
|
|
|
101
98
|
function isBinary(obj) {
|
|
102
99
|
return obj instanceof Uint8Array;
|
|
103
100
|
}
|
|
104
|
-
|
|
101
|
+
export const binary = new Type("tag:yaml.org,2002:binary", {
|
|
105
102
|
construct: constructYamlBinary,
|
|
106
103
|
kind: "scalar",
|
|
107
104
|
predicate: isBinary,
|
|
@@ -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
|
-
const _utils_js_1 = require("../_utils.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
import { isBoolean } from "../_utils.js";
|
|
10
7
|
function resolveYamlBoolean(data) {
|
|
11
8
|
const max = data.length;
|
|
12
9
|
return ((max === 4 && (data === "true" || data === "True" || data === "TRUE")) ||
|
|
@@ -15,11 +12,11 @@ function resolveYamlBoolean(data) {
|
|
|
15
12
|
function constructYamlBoolean(data) {
|
|
16
13
|
return data === "true" || data === "True" || data === "TRUE";
|
|
17
14
|
}
|
|
18
|
-
|
|
15
|
+
export const bool = new Type("tag:yaml.org,2002:bool", {
|
|
19
16
|
construct: constructYamlBoolean,
|
|
20
17
|
defaultStyle: "lowercase",
|
|
21
18
|
kind: "scalar",
|
|
22
|
-
predicate:
|
|
19
|
+
predicate: isBoolean,
|
|
23
20
|
represent: {
|
|
24
21
|
lowercase(object) {
|
|
25
22
|
return object ? "true" : "false";
|
|
@@ -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
|
-
const _utils_js_1 = require("../_utils.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
import { isNegativeZero } from "../_utils.js";
|
|
10
7
|
const YAML_FLOAT_PATTERN = new RegExp(
|
|
11
8
|
// 2.5e4, 2.5 and integers
|
|
12
9
|
"^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?" +
|
|
@@ -87,7 +84,7 @@ function representYamlFloat(object, style) {
|
|
|
87
84
|
return "-.Inf";
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
|
-
else if (
|
|
87
|
+
else if (isNegativeZero(object)) {
|
|
91
88
|
return "-0.0";
|
|
92
89
|
}
|
|
93
90
|
const res = object.toString(10);
|
|
@@ -97,9 +94,9 @@ function representYamlFloat(object, style) {
|
|
|
97
94
|
}
|
|
98
95
|
function isFloat(object) {
|
|
99
96
|
return (Object.prototype.toString.call(object) === "[object Number]" &&
|
|
100
|
-
(object % 1 !== 0 ||
|
|
97
|
+
(object % 1 !== 0 || isNegativeZero(object)));
|
|
101
98
|
}
|
|
102
|
-
|
|
99
|
+
export const float = new Type("tag:yaml.org,2002:float", {
|
|
103
100
|
construct: constructYamlFloat,
|
|
104
101
|
defaultStyle: "lowercase",
|
|
105
102
|
kind: "scalar",
|
|
@@ -1,11 +1,8 @@
|
|
|
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.func = void 0;
|
|
8
|
-
const type_js_1 = require("../type.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
9
6
|
// Note: original implementation used Esprima to handle functions
|
|
10
7
|
// To avoid dependencies, we'll just try to check if we can construct a function from given string
|
|
11
8
|
function reconstructFunction(code) {
|
|
@@ -15,7 +12,7 @@ function reconstructFunction(code) {
|
|
|
15
12
|
}
|
|
16
13
|
return func;
|
|
17
14
|
}
|
|
18
|
-
|
|
15
|
+
export const func = new Type("tag:yaml.org,2002:js/function", {
|
|
19
16
|
kind: "scalar",
|
|
20
17
|
resolve(data) {
|
|
21
18
|
if (data === null) {
|
|
@@ -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
|
-
const _utils_js_1 = require("../_utils.js");
|
|
5
|
+
import { Type } from "../type.js";
|
|
6
|
+
import { isNegativeZero } from "../_utils.js";
|
|
10
7
|
function isHexCode(c) {
|
|
11
8
|
return ((0x30 <= /* 0 */ c && c <= 0x39) /* 9 */ ||
|
|
12
9
|
(0x41 <= /* A */ c && c <= 0x46) /* F */ ||
|
|
@@ -136,9 +133,9 @@ function constructYamlInteger(data) {
|
|
|
136
133
|
function isInteger(object) {
|
|
137
134
|
return (Object.prototype.toString.call(object) === "[object Number]" &&
|
|
138
135
|
object % 1 === 0 &&
|
|
139
|
-
!
|
|
136
|
+
!isNegativeZero(object));
|
|
140
137
|
}
|
|
141
|
-
|
|
138
|
+
export const int = new Type("tag:yaml.org,2002:int", {
|
|
142
139
|
construct: constructYamlInteger,
|
|
143
140
|
defaultStyle: "decimal",
|
|
144
141
|
kind: "scalar",
|