@kubb/core 5.0.0-beta.11 → 5.0.0-beta.13
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/{createKubb-BSfMDBwR.d.ts → createKubb-uVWTlN_w.d.ts} +1 -2
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +1 -3
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.ts +3 -3
- package/dist/mocks.js +1 -3
- package/dist/mocks.js.map +1 -1
- package/package.json +4 -4
- package/src/createAdapter.ts +0 -1
- package/src/createKubb.ts +13 -1
- package/src/mocks.ts +3 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { $ as ResolverPathParams, A as isInputPath, B as KubbPluginSetupContext, C as KubbPluginsEndContext, Ct as AsyncEventEmitter, D as PossibleConfig, E as KubbWarnContext, F as FileManager, G as Plugin, H as NormalizedPlugin, I as Exclude, J as ResolveBannerContext, K as PluginFactoryOptions, L as Group, M as GeneratorContext, N as defineGenerator, O as UserConfig, P as PluginDriver, Q as ResolverFileParams, R as Include, S as KubbLifecycleStartContext, St as logLevel, T as KubbVersionNewContext, U as Output, V as KubbPluginStartContext, W as Override, X as Resolver, Y as ResolveOptionsContext, Z as ResolverContext, _ as KubbGenerationSummaryContext, _t as createRenderer, a as InputPath, at as LoggerOptions, b as KubbHooks, bt as AdapterSource, c as KubbBuildStartContext, ct as FileProcessor, d as KubbErrorContext, dt as defineParser, et as defineResolver, f as KubbFileProcessingUpdateContext, ft as DevtoolsOptions, g as KubbGenerationStartContext, gt as RendererFactory, h as KubbGenerationEndContext, ht as Renderer, i as InputData, it as LoggerContext, j as Generator, k as createKubb, l as KubbConfigEndContext, lt as FileProcessorEvents, m as KubbFilesProcessingStartContext, mt as createStorage, n as CLIOptions, nt as defineMiddleware, o as Kubb, ot as UserLogger, p as KubbFilesProcessingEndContext, pt as Storage, q as definePlugin, r as Config, rt as Logger, s as KubbBuildEndContext, st as defineLogger, t as BuildOutput, tt as Middleware, u as KubbDebugContext, ut as Parser, v as KubbHookEndContext, vt as Adapter, w as KubbSuccessContext, x as KubbInfoContext, xt as createAdapter, y as KubbHookStartContext, yt as AdapterFactoryOptions, z as KubbPluginEndContext } from "./createKubb-
|
|
2
|
+
import { $ as ResolverPathParams, A as isInputPath, B as KubbPluginSetupContext, C as KubbPluginsEndContext, Ct as AsyncEventEmitter, D as PossibleConfig, E as KubbWarnContext, F as FileManager, G as Plugin, H as NormalizedPlugin, I as Exclude, J as ResolveBannerContext, K as PluginFactoryOptions, L as Group, M as GeneratorContext, N as defineGenerator, O as UserConfig, P as PluginDriver, Q as ResolverFileParams, R as Include, S as KubbLifecycleStartContext, St as logLevel, T as KubbVersionNewContext, U as Output, V as KubbPluginStartContext, W as Override, X as Resolver, Y as ResolveOptionsContext, Z as ResolverContext, _ as KubbGenerationSummaryContext, _t as createRenderer, a as InputPath, at as LoggerOptions, b as KubbHooks, bt as AdapterSource, c as KubbBuildStartContext, ct as FileProcessor, d as KubbErrorContext, dt as defineParser, et as defineResolver, f as KubbFileProcessingUpdateContext, ft as DevtoolsOptions, g as KubbGenerationStartContext, gt as RendererFactory, h as KubbGenerationEndContext, ht as Renderer, i as InputData, it as LoggerContext, j as Generator, k as createKubb, l as KubbConfigEndContext, lt as FileProcessorEvents, m as KubbFilesProcessingStartContext, mt as createStorage, n as CLIOptions, nt as defineMiddleware, o as Kubb, ot as UserLogger, p as KubbFilesProcessingEndContext, pt as Storage, q as definePlugin, r as Config, rt as Logger, s as KubbBuildEndContext, st as defineLogger, t as BuildOutput, tt as Middleware, u as KubbDebugContext, ut as Parser, v as KubbHookEndContext, vt as Adapter, w as KubbSuccessContext, x as KubbInfoContext, xt as createAdapter, y as KubbHookStartContext, yt as AdapterFactoryOptions, z as KubbPluginEndContext } from "./createKubb-uVWTlN_w.js";
|
|
3
3
|
import * as ast from "@kubb/ast";
|
|
4
4
|
|
|
5
5
|
//#region ../../internals/utils/src/urlPath.d.ts
|
package/dist/index.js
CHANGED
|
@@ -525,7 +525,7 @@ function createAdapter(build) {
|
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region package.json
|
|
528
|
-
var version$1 = "5.0.0-beta.
|
|
528
|
+
var version$1 = "5.0.0-beta.13";
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region src/createStorage.ts
|
|
531
531
|
/**
|
|
@@ -914,9 +914,13 @@ async function setup(userConfig, options = {}) {
|
|
|
914
914
|
});
|
|
915
915
|
await config.storage.clear(resolve(config.root, config.output.path));
|
|
916
916
|
}
|
|
917
|
+
const middlewareListeners = [];
|
|
917
918
|
function registerMiddlewareHook(event, middlewareHooks) {
|
|
918
919
|
const handler = middlewareHooks[event];
|
|
919
|
-
if (handler)
|
|
920
|
+
if (handler) {
|
|
921
|
+
hooks.on(event, handler);
|
|
922
|
+
middlewareListeners.push([event, handler]);
|
|
923
|
+
}
|
|
920
924
|
}
|
|
921
925
|
for (const middleware of config.middleware ?? []) for (const event of Object.keys(middleware.hooks)) registerMiddlewareHook(event, middleware.hooks);
|
|
922
926
|
if (config.adapter) {
|
|
@@ -940,7 +944,11 @@ async function setup(userConfig, options = {}) {
|
|
|
940
944
|
config,
|
|
941
945
|
hooks,
|
|
942
946
|
driver,
|
|
943
|
-
storage
|
|
947
|
+
storage,
|
|
948
|
+
dispose: () => {
|
|
949
|
+
driver.dispose();
|
|
950
|
+
for (const [event, handler] of middlewareListeners) hooks.off(event, handler);
|
|
951
|
+
}
|
|
944
952
|
};
|
|
945
953
|
}
|
|
946
954
|
/**
|
|
@@ -1185,7 +1193,7 @@ async function safeBuild(setupResult) {
|
|
|
1185
1193
|
storage
|
|
1186
1194
|
};
|
|
1187
1195
|
} finally {
|
|
1188
|
-
|
|
1196
|
+
setupResult.dispose();
|
|
1189
1197
|
}
|
|
1190
1198
|
}
|
|
1191
1199
|
async function build(setupResult) {
|