@kubb/core 5.8.1 → 5.8.2
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/README.md +1 -1
- package/dist/{KubbDriver-Dz36Klt9.js → KubbDriver-DBm4hRKA.js} +54 -16
- package/dist/KubbDriver-DBm4hRKA.js.map +1 -0
- package/dist/{KubbDriver-DQ7pt93q.cjs → KubbDriver-DxWuvJWV.cjs} +59 -15
- package/dist/KubbDriver-DxWuvJWV.cjs.map +1 -0
- package/dist/{createAdapter-BO_AxI05.d.ts → createAdapter-BpJYvJTw.d.ts} +110 -112
- package/dist/index.cjs +7 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -23
- 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/package.json +2 -2
- package/dist/KubbDriver-DQ7pt93q.cjs.map +0 -1
- package/dist/KubbDriver-Dz36Klt9.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-CRm0XQPb.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as defineGenerator, $t as ProblemDiagnostic, A as PluginFactory, At as HookResult, B as ResolveFileOptions, Bt as ReporterName, C as NormalizedPlugin, Ct as KubbMessageContext, D as Override, Dt as PossibleConfig, E as OutputOptions, Et as KubbWarnContext, F as assertPluginOption, Ft as Storage, G as ResolverDefault, Gt as Diagnostic, H as ResolveOptionsContext, Ht as UserReporter, I as definePlugin, It as createStorage, J as ResolverFilePathParams, Jt as DiagnosticLocation, K as ResolverFile, Kt as DiagnosticDoc, L as BannerMeta, Lt as GenerationResult, M as PluginName, Mt as runHook, N as PluginType, Nt as KubbDriver, O as Plugin, Ot as PostGenerateCommand, P as ResolvePluginOptions, Pt as FileManagerHooks, Q as GeneratorContext, Qt as ProblemCode, R as ResolveBannerContext, Rt as Reporter, S as KubbPluginStartContext, St as KubbLifecycleStartContext, T as OutputMode, Tt as KubbSuccessContext, U as ResolvePathOptions, Ut as createReporter, V as ResolveImportsOptions, Vt as ReporterPluginFiles, W as Resolver, Wt as logLevel, X as ResolverPathParams, Xt as Diagnostics, Y as ResolverPatch, Yt as DiagnosticSeverity, Z as Generator, Zt as PerformanceDiagnostic, _ as Filter, _t as KubbHookEndContext, a as AdapterSource, an as createRenderer, at as Input, b as KubbPluginEndContext, bt as KubbHooks, c as ExtensionDependency, cn as ParserFactory, ct as KubbDiagnosticContext, d as ExtensionKind, dt as KubbFilesProcessingEndContext, en as SerializedDiagnostic, et as NodeCache, f as ExtensionMeta, ft as KubbFilesProcessingStartContext, g as Exclude, gt as KubbGenerationSummaryContext, h as resolveMeta, ht as KubbGenerationStartContext, i as AdapterFactoryOptions, in as RendererFactory, it as FilesContext, j as PluginFactoryOptions, jt as RunHookOptions, k as PluginDefinition, kt as UserConfig, l as ExtensionDependencyRecord, ln as defineParser, lt as KubbErrorContext, m as defineExtension, mt as KubbGenerationEndContext, n as AdapterDefinition, nn as Hookable, nt as CLIOptions, o as createAdapter, on as Parser, ot as KubbBuildEndContext, p as checkCompatibility, pt as KubbFilesProcessingUpdateContext, q as ResolverFileParams, qt as DiagnosticKind, r as AdapterFactory, rn as Renderer, rt as Config, s as ExtensionDependencies, sn as ParserDefinition, st as KubbBuildStartContext, t as Adapter, tn as UpdateDiagnostic, tt as BuildOutput, u as ExtensionFactory, ut as KubbFileProcessingUpdate, v as Group, vt as KubbHookLineContext, w as Output, wt as KubbPluginsEndContext, x as KubbPluginSetupContext, xt as KubbInfoContext, y as Include, yt as KubbHookStartContext, z as ResolveBannerFile, zt as ReporterContext } from "./createAdapter-BpJYvJTw.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { FileNode, Macro, UserFileNode } from "@kubb/ast";
|
|
5
5
|
//#region src/applyConfigDefaults.d.ts
|
|
@@ -613,5 +613,5 @@ export declare function readInstalledPackages({ root, packages, resolveFrom }: {
|
|
|
613
613
|
resolveFrom?: Array<string>;
|
|
614
614
|
}): Promise<Array<InstalledPackage>>;
|
|
615
615
|
//#endregion
|
|
616
|
-
export { type Adapter, type AdapterDefinition, type AdapterFactory, type AdapterFactoryOptions, type AdapterSource, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type ExtensionDependencies, type ExtensionDependency, type ExtensionDependencyRecord, type ExtensionFactory, type ExtensionKind, type ExtensionManifest, type ExtensionManifestOption, type ExtensionMeta, type FileManagerHooks, FilesContext, type Filter, type GenerateOptions, type GenerateResult, type GenerationResult, type Generator, type GeneratorContext, type Group, type HookResult, Hookable, type Include, Input, type InputKind, type InstalledPackage, type JSONValue, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbGenerationSummaryContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, KubbMessageContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NodeCache, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type ParserDefinition, type ParserFactory, type PerformanceDiagnostic, type Plugin, type PluginDefinition, type PluginFactory, type PluginFactoryOptions, type PluginName, type PluginType, PossibleConfig, PostGenerateCommand, type ProblemCode, type ProblemDiagnostic, type RegistryDetail, type RegistryEntry, type RegistryIndex, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ReporterPluginFiles, type ResolveBannerContext, type ResolveBannerFile, type ResolveFileOptions, type ResolveImportsOptions, type ResolveOptionsContext, type ResolvePathOptions, type ResolvePluginOptions, Resolver, type ResolverDefault, type ResolverFile, type ResolverFileParams, type ResolverFilePathParams, type ResolverPatch, type ResolverPathParams, type RunHookOptions, type RunOutputPassesOptions, type SerializedDiagnostic, type Storage, type SummaryRenderer, type UpdateDiagnostic, UserConfig, type UserReporter, assertPluginOption, checkCompatibility, createAdapter, createRenderer, createReporter, createStorage, defineGenerator, defineParser, definePlugin, logLevel, resolveMeta, runHook };
|
|
616
|
+
export { type Adapter, type AdapterDefinition, type AdapterFactory, type AdapterFactoryOptions, type AdapterSource, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type ExtensionDependencies, type ExtensionDependency, type ExtensionDependencyRecord, type ExtensionFactory, type ExtensionKind, type ExtensionManifest, type ExtensionManifestOption, type ExtensionMeta, type FileManagerHooks, FilesContext, type Filter, type GenerateOptions, type GenerateResult, type GenerationResult, type Generator, type GeneratorContext, type Group, type HookResult, Hookable, type Include, Input, type InputKind, type InstalledPackage, type JSONValue, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbGenerationSummaryContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, KubbMessageContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NodeCache, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type ParserDefinition, type ParserFactory, type PerformanceDiagnostic, type Plugin, type PluginDefinition, type PluginFactory, type PluginFactoryOptions, type PluginName, type PluginType, PossibleConfig, PostGenerateCommand, type ProblemCode, type ProblemDiagnostic, type RegistryDetail, type RegistryEntry, type RegistryIndex, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ReporterPluginFiles, type ResolveBannerContext, type ResolveBannerFile, type ResolveFileOptions, type ResolveImportsOptions, type ResolveOptionsContext, type ResolvePathOptions, type ResolvePluginOptions, Resolver, type ResolverDefault, type ResolverFile, type ResolverFileParams, type ResolverFilePathParams, type ResolverPatch, type ResolverPathParams, type RunHookOptions, type RunOutputPassesOptions, type SerializedDiagnostic, type Storage, type SummaryRenderer, type UpdateDiagnostic, UserConfig, type UserReporter, assertPluginOption, checkCompatibility, createAdapter, createRenderer, createReporter, createStorage, defineExtension, defineGenerator, defineParser, definePlugin, logLevel, resolveMeta, runHook };
|
|
617
617
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./rolldown-runtime-CRm0XQPb.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as getElapsedMs, C as useOptions, D as resolveMeta, E as defineExtension, F as read, I as toPosixPath, L as write, M as clean, N as exists, O as Diagnostics, P as isPathInside, R as toError, S as useKubb, T as createExtensionFactory, _ as setMacros, a as _usingCtx, b as tryUseKubb, c as Resolver, d as definePlugin, f as addGenerator, g as requirePlugin, h as kubbContext, j as inParallel, k as formatMs, l as getInputKind, m as injectFile, o as Hookable, p as addMacro, s as createResolver, t as KubbDriver, u as assertPluginOption, v as setOptions, w as checkCompatibility, x as useConfig, y as setResolver } from "./KubbDriver-DBm4hRKA.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { isValid } from "verkit";
|
|
5
5
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
@@ -154,22 +154,13 @@ function tokenize(command) {
|
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/createAdapter.ts
|
|
156
156
|
function createAdapter(input) {
|
|
157
|
-
if (typeof input === "function") return
|
|
157
|
+
if (typeof input === "function") return createExtensionFactory({
|
|
158
158
|
kind: "adapter",
|
|
159
159
|
build: (options) => input(options)
|
|
160
160
|
});
|
|
161
|
-
const { meta, setup, build } = input;
|
|
162
161
|
return defineExtension({
|
|
163
162
|
kind: "adapter",
|
|
164
|
-
|
|
165
|
-
build: (raw) => {
|
|
166
|
-
const options = setup ? setup(raw) : raw;
|
|
167
|
-
return Object.assign(build(options), {
|
|
168
|
-
name: meta.name,
|
|
169
|
-
meta,
|
|
170
|
-
options
|
|
171
|
-
});
|
|
172
|
-
}
|
|
163
|
+
...input
|
|
173
164
|
});
|
|
174
165
|
}
|
|
175
166
|
//#endregion
|
|
@@ -1285,7 +1276,7 @@ function defineGenerator(generator) {
|
|
|
1285
1276
|
//#endregion
|
|
1286
1277
|
//#region src/defineParser.ts
|
|
1287
1278
|
function defineParser(input) {
|
|
1288
|
-
if (typeof input === "function") return
|
|
1279
|
+
if (typeof input === "function") return createExtensionFactory({
|
|
1289
1280
|
kind: "parser",
|
|
1290
1281
|
build: (options) => {
|
|
1291
1282
|
const parser = input(options);
|
|
@@ -1295,17 +1286,10 @@ function defineParser(input) {
|
|
|
1295
1286
|
};
|
|
1296
1287
|
}
|
|
1297
1288
|
});
|
|
1298
|
-
const { meta } = input;
|
|
1299
|
-
const build = "build" in input ? input.build : input.setup;
|
|
1300
1289
|
return defineExtension({
|
|
1301
1290
|
kind: "parser",
|
|
1302
|
-
meta,
|
|
1303
|
-
build:
|
|
1304
|
-
...build(options),
|
|
1305
|
-
name: meta.name,
|
|
1306
|
-
meta,
|
|
1307
|
-
options
|
|
1308
|
-
})
|
|
1291
|
+
meta: input.meta,
|
|
1292
|
+
build: "build" in input ? input.build : input.setup
|
|
1309
1293
|
});
|
|
1310
1294
|
}
|
|
1311
1295
|
//#endregion
|
|
@@ -1471,6 +1455,6 @@ async function readInstalledPackages({ root, packages = [], resolveFrom = [] })
|
|
|
1471
1455
|
}));
|
|
1472
1456
|
}
|
|
1473
1457
|
//#endregion
|
|
1474
|
-
export { Diagnostics, Hookable, KubbDriver, Resolver, addGenerator, addMacro, applyConfigDefaults, assertPluginOption, cacheStorage, checkCompatibility, cliReporter, createAdapter, createCliReporter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, getInputKind, htmlReporter, injectFile, isExtensionManifest, isPackageName, isRegistryEntry, jsonReporter, kubbContext, kubbStorage, logLevel, manifestProblems, memoryStorage, readInstalledPackages, requirePlugin, resolveCacheDir, resolveKubbDir, resolveMeta, runHook, runOutputPasses, setMacros, setOptions, setResolver, tryUseKubb, useConfig, useKubb, useOptions };
|
|
1458
|
+
export { Diagnostics, Hookable, KubbDriver, Resolver, addGenerator, addMacro, applyConfigDefaults, assertPluginOption, cacheStorage, checkCompatibility, cliReporter, createAdapter, createCliReporter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineExtension, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, getInputKind, htmlReporter, injectFile, isExtensionManifest, isPackageName, isRegistryEntry, jsonReporter, kubbContext, kubbStorage, logLevel, manifestProblems, memoryStorage, readInstalledPackages, requirePlugin, resolveCacheDir, resolveKubbDir, resolveMeta, runHook, runOutputPasses, setMacros, setOptions, setResolver, tryUseKubb, useConfig, useKubb, useOptions };
|
|
1475
1459
|
|
|
1476
1460
|
//# sourceMappingURL=index.js.map
|