@kubb/core 5.0.0-beta.85 → 5.0.0-beta.86
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/{Diagnostics-PnPLU3kj.d.ts → Diagnostics-aWJg-H2d.d.ts} +90 -98
- package/dist/index.cjs +170 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +36 -3
- package/dist/index.js +170 -198
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +1 -1
- package/dist/{usingCtx-fxRpJw0P.cjs → usingCtx-BN2OKJRx.cjs} +72 -48
- package/dist/usingCtx-BN2OKJRx.cjs.map +1 -0
- package/dist/{usingCtx-BABTfo1g.js → usingCtx-Cnrm3TcM.js} +61 -43
- package/dist/usingCtx-Cnrm3TcM.js.map +1 -0
- package/package.json +2 -2
- package/dist/usingCtx-BABTfo1g.js.map +0 -1
- package/dist/usingCtx-fxRpJw0P.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as Include, A as KubbHookStartContext, At as
|
|
2
|
+
import { $ as Include, A as KubbHookStartContext, At as UserReporter, B as Kubb, C as KubbFilesProcessingEndContext, Ct as createRenderer, D as KubbGenerationStartContext, Dt as Reporter, E as KubbGenerationEndContext, Et as GenerationResult, F as KubbSuccessContext, Ft as AdapterSource, G as KubbDriver, H as Generator, I as KubbWarnContext, It as createAdapter, J as Parser, K as FileManagerHooks, L as PossibleConfig, M as KubbInfoContext, Mt as logLevel, N as KubbLifecycleStartContext, Nt as Adapter, O as KubbHookEndContext, Ot as ReporterContext, P as KubbPluginsEndContext, Pt as AdapterFactoryOptions, Q as Group, R as UserConfig, S as KubbFileProcessingUpdate, St as RendererFactory, T as KubbFilesProcessingUpdateContext, Tt as createStorage, U as GeneratorContext, V as createKubb, W as defineGenerator, X as Exclude, Y as defineParser, Z as Filter, _ as InputPath, _t as ResolverDefault, a as DiagnosticLocation, at as OutputMode, b as KubbDiagnosticContext, bt as ResolverPathParams, c as PerformanceDiagnostic, ct as Plugin, d as SerializedDiagnostic, dt as BannerMeta, et as KubbPluginEndContext, f as UpdateDiagnostic, ft as ResolveBannerContext, g as InputData, gt as ResolverContext, h as Config, ht as Resolver, i as DiagnosticKind, it as Output, j as KubbHooks, jt as createReporter, k as KubbHookLineContext, kt as ReporterName, l as ProblemCode, lt as PluginFactoryOptions, m as CLIOptions, mt as ResolveOptionsContext, n as DiagnosticByCode, nt as KubbPluginStartContext, o as DiagnosticSeverity, ot as OutputOptions, p as BuildOutput, pt as ResolveBannerFile, q as Hookable, r as DiagnosticDoc, rt as NormalizedPlugin, s as Diagnostics, st as Override, t as Diagnostic, tt as KubbPluginSetupContext, u as ProblemDiagnostic, ut as definePlugin, v as KubbBuildEndContext, vt as ResolverFileParams, w as KubbFilesProcessingStartContext, wt as Storage, x as KubbErrorContext, xt as Renderer, y as KubbBuildStartContext, yt as ResolverPatch, z as CreateKubbOptions } from "./Diagnostics-aWJg-H2d.js";
|
|
3
3
|
|
|
4
4
|
//#region src/reporters/cliReporter.d.ts
|
|
5
5
|
/**
|
|
@@ -16,7 +16,7 @@ declare const cliReporter: Reporter;
|
|
|
16
16
|
* `## Timings` section. Selected with `--reporter file` (or `reporters: ['file']`).
|
|
17
17
|
*
|
|
18
18
|
* @note It captures the collected diagnostics once a config finishes, not the live
|
|
19
|
-
* `kubb:info`/`kubb:plugin`
|
|
19
|
+
* `kubb:info`/`kubb:plugin` hook stream. Color is stripped so the file stays plain text even when
|
|
20
20
|
* the run is attached to a TTY.
|
|
21
21
|
*/
|
|
22
22
|
declare const fileReporter: Reporter;
|
|
@@ -31,6 +31,39 @@ declare const fileReporter: Reporter;
|
|
|
31
31
|
*/
|
|
32
32
|
declare const jsonReporter: Reporter;
|
|
33
33
|
//#endregion
|
|
34
|
+
//#region src/createResolver.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* The plugin-specific resolver fields handed to `createResolver`. `name` and `file` fall
|
|
37
|
+
* back to the built-ins when omitted. Every method reaches sibling helpers through `this`,
|
|
38
|
+
* which `ThisType` types as the full resolver.
|
|
39
|
+
*/
|
|
40
|
+
type ResolverOptions<T extends PluginFactoryOptions> = Omit<T['resolver'], keyof Resolver> & {
|
|
41
|
+
pluginName: T['name'];
|
|
42
|
+
name?: T['resolver']['name'];
|
|
43
|
+
file?: T['resolver']['file'];
|
|
44
|
+
} & ThisType<T['resolver']>;
|
|
45
|
+
/**
|
|
46
|
+
* Defines a plugin resolver, the object that decides what every generated symbol and file
|
|
47
|
+
* path is called. Override the top-level `name` and `file` to set the plugin's conventions,
|
|
48
|
+
* and add your own naming helpers, top-level (`typeName`, …) or grouped in namespaces
|
|
49
|
+
* (`query`, `schema`, …). Every method reaches sibling helpers and the built-in machinery
|
|
50
|
+
* through `this.name`, `this.file`, and `this.default`.
|
|
51
|
+
*
|
|
52
|
+
* @example Custom identifier and file casing
|
|
53
|
+
* ```ts
|
|
54
|
+
* export const resolverTs = createResolver<PluginTs>({
|
|
55
|
+
* pluginName: 'plugin-ts',
|
|
56
|
+
* name(name) {
|
|
57
|
+
* return ensureValidVarName(pascalCase(name))
|
|
58
|
+
* },
|
|
59
|
+
* file(params, context) {
|
|
60
|
+
* return this.default.file({ ...params, resolveName: (name) => toFilePath(name, pascalCase) }, context)
|
|
61
|
+
* },
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare function createResolver<T extends PluginFactoryOptions>(options: ResolverOptions<T>): T['resolver'];
|
|
66
|
+
//#endregion
|
|
34
67
|
//#region src/storages/fsStorage.d.ts
|
|
35
68
|
/**
|
|
36
69
|
* Built-in filesystem storage driver.
|
|
@@ -83,5 +116,5 @@ declare const fsStorage: (options?: Record<string, never> | undefined) => Storag
|
|
|
83
116
|
*/
|
|
84
117
|
declare const memoryStorage: (options?: Record<string, never> | undefined) => Storage;
|
|
85
118
|
//#endregion
|
|
86
|
-
export { type Adapter, type AdapterFactoryOptions, type AdapterSource,
|
|
119
|
+
export { type Adapter, type AdapterFactoryOptions, type AdapterSource, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticByCode, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileManagerHooks, type Filter, type GenerationResult, type Generator, type GeneratorContext, type Group, Hookable, type Include, InputData, InputPath, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type PerformanceDiagnostic, type Plugin, type PluginFactoryOptions, PossibleConfig, type ProblemCode, type ProblemDiagnostic, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ResolveBannerContext, type ResolveBannerFile, type ResolveOptionsContext, Resolver, type ResolverContext, type ResolverDefault, type ResolverFileParams, type ResolverPatch, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, UserConfig, type UserReporter, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, jsonReporter, logLevel, memoryStorage };
|
|
87
120
|
//# sourceMappingURL=index.d.ts.map
|