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

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.91";
195
+ var version = "5.0.0-beta.93";
196
196
  //#endregion
197
197
  //#region src/constants.ts
198
198
  /**
@@ -274,9 +274,9 @@ const diagnosticCode = {
274
274
  */
275
275
  invalidPluginOptions: "KUBB_INVALID_PLUGIN_OPTIONS",
276
276
  /**
277
- * A post-generate shell hook (`hooks.done`) exited with a failure.
277
+ * A post-generate command (`output.postGenerate`) exited with a failure.
278
278
  */
279
- hookFailed: "KUBB_HOOK_FAILED",
279
+ postGenerateFailed: "KUBB_POST_GENERATE_FAILED",
280
280
  /**
281
281
  * The formatter pass over the generated files failed.
282
282
  */
@@ -301,20 +301,6 @@ const diagnosticCode = {
301
301
  */
302
302
  const docsMajor = version.split(".")[0] ?? "5";
303
303
  /**
304
- * Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
305
- *
306
- * @example
307
- * ```ts
308
- * const update = narrow(diagnostic, diagnosticCode.updateAvailable)
309
- * if (update) {
310
- * console.log(update.latestVersion)
311
- * }
312
- * ```
313
- */
314
- function narrow(diagnostic, code) {
315
- return diagnostic.code === code ? diagnostic : null;
316
- }
317
- /**
318
304
  * Builds a type guard that narrows a {@link Diagnostic} to the variant for `kind`. A diagnostic
319
305
  * with no `kind` is treated as a `problem`.
320
306
  */
@@ -436,9 +422,9 @@ const diagnosticCatalog = {
436
422
  cause: "A plugin was configured with options that cannot be honored, for example `output.mode: 'file'` paired with a `group` option.",
437
423
  fix: "Fix the plugin options. A single-file output has nothing to group, so remove the `group` option or use `output.mode: 'directory'`."
438
424
  },
439
- [diagnosticCode.hookFailed]: {
440
- title: "Hook failed",
441
- cause: "A post-generate shell hook (`hooks.done`) exited with a non-zero status.",
425
+ [diagnosticCode.postGenerateFailed]: {
426
+ title: "Post-generate command failed",
427
+ cause: "A post-generate command (`output.postGenerate`) exited with a non-zero status.",
442
428
  fix: "Check the command is installed and correct, and run it manually to see the error."
443
429
  },
444
430
  [diagnosticCode.formatFailed]: {
@@ -490,10 +476,6 @@ var Diagnostics = class Diagnostics {
490
476
  */
491
477
  static isPerformance = isPerformance;
492
478
  /**
493
- * Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
494
- */
495
- static narrow = narrow;
496
- /**
497
479
  * An `Error` that carries a {@link Diagnostic}, so structured problems can flow
498
480
  * through the existing throw/catch paths while keeping their code and location.
499
481
  *