@skmtc/core 0.0.223 → 0.0.224
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 +31 -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 +8 -8
- 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,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FunctionParameter = void 0;
|
|
7
|
-
const ts_pattern_1 = require("ts-pattern");
|
|
8
|
-
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
9
|
-
class FunctionParameter {
|
|
1
|
+
import { P, match } from 'ts-pattern';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
export class FunctionParameter {
|
|
10
4
|
constructor(args) {
|
|
11
5
|
Object.defineProperty(this, "properties", {
|
|
12
6
|
enumerable: true,
|
|
@@ -14,7 +8,7 @@ class FunctionParameter {
|
|
|
14
8
|
writable: true,
|
|
15
9
|
value: void 0
|
|
16
10
|
});
|
|
17
|
-
this.properties =
|
|
11
|
+
this.properties = match(args)
|
|
18
12
|
.with({ value: { type: 'void' } }, ({ value }) => ({
|
|
19
13
|
type: 'void',
|
|
20
14
|
value
|
|
@@ -24,7 +18,7 @@ class FunctionParameter {
|
|
|
24
18
|
identifier,
|
|
25
19
|
value
|
|
26
20
|
}))
|
|
27
|
-
.with({ name:
|
|
21
|
+
.with({ name: P.string }, ({ identifier, value, name, required }) => ({
|
|
28
22
|
type: 'regular',
|
|
29
23
|
identifier,
|
|
30
24
|
name,
|
|
@@ -39,7 +33,7 @@ class FunctionParameter {
|
|
|
39
33
|
if (this.properties.type === 'void') {
|
|
40
34
|
return this;
|
|
41
35
|
}
|
|
42
|
-
(
|
|
36
|
+
invariant(this.properties.value.type === 'object', 'Only object types can be destructured');
|
|
43
37
|
return new FunctionParameter({
|
|
44
38
|
identifier: this.properties.identifier,
|
|
45
39
|
value: this.properties.value,
|
|
@@ -47,7 +41,7 @@ class FunctionParameter {
|
|
|
47
41
|
});
|
|
48
42
|
}
|
|
49
43
|
toPropertyList() {
|
|
50
|
-
return
|
|
44
|
+
return match(this.properties)
|
|
51
45
|
.with({ type: 'void' }, () => [])
|
|
52
46
|
.with({ type: 'regular' }, ({ name }) => [`${name}`])
|
|
53
47
|
.with({ type: 'destructured' }, ({ value }) => {
|
|
@@ -58,7 +52,7 @@ class FunctionParameter {
|
|
|
58
52
|
});
|
|
59
53
|
}
|
|
60
54
|
toInbound() {
|
|
61
|
-
return
|
|
55
|
+
return match(this.properties)
|
|
62
56
|
.with({ type: 'void' }, () => '')
|
|
63
57
|
.with({ type: 'regular' }, ({ name }) => {
|
|
64
58
|
return `${name}`;
|
|
@@ -72,7 +66,7 @@ class FunctionParameter {
|
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
68
|
toString() {
|
|
75
|
-
return
|
|
69
|
+
return match(this.properties)
|
|
76
70
|
.with({ type: 'void' }, () => '')
|
|
77
71
|
.with({ type: 'regular' }, ({ name, identifier, required }) => {
|
|
78
72
|
return `${name}${required ? '' : '?'}: ${identifier}`;
|
|
@@ -86,8 +80,7 @@ class FunctionParameter {
|
|
|
86
80
|
});
|
|
87
81
|
}
|
|
88
82
|
}
|
|
89
|
-
exports.FunctionParameter = FunctionParameter;
|
|
90
83
|
const toPropertyNames = (value) => {
|
|
91
|
-
(
|
|
84
|
+
invariant(value.objectProperties, 'Only object types can be destructured');
|
|
92
85
|
return Object.keys(value.objectProperties.properties);
|
|
93
86
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ReactRouterPathParams = void 0;
|
|
4
|
-
const ValueBase_js_1 = require("../dsl/ValueBase.js");
|
|
5
|
-
class ReactRouterPathParams extends ValueBase_js_1.ValueBase {
|
|
1
|
+
import { ValueBase } from '../dsl/ValueBase.js';
|
|
2
|
+
export class ReactRouterPathParams extends ValueBase {
|
|
6
3
|
constructor({ context, operation, generatorKey, destinationPath }) {
|
|
7
4
|
super({ context, generatorKey });
|
|
8
5
|
Object.defineProperty(this, "getParams", {
|
|
@@ -50,4 +47,3 @@ class ReactRouterPathParams extends ValueBase_js_1.ValueBase {
|
|
|
50
47
|
return ``;
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
|
-
exports.ReactRouterPathParams = ReactRouterPathParams;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isIdentifierName } from '@babel/helper-validator-identifier';
|
|
2
|
+
export const handleKey = (key) => {
|
|
3
|
+
return isIdentifierName(key) ? key : `'${key}'`;
|
|
4
|
+
};
|
|
5
|
+
export const handlePropertyName = (name, parent) => {
|
|
6
|
+
return isIdentifierName(name) ? `${parent}.${name}` : `${parent}['${name}']`;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EMPTY } from '../dsl/constants.js';
|
|
2
|
+
// Filter out properties with falsy or EMPTY values and return as joined string
|
|
3
|
+
export const keyValues = (properties) => {
|
|
4
|
+
const filteredEntries = Object.entries(properties)
|
|
5
|
+
.map(([key, value]) => {
|
|
6
|
+
const renderedValue = value?.toString() || EMPTY;
|
|
7
|
+
return renderedValue === EMPTY ? EMPTY : `${key}: ${renderedValue}`;
|
|
8
|
+
})
|
|
9
|
+
.filter(row => row !== EMPTY);
|
|
10
|
+
return filteredEntries.length ? `{${filteredEntries.join(',\n')}}` : EMPTY;
|
|
11
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toDestructuredObject = void 0;
|
|
4
|
-
const toDestructuredObject = (value) => {
|
|
1
|
+
export const toDestructuredObject = (value) => {
|
|
5
2
|
if (value.type === 'void') {
|
|
6
3
|
return '';
|
|
7
4
|
}
|
|
@@ -17,4 +14,3 @@ const toDestructuredObject = (value) => {
|
|
|
17
14
|
const propertyNames = Object.keys(value.objectProperties.properties);
|
|
18
15
|
return `{${propertyNames.join(', ')}}`;
|
|
19
16
|
};
|
|
20
|
-
exports.toDestructuredObject = toDestructuredObject;
|
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toOperationArg = void 0;
|
|
7
|
-
const Object_js_1 = require("../oas/object/Object.js");
|
|
8
|
-
const Void_js_1 = require("../oas/void/Void.js");
|
|
9
|
-
const isEmpty_js_1 = __importDefault(require("lodash-es/isEmpty.js"));
|
|
10
|
-
const toOperationArg = ({ context, operation, insertProperties = [], removeProperties = [] }) => {
|
|
1
|
+
import { OasObject } from '../oas/object/Object.js';
|
|
2
|
+
import { OasVoid } from '../oas/void/Void.js';
|
|
3
|
+
import isEmpty from 'lodash-es/isEmpty.js';
|
|
4
|
+
export const toOperationArg = ({ context, operation, insertProperties = [], removeProperties = [] }) => {
|
|
11
5
|
const { properties, required } = toOperationArgProperties({
|
|
12
6
|
operation,
|
|
13
7
|
insertProperties,
|
|
14
8
|
removeProperties
|
|
15
9
|
});
|
|
16
|
-
const schema = (
|
|
17
|
-
?
|
|
18
|
-
:
|
|
10
|
+
const schema = isEmpty(properties)
|
|
11
|
+
? OasVoid.empty(context)
|
|
12
|
+
: OasObject.fromFields({
|
|
19
13
|
fields: { required, properties },
|
|
20
14
|
context
|
|
21
15
|
});
|
|
22
16
|
return schema;
|
|
23
17
|
};
|
|
24
|
-
exports.toOperationArg = toOperationArg;
|
|
25
18
|
const toOperationArgProperties = ({ operation, insertProperties: ip = [], removeProperties = [] }) => {
|
|
26
19
|
const body = operation.requestBody?.resolve().toSchema('application/json');
|
|
27
20
|
const insertProperties = body
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Definition } from '../dsl/Definition.js';
|
|
2
|
+
import { OasVoid } from '../oas/void/Void.js';
|
|
3
|
+
import { toResponseName } from '../helpers/naming.js';
|
|
4
|
+
export const toOperationResponse = ({ context, operation, destinationPath, typeSystemCreator, toIdentifier }) => {
|
|
5
|
+
const successResponse = operation.toSuccessResponse()?.resolve();
|
|
6
|
+
const value = typeSystemCreator.create({
|
|
7
|
+
context,
|
|
8
|
+
schema: successResponse?.toSchema() ?? OasVoid.empty(context),
|
|
9
|
+
destinationPath
|
|
10
|
+
});
|
|
11
|
+
return new Definition({
|
|
12
|
+
context,
|
|
13
|
+
identifier: toIdentifier(toResponseName(operation)),
|
|
14
|
+
value,
|
|
15
|
+
description: successResponse?.description
|
|
16
|
+
});
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { handleKey, handlePropertyName } from './identifiers.js';
|
|
2
|
+
import { EMPTY } from '../dsl/constants.js';
|
|
3
|
+
export const toParamsObject = (parameters, queryArg) => {
|
|
4
|
+
if (!parameters?.length) {
|
|
5
|
+
return EMPTY;
|
|
6
|
+
}
|
|
7
|
+
const keyValues = parameters.map(({ name }) => {
|
|
8
|
+
const keyValue = `${handleKey(name)}: ${handlePropertyName(name, queryArg)}`;
|
|
9
|
+
return keyValue;
|
|
10
|
+
});
|
|
11
|
+
return `{${keyValues.join(',\n')}}`;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skmtc/core",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.224",
|
|
4
|
+
"module": "./esm/mod.js",
|
|
5
5
|
"types": "./types/mod.d.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"
|
|
8
|
+
"import": {
|
|
9
9
|
"types": "./types/mod.d.ts",
|
|
10
|
-
"default": "./
|
|
10
|
+
"default": "./esm/mod.js"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"./settings": {
|
|
14
|
-
"
|
|
14
|
+
"import": {
|
|
15
15
|
"types": "./types/types/Settings.d.ts",
|
|
16
|
-
"default": "./
|
|
16
|
+
"default": "./esm/types/Settings.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"./clientSchema": {
|
|
20
|
-
"
|
|
20
|
+
"import": {
|
|
21
21
|
"types": "./types/schemas/client.js",
|
|
22
|
-
"default": "./
|
|
22
|
+
"default": "./esm/schemas/client.js"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
},
|
package/script/context/types.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
/**
|
|
19
|
-
* Utilities for encoding and decoding common formats like hex, base64, and varint.
|
|
20
|
-
*
|
|
21
|
-
* ```ts
|
|
22
|
-
* import { encodeBase64, decodeBase64 } from "@std/encoding";
|
|
23
|
-
* import { assertEquals } from "@std/assert";
|
|
24
|
-
*
|
|
25
|
-
* const foobar = new TextEncoder().encode("foobar");
|
|
26
|
-
* assertEquals(encodeBase64(foobar), "Zm9vYmFy");
|
|
27
|
-
* assertEquals(decodeBase64("Zm9vYmFy"), foobar);
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @module
|
|
31
|
-
*/
|
|
32
|
-
__exportStar(require("./ascii85.js"), exports);
|
|
33
|
-
__exportStar(require("./base32.js"), exports);
|
|
34
|
-
__exportStar(require("./base58.js"), exports);
|
|
35
|
-
__exportStar(require("./base64.js"), exports);
|
|
36
|
-
__exportStar(require("./base64url.js"), exports);
|
|
37
|
-
__exportStar(require("./hex.js"), exports);
|
|
38
|
-
__exportStar(require("./varint.js"), exports);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// Copyright the Browserify authors. MIT License.
|
|
4
|
-
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.CHAR_9 = exports.CHAR_0 = exports.CHAR_EQUAL = exports.CHAR_AMPERSAND = exports.CHAR_AT = exports.CHAR_GRAVE_ACCENT = exports.CHAR_CIRCUMFLEX_ACCENT = exports.CHAR_SEMICOLON = exports.CHAR_PERCENT = exports.CHAR_SINGLE_QUOTE = exports.CHAR_DOUBLE_QUOTE = exports.CHAR_PLUS = exports.CHAR_HYPHEN_MINUS = exports.CHAR_RIGHT_CURLY_BRACKET = exports.CHAR_LEFT_CURLY_BRACKET = exports.CHAR_RIGHT_ANGLE_BRACKET = exports.CHAR_LEFT_ANGLE_BRACKET = exports.CHAR_RIGHT_SQUARE_BRACKET = exports.CHAR_LEFT_SQUARE_BRACKET = exports.CHAR_ZERO_WIDTH_NOBREAK_SPACE = exports.CHAR_NO_BREAK_SPACE = exports.CHAR_SPACE = exports.CHAR_HASH = exports.CHAR_EXCLAMATION_MARK = exports.CHAR_FORM_FEED = exports.CHAR_TAB = exports.CHAR_CARRIAGE_RETURN = exports.CHAR_LINE_FEED = exports.CHAR_UNDERSCORE = exports.CHAR_QUESTION_MARK = exports.CHAR_COLON = exports.CHAR_VERTICAL_LINE = exports.CHAR_BACKWARD_SLASH = exports.CHAR_FORWARD_SLASH = exports.CHAR_DOT = exports.CHAR_LOWERCASE_Z = exports.CHAR_UPPERCASE_Z = exports.CHAR_LOWERCASE_A = exports.CHAR_UPPERCASE_A = void 0;
|
|
8
|
-
// Alphabet chars.
|
|
9
|
-
exports.CHAR_UPPERCASE_A = 65; /* A */
|
|
10
|
-
exports.CHAR_LOWERCASE_A = 97; /* a */
|
|
11
|
-
exports.CHAR_UPPERCASE_Z = 90; /* Z */
|
|
12
|
-
exports.CHAR_LOWERCASE_Z = 122; /* z */
|
|
13
|
-
// Non-alphabetic chars.
|
|
14
|
-
exports.CHAR_DOT = 46; /* . */
|
|
15
|
-
exports.CHAR_FORWARD_SLASH = 47; /* / */
|
|
16
|
-
exports.CHAR_BACKWARD_SLASH = 92; /* \ */
|
|
17
|
-
exports.CHAR_VERTICAL_LINE = 124; /* | */
|
|
18
|
-
exports.CHAR_COLON = 58; /* : */
|
|
19
|
-
exports.CHAR_QUESTION_MARK = 63; /* ? */
|
|
20
|
-
exports.CHAR_UNDERSCORE = 95; /* _ */
|
|
21
|
-
exports.CHAR_LINE_FEED = 10; /* \n */
|
|
22
|
-
exports.CHAR_CARRIAGE_RETURN = 13; /* \r */
|
|
23
|
-
exports.CHAR_TAB = 9; /* \t */
|
|
24
|
-
exports.CHAR_FORM_FEED = 12; /* \f */
|
|
25
|
-
exports.CHAR_EXCLAMATION_MARK = 33; /* ! */
|
|
26
|
-
exports.CHAR_HASH = 35; /* # */
|
|
27
|
-
exports.CHAR_SPACE = 32; /* */
|
|
28
|
-
exports.CHAR_NO_BREAK_SPACE = 160; /* \u00A0 */
|
|
29
|
-
exports.CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279; /* \uFEFF */
|
|
30
|
-
exports.CHAR_LEFT_SQUARE_BRACKET = 91; /* [ */
|
|
31
|
-
exports.CHAR_RIGHT_SQUARE_BRACKET = 93; /* ] */
|
|
32
|
-
exports.CHAR_LEFT_ANGLE_BRACKET = 60; /* < */
|
|
33
|
-
exports.CHAR_RIGHT_ANGLE_BRACKET = 62; /* > */
|
|
34
|
-
exports.CHAR_LEFT_CURLY_BRACKET = 123; /* { */
|
|
35
|
-
exports.CHAR_RIGHT_CURLY_BRACKET = 125; /* } */
|
|
36
|
-
exports.CHAR_HYPHEN_MINUS = 45; /* - */
|
|
37
|
-
exports.CHAR_PLUS = 43; /* + */
|
|
38
|
-
exports.CHAR_DOUBLE_QUOTE = 34; /* " */
|
|
39
|
-
exports.CHAR_SINGLE_QUOTE = 39; /* ' */
|
|
40
|
-
exports.CHAR_PERCENT = 37; /* % */
|
|
41
|
-
exports.CHAR_SEMICOLON = 59; /* ; */
|
|
42
|
-
exports.CHAR_CIRCUMFLEX_ACCENT = 94; /* ^ */
|
|
43
|
-
exports.CHAR_GRAVE_ACCENT = 96; /* ` */
|
|
44
|
-
exports.CHAR_AT = 64; /* @ */
|
|
45
|
-
exports.CHAR_AMPERSAND = 38; /* & */
|
|
46
|
-
exports.CHAR_EQUAL = 61; /* = */
|
|
47
|
-
// Digits
|
|
48
|
-
exports.CHAR_0 = 48; /* 0 */
|
|
49
|
-
exports.CHAR_9 = 57; /* 9 */
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertArg = assertArg;
|
|
6
|
-
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
-
function assertArg(path) {
|
|
8
|
-
(0, assert_path_js_1.assertPath)(path);
|
|
9
|
-
if (path.length === 0)
|
|
10
|
-
return ".";
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertArg = assertArg;
|
|
6
|
-
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
-
function assertArg(path) {
|
|
8
|
-
(0, assert_path_js_1.assertPath)(path);
|
|
9
|
-
if (path.length === 0)
|
|
10
|
-
return ".";
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.assertArgs = assertArgs;
|
|
6
|
-
const assert_path_js_1 = require("./assert_path.js");
|
|
7
|
-
function assertArgs(from, to) {
|
|
8
|
-
(0, assert_path_js_1.assertPath)(from);
|
|
9
|
-
(0, assert_path_js_1.assertPath)(to);
|
|
10
|
-
if (from === to)
|
|
11
|
-
return "";
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
-
if (mod && mod.__esModule) return mod;
|
|
22
|
-
var result = {};
|
|
23
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
-
__setModuleDefault(result, mod);
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.isWindows = void 0;
|
|
29
|
-
// Keep this up-to-date with Deno.build.os
|
|
30
|
-
/**
|
|
31
|
-
* Operating system type, equivalent to the type of
|
|
32
|
-
* {@linkcode https://deno.land/api?s=Deno.build | Deno.build.os}.
|
|
33
|
-
*/
|
|
34
|
-
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
35
|
-
function getOsType() {
|
|
36
|
-
// deno-lint-ignore no-explicit-any
|
|
37
|
-
return dntShim.dntGlobalThis.Deno?.build.os ||
|
|
38
|
-
(navigator.userAgent.includes("Win") ? "windows" : "linux");
|
|
39
|
-
}
|
|
40
|
-
exports.isWindows = getOsType() === "windows";
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// Copyright the Browserify authors. MIT License.
|
|
4
|
-
// Ported mostly from https://github.com/browserify/path-browserify/
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
/**
|
|
22
|
-
* Utilities for working with OS-specific file paths.
|
|
23
|
-
*
|
|
24
|
-
* Functions from this module will automatically switch to support the path style
|
|
25
|
-
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
26
|
-
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
27
|
-
*
|
|
28
|
-
* To use functions for a specific path style regardless of the current OS
|
|
29
|
-
* import the modules from the platform sub directory instead.
|
|
30
|
-
*
|
|
31
|
-
* Example, for POSIX:
|
|
32
|
-
*
|
|
33
|
-
* ```ts
|
|
34
|
-
* import { fromFileUrl } from "@std/path/posix/from-file-url";
|
|
35
|
-
* import { assertEquals } from "@std/assert";
|
|
36
|
-
*
|
|
37
|
-
* assertEquals(fromFileUrl("file:///home/foo"), "/home/foo");
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* Or, for Windows:
|
|
41
|
-
*
|
|
42
|
-
* ```ts
|
|
43
|
-
* import { fromFileUrl } from "@std/path/windows/from-file-url";
|
|
44
|
-
* import { assertEquals } from "@std/assert";
|
|
45
|
-
*
|
|
46
|
-
* assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @module
|
|
50
|
-
*/
|
|
51
|
-
__exportStar(require("./basename.js"), exports);
|
|
52
|
-
__exportStar(require("./constants.js"), exports);
|
|
53
|
-
__exportStar(require("./dirname.js"), exports);
|
|
54
|
-
__exportStar(require("./extname.js"), exports);
|
|
55
|
-
__exportStar(require("./format.js"), exports);
|
|
56
|
-
__exportStar(require("./from_file_url.js"), exports);
|
|
57
|
-
__exportStar(require("./is_absolute.js"), exports);
|
|
58
|
-
__exportStar(require("./join.js"), exports);
|
|
59
|
-
__exportStar(require("./normalize.js"), exports);
|
|
60
|
-
__exportStar(require("./parse.js"), exports);
|
|
61
|
-
__exportStar(require("./relative.js"), exports);
|
|
62
|
-
__exportStar(require("./resolve.js"), exports);
|
|
63
|
-
__exportStar(require("./to_file_url.js"), exports);
|
|
64
|
-
__exportStar(require("./to_namespaced_path.js"), exports);
|
|
65
|
-
__exportStar(require("./common.js"), exports);
|
|
66
|
-
__exportStar(require("./types.js"), exports);
|
|
67
|
-
__exportStar(require("./glob_to_regexp.js"), exports);
|
|
68
|
-
__exportStar(require("./is_glob.js"), exports);
|
|
69
|
-
__exportStar(require("./join_globs.js"), exports);
|
|
70
|
-
__exportStar(require("./normalize_glob.js"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// Copyright the Browserify authors. MIT License.
|
|
4
|
-
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.isPosixPathSeparator = isPosixPathSeparator;
|
|
8
|
-
const constants_js_1 = require("../_common/constants.js");
|
|
9
|
-
function isPosixPathSeparator(code) {
|
|
10
|
-
return code === constants_js_1.CHAR_FORWARD_SLASH;
|
|
11
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
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
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
28
|
-
// This module is browser compatible.
|
|
29
|
-
const dntShim = __importStar(require("../../../../../../_dnt.shims.js"));
|
|
30
|
-
const normalize_string_js_1 = require("../_common/normalize_string.js");
|
|
31
|
-
const assert_path_js_1 = require("../_common/assert_path.js");
|
|
32
|
-
const _util_js_1 = require("./_util.js");
|
|
33
|
-
/**
|
|
34
|
-
* Resolves path segments into a `path`.
|
|
35
|
-
*
|
|
36
|
-
* @example Usage
|
|
37
|
-
* ```ts
|
|
38
|
-
* import { resolve } from "@std/path/posix/resolve";
|
|
39
|
-
* import { assertEquals } from "@std/assert";
|
|
40
|
-
*
|
|
41
|
-
* const path = resolve("/foo", "bar", "baz/asdf", "quux", "..");
|
|
42
|
-
* assertEquals(path, "/foo/bar/baz/asdf");
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @param pathSegments The path segments to resolve.
|
|
46
|
-
* @returns The resolved path.
|
|
47
|
-
*/
|
|
48
|
-
function resolve(...pathSegments) {
|
|
49
|
-
let resolvedPath = "";
|
|
50
|
-
let resolvedAbsolute = false;
|
|
51
|
-
for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
52
|
-
let path;
|
|
53
|
-
if (i >= 0)
|
|
54
|
-
path = pathSegments[i];
|
|
55
|
-
else {
|
|
56
|
-
// deno-lint-ignore no-explicit-any
|
|
57
|
-
const { Deno } = dntShim.dntGlobalThis;
|
|
58
|
-
if (typeof Deno?.cwd !== "function") {
|
|
59
|
-
throw new TypeError("Resolved a relative path without a CWD.");
|
|
60
|
-
}
|
|
61
|
-
path = Deno.cwd();
|
|
62
|
-
}
|
|
63
|
-
(0, assert_path_js_1.assertPath)(path);
|
|
64
|
-
// Skip empty entries
|
|
65
|
-
if (path.length === 0) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
69
|
-
resolvedAbsolute = (0, _util_js_1.isPosixPathSeparator)(path.charCodeAt(0));
|
|
70
|
-
}
|
|
71
|
-
// At this point the path should be resolved to a full absolute path, but
|
|
72
|
-
// handle relative paths to be safe (might happen when Deno.cwd() fails)
|
|
73
|
-
// Normalize the path
|
|
74
|
-
resolvedPath = (0, normalize_string_js_1.normalizeString)(resolvedPath, !resolvedAbsolute, "/", _util_js_1.isPosixPathSeparator);
|
|
75
|
-
if (resolvedAbsolute) {
|
|
76
|
-
if (resolvedPath.length > 0)
|
|
77
|
-
return `/${resolvedPath}`;
|
|
78
|
-
else
|
|
79
|
-
return "/";
|
|
80
|
-
}
|
|
81
|
-
else if (resolvedPath.length > 0)
|
|
82
|
-
return resolvedPath;
|
|
83
|
-
else
|
|
84
|
-
return ".";
|
|
85
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// Copyright the Browserify authors. MIT License.
|
|
4
|
-
// Ported from https://github.com/browserify/path-browserify/
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.isPosixPathSeparator = isPosixPathSeparator;
|
|
8
|
-
exports.isPathSeparator = isPathSeparator;
|
|
9
|
-
exports.isWindowsDeviceRoot = isWindowsDeviceRoot;
|
|
10
|
-
const constants_js_1 = require("../_common/constants.js");
|
|
11
|
-
function isPosixPathSeparator(code) {
|
|
12
|
-
return code === constants_js_1.CHAR_FORWARD_SLASH;
|
|
13
|
-
}
|
|
14
|
-
function isPathSeparator(code) {
|
|
15
|
-
return code === constants_js_1.CHAR_FORWARD_SLASH || code === constants_js_1.CHAR_BACKWARD_SLASH;
|
|
16
|
-
}
|
|
17
|
-
function isWindowsDeviceRoot(code) {
|
|
18
|
-
return ((code >= constants_js_1.CHAR_LOWERCASE_A && code <= constants_js_1.CHAR_LOWERCASE_Z) ||
|
|
19
|
-
(code >= constants_js_1.CHAR_UPPERCASE_A && code <= constants_js_1.CHAR_UPPERCASE_Z));
|
|
20
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Ported from js-yaml v3.13.1:
|
|
3
|
-
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
|
-
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.undefinedType = exports.timestamp = exports.str = exports.set = exports.seq = exports.regexp = exports.pairs = exports.omap = exports.nil = exports.merge = exports.map = exports.int = exports.func = exports.float = exports.bool = exports.binary = void 0;
|
|
8
|
-
var binary_js_1 = require("./binary.js");
|
|
9
|
-
Object.defineProperty(exports, "binary", { enumerable: true, get: function () { return binary_js_1.binary; } });
|
|
10
|
-
var bool_js_1 = require("./bool.js");
|
|
11
|
-
Object.defineProperty(exports, "bool", { enumerable: true, get: function () { return bool_js_1.bool; } });
|
|
12
|
-
var float_js_1 = require("./float.js");
|
|
13
|
-
Object.defineProperty(exports, "float", { enumerable: true, get: function () { return float_js_1.float; } });
|
|
14
|
-
var function_js_1 = require("./function.js");
|
|
15
|
-
Object.defineProperty(exports, "func", { enumerable: true, get: function () { return function_js_1.func; } });
|
|
16
|
-
var int_js_1 = require("./int.js");
|
|
17
|
-
Object.defineProperty(exports, "int", { enumerable: true, get: function () { return int_js_1.int; } });
|
|
18
|
-
var map_js_1 = require("./map.js");
|
|
19
|
-
Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_js_1.map; } });
|
|
20
|
-
var merge_js_1 = require("./merge.js");
|
|
21
|
-
Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_js_1.merge; } });
|
|
22
|
-
var nil_js_1 = require("./nil.js");
|
|
23
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return nil_js_1.nil; } });
|
|
24
|
-
var omap_js_1 = require("./omap.js");
|
|
25
|
-
Object.defineProperty(exports, "omap", { enumerable: true, get: function () { return omap_js_1.omap; } });
|
|
26
|
-
var pairs_js_1 = require("./pairs.js");
|
|
27
|
-
Object.defineProperty(exports, "pairs", { enumerable: true, get: function () { return pairs_js_1.pairs; } });
|
|
28
|
-
var regexp_js_1 = require("./regexp.js");
|
|
29
|
-
Object.defineProperty(exports, "regexp", { enumerable: true, get: function () { return regexp_js_1.regexp; } });
|
|
30
|
-
var seq_js_1 = require("./seq.js");
|
|
31
|
-
Object.defineProperty(exports, "seq", { enumerable: true, get: function () { return seq_js_1.seq; } });
|
|
32
|
-
var set_js_1 = require("./set.js");
|
|
33
|
-
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return set_js_1.set; } });
|
|
34
|
-
var str_js_1 = require("./str.js");
|
|
35
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return str_js_1.str; } });
|
|
36
|
-
var timestamp_js_1 = require("./timestamp.js");
|
|
37
|
-
Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_js_1.timestamp; } });
|
|
38
|
-
var undefined_js_1 = require("./undefined.js");
|
|
39
|
-
Object.defineProperty(exports, "undefinedType", { enumerable: true, get: function () { return undefined_js_1.undefinedType; } });
|