@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
|
@@ -9,8 +9,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews,
|
|
13
|
-
import { normalize } from '../deps/jsr.io/@std/path/1.1.
|
|
12
|
+
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_captureChannel, _GenerateContext_schemaRefNames, _GenerateContext_subjectDefaults, _GenerateContext_runOasOperationGenerator, _GenerateContext_runWebhookGenerator, _GenerateContext_runGqlOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_addPreview, _GenerateContext_toContentSettingsExportPath, _GenerateContext_ejectedBySuffixedPath_get, _GenerateContext_ejectedBySuffixedPathCache;
|
|
13
|
+
import { normalize } from '../deps/jsr.io/@std/path/1.1.6/normalize.js';
|
|
14
|
+
import { applyGeneratedSuffix, DEFAULT_GENERATED_SUFFIX } from '../helpers/applyGeneratedSuffix.js';
|
|
14
15
|
import { OasOperationDriver } from '../dsl/operation/oas/OasOperationDriver.js';
|
|
15
16
|
import { WebhookDriver } from '../dsl/webhook/WebhookDriver.js';
|
|
16
17
|
import { GqlOperationDriver } from '../dsl/operation/gql/GqlOperationDriver.js';
|
|
@@ -22,6 +23,7 @@ import get from 'lodash-es/get.js';
|
|
|
22
23
|
import { Inserted } from '../dsl/Inserted.js';
|
|
23
24
|
import { CodeFileBase } from '../dsl/CodeFileBase.js';
|
|
24
25
|
import { JsonFile } from '../dsl/JsonFile.js';
|
|
26
|
+
import { MarkdownFile } from '../dsl/MarkdownFile.js';
|
|
25
27
|
import invariant from 'tiny-invariant';
|
|
26
28
|
/**
|
|
27
29
|
* The generation context for the second phase of the SKMTC transformation pipeline.
|
|
@@ -76,7 +78,6 @@ export class GenerateContext {
|
|
|
76
78
|
_GenerateContext_instances.add(this);
|
|
77
79
|
_GenerateContext_files.set(this, void 0);
|
|
78
80
|
_GenerateContext_previews.set(this, void 0);
|
|
79
|
-
_GenerateContext_mappings.set(this, void 0);
|
|
80
81
|
/**
|
|
81
82
|
* Parsed source document, wrapped in the {@link SkmtcParsedDocument}
|
|
82
83
|
* discriminated union. Canonical representation; both protocol-neutral
|
|
@@ -130,10 +131,10 @@ export class GenerateContext {
|
|
|
130
131
|
*/
|
|
131
132
|
/** Shared attribution capture channel (see {@link ConstructorArgs}). */
|
|
132
133
|
_GenerateContext_captureChannel.set(this, void 0);
|
|
134
|
+
_GenerateContext_ejectedBySuffixedPathCache.set(this, void 0);
|
|
133
135
|
this.logger = logger;
|
|
134
136
|
__classPrivateFieldSet(this, _GenerateContext_files, new Map(), "f");
|
|
135
137
|
__classPrivateFieldSet(this, _GenerateContext_previews, {}, "f");
|
|
136
|
-
__classPrivateFieldSet(this, _GenerateContext_mappings, {}, "f");
|
|
137
138
|
this.document = document;
|
|
138
139
|
this.settings = settings;
|
|
139
140
|
this.captureCurrentResult = captureCurrentResult;
|
|
@@ -224,8 +225,7 @@ export class GenerateContext {
|
|
|
224
225
|
});
|
|
225
226
|
return {
|
|
226
227
|
files: __classPrivateFieldGet(this, _GenerateContext_files, "f"),
|
|
227
|
-
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
228
|
-
mappings: __classPrivateFieldGet(this, _GenerateContext_mappings, "f")
|
|
228
|
+
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
@@ -244,8 +244,11 @@ export class GenerateContext {
|
|
|
244
244
|
case 'oasOperation': {
|
|
245
245
|
const operations = this.document.type === 'oas'
|
|
246
246
|
? this.document.value.operations
|
|
247
|
-
.filter(operation =>
|
|
248
|
-
|
|
247
|
+
.filter(operation => generatorConfig.isSupported({
|
|
248
|
+
operation,
|
|
249
|
+
context: this,
|
|
250
|
+
variant: DEFAULT_VARIANT
|
|
251
|
+
}))
|
|
249
252
|
.map(operation => ({ path: operation.path, method: operation.method }))
|
|
250
253
|
: [];
|
|
251
254
|
out[generatorConfig.id] = { type: 'oasOperation', operations };
|
|
@@ -254,8 +257,11 @@ export class GenerateContext {
|
|
|
254
257
|
case 'webhook': {
|
|
255
258
|
const webhooks = this.document.type === 'oas'
|
|
256
259
|
? this.document.value.webhooks
|
|
257
|
-
.filter(webhook =>
|
|
258
|
-
|
|
260
|
+
.filter(webhook => generatorConfig.isSupported({
|
|
261
|
+
webhook,
|
|
262
|
+
context: this,
|
|
263
|
+
variant: DEFAULT_VARIANT
|
|
264
|
+
}))
|
|
259
265
|
.map(webhook => ({ name: webhook.name, method: webhook.method }))
|
|
260
266
|
: [];
|
|
261
267
|
out[generatorConfig.id] = { type: 'webhook', webhooks };
|
|
@@ -264,8 +270,11 @@ export class GenerateContext {
|
|
|
264
270
|
case 'gqlOperation': {
|
|
265
271
|
const operations = this.document.type === 'gql'
|
|
266
272
|
? this.document.value.operations
|
|
267
|
-
.filter(operation =>
|
|
268
|
-
|
|
273
|
+
.filter(operation => generatorConfig.isSupported({
|
|
274
|
+
operation,
|
|
275
|
+
context: this,
|
|
276
|
+
variant: DEFAULT_VARIANT
|
|
277
|
+
}))
|
|
269
278
|
.map(operation => ({
|
|
270
279
|
rootKind: operation.rootKind,
|
|
271
280
|
fieldName: operation.fieldName
|
|
@@ -275,8 +284,7 @@ export class GenerateContext {
|
|
|
275
284
|
break;
|
|
276
285
|
}
|
|
277
286
|
case 'model': {
|
|
278
|
-
const models = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this).filter(refName =>
|
|
279
|
-
generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT }));
|
|
287
|
+
const models = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this).filter(refName => generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT }));
|
|
280
288
|
out[generatorConfig.id] = { type: 'model', models };
|
|
281
289
|
break;
|
|
282
290
|
}
|
|
@@ -313,8 +321,7 @@ export class GenerateContext {
|
|
|
313
321
|
break;
|
|
314
322
|
const operations = {};
|
|
315
323
|
this.document.value.operations.forEach(operation => {
|
|
316
|
-
if (
|
|
317
|
-
!generatorConfig.isSupported({ operation, context: this, variant: DEFAULT_VARIANT })) {
|
|
324
|
+
if (!generatorConfig.isSupported({ operation, context: this, variant: DEFAULT_VARIANT })) {
|
|
318
325
|
return;
|
|
319
326
|
}
|
|
320
327
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ operation, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -334,8 +341,7 @@ export class GenerateContext {
|
|
|
334
341
|
break;
|
|
335
342
|
const webhooks = {};
|
|
336
343
|
this.document.value.webhooks.forEach(webhook => {
|
|
337
|
-
if (
|
|
338
|
-
!generatorConfig.isSupported({ webhook, context: this, variant: DEFAULT_VARIANT })) {
|
|
344
|
+
if (!generatorConfig.isSupported({ webhook, context: this, variant: DEFAULT_VARIANT })) {
|
|
339
345
|
return;
|
|
340
346
|
}
|
|
341
347
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ webhook, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -359,8 +365,7 @@ export class GenerateContext {
|
|
|
359
365
|
// `undefined` for schemas it doesn't seed.
|
|
360
366
|
const models = {};
|
|
361
367
|
for (const refName of __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this)) {
|
|
362
|
-
if (
|
|
363
|
-
!generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT })) {
|
|
368
|
+
if (!generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT })) {
|
|
364
369
|
continue;
|
|
365
370
|
}
|
|
366
371
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ refName, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -398,6 +403,19 @@ export class GenerateContext {
|
|
|
398
403
|
getFile(filePath) {
|
|
399
404
|
return __classPrivateFieldGet(this, _GenerateContext_files, "f").get(normalize(filePath));
|
|
400
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* Read-only view of every file generated so far, keyed by (normalized)
|
|
408
|
+
* export path. An **inspection / tooling** seam — NOT a coordination
|
|
409
|
+
* surface: generators must still register via `register` / `insert*`, and
|
|
410
|
+
* the storage stays `#`-private so nothing outside can mutate or re-bind it.
|
|
411
|
+
*
|
|
412
|
+
* Unlike {@link getFile} (which needs a path) this lets tooling *enumerate*
|
|
413
|
+
* the files map — e.g. a debugger visualiser snapshotting the in-progress
|
|
414
|
+
* state at a breakpoint. The `ReadonlyMap` type signals look-don't-touch.
|
|
415
|
+
*/
|
|
416
|
+
get inspectedFiles() {
|
|
417
|
+
return __classPrivateFieldGet(this, _GenerateContext_files, "f");
|
|
418
|
+
}
|
|
401
419
|
/**
|
|
402
420
|
* Store a language-constructed file. The engine never constructs a
|
|
403
421
|
* concrete (language) `File`; the language's `register` builds its own
|
|
@@ -427,6 +445,25 @@ export class GenerateContext {
|
|
|
427
445
|
invariant(currentFile instanceof JsonFile, `File at "${destinationPath}" is not a "JsonFile" type`);
|
|
428
446
|
currentFile.content = json;
|
|
429
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Registers Markdown content for output to a file.
|
|
450
|
+
*
|
|
451
|
+
* The Markdown counterpart of {@link registerJson} — create-or-replace, last
|
|
452
|
+
* write wins. The `markdown` is any {@link Stringable} (typically a composed
|
|
453
|
+
* snippet tree), rendered verbatim into a {@link MarkdownFile}.
|
|
454
|
+
*
|
|
455
|
+
* @experimental This method is experimental and may change in future versions
|
|
456
|
+
*/
|
|
457
|
+
registerMarkdown({ destinationPath, markdown }) {
|
|
458
|
+
const normalizedPath = normalize(destinationPath);
|
|
459
|
+
let currentFile = this.getFile(normalizedPath);
|
|
460
|
+
if (!currentFile) {
|
|
461
|
+
currentFile = new MarkdownFile({ path: normalizedPath, content: '' });
|
|
462
|
+
this.addFile(currentFile);
|
|
463
|
+
}
|
|
464
|
+
invariant(currentFile instanceof MarkdownFile, `File at "${destinationPath}" is not a "MarkdownFile" type`);
|
|
465
|
+
currentFile.content = markdown;
|
|
466
|
+
}
|
|
430
467
|
/**
|
|
431
468
|
* Insert supplied `imports` and `definitions` into file at `destinationPath`.
|
|
432
469
|
*
|
|
@@ -438,7 +475,7 @@ export class GenerateContext {
|
|
|
438
475
|
*
|
|
439
476
|
* @mutates this.files
|
|
440
477
|
*/
|
|
441
|
-
register({ imports = [], reExports = [], definitions, destinationPath }) {
|
|
478
|
+
register({ imports = [], reExports = [], definitions, custom, destinationPath }) {
|
|
442
479
|
const normalizedPath = normalize(destinationPath);
|
|
443
480
|
const currentFile = this.getFile(normalizedPath);
|
|
444
481
|
// `register` never creates files — it speaks pure data and the engine
|
|
@@ -448,22 +485,27 @@ export class GenerateContext {
|
|
|
448
485
|
// caller.
|
|
449
486
|
invariant(currentFile, `Cannot register into '${normalizedPath}' — the file does not exist. ` +
|
|
450
487
|
`Pre-create it through your lang (its register function does this).`);
|
|
451
|
-
//
|
|
452
|
-
//
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
// Imports and re-exports are standardised `ImportBase` /
|
|
459
|
-
// `ReExportBase` objects; the neutral merges (keyed by `mergeKey`)
|
|
460
|
-
// live on `CodeFileBase`. `JsonFile` has neither, so the guard skips
|
|
461
|
-
// it.
|
|
462
|
-
if (imports.length > 0 && currentFile instanceof CodeFileBase) {
|
|
463
|
-
currentFile.addImports(imports);
|
|
488
|
+
// `custom` is language-neutral — it lives on `FileBase`, so any file
|
|
489
|
+
// (code or not, e.g. a JSON/Markdown file) can receive it. Last
|
|
490
|
+
// non-`undefined` write wins.
|
|
491
|
+
if (custom !== undefined) {
|
|
492
|
+
currentFile.custom = custom;
|
|
464
493
|
}
|
|
465
|
-
|
|
466
|
-
|
|
494
|
+
// Definitions, imports, and re-exports — and their duplication/merge
|
|
495
|
+
// policy — are code-file concerns owned by the language subclass.
|
|
496
|
+
// `JsonFile` (no definitions/imports) is skipped by the guard.
|
|
497
|
+
if (currentFile instanceof CodeFileBase) {
|
|
498
|
+
definitions?.forEach(definition => {
|
|
499
|
+
if (definition) {
|
|
500
|
+
currentFile.addDefinition(definition);
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
if (imports.length > 0) {
|
|
504
|
+
currentFile.addImports(imports);
|
|
505
|
+
}
|
|
506
|
+
if (reExports.length > 0) {
|
|
507
|
+
currentFile.addReExports(reExports);
|
|
508
|
+
}
|
|
467
509
|
}
|
|
468
510
|
}
|
|
469
511
|
/**
|
|
@@ -601,7 +643,7 @@ export class GenerateContext {
|
|
|
601
643
|
* given operation.
|
|
602
644
|
*/
|
|
603
645
|
toOperationContentSettings(args) {
|
|
604
|
-
const
|
|
646
|
+
const variant = args.variant ?? DEFAULT_VARIANT;
|
|
605
647
|
if (isGqlToOperationSettingsArgs(args)) {
|
|
606
648
|
const enrichments = args.projection.toEnrichments({
|
|
607
649
|
operation: args.operation,
|
|
@@ -617,11 +659,11 @@ export class GenerateContext {
|
|
|
617
659
|
}),
|
|
618
660
|
...args.projection.toIdentifierType(args.operation, this)
|
|
619
661
|
}),
|
|
620
|
-
exportPath: args.projection.toExportPath({
|
|
662
|
+
exportPath: __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toContentSettingsExportPath).call(this, args.projection.toExportPath({
|
|
621
663
|
operation: args.operation,
|
|
622
664
|
enrichments,
|
|
623
665
|
variant
|
|
624
|
-
}),
|
|
666
|
+
})),
|
|
625
667
|
enrichments,
|
|
626
668
|
variant
|
|
627
669
|
});
|
|
@@ -640,11 +682,11 @@ export class GenerateContext {
|
|
|
640
682
|
}),
|
|
641
683
|
...args.projection.toIdentifierType(args.operation, this)
|
|
642
684
|
}),
|
|
643
|
-
exportPath: args.projection.toExportPath({
|
|
685
|
+
exportPath: __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toContentSettingsExportPath).call(this, args.projection.toExportPath({
|
|
644
686
|
operation: args.operation,
|
|
645
687
|
enrichments,
|
|
646
688
|
variant
|
|
647
|
-
}),
|
|
689
|
+
})),
|
|
648
690
|
enrichments,
|
|
649
691
|
variant
|
|
650
692
|
});
|
|
@@ -655,7 +697,7 @@ export class GenerateContext {
|
|
|
655
697
|
* protocol discrimination.
|
|
656
698
|
*/
|
|
657
699
|
toWebhookContentSettings(args) {
|
|
658
|
-
const
|
|
700
|
+
const variant = args.variant ?? DEFAULT_VARIANT;
|
|
659
701
|
const enrichments = args.projection.toEnrichments({
|
|
660
702
|
webhook: args.webhook,
|
|
661
703
|
context: this,
|
|
@@ -670,11 +712,11 @@ export class GenerateContext {
|
|
|
670
712
|
}),
|
|
671
713
|
...args.projection.toIdentifierType(args.webhook, this)
|
|
672
714
|
}),
|
|
673
|
-
exportPath: args.projection.toExportPath({
|
|
715
|
+
exportPath: __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toContentSettingsExportPath).call(this, args.projection.toExportPath({
|
|
674
716
|
webhook: args.webhook,
|
|
675
717
|
enrichments,
|
|
676
718
|
variant
|
|
677
|
-
}),
|
|
719
|
+
})),
|
|
678
720
|
enrichments,
|
|
679
721
|
variant
|
|
680
722
|
});
|
|
@@ -682,19 +724,19 @@ export class GenerateContext {
|
|
|
682
724
|
/**
|
|
683
725
|
* Build content settings for a model projection by calling its statics
|
|
684
726
|
* `toIdentifierName` (pure, for the name) + `toIdentifierType`
|
|
685
|
-
* (context-aware, for
|
|
727
|
+
* (context-aware, for type/typeName/exported), `toExportPath`, and
|
|
686
728
|
* `toEnrichments` against the given `refName` and `variant`. The full
|
|
687
729
|
* identifier is assembled through the projection's language
|
|
688
730
|
* (`lang.toIdentifier`).
|
|
689
731
|
*/
|
|
690
|
-
toModelContentSettings({ refName, projection, variant }) {
|
|
732
|
+
toModelContentSettings({ refName, projection, variant = DEFAULT_VARIANT }) {
|
|
691
733
|
const enrichments = projection.toEnrichments({ refName, context: this, variant });
|
|
692
734
|
return new ContentSettings({
|
|
693
735
|
identifier: projection.lang.toIdentifier({
|
|
694
736
|
name: projection.toIdentifierName({ refName, enrichments, variant }),
|
|
695
737
|
...projection.toIdentifierType(refName, this)
|
|
696
738
|
}),
|
|
697
|
-
exportPath: projection.toExportPath({ refName, enrichments, variant }),
|
|
739
|
+
exportPath: __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toContentSettingsExportPath).call(this, projection.toExportPath({ refName, enrichments, variant })),
|
|
698
740
|
enrichments,
|
|
699
741
|
variant
|
|
700
742
|
});
|
|
@@ -728,12 +770,14 @@ export class GenerateContext {
|
|
|
728
770
|
* @returns Matching definition if found or `undefined` otherwise
|
|
729
771
|
*/
|
|
730
772
|
findDefinition({ name, exportPath }) {
|
|
731
|
-
// Pure lookup — no file is created on a miss.
|
|
732
|
-
//
|
|
733
|
-
|
|
773
|
+
// Pure lookup — no file is created on a miss. Definitions live on the
|
|
774
|
+
// code-file subclass, so narrow; a non-code file (`JsonFile`) has none.
|
|
775
|
+
// The cache wants the single primary for the name → first match.
|
|
776
|
+
const file = this.getFile(exportPath);
|
|
777
|
+
return file instanceof CodeFileBase ? file.findDefinitions({ name })?.[0] : undefined;
|
|
734
778
|
}
|
|
735
779
|
}
|
|
736
|
-
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(),
|
|
780
|
+
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(), _GenerateContext_captureChannel = new WeakMap(), _GenerateContext_ejectedBySuffixedPathCache = new WeakMap(), _GenerateContext_instances = new WeakSet(), _GenerateContext_schemaRefNames = function _GenerateContext_schemaRefNames() {
|
|
737
781
|
switch (this.document.type) {
|
|
738
782
|
case 'oas':
|
|
739
783
|
return [...(this.document.value.components?.toSchemasRefNames() ?? [])];
|
|
@@ -771,7 +815,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
771
815
|
// at config-load time once it lands)
|
|
772
816
|
// - present, object → enumerate keys; 'main' must be among
|
|
773
817
|
// them or we throw (loud beats silent zero-output)
|
|
774
|
-
const opEnrichments = get(this.settings, [
|
|
818
|
+
const opEnrichments = get(this.settings, [
|
|
819
|
+
'enrichments',
|
|
820
|
+
generatorConfig.id,
|
|
821
|
+
operation.path,
|
|
822
|
+
operation.method
|
|
823
|
+
]);
|
|
775
824
|
const variants = toVariantList({
|
|
776
825
|
opEnrichments,
|
|
777
826
|
generatorId: generatorConfig.id,
|
|
@@ -791,11 +840,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
791
840
|
// this method"; a populated array names the variants the
|
|
792
841
|
// entry applies to.
|
|
793
842
|
if (include !== undefined &&
|
|
794
|
-
!matchesPathFilter({
|
|
843
|
+
!matchesPathFilter({
|
|
844
|
+
paths: include,
|
|
845
|
+
path: operation.path,
|
|
846
|
+
method: operation.method,
|
|
847
|
+
variant
|
|
848
|
+
})) {
|
|
795
849
|
this.captureCurrentResult('skipped', st);
|
|
796
850
|
return;
|
|
797
851
|
}
|
|
798
|
-
if (matchesPathFilter({
|
|
852
|
+
if (matchesPathFilter({
|
|
853
|
+
paths: skip,
|
|
854
|
+
path: operation.path,
|
|
855
|
+
method: operation.method,
|
|
856
|
+
variant
|
|
857
|
+
})) {
|
|
799
858
|
this.captureCurrentResult('skipped', st);
|
|
800
859
|
return;
|
|
801
860
|
}
|
|
@@ -810,7 +869,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
810
869
|
variant
|
|
811
870
|
});
|
|
812
871
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, operation, variant }));
|
|
813
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, operation, variant }));
|
|
814
872
|
this.captureCurrentResult('success', st);
|
|
815
873
|
}
|
|
816
874
|
catch (error) {
|
|
@@ -828,7 +886,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
828
886
|
// the webhook analogue of the operation routing. `toVariantList`
|
|
829
887
|
// handles absent / non-object / object enrichment blocks and
|
|
830
888
|
// enforces the `'main'`-must-be-present rule.
|
|
831
|
-
const webhookEnrichments = get(this.settings, [
|
|
889
|
+
const webhookEnrichments = get(this.settings, [
|
|
890
|
+
'enrichments',
|
|
891
|
+
generatorConfig.id,
|
|
892
|
+
webhook.name,
|
|
893
|
+
webhook.method
|
|
894
|
+
]);
|
|
832
895
|
const variants = toVariantList({
|
|
833
896
|
opEnrichments: webhookEnrichments,
|
|
834
897
|
generatorId: generatorConfig.id,
|
|
@@ -847,11 +910,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
847
910
|
// operations (the webhook name occupies the `path` slot), so
|
|
848
911
|
// `matchesPathFilter` is reused with `path: webhook.name`.
|
|
849
912
|
if (include !== undefined &&
|
|
850
|
-
!matchesPathFilter({
|
|
913
|
+
!matchesPathFilter({
|
|
914
|
+
paths: include,
|
|
915
|
+
path: webhook.name,
|
|
916
|
+
method: webhook.method,
|
|
917
|
+
variant
|
|
918
|
+
})) {
|
|
851
919
|
this.captureCurrentResult('skipped', st);
|
|
852
920
|
return;
|
|
853
921
|
}
|
|
854
|
-
if (matchesPathFilter({
|
|
922
|
+
if (matchesPathFilter({
|
|
923
|
+
paths: skip,
|
|
924
|
+
path: webhook.name,
|
|
925
|
+
method: webhook.method,
|
|
926
|
+
variant
|
|
927
|
+
})) {
|
|
855
928
|
this.captureCurrentResult('skipped', st);
|
|
856
929
|
return;
|
|
857
930
|
}
|
|
@@ -866,7 +939,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
866
939
|
variant
|
|
867
940
|
});
|
|
868
941
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, webhook, variant }));
|
|
869
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, webhook, variant }));
|
|
870
942
|
this.captureCurrentResult('success', st);
|
|
871
943
|
}
|
|
872
944
|
catch (error) {
|
|
@@ -882,7 +954,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
882
954
|
stackTrail.trace(operation.identifier, opTrail => {
|
|
883
955
|
// GraphQL enrichment routing key is
|
|
884
956
|
// `[generatorId][rootKind][fieldName][variant]`.
|
|
885
|
-
const opEnrichments = get(this.settings, [
|
|
957
|
+
const opEnrichments = get(this.settings, [
|
|
958
|
+
'enrichments',
|
|
959
|
+
generatorConfig.id,
|
|
960
|
+
operation.rootKind,
|
|
961
|
+
operation.fieldName
|
|
962
|
+
]);
|
|
886
963
|
const variants = toVariantList({
|
|
887
964
|
opEnrichments,
|
|
888
965
|
generatorId: generatorConfig.id,
|
|
@@ -907,7 +984,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
907
984
|
variant
|
|
908
985
|
});
|
|
909
986
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, operation, variant }));
|
|
910
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, operation, variant }));
|
|
911
987
|
this.captureCurrentResult('success', st);
|
|
912
988
|
}
|
|
913
989
|
catch (error) {
|
|
@@ -935,7 +1011,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
935
1011
|
// at config-load time once it lands)
|
|
936
1012
|
// - present, object → enumerate keys; 'main' must be among
|
|
937
1013
|
// them or we throw (loud beats silent zero-output)
|
|
938
|
-
const modelEnrichments = get(this.settings, [
|
|
1014
|
+
const modelEnrichments = get(this.settings, [
|
|
1015
|
+
'enrichments',
|
|
1016
|
+
generatorConfig.id,
|
|
1017
|
+
refName
|
|
1018
|
+
]);
|
|
939
1019
|
const variants = toVariantList({
|
|
940
1020
|
opEnrichments: modelEnrichments,
|
|
941
1021
|
generatorId: generatorConfig.id,
|
|
@@ -953,8 +1033,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
953
1033
|
// (deny). Match is on `(refName, variant)`. An empty variant
|
|
954
1034
|
// array on a refName means "every variant of this refName"; a
|
|
955
1035
|
// populated array names the variants the entry applies to.
|
|
956
|
-
if (include !== undefined &&
|
|
957
|
-
!matchesRefFilter({ refs: include, refName, variant })) {
|
|
1036
|
+
if (include !== undefined && !matchesRefFilter({ refs: include, refName, variant })) {
|
|
958
1037
|
this.captureCurrentResult('skipped', st);
|
|
959
1038
|
return;
|
|
960
1039
|
}
|
|
@@ -973,7 +1052,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
973
1052
|
variant
|
|
974
1053
|
});
|
|
975
1054
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, refName, variant }));
|
|
976
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, refName, variant }));
|
|
977
1055
|
this.captureCurrentResult('success', st);
|
|
978
1056
|
}
|
|
979
1057
|
catch (error) {
|
|
@@ -992,20 +1070,25 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
992
1070
|
throw new Error(`Cannot override preview module "${module.name}"`);
|
|
993
1071
|
}
|
|
994
1072
|
__classPrivateFieldGet(this, _GenerateContext_previews, "f")[module.name] = {
|
|
995
|
-
|
|
1073
|
+
// Preview export paths are hand-assembled in `toPreviewModule`
|
|
1074
|
+
// (generators call the static `toExportPath` directly), so they
|
|
1075
|
+
// bypass the ContentSettings construction path — run them through the same
|
|
1076
|
+
// suffix injection or previews point at files that don't exist.
|
|
1077
|
+
module: { ...module, exportPath: __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toContentSettingsExportPath).call(this, module.exportPath) },
|
|
996
1078
|
source
|
|
997
1079
|
};
|
|
998
|
-
},
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
if (__classPrivateFieldGet(this,
|
|
1003
|
-
|
|
1080
|
+
}, _GenerateContext_toContentSettingsExportPath = function _GenerateContext_toContentSettingsExportPath(exportPath) {
|
|
1081
|
+
const suffixed = applyGeneratedSuffix(exportPath, this.settings?.generatedSuffix ?? DEFAULT_GENERATED_SUFFIX);
|
|
1082
|
+
return __classPrivateFieldGet(this, _GenerateContext_instances, "a", _GenerateContext_ejectedBySuffixedPath_get).get(normalize(suffixed)) ?? suffixed;
|
|
1083
|
+
}, _GenerateContext_ejectedBySuffixedPath_get = function _GenerateContext_ejectedBySuffixedPath_get() {
|
|
1084
|
+
if (__classPrivateFieldGet(this, _GenerateContext_ejectedBySuffixedPathCache, "f") === undefined) {
|
|
1085
|
+
const suffix = this.settings?.generatedSuffix ?? DEFAULT_GENERATED_SUFFIX;
|
|
1086
|
+
__classPrivateFieldSet(this, _GenerateContext_ejectedBySuffixedPathCache, new Map((this.settings?.ejected ?? []).map(ejectedPath => {
|
|
1087
|
+
const normalized = normalize(ejectedPath);
|
|
1088
|
+
return [normalize(applyGeneratedSuffix(normalized, suffix)), normalized];
|
|
1089
|
+
})), "f");
|
|
1004
1090
|
}
|
|
1005
|
-
__classPrivateFieldGet(this,
|
|
1006
|
-
module,
|
|
1007
|
-
source
|
|
1008
|
-
};
|
|
1091
|
+
return __classPrivateFieldGet(this, _GenerateContext_ejectedBySuffixedPathCache, "f");
|
|
1009
1092
|
};
|
|
1010
1093
|
/**
|
|
1011
1094
|
* Match a `(path, method, variant)` tuple against an operation-shaped
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAIzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -31,7 +31,7 @@ import type { OasIssueType } from './generateTypes.js';
|
|
|
31
31
|
*
|
|
32
32
|
* - `NESTED_LIST_LOSSY` — `[[T]]` collapsed to `OasUnknown`.
|
|
33
33
|
* - `UNKNOWN_TYPE_KIND` — defensive fallback for an unrecognized
|
|
34
|
-
* GraphQL type
|
|
34
|
+
* GraphQL type type. Should never fire in practice.
|
|
35
35
|
* - `DROPPED_DIRECTIVE` — applied directive ignored during mapping
|
|
36
36
|
* (other than `@deprecated`, whose `reason` we capture).
|
|
37
37
|
* - `SKIPPED_FIELD_ARGUMENTS` — non-root object/interface field
|
|
@@ -5,7 +5,7 @@ import type { ResultType } from '../types/Results.js';
|
|
|
5
5
|
import type * as log from '../deps/jsr.io/@std/log/0.224.14/mod.js';
|
|
6
6
|
import type { Logger } from '../types/Logger.js';
|
|
7
7
|
import type { FileBase } from '../dsl/FileBase.js';
|
|
8
|
-
import type { Preview
|
|
8
|
+
import type { Preview } from '../types/Preview.js';
|
|
9
9
|
import type { StackTrail } from './StackTrail.js';
|
|
10
10
|
import { type CaptureChannel } from '../anchors/CaptureSink.js';
|
|
11
11
|
import type { GenerationMapEntry } from '../anchors/generationMap.js';
|
|
@@ -28,8 +28,6 @@ type ConstructorArgs = {
|
|
|
28
28
|
files: Map<string, FileBase>;
|
|
29
29
|
/** Preview data for generated content */
|
|
30
30
|
previews: Record<string, Preview>;
|
|
31
|
-
/** Mapping data for file relationships */
|
|
32
|
-
mappings: Record<string, Mapping>;
|
|
33
31
|
/** Base path for resolving file paths */
|
|
34
32
|
basePath: string | undefined;
|
|
35
33
|
/** Logger instance for debug information */
|
|
@@ -56,8 +54,6 @@ export declare class RenderContext {
|
|
|
56
54
|
files: Map<string, FileBase>;
|
|
57
55
|
/** Preview data for generated content */
|
|
58
56
|
previews: Record<string, Preview>;
|
|
59
|
-
/** Mapping data for file relationships */
|
|
60
|
-
mappings: Record<string, Mapping>;
|
|
61
57
|
/** Base path for resolving file paths */
|
|
62
58
|
basePath: string | undefined;
|
|
63
59
|
/** Logger instance for debug information */
|
|
@@ -74,7 +70,7 @@ export declare class RenderContext {
|
|
|
74
70
|
*
|
|
75
71
|
* @param args - Constructor arguments containing all required configuration
|
|
76
72
|
*/
|
|
77
|
-
constructor({ files, previews,
|
|
73
|
+
constructor({ files, previews, basePath, logger, captureCurrentResult, attribution, captureChannel }: ConstructorArgs);
|
|
78
74
|
/**
|
|
79
75
|
* Renders all files in the context to their final form.
|
|
80
76
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderContext.d.ts","sourceRoot":"","sources":["../../src/context/RenderContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,KAAK,KAAK,GAAG,MAAM,yCAAyC,CAAA;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RenderContext.d.ts","sourceRoot":"","sources":["../../src/context/RenderContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _RenderContext_captureChannel, _RenderContext_sink, _RenderContext_captures;
|
|
13
13
|
import invariant from 'tiny-invariant';
|
|
14
|
-
import { normalize } from '../deps/jsr.io/@std/path/1.1.
|
|
14
|
+
import { normalize } from '../deps/jsr.io/@std/path/1.1.6/normalize.js';
|
|
15
15
|
import { toResolvedArtifactPath } from '../helpers/toResolvedArtifactPath.js';
|
|
16
16
|
import { CodeFileBase } from '../dsl/CodeFileBase.js';
|
|
17
17
|
import { CaptureSink } from '../anchors/CaptureSink.js';
|
|
@@ -26,7 +26,7 @@ export class RenderContext {
|
|
|
26
26
|
*
|
|
27
27
|
* @param args - Constructor arguments containing all required configuration
|
|
28
28
|
*/
|
|
29
|
-
constructor({ files, previews,
|
|
29
|
+
constructor({ files, previews, basePath, logger, captureCurrentResult, attribution, captureChannel }) {
|
|
30
30
|
/** Map of generated files to render */
|
|
31
31
|
Object.defineProperty(this, "files", {
|
|
32
32
|
enumerable: true,
|
|
@@ -41,13 +41,6 @@ export class RenderContext {
|
|
|
41
41
|
writable: true,
|
|
42
42
|
value: void 0
|
|
43
43
|
});
|
|
44
|
-
/** Mapping data for file relationships */
|
|
45
|
-
Object.defineProperty(this, "mappings", {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true,
|
|
48
|
-
writable: true,
|
|
49
|
-
value: void 0
|
|
50
|
-
});
|
|
51
44
|
/** Base path for resolving file paths */
|
|
52
45
|
Object.defineProperty(this, "basePath", {
|
|
53
46
|
enumerable: true,
|
|
@@ -106,7 +99,6 @@ export class RenderContext {
|
|
|
106
99
|
);
|
|
107
100
|
this.files = files;
|
|
108
101
|
this.previews = previews;
|
|
109
|
-
this.mappings = mappings;
|
|
110
102
|
this.basePath = basePath;
|
|
111
103
|
this.logger = logger;
|
|
112
104
|
this.captureCurrentResult = captureCurrentResult;
|
|
@@ -152,8 +144,7 @@ export class RenderContext {
|
|
|
152
144
|
return {
|
|
153
145
|
artifacts: result.artifacts,
|
|
154
146
|
files: result.files,
|
|
155
|
-
previews: this.previews
|
|
156
|
-
mappings: this.mappings
|
|
147
|
+
previews: this.previews
|
|
157
148
|
};
|
|
158
149
|
}
|
|
159
150
|
// Capturing render: open the capture interval by publishing a sink on
|
|
@@ -199,7 +190,6 @@ export class RenderContext {
|
|
|
199
190
|
artifacts: result.artifacts,
|
|
200
191
|
files: result.files,
|
|
201
192
|
previews: this.previews,
|
|
202
|
-
mappings: this.mappings,
|
|
203
193
|
sidecars,
|
|
204
194
|
generationMap
|
|
205
195
|
};
|
|
@@ -340,7 +330,7 @@ export class RenderContext {
|
|
|
340
330
|
pick({ name, exportPath }) {
|
|
341
331
|
const file = this.getFile(exportPath);
|
|
342
332
|
invariant(file instanceof CodeFileBase, `File at "${exportPath}" is not a code file`);
|
|
343
|
-
return file.
|
|
333
|
+
return file.findDefinitions({ name })?.[0];
|
|
344
334
|
}
|
|
345
335
|
}
|
|
346
336
|
_RenderContext_captureChannel = new WeakMap(), _RenderContext_sink = new WeakMap(), _RenderContext_captures = new WeakMap();
|