@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
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.skmtcClientConfig = exports.clientSettings = exports.systemSettings = exports.danglingRefKinds = exports.anchorsSettings = exports.includeModels = exports.includeModelRefs = exports.includeOperations = exports.includePaths = exports.skipModels = exports.skipModelRefs = exports.skipOperations = exports.skipPaths = exports.modulePackages = exports.modulePackage = void 0;
36
+ exports.skmtcClientConfig = exports.clientSettings = exports.systemSettings = exports.parseSettings = exports.danglingRefKinds = exports.anchorsSettings = exports.includeModels = exports.includeModelRefs = exports.includeOperations = exports.includePaths = exports.skipModels = exports.skipModelRefs = exports.skipOperations = exports.skipPaths = exports.modulePackages = exports.modulePackage = void 0;
37
37
  /**
38
38
  * @fileoverview SKMTC Core Settings and Configuration
39
39
  *
@@ -93,14 +93,14 @@ const toWorkspacePath_js_1 = require("../helpers/toWorkspacePath.js");
93
93
  /**
94
94
  * Valibot schema for {@link ModulePackage}.
95
95
  *
96
- * `rootPath` must be a **forward** path: `client.json` `basePath` is
96
+ * `rootPath` must be a **forward** path: `skmtc.config.json` `basePath` is
97
97
  * the common on-disk anchor, so every package sits forward from it.
98
98
  * A `..` segment means `basePath` was placed too deep — a misconfig
99
99
  * that otherwise misplaces every artifact silently.
100
100
  */
101
101
  exports.modulePackage = v.object({
102
102
  rootPath: v.pipe(v.string(), v.check(rootPath => !(0, normalizeWorkspacePath_js_1.hasParentSegment)(rootPath), 'package rootPath must be a forward path with no ".." segments — ' +
103
- 'set client.json basePath to a common ancestor of every package ' +
103
+ 'set skmtc.config.json basePath to a common ancestor of every package ' +
104
104
  'so each rootPath is written forward from it')),
105
105
  moduleName: v.optional(v.string())
106
106
  });
@@ -206,7 +206,7 @@ exports.anchorsSettings = v.object({
206
206
  out: v.optional(v.string())
207
207
  });
208
208
  /**
209
- * What `client.json#settings.system.danglingRefs` can list: each kind of
209
+ * What `skmtc.config.json#settings.parse.danglingRefs` can list: each kind of
210
210
  * `$ref`, and `allOfMember`, a `$ref` that core merges at parse: a member of
211
211
  * an `allOf`, also one inside a `oneOf` or `anyOf` member, or a `oneOf` or
212
212
  * `anyOf` member merged with the keywords beside the union.
@@ -222,8 +222,8 @@ exports.danglingRefKinds = [
222
222
  'link',
223
223
  'allOfMember'
224
224
  ];
225
- /** Valibot schema for {@link SystemSettings}: `client.json#settings.system`. */
226
- exports.systemSettings = v.object({
225
+ /** Valibot schema for {@link ParseSettings}: `skmtc.config.json#settings.parse`. */
226
+ exports.parseSettings = v.object({
227
227
  allOf: v.optional(v.picklist(['strict', 'latestWins'])),
228
228
  responseContradictions: v.optional(v.picklist(['strict', 'unknown'])),
229
229
  not: v.optional(v.picklist(['strict', 'unknown'])),
@@ -231,6 +231,12 @@ exports.systemSettings = v.object({
231
231
  danglingRefs: v.optional(v.array(v.picklist(exports.danglingRefKinds))),
232
232
  intersections: v.optional(v.picklist(['merge', 'cycles', 'all']))
233
233
  });
234
+ /**
235
+ * The old name of {@link parseSettings}.
236
+ *
237
+ * @deprecated Use `parseSettings`.
238
+ */
239
+ exports.systemSettings = exports.parseSettings;
234
240
  exports.clientSettings = v.object({
235
241
  basePath: v.optional(v.pipe(v.string(), v.check(basePath => !(0, normalizeWorkspacePath_js_1.isAbsolutePath)(basePath), 'basePath must be relative to the SKMTC root (the directory containing .skmtc/); ' +
236
242
  'absolute paths are not supported because generated output is always written under it'), v.check(basePath => !(0, normalizeWorkspacePath_js_1.hasParentSegment)(basePath), 'basePath must be a forward path with no ".." segments — it is the on-disk anchor ' +
@@ -241,7 +247,8 @@ exports.clientSettings = v.object({
241
247
  include: v.optional(v.array(include)),
242
248
  skip: v.optional(v.array(skip)),
243
249
  anchors: v.optional(exports.anchorsSettings),
244
- system: v.optional(exports.systemSettings),
250
+ parse: v.optional(exports.parseSettings),
251
+ system: v.optional(exports.parseSettings),
245
252
  inputDirs: v.optional(v.array(v.string())),
246
253
  formatter: v.optional(v.string()),
247
254
  generatedSuffix: v.optional(v.string()),
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * A **variant** is a named axis below `[path][method]` (OAS) or
5
5
  * `[rootKind][fieldName]` (GraphQL) inside
6
- * `client.json#settings.enrichments`. It lets a single operation produce
6
+ * `skmtc.config.json#settings.enrichments`. It lets a single operation produce
7
7
  * N Definitions instead of one — e.g. a single broad `PATCH` endpoint
8
8
  * driving several section-edit forms, each scoped to a subset of fields.
9
9
  *
@@ -11,10 +11,10 @@
11
11
  * enrichment block. The variant name `'main'` is the canonical default
12
12
  * and is guaranteed to be present:
13
13
  *
14
- * - When a consumer's `client.json` writes no enrichments at all for a
14
+ * - When a consumer's `skmtc.config.json` writes no enrichments at all for a
15
15
  * `(generatorId, path, method)`, the engine still dispatches once with
16
16
  * `variant: 'main'` and `enrichments: undefined`.
17
- * - When a consumer's `client.json` writes any variants for a
17
+ * - When a consumer's `skmtc.config.json` writes any variants for a
18
18
  * `(generatorId, path, method)`, `'main'` must be among them — Valibot
19
19
  * rejects at parse time, and the engine also throws at runtime.
20
20
  *
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * A **variant** is a named axis below `[path][method]` (OAS) or
6
6
  * `[rootKind][fieldName]` (GraphQL) inside
7
- * `client.json#settings.enrichments`. It lets a single operation produce
7
+ * `skmtc.config.json#settings.enrichments`. It lets a single operation produce
8
8
  * N Definitions instead of one — e.g. a single broad `PATCH` endpoint
9
9
  * driving several section-edit forms, each scoped to a subset of fields.
10
10
  *
@@ -12,10 +12,10 @@
12
12
  * enrichment block. The variant name `'main'` is the canonical default
13
13
  * and is guaranteed to be present:
14
14
  *
15
- * - When a consumer's `client.json` writes no enrichments at all for a
15
+ * - When a consumer's `skmtc.config.json` writes no enrichments at all for a
16
16
  * `(generatorId, path, method)`, the engine still dispatches once with
17
17
  * `variant: 'main'` and `enrichments: undefined`.
18
- * - When a consumer's `client.json` writes any variants for a
18
+ * - When a consumer's `skmtc.config.json` writes any variants for a
19
19
  * `(generatorId, path, method)`, `'main'` must be among them — Valibot
20
20
  * rejects at parse time, and the engine also throws at runtime.
21
21
  *