@skmtc/core 0.16.3 → 0.18.1
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/GenerateContext.d.ts +3 -3
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +45 -32
- package/esm/context/ParseContext.d.ts +16 -0
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +16 -0
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -1
- package/esm/dsl/model/ModelDriver.js +29 -0
- package/esm/dsl/model/toModelEntry.d.ts +9 -3
- package/esm/dsl/model/toModelEntry.d.ts.map +1 -1
- package/esm/dsl/model/toModelEntry.js +29 -1
- package/esm/dsl/model/toModelProjectionBase.d.ts +16 -3
- package/esm/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/esm/dsl/model/toModelProjectionBase.js +3 -3
- package/esm/dsl/model/types.d.ts +46 -0
- package/esm/dsl/model/types.d.ts.map +1 -1
- package/esm/dsl/operation/gql/types.d.ts +6 -1
- package/esm/dsl/operation/gql/types.d.ts.map +1 -1
- package/esm/dsl/operation/oas/types.d.ts +6 -1
- package/esm/dsl/operation/oas/types.d.ts.map +1 -1
- package/esm/enrichments/validateConfig.d.ts +60 -0
- package/esm/enrichments/validateConfig.d.ts.map +1 -0
- package/esm/enrichments/validateConfig.js +176 -0
- package/esm/mod.d.ts +1 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -0
- package/esm/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
- package/esm/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
- package/esm/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
- package/esm/parse/v3-0/_merge-all-of/merge-union.js +0 -8
- package/esm/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/parse/v3-0/schema/toSchemasV3.js +8 -0
- package/esm/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
- package/esm/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
- package/esm/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
- package/esm/parse/v3-1/_merge-all-of/merge-union.js +0 -8
- package/esm/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/parse/v3-1/schema/toSchemasV3.js +8 -0
- package/esm/types/Settings.d.ts +16 -3
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +19 -13
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +3 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +45 -32
- package/script/context/ParseContext.d.ts +16 -0
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +16 -0
- package/script/dsl/model/ModelDriver.d.ts.map +1 -1
- package/script/dsl/model/ModelDriver.js +29 -0
- package/script/dsl/model/toModelEntry.d.ts +9 -3
- package/script/dsl/model/toModelEntry.d.ts.map +1 -1
- package/script/dsl/model/toModelEntry.js +65 -1
- package/script/dsl/model/toModelProjectionBase.d.ts +16 -3
- package/script/dsl/model/toModelProjectionBase.d.ts.map +1 -1
- package/script/dsl/model/toModelProjectionBase.js +3 -3
- package/script/dsl/model/types.d.ts +46 -0
- package/script/dsl/model/types.d.ts.map +1 -1
- package/script/dsl/operation/gql/types.d.ts +6 -1
- package/script/dsl/operation/gql/types.d.ts.map +1 -1
- package/script/dsl/operation/oas/types.d.ts +6 -1
- package/script/dsl/operation/oas/types.d.ts.map +1 -1
- package/script/enrichments/validateConfig.d.ts +60 -0
- package/script/enrichments/validateConfig.d.ts.map +1 -0
- package/script/enrichments/validateConfig.js +213 -0
- package/script/mod.d.ts +1 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -0
- package/script/parse/v3-0/_merge-all-of/decompose-union.d.ts.map +1 -1
- package/script/parse/v3-0/_merge-all-of/decompose-union.js +8 -12
- package/script/parse/v3-0/_merge-all-of/merge-union.d.ts.map +1 -1
- package/script/parse/v3-0/_merge-all-of/merge-union.js +0 -8
- package/script/parse/v3-0/schema/toSchemasV3.d.ts.map +1 -1
- package/script/parse/v3-0/schema/toSchemasV3.js +8 -0
- package/script/parse/v3-1/_merge-all-of/decompose-union.d.ts.map +1 -1
- package/script/parse/v3-1/_merge-all-of/decompose-union.js +8 -12
- package/script/parse/v3-1/_merge-all-of/merge-union.d.ts.map +1 -1
- package/script/parse/v3-1/_merge-all-of/merge-union.js +0 -8
- package/script/parse/v3-1/schema/toSchemasV3.d.ts.map +1 -1
- package/script/parse/v3-1/schema/toSchemasV3.js +8 -0
- package/script/types/Settings.d.ts +16 -3
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +16 -10
|
@@ -46,14 +46,6 @@ const mergeCrossProduct = ({ first, second, getRef, groupType }) => {
|
|
|
46
46
|
}
|
|
47
47
|
})
|
|
48
48
|
.filter(item => item !== undefined);
|
|
49
|
-
// Defensive floor: when both groups are non-empty the cross product is
|
|
50
|
-
// non-empty, so an empty `mergedGroup` means every merge *failed* (an
|
|
51
|
-
// unmergeable constraint in `secondGroup`). Keep the un-merged `firstGroup`
|
|
52
|
-
// rather than collapsing to an empty union. A genuinely empty input union
|
|
53
|
-
// (`anyOf: []` → empty group) is left empty so `toSchemasV3` still throws.
|
|
54
|
-
if (mergedGroup.length === 0 && firstGroup.length > 0 && secondGroup.length > 0) {
|
|
55
|
-
return { [groupType]: firstGroup };
|
|
56
|
-
}
|
|
57
49
|
return {
|
|
58
50
|
[groupType]: mergedGroup.flatMap(item => {
|
|
59
51
|
if (!(0, refFns_js_1.isRef)(item) && Array.isArray(item[groupType])) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../../src/parse/v3-1/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EA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M,CAAC,QAAQ,CA6Q9C,CAAA;AA+CD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAIhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
|
|
@@ -244,6 +244,14 @@ const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
|
244
244
|
if ((0, refFns_js_1.isRef)(schema)) {
|
|
245
245
|
return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', stackTrail, context });
|
|
246
246
|
}
|
|
247
|
+
// OpenAPI `not` has no faithful TypeScript representation: a generated type
|
|
248
|
+
// that ignored it would *widen* the contract (accepting shapes the schema
|
|
249
|
+
// forbids). Refuse the schema rather than emit a type that lies. The throw
|
|
250
|
+
// is isolated by `tryParseAt` into an `INVALID_SCHEMA` issue, and consumers
|
|
251
|
+
// of this schema are pruned via `removeErroredItems` (INVALID_DEPENDENCY_REF).
|
|
252
|
+
if ('not' in schema) {
|
|
253
|
+
throw new Error('Schema uses unsupported "not" keyword');
|
|
254
|
+
}
|
|
247
255
|
const normalized = normalizeSchemaShape(schema);
|
|
248
256
|
if (normalized !== schema) {
|
|
249
257
|
return (0, exports.toSchemaV3)({ schema: normalized, stackTrail, context });
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
* @module Settings
|
|
50
50
|
*/
|
|
51
51
|
import "../_dnt.polyfills.js";
|
|
52
|
-
import { type GeneratorEnrichments } from
|
|
53
|
-
import * as v from
|
|
54
|
-
import { type Method } from
|
|
52
|
+
import { type GeneratorEnrichments } from "./Enrichments.js";
|
|
53
|
+
import * as v from "valibot";
|
|
54
|
+
import { type Method } from "./Method.js";
|
|
55
55
|
/**
|
|
56
56
|
* Valibot schema for {@link ModulePackage}.
|
|
57
57
|
*
|
|
@@ -430,6 +430,13 @@ export type ClientSettings = {
|
|
|
430
430
|
* in v1. See {@link AnchorsSettings}.
|
|
431
431
|
*/
|
|
432
432
|
anchors?: AnchorsSettings;
|
|
433
|
+
/**
|
|
434
|
+
* Preview input-matcher discovery directories (project-root relative, e.g.
|
|
435
|
+
* `src/fields`, `src/inputs`). A preview/hub concern: the generation engine
|
|
436
|
+
* ignores it. Declared here so the CLI preserves it when reading `client.json`
|
|
437
|
+
* and carries it through `skmtc push` to the hub.
|
|
438
|
+
*/
|
|
439
|
+
inputDirs?: string[];
|
|
433
440
|
};
|
|
434
441
|
/**
|
|
435
442
|
* Configuration for SKMTC client with optional project identification.
|
|
@@ -442,6 +449,12 @@ export type SkmtcClientConfig = {
|
|
|
442
449
|
serverUrl?: string;
|
|
443
450
|
/** Optional project identifier for organizational contexts */
|
|
444
451
|
projectKey?: string;
|
|
452
|
+
/**
|
|
453
|
+
* skmtc-hub push destination in `@<account>/<slug>` form (the account may be
|
|
454
|
+
* a user or an org) — the `skmtc push` target, analogous to a git remote.
|
|
455
|
+
* Ignored by `skmtc generate`; consumed only by `skmtc push`.
|
|
456
|
+
*/
|
|
457
|
+
project?: string;
|
|
445
458
|
/** Optional schema path or url for OpenAPI schema */
|
|
446
459
|
source?: string;
|
|
447
460
|
/** Client settings for customizing generation behavior */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,
|
|
1
|
+
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,kDAAkD;IAClD,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAM/D,CAAC"}
|
package/script/types/Settings.js
CHANGED
|
@@ -93,7 +93,7 @@ const Method_js_1 = require("./Method.js");
|
|
|
93
93
|
* `..` is a parent reference only as a whole path segment — a
|
|
94
94
|
* directory name that merely contains dots is not flagged.
|
|
95
95
|
*/
|
|
96
|
-
const hasParentSegment = (path) => path.split(/[/\\]/).some(segment => segment ===
|
|
96
|
+
const hasParentSegment = (path) => path.split(/[/\\]/).some((segment) => segment === "..");
|
|
97
97
|
/**
|
|
98
98
|
* Valibot schema for {@link ModulePackage}.
|
|
99
99
|
*
|
|
@@ -103,10 +103,10 @@ const hasParentSegment = (path) => path.split(/[/\\]/).some(segment => segment =
|
|
|
103
103
|
* that otherwise misplaces every artifact silently.
|
|
104
104
|
*/
|
|
105
105
|
exports.modulePackage = v.object({
|
|
106
|
-
rootPath: v.pipe(v.string(), v.check(rootPath => !hasParentSegment(rootPath), 'package rootPath must be a forward path with no ".." segments — ' +
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
moduleName: v.optional(v.string())
|
|
106
|
+
rootPath: v.pipe(v.string(), v.check((rootPath) => !hasParentSegment(rootPath), 'package rootPath must be a forward path with no ".." segments — ' +
|
|
107
|
+
"set client.json basePath to a common ancestor of every package " +
|
|
108
|
+
"so each rootPath is written forward from it")),
|
|
109
|
+
moduleName: v.optional(v.string()),
|
|
110
110
|
});
|
|
111
111
|
/**
|
|
112
112
|
* Valibot schema for validating skip paths configuration.
|
|
@@ -136,7 +136,11 @@ exports.skipModelRefs = v.record(v.string(), v.array(v.string()));
|
|
|
136
136
|
* models and variants by generator.
|
|
137
137
|
*/
|
|
138
138
|
exports.skipModels = v.record(v.string(), exports.skipModelRefs);
|
|
139
|
-
const skip = v.union([
|
|
139
|
+
const skip = v.union([
|
|
140
|
+
exports.skipOperations,
|
|
141
|
+
exports.skipModels,
|
|
142
|
+
v.string(),
|
|
143
|
+
]);
|
|
140
144
|
/**
|
|
141
145
|
* Valibot schema for {@link IncludePaths}. Structurally identical to
|
|
142
146
|
* {@link skipPaths} — both map a path to a `method → variant[]` record
|
|
@@ -164,7 +168,7 @@ exports.includeModels = v.record(v.string(), exports.includeModelRefs);
|
|
|
164
168
|
const include = v.union([
|
|
165
169
|
exports.includeOperations,
|
|
166
170
|
exports.includeModels,
|
|
167
|
-
v.string()
|
|
171
|
+
v.string(),
|
|
168
172
|
]);
|
|
169
173
|
/**
|
|
170
174
|
* Valibot schema for validating client settings configuration.
|
|
@@ -179,7 +183,7 @@ const include = v.union([
|
|
|
179
183
|
*/
|
|
180
184
|
exports.anchorsSettings = v.object({
|
|
181
185
|
enabled: v.boolean(),
|
|
182
|
-
out: v.optional(v.string())
|
|
186
|
+
out: v.optional(v.string()),
|
|
183
187
|
});
|
|
184
188
|
exports.clientSettings = v.object({
|
|
185
189
|
basePath: v.optional(v.string()),
|
|
@@ -188,7 +192,8 @@ exports.clientSettings = v.object({
|
|
|
188
192
|
enrichments: v.optional(Enrichments_js_1.generatorEnrichments),
|
|
189
193
|
include: v.optional(v.array(include)),
|
|
190
194
|
skip: v.optional(v.array(skip)),
|
|
191
|
-
anchors: v.optional(exports.anchorsSettings)
|
|
195
|
+
anchors: v.optional(exports.anchorsSettings),
|
|
196
|
+
inputDirs: v.optional(v.array(v.string())),
|
|
192
197
|
});
|
|
193
198
|
/**
|
|
194
199
|
* Valibot schema for validating SKMTC client configuration.
|
|
@@ -199,6 +204,7 @@ exports.clientSettings = v.object({
|
|
|
199
204
|
exports.skmtcClientConfig = v.object({
|
|
200
205
|
serverUrl: v.optional(v.string()),
|
|
201
206
|
projectKey: v.optional(v.string()),
|
|
207
|
+
project: v.optional(v.string()),
|
|
202
208
|
source: v.optional(v.string()),
|
|
203
|
-
settings: exports.clientSettings
|
|
209
|
+
settings: exports.clientSettings,
|
|
204
210
|
});
|