@skmtc/core 0.18.1 → 0.26.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 +0 -1
- package/esm/anchors/buildSidecar.js +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 +135 -70
- 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.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.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/{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/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.js +2 -2
- package/esm/helpers/isImported.js +1 -1
- package/esm/helpers/toResolvedArtifactPath.js +1 -1
- package/esm/mod.d.ts +7 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +7 -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/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 +113 -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/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-0/components/toComponentsV3.js +3 -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/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-0/response/toResponseV3.js +4 -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-1/components/toComponentsV3.d.ts.map +1 -1
- package/esm/parse/v3-1/components/toComponentsV3.js +3 -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/response/toResponseV3.d.ts.map +1 -1
- package/esm/parse/v3-1/response/toResponseV3.js +4 -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/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 +1 -2
- package/esm/types/Manifest.d.ts.map +1 -1
- package/esm/types/Manifest.js +1 -2
- 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 +8 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +1 -0
- package/esm/types/SkmtcDocument.d.ts +1 -1
- package/esm/types/SupportedSubjects.d.ts +1 -1
- package/package.json +1 -1
- package/script/anchors/buildSidecar.js +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 +135 -70
- 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.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.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/{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/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.js +2 -2
- package/script/helpers/isImported.js +1 -1
- package/script/helpers/toResolvedArtifactPath.js +1 -1
- package/script/mod.d.ts +7 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +7 -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/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 +117 -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/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-0/components/toComponentsV3.js +3 -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/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-0/response/toResponseV3.js +4 -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-1/components/toComponentsV3.d.ts.map +1 -1
- package/script/parse/v3-1/components/toComponentsV3.js +3 -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/response/toResponseV3.d.ts.map +1 -1
- package/script/parse/v3-1/response/toResponseV3.js +4 -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/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 +1 -2
- package/script/types/Manifest.d.ts.map +1 -1
- package/script/types/Manifest.js +0 -1
- 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 +8 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +1 -0
- 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,8 @@ 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;
|
|
13
|
+
import { normalize } from '../deps/jsr.io/@std/path/1.1.6/normalize.js';
|
|
14
14
|
import { OasOperationDriver } from '../dsl/operation/oas/OasOperationDriver.js';
|
|
15
15
|
import { WebhookDriver } from '../dsl/webhook/WebhookDriver.js';
|
|
16
16
|
import { GqlOperationDriver } from '../dsl/operation/gql/GqlOperationDriver.js';
|
|
@@ -22,6 +22,7 @@ import get from 'lodash-es/get.js';
|
|
|
22
22
|
import { Inserted } from '../dsl/Inserted.js';
|
|
23
23
|
import { CodeFileBase } from '../dsl/CodeFileBase.js';
|
|
24
24
|
import { JsonFile } from '../dsl/JsonFile.js';
|
|
25
|
+
import { MarkdownFile } from '../dsl/MarkdownFile.js';
|
|
25
26
|
import invariant from 'tiny-invariant';
|
|
26
27
|
/**
|
|
27
28
|
* The generation context for the second phase of the SKMTC transformation pipeline.
|
|
@@ -76,7 +77,6 @@ export class GenerateContext {
|
|
|
76
77
|
_GenerateContext_instances.add(this);
|
|
77
78
|
_GenerateContext_files.set(this, void 0);
|
|
78
79
|
_GenerateContext_previews.set(this, void 0);
|
|
79
|
-
_GenerateContext_mappings.set(this, void 0);
|
|
80
80
|
/**
|
|
81
81
|
* Parsed source document, wrapped in the {@link SkmtcParsedDocument}
|
|
82
82
|
* discriminated union. Canonical representation; both protocol-neutral
|
|
@@ -133,7 +133,6 @@ export class GenerateContext {
|
|
|
133
133
|
this.logger = logger;
|
|
134
134
|
__classPrivateFieldSet(this, _GenerateContext_files, new Map(), "f");
|
|
135
135
|
__classPrivateFieldSet(this, _GenerateContext_previews, {}, "f");
|
|
136
|
-
__classPrivateFieldSet(this, _GenerateContext_mappings, {}, "f");
|
|
137
136
|
this.document = document;
|
|
138
137
|
this.settings = settings;
|
|
139
138
|
this.captureCurrentResult = captureCurrentResult;
|
|
@@ -224,8 +223,7 @@ export class GenerateContext {
|
|
|
224
223
|
});
|
|
225
224
|
return {
|
|
226
225
|
files: __classPrivateFieldGet(this, _GenerateContext_files, "f"),
|
|
227
|
-
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
228
|
-
mappings: __classPrivateFieldGet(this, _GenerateContext_mappings, "f")
|
|
226
|
+
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
229
227
|
};
|
|
230
228
|
}
|
|
231
229
|
/**
|
|
@@ -244,8 +242,11 @@ export class GenerateContext {
|
|
|
244
242
|
case 'oasOperation': {
|
|
245
243
|
const operations = this.document.type === 'oas'
|
|
246
244
|
? this.document.value.operations
|
|
247
|
-
.filter(operation =>
|
|
248
|
-
|
|
245
|
+
.filter(operation => generatorConfig.isSupported({
|
|
246
|
+
operation,
|
|
247
|
+
context: this,
|
|
248
|
+
variant: DEFAULT_VARIANT
|
|
249
|
+
}))
|
|
249
250
|
.map(operation => ({ path: operation.path, method: operation.method }))
|
|
250
251
|
: [];
|
|
251
252
|
out[generatorConfig.id] = { type: 'oasOperation', operations };
|
|
@@ -254,8 +255,11 @@ export class GenerateContext {
|
|
|
254
255
|
case 'webhook': {
|
|
255
256
|
const webhooks = this.document.type === 'oas'
|
|
256
257
|
? this.document.value.webhooks
|
|
257
|
-
.filter(webhook =>
|
|
258
|
-
|
|
258
|
+
.filter(webhook => generatorConfig.isSupported({
|
|
259
|
+
webhook,
|
|
260
|
+
context: this,
|
|
261
|
+
variant: DEFAULT_VARIANT
|
|
262
|
+
}))
|
|
259
263
|
.map(webhook => ({ name: webhook.name, method: webhook.method }))
|
|
260
264
|
: [];
|
|
261
265
|
out[generatorConfig.id] = { type: 'webhook', webhooks };
|
|
@@ -264,8 +268,11 @@ export class GenerateContext {
|
|
|
264
268
|
case 'gqlOperation': {
|
|
265
269
|
const operations = this.document.type === 'gql'
|
|
266
270
|
? this.document.value.operations
|
|
267
|
-
.filter(operation =>
|
|
268
|
-
|
|
271
|
+
.filter(operation => generatorConfig.isSupported({
|
|
272
|
+
operation,
|
|
273
|
+
context: this,
|
|
274
|
+
variant: DEFAULT_VARIANT
|
|
275
|
+
}))
|
|
269
276
|
.map(operation => ({
|
|
270
277
|
rootKind: operation.rootKind,
|
|
271
278
|
fieldName: operation.fieldName
|
|
@@ -275,8 +282,7 @@ export class GenerateContext {
|
|
|
275
282
|
break;
|
|
276
283
|
}
|
|
277
284
|
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 }));
|
|
285
|
+
const models = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this).filter(refName => generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT }));
|
|
280
286
|
out[generatorConfig.id] = { type: 'model', models };
|
|
281
287
|
break;
|
|
282
288
|
}
|
|
@@ -313,8 +319,7 @@ export class GenerateContext {
|
|
|
313
319
|
break;
|
|
314
320
|
const operations = {};
|
|
315
321
|
this.document.value.operations.forEach(operation => {
|
|
316
|
-
if (
|
|
317
|
-
!generatorConfig.isSupported({ operation, context: this, variant: DEFAULT_VARIANT })) {
|
|
322
|
+
if (!generatorConfig.isSupported({ operation, context: this, variant: DEFAULT_VARIANT })) {
|
|
318
323
|
return;
|
|
319
324
|
}
|
|
320
325
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ operation, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -334,8 +339,7 @@ export class GenerateContext {
|
|
|
334
339
|
break;
|
|
335
340
|
const webhooks = {};
|
|
336
341
|
this.document.value.webhooks.forEach(webhook => {
|
|
337
|
-
if (
|
|
338
|
-
!generatorConfig.isSupported({ webhook, context: this, variant: DEFAULT_VARIANT })) {
|
|
342
|
+
if (!generatorConfig.isSupported({ webhook, context: this, variant: DEFAULT_VARIANT })) {
|
|
339
343
|
return;
|
|
340
344
|
}
|
|
341
345
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ webhook, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -359,8 +363,7 @@ export class GenerateContext {
|
|
|
359
363
|
// `undefined` for schemas it doesn't seed.
|
|
360
364
|
const models = {};
|
|
361
365
|
for (const refName of __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this)) {
|
|
362
|
-
if (
|
|
363
|
-
!generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT })) {
|
|
366
|
+
if (!generatorConfig.isSupported({ refName, context: this, variant: DEFAULT_VARIANT })) {
|
|
364
367
|
continue;
|
|
365
368
|
}
|
|
366
369
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ refName, context: this, variant: DEFAULT_VARIANT }));
|
|
@@ -398,6 +401,19 @@ export class GenerateContext {
|
|
|
398
401
|
getFile(filePath) {
|
|
399
402
|
return __classPrivateFieldGet(this, _GenerateContext_files, "f").get(normalize(filePath));
|
|
400
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* Read-only view of every file generated so far, keyed by (normalized)
|
|
406
|
+
* export path. An **inspection / tooling** seam — NOT a coordination
|
|
407
|
+
* surface: generators must still register via `register` / `insert*`, and
|
|
408
|
+
* the storage stays `#`-private so nothing outside can mutate or re-bind it.
|
|
409
|
+
*
|
|
410
|
+
* Unlike {@link getFile} (which needs a path) this lets tooling *enumerate*
|
|
411
|
+
* the files map — e.g. a debugger visualiser snapshotting the in-progress
|
|
412
|
+
* state at a breakpoint. The `ReadonlyMap` type signals look-don't-touch.
|
|
413
|
+
*/
|
|
414
|
+
get inspectedFiles() {
|
|
415
|
+
return __classPrivateFieldGet(this, _GenerateContext_files, "f");
|
|
416
|
+
}
|
|
401
417
|
/**
|
|
402
418
|
* Store a language-constructed file. The engine never constructs a
|
|
403
419
|
* concrete (language) `File`; the language's `register` builds its own
|
|
@@ -427,6 +443,25 @@ export class GenerateContext {
|
|
|
427
443
|
invariant(currentFile instanceof JsonFile, `File at "${destinationPath}" is not a "JsonFile" type`);
|
|
428
444
|
currentFile.content = json;
|
|
429
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Registers Markdown content for output to a file.
|
|
448
|
+
*
|
|
449
|
+
* The Markdown counterpart of {@link registerJson} — create-or-replace, last
|
|
450
|
+
* write wins. The `markdown` is any {@link Stringable} (typically a composed
|
|
451
|
+
* snippet tree), rendered verbatim into a {@link MarkdownFile}.
|
|
452
|
+
*
|
|
453
|
+
* @experimental This method is experimental and may change in future versions
|
|
454
|
+
*/
|
|
455
|
+
registerMarkdown({ destinationPath, markdown }) {
|
|
456
|
+
const normalizedPath = normalize(destinationPath);
|
|
457
|
+
let currentFile = this.getFile(normalizedPath);
|
|
458
|
+
if (!currentFile) {
|
|
459
|
+
currentFile = new MarkdownFile({ path: normalizedPath, content: '' });
|
|
460
|
+
this.addFile(currentFile);
|
|
461
|
+
}
|
|
462
|
+
invariant(currentFile instanceof MarkdownFile, `File at "${destinationPath}" is not a "MarkdownFile" type`);
|
|
463
|
+
currentFile.content = markdown;
|
|
464
|
+
}
|
|
430
465
|
/**
|
|
431
466
|
* Insert supplied `imports` and `definitions` into file at `destinationPath`.
|
|
432
467
|
*
|
|
@@ -438,7 +473,7 @@ export class GenerateContext {
|
|
|
438
473
|
*
|
|
439
474
|
* @mutates this.files
|
|
440
475
|
*/
|
|
441
|
-
register({ imports = [], reExports = [], definitions, destinationPath }) {
|
|
476
|
+
register({ imports = [], reExports = [], definitions, custom, destinationPath }) {
|
|
442
477
|
const normalizedPath = normalize(destinationPath);
|
|
443
478
|
const currentFile = this.getFile(normalizedPath);
|
|
444
479
|
// `register` never creates files — it speaks pure data and the engine
|
|
@@ -448,22 +483,27 @@ export class GenerateContext {
|
|
|
448
483
|
// caller.
|
|
449
484
|
invariant(currentFile, `Cannot register into '${normalizedPath}' — the file does not exist. ` +
|
|
450
485
|
`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);
|
|
486
|
+
// `custom` is language-neutral — it lives on `FileBase`, so any file
|
|
487
|
+
// (code or not, e.g. a JSON/Markdown file) can receive it. Last
|
|
488
|
+
// non-`undefined` write wins.
|
|
489
|
+
if (custom !== undefined) {
|
|
490
|
+
currentFile.custom = custom;
|
|
464
491
|
}
|
|
465
|
-
|
|
466
|
-
|
|
492
|
+
// Definitions, imports, and re-exports — and their duplication/merge
|
|
493
|
+
// policy — are code-file concerns owned by the language subclass.
|
|
494
|
+
// `JsonFile` (no definitions/imports) is skipped by the guard.
|
|
495
|
+
if (currentFile instanceof CodeFileBase) {
|
|
496
|
+
definitions?.forEach(definition => {
|
|
497
|
+
if (definition) {
|
|
498
|
+
currentFile.addDefinition(definition);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
if (imports.length > 0) {
|
|
502
|
+
currentFile.addImports(imports);
|
|
503
|
+
}
|
|
504
|
+
if (reExports.length > 0) {
|
|
505
|
+
currentFile.addReExports(reExports);
|
|
506
|
+
}
|
|
467
507
|
}
|
|
468
508
|
}
|
|
469
509
|
/**
|
|
@@ -601,7 +641,7 @@ export class GenerateContext {
|
|
|
601
641
|
* given operation.
|
|
602
642
|
*/
|
|
603
643
|
toOperationContentSettings(args) {
|
|
604
|
-
const
|
|
644
|
+
const variant = args.variant ?? DEFAULT_VARIANT;
|
|
605
645
|
if (isGqlToOperationSettingsArgs(args)) {
|
|
606
646
|
const enrichments = args.projection.toEnrichments({
|
|
607
647
|
operation: args.operation,
|
|
@@ -655,7 +695,7 @@ export class GenerateContext {
|
|
|
655
695
|
* protocol discrimination.
|
|
656
696
|
*/
|
|
657
697
|
toWebhookContentSettings(args) {
|
|
658
|
-
const
|
|
698
|
+
const variant = args.variant ?? DEFAULT_VARIANT;
|
|
659
699
|
const enrichments = args.projection.toEnrichments({
|
|
660
700
|
webhook: args.webhook,
|
|
661
701
|
context: this,
|
|
@@ -682,12 +722,12 @@ export class GenerateContext {
|
|
|
682
722
|
/**
|
|
683
723
|
* Build content settings for a model projection by calling its statics
|
|
684
724
|
* `toIdentifierName` (pure, for the name) + `toIdentifierType`
|
|
685
|
-
* (context-aware, for
|
|
725
|
+
* (context-aware, for type/typeName/exported), `toExportPath`, and
|
|
686
726
|
* `toEnrichments` against the given `refName` and `variant`. The full
|
|
687
727
|
* identifier is assembled through the projection's language
|
|
688
728
|
* (`lang.toIdentifier`).
|
|
689
729
|
*/
|
|
690
|
-
toModelContentSettings({ refName, projection, variant }) {
|
|
730
|
+
toModelContentSettings({ refName, projection, variant = DEFAULT_VARIANT }) {
|
|
691
731
|
const enrichments = projection.toEnrichments({ refName, context: this, variant });
|
|
692
732
|
return new ContentSettings({
|
|
693
733
|
identifier: projection.lang.toIdentifier({
|
|
@@ -728,12 +768,14 @@ export class GenerateContext {
|
|
|
728
768
|
* @returns Matching definition if found or `undefined` otherwise
|
|
729
769
|
*/
|
|
730
770
|
findDefinition({ name, exportPath }) {
|
|
731
|
-
// Pure lookup — no file is created on a miss.
|
|
732
|
-
//
|
|
733
|
-
|
|
771
|
+
// Pure lookup — no file is created on a miss. Definitions live on the
|
|
772
|
+
// code-file subclass, so narrow; a non-code file (`JsonFile`) has none.
|
|
773
|
+
// The cache wants the single primary for the name → first match.
|
|
774
|
+
const file = this.getFile(exportPath);
|
|
775
|
+
return file instanceof CodeFileBase ? file.findDefinitions({ name })?.[0] : undefined;
|
|
734
776
|
}
|
|
735
777
|
}
|
|
736
|
-
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(),
|
|
778
|
+
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(), _GenerateContext_captureChannel = new WeakMap(), _GenerateContext_instances = new WeakSet(), _GenerateContext_schemaRefNames = function _GenerateContext_schemaRefNames() {
|
|
737
779
|
switch (this.document.type) {
|
|
738
780
|
case 'oas':
|
|
739
781
|
return [...(this.document.value.components?.toSchemasRefNames() ?? [])];
|
|
@@ -771,7 +813,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
771
813
|
// at config-load time once it lands)
|
|
772
814
|
// - present, object → enumerate keys; 'main' must be among
|
|
773
815
|
// them or we throw (loud beats silent zero-output)
|
|
774
|
-
const opEnrichments = get(this.settings, [
|
|
816
|
+
const opEnrichments = get(this.settings, [
|
|
817
|
+
'enrichments',
|
|
818
|
+
generatorConfig.id,
|
|
819
|
+
operation.path,
|
|
820
|
+
operation.method
|
|
821
|
+
]);
|
|
775
822
|
const variants = toVariantList({
|
|
776
823
|
opEnrichments,
|
|
777
824
|
generatorId: generatorConfig.id,
|
|
@@ -791,11 +838,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
791
838
|
// this method"; a populated array names the variants the
|
|
792
839
|
// entry applies to.
|
|
793
840
|
if (include !== undefined &&
|
|
794
|
-
!matchesPathFilter({
|
|
841
|
+
!matchesPathFilter({
|
|
842
|
+
paths: include,
|
|
843
|
+
path: operation.path,
|
|
844
|
+
method: operation.method,
|
|
845
|
+
variant
|
|
846
|
+
})) {
|
|
795
847
|
this.captureCurrentResult('skipped', st);
|
|
796
848
|
return;
|
|
797
849
|
}
|
|
798
|
-
if (matchesPathFilter({
|
|
850
|
+
if (matchesPathFilter({
|
|
851
|
+
paths: skip,
|
|
852
|
+
path: operation.path,
|
|
853
|
+
method: operation.method,
|
|
854
|
+
variant
|
|
855
|
+
})) {
|
|
799
856
|
this.captureCurrentResult('skipped', st);
|
|
800
857
|
return;
|
|
801
858
|
}
|
|
@@ -810,7 +867,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
810
867
|
variant
|
|
811
868
|
});
|
|
812
869
|
__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
870
|
this.captureCurrentResult('success', st);
|
|
815
871
|
}
|
|
816
872
|
catch (error) {
|
|
@@ -828,7 +884,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
828
884
|
// the webhook analogue of the operation routing. `toVariantList`
|
|
829
885
|
// handles absent / non-object / object enrichment blocks and
|
|
830
886
|
// enforces the `'main'`-must-be-present rule.
|
|
831
|
-
const webhookEnrichments = get(this.settings, [
|
|
887
|
+
const webhookEnrichments = get(this.settings, [
|
|
888
|
+
'enrichments',
|
|
889
|
+
generatorConfig.id,
|
|
890
|
+
webhook.name,
|
|
891
|
+
webhook.method
|
|
892
|
+
]);
|
|
832
893
|
const variants = toVariantList({
|
|
833
894
|
opEnrichments: webhookEnrichments,
|
|
834
895
|
generatorId: generatorConfig.id,
|
|
@@ -847,11 +908,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
847
908
|
// operations (the webhook name occupies the `path` slot), so
|
|
848
909
|
// `matchesPathFilter` is reused with `path: webhook.name`.
|
|
849
910
|
if (include !== undefined &&
|
|
850
|
-
!matchesPathFilter({
|
|
911
|
+
!matchesPathFilter({
|
|
912
|
+
paths: include,
|
|
913
|
+
path: webhook.name,
|
|
914
|
+
method: webhook.method,
|
|
915
|
+
variant
|
|
916
|
+
})) {
|
|
851
917
|
this.captureCurrentResult('skipped', st);
|
|
852
918
|
return;
|
|
853
919
|
}
|
|
854
|
-
if (matchesPathFilter({
|
|
920
|
+
if (matchesPathFilter({
|
|
921
|
+
paths: skip,
|
|
922
|
+
path: webhook.name,
|
|
923
|
+
method: webhook.method,
|
|
924
|
+
variant
|
|
925
|
+
})) {
|
|
855
926
|
this.captureCurrentResult('skipped', st);
|
|
856
927
|
return;
|
|
857
928
|
}
|
|
@@ -866,7 +937,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
866
937
|
variant
|
|
867
938
|
});
|
|
868
939
|
__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
940
|
this.captureCurrentResult('success', st);
|
|
871
941
|
}
|
|
872
942
|
catch (error) {
|
|
@@ -882,7 +952,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
882
952
|
stackTrail.trace(operation.identifier, opTrail => {
|
|
883
953
|
// GraphQL enrichment routing key is
|
|
884
954
|
// `[generatorId][rootKind][fieldName][variant]`.
|
|
885
|
-
const opEnrichments = get(this.settings, [
|
|
955
|
+
const opEnrichments = get(this.settings, [
|
|
956
|
+
'enrichments',
|
|
957
|
+
generatorConfig.id,
|
|
958
|
+
operation.rootKind,
|
|
959
|
+
operation.fieldName
|
|
960
|
+
]);
|
|
886
961
|
const variants = toVariantList({
|
|
887
962
|
opEnrichments,
|
|
888
963
|
generatorId: generatorConfig.id,
|
|
@@ -907,7 +982,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
907
982
|
variant
|
|
908
983
|
});
|
|
909
984
|
__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
985
|
this.captureCurrentResult('success', st);
|
|
912
986
|
}
|
|
913
987
|
catch (error) {
|
|
@@ -920,7 +994,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
920
994
|
});
|
|
921
995
|
}, _GenerateContext_runModelGenerator = function _GenerateContext_runModelGenerator(document, generatorConfig, include, skip, stackTrail) {
|
|
922
996
|
const refNames = document.type === 'oas'
|
|
923
|
-
?
|
|
997
|
+
? document.value.components?.toSchemasRefNames() ?? []
|
|
924
998
|
: document.value.registry.toSchemasRefNames();
|
|
925
999
|
refNames.forEach(refName => {
|
|
926
1000
|
stackTrail.trace(refName, refTrail => {
|
|
@@ -935,7 +1009,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
935
1009
|
// at config-load time once it lands)
|
|
936
1010
|
// - present, object → enumerate keys; 'main' must be among
|
|
937
1011
|
// them or we throw (loud beats silent zero-output)
|
|
938
|
-
const modelEnrichments = get(this.settings, [
|
|
1012
|
+
const modelEnrichments = get(this.settings, [
|
|
1013
|
+
'enrichments',
|
|
1014
|
+
generatorConfig.id,
|
|
1015
|
+
refName
|
|
1016
|
+
]);
|
|
939
1017
|
const variants = toVariantList({
|
|
940
1018
|
opEnrichments: modelEnrichments,
|
|
941
1019
|
generatorId: generatorConfig.id,
|
|
@@ -953,8 +1031,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
953
1031
|
// (deny). Match is on `(refName, variant)`. An empty variant
|
|
954
1032
|
// array on a refName means "every variant of this refName"; a
|
|
955
1033
|
// populated array names the variants the entry applies to.
|
|
956
|
-
if (include !== undefined &&
|
|
957
|
-
!matchesRefFilter({ refs: include, refName, variant })) {
|
|
1034
|
+
if (include !== undefined && !matchesRefFilter({ refs: include, refName, variant })) {
|
|
958
1035
|
this.captureCurrentResult('skipped', st);
|
|
959
1036
|
return;
|
|
960
1037
|
}
|
|
@@ -973,7 +1050,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
973
1050
|
variant
|
|
974
1051
|
});
|
|
975
1052
|
__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
1053
|
this.captureCurrentResult('success', st);
|
|
978
1054
|
}
|
|
979
1055
|
catch (error) {
|
|
@@ -995,17 +1071,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
995
1071
|
module,
|
|
996
1072
|
source
|
|
997
1073
|
};
|
|
998
|
-
}, _GenerateContext_addMapping = function _GenerateContext_addMapping(source, module) {
|
|
999
|
-
if (!module) {
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
if (__classPrivateFieldGet(this, _GenerateContext_mappings, "f")[module.name]) {
|
|
1003
|
-
throw new Error(`Cannot override mapping module "${module.name}"`);
|
|
1004
|
-
}
|
|
1005
|
-
__classPrivateFieldGet(this, _GenerateContext_mappings, "f")[module.name] = {
|
|
1006
|
-
module,
|
|
1007
|
-
source
|
|
1008
|
-
};
|
|
1009
1074
|
};
|
|
1010
1075
|
/**
|
|
1011
1076
|
* Match a `(path, method, variant)` tuple against an operation-shaped
|
|
@@ -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":"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,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAgBpD;;;;GAIG;AACH,KAAK,iBAAiB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAA;CACrC,CAAA;AAED;;GAEG;AACH,KAAK,eAAe,GAAG;IACrB,uCAAuC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC5B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,4CAA4C;IAC5C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,wCAAwC;IACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;IAC1E;;;;;OAKG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC,CAAA;AAsCD,qBAAa,aAAa;;IACxB,uCAAuC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC5B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,oBAAoB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;IAC1E,2EAA2E;IAC3E,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAsBzC;;;;;;;OAOG;gBACS,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,cAAc,EACf,EAAE,eAAe;IAUlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,iBAAiB;IAiEjD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,iBAAiB;IAuDlD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ;IAUnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,cAAc,GAAG,SAAS;CAOjE"}
|
|
@@ -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();
|