@kubb/plugin-redoc 4.5.4 → 4.5.6

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
@@ -24,9 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  let node_path = require("node:path");
25
25
  node_path = __toESM(node_path);
26
26
  let __kubb_core = require("@kubb/core");
27
- __kubb_core = __toESM(__kubb_core);
28
27
  let __kubb_plugin_oas = require("@kubb/plugin-oas");
29
- __kubb_plugin_oas = __toESM(__kubb_plugin_oas);
30
28
  let node_fs = require("node:fs");
31
29
  node_fs = __toESM(node_fs);
32
30
  let handlebars = require("handlebars");
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["path","pkg","fs","pluginOasName","path"],"sources":["../src/redoc.tsx","../src/plugin.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,eAAsB,YAAY,KAA2B,EAAE,OAAO,mBAAmB,oBAAsC,EAAE,EAAE;CACjI,MAAM,mBAAmBA,kBAAK,KAAK,WAAW,sBAAsB;AAEpE,QADiBC,mBAAI,QAAQC,gBAAG,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,6CAAyC,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,CAACC,gCAAc;EACpB,MAAM,UAAU;GACd,MAAM,MAAM,MAAM,KAAK,QAAQ;AAC/B,SAAM,IAAI,aAAa;GAEvB,MAAM,OAAOC,kBAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,WAAW,MAAM,YAAY,IAAI,IAAI;AAE3C,SAAM,KAAK,QAAQ;IACjB,UAAU;IACV,MAAMA,kBAAK,QAAQ,MAAM,OAAO,QAAQ,cAAc;IACtD,SAAS,CACP;KACE,MAAM;KACN,OAAO;KACR,CACF;IACF,CAAC;;EAEL;EACD"}
1
+ {"version":3,"file":"index.cjs","names":["path","pkg","fs","pluginOasName","path"],"sources":["../src/redoc.tsx","../src/plugin.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,eAAsB,YAAY,KAA2B,EAAE,OAAO,mBAAmB,oBAAsC,EAAE,EAAE;CACjI,MAAM,mBAAmBA,kBAAK,KAAK,WAAW,sBAAsB;AAEpE,QADiBC,mBAAI,QAAQC,gBAAG,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,6CAAyC,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,CAACC,gCAAc;EACpB,MAAM,UAAU;GACd,MAAM,MAAM,MAAM,KAAK,QAAQ;AAC/B,SAAM,IAAI,aAAa;GAEvB,MAAM,OAAOC,kBAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,WAAW,MAAM,YAAY,IAAI,IAAI;AAE3C,SAAM,KAAK,QAAQ;IACjB,UAAU;IACV,MAAMA,kBAAK,QAAQ,MAAM,OAAO,QAAQ,cAAc;IACtD,SAAS,CACP;KACE,MAAM;KACN,OAAO;KACR,CACF;IACF,CAAC;;EAEL;EACD"}
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.15.12_typescript@5.9.3/node_modules/tsdown/esm-shims.js
8
+ //#region ../../node_modules/.pnpm/tsdown@0.16.0_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.15.12_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.16.0_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.5.4",
3
+ "version": "4.5.6",
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.2.19",
50
50
  "handlebars": "^4.7.8",
51
- "@kubb/core": "4.5.4",
52
- "@kubb/oas": "4.5.4",
53
- "@kubb/plugin-oas": "4.5.4"
51
+ "@kubb/core": "4.5.6",
52
+ "@kubb/oas": "4.5.6",
53
+ "@kubb/plugin-oas": "4.5.6"
54
54
  },
55
55
  "devDependencies": {},
56
56
  "peerDependencies": {