@kubb/core 5.0.0-beta.93 → 5.0.0-beta.94

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 CHANGED
@@ -192,7 +192,7 @@ function memoize(store, factory) {
192
192
  }
193
193
  //#endregion
194
194
  //#region package.json
195
- var version = "5.0.0-beta.93";
195
+ var version = "5.0.0-beta.94";
196
196
  //#endregion
197
197
  //#region src/constants.ts
198
198
  /**
@@ -1303,7 +1303,8 @@ var KubbDriver = class {
1303
1303
  },
1304
1304
  exclude: [],
1305
1305
  override: []
1306
- }
1306
+ },
1307
+ resolver: this.#getDefaultResolver(rawPlugin.name)
1307
1308
  };
1308
1309
  }));
1309
1310
  for (const plugin of normalized) {
@@ -2143,10 +2144,10 @@ const logLevel = {
2143
2144
  verbose: 4
2144
2145
  };
2145
2146
  /**
2146
- * Defines a reporter. When the definition has a `drain`, the returned reporter buffers each value
2147
- * `report` returns and hands the array to `drain` once, then clears it. Without a `drain`, nothing
2148
- * is buffered. Wiring the reporter onto the run's hooks is the host's job, so the reporter only
2149
- * ever deals with a {@link GenerationResult}.
2147
+ * Defines a reporter. The returned reporter buffers each value `report` returns in order and, when
2148
+ * the definition has a `drain`, hands the array to `drain` once and then clears it. Wiring the
2149
+ * reporter onto the run's hooks is the host's job, so the reporter only ever deals with a
2150
+ * {@link GenerationResult}.
2150
2151
  *
2151
2152
  * @example
2152
2153
  * ```ts
@@ -2164,19 +2165,19 @@ const logLevel = {
2164
2165
  * ```
2165
2166
  */
2166
2167
  function createReporter(reporter) {
2167
- const reports = /* @__PURE__ */ new Set();
2168
+ const reports = [];
2168
2169
  return {
2169
2170
  name: reporter.name,
2170
2171
  async report(result, context) {
2171
2172
  const report = await reporter.report(result, context);
2172
- reports.add(report);
2173
+ if (reporter.drain) reports.push(report);
2173
2174
  },
2174
2175
  async drain(context) {
2175
- await reporter.drain?.(context, Array.from(reports));
2176
- reports.clear();
2176
+ await reporter.drain?.(context, [...reports]);
2177
+ reports.length = 0;
2177
2178
  },
2178
2179
  [Symbol.dispose]() {
2179
- reports.clear();
2180
+ reports.length = 0;
2180
2181
  }
2181
2182
  };
2182
2183
  }