@kubb/plugin-redoc 4.11.1 → 4.11.2

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.d.cts CHANGED
@@ -23,13 +23,35 @@ type DebugEvent = {
23
23
  date: Date;
24
24
  logs: string[];
25
25
  fileName?: string;
26
+ /**
27
+ * Category of the debug log, used for GitHub Actions grouping
28
+ * - 'setup': Initial configuration and environment setup
29
+ * - 'plugin': Plugin installation and execution
30
+ * - 'hook': Plugin hook execution details
31
+ * - 'schema': Schema parsing and generation
32
+ * - 'file': File operations (read/write/generate)
33
+ * - 'error': Error details and stack traces
34
+ * - undefined: Generic logs (always inline)
35
+ */
36
+ category?: 'setup' | 'plugin' | 'hook' | 'schema' | 'file' | 'error';
37
+ /**
38
+ * Plugin name for grouping plugin-specific logs together
39
+ */
40
+ pluginName?: string;
41
+ /**
42
+ * Indicates if this is the start or end of a plugin's execution
43
+ * - 'start': Start of plugin execution group
44
+ * - 'end': End of plugin execution group
45
+ */
46
+ pluginGroupMarker?: 'start' | 'end';
26
47
  };
27
48
  type Events$1 = {
28
49
  start: [message: string];
29
50
  success: [message: string];
30
- error: [message: string, cause: Error];
51
+ error: [message: string, error: Error];
31
52
  warning: [message: string];
32
53
  debug: [DebugEvent];
54
+ verbose: [DebugEvent];
33
55
  info: [message: string];
34
56
  progress_start: [{
35
57
  id: string;
@@ -53,7 +75,7 @@ type Logger = {
53
75
  consola?: ConsolaInstance;
54
76
  on: EventEmitter<Events$1>['on'];
55
77
  emit: EventEmitter<Events$1>['emit'];
56
- writeLogs: () => Promise<string[]>;
78
+ writeLogs: () => Promise<void>;
57
79
  };
58
80
  //#endregion
59
81
  //#region ../core/src/utils/types.d.ts
@@ -351,14 +373,35 @@ type Output<TOptions> = {
351
373
  //#region ../core/src/PluginManager.d.ts
352
374
  type RequiredPluginLifecycle = Required<PluginLifecycle>;
353
375
  type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
354
- type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
355
- message: string;
376
+ type ExecutingMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
356
377
  strategy: Strategy;
357
378
  hookName: H;
358
379
  plugin: Plugin;
359
380
  parameters?: unknown[] | undefined;
360
381
  output?: unknown;
361
382
  };
383
+ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
384
+ duration: number;
385
+ strategy: Strategy;
386
+ hookName: H;
387
+ plugin: Plugin;
388
+ parameters?: unknown[] | undefined;
389
+ output?: unknown;
390
+ };
391
+ type ErrorMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
392
+ hookName: H;
393
+ duration: number;
394
+ strategy: Strategy;
395
+ parameters?: unknown[] | undefined;
396
+ plugin: Plugin;
397
+ };
398
+ type ProgressStartMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
399
+ hookName: H;
400
+ plugins: Array<Plugin>;
401
+ };
402
+ type ProgressStopMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
403
+ hookName: H;
404
+ };
362
405
  type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
363
406
  type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
364
407
  result: Result;
@@ -373,9 +416,11 @@ type Options$2 = {
373
416
  concurrency?: number;
374
417
  };
375
418
  type Events = {
376
- executing: [executer: Executer];
377
- executed: [executer: Executer];
378
- error: [error: Error];
419
+ progress_start: [meta: ProgressStartMeta];
420
+ progress_stop: [meta: ProgressStopMeta];
421
+ executing: [meta: ExecutingMeta];
422
+ executed: [meta: ExecutedMeta];
423
+ error: [error: Error, meta: ErrorMeta];
379
424
  };
380
425
  type GetFileProps<TOptions = object> = {
381
426
  name: string;
@@ -388,8 +433,6 @@ declare class PluginManager {
388
433
  #private;
389
434
  readonly events: EventEmitter<Events>;
390
435
  readonly config: Config;
391
- readonly executed: Array<Executer>;
392
- readonly logger: Logger;
393
436
  readonly options: Options$2;
394
437
  constructor(config: Config, options: Options$2);
395
438
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
@@ -415,13 +458,11 @@ declare class PluginManager {
415
458
  hookForPlugin<H extends PluginLifecycleHooks>({
416
459
  pluginKey,
417
460
  hookName,
418
- parameters,
419
- message
461
+ parameters
420
462
  }: {
421
463
  pluginKey: Plugin['key'];
422
464
  hookName: H;
423
465
  parameters: PluginParameter<H>;
424
- message: string;
425
466
  }): Promise<Array<ReturnType<ParseResult<H>> | null>>;
426
467
  /**
427
468
  * Run a specific hookName for plugin x.
@@ -429,13 +470,11 @@ declare class PluginManager {
429
470
  hookForPluginSync<H extends PluginLifecycleHooks>({
430
471
  pluginKey,
431
472
  hookName,
432
- parameters,
433
- message
473
+ parameters
434
474
  }: {
435
475
  pluginKey: Plugin['key'];
436
476
  hookName: H;
437
477
  parameters: PluginParameter<H>;
438
- message: string;
439
478
  }): Array<ReturnType<ParseResult<H>>> | null;
440
479
  /**
441
480
  * First non-null result stops and will return it's value.
@@ -443,13 +482,11 @@ declare class PluginManager {
443
482
  hookFirst<H extends PluginLifecycleHooks>({
444
483
  hookName,
445
484
  parameters,
446
- skipped,
447
- message
485
+ skipped
448
486
  }: {
449
487
  hookName: H;
450
488
  parameters: PluginParameter<H>;
451
489
  skipped?: ReadonlySet<Plugin> | null;
452
- message: string;
453
490
  }): Promise<SafeParseResult<H>>;
454
491
  /**
455
492
  * First non-null result stops and will return it's value.
@@ -457,37 +494,31 @@ declare class PluginManager {
457
494
  hookFirstSync<H extends PluginLifecycleHooks>({
458
495
  hookName,
459
496
  parameters,
460
- skipped,
461
- message
497
+ skipped
462
498
  }: {
463
499
  hookName: H;
464
500
  parameters: PluginParameter<H>;
465
501
  skipped?: ReadonlySet<Plugin> | null;
466
- message: string;
467
502
  }): SafeParseResult<H>;
468
503
  /**
469
504
  * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
470
505
  */
471
506
  hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
472
507
  hookName,
473
- parameters,
474
- message
508
+ parameters
475
509
  }: {
476
510
  hookName: H;
477
511
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
478
- message: string;
479
512
  }): Promise<Awaited<TOuput>[]>;
480
513
  /**
481
514
  * Chains plugins
482
515
  */
483
516
  hookSeq<H extends PluginLifecycleHooks>({
484
517
  hookName,
485
- parameters,
486
- message
518
+ parameters
487
519
  }: {
488
520
  hookName: H;
489
521
  parameters?: PluginParameter<H>;
490
- message: string;
491
522
  }): Promise<void>;
492
523
  getPluginByKey(pluginKey: Plugin['key']): Plugin | undefined;
493
524
  getPluginsByKey(hookName: keyof PluginWithLifeCycle, pluginKey: Plugin['key']): Plugin[];
package/dist/index.d.ts CHANGED
@@ -23,13 +23,35 @@ type DebugEvent = {
23
23
  date: Date;
24
24
  logs: string[];
25
25
  fileName?: string;
26
+ /**
27
+ * Category of the debug log, used for GitHub Actions grouping
28
+ * - 'setup': Initial configuration and environment setup
29
+ * - 'plugin': Plugin installation and execution
30
+ * - 'hook': Plugin hook execution details
31
+ * - 'schema': Schema parsing and generation
32
+ * - 'file': File operations (read/write/generate)
33
+ * - 'error': Error details and stack traces
34
+ * - undefined: Generic logs (always inline)
35
+ */
36
+ category?: 'setup' | 'plugin' | 'hook' | 'schema' | 'file' | 'error';
37
+ /**
38
+ * Plugin name for grouping plugin-specific logs together
39
+ */
40
+ pluginName?: string;
41
+ /**
42
+ * Indicates if this is the start or end of a plugin's execution
43
+ * - 'start': Start of plugin execution group
44
+ * - 'end': End of plugin execution group
45
+ */
46
+ pluginGroupMarker?: 'start' | 'end';
26
47
  };
27
48
  type Events$1 = {
28
49
  start: [message: string];
29
50
  success: [message: string];
30
- error: [message: string, cause: Error];
51
+ error: [message: string, error: Error];
31
52
  warning: [message: string];
32
53
  debug: [DebugEvent];
54
+ verbose: [DebugEvent];
33
55
  info: [message: string];
34
56
  progress_start: [{
35
57
  id: string;
@@ -53,7 +75,7 @@ type Logger = {
53
75
  consola?: ConsolaInstance;
54
76
  on: EventEmitter<Events$1>['on'];
55
77
  emit: EventEmitter<Events$1>['emit'];
56
- writeLogs: () => Promise<string[]>;
78
+ writeLogs: () => Promise<void>;
57
79
  };
58
80
  //#endregion
59
81
  //#region ../core/src/utils/types.d.ts
@@ -351,14 +373,35 @@ type Output<TOptions> = {
351
373
  //#region ../core/src/PluginManager.d.ts
352
374
  type RequiredPluginLifecycle = Required<PluginLifecycle>;
353
375
  type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
354
- type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
355
- message: string;
376
+ type ExecutingMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
356
377
  strategy: Strategy;
357
378
  hookName: H;
358
379
  plugin: Plugin;
359
380
  parameters?: unknown[] | undefined;
360
381
  output?: unknown;
361
382
  };
383
+ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
384
+ duration: number;
385
+ strategy: Strategy;
386
+ hookName: H;
387
+ plugin: Plugin;
388
+ parameters?: unknown[] | undefined;
389
+ output?: unknown;
390
+ };
391
+ type ErrorMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
392
+ hookName: H;
393
+ duration: number;
394
+ strategy: Strategy;
395
+ parameters?: unknown[] | undefined;
396
+ plugin: Plugin;
397
+ };
398
+ type ProgressStartMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
399
+ hookName: H;
400
+ plugins: Array<Plugin>;
401
+ };
402
+ type ProgressStopMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
403
+ hookName: H;
404
+ };
362
405
  type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
363
406
  type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
364
407
  result: Result;
@@ -373,9 +416,11 @@ type Options$2 = {
373
416
  concurrency?: number;
374
417
  };
375
418
  type Events = {
376
- executing: [executer: Executer];
377
- executed: [executer: Executer];
378
- error: [error: Error];
419
+ progress_start: [meta: ProgressStartMeta];
420
+ progress_stop: [meta: ProgressStopMeta];
421
+ executing: [meta: ExecutingMeta];
422
+ executed: [meta: ExecutedMeta];
423
+ error: [error: Error, meta: ErrorMeta];
379
424
  };
380
425
  type GetFileProps<TOptions = object> = {
381
426
  name: string;
@@ -388,8 +433,6 @@ declare class PluginManager {
388
433
  #private;
389
434
  readonly events: EventEmitter<Events>;
390
435
  readonly config: Config;
391
- readonly executed: Array<Executer>;
392
- readonly logger: Logger;
393
436
  readonly options: Options$2;
394
437
  constructor(config: Config, options: Options$2);
395
438
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
@@ -415,13 +458,11 @@ declare class PluginManager {
415
458
  hookForPlugin<H extends PluginLifecycleHooks>({
416
459
  pluginKey,
417
460
  hookName,
418
- parameters,
419
- message
461
+ parameters
420
462
  }: {
421
463
  pluginKey: Plugin['key'];
422
464
  hookName: H;
423
465
  parameters: PluginParameter<H>;
424
- message: string;
425
466
  }): Promise<Array<ReturnType<ParseResult<H>> | null>>;
426
467
  /**
427
468
  * Run a specific hookName for plugin x.
@@ -429,13 +470,11 @@ declare class PluginManager {
429
470
  hookForPluginSync<H extends PluginLifecycleHooks>({
430
471
  pluginKey,
431
472
  hookName,
432
- parameters,
433
- message
473
+ parameters
434
474
  }: {
435
475
  pluginKey: Plugin['key'];
436
476
  hookName: H;
437
477
  parameters: PluginParameter<H>;
438
- message: string;
439
478
  }): Array<ReturnType<ParseResult<H>>> | null;
440
479
  /**
441
480
  * First non-null result stops and will return it's value.
@@ -443,13 +482,11 @@ declare class PluginManager {
443
482
  hookFirst<H extends PluginLifecycleHooks>({
444
483
  hookName,
445
484
  parameters,
446
- skipped,
447
- message
485
+ skipped
448
486
  }: {
449
487
  hookName: H;
450
488
  parameters: PluginParameter<H>;
451
489
  skipped?: ReadonlySet<Plugin> | null;
452
- message: string;
453
490
  }): Promise<SafeParseResult<H>>;
454
491
  /**
455
492
  * First non-null result stops and will return it's value.
@@ -457,37 +494,31 @@ declare class PluginManager {
457
494
  hookFirstSync<H extends PluginLifecycleHooks>({
458
495
  hookName,
459
496
  parameters,
460
- skipped,
461
- message
497
+ skipped
462
498
  }: {
463
499
  hookName: H;
464
500
  parameters: PluginParameter<H>;
465
501
  skipped?: ReadonlySet<Plugin> | null;
466
- message: string;
467
502
  }): SafeParseResult<H>;
468
503
  /**
469
504
  * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
470
505
  */
471
506
  hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
472
507
  hookName,
473
- parameters,
474
- message
508
+ parameters
475
509
  }: {
476
510
  hookName: H;
477
511
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
478
- message: string;
479
512
  }): Promise<Awaited<TOuput>[]>;
480
513
  /**
481
514
  * Chains plugins
482
515
  */
483
516
  hookSeq<H extends PluginLifecycleHooks>({
484
517
  hookName,
485
- parameters,
486
- message
518
+ parameters
487
519
  }: {
488
520
  hookName: H;
489
521
  parameters?: PluginParameter<H>;
490
- message: string;
491
522
  }): Promise<void>;
492
523
  getPluginByKey(pluginKey: Plugin['key']): Plugin | undefined;
493
524
  getPluginsByKey(hookName: keyof PluginWithLifeCycle, pluginKey: Plugin['key']): Plugin[];
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from "node:url";
5
5
  import fs from "node:fs";
6
6
  import pkg from "handlebars";
7
7
 
8
- //#region ../../node_modules/.pnpm/tsdown@0.17.2_typescript@5.9.3/node_modules/tsdown/esm-shims.js
8
+ //#region ../../node_modules/.pnpm/tsdown@0.17.3_typescript@5.9.3/node_modules/tsdown/esm-shims.js
9
9
  const getFilename = () => fileURLToPath(import.meta.url);
10
10
  const getDirname = () => path.dirname(getFilename());
11
11
  const __dirname = /* @__PURE__ */ getDirname();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/tsdown@0.17.2_typescript@5.9.3/node_modules/tsdown/esm-shims.js","../src/redoc.tsx","../src/plugin.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import fs from 'node:fs'\nimport path from 'node:path'\nimport type { OasTypes } from '@kubb/oas'\nimport pkg from 'handlebars'\n\ntype BuildDocsOptions = {\n title?: string\n disableGoogleFont?: boolean\n templateOptions?: any\n}\n\nexport async function getPageHTML(api: OasTypes.OASDocument, { title, disableGoogleFont, templateOptions }: BuildDocsOptions = {}) {\n const templateFileName = path.join(__dirname, '../static/redoc.hbs')\n const template = pkg.compile(fs.readFileSync(templateFileName).toString())\n return template({\n title: title || api.info.title || 'ReDoc documentation',\n redocHTML: `\n <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n <div id=\"redoc-container\"></div>\n <script>\n const data = ${JSON.stringify(api, null, 2)};\n Redoc.init(data, {\n \"expandResponses\": \"200,400\"\n }, document.getElementById('redoc-container'))\n </script>\n `,\n disableGoogleFont,\n templateOptions,\n })\n}\n","import path from 'node:path'\nimport { definePlugin } from '@kubb/core'\nimport { pluginOasName } from '@kubb/plugin-oas'\nimport { getPageHTML } from './redoc.tsx'\nimport type { PluginRedoc } from './types.ts'\n\nfunction trimExtName(text: string): string {\n return text.replace(/\\.[^/.]+$/, '')\n}\n\nexport const pluginRedocName = 'plugin-redoc' satisfies PluginRedoc['name']\n\nexport const pluginRedoc = definePlugin<PluginRedoc>((options) => {\n const { output = { path: 'docs.html' } } = options\n\n return {\n name: pluginRedocName,\n options: {\n output,\n name: trimExtName(output.path),\n },\n pre: [pluginOasName],\n async install() {\n const oas = await this.getOas()\n await oas.dereference()\n\n const root = path.resolve(this.config.root, this.config.output.path)\n const pageHTML = await getPageHTML(oas.api)\n\n await this.addFile({\n baseName: 'docs.html',\n path: path.resolve(root, output.path || './docs.html'),\n sources: [\n {\n name: 'docs.html',\n value: pageHTML,\n },\n ],\n })\n },\n }\n})\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAIA,MAAM,oBAAoB,cAAc,OAAO,KAAK,IAAI;AACxD,MAAM,mBAAmB,KAAK,QAAQ,aAAa,CAAC;AAEpD,MAAa,YAA4B,4BAAY;;;;ACIrD,eAAsB,YAAY,KAA2B,EAAE,OAAO,mBAAmB,oBAAsC,EAAE,EAAE;CACjI,MAAM,mBAAmB,KAAK,KAAK,WAAW,sBAAsB;AAEpE,QADiB,IAAI,QAAQ,GAAG,aAAa,iBAAiB,CAAC,UAAU,CAAC,CAC1D;EACd,OAAO,SAAS,IAAI,KAAK,SAAS;EAClC,WAAW;;;;kBAIG,KAAK,UAAU,KAAK,MAAM,EAAE,CAAC;;;;;;EAM3C;EACA;EACD,CAAC;;;;;ACtBJ,SAAS,YAAY,MAAsB;AACzC,QAAO,KAAK,QAAQ,aAAa,GAAG;;AAGtC,MAAa,kBAAkB;AAE/B,MAAa,cAAc,cAA2B,YAAY;CAChE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,KAAK;AAE3C,QAAO;EACL,MAAM;EACN,SAAS;GACP;GACA,MAAM,YAAY,OAAO,KAAK;GAC/B;EACD,KAAK,CAAC,cAAc;EACpB,MAAM,UAAU;GACd,MAAM,MAAM,MAAM,KAAK,QAAQ;AAC/B,SAAM,IAAI,aAAa;GAEvB,MAAM,OAAO,KAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,WAAW,MAAM,YAAY,IAAI,IAAI;AAE3C,SAAM,KAAK,QAAQ;IACjB,UAAU;IACV,MAAM,KAAK,QAAQ,MAAM,OAAO,QAAQ,cAAc;IACtD,SAAS,CACP;KACE,MAAM;KACN,OAAO;KACR,CACF;IACF,CAAC;;EAEL;EACD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/tsdown@0.17.3_typescript@5.9.3/node_modules/tsdown/esm-shims.js","../src/redoc.tsx","../src/plugin.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import fs from 'node:fs'\nimport path from 'node:path'\nimport type { OasTypes } from '@kubb/oas'\nimport pkg from 'handlebars'\n\ntype BuildDocsOptions = {\n title?: string\n disableGoogleFont?: boolean\n templateOptions?: any\n}\n\nexport async function getPageHTML(api: OasTypes.OASDocument, { title, disableGoogleFont, templateOptions }: BuildDocsOptions = {}) {\n const templateFileName = path.join(__dirname, '../static/redoc.hbs')\n const template = pkg.compile(fs.readFileSync(templateFileName).toString())\n return template({\n title: title || api.info.title || 'ReDoc documentation',\n redocHTML: `\n <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n <div id=\"redoc-container\"></div>\n <script>\n const data = ${JSON.stringify(api, null, 2)};\n Redoc.init(data, {\n \"expandResponses\": \"200,400\"\n }, document.getElementById('redoc-container'))\n </script>\n `,\n disableGoogleFont,\n templateOptions,\n })\n}\n","import path from 'node:path'\nimport { definePlugin } from '@kubb/core'\nimport { pluginOasName } from '@kubb/plugin-oas'\nimport { getPageHTML } from './redoc.tsx'\nimport type { PluginRedoc } from './types.ts'\n\nfunction trimExtName(text: string): string {\n return text.replace(/\\.[^/.]+$/, '')\n}\n\nexport const pluginRedocName = 'plugin-redoc' satisfies PluginRedoc['name']\n\nexport const pluginRedoc = definePlugin<PluginRedoc>((options) => {\n const { output = { path: 'docs.html' } } = options\n\n return {\n name: pluginRedocName,\n options: {\n output,\n name: trimExtName(output.path),\n },\n pre: [pluginOasName],\n async install() {\n const oas = await this.getOas()\n await oas.dereference()\n\n const root = path.resolve(this.config.root, this.config.output.path)\n const pageHTML = await getPageHTML(oas.api)\n\n await this.addFile({\n baseName: 'docs.html',\n path: path.resolve(root, output.path || './docs.html'),\n sources: [\n {\n name: 'docs.html',\n value: pageHTML,\n },\n ],\n })\n },\n }\n})\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAIA,MAAM,oBAAoB,cAAc,OAAO,KAAK,IAAI;AACxD,MAAM,mBAAmB,KAAK,QAAQ,aAAa,CAAC;AAEpD,MAAa,YAA4B,4BAAY;;;;ACIrD,eAAsB,YAAY,KAA2B,EAAE,OAAO,mBAAmB,oBAAsC,EAAE,EAAE;CACjI,MAAM,mBAAmB,KAAK,KAAK,WAAW,sBAAsB;AAEpE,QADiB,IAAI,QAAQ,GAAG,aAAa,iBAAiB,CAAC,UAAU,CAAC,CAC1D;EACd,OAAO,SAAS,IAAI,KAAK,SAAS;EAClC,WAAW;;;;kBAIG,KAAK,UAAU,KAAK,MAAM,EAAE,CAAC;;;;;;EAM3C;EACA;EACD,CAAC;;;;;ACtBJ,SAAS,YAAY,MAAsB;AACzC,QAAO,KAAK,QAAQ,aAAa,GAAG;;AAGtC,MAAa,kBAAkB;AAE/B,MAAa,cAAc,cAA2B,YAAY;CAChE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,KAAK;AAE3C,QAAO;EACL,MAAM;EACN,SAAS;GACP;GACA,MAAM,YAAY,OAAO,KAAK;GAC/B;EACD,KAAK,CAAC,cAAc;EACpB,MAAM,UAAU;GACd,MAAM,MAAM,MAAM,KAAK,QAAQ;AAC/B,SAAM,IAAI,aAAa;GAEvB,MAAM,OAAO,KAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,WAAW,MAAM,YAAY,IAAI,IAAI;AAE3C,SAAM,KAAK,QAAQ;IACjB,UAAU;IACV,MAAM,KAAK,QAAQ,MAAM,OAAO,QAAQ,cAAc;IACtD,SAAS,CACP;KACE,MAAM;KACN,OAAO;KACR,CACF;IACF,CAAC;;EAEL;EACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-redoc",
3
- "version": "4.11.1",
3
+ "version": "4.11.2",
4
4
  "description": "Beautiful docs with Redoc",
5
5
  "keywords": [
6
6
  "typescript",
@@ -48,9 +48,9 @@
48
48
  "dependencies": {
49
49
  "@kubb/react-fabric": "0.5.4",
50
50
  "handlebars": "^4.7.8",
51
- "@kubb/core": "4.11.1",
52
- "@kubb/oas": "4.11.1",
53
- "@kubb/plugin-oas": "4.11.1"
51
+ "@kubb/core": "4.11.2",
52
+ "@kubb/oas": "4.11.2",
53
+ "@kubb/plugin-oas": "4.11.2"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@kubb/react-fabric": "0.5.4"