@kubb/core
Advanced tools
Comparing version 3.0.0-alpha.19 to 3.0.0-alpha.20
@@ -1,3 +0,3 @@ | ||
import { P as PluginContext, F as FileManager, a as PluginManager, U as UserConfig, C as Config, I as InputPath, b as PluginFactoryOptions, c as UserPluginWithLifeCycle } from './FileManager-B4cpHcmd.js'; | ||
export { d as FileMetaBase, G as GetPluginFactoryOptions, e as InputData, O as Output, i as Plugin, n as PluginCache, f as PluginKey, k as PluginLifecycle, l as PluginLifecycleHooks, m as PluginParameter, j as PluginWithLifeCycle, o as ResolveNameParams, R as ResolvePathParams, h as UserPlugin, g as getSource } from './FileManager-B4cpHcmd.js'; | ||
import { P as PluginContext, F as FileManager, a as PluginManager, U as UserConfig, C as Config, I as InputPath, b as PluginFactoryOptions, c as UserPluginWithLifeCycle } from './FileManager-DQtWE_rp.js'; | ||
export { d as FileMetaBase, G as GetPluginFactoryOptions, e as InputData, O as Output, i as Plugin, n as PluginCache, f as PluginKey, k as PluginLifecycle, l as PluginLifecycleHooks, m as PluginParameter, j as PluginWithLifeCycle, o as ResolveNameParams, R as ResolvePathParams, h as UserPlugin, g as getSource } from './FileManager-DQtWE_rp.js'; | ||
import { L as Logger } from './logger-DvbHXjIO.js'; | ||
@@ -4,0 +4,0 @@ import { PossiblePromise } from '@kubb/types'; |
@@ -629,3 +629,3 @@ import { transformReservedWord } from './chunk-2EU7DMPM.js'; | ||
function isInputPath(result) { | ||
return !!result && "path" in result; | ||
return !!result && "path" in result?.input; | ||
} | ||
@@ -695,10 +695,11 @@ async function setup(options) { | ||
}); | ||
if (plugin?.output?.exportType === false) { | ||
const options2 = plugin?.options ?? {}; | ||
if (options2.output?.exportType === false) { | ||
return void 0; | ||
} | ||
if (FileManager.getMode(plugin?.output?.path) === "single") { | ||
if (FileManager.getMode(options2.output?.path) === "single") { | ||
return void 0; | ||
} | ||
return { | ||
name: options.config.output.exportType === "barrel" ? void 0 : [source.name], | ||
name: options2.output?.exportType === "barrel" ? void 0 : [source.name], | ||
path: getRelativePath(rootPath, file.path), | ||
@@ -705,0 +706,0 @@ isTypeOnly: source.isTypeOnly |
import { ResolvedFile, File } from '@kubb/fs/types'; | ||
import { a as PluginManager } from './FileManager-B4cpHcmd.js'; | ||
import { a as PluginManager } from './FileManager-DQtWE_rp.js'; | ||
import { L as Logger } from './logger-DvbHXjIO.js'; | ||
@@ -4,0 +4,0 @@ import '@kubb/fs'; |
{ | ||
"name": "@kubb/core", | ||
"version": "3.0.0-alpha.19", | ||
"version": "3.0.0-alpha.20", | ||
"description": "Generator core", | ||
@@ -86,5 +86,5 @@ "keywords": [ | ||
"semver": "^7.6.3", | ||
"@kubb/fs": "3.0.0-alpha.19", | ||
"@kubb/parser-ts": "3.0.0-alpha.19", | ||
"@kubb/types": "3.0.0-alpha.19" | ||
"@kubb/fs": "3.0.0-alpha.20", | ||
"@kubb/parser-ts": "3.0.0-alpha.20", | ||
"@kubb/types": "3.0.0-alpha.20" | ||
}, | ||
@@ -100,4 +100,4 @@ "devDependencies": { | ||
"typescript": "^5.6.2", | ||
"@kubb/config-ts": "3.0.0-alpha.19", | ||
"@kubb/config-tsup": "3.0.0-alpha.19" | ||
"@kubb/config-ts": "3.0.0-alpha.20", | ||
"@kubb/config-tsup": "3.0.0-alpha.20" | ||
}, | ||
@@ -104,0 +104,0 @@ "engines": { |
@@ -12,3 +12,3 @@ import { clean, read } from '@kubb/fs' | ||
import type { Logger } from './logger.ts' | ||
import type { PluginContext } from './types.ts' | ||
import type { Output, PluginContext } from './types.ts' | ||
@@ -112,12 +112,13 @@ type BuildOptions = { | ||
}) | ||
const options = (plugin?.options as { output?: Output }) ?? {} | ||
if (plugin?.output?.exportType === false) { | ||
if (options.output?.exportType === false) { | ||
return undefined | ||
} | ||
if (FileManager.getMode(plugin?.output?.path) === 'single') { | ||
if (FileManager.getMode(options.output?.path) === 'single') { | ||
return undefined | ||
} | ||
return { | ||
name: options.config.output.exportType === 'barrel' ? undefined : [source.name], | ||
name: options.output?.exportType === 'barrel' ? undefined : [source.name], | ||
path: getRelativePath(rootPath, file.path), | ||
@@ -124,0 +125,0 @@ isTypeOnly: source.isTypeOnly, |
@@ -48,3 +48,3 @@ import type { PossiblePromise } from '@kubb/types' | ||
export function isInputPath(result: Config | undefined): result is Config<InputPath> { | ||
return !!result && 'path' in (result as any) | ||
return !!result && 'path' in (result?.input as any) | ||
} |
@@ -147,3 +147,2 @@ import type * as KubbFile from '@kubb/fs/types' | ||
name: TOptions['name'] | ||
output?: Output | ||
/** | ||
@@ -185,3 +184,2 @@ * Options set for a specific plugin(see kubb.config.js), passthrough of options. | ||
key: TOptions['key'] | ||
output?: Output | ||
/** | ||
@@ -188,0 +186,0 @@ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1473620
14503
+ Added@kubb/fs@3.0.0-alpha.20(transitive)
+ Added@kubb/parser-ts@3.0.0-alpha.20(transitive)
+ Added@kubb/types@3.0.0-alpha.20(transitive)
- Removed@kubb/fs@3.0.0-alpha.19(transitive)
- Removed@kubb/parser-ts@3.0.0-alpha.19(transitive)
- Removed@kubb/types@3.0.0-alpha.19(transitive)
Updated@kubb/fs@3.0.0-alpha.20
Updated@kubb/types@3.0.0-alpha.20