@kubb/core 5.13.1 → 5.14.0
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/{Hookable-CNMSwKgf.js → Hookable-CvvyqvN3.js} +38 -5
- package/dist/Hookable-CvvyqvN3.js.map +1 -0
- package/dist/{createAdapter-BNUEQcw9.d.ts → createAdapter-CpL5uM0P.d.ts} +17 -2
- package/dist/index.cjs +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +1 -1
- package/package.json +2 -2
- package/dist/Hookable-CNMSwKgf.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Enforce, FileNode, HttpMethod, ImportNode, InputMeta, InputNode, Macro, Node, OperationNode, SchemaNode, UserFileNode } from "@kubb/ast";
|
|
1
|
+
import { Enforce, FileNode, HttpMethod, ImportNode, InlineLanguage, InputMeta, InputNode, Macro, Node, OperationNode, SchemaNode, UserFileNode } from "@kubb/ast";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import net from "node:net";
|
|
4
4
|
//#region ../../internals/utils/src/promise.d.ts
|
|
@@ -61,6 +61,10 @@ type Parser<TMeta extends object = object, TNode = unknown, TOptions extends obj
|
|
|
61
61
|
* back to the parser as `FileNode.sources`.
|
|
62
62
|
*/
|
|
63
63
|
print(...nodes: Array<TNode>): string;
|
|
64
|
+
/**
|
|
65
|
+
* How this language finds and replaces names so its files can absorb inline sources. Omit it when there is no support.
|
|
66
|
+
*/
|
|
67
|
+
inline?: InlineLanguage;
|
|
64
68
|
};
|
|
65
69
|
/**
|
|
66
70
|
* Takes the user's options and returns the parser methods.
|
|
@@ -278,6 +282,12 @@ declare const diagnosticCatalog: {
|
|
|
278
282
|
readonly cause: 'Two generated modules export the same name, so the barrel cannot re-export both.';
|
|
279
283
|
readonly fix: 'Rename one of the colliding declarations, or configure the plugin resolver to produce distinct names.';
|
|
280
284
|
};
|
|
285
|
+
readonly inlineFailed: {
|
|
286
|
+
readonly code: 'KUBB_INLINE_FAILED';
|
|
287
|
+
readonly title: 'Inline definition failed';
|
|
288
|
+
readonly cause: 'A file imports a name from a file whose sources are all inline, and that name could not be inlined.';
|
|
289
|
+
readonly fix: 'Give every name the file imports an inline definition, register a parser with inline support for its extension, or stop marking the source as inline.';
|
|
290
|
+
};
|
|
281
291
|
readonly internalError: {
|
|
282
292
|
readonly code: 'KUBB_INTERNAL_ERROR';
|
|
283
293
|
readonly title: 'Internal error';
|
|
@@ -856,6 +866,10 @@ declare class FileManager {
|
|
|
856
866
|
*/
|
|
857
867
|
pointer?: string;
|
|
858
868
|
}): Promise<void>;
|
|
869
|
+
/**
|
|
870
|
+
* Removes the files at `paths`, so they are neither listed nor written.
|
|
871
|
+
*/
|
|
872
|
+
delete(...paths: Array<string>): void;
|
|
859
873
|
/**
|
|
860
874
|
* Releases all stored files. Called by the core after `kubb:build:end`.
|
|
861
875
|
*/
|
|
@@ -1864,6 +1878,7 @@ export declare class Diagnostics {
|
|
|
1864
1878
|
readonly formatFailed: "KUBB_FORMAT_FAILED";
|
|
1865
1879
|
readonly lintFailed: "KUBB_LINT_FAILED";
|
|
1866
1880
|
readonly barrelDuplicateExport: "KUBB_BARREL_DUPLICATE_EXPORT";
|
|
1881
|
+
readonly inlineFailed: "KUBB_INLINE_FAILED";
|
|
1867
1882
|
readonly internalError: "KUBB_INTERNAL_ERROR";
|
|
1868
1883
|
readonly performance: "KUBB_PERFORMANCE";
|
|
1869
1884
|
readonly updateAvailable: "KUBB_UPDATE_AVAILABLE";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as NodeCache, $t as ReporterContext, A as PluginFactory, At as KubbInfoContext, B as ResolveImportsOptions, Bt as RunHookOptions, C as NormalizedPlugin, Ct as KubbGenerationEndContext, D as Override, Dt as KubbHookLineContext, E as OutputOptions, Et as KubbHookEndContext, F as definePlugin, Ft as KubbWarnContext, G as ResolverFile, Gt as createOutputManifest, H as ResolvePathOptions, Ht as KubbDriver, I as BannerMeta, It as PossibleConfig, J as ResolverPatch, Jt as createRenderer, K as ResolverFileParams, Kt as Renderer, L as ResolveBannerContext, Lt as PostGenerateCommand, M as PluginType, Mt as KubbMessageContext, N as ResolvePluginOptions, Nt as KubbPluginsEndContext, O as Plugin, Ot as KubbHookStartContext, P as assertPluginOption, Pt as KubbSuccessContext, Q as defineGenerator, Qt as Reporter, R as ResolveBannerFile, Rt as UserConfig, S as KubbPluginStartContext, St as KubbFilesProcessingUpdateContext, T as OutputMode, Tt as KubbGenerationSummaryContext, U as Resolver, Ut as Hookable, V as ResolveOptionsContext, Vt as runHook, W as ResolverDefault, Wt as OutputManifest, X as Generator, Xt as createStorage, Y as ResolverPathParams, Yt as Storage, Z as GeneratorContext, Zt as GenerationResult, _ as Filter, _t as KubbDiagnosticContext, a as AdapterSource, an as DiagnosticFormatOptions, at as Diagnostics, b as KubbPluginEndContext, bt as KubbFilesProcessingEndContext, c as ExtensionDependency, cn as ParserDefinition, ct as ProblemDiagnostic, d as ExtensionKind, dt as CLIOptions, en as ReporterName, et as Diagnostic, f as ExtensionMeta, ft as Config, g as Exclude, gt as KubbBuildStartContext, h as resolveMeta, ht as KubbBuildEndContext, i as AdapterFactoryOptions, in as logLevel, it as DiagnosticSeverity, j as PluginName, jt as KubbLifecycleStartContext, k as PluginDefinition, kt as KubbHooks, l as ExtensionDependencyRecord, ln as ParserFactory, lt as UpdateDiagnostic, m as defineExtension, mt as Input, n as AdapterDefinition, nn as UserReporter, nt as DiagnosticKind, o as createAdapter, on as SerializedDiagnostic, ot as PerformanceDiagnostic, p as checkCompatibility, pt as FilesContext, q as ResolverFilePathParams, qt as RendererFactory, r as AdapterFactory, rn as createReporter, rt as DiagnosticLocation, s as ExtensionDependencies, sn as Parser, st as ProblemCode, t as Adapter, tn as ReporterPluginFiles, tt as DiagnosticDoc, u as ExtensionFactory, un as defineParser, ut as BuildOutput, v as Group, vt as KubbErrorContext, w as Output, wt as KubbGenerationStartContext, x as KubbPluginSetupContext, xt as KubbFilesProcessingStartContext, y as Include, yt as KubbFileProcessingUpdate, z as ResolveFileOptions, zt as HookResult } from "./createAdapter-
|
|
1
|
+
import { $ as NodeCache, $t as ReporterContext, A as PluginFactory, At as KubbInfoContext, B as ResolveImportsOptions, Bt as RunHookOptions, C as NormalizedPlugin, Ct as KubbGenerationEndContext, D as Override, Dt as KubbHookLineContext, E as OutputOptions, Et as KubbHookEndContext, F as definePlugin, Ft as KubbWarnContext, G as ResolverFile, Gt as createOutputManifest, H as ResolvePathOptions, Ht as KubbDriver, I as BannerMeta, It as PossibleConfig, J as ResolverPatch, Jt as createRenderer, K as ResolverFileParams, Kt as Renderer, L as ResolveBannerContext, Lt as PostGenerateCommand, M as PluginType, Mt as KubbMessageContext, N as ResolvePluginOptions, Nt as KubbPluginsEndContext, O as Plugin, Ot as KubbHookStartContext, P as assertPluginOption, Pt as KubbSuccessContext, Q as defineGenerator, Qt as Reporter, R as ResolveBannerFile, Rt as UserConfig, S as KubbPluginStartContext, St as KubbFilesProcessingUpdateContext, T as OutputMode, Tt as KubbGenerationSummaryContext, U as Resolver, Ut as Hookable, V as ResolveOptionsContext, Vt as runHook, W as ResolverDefault, Wt as OutputManifest, X as Generator, Xt as createStorage, Y as ResolverPathParams, Yt as Storage, Z as GeneratorContext, Zt as GenerationResult, _ as Filter, _t as KubbDiagnosticContext, a as AdapterSource, an as DiagnosticFormatOptions, at as Diagnostics, b as KubbPluginEndContext, bt as KubbFilesProcessingEndContext, c as ExtensionDependency, cn as ParserDefinition, ct as ProblemDiagnostic, d as ExtensionKind, dt as CLIOptions, en as ReporterName, et as Diagnostic, f as ExtensionMeta, ft as Config, g as Exclude, gt as KubbBuildStartContext, h as resolveMeta, ht as KubbBuildEndContext, i as AdapterFactoryOptions, in as logLevel, it as DiagnosticSeverity, j as PluginName, jt as KubbLifecycleStartContext, k as PluginDefinition, kt as KubbHooks, l as ExtensionDependencyRecord, ln as ParserFactory, lt as UpdateDiagnostic, m as defineExtension, mt as Input, n as AdapterDefinition, nn as UserReporter, nt as DiagnosticKind, o as createAdapter, on as SerializedDiagnostic, ot as PerformanceDiagnostic, p as checkCompatibility, pt as FilesContext, q as ResolverFilePathParams, qt as RendererFactory, r as AdapterFactory, rn as createReporter, rt as DiagnosticLocation, s as ExtensionDependencies, sn as Parser, st as ProblemCode, t as Adapter, tn as ReporterPluginFiles, tt as DiagnosticDoc, u as ExtensionFactory, un as defineParser, ut as BuildOutput, v as Group, vt as KubbErrorContext, w as Output, wt as KubbGenerationStartContext, x as KubbPluginSetupContext, xt as KubbFilesProcessingStartContext, y as Include, yt as KubbFileProcessingUpdate, z as ResolveFileOptions, zt as HookResult } from "./createAdapter-CpL5uM0P.js";
|
|
2
2
|
import { FileNode, Macro, UserFileNode } from "@kubb/ast";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import net from "node:net";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as formatMs, B as writeRaw, C as useConfig, D as defineExtension, E as checkCompatibility, F as isPathInside, I as listFiles, L as read, M as inParallel, N as exists, O as resolveMeta, P as existsSync$1, R as rm$1, S as tryUseKubb, T as useOptions, V as toError, _ as kubbContext, b as setOptions, c as Resolver, d as isPublicAddress, f as assertPluginOption, g as injectFile, h as addMacro, j as getElapsedMs, k as Diagnostics, l as getInputKind, m as addGenerator, n as KubbDriver, o as _usingCtx, p as definePlugin, s as createResolver, t as Hookable, u as checkoutGitInput, v as requirePlugin, w as useKubb, x as setResolver, y as setMacros, z as write } from "./Hookable-
|
|
1
|
+
import { A as formatMs, B as writeRaw, C as useConfig, D as defineExtension, E as checkCompatibility, F as isPathInside, I as listFiles, L as read, M as inParallel, N as exists, O as resolveMeta, P as existsSync$1, R as rm$1, S as tryUseKubb, T as useOptions, V as toError, _ as kubbContext, b as setOptions, c as Resolver, d as isPublicAddress, f as assertPluginOption, g as injectFile, h as addMacro, j as getElapsedMs, k as Diagnostics, l as getInputKind, m as addGenerator, n as KubbDriver, o as _usingCtx, p as definePlugin, s as createResolver, t as Hookable, u as checkoutGitInput, v as requirePlugin, w as useKubb, x as setResolver, y as setMacros, z as write } from "./Hookable-CvvyqvN3.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { isValid } from "verkit";
|
|
4
4
|
import process$1 from "node:process";
|