@kubb/core 5.0.0-beta.97 → 5.0.0-beta.98
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/index.cjs +17 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -20
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +1 -1
- package/dist/mocks.js +1 -1
- package/dist/{usingCtx-DOXZGtQx.js → usingCtx-BNggxUEL.js} +2 -2
- package/dist/{usingCtx-DOXZGtQx.js.map → usingCtx-BNggxUEL.js.map} +1 -1
- package/dist/{usingCtx-BLzqdXPG.cjs → usingCtx-CZyLSqds.cjs} +2 -2
- package/dist/{usingCtx-BLzqdXPG.cjs.map → usingCtx-CZyLSqds.cjs.map} +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_usingCtx = require("./usingCtx-
|
|
2
|
+
const require_usingCtx = require("./usingCtx-CZyLSqds.cjs");
|
|
3
3
|
let node_async_hooks = require("node:async_hooks");
|
|
4
4
|
let node_util = require("node:util");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -191,7 +191,7 @@ function memoize(store, factory) {
|
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region package.json
|
|
194
|
-
var version = "5.0.0-beta.
|
|
194
|
+
var version = "5.0.0-beta.98";
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/constants.ts
|
|
197
197
|
/**
|
|
@@ -1510,27 +1510,24 @@ var KubbDriver = class {
|
|
|
1510
1510
|
async run() {
|
|
1511
1511
|
const { hooks, config, fileManager } = this;
|
|
1512
1512
|
const diagnostics = [];
|
|
1513
|
+
const updateBuffer = [];
|
|
1513
1514
|
const parsersMap = /* @__PURE__ */ new Map();
|
|
1514
1515
|
for (const parser of config.parsers) if (parser.extNames) for (const ext of parser.extNames) parsersMap.set(ext, parser);
|
|
1515
|
-
const onWriteStart = async (files) => {
|
|
1516
|
-
await hooks.callHook("kubb:files:processing:start", { files });
|
|
1517
|
-
};
|
|
1518
|
-
const updateBuffer = [];
|
|
1519
|
-
const onWriteUpdate = (item) => {
|
|
1520
|
-
updateBuffer.push(item);
|
|
1521
|
-
};
|
|
1522
|
-
const onWriteEnd = async (files) => {
|
|
1523
|
-
await hooks.callHook("kubb:files:processing:update", { files: updateBuffer.map((item) => ({
|
|
1524
|
-
...item,
|
|
1525
|
-
config
|
|
1526
|
-
})) });
|
|
1527
|
-
updateBuffer.length = 0;
|
|
1528
|
-
await hooks.callHook("kubb:files:processing:end", { files });
|
|
1529
|
-
};
|
|
1530
1516
|
const unhookWrites = fileManager.hooks.addHooks({
|
|
1531
|
-
start:
|
|
1532
|
-
|
|
1533
|
-
|
|
1517
|
+
start: async (files) => {
|
|
1518
|
+
await hooks.callHook("kubb:files:processing:start", { files });
|
|
1519
|
+
},
|
|
1520
|
+
update: (item) => {
|
|
1521
|
+
updateBuffer.push(item);
|
|
1522
|
+
},
|
|
1523
|
+
end: async (files) => {
|
|
1524
|
+
await hooks.callHook("kubb:files:processing:update", { files: updateBuffer.map((item) => ({
|
|
1525
|
+
...item,
|
|
1526
|
+
config
|
|
1527
|
+
})) });
|
|
1528
|
+
updateBuffer.length = 0;
|
|
1529
|
+
await hooks.callHook("kubb:files:processing:end", { files });
|
|
1530
|
+
}
|
|
1534
1531
|
});
|
|
1535
1532
|
return Diagnostics.scope((diagnostic) => diagnostics.push(diagnostic), async () => {
|
|
1536
1533
|
try {
|