@kubb/core 5.0.0-beta.55 → 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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +100 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/defineResolver.ts +3 -3
- package/src/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.57",
|
|
4
4
|
"description": "Core engine for Kubb's plugin-based code generation system. Provides the plugin driver, file manager, defineConfig, and build orchestration used by every Kubb plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-generator",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"registry": "https://registry.npmjs.org/"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@kubb/ast": "5.0.0-beta.
|
|
59
|
+
"@kubb/ast": "5.0.0-beta.57"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@internals/utils": "0.0.0",
|
|
63
|
-
"@kubb/renderer-jsx": "5.0.0-beta.
|
|
63
|
+
"@kubb/renderer-jsx": "5.0.0-beta.57"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@kubb/renderer-jsx": "5.0.0-beta.
|
|
66
|
+
"@kubb/renderer-jsx": "5.0.0-beta.57"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=22"
|
package/src/defineResolver.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
2
|
import { camelCase, pascalCase, toFilePath } from '@internals/utils'
|
|
3
3
|
import type { FileNode, InputMeta, Node, OperationNode, SchemaNode } from '@kubb/ast'
|
|
4
|
-
import { createFile,
|
|
4
|
+
import { createFile, operationDef, schemaDef } from '@kubb/ast'
|
|
5
5
|
import { Diagnostics } from './diagnostics.ts'
|
|
6
6
|
import type { PluginFactoryOptions } from './definePlugin.ts'
|
|
7
7
|
import type { Config, Group, Output } from './types.ts'
|
|
@@ -331,7 +331,7 @@ function computeOptions<TOptions>(
|
|
|
331
331
|
include: Array<PatternFilter> | undefined,
|
|
332
332
|
override: Array<PatternOverride<TOptions>>,
|
|
333
333
|
): TOptions | null {
|
|
334
|
-
if (
|
|
334
|
+
if (operationDef.is(node)) {
|
|
335
335
|
if (exclude.some(({ type, pattern }) => matchesOperationPattern(node, type, pattern))) return null
|
|
336
336
|
if (include && !include.some(({ type, pattern }) => matchesOperationPattern(node, type, pattern))) return null
|
|
337
337
|
|
|
@@ -340,7 +340,7 @@ function computeOptions<TOptions>(
|
|
|
340
340
|
return { ...options, ...overrideOptions }
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
if (
|
|
343
|
+
if (schemaDef.is(node)) {
|
|
344
344
|
if (exclude.some(({ type, pattern }) => matchesSchemaPattern(node, type, pattern) === true)) return null
|
|
345
345
|
if (include) {
|
|
346
346
|
const results = include.map(({ type, pattern }) => matchesSchemaPattern(node, type, pattern))
|
package/src/index.ts
CHANGED