@skmtc/core 0.18.1 → 0.27.0
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/README.md +4 -3
- package/esm/anchors/ParserAdapter.d.ts +22 -3
- package/esm/anchors/ParserAdapter.d.ts.map +1 -1
- package/esm/anchors/attribute.d.ts.map +1 -1
- package/esm/anchors/buildSidecar.d.ts.map +1 -1
- package/esm/anchors/buildSidecar.js +1 -1
- package/esm/anchors/generationMap.d.ts.map +1 -1
- package/esm/anchors/postPass.d.ts +1 -1
- package/esm/anchors/postPass.js +1 -1
- package/esm/anchors/sidecar.d.ts +2 -2
- package/esm/anchors/sidecar.js +1 -1
- package/esm/context/CoreContext.d.ts +7 -1
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +17 -11
- package/esm/context/GenerateContext.d.ts +25 -4
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +159 -76
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseIssue.d.ts +1 -1
- package/esm/context/RenderContext.d.ts +2 -6
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +4 -14
- package/esm/context/generateTypes.d.ts +35 -8
- package/esm/context/generateTypes.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/fs/1.0.23 → esm/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.6/extname.d.ts +25 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/extname.js +31 -0
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts +42 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/posix/extname.js +98 -0
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.6/windows/extname.js +83 -0
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/esm/dsl/CodeFileBase.d.ts +57 -24
- package/esm/dsl/CodeFileBase.d.ts.map +1 -1
- package/esm/dsl/CodeFileBase.js +35 -53
- package/esm/dsl/FileBase.d.ts +21 -25
- package/esm/dsl/FileBase.d.ts.map +1 -1
- package/esm/dsl/FileBase.js +20 -29
- package/esm/dsl/GeneratorKeys.d.ts +19 -19
- package/esm/dsl/GeneratorKeys.d.ts.map +1 -1
- package/esm/dsl/GeneratorKeys.js +6 -5
- package/esm/dsl/IdentifierBase.d.ts +19 -5
- package/esm/dsl/IdentifierBase.d.ts.map +1 -1
- package/esm/dsl/IdentifierBase.js +21 -5
- package/esm/dsl/IdentifierType.d.ts +8 -14
- package/esm/dsl/IdentifierType.d.ts.map +1 -1
- package/esm/dsl/Lang.d.ts +18 -38
- package/esm/dsl/Lang.d.ts.map +1 -1
- package/esm/dsl/MarkdownFile.d.ts +55 -0
- package/esm/dsl/MarkdownFile.d.ts.map +1 -0
- package/esm/dsl/MarkdownFile.js +58 -0
- package/esm/dsl/model/ModelDriver.d.ts +3 -1
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +6 -8
- package/esm/dsl/model/toModelEntry.d.ts +21 -17
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +3 -27
- package/esm/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/esm/dsl/model/types.d.ts +2 -52
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/esm/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/gql/toGqlOperationEntry.js +3 -25
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/gql/toGqlOperationProjectionBase.js +7 -1
- package/esm/dsl/operation/gql/types.d.ts +1 -33
- package/esm/dsl/operation/gql/types.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/esm/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/esm/dsl/operation/oas/toOasOperationEntry.js +3 -32
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/esm/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/esm/dsl/operation/oas/types.d.ts +1 -43
- package/esm/dsl/operation/oas/types.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/esm/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/esm/dsl/webhook/WebhookDriver.js +12 -9
- package/esm/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/esm/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/esm/dsl/webhook/toWebhookEntry.js +3 -32
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/esm/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/esm/dsl/webhook/types.d.ts +1 -36
- package/esm/dsl/webhook/types.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/esm/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/esm/enrichments/toEnrichmentDescriptor.js +57 -31
- package/esm/enrichments/validateConfig.d.ts +1 -1
- package/esm/enrichments/validateConfig.d.ts.map +1 -1
- package/esm/enrichments/validateConfig.js +2 -2
- package/esm/gql/_helpers/unwrapType.d.ts.map +1 -1
- package/esm/gql/enum/toEnumType.d.ts.map +1 -1
- package/esm/gql/field/toFieldSchema.d.ts.map +1 -1
- package/esm/gql/input/toInputType.d.ts.map +1 -1
- package/esm/gql/interface/toInterfaceUnion.d.ts.map +1 -1
- package/esm/gql/object/toObjectType.d.ts.map +1 -1
- package/esm/gql/operation/toRootField.d.ts.map +1 -1
- package/esm/gql/union/toUnionType.d.ts.map +1 -1
- package/esm/helpers/applyGeneratedSuffix.d.ts +43 -0
- package/esm/helpers/applyGeneratedSuffix.d.ts.map +1 -0
- package/esm/helpers/applyGeneratedSuffix.js +79 -0
- package/esm/helpers/isImported.js +1 -1
- package/esm/helpers/strings.d.ts.map +1 -1
- package/esm/helpers/toResolvedArtifactPath.js +1 -1
- package/esm/mod.d.ts +8 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +8 -1
- package/esm/oas/array/Array.d.ts +2 -0
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +4 -0
- package/esm/oas/boolean/Boolean.d.ts +3 -1
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +4 -0
- package/esm/oas/components/Components.d.ts +5 -0
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +6 -1
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/integer/Integer.d.ts +3 -1
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +4 -0
- package/esm/oas/link/Link.d.ts +68 -0
- package/esm/oas/link/Link.d.ts.map +1 -0
- package/esm/oas/link/Link.js +107 -0
- package/esm/oas/number/Number.d.ts +3 -1
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +4 -0
- package/esm/oas/object/Object.d.ts +9 -0
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +14 -0
- package/esm/oas/operation/Operation.d.ts +15 -0
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +33 -0
- package/esm/oas/ref/Ref.d.ts +23 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +32 -0
- package/esm/oas/ref/ref-types.d.ts +18 -1
- package/esm/oas/ref/ref-types.d.ts.map +1 -1
- package/esm/oas/ref/ref-types.js +12 -1
- package/esm/oas/response/Response.d.ts +4 -0
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +7 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/esm/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/esm/oas/schemaPath/traverseSchema.js +115 -0
- package/esm/oas/string/String.d.ts +3 -1
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +4 -0
- package/esm/oas/union/Union.d.ts +9 -0
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +14 -0
- package/esm/oas/unknown/Unknown.d.ts +3 -1
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +4 -0
- package/esm/parse/v3-0/array/toArray.d.ts.map +1 -1
- package/esm/parse/v3-0/boolean/toBoolean.d.ts.map +1 -1
- package/esm/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-0/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-0/integer/toInteger.d.ts.map +1 -1
- package/esm/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-0/link/toLinksV3.js +40 -0
- package/esm/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-0/object/toObject.js +3 -1
- package/esm/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/parse/v3-0/ref/toRefV31.d.ts.map +1 -1
- package/esm/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-0/response/toResponseV3.js +4 -1
- package/esm/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/parse/v3-0/schema/toSchemasV3.js +7 -1
- package/esm/parse/v3-0/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/esm/parse/v3-0/string/toString.d.ts.map +1 -1
- package/esm/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-0/union/toUnion.js +3 -1
- package/esm/parse/v3-0/unknown/toUnknown.d.ts.map +1 -1
- package/esm/parse/v3-0/webhook/toWebhooksV3.d.ts.map +1 -1
- package/esm/parse/v3-1/array/toArray.d.ts.map +1 -1
- package/esm/parse/v3-1/boolean/toBoolean.d.ts.map +1 -1
- package/esm/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-1/components/toComponentsV3.js +3 -1
- package/esm/parse/v3-1/integer/toInteger.d.ts.map +1 -1
- package/esm/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/esm/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/esm/parse/v3-1/link/toLinksV3.js +40 -0
- package/esm/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/esm/parse/v3-1/object/toObject.js +3 -1
- package/esm/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/parse/v3-1/ref/toRefV31.d.ts.map +1 -1
- package/esm/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-1/response/toResponseV3.js +4 -1
- package/esm/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/parse/v3-1/schema/toSchemasV3.js +7 -1
- package/esm/parse/v3-1/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/esm/parse/v3-1/string/toString.d.ts.map +1 -1
- package/esm/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/esm/parse/v3-1/union/toUnion.js +3 -1
- package/esm/parse/v3-1/unknown/toUnknown.d.ts.map +1 -1
- package/esm/parse/v3-1/webhook/toWebhooksV3.d.ts.map +1 -1
- package/esm/run/toArtifacts.d.ts +8 -1
- package/esm/run/toArtifacts.d.ts.map +1 -1
- package/esm/run/toArtifacts.js +5 -5
- package/esm/run/toInspection.d.ts +8 -0
- package/esm/run/toInspection.d.ts.map +1 -0
- package/esm/run/toInspection.js +78 -0
- package/esm/types/Enrichments.d.ts +19 -8
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +4 -3
- package/esm/types/GeneratorType.d.ts +5 -5
- package/esm/types/GeneratorType.d.ts.map +1 -1
- package/esm/types/Manifest.d.ts +9 -2
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +3 -3
- package/esm/types/ModuleSelect.d.ts +81 -0
- package/esm/types/ModuleSelect.d.ts.map +1 -0
- package/esm/types/ModuleSelect.js +63 -0
- package/esm/types/Preview.d.ts +4 -27
- package/esm/types/Preview.d.ts.map +1 -1
- package/esm/types/Preview.js +4 -25
- package/esm/types/SchemaPath.d.ts +17 -0
- package/esm/types/SchemaPath.d.ts.map +1 -0
- package/esm/types/SchemaPath.js +9 -0
- package/esm/types/Settings.d.ts +45 -3
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +16 -20
- package/esm/types/SkmtcDocument.d.ts +1 -1
- package/esm/types/SupportedSubjects.d.ts +1 -1
- package/package.json +1 -1
- package/script/anchors/ParserAdapter.d.ts +22 -3
- package/script/anchors/ParserAdapter.d.ts.map +1 -1
- package/script/anchors/attribute.d.ts.map +1 -1
- package/script/anchors/buildSidecar.d.ts.map +1 -1
- package/script/anchors/buildSidecar.js +1 -1
- package/script/anchors/generationMap.d.ts.map +1 -1
- package/script/anchors/postPass.d.ts +1 -1
- package/script/anchors/postPass.js +1 -1
- package/script/anchors/sidecar.d.ts +2 -2
- package/script/anchors/sidecar.js +1 -1
- package/script/context/CoreContext.d.ts +7 -1
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +17 -11
- package/script/context/GenerateContext.d.ts +25 -4
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +159 -76
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseIssue.d.ts +1 -1
- package/script/context/RenderContext.d.ts +2 -6
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +4 -14
- package/script/context/generateTypes.d.ts +35 -8
- package/script/context/generateTypes.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/fs/1.0.23 → script/deps/jsr.io/@std/fs/1.0.24}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
- package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.6/extname.d.ts +25 -0
- package/script/deps/jsr.io/@std/path/1.1.6/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.6/extname.js +34 -0
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.js +2 -2
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts +42 -0
- package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.6/posix/extname.js +101 -0
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/posix/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.js +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.js +1 -1
- package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.6/windows/extname.js +86 -0
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/from_file_url.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.js +1 -1
- package/{esm/deps/jsr.io/@std/path/1.1.4 → script/deps/jsr.io/@std/path/1.1.6}/windows/normalize.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.js +1 -1
- package/script/dsl/CodeFileBase.d.ts +57 -24
- package/script/dsl/CodeFileBase.d.ts.map +1 -1
- package/script/dsl/CodeFileBase.js +37 -54
- package/script/dsl/FileBase.d.ts +21 -25
- package/script/dsl/FileBase.d.ts.map +1 -1
- package/script/dsl/FileBase.js +20 -29
- package/script/dsl/GeneratorKeys.d.ts +19 -19
- package/script/dsl/GeneratorKeys.d.ts.map +1 -1
- package/script/dsl/GeneratorKeys.js +6 -5
- package/script/dsl/IdentifierBase.d.ts +19 -5
- package/script/dsl/IdentifierBase.d.ts.map +1 -1
- package/script/dsl/IdentifierBase.js +21 -5
- package/script/dsl/IdentifierType.d.ts +8 -14
- package/script/dsl/IdentifierType.d.ts.map +1 -1
- package/script/dsl/Lang.d.ts +18 -38
- package/script/dsl/Lang.d.ts.map +1 -1
- package/script/dsl/MarkdownFile.d.ts +55 -0
- package/script/dsl/MarkdownFile.d.ts.map +1 -0
- package/script/dsl/MarkdownFile.js +62 -0
- package/script/dsl/model/ModelDriver.d.ts +3 -1
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +6 -8
- package/script/dsl/model/toModelEntry.d.ts +21 -17
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +3 -63
- package/script/dsl/model/toModelProjectionBase.d.ts +15 -15
- package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/script/dsl/model/types.d.ts +2 -52
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts +3 -1
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.js +12 -9
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts +20 -15
- package/script/dsl/operation/gql/toGqlOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/gql/toGqlOperationEntry.js +3 -61
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/gql/toGqlOperationProjectionBase.js +7 -1
- package/script/dsl/operation/gql/types.d.ts +1 -33
- package/script/dsl/operation/gql/types.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts +3 -1
- package/script/dsl/operation/oas/OasOperationDriver.d.ts.map +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.js +12 -9
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts +21 -17
- package/script/dsl/operation/oas/toOasOperationEntry.d.ts.map +1 -1
- package/script/dsl/operation/oas/toOasOperationEntry.js +3 -68
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts +11 -10
- package/script/dsl/operation/oas/toOasOperationProjectionBase.d.ts.map +1 -1
- package/script/dsl/operation/oas/types.d.ts +1 -43
- package/script/dsl/operation/oas/types.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.d.ts +3 -1
- package/script/dsl/webhook/WebhookDriver.d.ts.map +1 -1
- package/script/dsl/webhook/WebhookDriver.js +12 -9
- package/script/dsl/webhook/toWebhookEntry.d.ts +21 -16
- package/script/dsl/webhook/toWebhookEntry.d.ts.map +1 -1
- package/script/dsl/webhook/toWebhookEntry.js +3 -68
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts +11 -10
- package/script/dsl/webhook/toWebhookProjectionBase.d.ts.map +1 -1
- package/script/dsl/webhook/types.d.ts +1 -36
- package/script/dsl/webhook/types.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.d.ts +72 -27
- package/script/enrichments/toEnrichmentDescriptor.d.ts.map +1 -1
- package/script/enrichments/toEnrichmentDescriptor.js +57 -31
- package/script/enrichments/validateConfig.d.ts +1 -1
- package/script/enrichments/validateConfig.d.ts.map +1 -1
- package/script/enrichments/validateConfig.js +2 -2
- package/script/gql/_helpers/unwrapType.d.ts.map +1 -1
- package/script/gql/enum/toEnumType.d.ts.map +1 -1
- package/script/gql/field/toFieldSchema.d.ts.map +1 -1
- package/script/gql/input/toInputType.d.ts.map +1 -1
- package/script/gql/interface/toInterfaceUnion.d.ts.map +1 -1
- package/script/gql/object/toObjectType.d.ts.map +1 -1
- package/script/gql/operation/toRootField.d.ts.map +1 -1
- package/script/gql/union/toUnionType.d.ts.map +1 -1
- package/script/helpers/applyGeneratedSuffix.d.ts +43 -0
- package/script/helpers/applyGeneratedSuffix.d.ts.map +1 -0
- package/script/helpers/applyGeneratedSuffix.js +84 -0
- package/script/helpers/isImported.js +1 -1
- package/script/helpers/strings.d.ts.map +1 -1
- package/script/helpers/toResolvedArtifactPath.js +1 -1
- package/script/mod.d.ts +8 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +8 -1
- package/script/oas/array/Array.d.ts +2 -0
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +4 -0
- package/script/oas/boolean/Boolean.d.ts +3 -1
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +4 -0
- package/script/oas/components/Components.d.ts +5 -0
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +6 -1
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/integer/Integer.d.ts +3 -1
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +4 -0
- package/script/oas/link/Link.d.ts +68 -0
- package/script/oas/link/Link.d.ts.map +1 -0
- package/script/oas/link/Link.js +111 -0
- package/script/oas/number/Number.d.ts +3 -1
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +4 -0
- package/script/oas/object/Object.d.ts +9 -0
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +14 -0
- package/script/oas/operation/Operation.d.ts +15 -0
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +33 -0
- package/script/oas/ref/Ref.d.ts +23 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +32 -0
- package/script/oas/ref/ref-types.d.ts +18 -1
- package/script/oas/ref/ref-types.d.ts.map +1 -1
- package/script/oas/ref/ref-types.js +13 -2
- package/script/oas/response/Response.d.ts +4 -0
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +7 -0
- package/script/oas/schemaPath/traverseSchema.d.ts +31 -0
- package/script/oas/schemaPath/traverseSchema.d.ts.map +1 -0
- package/script/oas/schemaPath/traverseSchema.js +119 -0
- package/script/oas/string/String.d.ts +3 -1
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +4 -0
- package/script/oas/union/Union.d.ts +9 -0
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +14 -0
- package/script/oas/unknown/Unknown.d.ts +3 -1
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +4 -0
- package/script/parse/v3-0/array/toArray.d.ts.map +1 -1
- package/script/parse/v3-0/boolean/toBoolean.d.ts.map +1 -1
- package/script/parse/v3-0/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-0/components/toComponentsV3.js +3 -1
- package/script/parse/v3-0/integer/toInteger.d.ts.map +1 -1
- package/script/parse/v3-0/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-0/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-0/link/toLinksV3.js +44 -0
- package/script/parse/v3-0/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-0/object/toObject.js +3 -1
- package/script/parse/v3-0/operation/toOperationsV3.d.ts.map +1 -1
- package/script/parse/v3-0/ref/toRefV31.d.ts.map +1 -1
- package/script/parse/v3-0/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-0/response/toResponseV3.js +4 -1
- package/script/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
- package/script/parse/v3-0/schema/toSchemasV3.js +7 -1
- package/script/parse/v3-0/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/script/parse/v3-0/string/toString.d.ts.map +1 -1
- package/script/parse/v3-0/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-0/union/toUnion.js +3 -1
- package/script/parse/v3-0/unknown/toUnknown.d.ts.map +1 -1
- package/script/parse/v3-0/webhook/toWebhooksV3.d.ts.map +1 -1
- package/script/parse/v3-1/array/toArray.d.ts.map +1 -1
- package/script/parse/v3-1/boolean/toBoolean.d.ts.map +1 -1
- package/script/parse/v3-1/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-1/components/toComponentsV3.js +3 -1
- package/script/parse/v3-1/integer/toInteger.d.ts.map +1 -1
- package/script/parse/v3-1/link/toLinksV3.d.ts +17 -0
- package/script/parse/v3-1/link/toLinksV3.d.ts.map +1 -0
- package/script/parse/v3-1/link/toLinksV3.js +44 -0
- package/script/parse/v3-1/object/toObject.d.ts.map +1 -1
- package/script/parse/v3-1/object/toObject.js +3 -1
- package/script/parse/v3-1/operation/toOperationsV3.d.ts.map +1 -1
- package/script/parse/v3-1/ref/toRefV31.d.ts.map +1 -1
- package/script/parse/v3-1/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-1/response/toResponseV3.js +4 -1
- package/script/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
- package/script/parse/v3-1/schema/toSchemasV3.js +7 -1
- package/script/parse/v3-1/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/script/parse/v3-1/string/toString.d.ts.map +1 -1
- package/script/parse/v3-1/union/toUnion.d.ts.map +1 -1
- package/script/parse/v3-1/union/toUnion.js +3 -1
- package/script/parse/v3-1/unknown/toUnknown.d.ts.map +1 -1
- package/script/parse/v3-1/webhook/toWebhooksV3.d.ts.map +1 -1
- package/script/run/toArtifacts.d.ts +8 -1
- package/script/run/toArtifacts.d.ts.map +1 -1
- package/script/run/toArtifacts.js +5 -5
- package/script/run/toInspection.d.ts +8 -0
- package/script/run/toInspection.d.ts.map +1 -0
- package/script/run/toInspection.js +82 -0
- package/script/types/Enrichments.d.ts +19 -8
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +5 -4
- package/script/types/GeneratorType.d.ts +5 -5
- package/script/types/GeneratorType.d.ts.map +1 -1
- package/script/types/Manifest.d.ts +9 -2
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +2 -2
- package/script/types/ModuleSelect.d.ts +81 -0
- package/script/types/ModuleSelect.d.ts.map +1 -0
- package/script/types/ModuleSelect.js +101 -0
- package/script/types/Preview.d.ts +4 -27
- package/script/types/Preview.d.ts.map +1 -1
- package/script/types/Preview.js +5 -26
- package/script/types/SchemaPath.d.ts +17 -0
- package/script/types/SchemaPath.d.ts.map +1 -0
- package/script/types/{AccessorPath.js → SchemaPath.js} +7 -7
- package/script/types/Settings.d.ts +45 -3
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +13 -17
- package/script/types/SkmtcDocument.d.ts +1 -1
- package/script/types/SupportedSubjects.d.ts +1 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
- package/esm/types/AccessorPath.d.ts +0 -17
- package/esm/types/AccessorPath.d.ts.map +0 -1
- package/esm/types/AccessorPath.js +0 -9
- package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
- package/script/types/AccessorPath.d.ts +0 -17
- package/script/types/AccessorPath.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.23 → 1.0.24}/exists.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/assert_path.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/_common/normalize_string.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/posix/normalize.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/_util.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/from_file_url.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/join.d.ts +0 -0
- /package/script/deps/jsr.io/@std/path/{1.1.4 → 1.1.6}/windows/normalize.d.ts +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { CHAR_COLON, CHAR_DOT } from "../_common/constants.js";
|
|
4
|
+
import { assertPath } from "../_common/assert_path.js";
|
|
5
|
+
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
|
6
|
+
import { fromFileUrl } from "./from_file_url.js";
|
|
7
|
+
/**
|
|
8
|
+
* Return the extension of the `path` with leading period.
|
|
9
|
+
*
|
|
10
|
+
* @example Usage
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { extname } from "@std/path/windows/extname";
|
|
13
|
+
* import { assertEquals } from "@std/assert";
|
|
14
|
+
*
|
|
15
|
+
* assertEquals(extname("file.ts"), ".ts");
|
|
16
|
+
* assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext");
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param path The path to get the extension from.
|
|
20
|
+
* @returns The extension of the `path`.
|
|
21
|
+
* @throws {TypeError} If `path` is a `URL` instance whose protocol is not `file:`.
|
|
22
|
+
*/
|
|
23
|
+
export function extname(path) {
|
|
24
|
+
if (path instanceof URL) {
|
|
25
|
+
path = fromFileUrl(path);
|
|
26
|
+
}
|
|
27
|
+
assertPath(path);
|
|
28
|
+
let start = 0;
|
|
29
|
+
let startDot = -1;
|
|
30
|
+
let startPart = 0;
|
|
31
|
+
let end = -1;
|
|
32
|
+
let matchedSlash = true;
|
|
33
|
+
// Track the state of characters (if any) we see before our first dot and
|
|
34
|
+
// after any path separator we find
|
|
35
|
+
let preDotState = 0;
|
|
36
|
+
// Check for a drive letter prefix so as not to mistake the following
|
|
37
|
+
// path separator as an extra separator at the end of the path that can be
|
|
38
|
+
// disregarded
|
|
39
|
+
if (path.length >= 2 &&
|
|
40
|
+
path.charCodeAt(1) === CHAR_COLON &&
|
|
41
|
+
isWindowsDeviceRoot(path.charCodeAt(0))) {
|
|
42
|
+
start = startPart = 2;
|
|
43
|
+
}
|
|
44
|
+
for (let i = path.length - 1; i >= start; --i) {
|
|
45
|
+
const code = path.charCodeAt(i);
|
|
46
|
+
if (isPathSeparator(code)) {
|
|
47
|
+
// If we reached a path separator that was not part of a set of path
|
|
48
|
+
// separators at the end of the string, stop now
|
|
49
|
+
if (!matchedSlash) {
|
|
50
|
+
startPart = i + 1;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (end === -1) {
|
|
56
|
+
// We saw the first non-path separator, mark this as the end of our
|
|
57
|
+
// extension
|
|
58
|
+
matchedSlash = false;
|
|
59
|
+
end = i + 1;
|
|
60
|
+
}
|
|
61
|
+
if (code === CHAR_DOT) {
|
|
62
|
+
// If this is our first dot, mark it as the start of our extension
|
|
63
|
+
if (startDot === -1)
|
|
64
|
+
startDot = i;
|
|
65
|
+
else if (preDotState !== 1)
|
|
66
|
+
preDotState = 1;
|
|
67
|
+
}
|
|
68
|
+
else if (startDot !== -1) {
|
|
69
|
+
// We saw a non-dot and non-path separator before our dot, so we should
|
|
70
|
+
// have a good chance at having a non-empty extension
|
|
71
|
+
preDotState = -1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (startDot === -1 ||
|
|
75
|
+
end === -1 ||
|
|
76
|
+
// We saw a non-dot character immediately before the dot
|
|
77
|
+
preDotState === 0 ||
|
|
78
|
+
// The (right-most) trimmed path component is exactly '..'
|
|
79
|
+
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
|
80
|
+
return "";
|
|
81
|
+
}
|
|
82
|
+
return path.slice(startDot, end);
|
|
83
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"from_file_url.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.
|
|
1
|
+
{"version":3,"file":"from_file_url.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.6/windows/from_file_url.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,MAAM,CAYrD"}
|
package/{script/deps/jsr.io/@std/path/1.1.4 → esm/deps/jsr.io/@std/path/1.1.6}/windows/join.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.6/windows/join.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAqDpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.6/windows/normalize.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CA6GpD"}
|
|
@@ -1,38 +1,71 @@
|
|
|
1
1
|
import { FileBase } from './FileBase.js';
|
|
2
|
+
import type { DefinitionBase } from './Definition.js';
|
|
3
|
+
import type { IdentifierBase } from './IdentifierBase.js';
|
|
2
4
|
import type { ImportBase } from './ImportBase.js';
|
|
3
5
|
import type { ReExportBase } from './ReExportBase.js';
|
|
6
|
+
/**
|
|
7
|
+
* Query for {@link CodeFileBase.findDefinitions}. `name` filters by identifier
|
|
8
|
+
* name; `type` filters by the declaration type as the opaque-boundary
|
|
9
|
+
* `string`. A lang's concrete file narrows the override to its own
|
|
10
|
+
* `XxEntityType` (`'class'` / `'interface'` / … for TypeScript). Omit both to
|
|
11
|
+
* return every definition.
|
|
12
|
+
*/
|
|
13
|
+
export type FindDefinitionsQuery = {
|
|
14
|
+
type?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The neutral name/type filter every language's `findDefinitions` shares. The
|
|
19
|
+
* language passes its definition list and a `typeOf` extractor — the one
|
|
20
|
+
* lang-specific bit, which narrows to the language's Identifier subclass to
|
|
21
|
+
* read the typed `type` (returned here as the opaque `string`).
|
|
22
|
+
*
|
|
23
|
+
* - no `name` and no `type` → returns `all` (the whole list; the former
|
|
24
|
+
* `listDefinitions`).
|
|
25
|
+
* - otherwise → the matching subset, or `undefined` when nothing matches.
|
|
26
|
+
*/
|
|
27
|
+
export declare const matchDefinitions: (all: DefinitionBase[], query: FindDefinitionsQuery | undefined, typeOf: (identifier: IdentifierBase) => string | undefined) => DefinitionBase[] | undefined;
|
|
4
28
|
/**
|
|
5
29
|
* The base every language's *code* file extends — a {@link FileBase} that
|
|
6
|
-
*
|
|
7
|
-
* {@link FileBase} directly.)
|
|
30
|
+
* coordinates definitions, imports, and re-exports. (`JsonFile`, with none of
|
|
31
|
+
* these, extends {@link FileBase} directly.)
|
|
8
32
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
33
|
+
* Language-blind: the declaration type {@link findDefinitions} filters on is
|
|
34
|
+
* the opaque-boundary `string` here; a lang's concrete file narrows its own
|
|
35
|
+
* `findDefinitions` override to its `XxEntityType`.
|
|
36
|
+
*
|
|
37
|
+
* Pure contract — no fields, no merge logic. Storage AND the duplication/merge
|
|
38
|
+
* policy are language-specific and live in the concrete lang subclass; the
|
|
39
|
+
* engine speaks only these four neutral operations — three writers driven by
|
|
40
|
+
* `register`, plus {@link findDefinitions}, the read seam the cross-generator
|
|
41
|
+
* cache and file inspection use. The cache resolves a single primary by name
|
|
42
|
+
* via `findDefinitions({ name })?.[0]`.
|
|
17
43
|
*/
|
|
18
44
|
export declare abstract class CodeFileBase extends FileBase {
|
|
19
|
-
/** Registered imports, keyed by {@link ImportBase.mergeKey}. */
|
|
20
|
-
imports: Map<string, ImportBase>;
|
|
21
|
-
/** Registered re-exports, keyed by {@link ReExportBase.mergeKey}. */
|
|
22
|
-
reExports: Map<string, ReExportBase>;
|
|
23
45
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
46
|
+
* Add a definition, applying the language's duplication rule (e.g.
|
|
47
|
+
* TypeScript declaration merging). Called by the engine's `register`.
|
|
48
|
+
*/
|
|
49
|
+
abstract addDefinition(definition: DefinitionBase): void;
|
|
50
|
+
/**
|
|
51
|
+
* Merge imports in, applying the language's collapse rule (typically
|
|
52
|
+
* keyed by {@link ImportBase.mergeKey} and combined via
|
|
53
|
+
* {@link ImportBase.merge}). Called by the engine's `register`.
|
|
54
|
+
*/
|
|
55
|
+
abstract addImports(imports: ImportBase[]): void;
|
|
56
|
+
/**
|
|
57
|
+
* Merge re-exports in, applying the language's collapse rule. Called by the
|
|
58
|
+
* engine's `register`; a language without re-exports never receives any.
|
|
27
59
|
*/
|
|
28
|
-
|
|
60
|
+
abstract addReExports(reExports: ReExportBase[]): void;
|
|
29
61
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* `
|
|
33
|
-
*
|
|
34
|
-
* `
|
|
62
|
+
* Query the file's definitions. With no `name`/`type` → every definition (an
|
|
63
|
+
* array; the neutral "list all" used to inspect a file, e.g. assert the
|
|
64
|
+
* peer-dedup invariant). With `name` and/or `type` → the matching subset, or
|
|
65
|
+
* `undefined` when nothing matches. `type` is the declaration type as the
|
|
66
|
+
* opaque `string`; a lang's concrete file may narrow it. Implement with
|
|
67
|
+
* {@link matchDefinitions}.
|
|
35
68
|
*/
|
|
36
|
-
|
|
69
|
+
abstract findDefinitions(query?: FindDefinitionsQuery): DefinitionBase[] | undefined;
|
|
37
70
|
}
|
|
38
71
|
//# sourceMappingURL=CodeFileBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeFileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/CodeFileBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD
|
|
1
|
+
{"version":3,"file":"CodeFileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/CodeFileBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAC3B,KAAK,cAAc,EAAE,EACrB,OAAO,oBAAoB,GAAG,SAAS,EACvC,QAAQ,CAAC,UAAU,EAAE,cAAc,KAAK,MAAM,GAAG,SAAS,KACzD,cAAc,EAAE,GAAG,SAerB,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,YAAa,SAAQ,QAAQ;IACjD;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAExD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI;IAEhD;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,IAAI;IAEtD;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,cAAc,EAAE,GAAG,SAAS;CACrF"}
|
package/esm/dsl/CodeFileBase.js
CHANGED
|
@@ -1,60 +1,42 @@
|
|
|
1
1
|
import { FileBase } from './FileBase.js';
|
|
2
|
+
/**
|
|
3
|
+
* The neutral name/type filter every language's `findDefinitions` shares. The
|
|
4
|
+
* language passes its definition list and a `typeOf` extractor — the one
|
|
5
|
+
* lang-specific bit, which narrows to the language's Identifier subclass to
|
|
6
|
+
* read the typed `type` (returned here as the opaque `string`).
|
|
7
|
+
*
|
|
8
|
+
* - no `name` and no `type` → returns `all` (the whole list; the former
|
|
9
|
+
* `listDefinitions`).
|
|
10
|
+
* - otherwise → the matching subset, or `undefined` when nothing matches.
|
|
11
|
+
*/
|
|
12
|
+
export const matchDefinitions = (all, query, typeOf) => {
|
|
13
|
+
const name = query?.name;
|
|
14
|
+
const type = query?.type;
|
|
15
|
+
if (name === undefined && type === undefined) {
|
|
16
|
+
return all;
|
|
17
|
+
}
|
|
18
|
+
const matches = all.filter(definition => {
|
|
19
|
+
const nameMatches = name === undefined || definition.identifier.name === name;
|
|
20
|
+
const typeMatches = type === undefined || typeOf(definition.identifier) === type;
|
|
21
|
+
return nameMatches && typeMatches;
|
|
22
|
+
});
|
|
23
|
+
return matches.length > 0 ? matches : undefined;
|
|
24
|
+
};
|
|
2
25
|
/**
|
|
3
26
|
* The base every language's *code* file extends — a {@link FileBase} that
|
|
4
|
-
*
|
|
5
|
-
* {@link FileBase} directly.)
|
|
27
|
+
* coordinates definitions, imports, and re-exports. (`JsonFile`, with none of
|
|
28
|
+
* these, extends {@link FileBase} directly.)
|
|
6
29
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
30
|
+
* Language-blind: the declaration type {@link findDefinitions} filters on is
|
|
31
|
+
* the opaque-boundary `string` here; a lang's concrete file narrows its own
|
|
32
|
+
* `findDefinitions` override to its `XxEntityType`.
|
|
33
|
+
*
|
|
34
|
+
* Pure contract — no fields, no merge logic. Storage AND the duplication/merge
|
|
35
|
+
* policy are language-specific and live in the concrete lang subclass; the
|
|
36
|
+
* engine speaks only these four neutral operations — three writers driven by
|
|
37
|
+
* `register`, plus {@link findDefinitions}, the read seam the cross-generator
|
|
38
|
+
* cache and file inspection use. The cache resolves a single primary by name
|
|
39
|
+
* via `findDefinitions({ name })?.[0]`.
|
|
15
40
|
*/
|
|
16
41
|
export class CodeFileBase extends FileBase {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
/** Registered imports, keyed by {@link ImportBase.mergeKey}. */
|
|
20
|
-
Object.defineProperty(this, "imports", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: new Map()
|
|
25
|
-
});
|
|
26
|
-
/** Registered re-exports, keyed by {@link ReExportBase.mergeKey}. */
|
|
27
|
-
Object.defineProperty(this, "reExports", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true,
|
|
31
|
-
value: new Map()
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Merge imports in, collapsing any that share a `mergeKey()` with an
|
|
36
|
-
* existing entry via {@link ImportBase.merge}. Neutral — the engine's
|
|
37
|
-
* `register` calls this on the abstract base for every language's file.
|
|
38
|
-
*/
|
|
39
|
-
addImports(incoming) {
|
|
40
|
-
for (const importEntry of incoming) {
|
|
41
|
-
const key = importEntry.mergeKey();
|
|
42
|
-
const existing = this.imports.get(key);
|
|
43
|
-
this.imports.set(key, existing ? existing.merge(importEntry) : importEntry);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Merge re-exports in, collapsing any that share a `mergeKey()` with an
|
|
48
|
-
* existing entry via {@link ReExportBase.merge}. Neutral — the engine's
|
|
49
|
-
* `register` calls this on the abstract base; a language without
|
|
50
|
-
* re-exports never receives any (its concise register vocabulary has no
|
|
51
|
-
* `reExports` field).
|
|
52
|
-
*/
|
|
53
|
-
addReExports(incoming) {
|
|
54
|
-
for (const reExportEntry of incoming) {
|
|
55
|
-
const key = reExportEntry.mergeKey();
|
|
56
|
-
const existing = this.reExports.get(key);
|
|
57
|
-
this.reExports.set(key, existing ? existing.merge(reExportEntry) : reExportEntry);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
42
|
}
|
package/esm/dsl/FileBase.d.ts
CHANGED
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Stringable } from './Stringable.js';
|
|
2
2
|
/**
|
|
3
3
|
* The language-neutral coordination surface shared by the engine and
|
|
4
4
|
* every `@skmtc/lang-*` package's concrete file subclass.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* `FileBase` carries only what is common to *every* file — code or not:
|
|
7
|
+
* its `path`, an optional free-form `custom` content slot, and the
|
|
8
|
+
* `toString()` contract. It holds NO definitions, imports, or dedup
|
|
9
|
+
* policy — those are code-file concerns that live on {@link CodeFileBase}
|
|
10
|
+
* and the language subclass, which is what keeps the engine
|
|
11
|
+
* language-blind.
|
|
12
12
|
*
|
|
13
|
-
* `JsonFile` extends this
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* `JsonFile` extends this directly — a JSON file has a `path`, serialises
|
|
14
|
+
* its content in `toString()`, and never touches definitions. (See
|
|
15
|
+
* notes/lang: "JSON is a degenerate language".)
|
|
16
16
|
*
|
|
17
|
-
* Lives in its own leaf module (only a type-only `
|
|
18
|
-
*
|
|
19
|
-
* import
|
|
17
|
+
* Lives in its own leaf module (only a type-only `Stringable` import) so
|
|
18
|
+
* that the file subclasses can import it without forming a value-level
|
|
19
|
+
* import cycle.
|
|
20
20
|
*/
|
|
21
21
|
export declare abstract class FileBase {
|
|
22
22
|
/** The file path for this generated file */
|
|
23
23
|
path: string;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Optional free-form content. On a code file this is the leading banner
|
|
26
|
+
* (e.g. a codegen header); on an ad-hoc non-code file (Markdown, plain
|
|
27
|
+
* text) it can carry the body. Inert until a concrete subclass renders
|
|
28
|
+
* it in `toString()`. Set through the neutral `register` vocabulary's
|
|
29
|
+
* `custom` field (last write wins).
|
|
30
|
+
*/
|
|
31
|
+
custom: Stringable | undefined;
|
|
26
32
|
constructor({ path }: {
|
|
27
33
|
path: string;
|
|
28
34
|
});
|
|
29
|
-
/**
|
|
30
|
-
* Add a definition, deduplicating by identifier name (first write wins).
|
|
31
|
-
*
|
|
32
|
-
* Neutral: the engine's `register` calls this on the abstract base, so it
|
|
33
|
-
* works for every language's file. Per-language duplication rules (e.g.
|
|
34
|
-
* TypeScript declaration merging — a class and its `declare namespace`
|
|
35
|
-
* sharing a name) belong in the language's file subclass, which overrides
|
|
36
|
-
* this method.
|
|
37
|
-
*/
|
|
38
|
-
addDefinition(definition: DefinitionBase): void;
|
|
39
35
|
/** Renders the file's complete contents. Implemented by the subclass. */
|
|
40
36
|
abstract toString(): string;
|
|
41
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/FileBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"FileBase.d.ts","sourceRoot":"","sources":["../../src/dsl/FileBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,QAAQ;IAC5B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;;;OAMG;IACH,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;gBAElB,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;IAItC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,IAAI,MAAM;CAC5B"}
|
package/esm/dsl/FileBase.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* The language-neutral coordination surface shared by the engine and
|
|
3
3
|
* every `@skmtc/lang-*` package's concrete file subclass.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* `FileBase` carries only what is common to *every* file — code or not:
|
|
6
|
+
* its `path`, an optional free-form `custom` content slot, and the
|
|
7
|
+
* `toString()` contract. It holds NO definitions, imports, or dedup
|
|
8
|
+
* policy — those are code-file concerns that live on {@link CodeFileBase}
|
|
9
|
+
* and the language subclass, which is what keeps the engine
|
|
10
|
+
* language-blind.
|
|
11
11
|
*
|
|
12
|
-
* `JsonFile` extends this
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* `JsonFile` extends this directly — a JSON file has a `path`, serialises
|
|
13
|
+
* its content in `toString()`, and never touches definitions. (See
|
|
14
|
+
* notes/lang: "JSON is a degenerate language".)
|
|
15
15
|
*
|
|
16
|
-
* Lives in its own leaf module (only a type-only `
|
|
17
|
-
*
|
|
18
|
-
* import
|
|
16
|
+
* Lives in its own leaf module (only a type-only `Stringable` import) so
|
|
17
|
+
* that the file subclasses can import it without forming a value-level
|
|
18
|
+
* import cycle.
|
|
19
19
|
*/
|
|
20
20
|
export class FileBase {
|
|
21
21
|
constructor({ path }) {
|
|
@@ -26,28 +26,19 @@ export class FileBase {
|
|
|
26
26
|
writable: true,
|
|
27
27
|
value: void 0
|
|
28
28
|
});
|
|
29
|
-
/**
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Optional free-form content. On a code file this is the leading banner
|
|
31
|
+
* (e.g. a codegen header); on an ad-hoc non-code file (Markdown, plain
|
|
32
|
+
* text) it can carry the body. Inert until a concrete subclass renders
|
|
33
|
+
* it in `toString()`. Set through the neutral `register` vocabulary's
|
|
34
|
+
* `custom` field (last write wins).
|
|
35
|
+
*/
|
|
36
|
+
Object.defineProperty(this, "custom", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
configurable: true,
|
|
33
39
|
writable: true,
|
|
34
40
|
value: void 0
|
|
35
41
|
});
|
|
36
42
|
this.path = path;
|
|
37
|
-
this.definitions = new Map();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Add a definition, deduplicating by identifier name (first write wins).
|
|
41
|
-
*
|
|
42
|
-
* Neutral: the engine's `register` calls this on the abstract base, so it
|
|
43
|
-
* works for every language's file. Per-language duplication rules (e.g.
|
|
44
|
-
* TypeScript declaration merging — a class and its `declare namespace`
|
|
45
|
-
* sharing a name) belong in the language's file subclass, which overrides
|
|
46
|
-
* this method.
|
|
47
|
-
*/
|
|
48
|
-
addDefinition(definition) {
|
|
49
|
-
if (!this.definitions.has(definition.identifier.name)) {
|
|
50
|
-
this.definitions.set(definition.identifier.name, definition);
|
|
51
|
-
}
|
|
52
43
|
}
|
|
53
44
|
}
|
|
@@ -129,7 +129,7 @@ export type OasOperationGeneratorKey = Brand<NakedOasOperationGeneratorKey, 'Oas
|
|
|
129
129
|
* Branded type for GraphQL operation generator keys.
|
|
130
130
|
*
|
|
131
131
|
* Sibling to {@link OasOperationGeneratorKey} for the GraphQL protocol. The key
|
|
132
|
-
* encodes the generator ID, the root
|
|
132
|
+
* encodes the generator ID, the root type (`query` / `mutation` /
|
|
133
133
|
* `subscription`), and the root field name.
|
|
134
134
|
*/
|
|
135
135
|
export type GqlOperationGeneratorKey = Brand<NakedGqlOperationGeneratorKey, 'GqlOperationGeneratorKey'>;
|
|
@@ -210,15 +210,15 @@ type ToOasOperationGeneratorKeyArgs = {
|
|
|
210
210
|
path: string;
|
|
211
211
|
/** HTTP method */
|
|
212
212
|
method: Method;
|
|
213
|
-
/** Operation variant name
|
|
214
|
-
variant
|
|
213
|
+
/** Operation variant name — omitted means `'main'` */
|
|
214
|
+
variant?: string;
|
|
215
215
|
} | {
|
|
216
216
|
/** Unique identifier for the generator */
|
|
217
217
|
generatorId: string;
|
|
218
218
|
/** OpenAPI operation object containing path and method */
|
|
219
219
|
operation: OasOperation;
|
|
220
|
-
/** Operation variant name
|
|
221
|
-
variant
|
|
220
|
+
/** Operation variant name — omitted means `'main'` */
|
|
221
|
+
variant?: string;
|
|
222
222
|
};
|
|
223
223
|
/**
|
|
224
224
|
* Creates an OAS operation generator key from generator ID and operation details.
|
|
@@ -271,15 +271,15 @@ type ToWebhookGeneratorKeyArgs = {
|
|
|
271
271
|
name: string;
|
|
272
272
|
/** HTTP method */
|
|
273
273
|
method: Method;
|
|
274
|
-
/** Webhook variant name
|
|
275
|
-
variant
|
|
274
|
+
/** Webhook variant name — omitted means `'main'` */
|
|
275
|
+
variant?: string;
|
|
276
276
|
} | {
|
|
277
277
|
/** Unique identifier for the generator */
|
|
278
278
|
generatorId: string;
|
|
279
279
|
/** OpenAPI webhook object containing name and method */
|
|
280
280
|
webhook: OasWebhook;
|
|
281
|
-
/** Webhook variant name
|
|
282
|
-
variant
|
|
281
|
+
/** Webhook variant name — omitted means `'main'` */
|
|
282
|
+
variant?: string;
|
|
283
283
|
};
|
|
284
284
|
/**
|
|
285
285
|
* Creates a webhook generator key from generator ID and webhook details.
|
|
@@ -293,25 +293,25 @@ export declare const toWebhookGeneratorKey: ({ generatorId, variant, ...rest }:
|
|
|
293
293
|
* Arguments for {@link toGqlOperationGeneratorKey}.
|
|
294
294
|
*
|
|
295
295
|
* Can specify operation details directly or provide a {@link GqlOperation}
|
|
296
|
-
* object from which the root
|
|
296
|
+
* object from which the root type and field name will be extracted. The
|
|
297
297
|
* `variant` segment is always required (see {@link Variant}).
|
|
298
298
|
*/
|
|
299
299
|
type ToGqlOperationGeneratorKeyArgs = {
|
|
300
300
|
/** Unique identifier for the generator */
|
|
301
301
|
generatorId: string;
|
|
302
|
-
/** GraphQL root
|
|
302
|
+
/** GraphQL root type */
|
|
303
303
|
rootKind: GqlRootKind;
|
|
304
304
|
/** Root field name */
|
|
305
305
|
fieldName: string;
|
|
306
|
-
/** Operation variant name
|
|
307
|
-
variant
|
|
306
|
+
/** Operation variant name — omitted means `'main'` */
|
|
307
|
+
variant?: string;
|
|
308
308
|
} | {
|
|
309
309
|
/** Unique identifier for the generator */
|
|
310
310
|
generatorId: string;
|
|
311
311
|
/** GraphQL operation object */
|
|
312
312
|
operation: GqlOperation;
|
|
313
|
-
/** Operation variant name
|
|
314
|
-
variant
|
|
313
|
+
/** Operation variant name — omitted means `'main'` */
|
|
314
|
+
variant?: string;
|
|
315
315
|
};
|
|
316
316
|
/**
|
|
317
317
|
* Creates a GraphQL operation generator key.
|
|
@@ -331,8 +331,8 @@ type ToModelGeneratorKeyArgs = {
|
|
|
331
331
|
generatorId: string;
|
|
332
332
|
/** Reference name of the schema model */
|
|
333
333
|
refName: RefName;
|
|
334
|
-
/** Model variant name
|
|
335
|
-
variant
|
|
334
|
+
/** Model variant name — omitted means `'main'` */
|
|
335
|
+
variant?: string;
|
|
336
336
|
};
|
|
337
337
|
/**
|
|
338
338
|
* Creates a model generator key from generator ID, schema reference name,
|
|
@@ -455,7 +455,7 @@ export declare const isWebhookGeneratorKey: (arg: unknown) => arg is WebhookGene
|
|
|
455
455
|
*
|
|
456
456
|
* Validates that the argument is a string with the format
|
|
457
457
|
* `generatorId|rootKind|fieldName`, with `rootKind` constrained to a
|
|
458
|
-
* GraphQL root operation
|
|
458
|
+
* GraphQL root operation type (`query` / `mutation` / `subscription`).
|
|
459
459
|
*/
|
|
460
460
|
export declare const isGqlOperationGeneratorKey: (arg: unknown) => arg is GqlOperationGeneratorKey;
|
|
461
461
|
/**
|
|
@@ -572,7 +572,7 @@ export type GeneratorKeyObject = {
|
|
|
572
572
|
type: 'gqlOperation';
|
|
573
573
|
/** Generator identifier */
|
|
574
574
|
generatorId: string;
|
|
575
|
-
/** GraphQL root
|
|
575
|
+
/** GraphQL root type */
|
|
576
576
|
rootKind: GqlRootKind;
|
|
577
577
|
/** Root field name */
|
|
578
578
|
fieldName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"GeneratorKeys.d.ts","sourceRoot":"","sources":["../../src/dsl/GeneratorKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,sBAAsB,CAAC;AAG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