@skmtc/core 0.47.4 → 0.49.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/esm/context/CoreContext.d.ts +1 -1
- package/esm/context/CoreContext.js +6 -2
- package/esm/context/GenerateContext.d.ts +15 -4
- package/esm/context/GenerateContext.js +40 -34
- package/esm/context/ParseContext.d.ts +4 -4
- package/esm/context/ParseContext.js +6 -6
- package/esm/context/RenderContext.d.ts +3 -2
- package/esm/context/RenderContext.js +6 -5
- package/esm/context/generateTypes.d.ts +10 -6
- package/esm/context/tryParseAt.d.ts +1 -1
- package/esm/context/tryParseAt.js +1 -1
- package/esm/dsl/ContentSettings.d.ts +17 -12
- package/esm/dsl/ContentSettings.js +13 -9
- package/esm/dsl/Inserted.d.ts +4 -3
- package/esm/dsl/Inserted.js +2 -2
- package/esm/dsl/PendingDefinition.d.ts +3 -2
- package/esm/dsl/driverFiles.d.ts +46 -0
- package/esm/dsl/driverFiles.js +31 -0
- package/esm/dsl/model/ModelDriver.d.ts +5 -7
- package/esm/dsl/model/ModelDriver.js +12 -29
- package/esm/dsl/operation/gql/GqlOperationDriver.d.ts +1 -1
- package/esm/dsl/operation/gql/GqlOperationDriver.js +15 -12
- package/esm/dsl/operation/oas/OasOperationDriver.d.ts +1 -1
- package/esm/dsl/operation/oas/OasOperationDriver.js +11 -14
- package/esm/dsl/webhook/WebhookDriver.d.ts +1 -1
- package/esm/dsl/webhook/WebhookDriver.js +15 -12
- package/esm/enrichments/EnrichmentAudit.d.ts +1 -1
- package/esm/enrichments/EnrichmentWarning.d.ts +1 -1
- package/esm/enrichments/findUnknownKeys.d.ts +1 -1
- package/esm/enrichments/findUnknownKeys.js +1 -1
- package/esm/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
- package/esm/enrichments/parseEnrichmentUmbrella.js +1 -1
- package/esm/enrichments/parseEnrichmentValue.d.ts +2 -2
- package/esm/enrichments/parseEnrichmentValue.js +2 -2
- package/esm/enrichments/readEnrichments.d.ts +4 -4
- package/esm/enrichments/readEnrichments.js +4 -4
- package/esm/enrichments/validateConfig.d.ts +1 -1
- package/esm/helpers/applyGeneratedSuffix.d.ts +1 -1
- package/esm/helpers/applyGeneratedSuffix.js +1 -1
- package/esm/helpers/getByWorkspacePath.d.ts +9 -0
- package/esm/helpers/getByWorkspacePath.js +10 -0
- package/esm/helpers/normalizeWorkspacePath.d.ts +26 -3
- package/esm/helpers/normalizeWorkspacePath.js +17 -2
- package/esm/oas/array/Array.d.ts +2 -2
- package/esm/oas/array/Array.js +2 -2
- package/esm/oas/boolean/Boolean.d.ts +2 -2
- package/esm/oas/boolean/Boolean.js +2 -2
- package/esm/oas/integer/Integer.d.ts +2 -2
- package/esm/oas/integer/Integer.js +2 -2
- package/esm/oas/intersection/Intersection.d.ts +3 -3
- package/esm/oas/intersection/Intersection.js +3 -3
- package/esm/oas/number/Number.d.ts +2 -2
- package/esm/oas/number/Number.js +2 -2
- package/esm/oas/object/Object.d.ts +2 -2
- package/esm/oas/object/Object.js +2 -2
- package/esm/oas/operation/Operation.d.ts +1 -1
- package/esm/oas/operation/Operation.js +1 -1
- package/esm/oas/operation/toEffectiveParameters.d.ts +2 -2
- package/esm/oas/operation/toEffectiveParameters.js +2 -2
- package/esm/oas/ref/DanglingRefError.d.ts +1 -1
- package/esm/oas/ref/DanglingRefError.js +1 -1
- package/esm/oas/ref/Ref.d.ts +2 -2
- package/esm/oas/ref/Ref.js +2 -2
- package/esm/oas/string/String.d.ts +2 -2
- package/esm/oas/string/String.js +2 -2
- package/esm/oas/union/Union.d.ts +3 -3
- package/esm/oas/union/Union.js +3 -3
- package/esm/oas/unknown/Unknown.d.ts +2 -2
- package/esm/oas/unknown/Unknown.js +2 -2
- package/esm/parse/allOfSystem.d.ts +4 -4
- package/esm/parse/allOfSystem.js +2 -2
- package/esm/parse/anyOfSystem.d.ts +5 -5
- package/esm/parse/anyOfSystem.js +4 -4
- package/esm/parse/keptRefs.d.ts +2 -2
- package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-0/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-0/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-0/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-0/ref/toRefV31.js +1 -1
- package/esm/parse/v3-0/schema/toSchemasV3.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-1/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-1/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-1/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-1/ref/toRefV31.js +1 -1
- package/esm/parse/v3-1/schema/toSchemasV3.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
- package/esm/parse/v3-2/_merge-all-of/merge-union.js +3 -3
- package/esm/parse/v3-2/_merge-all-of/merge.js +2 -2
- package/esm/parse/v3-2/_merge-all-of/types.d.ts +4 -4
- package/esm/parse/v3-2/ref/toRefV31.js +1 -1
- package/esm/parse/v3-2/schema/toSchemasV3.js +3 -3
- package/esm/run/toEnrichmentDefaults.d.ts +1 -1
- package/esm/run/toEnrichmentDefaults.js +1 -1
- package/esm/types/EnrichmentDefaults.d.ts +1 -1
- package/esm/types/EnrichmentDefaults.js +1 -1
- package/esm/types/Enrichments.d.ts +1 -1
- package/esm/types/Manifest.d.ts +1 -1
- package/esm/types/ModuleSelect.d.ts +1 -1
- package/esm/types/Settings.d.ts +29 -11
- package/esm/types/Settings.js +13 -6
- package/esm/types/Variant.d.ts +3 -3
- package/esm/types/Variant.js +3 -3
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +1 -1
- package/script/context/CoreContext.js +6 -2
- package/script/context/GenerateContext.d.ts +15 -4
- package/script/context/GenerateContext.js +38 -32
- package/script/context/ParseContext.d.ts +4 -4
- package/script/context/ParseContext.js +6 -6
- package/script/context/RenderContext.d.ts +3 -2
- package/script/context/RenderContext.js +6 -5
- package/script/context/generateTypes.d.ts +10 -6
- package/script/context/tryParseAt.d.ts +1 -1
- package/script/context/tryParseAt.js +1 -1
- package/script/dsl/ContentSettings.d.ts +17 -12
- package/script/dsl/ContentSettings.js +13 -9
- package/script/dsl/Inserted.d.ts +4 -3
- package/script/dsl/Inserted.js +2 -2
- package/script/dsl/PendingDefinition.d.ts +3 -2
- package/script/dsl/driverFiles.d.ts +46 -0
- package/script/dsl/driverFiles.js +38 -0
- package/script/dsl/model/ModelDriver.d.ts +5 -7
- package/script/dsl/model/ModelDriver.js +12 -29
- package/script/dsl/operation/gql/GqlOperationDriver.d.ts +1 -1
- package/script/dsl/operation/gql/GqlOperationDriver.js +15 -12
- package/script/dsl/operation/oas/OasOperationDriver.d.ts +1 -1
- package/script/dsl/operation/oas/OasOperationDriver.js +11 -14
- package/script/dsl/webhook/WebhookDriver.d.ts +1 -1
- package/script/dsl/webhook/WebhookDriver.js +15 -12
- package/script/enrichments/EnrichmentAudit.d.ts +1 -1
- package/script/enrichments/EnrichmentWarning.d.ts +1 -1
- package/script/enrichments/findUnknownKeys.d.ts +1 -1
- package/script/enrichments/findUnknownKeys.js +1 -1
- package/script/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
- package/script/enrichments/parseEnrichmentUmbrella.js +1 -1
- package/script/enrichments/parseEnrichmentValue.d.ts +2 -2
- package/script/enrichments/parseEnrichmentValue.js +2 -2
- package/script/enrichments/readEnrichments.d.ts +4 -4
- package/script/enrichments/readEnrichments.js +4 -4
- package/script/enrichments/validateConfig.d.ts +1 -1
- package/script/helpers/applyGeneratedSuffix.d.ts +1 -1
- package/script/helpers/applyGeneratedSuffix.js +1 -1
- package/script/helpers/getByWorkspacePath.d.ts +9 -0
- package/script/helpers/getByWorkspacePath.js +14 -0
- package/script/helpers/normalizeWorkspacePath.d.ts +26 -3
- package/script/helpers/normalizeWorkspacePath.js +19 -3
- package/script/oas/array/Array.d.ts +2 -2
- package/script/oas/array/Array.js +2 -2
- package/script/oas/boolean/Boolean.d.ts +2 -2
- package/script/oas/boolean/Boolean.js +2 -2
- package/script/oas/integer/Integer.d.ts +2 -2
- package/script/oas/integer/Integer.js +2 -2
- package/script/oas/intersection/Intersection.d.ts +3 -3
- package/script/oas/intersection/Intersection.js +3 -3
- package/script/oas/number/Number.d.ts +2 -2
- package/script/oas/number/Number.js +2 -2
- package/script/oas/object/Object.d.ts +2 -2
- package/script/oas/object/Object.js +2 -2
- package/script/oas/operation/Operation.d.ts +1 -1
- package/script/oas/operation/Operation.js +1 -1
- package/script/oas/operation/toEffectiveParameters.d.ts +2 -2
- package/script/oas/operation/toEffectiveParameters.js +2 -2
- package/script/oas/ref/DanglingRefError.d.ts +1 -1
- package/script/oas/ref/DanglingRefError.js +1 -1
- package/script/oas/ref/Ref.d.ts +2 -2
- package/script/oas/ref/Ref.js +2 -2
- package/script/oas/string/String.d.ts +2 -2
- package/script/oas/string/String.js +2 -2
- package/script/oas/union/Union.d.ts +3 -3
- package/script/oas/union/Union.js +3 -3
- package/script/oas/unknown/Unknown.d.ts +2 -2
- package/script/oas/unknown/Unknown.js +2 -2
- package/script/parse/allOfSystem.d.ts +4 -4
- package/script/parse/allOfSystem.js +2 -2
- package/script/parse/anyOfSystem.d.ts +5 -5
- package/script/parse/anyOfSystem.js +4 -4
- package/script/parse/keptRefs.d.ts +2 -2
- package/script/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-0/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-0/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-0/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-0/ref/toRefV31.js +1 -1
- package/script/parse/v3-0/schema/toSchemasV3.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-1/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-1/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-1/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-1/ref/toRefV31.js +1 -1
- package/script/parse/v3-1/schema/toSchemasV3.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
- package/script/parse/v3-2/_merge-all-of/merge-union.js +3 -3
- package/script/parse/v3-2/_merge-all-of/merge.js +2 -2
- package/script/parse/v3-2/_merge-all-of/types.d.ts +4 -4
- package/script/parse/v3-2/ref/toRefV31.js +1 -1
- package/script/parse/v3-2/schema/toSchemasV3.js +3 -3
- package/script/run/toEnrichmentDefaults.d.ts +1 -1
- package/script/run/toEnrichmentDefaults.js +1 -1
- package/script/types/EnrichmentDefaults.d.ts +1 -1
- package/script/types/EnrichmentDefaults.js +1 -1
- package/script/types/Enrichments.d.ts +1 -1
- package/script/types/Manifest.d.ts +1 -1
- package/script/types/ModuleSelect.d.ts +1 -1
- package/script/types/Settings.d.ts +29 -11
- package/script/types/Settings.js +14 -7
- package/script/types/Variant.d.ts +3 -3
- package/script/types/Variant.js +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { ParseContextType } from '../context/parseTypes.js';
|
|
2
2
|
import type { KeptRefs } from './keptRefs.js';
|
|
3
3
|
import type { StackTrail } from '../context/StackTrail.js';
|
|
4
|
-
/** What the `allOf` merge reads of `
|
|
4
|
+
/** What the `allOf` merge reads of `skmtc.config.json#settings.parse`, and what it reports back. */
|
|
5
5
|
type AllOfSystem = {
|
|
6
6
|
allOf: 'strict' | 'latestWins';
|
|
7
7
|
not: 'strict' | 'unknown';
|
|
8
8
|
anyOf: 'union' | 'unknown';
|
|
9
9
|
/** The keywords a later member replaced under `latestWins`. */
|
|
10
10
|
replaced: Set<string>;
|
|
11
|
-
/** The keywords the merge read as any value: `anyOf` under `
|
|
11
|
+
/** The keywords the merge read as any value: `anyOf` under `parse.anyOf: unknown`. */
|
|
12
12
|
unknown: Set<string>;
|
|
13
|
-
/** The refs that stay refs (`
|
|
13
|
+
/** The refs that stay refs (`parse.intersections`). */
|
|
14
14
|
keptRefs: KeptRefs | undefined;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
@@ -28,7 +28,7 @@ type LogAllOfContradictionsArgs = {
|
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* One warning for a schema whose `allOf` members contradicted, naming the
|
|
31
|
-
* keywords the later member kept (`
|
|
31
|
+
* keywords the later member kept (`parse.allOf: latestWins`). Nothing when
|
|
32
32
|
* no keyword was replaced.
|
|
33
33
|
*/
|
|
34
34
|
export declare const logAllOfContradictions: ({ system, stackTrail, parent, context }: LogAllOfContradictionsArgs) => void;
|
package/esm/parse/allOfSystem.js
CHANGED
|
@@ -14,7 +14,7 @@ export const toAllOfSystem = (context) => ({
|
|
|
14
14
|
});
|
|
15
15
|
/**
|
|
16
16
|
* One warning for a schema whose `allOf` members contradicted, naming the
|
|
17
|
-
* keywords the later member kept (`
|
|
17
|
+
* keywords the later member kept (`parse.allOf: latestWins`). Nothing when
|
|
18
18
|
* no keyword was replaced.
|
|
19
19
|
*/
|
|
20
20
|
export const logAllOfContradictions = ({ system, stackTrail, parent, context }) => {
|
|
@@ -23,7 +23,7 @@ export const logAllOfContradictions = ({ system, stackTrail, parent, context })
|
|
|
23
23
|
}
|
|
24
24
|
context.logIssueNoKey({
|
|
25
25
|
level: 'warning',
|
|
26
|
-
message: `The allOf members contradict on ${[...system.replaced].join(', ')}; the later member's values are kept (
|
|
26
|
+
message: `The allOf members contradict on ${[...system.replaced].join(', ')}; the later member's values are kept (parse.allOf is latestWins).`,
|
|
27
27
|
parent,
|
|
28
28
|
stackTrail,
|
|
29
29
|
type: 'ALLOF_CONTRADICTION'
|
|
@@ -9,12 +9,12 @@ type GetRefFn = (ref: OpenAPIV3.ReferenceObject) => OpenAPIV3.SchemaObject;
|
|
|
9
9
|
type IsUnknownAnyOfArgs = {
|
|
10
10
|
/** The `anyOf` members, as the document writes them. */
|
|
11
11
|
members: readonly (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
|
|
12
|
-
/** `
|
|
12
|
+
/** `skmtc.config.json` `parse.anyOf`. A test's mock context may have none. */
|
|
13
13
|
setting: 'union' | 'unknown' | undefined;
|
|
14
14
|
getRef: GetRefFn;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Whether `
|
|
17
|
+
* Whether `parse.anyOf: unknown` reads an `anyOf` as any value, as
|
|
18
18
|
* Cloudflare's `cf` reads it: when it has two or more members, not counting a
|
|
19
19
|
* `null` one, and one of them is not a single value.
|
|
20
20
|
*
|
|
@@ -27,13 +27,13 @@ export declare const isUnknownAnyOf: ({ members, setting, getRef }: IsUnknownAny
|
|
|
27
27
|
/** Arguments for {@link withoutUnknownAnyOf}. */
|
|
28
28
|
type WithoutUnknownAnyOfArgs = {
|
|
29
29
|
schema: OpenAPIV3.SchemaObject;
|
|
30
|
-
/** `
|
|
30
|
+
/** `skmtc.config.json` `parse.anyOf`. */
|
|
31
31
|
setting: 'union' | 'unknown' | undefined;
|
|
32
32
|
getRef: GetRefFn;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* `schema` with its other keywords and without an `anyOf` that
|
|
36
|
-
* `
|
|
36
|
+
* `parse.anyOf: unknown` reads as any value ({@link isUnknownAnyOf}), so the
|
|
37
37
|
* properties next to the `anyOf` stay. A `null` member makes it nullable. Any
|
|
38
38
|
* other schema is returned as it is.
|
|
39
39
|
*/
|
|
@@ -63,6 +63,6 @@ type LogMergedUnknownAnyOfArgs = LogUnknownAnyOfArgs & {
|
|
|
63
63
|
};
|
|
64
64
|
/** One warning for a schema whose merge read an `anyOf` as any value. Nothing when it read none. */
|
|
65
65
|
export declare const logMergedUnknownAnyOf: ({ system, stackTrail, parent, context }: LogMergedUnknownAnyOfArgs) => void;
|
|
66
|
-
/** One warning for a schema whose `anyOf` was read as any value (`
|
|
66
|
+
/** One warning for a schema whose `anyOf` was read as any value (`parse.anyOf: unknown`). */
|
|
67
67
|
export declare const logUnknownAnyOf: ({ stackTrail, parent, context }: LogUnknownAnyOfArgs) => void;
|
|
68
68
|
export {};
|
package/esm/parse/anyOfSystem.js
CHANGED
|
@@ -36,7 +36,7 @@ const isScalarMember = (member) => {
|
|
|
36
36
|
*/
|
|
37
37
|
const toMemberSchema = (member, getRef) => ('$ref' in member ? getRef(member) : member);
|
|
38
38
|
/**
|
|
39
|
-
* Whether `
|
|
39
|
+
* Whether `parse.anyOf: unknown` reads an `anyOf` as any value, as
|
|
40
40
|
* Cloudflare's `cf` reads it: when it has two or more members, not counting a
|
|
41
41
|
* `null` one, and one of them is not a single value.
|
|
42
42
|
*
|
|
@@ -54,7 +54,7 @@ export const isUnknownAnyOf = ({ members, setting, getRef }) => {
|
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* `schema` with its other keywords and without an `anyOf` that
|
|
57
|
-
* `
|
|
57
|
+
* `parse.anyOf: unknown` reads as any value ({@link isUnknownAnyOf}), so the
|
|
58
58
|
* properties next to the `anyOf` stay. A `null` member makes it nullable. Any
|
|
59
59
|
* other schema is returned as it is.
|
|
60
60
|
*/
|
|
@@ -93,11 +93,11 @@ export const logMergedUnknownAnyOf = ({ system, stackTrail, parent, context }) =
|
|
|
93
93
|
logUnknownAnyOf({ stackTrail, parent, context });
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
/** One warning for a schema whose `anyOf` was read as any value (`
|
|
96
|
+
/** One warning for a schema whose `anyOf` was read as any value (`parse.anyOf: unknown`). */
|
|
97
97
|
export const logUnknownAnyOf = ({ stackTrail, parent, context }) => {
|
|
98
98
|
context.logIssueNoKey({
|
|
99
99
|
level: 'warning',
|
|
100
|
-
message: 'The anyOf is read as any value (
|
|
100
|
+
message: 'The anyOf is read as any value (parse.anyOf is unknown): the schema keeps its other keywords, without the anyOf members.',
|
|
101
101
|
parent,
|
|
102
102
|
stackTrail,
|
|
103
103
|
type: 'ANYOF_AS_UNKNOWN'
|
package/esm/parse/keptRefs.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { OpenAPIV3 } from 'openapi-types';
|
|
|
2
2
|
type SchemaObject = OpenAPIV3.SchemaObject;
|
|
3
3
|
type ReferenceObject = OpenAPIV3.ReferenceObject;
|
|
4
4
|
type SchemaOrReference = SchemaObject | ReferenceObject;
|
|
5
|
-
/** The refs that `
|
|
5
|
+
/** The refs that `parse.intersections` keeps out of a merge. */
|
|
6
6
|
export type KeptRefs = {
|
|
7
7
|
/** Whether a merge keeps this `$ref` object as a ref. */
|
|
8
8
|
has: (ref: ReferenceObject) => boolean;
|
|
@@ -15,7 +15,7 @@ export type KeptRefs = {
|
|
|
15
15
|
};
|
|
16
16
|
type ToKeptRefsArgs = {
|
|
17
17
|
documentObject: OpenAPIV3.Document;
|
|
18
|
-
/** `
|
|
18
|
+
/** `skmtc.config.json` `parse.intersections`. */
|
|
19
19
|
setting: 'merge' | 'cycles' | 'all' | undefined;
|
|
20
20
|
};
|
|
21
21
|
/** The refs a merge of this document keeps, or `undefined` under `merge`. */
|
|
@@ -14,7 +14,7 @@ type MergeCrossProductArgs = {
|
|
|
14
14
|
groupType: 'oneOf' | 'anyOf';
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
17
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
18
18
|
* setting, also in the first pass over a cross product's pairs.
|
|
19
19
|
*/
|
|
20
20
|
export declare const toOwnSystem: (system: MergeSystem) => MergeSystem;
|
|
@@ -30,7 +30,7 @@ export const mergeUnion = ({ schema, getRef, system, groupType }) => {
|
|
|
30
30
|
return output;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
33
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
34
34
|
* setting, also in the first pass over a cross product's pairs.
|
|
35
35
|
*/
|
|
36
36
|
export const toOwnSystem = (system) => ({
|
|
@@ -46,13 +46,13 @@ export const toOwnSystem = (system) => ({
|
|
|
46
46
|
* collections say `result` is an object or a string, then an array.
|
|
47
47
|
*
|
|
48
48
|
* The first pass is strict between the two members of a pair only. A
|
|
49
|
-
* member's own `allOf` merges under the `
|
|
49
|
+
* member's own `allOf` merges under the `skmtc.config.json` setting
|
|
50
50
|
* ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
|
|
51
51
|
* cross product with no pair that merges fails its pair: the outer pass then
|
|
52
52
|
* leaves the pair out, or lets the later member win.
|
|
53
53
|
*
|
|
54
54
|
* A `$ref` that names nothing is not a contradiction, so its pair is not left
|
|
55
|
-
* out for it: the `DanglingRefError` is thrown on, and `
|
|
55
|
+
* out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
|
|
56
56
|
* decides (`allOfMember`).
|
|
57
57
|
*/
|
|
58
58
|
const mergePairs = ({ pairs, merge, system }) => {
|
|
@@ -41,7 +41,7 @@ export const mergeSchemasOrRefs = ({ first, second, getRef, system }) => {
|
|
|
41
41
|
if (isRef(second)) {
|
|
42
42
|
throw new Error('Ref in second');
|
|
43
43
|
}
|
|
44
|
-
// Under `
|
|
44
|
+
// Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
|
|
45
45
|
// value, so it adds nothing to the merge: its members are left out, and the
|
|
46
46
|
// keywords next to it merge as usual.
|
|
47
47
|
const firstKeywords = withoutUnknownAnyOf({ schema: first, setting: system.anyOf, getRef });
|
|
@@ -51,7 +51,7 @@ export const mergeSchemasOrRefs = ({ first, second, getRef, system }) => {
|
|
|
51
51
|
return mergeSchemasOrRefs({ first: firstKeywords, second: secondKeywords, getRef, system });
|
|
52
52
|
}
|
|
53
53
|
if (containsAllOf(first) || containsAllOf(second)) {
|
|
54
|
-
// Each member's own `allOf` merges under the `
|
|
54
|
+
// Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
|
|
55
55
|
// the strict first pass over a cross product's pairs.
|
|
56
56
|
const ownSystem = toOwnSystem(system);
|
|
57
57
|
const mergedFirst = containsAllOf(first) ? mergeIntersection({ schema: first, getRef, system: ownSystem }) : first;
|
|
@@ -3,7 +3,7 @@ import * as v from 'valibot';
|
|
|
3
3
|
import type { KeptRefs } from '../../keptRefs.js';
|
|
4
4
|
export type GetRefFn = (ref: OpenAPIV3.ReferenceObject) => OpenAPIV3.SchemaObject;
|
|
5
5
|
/**
|
|
6
|
-
* The `system` settings as the merge reads them (`
|
|
6
|
+
* The `system` settings as the merge reads them (`skmtc.config.json#settings.parse`),
|
|
7
7
|
* and the keywords a later `allOf` member replaced under `latestWins`, so
|
|
8
8
|
* the parser can name them in one warning for the schema.
|
|
9
9
|
*/
|
|
@@ -13,7 +13,7 @@ export type MergeSystem = {
|
|
|
13
13
|
/** `unknown`: a member with `not` merges, its `not` carried as written. Left out: `strict`, which refuses it. */
|
|
14
14
|
not?: 'strict' | 'unknown';
|
|
15
15
|
/**
|
|
16
|
-
* `
|
|
16
|
+
* `skmtc.config.json` `parse.allOf`, kept while the first pass over a cross
|
|
17
17
|
* product's pairs sets `allOf` to `strict`. A member's own `allOf` merges
|
|
18
18
|
* under this setting in every pass. Left out: `allOf` is the setting.
|
|
19
19
|
*/
|
|
@@ -21,9 +21,9 @@ export type MergeSystem = {
|
|
|
21
21
|
replaced: Set<string>;
|
|
22
22
|
/** `unknown`: an `anyOf` of two or more members is any value, so it adds nothing to the merge. Left out: `union`. */
|
|
23
23
|
anyOf?: 'union' | 'unknown';
|
|
24
|
-
/** The keywords the merge read as any value: `anyOf` under `
|
|
24
|
+
/** The keywords the merge read as any value: `anyOf` under `parse.anyOf: unknown`. */
|
|
25
25
|
unknown?: Set<string>;
|
|
26
|
-
/** The refs that stay refs (`
|
|
26
|
+
/** The refs that stay refs (`parse.intersections`). Left out: every ref is followed. */
|
|
27
27
|
keptRefs?: KeptRefs;
|
|
28
28
|
};
|
|
29
29
|
export type OneOfObject = {
|
|
@@ -7,7 +7,7 @@ export const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly
|
|
|
7
7
|
}
|
|
8
8
|
const oasRef = context.withStackTrail(stackTrail, () => new OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
|
|
9
9
|
// The parse context checks each ref once the document is parsed, and
|
|
10
|
-
// removes what holds a ref that names nothing (`
|
|
10
|
+
// removes what holds a ref that names nothing (`parse.danglingRefs`).
|
|
11
11
|
context.registerOasRef(stackTrail.clone(), oasRef);
|
|
12
12
|
return oasRef;
|
|
13
13
|
};
|
|
@@ -98,12 +98,12 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
98
98
|
}
|
|
99
99
|
// OpenAPI `not` has no faithful TypeScript representation: a generated type
|
|
100
100
|
// that ignored it would *widen* the contract (accepting shapes the schema
|
|
101
|
-
// forbids). Under `
|
|
101
|
+
// forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
|
|
102
102
|
// is refused rather than emit a type that lies. The throw is isolated by
|
|
103
103
|
// `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
|
|
104
104
|
// are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
|
|
105
105
|
//
|
|
106
|
-
// Under `
|
|
106
|
+
// Under `parse.not: unknown` the schema parses with its other keywords, and
|
|
107
107
|
// its `not` is kept as an `OasUnknown` that core does not read: a generator
|
|
108
108
|
// can see that the document says "not something".
|
|
109
109
|
if ('not' in schema) {
|
|
@@ -248,7 +248,7 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
if ('anyOf' in schema && Array.isArray(schema.anyOf)) {
|
|
251
|
-
// Under `
|
|
251
|
+
// Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
|
|
252
252
|
// of two or more members is any value: the schema parses with its other
|
|
253
253
|
// keywords, so the properties next to it stay, without the members.
|
|
254
254
|
if (isUnknownAnyOf({ members: schema.anyOf, setting: context.system?.anyOf, getRef: toGetRef(context.documentObject) })) {
|
|
@@ -16,7 +16,7 @@ type MergeCrossProductArgs = {
|
|
|
16
16
|
groupType: 'oneOf' | 'anyOf';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
19
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
20
20
|
* setting, also in the first pass over a cross product's pairs.
|
|
21
21
|
*/
|
|
22
22
|
export declare const toOwnSystem: (system: MergeSystem) => MergeSystem;
|
|
@@ -37,7 +37,7 @@ export const mergeUnion = ({ schema, getRef, normalize, system, groupType }) =>
|
|
|
37
37
|
return output;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
40
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
41
41
|
* setting, also in the first pass over a cross product's pairs.
|
|
42
42
|
*/
|
|
43
43
|
export const toOwnSystem = (system) => ({
|
|
@@ -53,13 +53,13 @@ export const toOwnSystem = (system) => ({
|
|
|
53
53
|
* collections say `result` is an object or a string, then an array.
|
|
54
54
|
*
|
|
55
55
|
* The first pass is strict between the two members of a pair only. A
|
|
56
|
-
* member's own `allOf` merges under the `
|
|
56
|
+
* member's own `allOf` merges under the `skmtc.config.json` setting
|
|
57
57
|
* ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
|
|
58
58
|
* cross product with no pair that merges fails its pair: the outer pass then
|
|
59
59
|
* leaves the pair out, or lets the later member win.
|
|
60
60
|
*
|
|
61
61
|
* A `$ref` that names nothing is not a contradiction, so its pair is not left
|
|
62
|
-
* out for it: the `DanglingRefError` is thrown on, and `
|
|
62
|
+
* out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
|
|
63
63
|
* decides (`allOfMember`).
|
|
64
64
|
*/
|
|
65
65
|
const mergePairs = ({ pairs, merge, system }) => {
|
|
@@ -47,7 +47,7 @@ export const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, get
|
|
|
47
47
|
if (isRef(second)) {
|
|
48
48
|
throw new Error('Ref in second');
|
|
49
49
|
}
|
|
50
|
-
// Under `
|
|
50
|
+
// Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
|
|
51
51
|
// value, so it adds nothing to the merge: its members are left out, and the
|
|
52
52
|
// keywords next to it merge as usual.
|
|
53
53
|
const firstKeywords = withoutUnknownAnyOf({ schema: first, setting: system.anyOf, getRef });
|
|
@@ -57,7 +57,7 @@ export const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, get
|
|
|
57
57
|
return mergeSchemasOrRefs({ first: firstKeywords, second: secondKeywords, getRef, normalize, system });
|
|
58
58
|
}
|
|
59
59
|
if (containsAllOf(first) || containsAllOf(second)) {
|
|
60
|
-
// Each member's own `allOf` merges under the `
|
|
60
|
+
// Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
|
|
61
61
|
// the strict first pass over a cross product's pairs.
|
|
62
62
|
const ownSystem = toOwnSystem(system);
|
|
63
63
|
const mergedFirst = containsAllOf(first)
|
|
@@ -9,7 +9,7 @@ export type GetRefFn = (ref: OpenAPIV3.ReferenceObject) => OpenAPIV3.SchemaObjec
|
|
|
9
9
|
*/
|
|
10
10
|
export type NormalizeFn = (schema: OpenAPIV3.SchemaObject) => OpenAPIV3.SchemaObject;
|
|
11
11
|
/**
|
|
12
|
-
* The `system` settings as the merge reads them (`
|
|
12
|
+
* The `system` settings as the merge reads them (`skmtc.config.json#settings.parse`),
|
|
13
13
|
* and the keywords a later `allOf` member replaced under `latestWins`, so
|
|
14
14
|
* the parser can name them in one warning for the schema.
|
|
15
15
|
*/
|
|
@@ -19,7 +19,7 @@ export type MergeSystem = {
|
|
|
19
19
|
/** `unknown`: a member with `not` merges, its `not` carried as written. Left out: `strict`, which refuses it. */
|
|
20
20
|
not?: 'strict' | 'unknown';
|
|
21
21
|
/**
|
|
22
|
-
* `
|
|
22
|
+
* `skmtc.config.json` `parse.allOf`, kept while the first pass over a cross
|
|
23
23
|
* product's pairs sets `allOf` to `strict`. A member's own `allOf` merges
|
|
24
24
|
* under this setting in every pass. Left out: `allOf` is the setting.
|
|
25
25
|
*/
|
|
@@ -27,9 +27,9 @@ export type MergeSystem = {
|
|
|
27
27
|
replaced: Set<string>;
|
|
28
28
|
/** `unknown`: an `anyOf` of two or more members is any value, so it adds nothing to the merge. Left out: `union`. */
|
|
29
29
|
anyOf?: 'union' | 'unknown';
|
|
30
|
-
/** The keywords the merge read as any value: `anyOf` under `
|
|
30
|
+
/** The keywords the merge read as any value: `anyOf` under `parse.anyOf: unknown`. */
|
|
31
31
|
unknown?: Set<string>;
|
|
32
|
-
/** The refs that stay refs (`
|
|
32
|
+
/** The refs that stay refs (`parse.intersections`). Left out: every ref is followed. */
|
|
33
33
|
keptRefs?: KeptRefs;
|
|
34
34
|
};
|
|
35
35
|
export type OneOfObject = {
|
|
@@ -7,7 +7,7 @@ export const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly
|
|
|
7
7
|
}
|
|
8
8
|
const oasRef = context.withStackTrail(stackTrail, () => new OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
|
|
9
9
|
// The parse context checks each ref once the document is parsed, and
|
|
10
|
-
// removes what holds a ref that names nothing (`
|
|
10
|
+
// removes what holds a ref that names nothing (`parse.danglingRefs`).
|
|
11
11
|
context.registerOasRef(stackTrail.clone(), oasRef);
|
|
12
12
|
return oasRef;
|
|
13
13
|
};
|
|
@@ -141,12 +141,12 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
141
141
|
}
|
|
142
142
|
// OpenAPI `not` has no faithful TypeScript representation: a generated type
|
|
143
143
|
// that ignored it would *widen* the contract (accepting shapes the schema
|
|
144
|
-
// forbids). Under `
|
|
144
|
+
// forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
|
|
145
145
|
// is refused rather than emit a type that lies. The throw is isolated by
|
|
146
146
|
// `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
|
|
147
147
|
// are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
|
|
148
148
|
//
|
|
149
|
-
// Under `
|
|
149
|
+
// Under `parse.not: unknown` the schema parses with its other keywords, and
|
|
150
150
|
// its `not` is kept as an `OasUnknown` that core does not read: a generator
|
|
151
151
|
// can see that the document says "not something".
|
|
152
152
|
if ('not' in schema) {
|
|
@@ -326,7 +326,7 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
326
326
|
stackTrail,
|
|
327
327
|
context
|
|
328
328
|
});
|
|
329
|
-
// Under `
|
|
329
|
+
// Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
|
|
330
330
|
// of two or more members is any value: the schema parses with its other
|
|
331
331
|
// keywords, so the properties next to it stay, without the members.
|
|
332
332
|
if (isUnknownAnyOf({ members: wrapper.anyOf ?? [], setting: context.system?.anyOf, getRef: toGetRef(context.documentObject) })) {
|
|
@@ -16,7 +16,7 @@ type MergeCrossProductArgs = {
|
|
|
16
16
|
groupType: 'oneOf' | 'anyOf';
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
19
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
20
20
|
* setting, also in the first pass over a cross product's pairs.
|
|
21
21
|
*/
|
|
22
22
|
export declare const toOwnSystem: (system: MergeSystem) => MergeSystem;
|
|
@@ -37,7 +37,7 @@ export const mergeUnion = ({ schema, getRef, normalize, system, groupType }) =>
|
|
|
37
37
|
return output;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* The `system` a member's own `allOf` merges under: the `
|
|
40
|
+
* The `system` a member's own `allOf` merges under: the `skmtc.config.json`
|
|
41
41
|
* setting, also in the first pass over a cross product's pairs.
|
|
42
42
|
*/
|
|
43
43
|
export const toOwnSystem = (system) => ({
|
|
@@ -53,13 +53,13 @@ export const toOwnSystem = (system) => ({
|
|
|
53
53
|
* collections say `result` is an object or a string, then an array.
|
|
54
54
|
*
|
|
55
55
|
* The first pass is strict between the two members of a pair only. A
|
|
56
|
-
* member's own `allOf` merges under the `
|
|
56
|
+
* member's own `allOf` merges under the `skmtc.config.json` setting
|
|
57
57
|
* ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
|
|
58
58
|
* cross product with no pair that merges fails its pair: the outer pass then
|
|
59
59
|
* leaves the pair out, or lets the later member win.
|
|
60
60
|
*
|
|
61
61
|
* A `$ref` that names nothing is not a contradiction, so its pair is not left
|
|
62
|
-
* out for it: the `DanglingRefError` is thrown on, and `
|
|
62
|
+
* out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
|
|
63
63
|
* decides (`allOfMember`).
|
|
64
64
|
*/
|
|
65
65
|
const mergePairs = ({ pairs, merge, system }) => {
|
|
@@ -47,7 +47,7 @@ export const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, get
|
|
|
47
47
|
if (isRef(second)) {
|
|
48
48
|
throw new Error('Ref in second');
|
|
49
49
|
}
|
|
50
|
-
// Under `
|
|
50
|
+
// Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
|
|
51
51
|
// value, so it adds nothing to the merge: its members are left out, and the
|
|
52
52
|
// keywords next to it merge as usual.
|
|
53
53
|
const firstKeywords = withoutUnknownAnyOf({ schema: first, setting: system.anyOf, getRef });
|
|
@@ -57,7 +57,7 @@ export const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, get
|
|
|
57
57
|
return mergeSchemasOrRefs({ first: firstKeywords, second: secondKeywords, getRef, normalize, system });
|
|
58
58
|
}
|
|
59
59
|
if (containsAllOf(first) || containsAllOf(second)) {
|
|
60
|
-
// Each member's own `allOf` merges under the `
|
|
60
|
+
// Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
|
|
61
61
|
// the strict first pass over a cross product's pairs.
|
|
62
62
|
const ownSystem = toOwnSystem(system);
|
|
63
63
|
const mergedFirst = containsAllOf(first)
|
|
@@ -9,7 +9,7 @@ export type GetRefFn = (ref: OpenAPIV3.ReferenceObject) => OpenAPIV3.SchemaObjec
|
|
|
9
9
|
*/
|
|
10
10
|
export type NormalizeFn = (schema: OpenAPIV3.SchemaObject) => OpenAPIV3.SchemaObject;
|
|
11
11
|
/**
|
|
12
|
-
* The `system` settings as the merge reads them (`
|
|
12
|
+
* The `system` settings as the merge reads them (`skmtc.config.json#settings.parse`),
|
|
13
13
|
* and the keywords a later `allOf` member replaced under `latestWins`, so
|
|
14
14
|
* the parser can name them in one warning for the schema.
|
|
15
15
|
*/
|
|
@@ -19,7 +19,7 @@ export type MergeSystem = {
|
|
|
19
19
|
/** `unknown`: a member with `not` merges, its `not` carried as written. Left out: `strict`, which refuses it. */
|
|
20
20
|
not?: 'strict' | 'unknown';
|
|
21
21
|
/**
|
|
22
|
-
* `
|
|
22
|
+
* `skmtc.config.json` `parse.allOf`, kept while the first pass over a cross
|
|
23
23
|
* product's pairs sets `allOf` to `strict`. A member's own `allOf` merges
|
|
24
24
|
* under this setting in every pass. Left out: `allOf` is the setting.
|
|
25
25
|
*/
|
|
@@ -27,9 +27,9 @@ export type MergeSystem = {
|
|
|
27
27
|
replaced: Set<string>;
|
|
28
28
|
/** `unknown`: an `anyOf` of two or more members is any value, so it adds nothing to the merge. Left out: `union`. */
|
|
29
29
|
anyOf?: 'union' | 'unknown';
|
|
30
|
-
/** The keywords the merge read as any value: `anyOf` under `
|
|
30
|
+
/** The keywords the merge read as any value: `anyOf` under `parse.anyOf: unknown`. */
|
|
31
31
|
unknown?: Set<string>;
|
|
32
|
-
/** The refs that stay refs (`
|
|
32
|
+
/** The refs that stay refs (`parse.intersections`). Left out: every ref is followed. */
|
|
33
33
|
keptRefs?: KeptRefs;
|
|
34
34
|
};
|
|
35
35
|
export type OneOfObject = {
|
|
@@ -7,7 +7,7 @@ export const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly
|
|
|
7
7
|
}
|
|
8
8
|
const oasRef = context.withStackTrail(stackTrail, () => new OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
|
|
9
9
|
// The parse context checks each ref once the document is parsed, and
|
|
10
|
-
// removes what holds a ref that names nothing (`
|
|
10
|
+
// removes what holds a ref that names nothing (`parse.danglingRefs`).
|
|
11
11
|
context.registerOasRef(stackTrail.clone(), oasRef);
|
|
12
12
|
return oasRef;
|
|
13
13
|
};
|
|
@@ -141,12 +141,12 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
141
141
|
}
|
|
142
142
|
// OpenAPI `not` has no faithful TypeScript representation: a generated type
|
|
143
143
|
// that ignored it would *widen* the contract (accepting shapes the schema
|
|
144
|
-
// forbids). Under `
|
|
144
|
+
// forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
|
|
145
145
|
// is refused rather than emit a type that lies. The throw is isolated by
|
|
146
146
|
// `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
|
|
147
147
|
// are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
|
|
148
148
|
//
|
|
149
|
-
// Under `
|
|
149
|
+
// Under `parse.not: unknown` the schema parses with its other keywords, and
|
|
150
150
|
// its `not` is kept as an `OasUnknown` that core does not read: a generator
|
|
151
151
|
// can see that the document says "not something".
|
|
152
152
|
if ('not' in schema) {
|
|
@@ -326,7 +326,7 @@ export const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
326
326
|
stackTrail,
|
|
327
327
|
context
|
|
328
328
|
});
|
|
329
|
-
// Under `
|
|
329
|
+
// Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
|
|
330
330
|
// of two or more members is any value: the schema parses with its other
|
|
331
331
|
// keywords, so the properties next to it stay, without the members.
|
|
332
332
|
if (isUnknownAnyOf({ members: wrapper.anyOf ?? [], setting: context.system?.anyOf, getRef: toGetRef(context.documentObject) })) {
|
|
@@ -37,7 +37,7 @@ type EnrichmentDefaultsArgs = {
|
|
|
37
37
|
* Runs Parse + a values pass: every generator that advertises
|
|
38
38
|
* `toEnrichmentDefaults` is called over the subjects it supports, with no
|
|
39
39
|
* transform and no render. The result mirrors the
|
|
40
|
-
* `
|
|
40
|
+
* `skmtc.config.json#settings.enrichments` subtree (subject scope only) so a host can
|
|
41
41
|
* fold it straight into settings.
|
|
42
42
|
*
|
|
43
43
|
* Like {@link toSupportedSubjects} it fails open: a bad schema surfaces as a
|
|
@@ -7,7 +7,7 @@ import { CoreContext } from '../context/CoreContext.js';
|
|
|
7
7
|
* Runs Parse + a values pass: every generator that advertises
|
|
8
8
|
* `toEnrichmentDefaults` is called over the subjects it supports, with no
|
|
9
9
|
* transform and no render. The result mirrors the
|
|
10
|
-
* `
|
|
10
|
+
* `skmtc.config.json#settings.enrichments` subtree (subject scope only) so a host can
|
|
11
11
|
* fold it straight into settings.
|
|
12
12
|
*
|
|
13
13
|
* Like {@link toSupportedSubjects} it fails open: a bad schema surfaces as a
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the capability set: only generators that advertise `toEnrichmentDefaults`
|
|
10
10
|
* appear, and only the subjects for which a non-`undefined` default is computed.
|
|
11
11
|
*
|
|
12
|
-
* The shape mirrors the `
|
|
12
|
+
* The shape mirrors the `skmtc.config.json#settings.enrichments` subtree so a host
|
|
13
13
|
* can fold it straight into settings (subject scope only — the run-constant
|
|
14
14
|
* `_generator` / `_stack` scopes are out of scope for seeding):
|
|
15
15
|
* - operation generator: `[id][path][method][variant] = values`
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the capability set: only generators that advertise `toEnrichmentDefaults`
|
|
10
10
|
* appear, and only the subjects for which a non-`undefined` default is computed.
|
|
11
11
|
*
|
|
12
|
-
* The shape mirrors the `
|
|
12
|
+
* The shape mirrors the `skmtc.config.json#settings.enrichments` subtree so a host
|
|
13
13
|
* can fold it straight into settings (subject scope only — the run-constant
|
|
14
14
|
* `_generator` / `_stack` scopes are out of scope for seeding):
|
|
15
15
|
* - operation generator: `[id][path][method][variant] = values`
|
|
@@ -152,7 +152,7 @@ export type EnrichmentScopes = {
|
|
|
152
152
|
/**
|
|
153
153
|
* The `{ subject, generator, stack }` umbrella carried on
|
|
154
154
|
* `ContentSettings.enrichments`. Each member is the generator-owned leaf for
|
|
155
|
-
* that scope at a different key-depth in `
|
|
155
|
+
* that scope at a different key-depth in `skmtc.config.json#settings.enrichments`:
|
|
156
156
|
*
|
|
157
157
|
* - **subject** — `[id][subject][variant]`, resolved per item (the original
|
|
158
158
|
* per-subject enrichment).
|
package/esm/types/Manifest.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type ManifestEntry = {
|
|
|
81
81
|
characters: number;
|
|
82
82
|
destinationPath: string;
|
|
83
83
|
/**
|
|
84
|
-
* True when the file is ejected (`
|
|
84
|
+
* True when the file is ejected (`skmtc.config.json#settings.ejected`) —
|
|
85
85
|
* the user owns it. The item still generated in memory (its content
|
|
86
86
|
* is drift detection's input) but the CLI did not write it to disk
|
|
87
87
|
* and will never delete it. Annotated by the CLI writer, not the
|
|
@@ -12,7 +12,7 @@ import { type SchemaPath } from './SchemaPath.js';
|
|
|
12
12
|
* schema-seeded fields start out, and how label/order overrides are
|
|
13
13
|
* expressed for fields that need no custom input.
|
|
14
14
|
*
|
|
15
|
-
* Stored in `
|
|
15
|
+
* Stored in `skmtc.config.json` under the literal key `moduleSelect`:
|
|
16
16
|
*
|
|
17
17
|
* ```jsonc
|
|
18
18
|
* {
|