@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
|
@@ -13,10 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
|
-
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews,
|
|
16
|
+
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_captureChannel, _GenerateContext_schemaRefNames, _GenerateContext_subjectDefaults, _GenerateContext_runOasOperationGenerator, _GenerateContext_runWebhookGenerator, _GenerateContext_runGqlOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_addPreview;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.toModelSource = exports.toGqlOperationSource = exports.toWebhookSource = exports.toOasOperationSource = exports.GenerateContext = void 0;
|
|
19
|
-
const normalize_js_1 = require("../deps/jsr.io/@std/path/1.1.
|
|
19
|
+
const normalize_js_1 = require("../deps/jsr.io/@std/path/1.1.6/normalize.js");
|
|
20
20
|
const OasOperationDriver_js_1 = require("../dsl/operation/oas/OasOperationDriver.js");
|
|
21
21
|
const WebhookDriver_js_1 = require("../dsl/webhook/WebhookDriver.js");
|
|
22
22
|
const GqlOperationDriver_js_1 = require("../dsl/operation/gql/GqlOperationDriver.js");
|
|
@@ -28,6 +28,7 @@ const get_js_1 = __importDefault(require("lodash-es/get.js"));
|
|
|
28
28
|
const Inserted_js_1 = require("../dsl/Inserted.js");
|
|
29
29
|
const CodeFileBase_js_1 = require("../dsl/CodeFileBase.js");
|
|
30
30
|
const JsonFile_js_1 = require("../dsl/JsonFile.js");
|
|
31
|
+
const MarkdownFile_js_1 = require("../dsl/MarkdownFile.js");
|
|
31
32
|
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
32
33
|
/**
|
|
33
34
|
* The generation context for the second phase of the SKMTC transformation pipeline.
|
|
@@ -82,7 +83,6 @@ class GenerateContext {
|
|
|
82
83
|
_GenerateContext_instances.add(this);
|
|
83
84
|
_GenerateContext_files.set(this, void 0);
|
|
84
85
|
_GenerateContext_previews.set(this, void 0);
|
|
85
|
-
_GenerateContext_mappings.set(this, void 0);
|
|
86
86
|
/**
|
|
87
87
|
* Parsed source document, wrapped in the {@link SkmtcParsedDocument}
|
|
88
88
|
* discriminated union. Canonical representation; both protocol-neutral
|
|
@@ -139,7 +139,6 @@ class GenerateContext {
|
|
|
139
139
|
this.logger = logger;
|
|
140
140
|
__classPrivateFieldSet(this, _GenerateContext_files, new Map(), "f");
|
|
141
141
|
__classPrivateFieldSet(this, _GenerateContext_previews, {}, "f");
|
|
142
|
-
__classPrivateFieldSet(this, _GenerateContext_mappings, {}, "f");
|
|
143
142
|
this.document = document;
|
|
144
143
|
this.settings = settings;
|
|
145
144
|
this.captureCurrentResult = captureCurrentResult;
|
|
@@ -230,8 +229,7 @@ class GenerateContext {
|
|
|
230
229
|
});
|
|
231
230
|
return {
|
|
232
231
|
files: __classPrivateFieldGet(this, _GenerateContext_files, "f"),
|
|
233
|
-
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
234
|
-
mappings: __classPrivateFieldGet(this, _GenerateContext_mappings, "f")
|
|
232
|
+
previews: __classPrivateFieldGet(this, _GenerateContext_previews, "f")
|
|
235
233
|
};
|
|
236
234
|
}
|
|
237
235
|
/**
|
|
@@ -250,8 +248,11 @@ class GenerateContext {
|
|
|
250
248
|
case 'oasOperation': {
|
|
251
249
|
const operations = this.document.type === 'oas'
|
|
252
250
|
? this.document.value.operations
|
|
253
|
-
.filter(operation =>
|
|
254
|
-
|
|
251
|
+
.filter(operation => generatorConfig.isSupported({
|
|
252
|
+
operation,
|
|
253
|
+
context: this,
|
|
254
|
+
variant: Variant_js_1.DEFAULT_VARIANT
|
|
255
|
+
}))
|
|
255
256
|
.map(operation => ({ path: operation.path, method: operation.method }))
|
|
256
257
|
: [];
|
|
257
258
|
out[generatorConfig.id] = { type: 'oasOperation', operations };
|
|
@@ -260,8 +261,11 @@ class GenerateContext {
|
|
|
260
261
|
case 'webhook': {
|
|
261
262
|
const webhooks = this.document.type === 'oas'
|
|
262
263
|
? this.document.value.webhooks
|
|
263
|
-
.filter(webhook =>
|
|
264
|
-
|
|
264
|
+
.filter(webhook => generatorConfig.isSupported({
|
|
265
|
+
webhook,
|
|
266
|
+
context: this,
|
|
267
|
+
variant: Variant_js_1.DEFAULT_VARIANT
|
|
268
|
+
}))
|
|
265
269
|
.map(webhook => ({ name: webhook.name, method: webhook.method }))
|
|
266
270
|
: [];
|
|
267
271
|
out[generatorConfig.id] = { type: 'webhook', webhooks };
|
|
@@ -270,8 +274,11 @@ class GenerateContext {
|
|
|
270
274
|
case 'gqlOperation': {
|
|
271
275
|
const operations = this.document.type === 'gql'
|
|
272
276
|
? this.document.value.operations
|
|
273
|
-
.filter(operation =>
|
|
274
|
-
|
|
277
|
+
.filter(operation => generatorConfig.isSupported({
|
|
278
|
+
operation,
|
|
279
|
+
context: this,
|
|
280
|
+
variant: Variant_js_1.DEFAULT_VARIANT
|
|
281
|
+
}))
|
|
275
282
|
.map(operation => ({
|
|
276
283
|
rootKind: operation.rootKind,
|
|
277
284
|
fieldName: operation.fieldName
|
|
@@ -281,8 +288,7 @@ class GenerateContext {
|
|
|
281
288
|
break;
|
|
282
289
|
}
|
|
283
290
|
case 'model': {
|
|
284
|
-
const models = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this).filter(refName =>
|
|
285
|
-
generatorConfig.isSupported({ refName, context: this, variant: Variant_js_1.DEFAULT_VARIANT }));
|
|
291
|
+
const models = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this).filter(refName => generatorConfig.isSupported({ refName, context: this, variant: Variant_js_1.DEFAULT_VARIANT }));
|
|
286
292
|
out[generatorConfig.id] = { type: 'model', models };
|
|
287
293
|
break;
|
|
288
294
|
}
|
|
@@ -319,8 +325,7 @@ class GenerateContext {
|
|
|
319
325
|
break;
|
|
320
326
|
const operations = {};
|
|
321
327
|
this.document.value.operations.forEach(operation => {
|
|
322
|
-
if (
|
|
323
|
-
!generatorConfig.isSupported({ operation, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
328
|
+
if (!generatorConfig.isSupported({ operation, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
324
329
|
return;
|
|
325
330
|
}
|
|
326
331
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ operation, context: this, variant: Variant_js_1.DEFAULT_VARIANT }));
|
|
@@ -340,8 +345,7 @@ class GenerateContext {
|
|
|
340
345
|
break;
|
|
341
346
|
const webhooks = {};
|
|
342
347
|
this.document.value.webhooks.forEach(webhook => {
|
|
343
|
-
if (
|
|
344
|
-
!generatorConfig.isSupported({ webhook, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
348
|
+
if (!generatorConfig.isSupported({ webhook, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
345
349
|
return;
|
|
346
350
|
}
|
|
347
351
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ webhook, context: this, variant: Variant_js_1.DEFAULT_VARIANT }));
|
|
@@ -365,8 +369,7 @@ class GenerateContext {
|
|
|
365
369
|
// `undefined` for schemas it doesn't seed.
|
|
366
370
|
const models = {};
|
|
367
371
|
for (const refName of __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_schemaRefNames).call(this)) {
|
|
368
|
-
if (
|
|
369
|
-
!generatorConfig.isSupported({ refName, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
372
|
+
if (!generatorConfig.isSupported({ refName, context: this, variant: Variant_js_1.DEFAULT_VARIANT })) {
|
|
370
373
|
continue;
|
|
371
374
|
}
|
|
372
375
|
const leaf = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_subjectDefaults).call(this, () => toDefaults({ refName, context: this, variant: Variant_js_1.DEFAULT_VARIANT }));
|
|
@@ -404,6 +407,19 @@ class GenerateContext {
|
|
|
404
407
|
getFile(filePath) {
|
|
405
408
|
return __classPrivateFieldGet(this, _GenerateContext_files, "f").get((0, normalize_js_1.normalize)(filePath));
|
|
406
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* Read-only view of every file generated so far, keyed by (normalized)
|
|
412
|
+
* export path. An **inspection / tooling** seam — NOT a coordination
|
|
413
|
+
* surface: generators must still register via `register` / `insert*`, and
|
|
414
|
+
* the storage stays `#`-private so nothing outside can mutate or re-bind it.
|
|
415
|
+
*
|
|
416
|
+
* Unlike {@link getFile} (which needs a path) this lets tooling *enumerate*
|
|
417
|
+
* the files map — e.g. a debugger visualiser snapshotting the in-progress
|
|
418
|
+
* state at a breakpoint. The `ReadonlyMap` type signals look-don't-touch.
|
|
419
|
+
*/
|
|
420
|
+
get inspectedFiles() {
|
|
421
|
+
return __classPrivateFieldGet(this, _GenerateContext_files, "f");
|
|
422
|
+
}
|
|
407
423
|
/**
|
|
408
424
|
* Store a language-constructed file. The engine never constructs a
|
|
409
425
|
* concrete (language) `File`; the language's `register` builds its own
|
|
@@ -433,6 +449,25 @@ class GenerateContext {
|
|
|
433
449
|
(0, tiny_invariant_1.default)(currentFile instanceof JsonFile_js_1.JsonFile, `File at "${destinationPath}" is not a "JsonFile" type`);
|
|
434
450
|
currentFile.content = json;
|
|
435
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* Registers Markdown content for output to a file.
|
|
454
|
+
*
|
|
455
|
+
* The Markdown counterpart of {@link registerJson} — create-or-replace, last
|
|
456
|
+
* write wins. The `markdown` is any {@link Stringable} (typically a composed
|
|
457
|
+
* snippet tree), rendered verbatim into a {@link MarkdownFile}.
|
|
458
|
+
*
|
|
459
|
+
* @experimental This method is experimental and may change in future versions
|
|
460
|
+
*/
|
|
461
|
+
registerMarkdown({ destinationPath, markdown }) {
|
|
462
|
+
const normalizedPath = (0, normalize_js_1.normalize)(destinationPath);
|
|
463
|
+
let currentFile = this.getFile(normalizedPath);
|
|
464
|
+
if (!currentFile) {
|
|
465
|
+
currentFile = new MarkdownFile_js_1.MarkdownFile({ path: normalizedPath, content: '' });
|
|
466
|
+
this.addFile(currentFile);
|
|
467
|
+
}
|
|
468
|
+
(0, tiny_invariant_1.default)(currentFile instanceof MarkdownFile_js_1.MarkdownFile, `File at "${destinationPath}" is not a "MarkdownFile" type`);
|
|
469
|
+
currentFile.content = markdown;
|
|
470
|
+
}
|
|
436
471
|
/**
|
|
437
472
|
* Insert supplied `imports` and `definitions` into file at `destinationPath`.
|
|
438
473
|
*
|
|
@@ -444,7 +479,7 @@ class GenerateContext {
|
|
|
444
479
|
*
|
|
445
480
|
* @mutates this.files
|
|
446
481
|
*/
|
|
447
|
-
register({ imports = [], reExports = [], definitions, destinationPath }) {
|
|
482
|
+
register({ imports = [], reExports = [], definitions, custom, destinationPath }) {
|
|
448
483
|
const normalizedPath = (0, normalize_js_1.normalize)(destinationPath);
|
|
449
484
|
const currentFile = this.getFile(normalizedPath);
|
|
450
485
|
// `register` never creates files — it speaks pure data and the engine
|
|
@@ -454,22 +489,27 @@ class GenerateContext {
|
|
|
454
489
|
// caller.
|
|
455
490
|
(0, tiny_invariant_1.default)(currentFile, `Cannot register into '${normalizedPath}' — the file does not exist. ` +
|
|
456
491
|
`Pre-create it through your lang (its register function does this).`);
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
});
|
|
464
|
-
// Imports and re-exports are standardised `ImportBase` /
|
|
465
|
-
// `ReExportBase` objects; the neutral merges (keyed by `mergeKey`)
|
|
466
|
-
// live on `CodeFileBase`. `JsonFile` has neither, so the guard skips
|
|
467
|
-
// it.
|
|
468
|
-
if (imports.length > 0 && currentFile instanceof CodeFileBase_js_1.CodeFileBase) {
|
|
469
|
-
currentFile.addImports(imports);
|
|
492
|
+
// `custom` is language-neutral — it lives on `FileBase`, so any file
|
|
493
|
+
// (code or not, e.g. a JSON/Markdown file) can receive it. Last
|
|
494
|
+
// non-`undefined` write wins.
|
|
495
|
+
if (custom !== undefined) {
|
|
496
|
+
currentFile.custom = custom;
|
|
470
497
|
}
|
|
471
|
-
|
|
472
|
-
|
|
498
|
+
// Definitions, imports, and re-exports — and their duplication/merge
|
|
499
|
+
// policy — are code-file concerns owned by the language subclass.
|
|
500
|
+
// `JsonFile` (no definitions/imports) is skipped by the guard.
|
|
501
|
+
if (currentFile instanceof CodeFileBase_js_1.CodeFileBase) {
|
|
502
|
+
definitions?.forEach(definition => {
|
|
503
|
+
if (definition) {
|
|
504
|
+
currentFile.addDefinition(definition);
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
if (imports.length > 0) {
|
|
508
|
+
currentFile.addImports(imports);
|
|
509
|
+
}
|
|
510
|
+
if (reExports.length > 0) {
|
|
511
|
+
currentFile.addReExports(reExports);
|
|
512
|
+
}
|
|
473
513
|
}
|
|
474
514
|
}
|
|
475
515
|
/**
|
|
@@ -607,7 +647,7 @@ class GenerateContext {
|
|
|
607
647
|
* given operation.
|
|
608
648
|
*/
|
|
609
649
|
toOperationContentSettings(args) {
|
|
610
|
-
const
|
|
650
|
+
const variant = args.variant ?? Variant_js_1.DEFAULT_VARIANT;
|
|
611
651
|
if (isGqlToOperationSettingsArgs(args)) {
|
|
612
652
|
const enrichments = args.projection.toEnrichments({
|
|
613
653
|
operation: args.operation,
|
|
@@ -661,7 +701,7 @@ class GenerateContext {
|
|
|
661
701
|
* protocol discrimination.
|
|
662
702
|
*/
|
|
663
703
|
toWebhookContentSettings(args) {
|
|
664
|
-
const
|
|
704
|
+
const variant = args.variant ?? Variant_js_1.DEFAULT_VARIANT;
|
|
665
705
|
const enrichments = args.projection.toEnrichments({
|
|
666
706
|
webhook: args.webhook,
|
|
667
707
|
context: this,
|
|
@@ -688,12 +728,12 @@ class GenerateContext {
|
|
|
688
728
|
/**
|
|
689
729
|
* Build content settings for a model projection by calling its statics
|
|
690
730
|
* `toIdentifierName` (pure, for the name) + `toIdentifierType`
|
|
691
|
-
* (context-aware, for
|
|
731
|
+
* (context-aware, for type/typeName/exported), `toExportPath`, and
|
|
692
732
|
* `toEnrichments` against the given `refName` and `variant`. The full
|
|
693
733
|
* identifier is assembled through the projection's language
|
|
694
734
|
* (`lang.toIdentifier`).
|
|
695
735
|
*/
|
|
696
|
-
toModelContentSettings({ refName, projection, variant }) {
|
|
736
|
+
toModelContentSettings({ refName, projection, variant = Variant_js_1.DEFAULT_VARIANT }) {
|
|
697
737
|
const enrichments = projection.toEnrichments({ refName, context: this, variant });
|
|
698
738
|
return new ContentSettings_js_1.ContentSettings({
|
|
699
739
|
identifier: projection.lang.toIdentifier({
|
|
@@ -734,13 +774,15 @@ class GenerateContext {
|
|
|
734
774
|
* @returns Matching definition if found or `undefined` otherwise
|
|
735
775
|
*/
|
|
736
776
|
findDefinition({ name, exportPath }) {
|
|
737
|
-
// Pure lookup — no file is created on a miss.
|
|
738
|
-
//
|
|
739
|
-
|
|
777
|
+
// Pure lookup — no file is created on a miss. Definitions live on the
|
|
778
|
+
// code-file subclass, so narrow; a non-code file (`JsonFile`) has none.
|
|
779
|
+
// The cache wants the single primary for the name → first match.
|
|
780
|
+
const file = this.getFile(exportPath);
|
|
781
|
+
return file instanceof CodeFileBase_js_1.CodeFileBase ? file.findDefinitions({ name })?.[0] : undefined;
|
|
740
782
|
}
|
|
741
783
|
}
|
|
742
784
|
exports.GenerateContext = GenerateContext;
|
|
743
|
-
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(),
|
|
785
|
+
_GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(), _GenerateContext_captureChannel = new WeakMap(), _GenerateContext_instances = new WeakSet(), _GenerateContext_schemaRefNames = function _GenerateContext_schemaRefNames() {
|
|
744
786
|
switch (this.document.type) {
|
|
745
787
|
case 'oas':
|
|
746
788
|
return [...(this.document.value.components?.toSchemasRefNames() ?? [])];
|
|
@@ -778,7 +820,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
778
820
|
// at config-load time once it lands)
|
|
779
821
|
// - present, object → enumerate keys; 'main' must be among
|
|
780
822
|
// them or we throw (loud beats silent zero-output)
|
|
781
|
-
const opEnrichments = (0, get_js_1.default)(this.settings, [
|
|
823
|
+
const opEnrichments = (0, get_js_1.default)(this.settings, [
|
|
824
|
+
'enrichments',
|
|
825
|
+
generatorConfig.id,
|
|
826
|
+
operation.path,
|
|
827
|
+
operation.method
|
|
828
|
+
]);
|
|
782
829
|
const variants = (0, toVariantList_js_1.toVariantList)({
|
|
783
830
|
opEnrichments,
|
|
784
831
|
generatorId: generatorConfig.id,
|
|
@@ -798,11 +845,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
798
845
|
// this method"; a populated array names the variants the
|
|
799
846
|
// entry applies to.
|
|
800
847
|
if (include !== undefined &&
|
|
801
|
-
!matchesPathFilter({
|
|
848
|
+
!matchesPathFilter({
|
|
849
|
+
paths: include,
|
|
850
|
+
path: operation.path,
|
|
851
|
+
method: operation.method,
|
|
852
|
+
variant
|
|
853
|
+
})) {
|
|
802
854
|
this.captureCurrentResult('skipped', st);
|
|
803
855
|
return;
|
|
804
856
|
}
|
|
805
|
-
if (matchesPathFilter({
|
|
857
|
+
if (matchesPathFilter({
|
|
858
|
+
paths: skip,
|
|
859
|
+
path: operation.path,
|
|
860
|
+
method: operation.method,
|
|
861
|
+
variant
|
|
862
|
+
})) {
|
|
806
863
|
this.captureCurrentResult('skipped', st);
|
|
807
864
|
return;
|
|
808
865
|
}
|
|
@@ -817,7 +874,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
817
874
|
variant
|
|
818
875
|
});
|
|
819
876
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, operation, variant }));
|
|
820
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, operation, variant }));
|
|
821
877
|
this.captureCurrentResult('success', st);
|
|
822
878
|
}
|
|
823
879
|
catch (error) {
|
|
@@ -835,7 +891,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
835
891
|
// the webhook analogue of the operation routing. `toVariantList`
|
|
836
892
|
// handles absent / non-object / object enrichment blocks and
|
|
837
893
|
// enforces the `'main'`-must-be-present rule.
|
|
838
|
-
const webhookEnrichments = (0, get_js_1.default)(this.settings, [
|
|
894
|
+
const webhookEnrichments = (0, get_js_1.default)(this.settings, [
|
|
895
|
+
'enrichments',
|
|
896
|
+
generatorConfig.id,
|
|
897
|
+
webhook.name,
|
|
898
|
+
webhook.method
|
|
899
|
+
]);
|
|
839
900
|
const variants = (0, toVariantList_js_1.toVariantList)({
|
|
840
901
|
opEnrichments: webhookEnrichments,
|
|
841
902
|
generatorId: generatorConfig.id,
|
|
@@ -854,11 +915,21 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
854
915
|
// operations (the webhook name occupies the `path` slot), so
|
|
855
916
|
// `matchesPathFilter` is reused with `path: webhook.name`.
|
|
856
917
|
if (include !== undefined &&
|
|
857
|
-
!matchesPathFilter({
|
|
918
|
+
!matchesPathFilter({
|
|
919
|
+
paths: include,
|
|
920
|
+
path: webhook.name,
|
|
921
|
+
method: webhook.method,
|
|
922
|
+
variant
|
|
923
|
+
})) {
|
|
858
924
|
this.captureCurrentResult('skipped', st);
|
|
859
925
|
return;
|
|
860
926
|
}
|
|
861
|
-
if (matchesPathFilter({
|
|
927
|
+
if (matchesPathFilter({
|
|
928
|
+
paths: skip,
|
|
929
|
+
path: webhook.name,
|
|
930
|
+
method: webhook.method,
|
|
931
|
+
variant
|
|
932
|
+
})) {
|
|
862
933
|
this.captureCurrentResult('skipped', st);
|
|
863
934
|
return;
|
|
864
935
|
}
|
|
@@ -873,7 +944,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
873
944
|
variant
|
|
874
945
|
});
|
|
875
946
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, webhook, variant }));
|
|
876
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, webhook, variant }));
|
|
877
947
|
this.captureCurrentResult('success', st);
|
|
878
948
|
}
|
|
879
949
|
catch (error) {
|
|
@@ -889,7 +959,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
889
959
|
stackTrail.trace(operation.identifier, opTrail => {
|
|
890
960
|
// GraphQL enrichment routing key is
|
|
891
961
|
// `[generatorId][rootKind][fieldName][variant]`.
|
|
892
|
-
const opEnrichments = (0, get_js_1.default)(this.settings, [
|
|
962
|
+
const opEnrichments = (0, get_js_1.default)(this.settings, [
|
|
963
|
+
'enrichments',
|
|
964
|
+
generatorConfig.id,
|
|
965
|
+
operation.rootKind,
|
|
966
|
+
operation.fieldName
|
|
967
|
+
]);
|
|
893
968
|
const variants = (0, toVariantList_js_1.toVariantList)({
|
|
894
969
|
opEnrichments,
|
|
895
970
|
generatorId: generatorConfig.id,
|
|
@@ -914,7 +989,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
914
989
|
variant
|
|
915
990
|
});
|
|
916
991
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, operation, variant }));
|
|
917
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, operation, variant }));
|
|
918
992
|
this.captureCurrentResult('success', st);
|
|
919
993
|
}
|
|
920
994
|
catch (error) {
|
|
@@ -927,7 +1001,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
927
1001
|
});
|
|
928
1002
|
}, _GenerateContext_runModelGenerator = function _GenerateContext_runModelGenerator(document, generatorConfig, include, skip, stackTrail) {
|
|
929
1003
|
const refNames = document.type === 'oas'
|
|
930
|
-
?
|
|
1004
|
+
? document.value.components?.toSchemasRefNames() ?? []
|
|
931
1005
|
: document.value.registry.toSchemasRefNames();
|
|
932
1006
|
refNames.forEach(refName => {
|
|
933
1007
|
stackTrail.trace(refName, refTrail => {
|
|
@@ -942,7 +1016,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
942
1016
|
// at config-load time once it lands)
|
|
943
1017
|
// - present, object → enumerate keys; 'main' must be among
|
|
944
1018
|
// them or we throw (loud beats silent zero-output)
|
|
945
|
-
const modelEnrichments = (0, get_js_1.default)(this.settings, [
|
|
1019
|
+
const modelEnrichments = (0, get_js_1.default)(this.settings, [
|
|
1020
|
+
'enrichments',
|
|
1021
|
+
generatorConfig.id,
|
|
1022
|
+
refName
|
|
1023
|
+
]);
|
|
946
1024
|
const variants = (0, toVariantList_js_1.toVariantList)({
|
|
947
1025
|
opEnrichments: modelEnrichments,
|
|
948
1026
|
generatorId: generatorConfig.id,
|
|
@@ -960,8 +1038,7 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
960
1038
|
// (deny). Match is on `(refName, variant)`. An empty variant
|
|
961
1039
|
// array on a refName means "every variant of this refName"; a
|
|
962
1040
|
// populated array names the variants the entry applies to.
|
|
963
|
-
if (include !== undefined &&
|
|
964
|
-
!matchesRefFilter({ refs: include, refName, variant })) {
|
|
1041
|
+
if (include !== undefined && !matchesRefFilter({ refs: include, refName, variant })) {
|
|
965
1042
|
this.captureCurrentResult('skipped', st);
|
|
966
1043
|
return;
|
|
967
1044
|
}
|
|
@@ -980,7 +1057,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
980
1057
|
variant
|
|
981
1058
|
});
|
|
982
1059
|
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addPreview).call(this, source, generatorConfig.toPreviewModule?.({ context: this, refName, variant }));
|
|
983
|
-
__classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_addMapping).call(this, source, generatorConfig.toMappingModule?.({ context: this, refName, variant }));
|
|
984
1060
|
this.captureCurrentResult('success', st);
|
|
985
1061
|
}
|
|
986
1062
|
catch (error) {
|
|
@@ -1002,17 +1078,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
1002
1078
|
module,
|
|
1003
1079
|
source
|
|
1004
1080
|
};
|
|
1005
|
-
}, _GenerateContext_addMapping = function _GenerateContext_addMapping(source, module) {
|
|
1006
|
-
if (!module) {
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
|
-
if (__classPrivateFieldGet(this, _GenerateContext_mappings, "f")[module.name]) {
|
|
1010
|
-
throw new Error(`Cannot override mapping module "${module.name}"`);
|
|
1011
|
-
}
|
|
1012
|
-
__classPrivateFieldGet(this, _GenerateContext_mappings, "f")[module.name] = {
|
|
1013
|
-
module,
|
|
1014
|
-
source
|
|
1015
|
-
};
|
|
1016
1081
|
};
|
|
1017
1082
|
/**
|
|
1018
1083
|
* 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"}
|
|
@@ -17,7 +17,7 @@ var _RenderContext_captureChannel, _RenderContext_sink, _RenderContext_captures;
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.RenderContext = void 0;
|
|
19
19
|
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
20
|
-
const normalize_js_1 = require("../deps/jsr.io/@std/path/1.1.
|
|
20
|
+
const normalize_js_1 = require("../deps/jsr.io/@std/path/1.1.6/normalize.js");
|
|
21
21
|
const toResolvedArtifactPath_js_1 = require("../helpers/toResolvedArtifactPath.js");
|
|
22
22
|
const CodeFileBase_js_1 = require("../dsl/CodeFileBase.js");
|
|
23
23
|
const CaptureSink_js_1 = require("../anchors/CaptureSink.js");
|
|
@@ -32,7 +32,7 @@ class RenderContext {
|
|
|
32
32
|
*
|
|
33
33
|
* @param args - Constructor arguments containing all required configuration
|
|
34
34
|
*/
|
|
35
|
-
constructor({ files, previews,
|
|
35
|
+
constructor({ files, previews, basePath, logger, captureCurrentResult, attribution, captureChannel }) {
|
|
36
36
|
/** Map of generated files to render */
|
|
37
37
|
Object.defineProperty(this, "files", {
|
|
38
38
|
enumerable: true,
|
|
@@ -47,13 +47,6 @@ class RenderContext {
|
|
|
47
47
|
writable: true,
|
|
48
48
|
value: void 0
|
|
49
49
|
});
|
|
50
|
-
/** Mapping data for file relationships */
|
|
51
|
-
Object.defineProperty(this, "mappings", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
value: void 0
|
|
56
|
-
});
|
|
57
50
|
/** Base path for resolving file paths */
|
|
58
51
|
Object.defineProperty(this, "basePath", {
|
|
59
52
|
enumerable: true,
|
|
@@ -112,7 +105,6 @@ class RenderContext {
|
|
|
112
105
|
);
|
|
113
106
|
this.files = files;
|
|
114
107
|
this.previews = previews;
|
|
115
|
-
this.mappings = mappings;
|
|
116
108
|
this.basePath = basePath;
|
|
117
109
|
this.logger = logger;
|
|
118
110
|
this.captureCurrentResult = captureCurrentResult;
|
|
@@ -158,8 +150,7 @@ class RenderContext {
|
|
|
158
150
|
return {
|
|
159
151
|
artifacts: result.artifacts,
|
|
160
152
|
files: result.files,
|
|
161
|
-
previews: this.previews
|
|
162
|
-
mappings: this.mappings
|
|
153
|
+
previews: this.previews
|
|
163
154
|
};
|
|
164
155
|
}
|
|
165
156
|
// Capturing render: open the capture interval by publishing a sink on
|
|
@@ -205,7 +196,6 @@ class RenderContext {
|
|
|
205
196
|
artifacts: result.artifacts,
|
|
206
197
|
files: result.files,
|
|
207
198
|
previews: this.previews,
|
|
208
|
-
mappings: this.mappings,
|
|
209
199
|
sidecars,
|
|
210
200
|
generationMap
|
|
211
201
|
};
|
|
@@ -346,7 +336,7 @@ class RenderContext {
|
|
|
346
336
|
pick({ name, exportPath }) {
|
|
347
337
|
const file = this.getFile(exportPath);
|
|
348
338
|
(0, tiny_invariant_1.default)(file instanceof CodeFileBase_js_1.CodeFileBase, `File at "${exportPath}" is not a code file`);
|
|
349
|
-
return file.
|
|
339
|
+
return file.findDefinitions({ name })?.[0];
|
|
350
340
|
}
|
|
351
341
|
}
|
|
352
342
|
exports.RenderContext = RenderContext;
|