@kubb/core 5.13.1 → 5.14.1
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-3xDhh0Fc.js} +44 -5
- package/dist/Hookable-3xDhh0Fc.js.map +1 -0
- package/dist/{createAdapter-BNUEQcw9.d.ts → createAdapter-DwnjwKN0.d.ts} +24 -2
- package/dist/index.cjs +43 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -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.
|
|
@@ -224,6 +228,12 @@ declare const diagnosticCatalog: {
|
|
|
224
228
|
readonly cause: 'A schema uses a `format` Kubb does not map to a specific type, so it falls back to the base type.';
|
|
225
229
|
readonly fix: 'Use a format Kubb supports, or handle the custom format with a parser or plugin.';
|
|
226
230
|
};
|
|
231
|
+
readonly aliasCycle: {
|
|
232
|
+
readonly code: 'KUBB_ALIAS_CYCLE';
|
|
233
|
+
readonly title: 'Alias cycle';
|
|
234
|
+
readonly cause: 'Schemas that only `$ref` each other form a loop, so none of them has a shape to generate. Kubb resolves them to `unknown`.';
|
|
235
|
+
readonly fix: 'Break the loop by giving one of the schemas a real definition, or remove the `$ref` that closes it.';
|
|
236
|
+
};
|
|
227
237
|
readonly deprecated: {
|
|
228
238
|
readonly code: 'KUBB_DEPRECATED';
|
|
229
239
|
readonly title: 'Deprecated';
|
|
@@ -278,6 +288,12 @@ declare const diagnosticCatalog: {
|
|
|
278
288
|
readonly cause: 'Two generated modules export the same name, so the barrel cannot re-export both.';
|
|
279
289
|
readonly fix: 'Rename one of the colliding declarations, or configure the plugin resolver to produce distinct names.';
|
|
280
290
|
};
|
|
291
|
+
readonly inlineFailed: {
|
|
292
|
+
readonly code: 'KUBB_INLINE_FAILED';
|
|
293
|
+
readonly title: 'Inline definition failed';
|
|
294
|
+
readonly cause: 'A file imports a name from a file whose sources are all inline, and that name could not be inlined.';
|
|
295
|
+
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.';
|
|
296
|
+
};
|
|
281
297
|
readonly internalError: {
|
|
282
298
|
readonly code: 'KUBB_INTERNAL_ERROR';
|
|
283
299
|
readonly title: 'Internal error';
|
|
@@ -856,6 +872,10 @@ declare class FileManager {
|
|
|
856
872
|
*/
|
|
857
873
|
pointer?: string;
|
|
858
874
|
}): Promise<void>;
|
|
875
|
+
/**
|
|
876
|
+
* Removes the files at `paths`, so they are neither listed nor written.
|
|
877
|
+
*/
|
|
878
|
+
delete(...paths: Array<string>): void;
|
|
859
879
|
/**
|
|
860
880
|
* Releases all stored files. Called by the core after `kubb:build:end`.
|
|
861
881
|
*/
|
|
@@ -1855,6 +1875,7 @@ export declare class Diagnostics {
|
|
|
1855
1875
|
readonly pluginInfo: "KUBB_PLUGIN_INFO";
|
|
1856
1876
|
readonly noContext: "KUBB_NO_CONTEXT";
|
|
1857
1877
|
readonly unsupportedFormat: "KUBB_UNSUPPORTED_FORMAT";
|
|
1878
|
+
readonly aliasCycle: "KUBB_ALIAS_CYCLE";
|
|
1858
1879
|
readonly deprecated: "KUBB_DEPRECATED";
|
|
1859
1880
|
readonly adapterRequired: "KUBB_ADAPTER_REQUIRED";
|
|
1860
1881
|
readonly pathTraversal: "KUBB_PATH_TRAVERSAL";
|
|
@@ -1864,6 +1885,7 @@ export declare class Diagnostics {
|
|
|
1864
1885
|
readonly formatFailed: "KUBB_FORMAT_FAILED";
|
|
1865
1886
|
readonly lintFailed: "KUBB_LINT_FAILED";
|
|
1866
1887
|
readonly barrelDuplicateExport: "KUBB_BARREL_DUPLICATE_EXPORT";
|
|
1888
|
+
readonly inlineFailed: "KUBB_INLINE_FAILED";
|
|
1867
1889
|
readonly internalError: "KUBB_INTERNAL_ERROR";
|
|
1868
1890
|
readonly performance: "KUBB_PERFORMANCE";
|
|
1869
1891
|
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-DwnjwKN0.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-3xDhh0Fc.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { isValid } from "verkit";
|
|
4
4
|
import process$1 from "node:process";
|