@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
|
@@ -172,7 +172,6 @@ type Adapter<TOptions extends AdapterFactoryOptions = AdapterFactoryOptions> = {
|
|
|
172
172
|
* Parsed source document after the first `parse()` call. `null` before parsing.
|
|
173
173
|
*/
|
|
174
174
|
document: TOptions['document'] | null;
|
|
175
|
-
inputNode: InputNode | null;
|
|
176
175
|
/**
|
|
177
176
|
* Parse the source into a universal `InputNode`.
|
|
178
177
|
*/
|
|
@@ -2173,4 +2172,4 @@ type CreateKubbOptions = {
|
|
|
2173
2172
|
declare function createKubb(userConfig: UserConfig, options?: CreateKubbOptions): Kubb$1;
|
|
2174
2173
|
//#endregion
|
|
2175
2174
|
export { ResolverPathParams as $, isInputPath as A, KubbPluginSetupContext as B, KubbPluginsEndContext as C, AsyncEventEmitter as Ct, PossibleConfig as D, KubbWarnContext as E, FileManager as F, Plugin as G, NormalizedPlugin as H, Exclude as I, ResolveBannerContext as J, PluginFactoryOptions as K, Group as L, GeneratorContext as M, defineGenerator as N, UserConfig as O, PluginDriver as P, ResolverFileParams as Q, Include as R, KubbLifecycleStartContext as S, logLevel as St, KubbVersionNewContext as T, Output as U, KubbPluginStartContext as V, Override as W, Resolver as X, ResolveOptionsContext as Y, ResolverContext as Z, KubbGenerationSummaryContext as _, createRenderer as _t, InputPath as a, LoggerOptions as at, KubbHooks as b, AdapterSource as bt, KubbBuildStartContext as c, FileProcessor as ct, KubbErrorContext as d, defineParser as dt, defineResolver as et, KubbFileProcessingUpdateContext as f, DevtoolsOptions as ft, KubbGenerationStartContext as g, RendererFactory as gt, KubbGenerationEndContext as h, Renderer as ht, InputData as i, LoggerContext as it, Generator as j, createKubb as k, KubbConfigEndContext as l, FileProcessorEvents as lt, KubbFilesProcessingStartContext as m, createStorage as mt, CLIOptions as n, defineMiddleware as nt, Kubb$1 as o, UserLogger as ot, KubbFilesProcessingEndContext as p, Storage as pt, definePlugin as q, Config as r, Logger as rt, KubbBuildEndContext as s, defineLogger as st, BuildOutput as t, Middleware as tt, KubbDebugContext as u, Parser as ut, KubbHookEndContext as v, Adapter as vt, KubbSuccessContext as w, KubbInfoContext as x, createAdapter as xt, KubbHookStartContext as y, AdapterFactoryOptions as yt, KubbPluginEndContext as z };
|
|
2176
|
-
//# sourceMappingURL=createKubb-
|
|
2175
|
+
//# sourceMappingURL=createKubb-uVWTlN_w.d.ts.map
|
package/dist/index.cjs
CHANGED
|
@@ -525,7 +525,7 @@ function createAdapter(build) {
|
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region package.json
|
|
528
|
-
var version = "5.0.0-beta.
|
|
528
|
+
var version = "5.0.0-beta.13";
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region src/createStorage.ts
|
|
531
531
|
/**
|
|
@@ -911,9 +911,13 @@ async function setup(userConfig, options = {}) {
|
|
|
911
911
|
});
|
|
912
912
|
await config.storage.clear((0, node_path.resolve)(config.root, config.output.path));
|
|
913
913
|
}
|
|
914
|
+
const middlewareListeners = [];
|
|
914
915
|
function registerMiddlewareHook(event, middlewareHooks) {
|
|
915
916
|
const handler = middlewareHooks[event];
|
|
916
|
-
if (handler)
|
|
917
|
+
if (handler) {
|
|
918
|
+
hooks.on(event, handler);
|
|
919
|
+
middlewareListeners.push([event, handler]);
|
|
920
|
+
}
|
|
917
921
|
}
|
|
918
922
|
for (const middleware of config.middleware ?? []) for (const event of Object.keys(middleware.hooks)) registerMiddlewareHook(event, middleware.hooks);
|
|
919
923
|
if (config.adapter) {
|
|
@@ -937,7 +941,11 @@ async function setup(userConfig, options = {}) {
|
|
|
937
941
|
config,
|
|
938
942
|
hooks,
|
|
939
943
|
driver,
|
|
940
|
-
storage
|
|
944
|
+
storage,
|
|
945
|
+
dispose: () => {
|
|
946
|
+
driver.dispose();
|
|
947
|
+
for (const [event, handler] of middlewareListeners) hooks.off(event, handler);
|
|
948
|
+
}
|
|
941
949
|
};
|
|
942
950
|
}
|
|
943
951
|
/**
|
|
@@ -1182,7 +1190,7 @@ async function safeBuild(setupResult) {
|
|
|
1182
1190
|
storage
|
|
1183
1191
|
};
|
|
1184
1192
|
} finally {
|
|
1185
|
-
|
|
1193
|
+
setupResult.dispose();
|
|
1186
1194
|
}
|
|
1187
1195
|
}
|
|
1188
1196
|
async function build(setupResult) {
|