@kubb/core 5.0.0-beta.56 → 5.0.0-beta.57
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/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/defineResolver.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { stripVTControlCharacters, styleText } from "node:util";
|
|
|
5
5
|
import { access, glob, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
6
|
import path, { dirname, join, relative, resolve } from "node:path";
|
|
7
7
|
import * as ast from "@kubb/ast";
|
|
8
|
-
import { collectUsedSchemaNames, createFile, createStreamInput,
|
|
8
|
+
import { collectUsedSchemaNames, createFile, createStreamInput, operationDef, schemaDef, transform } from "@kubb/ast";
|
|
9
9
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
10
|
import process$1 from "node:process";
|
|
11
11
|
//#region ../../internals/utils/src/time.ts
|
|
@@ -607,7 +607,7 @@ function createAdapter(build) {
|
|
|
607
607
|
/**
|
|
608
608
|
* Docs major, derived from the package version so the link tracks the published major.
|
|
609
609
|
*/
|
|
610
|
-
const docsMajor = "5.0.0-beta.
|
|
610
|
+
const docsMajor = "5.0.0-beta.57".split(".")[0] ?? "5";
|
|
611
611
|
/**
|
|
612
612
|
* Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
|
|
613
613
|
*
|
|
@@ -1168,7 +1168,7 @@ function defaultResolver(name, type) {
|
|
|
1168
1168
|
*/
|
|
1169
1169
|
const resolveOptionsCache = /* @__PURE__ */ new WeakMap();
|
|
1170
1170
|
function computeOptions(node, options, exclude, include, override) {
|
|
1171
|
-
if (
|
|
1171
|
+
if (operationDef.is(node)) {
|
|
1172
1172
|
if (exclude.some(({ type, pattern }) => matchesOperationPattern(node, type, pattern))) return null;
|
|
1173
1173
|
if (include && !include.some(({ type, pattern }) => matchesOperationPattern(node, type, pattern))) return null;
|
|
1174
1174
|
const overrideOptions = override.find(({ type, pattern }) => matchesOperationPattern(node, type, pattern))?.options;
|
|
@@ -1177,7 +1177,7 @@ function computeOptions(node, options, exclude, include, override) {
|
|
|
1177
1177
|
...overrideOptions
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
|
-
if (
|
|
1180
|
+
if (schemaDef.is(node)) {
|
|
1181
1181
|
if (exclude.some(({ type, pattern }) => matchesSchemaPattern(node, type, pattern) === true)) return null;
|
|
1182
1182
|
if (include) {
|
|
1183
1183
|
const applicable = include.map(({ type, pattern }) => matchesSchemaPattern(node, type, pattern)).filter((result) => result !== null);
|