@skmtc/core 0.48.0 → 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.
Files changed (169) hide show
  1. package/esm/context/CoreContext.d.ts +1 -1
  2. package/esm/context/CoreContext.js +6 -2
  3. package/esm/context/GenerateContext.d.ts +1 -1
  4. package/esm/context/GenerateContext.js +1 -1
  5. package/esm/context/ParseContext.d.ts +4 -4
  6. package/esm/context/ParseContext.js +6 -6
  7. package/esm/context/generateTypes.d.ts +4 -4
  8. package/esm/context/tryParseAt.d.ts +1 -1
  9. package/esm/context/tryParseAt.js +1 -1
  10. package/esm/enrichments/EnrichmentAudit.d.ts +1 -1
  11. package/esm/enrichments/EnrichmentWarning.d.ts +1 -1
  12. package/esm/enrichments/findUnknownKeys.d.ts +1 -1
  13. package/esm/enrichments/findUnknownKeys.js +1 -1
  14. package/esm/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
  15. package/esm/enrichments/parseEnrichmentUmbrella.js +1 -1
  16. package/esm/enrichments/parseEnrichmentValue.d.ts +2 -2
  17. package/esm/enrichments/parseEnrichmentValue.js +2 -2
  18. package/esm/enrichments/readEnrichments.d.ts +4 -4
  19. package/esm/enrichments/readEnrichments.js +4 -4
  20. package/esm/enrichments/validateConfig.d.ts +1 -1
  21. package/esm/helpers/applyGeneratedSuffix.d.ts +1 -1
  22. package/esm/helpers/applyGeneratedSuffix.js +1 -1
  23. package/esm/helpers/normalizeWorkspacePath.d.ts +1 -1
  24. package/esm/helpers/normalizeWorkspacePath.js +1 -1
  25. package/esm/oas/array/Array.d.ts +2 -2
  26. package/esm/oas/array/Array.js +2 -2
  27. package/esm/oas/boolean/Boolean.d.ts +2 -2
  28. package/esm/oas/boolean/Boolean.js +2 -2
  29. package/esm/oas/integer/Integer.d.ts +2 -2
  30. package/esm/oas/integer/Integer.js +2 -2
  31. package/esm/oas/intersection/Intersection.d.ts +3 -3
  32. package/esm/oas/intersection/Intersection.js +3 -3
  33. package/esm/oas/number/Number.d.ts +2 -2
  34. package/esm/oas/number/Number.js +2 -2
  35. package/esm/oas/object/Object.d.ts +2 -2
  36. package/esm/oas/object/Object.js +2 -2
  37. package/esm/oas/operation/Operation.d.ts +1 -1
  38. package/esm/oas/operation/Operation.js +1 -1
  39. package/esm/oas/operation/toEffectiveParameters.d.ts +2 -2
  40. package/esm/oas/operation/toEffectiveParameters.js +2 -2
  41. package/esm/oas/ref/DanglingRefError.d.ts +1 -1
  42. package/esm/oas/ref/DanglingRefError.js +1 -1
  43. package/esm/oas/ref/Ref.d.ts +2 -2
  44. package/esm/oas/ref/Ref.js +2 -2
  45. package/esm/oas/string/String.d.ts +2 -2
  46. package/esm/oas/string/String.js +2 -2
  47. package/esm/oas/union/Union.d.ts +3 -3
  48. package/esm/oas/union/Union.js +3 -3
  49. package/esm/oas/unknown/Unknown.d.ts +2 -2
  50. package/esm/oas/unknown/Unknown.js +2 -2
  51. package/esm/parse/allOfSystem.d.ts +4 -4
  52. package/esm/parse/allOfSystem.js +2 -2
  53. package/esm/parse/anyOfSystem.d.ts +5 -5
  54. package/esm/parse/anyOfSystem.js +4 -4
  55. package/esm/parse/keptRefs.d.ts +2 -2
  56. package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
  57. package/esm/parse/v3-0/_merge-all-of/merge-union.js +3 -3
  58. package/esm/parse/v3-0/_merge-all-of/merge.js +2 -2
  59. package/esm/parse/v3-0/_merge-all-of/types.d.ts +4 -4
  60. package/esm/parse/v3-0/ref/toRefV31.js +1 -1
  61. package/esm/parse/v3-0/schema/toSchemasV3.js +3 -3
  62. package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
  63. package/esm/parse/v3-1/_merge-all-of/merge-union.js +3 -3
  64. package/esm/parse/v3-1/_merge-all-of/merge.js +2 -2
  65. package/esm/parse/v3-1/_merge-all-of/types.d.ts +4 -4
  66. package/esm/parse/v3-1/ref/toRefV31.js +1 -1
  67. package/esm/parse/v3-1/schema/toSchemasV3.js +3 -3
  68. package/esm/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
  69. package/esm/parse/v3-2/_merge-all-of/merge-union.js +3 -3
  70. package/esm/parse/v3-2/_merge-all-of/merge.js +2 -2
  71. package/esm/parse/v3-2/_merge-all-of/types.d.ts +4 -4
  72. package/esm/parse/v3-2/ref/toRefV31.js +1 -1
  73. package/esm/parse/v3-2/schema/toSchemasV3.js +3 -3
  74. package/esm/run/toEnrichmentDefaults.d.ts +1 -1
  75. package/esm/run/toEnrichmentDefaults.js +1 -1
  76. package/esm/types/EnrichmentDefaults.d.ts +1 -1
  77. package/esm/types/EnrichmentDefaults.js +1 -1
  78. package/esm/types/Enrichments.d.ts +1 -1
  79. package/esm/types/Manifest.d.ts +1 -1
  80. package/esm/types/ModuleSelect.d.ts +1 -1
  81. package/esm/types/Settings.d.ts +29 -11
  82. package/esm/types/Settings.js +13 -6
  83. package/esm/types/Variant.d.ts +3 -3
  84. package/esm/types/Variant.js +3 -3
  85. package/package.json +1 -1
  86. package/script/context/CoreContext.d.ts +1 -1
  87. package/script/context/CoreContext.js +6 -2
  88. package/script/context/GenerateContext.d.ts +1 -1
  89. package/script/context/GenerateContext.js +1 -1
  90. package/script/context/ParseContext.d.ts +4 -4
  91. package/script/context/ParseContext.js +6 -6
  92. package/script/context/generateTypes.d.ts +4 -4
  93. package/script/context/tryParseAt.d.ts +1 -1
  94. package/script/context/tryParseAt.js +1 -1
  95. package/script/enrichments/EnrichmentAudit.d.ts +1 -1
  96. package/script/enrichments/EnrichmentWarning.d.ts +1 -1
  97. package/script/enrichments/findUnknownKeys.d.ts +1 -1
  98. package/script/enrichments/findUnknownKeys.js +1 -1
  99. package/script/enrichments/parseEnrichmentUmbrella.d.ts +1 -1
  100. package/script/enrichments/parseEnrichmentUmbrella.js +1 -1
  101. package/script/enrichments/parseEnrichmentValue.d.ts +2 -2
  102. package/script/enrichments/parseEnrichmentValue.js +2 -2
  103. package/script/enrichments/readEnrichments.d.ts +4 -4
  104. package/script/enrichments/readEnrichments.js +4 -4
  105. package/script/enrichments/validateConfig.d.ts +1 -1
  106. package/script/helpers/applyGeneratedSuffix.d.ts +1 -1
  107. package/script/helpers/applyGeneratedSuffix.js +1 -1
  108. package/script/helpers/normalizeWorkspacePath.d.ts +1 -1
  109. package/script/helpers/normalizeWorkspacePath.js +1 -1
  110. package/script/oas/array/Array.d.ts +2 -2
  111. package/script/oas/array/Array.js +2 -2
  112. package/script/oas/boolean/Boolean.d.ts +2 -2
  113. package/script/oas/boolean/Boolean.js +2 -2
  114. package/script/oas/integer/Integer.d.ts +2 -2
  115. package/script/oas/integer/Integer.js +2 -2
  116. package/script/oas/intersection/Intersection.d.ts +3 -3
  117. package/script/oas/intersection/Intersection.js +3 -3
  118. package/script/oas/number/Number.d.ts +2 -2
  119. package/script/oas/number/Number.js +2 -2
  120. package/script/oas/object/Object.d.ts +2 -2
  121. package/script/oas/object/Object.js +2 -2
  122. package/script/oas/operation/Operation.d.ts +1 -1
  123. package/script/oas/operation/Operation.js +1 -1
  124. package/script/oas/operation/toEffectiveParameters.d.ts +2 -2
  125. package/script/oas/operation/toEffectiveParameters.js +2 -2
  126. package/script/oas/ref/DanglingRefError.d.ts +1 -1
  127. package/script/oas/ref/DanglingRefError.js +1 -1
  128. package/script/oas/ref/Ref.d.ts +2 -2
  129. package/script/oas/ref/Ref.js +2 -2
  130. package/script/oas/string/String.d.ts +2 -2
  131. package/script/oas/string/String.js +2 -2
  132. package/script/oas/union/Union.d.ts +3 -3
  133. package/script/oas/union/Union.js +3 -3
  134. package/script/oas/unknown/Unknown.d.ts +2 -2
  135. package/script/oas/unknown/Unknown.js +2 -2
  136. package/script/parse/allOfSystem.d.ts +4 -4
  137. package/script/parse/allOfSystem.js +2 -2
  138. package/script/parse/anyOfSystem.d.ts +5 -5
  139. package/script/parse/anyOfSystem.js +4 -4
  140. package/script/parse/keptRefs.d.ts +2 -2
  141. package/script/parse/v3-0/_merge-all-of/merge-union.d.ts +1 -1
  142. package/script/parse/v3-0/_merge-all-of/merge-union.js +3 -3
  143. package/script/parse/v3-0/_merge-all-of/merge.js +2 -2
  144. package/script/parse/v3-0/_merge-all-of/types.d.ts +4 -4
  145. package/script/parse/v3-0/ref/toRefV31.js +1 -1
  146. package/script/parse/v3-0/schema/toSchemasV3.js +3 -3
  147. package/script/parse/v3-1/_merge-all-of/merge-union.d.ts +1 -1
  148. package/script/parse/v3-1/_merge-all-of/merge-union.js +3 -3
  149. package/script/parse/v3-1/_merge-all-of/merge.js +2 -2
  150. package/script/parse/v3-1/_merge-all-of/types.d.ts +4 -4
  151. package/script/parse/v3-1/ref/toRefV31.js +1 -1
  152. package/script/parse/v3-1/schema/toSchemasV3.js +3 -3
  153. package/script/parse/v3-2/_merge-all-of/merge-union.d.ts +1 -1
  154. package/script/parse/v3-2/_merge-all-of/merge-union.js +3 -3
  155. package/script/parse/v3-2/_merge-all-of/merge.js +2 -2
  156. package/script/parse/v3-2/_merge-all-of/types.d.ts +4 -4
  157. package/script/parse/v3-2/ref/toRefV31.js +1 -1
  158. package/script/parse/v3-2/schema/toSchemasV3.js +3 -3
  159. package/script/run/toEnrichmentDefaults.d.ts +1 -1
  160. package/script/run/toEnrichmentDefaults.js +1 -1
  161. package/script/types/EnrichmentDefaults.d.ts +1 -1
  162. package/script/types/EnrichmentDefaults.js +1 -1
  163. package/script/types/Enrichments.d.ts +1 -1
  164. package/script/types/Manifest.d.ts +1 -1
  165. package/script/types/ModuleSelect.d.ts +1 -1
  166. package/script/types/Settings.d.ts +29 -11
  167. package/script/types/Settings.js +14 -7
  168. package/script/types/Variant.d.ts +3 -3
  169. package/script/types/Variant.js +3 -3
@@ -40,7 +40,7 @@ const isScalarMember = (member) => {
40
40
  */
41
41
  const toMemberSchema = (member, getRef) => ('$ref' in member ? getRef(member) : member);
42
42
  /**
43
- * Whether `system.anyOf: unknown` reads an `anyOf` as any value, as
43
+ * Whether `parse.anyOf: unknown` reads an `anyOf` as any value, as
44
44
  * Cloudflare's `cf` reads it: when it has two or more members, not counting a
45
45
  * `null` one, and one of them is not a single value.
46
46
  *
@@ -59,7 +59,7 @@ const isUnknownAnyOf = ({ members, setting, getRef }) => {
59
59
  exports.isUnknownAnyOf = isUnknownAnyOf;
60
60
  /**
61
61
  * `schema` with its other keywords and without an `anyOf` that
62
- * `system.anyOf: unknown` reads as any value ({@link isUnknownAnyOf}), so the
62
+ * `parse.anyOf: unknown` reads as any value ({@link isUnknownAnyOf}), so the
63
63
  * properties next to the `anyOf` stay. A `null` member makes it nullable. Any
64
64
  * other schema is returned as it is.
65
65
  */
@@ -101,11 +101,11 @@ const logMergedUnknownAnyOf = ({ system, stackTrail, parent, context }) => {
101
101
  }
102
102
  };
103
103
  exports.logMergedUnknownAnyOf = logMergedUnknownAnyOf;
104
- /** One warning for a schema whose `anyOf` was read as any value (`system.anyOf: unknown`). */
104
+ /** One warning for a schema whose `anyOf` was read as any value (`parse.anyOf: unknown`). */
105
105
  const logUnknownAnyOf = ({ stackTrail, parent, context }) => {
106
106
  context.logIssueNoKey({
107
107
  level: 'warning',
108
- message: 'The anyOf is read as any value (system.anyOf is unknown): the schema keeps its other keywords, without the anyOf members.',
108
+ message: 'The anyOf is read as any value (parse.anyOf is unknown): the schema keeps its other keywords, without the anyOf members.',
109
109
  parent,
110
110
  stackTrail,
111
111
  type: 'ANYOF_AS_UNKNOWN'
@@ -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 `system.intersections` keeps out of a merge. */
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
- /** `client.json` `system.intersections`. */
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 `client.json`
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;
@@ -34,7 +34,7 @@ const mergeUnion = ({ schema, getRef, system, groupType }) => {
34
34
  };
35
35
  exports.mergeUnion = mergeUnion;
36
36
  /**
37
- * The `system` a member's own `allOf` merges under: the `client.json`
37
+ * The `system` a member's own `allOf` merges under: the `skmtc.config.json`
38
38
  * setting, also in the first pass over a cross product's pairs.
39
39
  */
40
40
  const toOwnSystem = (system) => ({
@@ -51,13 +51,13 @@ exports.toOwnSystem = toOwnSystem;
51
51
  * collections say `result` is an object or a string, then an array.
52
52
  *
53
53
  * The first pass is strict between the two members of a pair only. A
54
- * member's own `allOf` merges under the `client.json` setting
54
+ * member's own `allOf` merges under the `skmtc.config.json` setting
55
55
  * ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
56
56
  * cross product with no pair that merges fails its pair: the outer pass then
57
57
  * leaves the pair out, or lets the later member win.
58
58
  *
59
59
  * A `$ref` that names nothing is not a contradiction, so its pair is not left
60
- * out for it: the `DanglingRefError` is thrown on, and `system.danglingRefs`
60
+ * out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
61
61
  * decides (`allOfMember`).
62
62
  */
63
63
  const mergePairs = ({ pairs, merge, system }) => {
@@ -44,7 +44,7 @@ const mergeSchemasOrRefs = ({ first, second, getRef, system }) => {
44
44
  if ((0, refFns_js_1.isRef)(second)) {
45
45
  throw new Error('Ref in second');
46
46
  }
47
- // Under `system.anyOf: unknown` an `anyOf` of two or more members is any
47
+ // Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
48
48
  // value, so it adds nothing to the merge: its members are left out, and the
49
49
  // keywords next to it merge as usual.
50
50
  const firstKeywords = (0, anyOfSystem_js_1.withoutUnknownAnyOf)({ schema: first, setting: system.anyOf, getRef });
@@ -54,7 +54,7 @@ const mergeSchemasOrRefs = ({ first, second, getRef, system }) => {
54
54
  return (0, exports.mergeSchemasOrRefs)({ first: firstKeywords, second: secondKeywords, getRef, system });
55
55
  }
56
56
  if (containsAllOf(first) || containsAllOf(second)) {
57
- // Each member's own `allOf` merges under the `client.json` setting, also in
57
+ // Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
58
58
  // the strict first pass over a cross product's pairs.
59
59
  const ownSystem = (0, merge_union_js_1.toOwnSystem)(system);
60
60
  const mergedFirst = containsAllOf(first) ? (0, merge_intersection_js_1.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 (`client.json#settings.system`),
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
- * `client.json` `system.allOf`, kept while the first pass over a cross
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 `system.anyOf: unknown`. */
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 (`system.intersections`). Left out: every ref is followed. */
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 = {
@@ -10,7 +10,7 @@ const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly, write
10
10
  }
11
11
  const oasRef = context.withStackTrail(stackTrail, () => new Ref_js_1.OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
12
12
  // The parse context checks each ref once the document is parsed, and
13
- // removes what holds a ref that names nothing (`system.danglingRefs`).
13
+ // removes what holds a ref that names nothing (`parse.danglingRefs`).
14
14
  context.registerOasRef(stackTrail.clone(), oasRef);
15
15
  return oasRef;
16
16
  };
@@ -103,12 +103,12 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
103
103
  }
104
104
  // OpenAPI `not` has no faithful TypeScript representation: a generated type
105
105
  // that ignored it would *widen* the contract (accepting shapes the schema
106
- // forbids). Under `client.json` `system.not: strict` (the default) the schema
106
+ // forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
107
107
  // is refused rather than emit a type that lies. The throw is isolated by
108
108
  // `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
109
109
  // are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
110
110
  //
111
- // Under `system.not: unknown` the schema parses with its other keywords, and
111
+ // Under `parse.not: unknown` the schema parses with its other keywords, and
112
112
  // its `not` is kept as an `OasUnknown` that core does not read: a generator
113
113
  // can see that the document says "not something".
114
114
  if ('not' in schema) {
@@ -253,7 +253,7 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
253
253
  });
254
254
  }
255
255
  if ('anyOf' in schema && Array.isArray(schema.anyOf)) {
256
- // Under `system.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
256
+ // Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
257
257
  // of two or more members is any value: the schema parses with its other
258
258
  // keywords, so the properties next to it stay, without the members.
259
259
  if ((0, anyOfSystem_js_1.isUnknownAnyOf)({ members: schema.anyOf, setting: context.system?.anyOf, getRef: (0, refFns_js_2.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 `client.json`
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;
@@ -41,7 +41,7 @@ const mergeUnion = ({ schema, getRef, normalize, system, groupType }) => {
41
41
  };
42
42
  exports.mergeUnion = mergeUnion;
43
43
  /**
44
- * The `system` a member's own `allOf` merges under: the `client.json`
44
+ * The `system` a member's own `allOf` merges under: the `skmtc.config.json`
45
45
  * setting, also in the first pass over a cross product's pairs.
46
46
  */
47
47
  const toOwnSystem = (system) => ({
@@ -58,13 +58,13 @@ exports.toOwnSystem = toOwnSystem;
58
58
  * collections say `result` is an object or a string, then an array.
59
59
  *
60
60
  * The first pass is strict between the two members of a pair only. A
61
- * member's own `allOf` merges under the `client.json` setting
61
+ * member's own `allOf` merges under the `skmtc.config.json` setting
62
62
  * ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
63
63
  * cross product with no pair that merges fails its pair: the outer pass then
64
64
  * leaves the pair out, or lets the later member win.
65
65
  *
66
66
  * A `$ref` that names nothing is not a contradiction, so its pair is not left
67
- * out for it: the `DanglingRefError` is thrown on, and `system.danglingRefs`
67
+ * out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
68
68
  * decides (`allOfMember`).
69
69
  */
70
70
  const mergePairs = ({ pairs, merge, system }) => {
@@ -50,7 +50,7 @@ const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, getRef, no
50
50
  if ((0, refFns_js_1.isRef)(second)) {
51
51
  throw new Error('Ref in second');
52
52
  }
53
- // Under `system.anyOf: unknown` an `anyOf` of two or more members is any
53
+ // Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
54
54
  // value, so it adds nothing to the merge: its members are left out, and the
55
55
  // keywords next to it merge as usual.
56
56
  const firstKeywords = (0, anyOfSystem_js_1.withoutUnknownAnyOf)({ schema: first, setting: system.anyOf, getRef });
@@ -60,7 +60,7 @@ const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, getRef, no
60
60
  return (0, exports.mergeSchemasOrRefs)({ first: firstKeywords, second: secondKeywords, getRef, normalize, system });
61
61
  }
62
62
  if (containsAllOf(first) || containsAllOf(second)) {
63
- // Each member's own `allOf` merges under the `client.json` setting, also in
63
+ // Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
64
64
  // the strict first pass over a cross product's pairs.
65
65
  const ownSystem = (0, merge_union_js_1.toOwnSystem)(system);
66
66
  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 (`client.json#settings.system`),
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
- * `client.json` `system.allOf`, kept while the first pass over a cross
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 `system.anyOf: unknown`. */
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 (`system.intersections`). Left out: every ref is followed. */
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 = {
@@ -10,7 +10,7 @@ const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly, write
10
10
  }
11
11
  const oasRef = context.withStackTrail(stackTrail, () => new Ref_js_1.OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
12
12
  // The parse context checks each ref once the document is parsed, and
13
- // removes what holds a ref that names nothing (`system.danglingRefs`).
13
+ // removes what holds a ref that names nothing (`parse.danglingRefs`).
14
14
  context.registerOasRef(stackTrail.clone(), oasRef);
15
15
  return oasRef;
16
16
  };
@@ -146,12 +146,12 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
146
146
  }
147
147
  // OpenAPI `not` has no faithful TypeScript representation: a generated type
148
148
  // that ignored it would *widen* the contract (accepting shapes the schema
149
- // forbids). Under `client.json` `system.not: strict` (the default) the schema
149
+ // forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
150
150
  // is refused rather than emit a type that lies. The throw is isolated by
151
151
  // `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
152
152
  // are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
153
153
  //
154
- // Under `system.not: unknown` the schema parses with its other keywords, and
154
+ // Under `parse.not: unknown` the schema parses with its other keywords, and
155
155
  // its `not` is kept as an `OasUnknown` that core does not read: a generator
156
156
  // can see that the document says "not something".
157
157
  if ('not' in schema) {
@@ -331,7 +331,7 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
331
331
  stackTrail,
332
332
  context
333
333
  });
334
- // Under `system.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
334
+ // Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
335
335
  // of two or more members is any value: the schema parses with its other
336
336
  // keywords, so the properties next to it stay, without the members.
337
337
  if ((0, anyOfSystem_js_1.isUnknownAnyOf)({ members: wrapper.anyOf ?? [], setting: context.system?.anyOf, getRef: (0, refFns_js_2.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 `client.json`
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;
@@ -41,7 +41,7 @@ const mergeUnion = ({ schema, getRef, normalize, system, groupType }) => {
41
41
  };
42
42
  exports.mergeUnion = mergeUnion;
43
43
  /**
44
- * The `system` a member's own `allOf` merges under: the `client.json`
44
+ * The `system` a member's own `allOf` merges under: the `skmtc.config.json`
45
45
  * setting, also in the first pass over a cross product's pairs.
46
46
  */
47
47
  const toOwnSystem = (system) => ({
@@ -58,13 +58,13 @@ exports.toOwnSystem = toOwnSystem;
58
58
  * collections say `result` is an object or a string, then an array.
59
59
  *
60
60
  * The first pass is strict between the two members of a pair only. A
61
- * member's own `allOf` merges under the `client.json` setting
61
+ * member's own `allOf` merges under the `skmtc.config.json` setting
62
62
  * ({@link toOwnSystem}). Inside an outer first pass under `latestWins`, a
63
63
  * cross product with no pair that merges fails its pair: the outer pass then
64
64
  * leaves the pair out, or lets the later member win.
65
65
  *
66
66
  * A `$ref` that names nothing is not a contradiction, so its pair is not left
67
- * out for it: the `DanglingRefError` is thrown on, and `system.danglingRefs`
67
+ * out for it: the `DanglingRefError` is thrown on, and `parse.danglingRefs`
68
68
  * decides (`allOfMember`).
69
69
  */
70
70
  const mergePairs = ({ pairs, merge, system }) => {
@@ -50,7 +50,7 @@ const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, getRef, no
50
50
  if ((0, refFns_js_1.isRef)(second)) {
51
51
  throw new Error('Ref in second');
52
52
  }
53
- // Under `system.anyOf: unknown` an `anyOf` of two or more members is any
53
+ // Under `parse.anyOf: unknown` an `anyOf` of two or more members is any
54
54
  // value, so it adds nothing to the merge: its members are left out, and the
55
55
  // keywords next to it merge as usual.
56
56
  const firstKeywords = (0, anyOfSystem_js_1.withoutUnknownAnyOf)({ schema: first, setting: system.anyOf, getRef });
@@ -60,7 +60,7 @@ const mergeSchemasOrRefs = ({ first: inputFirst, second: inputSecond, getRef, no
60
60
  return (0, exports.mergeSchemasOrRefs)({ first: firstKeywords, second: secondKeywords, getRef, normalize, system });
61
61
  }
62
62
  if (containsAllOf(first) || containsAllOf(second)) {
63
- // Each member's own `allOf` merges under the `client.json` setting, also in
63
+ // Each member's own `allOf` merges under the `skmtc.config.json` setting, also in
64
64
  // the strict first pass over a cross product's pairs.
65
65
  const ownSystem = (0, merge_union_js_1.toOwnSystem)(system);
66
66
  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 (`client.json#settings.system`),
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
- * `client.json` `system.allOf`, kept while the first pass over a cross
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 `system.anyOf: unknown`. */
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 (`system.intersections`). Left out: every ref is followed. */
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 = {
@@ -10,7 +10,7 @@ const toRefV31 = ({ ref, refType, stackTrail, context, nullable, readOnly, write
10
10
  }
11
11
  const oasRef = context.withStackTrail(stackTrail, () => new Ref_js_1.OasRef({ ...siblings, refType, $ref, nullable, readOnly, writeOnly }, context));
12
12
  // The parse context checks each ref once the document is parsed, and
13
- // removes what holds a ref that names nothing (`system.danglingRefs`).
13
+ // removes what holds a ref that names nothing (`parse.danglingRefs`).
14
14
  context.registerOasRef(stackTrail.clone(), oasRef);
15
15
  return oasRef;
16
16
  };
@@ -146,12 +146,12 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
146
146
  }
147
147
  // OpenAPI `not` has no faithful TypeScript representation: a generated type
148
148
  // that ignored it would *widen* the contract (accepting shapes the schema
149
- // forbids). Under `client.json` `system.not: strict` (the default) the schema
149
+ // forbids). Under `skmtc.config.json` `parse.not: strict` (the default) the schema
150
150
  // is refused rather than emit a type that lies. The throw is isolated by
151
151
  // `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers of this schema
152
152
  // are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
153
153
  //
154
- // Under `system.not: unknown` the schema parses with its other keywords, and
154
+ // Under `parse.not: unknown` the schema parses with its other keywords, and
155
155
  // its `not` is kept as an `OasUnknown` that core does not read: a generator
156
156
  // can see that the document says "not something".
157
157
  if ('not' in schema) {
@@ -331,7 +331,7 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
331
331
  stackTrail,
332
332
  context
333
333
  });
334
- // Under `system.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
334
+ // Under `parse.anyOf: unknown`, as Cloudflare's `cf` reads it, an `anyOf`
335
335
  // of two or more members is any value: the schema parses with its other
336
336
  // keywords, so the properties next to it stay, without the members.
337
337
  if ((0, anyOfSystem_js_1.isUnknownAnyOf)({ members: wrapper.anyOf ?? [], setting: context.system?.anyOf, getRef: (0, refFns_js_2.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
- * `client.json#settings.enrichments` subtree (subject scope only) so a host can
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
@@ -10,7 +10,7 @@ const CoreContext_js_1 = require("../context/CoreContext.js");
10
10
  * Runs Parse + a values pass: every generator that advertises
11
11
  * `toEnrichmentDefaults` is called over the subjects it supports, with no
12
12
  * transform and no render. The result mirrors the
13
- * `client.json#settings.enrichments` subtree (subject scope only) so a host can
13
+ * `skmtc.config.json#settings.enrichments` subtree (subject scope only) so a host can
14
14
  * fold it straight into settings.
15
15
  *
16
16
  * 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 `client.json#settings.enrichments` subtree so a host
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`
@@ -10,7 +10,7 @@
10
10
  * the capability set: only generators that advertise `toEnrichmentDefaults`
11
11
  * appear, and only the subjects for which a non-`undefined` default is computed.
12
12
  *
13
- * The shape mirrors the `client.json#settings.enrichments` subtree so a host
13
+ * The shape mirrors the `skmtc.config.json#settings.enrichments` subtree so a host
14
14
  * can fold it straight into settings (subject scope only — the run-constant
15
15
  * `_generator` / `_stack` scopes are out of scope for seeding):
16
16
  * - 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 `client.json#settings.enrichments`:
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).
@@ -81,7 +81,7 @@ export type ManifestEntry = {
81
81
  characters: number;
82
82
  destinationPath: string;
83
83
  /**
84
- * True when the file is ejected (`client.json#settings.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 `client.json` under the literal key `moduleSelect`:
15
+ * Stored in `skmtc.config.json` under the literal key `moduleSelect`:
16
16
  *
17
17
  * ```jsonc
18
18
  * {
@@ -55,7 +55,7 @@ import { type Method } from './Method.js';
55
55
  /**
56
56
  * Valibot schema for {@link ModulePackage}.
57
57
  *
58
- * `rootPath` must be a **forward** path: `client.json` `basePath` is
58
+ * `rootPath` must be a **forward** path: `skmtc.config.json` `basePath` is
59
59
  * the common on-disk anchor, so every package sits forward from it.
60
60
  * A `..` segment means `basePath` was placed too deep — a misconfig
61
61
  * that otherwise misplaces every artifact silently.
@@ -163,16 +163,22 @@ export declare const includeModels: v.GenericSchema<IncludeModels>;
163
163
  */
164
164
  export declare const anchorsSettings: v.GenericSchema<AnchorsSettings>;
165
165
  /**
166
- * What `client.json#settings.system.danglingRefs` can list: each kind of
166
+ * What `skmtc.config.json#settings.parse.danglingRefs` can list: each kind of
167
167
  * `$ref`, and `allOfMember`, a `$ref` that core merges at parse: a member of
168
168
  * an `allOf`, also one inside a `oneOf` or `anyOf` member, or a `oneOf` or
169
169
  * `anyOf` member merged with the keywords beside the union.
170
170
  */
171
171
  export declare const danglingRefKinds: readonly ["schema", "parameter", "requestBody", "response", "header", "securityScheme", "example", "link", "allOfMember"];
172
- /** A kind of `$ref` that `system.danglingRefs` can let name nothing. */
172
+ /** A kind of `$ref` that `parse.danglingRefs` can let name nothing. */
173
173
  export type DanglingRefKind = (typeof danglingRefKinds)[number];
174
- /** Valibot schema for {@link SystemSettings}: `client.json#settings.system`. */
175
- export declare const systemSettings: v.GenericSchema<SystemSettings>;
174
+ /** Valibot schema for {@link ParseSettings}: `skmtc.config.json#settings.parse`. */
175
+ export declare const parseSettings: v.GenericSchema<ParseSettings>;
176
+ /**
177
+ * The old name of {@link parseSettings}.
178
+ *
179
+ * @deprecated Use `parseSettings`.
180
+ */
181
+ export declare const systemSettings: v.GenericSchema<ParseSettings>;
176
182
  export declare const clientSettings: v.GenericSchema<ClientSettings>;
177
183
  /**
178
184
  * Configuration for skipping specific HTTP methods + variants on API paths.
@@ -408,7 +414,7 @@ export type Include = IncludeOperations | IncludeModels | string;
408
414
  */
409
415
  /**
410
416
  * Per-project gen-maps (`anchors`) configuration. Lives at
411
- * `client.json#settings.anchors`.
417
+ * `skmtc.config.json#settings.anchors`.
412
418
  *
413
419
  * v1 honours the two fields below. Future fields (parser choice,
414
420
  * gzip compression, map toggle) will land additively as the
@@ -431,11 +437,11 @@ export type AnchorsSettings = {
431
437
  };
432
438
  /**
433
439
  * How the OpenAPI parser treats what it cannot read faithfully, or reads
434
- * another way (`client.json#settings.system`). Each setting's default parses
440
+ * another way (`skmtc.config.json#settings.parse`). Each setting's default parses
435
441
  * as core always did: `strict` fails the schema, and `removeErroredItems`
436
442
  * removes each item that uses it.
437
443
  */
438
- export type SystemSettings = {
444
+ export type ParseSettings = {
439
445
  /**
440
446
  * `latestWins`: where `allOf` members contradict, the later member's
441
447
  * keyword wins, with one warning for each schema where it happens.
@@ -480,6 +486,12 @@ export type SystemSettings = {
480
486
  */
481
487
  intersections?: 'merge' | 'cycles' | 'all';
482
488
  };
489
+ /**
490
+ * The old name of {@link ParseSettings}.
491
+ *
492
+ * @deprecated Use `ParseSettings`.
493
+ */
494
+ export type SystemSettings = ParseSettings;
483
495
  export type ClientSettings = {
484
496
  /** Base output path for generated files */
485
497
  basePath?: string;
@@ -503,12 +515,18 @@ export type ClientSettings = {
503
515
  * in v1. See {@link AnchorsSettings}.
504
516
  */
505
517
  anchors?: AnchorsSettings;
506
- /** How the OpenAPI parser treats what it cannot read faithfully. See {@link SystemSettings}. */
507
- system?: SystemSettings;
518
+ /** How the OpenAPI parser treats what it cannot read faithfully. See {@link ParseSettings}. */
519
+ parse?: ParseSettings;
520
+ /**
521
+ * The old name of {@link parse}. Read only when `parse` is not set.
522
+ *
523
+ * @deprecated Use `parse`. `skmtc migrate config <project>` moves it.
524
+ */
525
+ system?: ParseSettings;
508
526
  /**
509
527
  * Preview input-matcher discovery directories (project-root relative, e.g.
510
528
  * `src/fields`, `src/inputs`). A preview/hub concern: the generation engine
511
- * ignores it. Declared here so the CLI preserves it when reading `client.json`
529
+ * ignores it. Declared here so the CLI preserves it when reading `skmtc.config.json`
512
530
  * and carries it through `skmtc push` to the hub.
513
531
  */
514
532
  inputDirs?: string[];