From 92ee0ef25a89ff27e33114e27d8e04f63a621c18 Mon Sep 17 00:00:00 2001 From: Gijs de Man Date: Wed, 6 Dec 2023 11:42:34 +0100 Subject: [PATCH 1/6] Introduce clean function for escaping headers and descriptions --- .../src/markdown/createDeprecationNotice.ts | 4 ++-- .../src/markdown/createDescription.ts | 12 ++---------- .../src/markdown/createHeading.ts | 6 ++---- .../src/markdown/index.ts | 6 +++--- .../src/markdown/utils.ts | 14 ++++++++++++++ 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts index 525b40456..591fb0f52 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * ========================================================================== */ -import { guard, Props, render } from "./utils"; +import { clean, guard, Props, render } from "./utils"; function createAdmonition({ children }: Props) { return `:::caution deprecated\n\n${render(children)}\n\n:::`; @@ -23,7 +23,7 @@ export function createDeprecationNotice({ return guard(deprecated, () => createAdmonition({ children: - description ?? + clean(description) ?? "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", }) ); diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDescription.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDescription.ts index e41ce78f4..75c080c9b 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDescription.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDescription.ts @@ -5,16 +5,8 @@ * LICENSE file in the root directory of this source tree. * ========================================================================== */ -import { greaterThan, codeFence, lessThan } from "./utils"; +import { clean } from "./utils"; export function createDescription(description: string | undefined) { - if (!description) { - return ""; - } - return `\n\n${description - .replace(lessThan, "<") - .replace(greaterThan, ">") - .replace(codeFence, function (match) { - return match.replace(/\\>/g, ">"); - })}\n\n`; + return `\n\n${clean(description)}\n\n`; } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts index cd12286be..1ee3455ad 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts @@ -5,15 +5,13 @@ * LICENSE file in the root directory of this source tree. * ========================================================================== */ -import { create, greaterThan, lessThan } from "./utils"; +import { clean, create } from "./utils"; export function createHeading(heading: string) { return [ create("h1", { className: "openapi__heading", - children: `${heading - .replace(lessThan, "<") - .replace(greaterThan, ">")}`, + children: clean(heading), }), `\n\n`, ]; diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts index 4b6d4bd59..dc294d416 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts @@ -29,7 +29,7 @@ import { createStatusCodes } from "./createStatusCodes"; import { createTermsOfService } from "./createTermsOfService"; import { createVendorExtensions } from "./createVendorExtensions"; import { createVersionBadge } from "./createVersionBadge"; -import { greaterThan, lessThan, render } from "./utils"; +import { render } from "./utils"; interface Props { title: string; @@ -69,7 +69,7 @@ export function createApiPageMD({ `import SchemaItem from "@theme/SchemaItem";\n`, `import SchemaTabs from "@theme/SchemaTabs";\n`, `import TabItem from "@theme/TabItem";\n\n`, - createHeading(title.replace(lessThan, "<").replace(greaterThan, ">")), + createHeading(title), createMethodEndpoint(method, path), infoPath && createAuthorization(infoPath), frontMatter.show_extensions && createVendorExtensions(extensions), @@ -110,7 +110,7 @@ export function createInfoPageMD({ createVersionBadge(version), createDownload(downloadUrl), - createHeading(title.replace(lessThan, "<").replace(greaterThan, ">")), + createHeading(title), createLogo(logo, darkLogo), createDescription(description), createAuthentication(securitySchemes as unknown as SecuritySchemeObject), diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts index d40112988..4bf22ffae 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts @@ -50,3 +50,17 @@ export const lessThan = export const greaterThan = /(?/gu; export const codeFence = /`{1,3}[\s\S]*?`{1,3}/g; +export const curlyBrackets = /\{(.*)}/g; + +export function clean(value: string | undefined): string { + if (!value) { + return ""; + } + return value + .replace(lessThan, "<") + .replace(greaterThan, ">") + .replace(codeFence, function (match) { + return match.replace(/\\>/g, ">"); + }) + .replace(curlyBrackets, "\\{$1\\}"); +} From 647c5b3fe5c2cda9b5e1af7c5d0816e4b1f4b2eb Mon Sep 17 00:00:00 2001 From: Gijs de Man Date: Wed, 6 Dec 2023 13:16:08 +0100 Subject: [PATCH 2/6] Remove escape from codeblocks --- .../src/markdown/utils.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts index 4bf22ffae..4cd8d8ebb 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/utils.ts @@ -51,16 +51,24 @@ export const greaterThan = /(?/gu; export const codeFence = /`{1,3}[\s\S]*?`{1,3}/g; export const curlyBrackets = /\{(.*)}/g; +export const codeBlock = /^(```.*[\s\S]*?```)$/gm; export function clean(value: string | undefined): string { if (!value) { return ""; } - return value - .replace(lessThan, "<") - .replace(greaterThan, ">") - .replace(codeFence, function (match) { - return match.replace(/\\>/g, ">"); - }) - .replace(curlyBrackets, "\\{$1\\}"); + + let sections = value.split(codeBlock); + for (let sectionIndex in sections) { + if (!sections[sectionIndex].startsWith("```")) { + sections[sectionIndex] = sections[sectionIndex] + .replace(lessThan, "<") + .replace(greaterThan, ">") + .replace(codeFence, function (match) { + return match.replace(/\\>/g, ">"); + }) + .replace(curlyBrackets, "\\{$1\\}"); + } + } + return sections.join(""); } From d805ac9b4fcd7bded03822f7f19f4a00a613dda0 Mon Sep 17 00:00:00 2001 From: Gijs de Man Date: Wed, 6 Dec 2023 15:27:48 +0100 Subject: [PATCH 3/6] Add typing to sidebar generation --- .gitignore | 2 +- demo/docusaurus.config.js | 5 +- demo/package.json | 6 +- demo/{sidebars.js => sidebars.ts} | 28 +- .../src/index.ts | 24 +- .../src/sidebars/index.ts | 1 + yarn.lock | 699 ++++++++++++------ 7 files changed, 520 insertions(+), 245 deletions(-) rename demo/{sidebars.js => sidebars.ts} (84%) diff --git a/.gitignore b/.gitignore index bc9d2e278..af16a8c6b 100644 --- a/.gitignore +++ b/.gitignore @@ -137,6 +137,6 @@ dist demo/**/*.api.mdx demo/**/*.info.mdx demo/**/*.tag.mdx -demo/**/sidebar.js +demo/**/sidebar.ts demo/**/versions.json diff --git a/demo/docusaurus.config.js b/demo/docusaurus.config.js index f68e9d592..16a0794c0 100644 --- a/demo/docusaurus.config.js +++ b/demo/docusaurus.config.js @@ -22,15 +22,14 @@ const config = { ({ docs: { routeBasePath: "/", - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: "./sidebars.ts", editUrl: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/tree/main/demo", - // docRootComponent: "@theme/DocPage", docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi }, blog: false, theme: { - customCss: require.resolve("./src/css/custom.css"), + customCss: "./src/css/custom.css", }, gtag: { trackingID: "GTM-THVM29S", diff --git a/demo/package.json b/demo/package.json index e4fbe25e4..9504d84fe 100644 --- a/demo/package.json +++ b/demo/package.json @@ -21,9 +21,9 @@ "re-gen": "yarn clean-all && yarn gen-all" }, "dependencies": { - "@docusaurus/core": "3.0.0", - "@docusaurus/plugin-google-gtag": "3.0.0", - "@docusaurus/preset-classic": "3.0.0", + "@docusaurus/core": "3.0.1", + "@docusaurus/plugin-google-gtag": "3.0.1", + "@docusaurus/preset-classic": "3.0.1", "clsx": "^1.1.1", "docusaurus-plugin-openapi-docs": "^3.0.0-beta.2", "docusaurus-theme-openapi-docs": "^3.0.0-beta.2", diff --git a/demo/sidebars.js b/demo/sidebars.ts similarity index 84% rename from demo/sidebars.js rename to demo/sidebars.ts index c9755b4ec..a2faca13f 100644 --- a/demo/sidebars.js +++ b/demo/sidebars.ts @@ -8,13 +8,21 @@ Create as many sidebars as you want. */ -const petstoreVersions = require("./docs/petstore_versioned/versions.json"); -const { - versionSelector, +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; + +import petstoreVersions from "./docs/petstore_versioned/versions.json"; +import { versionCrumb, -} = require("docusaurus-plugin-openapi-docs/lib/sidebars/utils"); + versionSelector, +} from "docusaurus-plugin-openapi-docs/lib/sidebars/utils"; + +import petstoreSidebar from "./docs/petstore/sidebar"; +import petstoreVersionedSidebar from "./docs/petstore_versioned/sidebar"; +import petstoreVersionSidebar from "./docs/petstore_versioned/1.0.0/sidebar"; + +import cloudObjectStorageSidebar from "./docs/cos/sidebar"; -const sidebars = { +const sidebars: SidebarsConfig = { tutorialSidebar: [ { type: "html", @@ -58,7 +66,7 @@ const sidebars = { "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", slug: "/category/petstore-api", }, - items: require("./docs/petstore/sidebar.js"), + items: petstoreSidebar, }, { type: "category", @@ -68,7 +76,7 @@ const sidebars = { title: "Cloud Object Storage API", slug: "/category/cos-api", }, - items: require("./docs/cos/sidebar.js"), + items: cloudObjectStorageSidebar, }, { type: "category", @@ -123,7 +131,7 @@ const sidebars = { "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", slug: "/category/petstore-versioned-api", }, - items: require("./docs/petstore_versioned/sidebar.js"), + items: petstoreVersionedSidebar, }, ], @@ -149,9 +157,9 @@ const sidebars = { "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", slug: "/category/petstore-api-1.0.0", }, - items: require("./docs/petstore_versioned/1.0.0/sidebar.js"), + items: petstoreVersionSidebar, }, ], }; -module.exports = sidebars; +export default sidebars; diff --git a/packages/docusaurus-plugin-openapi-docs/src/index.ts b/packages/docusaurus-plugin-openapi-docs/src/index.ts index ea679f25b..e947b1ecc 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/index.ts @@ -144,21 +144,23 @@ export default function pluginOpenAPIDocs( docPath ); - const sidebarSliceTemplate = `module.exports = {{{slice}}};`; + let sidebarSliceTemplate = `import {SidebarConfig} from "@docusaurus/plugin-content-docs/src/sidebars/types";\n\n`; + sidebarSliceTemplate += `const sidebar: SidebarConfig = {{{slice}}};\n\n`; + sidebarSliceTemplate += `export default sidebar;`; const view = render(sidebarSliceTemplate, { - slice: JSON.stringify(sidebarSlice), + slice: JSON.stringify(sidebarSlice, null, 2), }); - if (!fs.existsSync(`${outputDir}/sidebar.js`)) { + if (!fs.existsSync(`${outputDir}/sidebar.ts`)) { try { - fs.writeFileSync(`${outputDir}/sidebar.js`, view, "utf8"); + fs.writeFileSync(`${outputDir}/sidebar.ts`, view, "utf8"); console.log( - chalk.green(`Successfully created "${outputDir}/sidebar.js"`) + chalk.green(`Successfully created "${outputDir}/sidebar.ts"`) ); } catch (err) { console.error( - chalk.red(`Failed to write "${outputDir}/sidebar.js"`), + chalk.red(`Failed to write "${outputDir}/sidebar.ts"`), chalk.yellow(err) ); } @@ -380,7 +382,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; cwd: path.resolve(apiDir), deep: 1, }); - const sidebarFile = await Globby(["sidebar.js"], { + const sidebarFile = await Globby(["sidebar.ts"], { cwd: path.resolve(apiDir), deep: 1, }); @@ -461,7 +463,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; cli .command(`gen-api-docs`) .description( - `Generates OpenAPI docs in MDX file format and sidebar.js (if enabled).` + `Generates OpenAPI docs in MDX file format and sidebar.ts (if enabled).` ) .usage("") .arguments("") @@ -519,7 +521,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; cli .command(`gen-api-docs:version`) .description( - `Generates versioned OpenAPI docs in MDX file format, versions.js and sidebar.js (if enabled).` + `Generates versioned OpenAPI docs in MDX file format, versions.js and sidebar.ts (if enabled).` ) .usage("") .arguments("") @@ -610,7 +612,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; cli .command(`clean-api-docs`) .description( - `Clears the generated OpenAPI docs MDX files and sidebar.js (if enabled).` + `Clears the generated OpenAPI docs MDX files and sidebar.ts (if enabled).` ) .usage("") .arguments("") @@ -661,7 +663,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; cli .command(`clean-api-docs:version`) .description( - `Clears the versioned, generated OpenAPI docs MDX files, versions.json and sidebar.js (if enabled).` + `Clears the versioned, generated OpenAPI docs MDX files, versions.json and sidebar.ts (if enabled).` ) .usage("") .arguments("") diff --git a/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts b/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts index 285415ead..b3e62abf3 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts @@ -228,5 +228,6 @@ export default function generateSidebarSlice( docPath ); } + return sidebarSlice; } diff --git a/yarn.lock b/yarn.lock index b26f5e22e..6fead2930 100644 --- a/yarn.lock +++ b/yarn.lock @@ -187,6 +187,14 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0", "@babel/compat-data@^7.20.1": version "7.20.1" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30" @@ -239,6 +247,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.23.3": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz#6e23f2acbcb77ad283c5ed141f824fd9f70101c7" + integrity sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.5" + "@babel/parser" "^7.23.5" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.7.2": version "7.20.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8" @@ -258,6 +287,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz#17d0a1ea6b62f351d281350a5f80b87a810c4755" + integrity sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA== + dependencies: + "@babel/types" "^7.23.5" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -591,6 +630,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" @@ -648,6 +692,15 @@ "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" +"@babel/helpers@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz#52f522840df8f1a848d06ea6a79b79eefa72401e" + integrity sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -666,6 +719,15 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2", "@babel/parser@^7.7.0": version "7.20.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" @@ -676,6 +738,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.3.tgz#0ce0be31a4ca4f1884b5786057cadcb6c3be58f9" integrity sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw== +"@babel/parser@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563" + integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -2077,6 +2144,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz#f546bf9aba9ef2b042c0e00d245990c15508e7ec" + integrity sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.5" + "@babel/types" "^7.23.5" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" @@ -2095,6 +2178,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.23.5": + version "7.23.5" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz#48d730a00c95109fa4393352705954d74fb5b602" + integrity sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -2233,6 +2325,81 @@ webpack-merge "^5.9.0" webpackbar "^5.0.2" +"@docusaurus/core@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/core/-/core-3.0.1.tgz#ad9a66b20802ea81b25e65db75d4ca952eda7e01" + integrity sha512-CXrLpOnW+dJdSv8M5FAJ3JBwXtL6mhUWxFA8aS0ozK6jBG/wgxERk5uvH28fCeFxOGbAT9v1e9dOMo1X2IEVhQ== + dependencies: + "@babel/core" "^7.23.3" + "@babel/generator" "^7.23.3" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-runtime" "^7.22.9" + "@babel/preset-env" "^7.22.9" + "@babel/preset-react" "^7.22.5" + "@babel/preset-typescript" "^7.22.5" + "@babel/runtime" "^7.22.6" + "@babel/runtime-corejs3" "^7.22.6" + "@babel/traverse" "^7.22.8" + "@docusaurus/cssnano-preset" "3.0.1" + "@docusaurus/logger" "3.0.1" + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/react-loadable" "5.5.2" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-common" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" + "@slorber/static-site-generator-webpack-plugin" "^4.0.7" + "@svgr/webpack" "^6.5.1" + autoprefixer "^10.4.14" + babel-loader "^9.1.3" + babel-plugin-dynamic-import-node "^2.3.3" + boxen "^6.2.1" + chalk "^4.1.2" + chokidar "^3.5.3" + clean-css "^5.3.2" + cli-table3 "^0.6.3" + combine-promises "^1.1.0" + commander "^5.1.0" + copy-webpack-plugin "^11.0.0" + core-js "^3.31.1" + css-loader "^6.8.1" + css-minimizer-webpack-plugin "^4.2.2" + cssnano "^5.1.15" + del "^6.1.1" + detect-port "^1.5.1" + escape-html "^1.0.3" + eta "^2.2.0" + file-loader "^6.2.0" + fs-extra "^11.1.1" + html-minifier-terser "^7.2.0" + html-tags "^3.3.1" + html-webpack-plugin "^5.5.3" + leven "^3.1.0" + lodash "^4.17.21" + mini-css-extract-plugin "^2.7.6" + postcss "^8.4.26" + postcss-loader "^7.3.3" + prompts "^2.4.2" + react-dev-utils "^12.0.1" + react-helmet-async "^1.3.0" + react-loadable "npm:@docusaurus/react-loadable@5.5.2" + react-loadable-ssr-addon-v5-slorber "^1.0.1" + react-router "^5.3.4" + react-router-config "^5.1.1" + react-router-dom "^5.3.4" + rtl-detect "^1.0.4" + semver "^7.5.4" + serve-handler "^6.1.5" + shelljs "^0.8.5" + terser-webpack-plugin "^5.3.9" + tslib "^2.6.0" + update-notifier "^6.0.2" + url-loader "^4.1.1" + webpack "^5.88.1" + webpack-bundle-analyzer "^4.9.0" + webpack-dev-server "^4.15.1" + webpack-merge "^5.9.0" + webpackbar "^5.0.2" + "@docusaurus/cssnano-preset@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.0.0.tgz#87fbf9cbc7c383e207119b44c17fb1d05c73af7c" @@ -2243,6 +2410,16 @@ postcss-sort-media-queries "^4.4.1" tslib "^2.6.0" +"@docusaurus/cssnano-preset@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.0.1.tgz#22fbf2e97389e338747864baf011743846e8fd26" + integrity sha512-wjuXzkHMW+ig4BD6Ya1Yevx9UJadO4smNZCEljqBoQfIQrQskTswBs7lZ8InHP7mCt273a/y/rm36EZhqJhknQ== + dependencies: + cssnano-preset-advanced "^5.3.10" + postcss "^8.4.26" + postcss-sort-media-queries "^4.4.1" + tslib "^2.6.0" + "@docusaurus/logger@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.0.0.tgz#02a4bfecec6aa3732c8bd9597ca9d5debab813a6" @@ -2251,6 +2428,14 @@ chalk "^4.1.2" tslib "^2.6.0" +"@docusaurus/logger@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.0.1.tgz#06f512eef6c6ae4e2da63064257e01b1cdc41a82" + integrity sha512-I5L6Nk8OJzkVA91O2uftmo71LBSxe1vmOn9AMR6JRCzYeEBrqneWMH02AqMvjJ2NpMiviO+t0CyPjyYV7nxCWQ== + dependencies: + chalk "^4.1.2" + tslib "^2.6.0" + "@docusaurus/mdx-loader@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.0.0.tgz#2593889e43dc4bbd8dfa074d86c8bb4206cf4171" @@ -2283,6 +2468,38 @@ vfile "^6.0.1" webpack "^5.88.1" +"@docusaurus/mdx-loader@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.0.1.tgz#89f221e5bcc570983fd61d7ab56d6fbe36810b59" + integrity sha512-ldnTmvnvlrONUq45oKESrpy+lXtbnTcTsFkOTIDswe5xx5iWJjt6eSa0f99ZaWlnm24mlojcIGoUWNCS53qVlQ== + dependencies: + "@babel/parser" "^7.22.7" + "@babel/traverse" "^7.22.8" + "@docusaurus/logger" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" + "@mdx-js/mdx" "^3.0.0" + "@slorber/remark-comment" "^1.0.0" + escape-html "^1.0.3" + estree-util-value-to-estree "^3.0.1" + file-loader "^6.2.0" + fs-extra "^11.1.1" + image-size "^1.0.2" + mdast-util-mdx "^3.0.0" + mdast-util-to-string "^4.0.0" + rehype-raw "^7.0.0" + remark-directive "^3.0.0" + remark-emoji "^4.0.0" + remark-frontmatter "^5.0.0" + remark-gfm "^4.0.0" + stringify-object "^3.3.0" + tslib "^2.6.0" + unified "^11.0.3" + unist-util-visit "^5.0.0" + url-loader "^4.1.1" + vfile "^6.0.1" + webpack "^5.88.1" + "@docusaurus/module-type-aliases@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.0.0.tgz#9a7dd323bb87ca666eb4b0b4b90d04425f2e05d6" @@ -2297,6 +2514,20 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" +"@docusaurus/module-type-aliases@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.0.1.tgz#d45990fe377d7ffaa68841cf89401188a5d65293" + integrity sha512-DEHpeqUDsLynl3AhQQiO7AbC7/z/lBra34jTcdYuvp9eGm01pfH1wTVq8YqWZq6Jyx0BgcVl/VJqtE9StRd9Ag== + dependencies: + "@docusaurus/react-loadable" "5.5.2" + "@docusaurus/types" "3.0.1" + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router-config" "*" + "@types/react-router-dom" "*" + react-helmet-async "*" + react-loadable "npm:@docusaurus/react-loadable@5.5.2" + "@docusaurus/plugin-content-blog@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.0.0.tgz#5f3ede003b2b7103043918fbe3f436c116839ca8" @@ -2320,6 +2551,29 @@ utility-types "^3.10.0" webpack "^5.88.1" +"@docusaurus/plugin-content-blog@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.0.1.tgz#dee6147187c2d8b634252444d60312d12c9571a6" + integrity sha512-cLOvtvAyaMQFLI8vm4j26svg3ktxMPSXpuUJ7EERKoGbfpJSsgtowNHcRsaBVmfuCsRSk1HZ/yHBsUkTmHFEsg== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/logger" "3.0.1" + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-common" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" + cheerio "^1.0.0-rc.12" + feed "^4.2.2" + fs-extra "^11.1.1" + lodash "^4.17.21" + reading-time "^1.5.0" + srcset "^4.0.0" + tslib "^2.6.0" + unist-util-visit "^5.0.0" + utility-types "^3.10.0" + webpack "^5.88.1" + "@docusaurus/plugin-content-docs@3.0.0", "@docusaurus/plugin-content-docs@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.0.0.tgz#b579c65d7386905890043bdd4a8f9da3194e90fa" @@ -2341,6 +2595,27 @@ utility-types "^3.10.0" webpack "^5.88.1" +"@docusaurus/plugin-content-docs@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.0.1.tgz#d9b1884562186573d5c4521ac3546b68512c1126" + integrity sha512-dRfAOA5Ivo+sdzzJGXEu33yAtvGg8dlZkvt/NEJ7nwi1F2j4LEdsxtfX2GKeETB2fP6XoGNSQnFXqa2NYGrHFg== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/logger" "3.0.1" + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/module-type-aliases" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" + "@types/react-router-config" "^5.0.7" + combine-promises "^1.1.0" + fs-extra "^11.1.1" + js-yaml "^4.1.0" + lodash "^4.17.21" + tslib "^2.6.0" + utility-types "^3.10.0" + webpack "^5.88.1" + "@docusaurus/plugin-content-pages@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.0.0.tgz#519a946a477a203989080db70dd787cb6db15fab" @@ -2355,82 +2630,96 @@ tslib "^2.6.0" webpack "^5.88.1" -"@docusaurus/plugin-debug@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.0.0.tgz#9c6d4abfd5357dbebccf5b41f5aefc06116e03e3" - integrity sha512-gSV07HfQgnUboVEb3lucuVyv5pEoy33E7QXzzn++3kSc/NLEimkjXh3sSnTGOishkxCqlFV9BHfY/VMm5Lko5g== +"@docusaurus/plugin-content-pages@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.0.1.tgz#27e6424c77173f867760efe53f848bbab8849ea6" + integrity sha512-oP7PoYizKAXyEttcvVzfX3OoBIXEmXTMzCdfmC4oSwjG4SPcJsRge3mmI6O8jcZBgUPjIzXD21bVGWEE1iu8gg== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" + fs-extra "^11.1.1" + tslib "^2.6.0" + webpack "^5.88.1" + +"@docusaurus/plugin-debug@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-3.0.1.tgz#886b5dd03c066e970484ca251c1b79613df90700" + integrity sha512-09dxZMdATky4qdsZGzhzlUvvC+ilQ2hKbYF+wez+cM2mGo4qHbv8+qKXqxq0CQZyimwlAOWQLoSozIXU0g0i7g== dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils" "3.0.0" - "@microlink/react-json-view" "^1.22.2" + "@docusaurus/core" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" fs-extra "^11.1.1" + react-json-view-lite "^1.2.0" tslib "^2.6.0" -"@docusaurus/plugin-google-analytics@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.0.0.tgz#8a54f5e21b55c133b6be803ac51bf92d4a515cca" - integrity sha512-0zcLK8w+ohmSm1fjUQCqeRsjmQc0gflvXnaVA/QVVCtm2yCiBtkrSGQXqt4MdpD7Xq8mwo3qVd5nhIcvrcebqw== +"@docusaurus/plugin-google-analytics@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.0.1.tgz#ec69902131ea3aad8b062eeb1d17bf0962986f80" + integrity sha512-jwseSz1E+g9rXQwDdr0ZdYNjn8leZBnKPjjQhMBEiwDoenL3JYFcNW0+p0sWoVF/f2z5t7HkKA+cYObrUh18gg== dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" + "@docusaurus/core" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" tslib "^2.6.0" -"@docusaurus/plugin-google-gtag@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.0.0.tgz#a4c407b80cb46773bea070816ebb547c5663f0b3" - integrity sha512-asEKavw8fczUqvXu/s9kG2m1epLnHJ19W6CCCRZEmpnkZUZKiM8rlkDiEmxApwIc2JDDbIMk+Y2TMkJI8mInbQ== +"@docusaurus/plugin-google-gtag@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.0.1.tgz#bb5526377d3a324ebec235127846fda386562b05" + integrity sha512-UFTDvXniAWrajsulKUJ1DB6qplui1BlKLQZjX4F7qS/qfJ+qkKqSkhJ/F4VuGQ2JYeZstYb+KaUzUzvaPK1aRQ== dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" + "@docusaurus/core" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" "@types/gtag.js" "^0.0.12" tslib "^2.6.0" -"@docusaurus/plugin-google-tag-manager@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.0.0.tgz#8befa315b4747618e9ea65add3f2f4e84df2c7ba" - integrity sha512-lytgu2eyn+7p4WklJkpMGRhwC29ezj4IjPPmVJ8vGzcSl6JkR1sADTHLG5xWOMuci420xZl9dGEiLTQ8FjCRyA== +"@docusaurus/plugin-google-tag-manager@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.0.1.tgz#4e36d13279cf90c2614b62438aa1109dd4696ec8" + integrity sha512-IPFvuz83aFuheZcWpTlAdiiX1RqWIHM+OH8wS66JgwAKOiQMR3+nLywGjkLV4bp52x7nCnwhNk1rE85Cpy/CIw== dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" + "@docusaurus/core" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" tslib "^2.6.0" -"@docusaurus/plugin-sitemap@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.0.0.tgz#91f300e500d476252ea2f40449ee828766b9b9d6" - integrity sha512-cfcONdWku56Oi7Hdus2uvUw/RKRRlIGMViiHLjvQ21CEsEqnQ297MRoIgjU28kL7/CXD/+OiANSq3T1ezAiMhA== - dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/logger" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils" "3.0.0" - "@docusaurus/utils-common" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" +"@docusaurus/plugin-sitemap@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.0.1.tgz#ab55857e90d4500f892e110b30e4bc3289202bd4" + integrity sha512-xARiWnjtVvoEniZudlCq5T9ifnhCu/GAZ5nA7XgyLfPcNpHQa241HZdsTlLtVcecEVVdllevBKOp7qknBBaMGw== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/logger" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-common" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" fs-extra "^11.1.1" sitemap "^7.1.1" tslib "^2.6.0" -"@docusaurus/preset-classic@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.0.0.tgz#b05c3960c4d0a731b2feb97e94e3757ab073c611" - integrity sha512-90aOKZGZdi0+GVQV+wt8xx4M4GiDrBRke8NO8nWwytMEXNrxrBxsQYFRD1YlISLJSCiHikKf3Z/MovMnQpnZyg== - dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/plugin-content-blog" "3.0.0" - "@docusaurus/plugin-content-docs" "3.0.0" - "@docusaurus/plugin-content-pages" "3.0.0" - "@docusaurus/plugin-debug" "3.0.0" - "@docusaurus/plugin-google-analytics" "3.0.0" - "@docusaurus/plugin-google-gtag" "3.0.0" - "@docusaurus/plugin-google-tag-manager" "3.0.0" - "@docusaurus/plugin-sitemap" "3.0.0" - "@docusaurus/theme-classic" "3.0.0" - "@docusaurus/theme-common" "3.0.0" - "@docusaurus/theme-search-algolia" "3.0.0" - "@docusaurus/types" "3.0.0" +"@docusaurus/preset-classic@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.0.1.tgz#d363ac837bba967095ed2a896d13c54f3717d6b5" + integrity sha512-il9m9xZKKjoXn6h0cRcdnt6wce0Pv1y5t4xk2Wx7zBGhKG1idu4IFHtikHlD0QPuZ9fizpXspXcTzjL5FXc1Gw== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/plugin-content-blog" "3.0.1" + "@docusaurus/plugin-content-docs" "3.0.1" + "@docusaurus/plugin-content-pages" "3.0.1" + "@docusaurus/plugin-debug" "3.0.1" + "@docusaurus/plugin-google-analytics" "3.0.1" + "@docusaurus/plugin-google-gtag" "3.0.1" + "@docusaurus/plugin-google-tag-manager" "3.0.1" + "@docusaurus/plugin-sitemap" "3.0.1" + "@docusaurus/theme-classic" "3.0.1" + "@docusaurus/theme-common" "3.0.1" + "@docusaurus/theme-search-algolia" "3.0.1" + "@docusaurus/types" "3.0.1" "@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": version "5.5.2" @@ -2440,38 +2729,59 @@ "@types/react" "*" prop-types "^15.6.2" -"@docusaurus/theme-classic@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.0.0.tgz#a47eda40747e1a6f79190e6bb786d3a7fc4e06b2" - integrity sha512-wWOHSrKMn7L4jTtXBsb5iEJ3xvTddBye5PjYBnWiCkTAlhle2yMdc4/qRXW35Ot+OV/VXu6YFG8XVUJEl99z0A== - dependencies: - "@docusaurus/core" "3.0.0" - "@docusaurus/mdx-loader" "3.0.0" - "@docusaurus/module-type-aliases" "3.0.0" - "@docusaurus/plugin-content-blog" "3.0.0" - "@docusaurus/plugin-content-docs" "3.0.0" - "@docusaurus/plugin-content-pages" "3.0.0" - "@docusaurus/theme-common" "3.0.0" - "@docusaurus/theme-translations" "3.0.0" - "@docusaurus/types" "3.0.0" - "@docusaurus/utils" "3.0.0" - "@docusaurus/utils-common" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" +"@docusaurus/theme-classic@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.0.1.tgz#3ba4dc77553d2c1608e433c0d01bed7c6db14eb9" + integrity sha512-XD1FRXaJiDlmYaiHHdm27PNhhPboUah9rqIH0lMpBt5kYtsGjJzhqa27KuZvHLzOP2OEpqd2+GZ5b6YPq7Q05Q== + dependencies: + "@docusaurus/core" "3.0.1" + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/module-type-aliases" "3.0.1" + "@docusaurus/plugin-content-blog" "3.0.1" + "@docusaurus/plugin-content-docs" "3.0.1" + "@docusaurus/plugin-content-pages" "3.0.1" + "@docusaurus/theme-common" "3.0.1" + "@docusaurus/theme-translations" "3.0.1" + "@docusaurus/types" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-common" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" "@mdx-js/react" "^3.0.0" - clsx "^1.2.1" + clsx "^2.0.0" copy-text-to-clipboard "^3.2.0" infima "0.2.0-alpha.43" lodash "^4.17.21" nprogress "^0.2.0" postcss "^8.4.26" - prism-react-renderer "^2.1.0" + prism-react-renderer "^2.3.0" prismjs "^1.29.0" react-router-dom "^5.3.4" rtlcss "^4.1.0" tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-common@3.0.0", "@docusaurus/theme-common@^3.0.0": +"@docusaurus/theme-common@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.0.1.tgz#29a5bcb286296a52bc10afa5308e360cbed6b49c" + integrity sha512-cr9TOWXuIOL0PUfuXv6L5lPlTgaphKP+22NdVBOYah5jSq5XAAulJTjfe+IfLsEG4L7lJttLbhW7LXDFSAI7Ag== + dependencies: + "@docusaurus/mdx-loader" "3.0.1" + "@docusaurus/module-type-aliases" "3.0.1" + "@docusaurus/plugin-content-blog" "3.0.1" + "@docusaurus/plugin-content-docs" "3.0.1" + "@docusaurus/plugin-content-pages" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-common" "3.0.1" + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router-config" "*" + clsx "^2.0.0" + parse-numeric-range "^1.3.0" + prism-react-renderer "^2.3.0" + tslib "^2.6.0" + utility-types "^3.10.0" + +"@docusaurus/theme-common@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.0.0.tgz#6dc8c39a7458dd39f95a2fa6eb1c6aaf32b7e103" integrity sha512-PahRpCLRK5owCMEqcNtUeTMOkTUCzrJlKA+HLu7f+8osYOni617YurXvHASCsSTxurjXaLz/RqZMnASnqATxIA== @@ -2492,32 +2802,32 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-search-algolia@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.0.0.tgz#20701c2e7945a236df401365271b511a24ff3cad" - integrity sha512-PyMUNIS9yu0dx7XffB13ti4TG47pJq3G2KE/INvOFb6M0kWh+wwCnucPg4WAOysHOPh+SD9fjlXILoLQstgEIA== +"@docusaurus/theme-search-algolia@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.0.1.tgz#d8fb6bddca8d8355e4706c4c7d30d3b800217cf4" + integrity sha512-DDiPc0/xmKSEdwFkXNf1/vH1SzJPzuJBar8kMcBbDAZk/SAmo/4lf6GU2drou4Ae60lN2waix+jYWTWcJRahSA== dependencies: "@docsearch/react" "^3.5.2" - "@docusaurus/core" "3.0.0" - "@docusaurus/logger" "3.0.0" - "@docusaurus/plugin-content-docs" "3.0.0" - "@docusaurus/theme-common" "3.0.0" - "@docusaurus/theme-translations" "3.0.0" - "@docusaurus/utils" "3.0.0" - "@docusaurus/utils-validation" "3.0.0" + "@docusaurus/core" "3.0.1" + "@docusaurus/logger" "3.0.1" + "@docusaurus/plugin-content-docs" "3.0.1" + "@docusaurus/theme-common" "3.0.1" + "@docusaurus/theme-translations" "3.0.1" + "@docusaurus/utils" "3.0.1" + "@docusaurus/utils-validation" "3.0.1" algoliasearch "^4.18.0" algoliasearch-helper "^3.13.3" - clsx "^1.2.1" + clsx "^2.0.0" eta "^2.2.0" fs-extra "^11.1.1" lodash "^4.17.21" tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.0.0.tgz#98590b80589f15b2064e0daa2acc3a82d126f53b" - integrity sha512-p/H3+5LdnDtbMU+csYukA6601U1ld2v9knqxGEEV96qV27HsHfP63J9Ta2RBZUrNhQAgrwFzIc9GdDO8P1Baag== +"@docusaurus/theme-translations@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-3.0.1.tgz#837a01a166ccd698a3eceaed0c2f798555bc024b" + integrity sha512-6UrbpzCTN6NIJnAtZ6Ne9492vmPVX+7Fsz4kmp+yor3KQwA1+MCzQP7ItDNkP38UmVLnvB/cYk/IvehCUqS3dg== dependencies: fs-extra "^11.1.1" tslib "^2.6.0" @@ -2536,6 +2846,20 @@ webpack "^5.88.1" webpack-merge "^5.9.0" +"@docusaurus/types@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/types/-/types-3.0.1.tgz#4fe306aa10ef7c97dbc07588864f6676a40f3b6f" + integrity sha512-plyX2iU1tcUsF46uQ01pAd4JhexR7n0iiQ5MSnBFX6M6NSJgDYdru/i1/YNPKOnQHBoXGLHv0dNT6OAlDWNjrg== + dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" + commander "^5.1.0" + joi "^17.9.2" + react-helmet-async "^1.3.0" + utility-types "^3.10.0" + webpack "^5.88.1" + webpack-merge "^5.9.0" + "@docusaurus/utils-common@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.0.0.tgz#fb019e5228b20852a5b98f50672a02843a03ba03" @@ -2543,6 +2867,13 @@ dependencies: tslib "^2.6.0" +"@docusaurus/utils-common@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.0.1.tgz#111f450089d5f0a290c0c25f8a574a270d08436f" + integrity sha512-W0AxD6w6T8g6bNro8nBRWf7PeZ/nn7geEWM335qHU2DDDjHuV4UZjgUGP1AQsdcSikPrlIqTJJbKzer1lRSlIg== + dependencies: + tslib "^2.6.0" + "@docusaurus/utils-validation@3.0.0", "@docusaurus/utils-validation@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.0.0.tgz#56f3ba89ceba9826989408a96827897c0b724612" @@ -2554,6 +2885,17 @@ js-yaml "^4.1.0" tslib "^2.6.0" +"@docusaurus/utils-validation@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.0.1.tgz#3c5f12941b328a19fc9acb34d070219f3e865ec6" + integrity sha512-ujTnqSfyGQ7/4iZdB4RRuHKY/Nwm58IIb+41s5tCXOv/MBU2wGAjOHq3U+AEyJ8aKQcHbxvTKJaRchNHYUVUQg== + dependencies: + "@docusaurus/logger" "3.0.1" + "@docusaurus/utils" "3.0.1" + joi "^17.9.2" + js-yaml "^4.1.0" + tslib "^2.6.0" + "@docusaurus/utils@3.0.0", "@docusaurus/utils@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.0.0.tgz#2ef0c8e434036fe104dca4c694fd50022b2ba1ed" @@ -2577,6 +2919,29 @@ url-loader "^4.1.1" webpack "^5.88.1" +"@docusaurus/utils@3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.0.1.tgz#c64f68980a90c5bc6d53a5b8f32deb9026b1e303" + integrity sha512-TwZ33Am0q4IIbvjhUOs+zpjtD/mXNmLmEgeTGuRq01QzulLHuPhaBTTAC/DHu6kFx3wDgmgpAlaRuCHfTcXv8g== + dependencies: + "@docusaurus/logger" "3.0.1" + "@svgr/webpack" "^6.5.1" + escape-string-regexp "^4.0.0" + file-loader "^6.2.0" + fs-extra "^11.1.1" + github-slugger "^1.5.0" + globby "^11.1.0" + gray-matter "^4.0.3" + jiti "^1.20.0" + js-yaml "^4.1.0" + lodash "^4.17.21" + micromatch "^4.0.5" + resolve-pathname "^3.0.0" + shelljs "^0.8.5" + tslib "^2.6.0" + url-loader "^4.1.1" + webpack "^5.88.1" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -3662,16 +4027,6 @@ dependencies: "@types/mdx" "^2.0.0" -"@microlink/react-json-view@^1.22.2": - version "1.23.0" - resolved "https://registry.yarnpkg.com/@microlink/react-json-view/-/react-json-view-1.23.0.tgz#641c2483b1a0014818303d4e9cce634d5dacc7e9" - integrity sha512-HYJ1nsfO4/qn8afnAMhuk7+5a1vcjEaS8Gm5Vpr1SqdHDY0yLBJGpA+9DvKyxyVKaUkXzKXt3Mif9RcmFSdtYg== - dependencies: - flux "~4.0.1" - react-base16-styling "~0.6.0" - react-lifecycles-compat "~3.0.4" - react-textarea-autosize "~8.3.2" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -5637,7 +5992,7 @@ arrify@^2.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asap@^2.0.0, asap@~2.0.3: +asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== @@ -5929,11 +6284,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base16@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" - integrity sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ== - base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -6646,6 +6996,11 @@ clsx@^1.1.1, clsx@^1.2.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== +clsx@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" + integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== + cmd-shim@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-5.0.0.tgz#8d0aaa1a6b0708630694c4dbde070ed94c707724" @@ -7151,13 +7506,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -8775,31 +9123,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fbemitter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fbemitter/-/fbemitter-3.0.0.tgz#00b2a1af5411254aab416cd75f9e6289bee4bff3" - integrity sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw== - dependencies: - fbjs "^3.0.0" - -fbjs-css-vars@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" - integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== - -fbjs@^3.0.0, fbjs@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6" - integrity sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ== - dependencies: - cross-fetch "^3.1.5" - fbjs-css-vars "^1.0.0" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.30" - fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -8947,14 +9270,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -flux@~4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/flux/-/flux-4.0.4.tgz#9661182ea81d161ee1a6a6af10d20485ef2ac572" - integrity sha512-NCj3XlayA2UsapRpM7va6wU1+9rE5FIL7qoMcmxWHRzbp0yujihMBm9BBHZ1MDIk5h5o2Bl6eGiCe8rYELAmYw== - dependencies: - fbemitter "^3.0.0" - fbjs "^3.0.1" - follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" @@ -11606,21 +11921,11 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== -lodash.curry@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" - integrity sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA== - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.flow@^3.3.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" - integrity sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw== - lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" @@ -13065,7 +13370,7 @@ node-fetch-h2@^2.3.0: dependencies: http2-client "^1.2.5" -node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: +node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -13454,7 +13759,7 @@ oas-validator@^5.0.8: should "^13.2.1" yaml "^1.10.0" -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -14498,6 +14803,14 @@ prism-react-renderer@^2.1.0: "@types/prismjs" "^1.26.0" clsx "^1.2.1" +prism-react-renderer@^2.3.0: + version "2.3.0" + resolved "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-2.3.0.tgz#5f8f615af6af8201a0b734bd8c946df3d818ea54" + integrity sha512-UYRg2TkVIaI6tRVHC5OJ4/BxqPUxJkJvq/odLT/ykpt1zGYXooNperUxQcCvi87LyRnR4nCh81ceOA+e7nrydg== + dependencies: + "@types/prismjs" "^1.26.0" + clsx "^2.0.0" + prismjs@^1.29.0: version "1.29.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12" @@ -14546,13 +14859,6 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - prompts@^2.0.1, prompts@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -14669,11 +14975,6 @@ pupa@^3.1.0: dependencies: escape-goat "^4.0.0" -pure-color@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" - integrity sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA== - q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -14778,16 +15079,6 @@ rc@1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-base16-styling@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.6.0.tgz#ef2156d66cf4139695c8a167886cb69ea660792c" - integrity sha512-yvh/7CArceR/jNATXOKDlvTnPKPmGZz7zsenQ3jUwLzHkNUR0CvY3yGYJbWJ/nnxsL8Sgmt5cO3/SILVuPO6TQ== - dependencies: - base16 "^1.0.0" - lodash.curry "^4.0.1" - lodash.flow "^3.3.0" - pure-color "^1.2.0" - react-dev-utils@^12.0.1: version "12.0.1" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73" @@ -14867,7 +15158,12 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-lifecycles-compat@^3.0.0, react-lifecycles-compat@~3.0.4: +react-json-view-lite@^1.2.0: + version "1.2.1" + resolved "https://registry.npmjs.org/react-json-view-lite/-/react-json-view-lite-1.2.1.tgz#c59a0bea4ede394db331d482ee02e293d38f8218" + integrity sha512-Itc0g86fytOmKZoIoJyGgvNqohWSbh3NXIKNgH6W6FT9PC1ck4xas1tT3Rr/b3UlFXyA9Jjaw9QSXdZy2JwGMQ== + +react-lifecycles-compat@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -14971,15 +15267,6 @@ react-router@5.3.4, react-router@^5.3.4: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-textarea-autosize@~8.3.2: - version "8.3.4" - resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz#270a343de7ad350534141b02c9cb78903e553524" - integrity sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ== - dependencies: - "@babel/runtime" "^7.10.2" - use-composed-ref "^1.3.0" - use-latest "^1.2.1" - react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" @@ -15848,7 +16135,7 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -setimmediate@^1.0.4, setimmediate@^1.0.5: +setimmediate@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== @@ -17023,11 +17310,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== -ua-parser-js@^0.7.30: - version "0.7.33" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" - integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw== - uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -17327,28 +17609,11 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -use-composed-ref@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.3.0.tgz#3d8104db34b7b264030a9d916c5e94fbe280dbda" - integrity sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ== - use-editable@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/use-editable/-/use-editable-2.3.3.tgz#a292fe9ba4c291cd28d1cc2728c75a5fc8d9a33f" integrity sha512-7wVD2JbfAFJ3DK0vITvXBdpd9JAz5BcKAAolsnLBuBn6UDDwBGuCIAGvR3yA2BNKm578vAMVHFCWaOcA+BhhiA== -use-isomorphic-layout-effect@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" - integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== - -use-latest@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.1.tgz#d13dfb4b08c28e3e33991546a2cee53e14038cf2" - integrity sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw== - dependencies: - use-isomorphic-layout-effect "^1.1.1" - util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" From b86c93a57c92376fc2e041966742307d5600623f Mon Sep 17 00:00:00 2001 From: Gijs de Man Date: Fri, 8 Dec 2023 12:42:39 +0100 Subject: [PATCH 4/6] Update Docusaurus dependencies in packages --- .eslintrc.js | 44 +-- .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/vcs.xml | 6 + .idea/workspace.xml | 89 +++++ .prettierrc.json | 4 +- CHANGELOG.md | 12 +- cypress/.eslintrc.js | 6 +- demo/docs/versioning.md | 4 +- demo/docusaurus.config.js | 126 +++--- demo/sidebars.ts | 68 ++-- demo/src/components/HomepageFeatures/index.js | 8 +- demo/src/utils/prismDark.mjs | 46 +-- demo/src/utils/prismLight.mjs | 60 +-- jest.config.js | 4 +- .../package.json | 8 +- .../src/index.ts | 24 +- .../src/markdown/createArrayBracket.ts | 12 +- .../src/markdown/createAuthentication.ts | 85 ++-- .../src/markdown/createContactInfo.ts | 16 +- .../src/markdown/createDeprecationNotice.ts | 4 +- .../src/markdown/createDetails.ts | 2 +- .../src/markdown/createDetailsSummary.ts | 2 +- .../src/markdown/createDownload.ts | 2 +- .../src/markdown/createHeading.ts | 4 +- .../src/markdown/createLicense.ts | 12 +- .../src/markdown/createLogo.ts | 4 +- .../src/markdown/createParamsDetails.ts | 18 +- .../src/markdown/createRequestSchema.ts | 64 +-- .../src/markdown/createResponseSchema.ts | 40 +- .../src/markdown/createSchema.test.ts | 24 +- .../src/markdown/createSchema.ts | 180 ++++----- .../src/markdown/createStatusCodes.ts | 114 +++--- .../src/markdown/createTermsOfService.ts | 12 +- .../src/markdown/createVersionBadge.ts | 4 +- .../src/markdown/index.ts | 16 +- .../src/markdown/schema.test.ts | 20 +- .../src/openapi/createRequestExample.ts | 10 +- .../src/openapi/createResponseExample.ts | 10 +- .../src/openapi/openapi.ts | 46 +-- .../src/openapi/utils/loadAndResolveSpec.ts | 16 +- .../openapi/utils/services/OpenAPIParser.ts | 20 +- .../utils/services/RedocNormalizedOptions.ts | 2 +- .../src/openapi/utils/utils/openapi.ts | 26 +- .../src/options.ts | 16 +- .../src/sidebars/index.ts | 29 +- .../src/types.ts | 4 +- .../babel.config.js | 14 +- .../package.json | 4 +- .../src/index.ts | 18 +- .../ApiCodeBlock/ExpandButton/index.js | 8 +- .../src/theme/ApiExplorer/Accept/slice.ts | 4 +- .../ApiCodeBlock/Content/String.js | 8 +- .../ApiCodeBlock/CopyButton/index.js | 6 +- .../ApiCodeBlock/ExitButton/index.js | 4 +- .../ApiCodeBlock/ExpandButton/index.js | 8 +- .../ApiExplorer/ApiCodeBlock/Line/index.js | 4 +- .../ApiCodeBlock/WordWrapButton/index.js | 2 +- .../theme/ApiExplorer/Authorization/index.tsx | 10 +- .../theme/ApiExplorer/Authorization/slice.ts | 12 +- .../src/theme/ApiExplorer/Body/index.tsx | 24 +- .../src/theme/ApiExplorer/Body/slice.ts | 32 +- .../theme/ApiExplorer/CodeSnippets/index.tsx | 56 +-- .../theme/ApiExplorer/CodeTabs/_CodeTabs.scss | 6 +- .../src/theme/ApiExplorer/CodeTabs/index.js | 12 +- .../theme/ApiExplorer/ContentType/slice.ts | 4 +- .../FloatingButton/_FloatingButton.scss | 4 +- .../ApiExplorer/FormFileUpload/index.tsx | 4 +- .../ApiExplorer/FormMultiSelect/index.tsx | 2 +- .../theme/ApiExplorer/FormTextInput/index.tsx | 8 +- .../theme/ApiExplorer/LiveEditor/index.tsx | 6 +- .../ParamFormItems/ParamArrayFormItem.tsx | 10 +- .../ParamFormItems/ParamBooleanFormItem.tsx | 4 +- .../ParamMultiSelectFormItem.tsx | 12 +- .../ParamFormItems/ParamSelectFormItem.tsx | 4 +- .../ParamFormItems/ParamTextFormItem.tsx | 2 +- .../ParamOptions/_ParamOptions.scss | 3 +- .../theme/ApiExplorer/ParamOptions/index.tsx | 6 +- .../theme/ApiExplorer/ParamOptions/slice.ts | 4 +- .../theme/ApiExplorer/Request/_Request.scss | 6 +- .../src/theme/ApiExplorer/Request/index.tsx | 8 +- .../theme/ApiExplorer/Request/makeRequest.ts | 4 +- .../theme/ApiExplorer/Response/_Response.scss | 6 +- .../src/theme/ApiExplorer/Response/index.tsx | 10 +- .../src/theme/ApiExplorer/Response/slice.ts | 6 +- .../ApiExplorer/SecuritySchemes/index.tsx | 12 +- .../src/theme/ApiExplorer/Server/slice.ts | 4 +- .../theme/ApiExplorer/buildPostmanRequest.ts | 28 +- .../src/theme/ApiExplorer/index.tsx | 2 +- .../ApiExplorer/persistanceMiddleware.ts | 2 +- .../src/theme/ApiExplorer/storage-utils.ts | 2 +- .../src/theme/ApiItem/Layout/index.tsx | 4 +- .../src/theme/ApiItem/index.tsx | 14 +- .../src/theme/ApiItem/store.ts | 6 +- .../src/theme/ApiLogo/index.tsx | 4 +- .../src/theme/ApiTabs/index.js | 12 +- .../src/theme/DiscriminatorTabs/index.js | 8 +- .../src/theme/MimeTabs/index.js | 10 +- .../src/theme/ParamsItem/index.js | 12 +- .../src/theme/SchemaItem/index.js | 6 +- .../src/theme/SchemaTabs/index.js | 8 +- scripts/changelog-beta.ts | 2 +- scripts/changelog.ts | 2 +- scripts/copyUntypedFiles.mjs | 4 +- scripts/publish-beta.ts | 16 +- scripts/publish.ts | 16 +- yarn.lock | 370 +----------------- 106 files changed, 995 insertions(+), 1223 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.eslintrc.js b/.eslintrc.js index f854075be..05febb16c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,7 @@ module.exports = { "plugin:jest/recommended", "plugin:jest/style", "plugin:testing-library/react", - "plugin:jest-dom/recommended", + "plugin:jest-dom/recommended" ], plugins: ["import", "header"], rules: { @@ -29,9 +29,9 @@ module.exports = { " *", " * This source code is licensed under the MIT license found in the", " * LICENSE file in the root directory of this source tree.", - " * ========================================================================== ", + " * ========================================================================== " ], - 2, + 2 ], "import/newline-after-import": ["warn", { count: 1 }], "import/no-extraneous-dependencies": [ @@ -40,15 +40,15 @@ module.exports = { devDependencies: false, optionalDependencies: false, peerDependencies: true, - bundledDependencies: true, - }, + bundledDependencies: true + } ], "import/order": [ "warn", { alphabetize: { order: "asc", - caseInsensitive: true, + caseInsensitive: true }, "newlines-between": "always", groups: [ @@ -56,18 +56,18 @@ module.exports = { "external", "internal", ["parent", "sibling", "index"], - "object", + "object" ], pathGroups: [ { pattern: "react?(-dom)", group: "external", - position: "before", - }, + position: "before" + } ], - pathGroupsExcludedImportTypes: ["builtin"], - }, - ], + pathGroupsExcludedImportTypes: ["builtin"] + } + ] }, overrides: [ { @@ -80,22 +80,22 @@ module.exports = { devDependencies: true, optionalDependencies: false, peerDependencies: true, - bundledDependencies: true, - }, - ], - }, - }, + bundledDependencies: true + } + ] + } + } ], settings: { "import/extensions": allExtensions, "import/external-module-folders": ["node_modules", "node_modules/@types"], "import/parsers": { - "@typescript-eslint/parser": tsExtensions, + "@typescript-eslint/parser": tsExtensions }, "import/resolver": { node: { - extensions: allExtensions, - }, - }, - }, + extensions: allExtensions + } + } + } }; diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 000000000..03d9549ea --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000..473415d65 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + { + "customColor": "", + "associatedIndex": 3 +} + + + + + + + + + + + + + + 1700657366385 + + + + + + \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json index 0967ef424..36b356317 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1 +1,3 @@ -{} +{ + "trailingComma": "none" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a12626e86..cb0ac1def 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -952,7 +952,7 @@ High level enhancements // docusaurus.config.js const config = { - plugins: [["docusaurus-plugin-proxy", { "/api": "http://localhost:3001" }]], + plugins: [["docusaurus-plugin-proxy", { "/api": "http://localhost:3001" }]] // ... }; ``` @@ -969,11 +969,11 @@ High level enhancements { "/api": { target: "http://localhost:3001", - pathRewrite: { "^/api": "" }, - }, - }, - ], - ], + pathRewrite: { "^/api": "" } + } + } + ] + ] // ... }; ``` diff --git a/cypress/.eslintrc.js b/cypress/.eslintrc.js index d94ac4416..c97adf128 100644 --- a/cypress/.eslintrc.js +++ b/cypress/.eslintrc.js @@ -8,7 +8,7 @@ module.exports = { plugins: ["cypress"], env: { - "cypress/globals": true, + "cypress/globals": true }, rules: { "testing-library/await-async-query": "off", // Cypress chains don't use promises @@ -18,6 +18,6 @@ module.exports = { "jest/expect-expect": "off", "jest/valid-expect": "off", "jest/valid-expect-in-promise": "off", - "jest/no-conditional-expect": "off", - }, + "jest/no-conditional-expect": "off" + } }; diff --git a/demo/docs/versioning.md b/demo/docs/versioning.md index 9f07784fe..034855b9e 100644 --- a/demo/docs/versioning.md +++ b/demo/docs/versioning.md @@ -78,7 +78,7 @@ Import: ```javascript const { - versionSelector, + versionSelector } = require("docusaurus-plugin-openapi-docs/lib/sidebars/utils"); // imports utility const petstoreVersions = require("./docs/petstore/versions.json"); // imports Petstore versions.json ``` @@ -102,7 +102,7 @@ Import: ```javascript const { - versionCrumb, + versionCrumb } = require("docusaurus-plugin-openapi-docs/lib/sidebars/utils"); ``` diff --git a/demo/docusaurus.config.js b/demo/docusaurus.config.js index 16a0794c0..1639bfefa 100644 --- a/demo/docusaurus.config.js +++ b/demo/docusaurus.config.js @@ -25,18 +25,18 @@ const config = { sidebarPath: "./sidebars.ts", editUrl: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/tree/main/demo", - docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi + docItemComponent: "@theme/ApiItem" // Derived from docusaurus-theme-openapi }, blog: false, theme: { - customCss: "./src/css/custom.css", + customCss: "./src/css/custom.css" }, gtag: { trackingID: "GTM-THVM29S", - anonymizeIP: false, - }, - }), - ], + anonymizeIP: false + } + }) + ] ], themeConfig: @@ -44,21 +44,21 @@ const config = { ({ docs: { sidebar: { - hideable: true, - }, + hideable: true + } }, navbar: { title: "OpenAPI Docs", logo: { alt: "Keytar", - src: "img/docusaurus-openapi-docs-logo.svg", + src: "img/docusaurus-openapi-docs-logo.svg" }, items: [ { type: "doc", docId: "intro", position: "left", - label: "Docs", + label: "Docs" }, { type: "dropdown", @@ -67,27 +67,27 @@ const config = { items: [ { label: "API Zoo", - to: "/category/petstore-api", + to: "/category/petstore-api" }, { label: "Petstore (versioned)", - to: "/category/petstore-versioned-api", - }, - ], + to: "/category/petstore-versioned-api" + } + ] }, { href: "https://medium.com/palo-alto-networks-developer-blog", position: "right", className: "header-medium-link", - "aria-label": "Palo Alto Networks Developer Blog", + "aria-label": "Palo Alto Networks Developer Blog" }, { href: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs", position: "right", className: "header-github-link", - "aria-label": "GitHub repository", - }, - ], + "aria-label": "GitHub repository" + } + ] }, footer: { style: "dark", @@ -97,106 +97,106 @@ const config = { items: [ { label: "OpenAPI Docs", - to: "/", - }, - ], + to: "/" + } + ] }, { title: "Community", items: [ { label: "Stack Overflow", - href: "https://stackoverflow.com/questions/tagged/docusaurus", + href: "https://stackoverflow.com/questions/tagged/docusaurus" }, { label: "Discord", - href: "https://discordapp.com/invite/docusaurus", + href: "https://discordapp.com/invite/docusaurus" }, { label: "Twitter", - href: "https://twitter.com/docusaurus", - }, - ], + href: "https://twitter.com/docusaurus" + } + ] }, { title: "More", items: [ { label: "Blog", - href: "https://medium.com/palo-alto-networks-developer-blog", + href: "https://medium.com/palo-alto-networks-developer-blog" }, { label: "GitHub", - href: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs", - }, - ], - }, + href: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs" + } + ] + } ], - copyright: `Copyright © ${new Date().getFullYear()} Palo Alto Networks, Inc. Built with Docusaurus ${DOCUSAURUS_VERSION}.`, + copyright: `Copyright © ${new Date().getFullYear()} Palo Alto Networks, Inc. Built with Docusaurus ${DOCUSAURUS_VERSION}.` }, prism: { - additionalLanguages: ["ruby", "csharp", "php", "java", "powershell"], + additionalLanguages: ["ruby", "csharp", "php", "java", "powershell"] }, languageTabs: [ { highlight: "bash", language: "curl", - logoClass: "bash", + logoClass: "bash" }, { highlight: "python", language: "python", logoClass: "python", - variant: "requests", + variant: "requests" }, { highlight: "go", language: "go", - logoClass: "go", + logoClass: "go" }, { highlight: "javascript", language: "nodejs", logoClass: "nodejs", - variant: "axios", + variant: "axios" }, { highlight: "ruby", language: "ruby", - logoClass: "ruby", + logoClass: "ruby" }, { highlight: "csharp", language: "csharp", logoClass: "csharp", - variant: "httpclient", + variant: "httpclient" }, { highlight: "php", language: "php", - logoClass: "php", + logoClass: "php" }, { highlight: "java", language: "java", logoClass: "java", - variant: "unirest", + variant: "unirest" }, { highlight: "powershell", language: "powershell", - logoClass: "powershell", - }, + logoClass: "powershell" + } ], algolia: { apiKey: "441074cace987cbf4640c039ebed303c", appId: "J0EABTYI1A", - indexName: "docusaurus-openapi", + indexName: "docusaurus-openapi" }, announcementBar: { id: "announcementBar_1", - content: "Beta preview that adds support for Docusaurus v3.0.0", - }, + content: "Beta preview that adds support for Docusaurus v3.0.0" + } }), plugins: [ @@ -211,7 +211,7 @@ const config = { outputDir: "docs/petstore_versioned", // No trailing slash sidebarOptions: { groupPathsBy: "tag", - categoryLinkSource: "tag", + categoryLinkSource: "tag" }, version: "2.0.0", // Current version label: "v2.0.0", // Current version label @@ -221,9 +221,9 @@ const config = { specPath: "examples/petstore-1.0.0.yaml", outputDir: "docs/petstore_versioned/1.0.0", // No trailing slash label: "v1.0.0", - baseUrl: "/petstore_versioned/1.0.0/swagger-petstore-yaml", // Leading slash is important - }, - }, + baseUrl: "/petstore_versioned/1.0.0/swagger-petstore-yaml" // Leading slash is important + } + } }, petstore: { specPath: "examples/petstore.yaml", @@ -231,39 +231,39 @@ const config = { outputDir: "docs/petstore", sidebarOptions: { groupPathsBy: "tag", - categoryLinkSource: "tag", + categoryLinkSource: "tag" }, template: "api.mustache", // Customize API MDX with mustache template downloadUrl: "https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml", - hideSendButton: false, + hideSendButton: false }, cos: { specPath: "examples/openapi-cos.json", outputDir: "docs/cos", sidebarOptions: { - groupPathsBy: "tag", - }, + groupPathsBy: "tag" + } }, burgers: { specPath: "examples/food/burgers/openapi.yaml", - outputDir: "docs/food/burgers", + outputDir: "docs/food/burgers" }, yogurt: { specPath: "examples/food/yogurtstore/openapi.yaml", - outputDir: "docs/food/yogurtstore", - }, - }, - }, - ], + outputDir: "docs/food/yogurtstore" + } + } + } + ] ], themes: ["docusaurus-theme-openapi-docs"], stylesheets: [ { href: "https://use.fontawesome.com/releases/v5.11.0/css/all.css", - type: "text/css", - }, - ], + type: "text/css" + } + ] }; async function createConfig() { diff --git a/demo/sidebars.ts b/demo/sidebars.ts index a2faca13f..1df8d638d 100644 --- a/demo/sidebars.ts +++ b/demo/sidebars.ts @@ -13,7 +13,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import petstoreVersions from "./docs/petstore_versioned/versions.json"; import { versionCrumb, - versionSelector, + versionSelector } from "docusaurus-plugin-openapi-docs/lib/sidebars/utils"; import petstoreSidebar from "./docs/petstore/sidebar"; @@ -27,33 +27,33 @@ const sidebars: SidebarsConfig = { { type: "html", value: `

DOCUMENTATION

`, // The HTML to be rendered - defaultStyle: true, // Use the default menu item styling + defaultStyle: true // Use the default menu item styling }, { type: "doc", - id: "intro", + id: "intro" }, { type: "doc", - id: "sidebars", + id: "sidebars" }, { type: "doc", - id: "versioning", + id: "versioning" }, { type: "category", label: "Customization", link: { - type: "generated-index", + type: "generated-index" }, items: [ { type: "autogenerated", - dirName: "customization", - }, - ], - }, + dirName: "customization" + } + ] + } ], petstore: [ { @@ -64,9 +64,9 @@ const sidebars: SidebarsConfig = { title: "Petstore API", description: "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", - slug: "/category/petstore-api", + slug: "/category/petstore-api" }, - items: petstoreSidebar, + items: petstoreSidebar }, { type: "category", @@ -74,9 +74,9 @@ const sidebars: SidebarsConfig = { link: { type: "generated-index", title: "Cloud Object Storage API", - slug: "/category/cos-api", + slug: "/category/cos-api" }, - items: cloudObjectStorageSidebar, + items: cloudObjectStorageSidebar }, { type: "category", @@ -84,14 +84,14 @@ const sidebars: SidebarsConfig = { link: { type: "generated-index", title: "Burger API", - slug: "/category/food-api", + slug: "/category/food-api" }, items: [ { type: "autogenerated", - dirName: "food/burgers", // '.' means the current docs folder - }, - ], + dirName: "food/burgers" // '.' means the current docs folder + } + ] }, { type: "category", @@ -99,27 +99,27 @@ const sidebars: SidebarsConfig = { link: { type: "generated-index", title: "Yogurt Store API", - slug: "/category/yogurt-api", + slug: "/category/yogurt-api" }, items: [ { type: "autogenerated", - dirName: "food/yogurtstore", // '.' means the current docs folder - }, - ], - }, + dirName: "food/yogurtstore" // '.' means the current docs folder + } + ] + } ], "petstore-2.0.0": [ { type: "html", defaultStyle: true, value: versionSelector(petstoreVersions), - className: "version-button", + className: "version-button" }, { type: "html", defaultStyle: true, - value: versionCrumb(`v2.0.0`), + value: versionCrumb(`v2.0.0`) }, { type: "category", @@ -129,10 +129,10 @@ const sidebars: SidebarsConfig = { title: "Petstore API (latest)", description: "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", - slug: "/category/petstore-versioned-api", + slug: "/category/petstore-versioned-api" }, - items: petstoreVersionedSidebar, - }, + items: petstoreVersionedSidebar + } ], "petstore-1.0.0": [ @@ -140,12 +140,12 @@ const sidebars: SidebarsConfig = { type: "html", defaultStyle: true, value: versionSelector(petstoreVersions), - className: "version-button", + className: "version-button" }, { type: "html", defaultStyle: true, - value: versionCrumb(`v1.0.0`), + value: versionCrumb(`v1.0.0`) }, { type: "category", @@ -155,11 +155,11 @@ const sidebars: SidebarsConfig = { title: "Petstore API (v1.0.0)", description: "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", - slug: "/category/petstore-api-1.0.0", + slug: "/category/petstore-api-1.0.0" }, - items: petstoreVersionSidebar, - }, - ], + items: petstoreVersionSidebar + } + ] }; export default sidebars; diff --git a/demo/src/components/HomepageFeatures/index.js b/demo/src/components/HomepageFeatures/index.js index d5d56e76f..05c3a1d08 100644 --- a/demo/src/components/HomepageFeatures/index.js +++ b/demo/src/components/HomepageFeatures/index.js @@ -11,7 +11,7 @@ const FeatureList = [ Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly. - ), + ) }, { title: "Focus on What Matters", @@ -21,7 +21,7 @@ const FeatureList = [ Docusaurus lets you focus on your docs, and we'll do the chores. Go ahead and move your docs into the docs directory. - ), + ) }, { title: "Powered by React", @@ -31,8 +31,8 @@ const FeatureList = [ Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer. - ), - }, + ) + } ]; function Feature({ Svg, title, description }) { diff --git a/demo/src/utils/prismDark.mjs b/demo/src/utils/prismDark.mjs index c2164e384..a78618e23 100644 --- a/demo/src/utils/prismDark.mjs +++ b/demo/src/utils/prismDark.mjs @@ -10,7 +10,7 @@ import darkTheme from "prism-react-renderer/themes/vsDark/index.cjs.js"; export default { plain: { color: "#D4D4D4", - backgroundColor: "#212121", + backgroundColor: "#212121" }, styles: [ ...darkTheme.styles, @@ -18,62 +18,62 @@ export default { types: ["title"], style: { color: "#569CD6", - fontWeight: "bold", - }, + fontWeight: "bold" + } }, { types: ["property", "parameter"], style: { - color: "#9CDCFE", - }, + color: "#9CDCFE" + } }, { types: ["script"], style: { - color: "#D4D4D4", - }, + color: "#D4D4D4" + } }, { types: ["boolean", "arrow", "atrule", "tag"], style: { - color: "#569CD6", - }, + color: "#569CD6" + } }, { types: ["number", "color", "unit"], style: { - color: "#B5CEA8", - }, + color: "#B5CEA8" + } }, { types: ["font-matter"], style: { - color: "#CE9178", - }, + color: "#CE9178" + } }, { types: ["keyword", "rule"], style: { - color: "#C586C0", - }, + color: "#C586C0" + } }, { types: ["regex"], style: { - color: "#D16969", - }, + color: "#D16969" + } }, { types: ["maybe-class-name"], style: { - color: "#4EC9B0", - }, + color: "#4EC9B0" + } }, { types: ["constant"], style: { - color: "#4FC1FF", - }, - }, - ], + color: "#4FC1FF" + } + } + ] }; diff --git a/demo/src/utils/prismLight.mjs b/demo/src/utils/prismLight.mjs index d87a3dd3c..f8d37c12b 100644 --- a/demo/src/utils/prismLight.mjs +++ b/demo/src/utils/prismLight.mjs @@ -15,86 +15,86 @@ export default { types: ["title"], style: { color: "#0550AE", - fontWeight: "bold", - }, + fontWeight: "bold" + } }, { types: ["parameter"], style: { - color: "#953800", - }, + color: "#953800" + } }, { types: ["boolean", "rule", "color", "number", "constant", "property"], style: { - color: "#005CC5", - }, + color: "#005CC5" + } }, { types: ["atrule", "tag"], style: { - color: "#22863A", - }, + color: "#22863A" + } }, { types: ["script"], style: { - color: "#24292E", - }, + color: "#24292E" + } }, { types: ["operator", "unit", "rule"], style: { - color: "#D73A49", - }, + color: "#D73A49" + } }, { types: ["font-matter", "string", "attr-value"], style: { - color: "#C6105F", - }, + color: "#C6105F" + } }, { types: ["class-name"], style: { - color: "#116329", - }, + color: "#116329" + } }, { types: ["attr-name"], style: { - color: "#0550AE", - }, + color: "#0550AE" + } }, { types: ["keyword"], style: { - color: "#CF222E", - }, + color: "#CF222E" + } }, { types: ["function"], style: { - color: "#8250DF", - }, + color: "#8250DF" + } }, { types: ["selector"], style: { - color: "#6F42C1", - }, + color: "#6F42C1" + } }, { types: ["variable"], style: { - color: "#E36209", - }, + color: "#E36209" + } }, { types: ["comment"], style: { - color: "#6B6B6B", - }, - }, - ], + color: "#6B6B6B" + } + } + ] }; diff --git a/jest.config.js b/jest.config.js index ddb430cc0..9424c9008 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,6 +10,6 @@ module.exports = { testEnvironment: "node", roots: [ "/packages/docusaurus-plugin-openapi-docs/src", - "/packages/docusaurus-theme-openapi-docs/src", - ], + "/packages/docusaurus-theme-openapi-docs/src" + ] }; diff --git a/packages/docusaurus-plugin-openapi-docs/package.json b/packages/docusaurus-plugin-openapi-docs/package.json index 0a370b7aa..3b9aa7e9e 100644 --- a/packages/docusaurus-plugin-openapi-docs/package.json +++ b/packages/docusaurus-plugin-openapi-docs/package.json @@ -28,7 +28,7 @@ "watch": "tsc --watch" }, "devDependencies": { - "@docusaurus/types": "^3.0.0", + "@docusaurus/types": "^3.0.1", "@types/fs-extra": "^9.0.13", "@types/json-pointer": "^1.0.31", "@types/json-schema": "^7.0.9", @@ -37,9 +37,9 @@ }, "dependencies": { "@apidevtools/json-schema-ref-parser": "^10.1.0", - "@docusaurus/plugin-content-docs": "^3.0.0", - "@docusaurus/utils": "^3.0.0", - "@docusaurus/utils-validation": "^3.0.0", + "@docusaurus/plugin-content-docs": "^3.0.1", + "@docusaurus/utils": "^3.0.1", + "@docusaurus/utils-validation": "^3.0.1", "@paloaltonetworks/openapi-to-postmanv2": "3.1.0-hotfix.1", "@paloaltonetworks/postman-collection": "^4.1.0", "@redocly/openapi-core": "^1.0.0-beta.125", diff --git a/packages/docusaurus-plugin-openapi-docs/src/index.ts b/packages/docusaurus-plugin-openapi-docs/src/index.ts index e947b1ecc..deb5a4e1d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/index.ts @@ -98,7 +98,7 @@ export default function pluginOpenAPIDocs( template, markdownGenerators, downloadUrl, - sidebarOptions, + sidebarOptions } = options; // Remove trailing slash before proceeding @@ -149,7 +149,7 @@ export default function pluginOpenAPIDocs( sidebarSliceTemplate += `export default sidebar;`; const view = render(sidebarSliceTemplate, { - slice: JSON.stringify(sidebarSlice, null, 2), + slice: JSON.stringify(sidebarSlice, null, 2) }); if (!fs.existsSync(`${outputDir}/sidebar.ts`)) { @@ -263,8 +263,8 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; item.type === "api" ? apiPageGenerator(item) : item.type === "info" - ? infoPageGenerator(item) - : tagPageGenerator(item); + ? infoPageGenerator(item) + : tagPageGenerator(item); item.markdown = markdown; if (item.type === "api") { // opportunity to compress JSON @@ -380,11 +380,11 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const apiDir = posixPath(path.join(siteDir, outputDir)); const apiMdxFiles = await Globby(["*.api.mdx", "*.info.mdx", "*.tag.mdx"], { cwd: path.resolve(apiDir), - deep: 1, + deep: 1 }); const sidebarFile = await Globby(["sidebar.ts"], { cwd: path.resolve(apiDir), - deep: 1, + deep: 1 }); apiMdxFiles.map((mdx) => fs.unlink(`${apiDir}/${mdx}`, (err) => { @@ -421,7 +421,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; versionsArray.push({ version: version, label: metadata.label, - baseUrl: metadata.baseUrl, + baseUrl: metadata.baseUrl }); } @@ -587,7 +587,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const versionConfig = versions[key]; const mergedConfig = { ...parentConfig, - ...versionConfig, + ...versionConfig }; await generateApiDocs(mergedConfig, targetDocsPluginId); }); @@ -602,7 +602,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const versionConfig = versions[versionId]; const mergedConfig = { ...parentConfig, - ...versionConfig, + ...versionConfig }; await generateVersions(mergedVersions, parentConfig.outputDir); await generateApiDocs(mergedConfig, targetDocsPluginId); @@ -711,7 +711,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const versionConfig = versions[key]; const mergedConfig = { ...parentConfig, - ...versionConfig, + ...versionConfig }; await cleanApiDocs(mergedConfig); }); @@ -720,12 +720,12 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const versionConfig = versions[versionId]; const mergedConfig = { ...parentConfig, - ...versionConfig, + ...versionConfig }; await cleanApiDocs(mergedConfig); } }); - }, + } }; } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createArrayBracket.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createArrayBracket.ts index 5eb85ffb0..45d0c7caa 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createArrayBracket.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createArrayBracket.ts @@ -14,10 +14,10 @@ export function createOpeningArrayBracket() { fontSize: "var(--ifm-code-font-size)", opacity: "0.6", marginLeft: "-.5rem", - paddingBottom: ".5rem", + paddingBottom: ".5rem" }, - children: ["Array ["], - }), + children: ["Array ["] + }) }); } @@ -27,9 +27,9 @@ export function createClosingArrayBracket() { style: { fontSize: "var(--ifm-code-font-size)", opacity: "0.6", - marginLeft: "-.5rem", + marginLeft: "-.5rem" }, - children: ["]"], - }), + children: ["]"] + }) }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts index 013764016..c0b61454c 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts @@ -20,8 +20,8 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("tr", { children: [ create("th", { children: "Security Scheme Type:" }), - create("td", { children: type }), - ], + create("td", { children: type }) + ] }); const createOAuthFlowRows = () => { @@ -39,7 +39,7 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { ), guard(authorizationUrl, () => create("p", { - children: `Authorization URL: ${authorizationUrl}`, + children: `Authorization URL: ${authorizationUrl}` }) ), guard(refreshUrl, () => @@ -49,11 +49,11 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("ul", { children: Object.entries(scopes).map(([scope, description]) => create("li", { children: `${scope}: ${description}` }) - ), - }), - ], - }), - ], + ) + }) + ] + }) + ] }); }); @@ -71,13 +71,13 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("tr", { children: [ create("th", { children: "Header parameter name:" }), - create("td", { children: name }), - ], - }), - ], - }), - }), - ], + create("td", { children: name }) + ] + }) + ] + }) + }) + ] }); case "http": return create("div", { @@ -89,34 +89,31 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("tr", { children: [ create("th", { children: "HTTP Authorization Scheme:" }), - create("td", { children: scheme }), - ], + create("td", { children: scheme }) + ] }), guard(bearerFormat, () => create("tr", { children: [ create("th", { children: "Bearer format:" }), - create("td", { children: bearerFormat }), - ], + create("td", { children: bearerFormat }) + ] }) - ), - ], - }), - }), - ], + ) + ] + }) + }) + ] }); case "oauth2": return create("div", { children: [ create("table", { children: create("tbody", { - children: [ - createSecuritySchemeTypeRow(), - createOAuthFlowRows(), - ], - }), - }), - ], + children: [createSecuritySchemeTypeRow(), createOAuthFlowRows()] + }) + }) + ] }); case "openIdConnect": return create("div", { @@ -129,14 +126,14 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("tr", { children: [ create("th", { children: "OpenID Connect URL:" }), - create("td", { children: openIdConnectUrl }), - ], + create("td", { children: openIdConnectUrl }) + ] }) - ), - ], - }), - }), - ], + ) + ] + }) + }) + ] }); default: return ""; @@ -170,7 +167,7 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("h2", { children: "Authentication", id: "authentication", - style: { marginBottom: "1rem" }, + style: { marginBottom: "1rem" } }), create("SchemaTabs", { className: "openapi-tabs__security-schemes", @@ -185,12 +182,12 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { value: `${schemeKey}`, children: [ createDescription(schemeObj.description), - createAuthenticationTable(schemeObj), - ], + createAuthenticationTable(schemeObj) + ] }) - ), - }), + ) + }) ], - style: { marginBottom: "2rem" }, + style: { marginBottom: "2rem" } }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createContactInfo.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createContactInfo.ts index db19e0223..cea77f784 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createContactInfo.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createContactInfo.ts @@ -16,26 +16,26 @@ export function createContactInfo(contact: ContactObject) { style: { display: "flex", flexDirection: "column", - marginBottom: "var(--ifm-paragraph-margin-bottom)", + marginBottom: "var(--ifm-paragraph-margin-bottom)" }, children: [ create("h3", { style: { - marginBottom: "0.25rem", + marginBottom: "0.25rem" }, - children: "Contact", + children: "Contact" }), create("span", { children: [ guard(name, () => `${name}: `), - guard(email, () => `[${email}](mailto:${email})`), - ], + guard(email, () => `[${email}](mailto:${email})`) + ] }), guard(url, () => create("span", { - children: ["URL: ", `[${url}](mailto:${url})`], + children: ["URL: ", `[${url}](mailto:${url})`] }) - ), - ], + ) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts index 591fb0f52..2baa1534d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts @@ -18,13 +18,13 @@ interface DeprecationNoticeProps { export function createDeprecationNotice({ deprecated, - description, + description }: DeprecationNoticeProps) { return guard(deprecated, () => createAdmonition({ children: clean(description) ?? - "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", + "This endpoint has been deprecated and may be replaced or removed in future versions of the API." }) ); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetails.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetails.ts index 4c969ce8e..3114f3222 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetails.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetails.ts @@ -11,6 +11,6 @@ export function createDetails({ children, style, ...rest }: Props) { return create("details", { style: { ...style }, ...rest, - children, + children }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetailsSummary.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetailsSummary.ts index 09bc034b9..bffd4405a 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetailsSummary.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDetailsSummary.ts @@ -11,6 +11,6 @@ export function createDetailsSummary({ children, style, ...rest }: Props) { return create("summary", { style: { ...style }, ...rest, - children, + children }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDownload.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDownload.ts index 10bb2ba5a..999041980 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDownload.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDownload.ts @@ -10,6 +10,6 @@ import { create, guard } from "./utils"; export function createDownload(url: string | undefined) { return guard(url, (url) => [ create("Export", { url: url, proxy: undefined }), - `\n\n`, + `\n\n` ]); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts index 1ee3455ad..4fdad9c8c 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createHeading.ts @@ -11,8 +11,8 @@ export function createHeading(heading: string) { return [ create("h1", { className: "openapi__heading", - children: clean(heading), + children: clean(heading) }), - `\n\n`, + `\n\n` ]; } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createLicense.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createLicense.ts index c1d981dbc..ac5148b6b 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createLicense.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createLicense.ts @@ -14,21 +14,21 @@ export function createLicense(license: LicenseObject) { return create("div", { style: { - marginBottom: "var(--ifm-paragraph-margin-bottom)", + marginBottom: "var(--ifm-paragraph-margin-bottom)" }, children: [ create("h3", { style: { - marginBottom: "0.25rem", + marginBottom: "0.25rem" }, - children: "License", + children: "License" }), guard(url, () => create("a", { href: url, - children: name ?? url, + children: name ?? url }) - ), - ], + ) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createLogo.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createLogo.ts index 8e9006bb0..5ecbfb930 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createLogo.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createLogo.ts @@ -15,7 +15,7 @@ export function createLogo( return guard(logo || darkLogo, () => [ create("ApiLogo", { logo: logo, - darkLogo: darkLogo, - }), + darkLogo: darkLogo + }) ]); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createParamsDetails.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createParamsDetails.ts index 9c5b1db49..a0c3092e9 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createParamsDetails.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createParamsDetails.ts @@ -36,9 +36,9 @@ export function createParamsDetails({ parameters, type }: Props) { className: "openapi-markdown__details-summary-header-params", children: `${ type.charAt(0).toUpperCase() + type.slice(1) - } Parameters`, - }), - ], + } Parameters` + }) + ] }), create("div", { children: [ @@ -46,12 +46,12 @@ export function createParamsDetails({ parameters, type }: Props) { children: params.map((param) => create("ParamsItem", { className: "paramsItem", - param: param, + param: param }) - ), - }), - ], - }), - ], + ) + }) + ] + }) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts index d22dd2c3f..fbe1bdb7e 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts @@ -67,15 +67,15 @@ export function createRequestSchema({ title, body, ...rest }: Props) { create("h3", { className: "openapi-markdown__details-summary-header-body", - children: `${title}`, + children: `${title}` }), guard(body.required && body.required === true, () => [ create("span", { className: "openapi-schema__required", - children: "required", - }), - ]), - ], + children: "required" + }) + ]) + ] }), create("div", { style: { textAlign: "left", marginLeft: "1rem" }, @@ -83,20 +83,20 @@ export function createRequestSchema({ title, body, ...rest }: Props) { guard(body.description, () => [ create("div", { style: { marginTop: "1rem", marginBottom: "1rem" }, - children: createDescription(body.description), - }), - ]), - ], + children: createDescription(body.description) + }) + ]) + ] }), create("ul", { style: { marginLeft: "1rem" }, - children: createNodes(firstBody, "request"), - }), - ], - }), - ], + children: createNodes(firstBody, "request") + }) + ] + }) + ] }); - }), + }) }); } @@ -132,21 +132,21 @@ export function createRequestSchema({ title, body, ...rest }: Props) { children: [ create("h3", { className: "openapi-markdown__details-summary-header-body", - children: `${title}`, + children: `${title}` }), guard(firstBody.type === "array", (format) => create("span", { style: { opacity: "0.6" }, - children: ` array`, + children: ` array` }) ), guard(body.required, () => [ create("strong", { className: "openapi-schema__required", - children: "required", - }), - ]), - ], + children: "required" + }) + ]) + ] }), create("div", { style: { textAlign: "left", marginLeft: "1rem" }, @@ -154,19 +154,19 @@ export function createRequestSchema({ title, body, ...rest }: Props) { guard(body.description, () => [ create("div", { style: { marginTop: "1rem", marginBottom: "1rem" }, - children: createDescription(body.description), - }), - ]), - ], + children: createDescription(body.description) + }) + ]) + ] }), create("ul", { style: { marginLeft: "1rem" }, - children: createNodes(firstBody, "request"), - }), - ], - }), - ], - }), - ], + children: createNodes(firstBody, "request") + }) + ] + }) + ] + }) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts index 7a645c289..1a68bbf08 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts @@ -13,7 +13,7 @@ import { createNodes } from "./createSchema"; import { createExampleFromSchema, createResponseExample, - createResponseExamples, + createResponseExamples } from "./createStatusCodes"; import { create, guard } from "./utils"; @@ -96,11 +96,11 @@ export function createResponseSchema({ title, body, ...rest }: Props) { () => [ create("span", { className: "openapi-schema__required", - children: "required", - }), + children: "required" + }) ] - ), - ], + ) + ] }), create("div", { style: { textAlign: "left", marginLeft: "1rem" }, @@ -109,31 +109,31 @@ export function createResponseSchema({ title, body, ...rest }: Props) { create("div", { style: { marginTop: "1rem", - marginBottom: "1rem", + marginBottom: "1rem" }, - children: createDescription(body.description), - }), - ]), - ], + children: createDescription(body.description) + }) + ]) + ] }), create("ul", { style: { marginLeft: "1rem" }, - children: createNodes(firstBody!, "response"), - }), - ], - }), - ], + children: createNodes(firstBody!, "response") + }) + ] + }) + ] }), firstBody && createExampleFromSchema(firstBody, mimeType), responseExamples && createResponseExamples(responseExamples, mimeType), responseExample && - createResponseExample(responseExample, mimeType), - ], - }), - ], + createResponseExample(responseExample, mimeType) + ] + }) + ] }); - }), + }) }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.test.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.test.ts index 711f70776..66f5d07c0 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.test.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.test.ts @@ -21,31 +21,31 @@ describe("createNodes", () => { type: "object", properties: { noseLength: { - type: "number", - }, + type: "number" + } }, required: ["noseLength"], - description: "Clown's nose length", + description: "Clown's nose length" }, { type: "array", items: { - type: "string", + type: "string" }, - description: "Array of strings", + description: "Array of strings" }, { - type: "boolean", + type: "boolean" }, { - type: "number", + type: "number" }, { - type: "string", - }, - ], - }, - }, + type: "string" + } + ] + } + } }; expect( createNodes(schema, "request").map((md: any) => diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts index deb374a03..420257c7a 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createSchema.ts @@ -10,7 +10,7 @@ import clsx from "clsx"; import { SchemaObject } from "../openapi/types"; import { createClosingArrayBracket, - createOpeningArrayBracket, + createOpeningArrayBracket } from "./createArrayBracket"; import { createDescription } from "./createDescription"; import { createDetails } from "./createDetails"; @@ -39,9 +39,9 @@ export function mergeAllOf(allOf: SchemaObject[]) { }, "x-examples": function () { return true; - }, + } }, - ignoreAdditionalProperties: true, + ignoreAdditionalProperties: true }); const required = allOf.reduce((acc, cur) => { @@ -64,7 +64,7 @@ function createAnyOneOf(schema: SchemaObject): any { children: [ create("span", { className: "badge badge--info", - children: type, + children: type }), create("SchemaTabs", { children: schema[type]!.map((anyOneSchema, index) => { @@ -104,23 +104,23 @@ function createAnyOneOf(schema: SchemaObject): any { children: [ createOpeningArrayBracket(), anyOneChildren, - createClosingArrayBracket(), + createClosingArrayBracket() ] .filter(Boolean) - .flat(), + .flat() }); } return create("TabItem", { label: label, value: `${index}-item-properties`, - children: anyOneChildren.filter(Boolean).flat(), + children: anyOneChildren.filter(Boolean).flat() }); } return undefined; - }), - }), - ], + }) + }) + ] }); } @@ -136,7 +136,7 @@ function createProperties(schema: SchemaObject) { required: Array.isArray(schema.required) ? schema.required.includes(key) : false, - discriminator, + discriminator }); }); } @@ -156,7 +156,7 @@ function createAdditionalProperties(schema: SchemaObject) { qualifierMessage: getQualifierMessage(schema.additionalProperties), schema: schema, collapsible: false, - discriminator: false, + discriminator: false }); } if ( @@ -203,7 +203,7 @@ function createAdditionalProperties(schema: SchemaObject) { getQualifierMessage(schema.additionalProperties), schema: schema, collapsible: false, - discriminator: false, + discriminator: false }); } const schemaName = getSchemaName(schema.additionalProperties!); @@ -214,7 +214,7 @@ function createAdditionalProperties(schema: SchemaObject) { qualifierMessage: getQualifierMessage(schema), schema: schema.additionalProperties, collapsible: false, - discriminator: false, + discriminator: false }); } return Object.entries(schema.additionalProperties!).map(([key, val]) => @@ -223,7 +223,7 @@ function createAdditionalProperties(schema: SchemaObject) { schema: val, required: Array.isArray(schema.required) ? schema.required.includes(key) - : false, + : false }) ); } @@ -236,7 +236,7 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createProperties(schema.items), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -244,7 +244,7 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createAdditionalProperties(schema.items), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -252,14 +252,14 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createAnyOneOf(schema.items!), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } if (schema.items?.allOf !== undefined) { // TODO: figure out if and how we should pass merged required array const { - mergedSchemas, + mergedSchemas }: { mergedSchemas: SchemaObject; required: string[] } = mergeAllOf( schema.items?.allOf ); @@ -274,7 +274,7 @@ function createItems(schema: SchemaObject) { createOpeningArrayBracket(), createAnyOneOf(mergedSchemas), createProperties(mergedSchemas), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -286,7 +286,7 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createAnyOneOf(mergedSchemas), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -295,7 +295,7 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createProperties(mergedSchemas), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } } @@ -310,7 +310,7 @@ function createItems(schema: SchemaObject) { return [ createOpeningArrayBracket(), createNodes(schema.items, SCHEMA_TYPE), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -323,10 +323,10 @@ function createItems(schema: SchemaObject) { schema: val, required: Array.isArray(schema.required) ? schema.required.includes(key) - : false, + : false }) ), - createClosingArrayBracket(), + createClosingArrayBracket() ].flat(); } @@ -354,13 +354,13 @@ function createDetailsNode( children: [ create("strong", { className: clsx("openapi-schema__property", { - "openapi-schema__strikethrough": schema.deprecated, + "openapi-schema__strikethrough": schema.deprecated }), - children: name, + children: name }), create("span", { className: "openapi-schema__name", - children: ` ${schemaName}`, + children: ` ${schemaName}` }), guard( (Array.isArray(required) @@ -370,15 +370,15 @@ function createDetailsNode( nullable, () => [ create("span", { - className: "openapi-schema__divider", - }), + className: "openapi-schema__divider" + }) ] ), guard(nullable, () => [ create("span", { className: "openapi-schema__nullable", - children: "nullable", - }), + children: "nullable" + }) ]), guard( Array.isArray(required) @@ -387,19 +387,19 @@ function createDetailsNode( () => [ create("span", { className: "openapi-schema__required", - children: "required", - }), + children: "required" + }) ] ), guard(schema.deprecated, () => [ create("span", { className: "openapi-schema__deprecated", - children: "deprecated", - }), - ]), - ], - }), - ], + children: "deprecated" + }) + ]) + ] + }) + ] }), create("div", { style: { marginLeft: "1rem" }, @@ -407,21 +407,21 @@ function createDetailsNode( guard(getQualifierMessage(schema), (message) => create("div", { style: { marginTop: ".5rem", marginBottom: ".5rem" }, - children: createDescription(message), + children: createDescription(message) }) ), guard(schema.description, (description) => create("div", { style: { marginTop: ".5rem", marginBottom: ".5rem" }, - children: createDescription(description), + children: createDescription(description) }) ), - createNodes(schema, SCHEMA_TYPE), - ], - }), - ], - }), - ], + createNodes(schema, SCHEMA_TYPE) + ] + }) + ] + }) + ] }); } @@ -447,7 +447,7 @@ function createAnyOneOfProperty( create("strong", { children: name }), create("span", { style: { opacity: "0.6" }, - children: ` ${schemaName}`, + children: ` ${schemaName}` }), guard( (schema.nullable && schema.nullable === true) || @@ -456,10 +456,10 @@ function createAnyOneOfProperty( create("strong", { style: { fontSize: "var(--ifm-code-font-size)", - color: "var(--openapi-nullable)", + color: "var(--openapi-nullable)" }, - children: " nullable", - }), + children: " nullable" + }) ] ), guard( @@ -470,13 +470,13 @@ function createAnyOneOfProperty( create("strong", { style: { fontSize: "var(--ifm-code-font-size)", - color: "var(--openapi-required)", + color: "var(--openapi-required)" }, - children: " required", - }), + children: " required" + }) ] - ), - ], + ) + ] }), create("div", { style: { marginLeft: "1rem" }, @@ -484,21 +484,21 @@ function createAnyOneOfProperty( guard(getQualifierMessage(schema), (message) => create("div", { style: { marginTop: ".5rem", marginBottom: ".5rem" }, - children: createDescription(message), + children: createDescription(message) }) ), guard(schema.description, (description) => create("div", { style: { marginTop: ".5rem", marginBottom: ".5rem" }, - children: createDescription(description), + children: createDescription(description) }) - ), - ], + ) + ] }), - createAnyOneOf(schema), - ], - }), - ], + createAnyOneOf(schema) + ] + }) + ] }); } @@ -530,36 +530,36 @@ function createPropertyDiscriminator( children: [ create("strong", { className: "openapi-discriminator__name openapi-schema__property", - children: name, + children: name }), guard(schemaName, (name) => create("span", { className: "openapi-schema__name", - children: ` ${schemaName}`, + children: ` ${schemaName}` }) ), guard(required, () => [ create("span", { className: "openapi-schema__required", - children: "required", - }), - ]), - ], + children: "required" + }) + ]) + ] }), guard(getQualifierMessage(discriminator), (message) => create("div", { style: { - paddingLeft: "1rem", + paddingLeft: "1rem" }, - children: createDescription(message), + children: createDescription(message) }) ), guard(schema.description, (description) => create("div", { style: { - paddingLeft: "1rem", + paddingLeft: "1rem" }, - children: createDescription(description), + children: createDescription(description) }) ), create("DiscriminatorTabs", { @@ -570,12 +570,12 @@ function createPropertyDiscriminator( // className: "openapi-tabs__discriminator-item", label: label, value: `${index}-item-discriminator`, - children: [createNodes(discriminator?.mapping[key], SCHEMA_TYPE)], + children: [createNodes(discriminator?.mapping[key], SCHEMA_TYPE)] }); - }), - }), - ], - }), + }) + }) + ] + }) }); } @@ -593,7 +593,7 @@ function createEdges({ name, schema, required, - discriminator, + discriminator }: EdgeProps): any { const schemaName = getSchemaName(schema); @@ -620,7 +620,7 @@ function createEdges({ if (schema.allOf !== undefined) { const { mergedSchemas, - required, + required }: { mergedSchemas: SchemaObject; required: string[] | boolean } = mergeAllOf(schema.allOf); const mergedSchemaName = getSchemaName(mergedSchemas); @@ -687,7 +687,7 @@ function createEdges({ required: Array.isArray(required) ? required.includes(name) : required, schemaName: schemaName, qualifierMessage: getQualifierMessage(schema), - schema: mergedSchemas, + schema: mergedSchemas }); } @@ -751,7 +751,7 @@ function createEdges({ required: Array.isArray(required) ? required.includes(name) : required, schemaName: schemaName, qualifierMessage: getQualifierMessage(schema), - schema: schema, + schema: schema }); } @@ -807,9 +807,9 @@ export function createNodes( style: { marginTop: ".5rem", marginBottom: ".5rem", - marginLeft: "1rem", + marginLeft: "1rem" }, - children: createDescription(schema.allOf[0]), + children: createDescription(schema.allOf[0]) }); } } @@ -817,9 +817,9 @@ export function createNodes( style: { marginTop: ".5rem", marginBottom: ".5rem", - marginLeft: "1rem", + marginLeft: "1rem" }, - children: createDescription(schema.type), + children: createDescription(schema.type) }); } @@ -829,9 +829,9 @@ export function createNodes( style: { marginTop: ".5rem", marginBottom: ".5rem", - marginLeft: "1rem", + marginLeft: "1rem" }, - children: [createDescription(schema)], + children: [createDescription(schema)] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts index c7376f712..a8016505d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts @@ -76,10 +76,10 @@ function createResponseHeaders(responseHeaders: any) { guard(type, () => [ create("span", { style: { opacity: "0.6" }, - children: ` ${type}`, - }), - ]), - ], + children: ` ${type}` + }) + ]) + ] }), create("div", { children: [ @@ -87,21 +87,21 @@ function createResponseHeaders(responseHeaders: any) { create("div", { style: { marginTop: ".5rem", - marginBottom: ".5rem", + marginBottom: ".5rem" }, children: [ guard(example, () => `Example: ${example}`), - createDescription(description), - ], + createDescription(description) + ] }) - ), - ], - }), - ], + ) + ] + }) + ] }); } - ), - ], + ) + ] }) ); } @@ -126,14 +126,14 @@ export function createResponseExamples( children: [ guard(exampleValue.summary, (summary) => [ create("p", { - children: ` ${summary}`, - }), + children: ` ${summary}` + }) ]), create("ResponseSamples", { responseExample: JSON.stringify(exampleValue.value, null, 2), - language: language, - }), - ], + language: language + }) + ] }); } return create("TabItem", { @@ -142,14 +142,14 @@ export function createResponseExamples( children: [ guard(exampleValue.summary, (summary) => [ create("p", { - children: ` ${summary}`, - }), + children: ` ${summary}` + }) ]), create("ResponseSamples", { responseExample: exampleValue.value, - language: language, - }), - ], + language: language + }) + ] }); } ); @@ -170,14 +170,14 @@ export function createResponseExample(responseExample: any, mimeType: string) { children: [ guard(responseExample.summary, (summary) => [ create("p", { - children: ` ${summary}`, - }), + children: ` ${summary}` + }) ]), create("ResponseSamples", { responseExample: JSON.stringify(responseExample, null, 2), - language: language, - }), - ], + language: language + }) + ] }); } return create("TabItem", { @@ -186,14 +186,14 @@ export function createResponseExample(responseExample: any, mimeType: string) { children: [ guard(responseExample.summary, (summary) => [ create("p", { - children: ` ${summary}`, - }), + children: ` ${summary}` + }) ]), create("ResponseSamples", { responseExample: responseExample, - language: language, - }), - ], + language: language + }) + ] }); } @@ -213,7 +213,7 @@ export function createExampleFromSchema(schema: any, mimeType: string) { xmlExample = format(json2xml(responseExampleObject, ""), { indentation: " ", lineSeparator: "\n", - collapseContent: true, + collapseContent: true }); } catch { const xmlExampleWithRoot = { root: responseExampleObject }; @@ -221,7 +221,7 @@ export function createExampleFromSchema(schema: any, mimeType: string) { xmlExample = format(json2xml(xmlExampleWithRoot, ""), { indentation: " ", lineSeparator: "\n", - collapseContent: true, + collapseContent: true }); } catch { xmlExample = json2xml(responseExampleObject, ""); @@ -233,9 +233,9 @@ export function createExampleFromSchema(schema: any, mimeType: string) { children: [ create("ResponseSamples", { responseExample: xmlExample, - language: "xml", - }), - ], + language: "xml" + }) + ] }); } } @@ -246,9 +246,9 @@ export function createExampleFromSchema(schema: any, mimeType: string) { children: [ create("ResponseSamples", { responseExample: JSON.stringify(responseExample, null, 2), - language: "json", - }), - ], + language: "json" + }) + ] }); } return undefined; @@ -276,7 +276,7 @@ export function createStatusCodes({ responses }: Props) { value: code, children: [ create("div", { - children: createDescription(responses[code].description), + children: createDescription(responses[code].description) }), responseHeaders && createDetails({ @@ -288,27 +288,27 @@ export function createStatusCodes({ responses }: Props) { createDetailsSummary({ children: [ create("strong", { - children: "Response Headers", - }), - ], + children: "Response Headers" + }) + ] }), - createResponseHeaders(responseHeaders), - ], + createResponseHeaders(responseHeaders) + ] }), create("div", { children: createResponseSchema({ title: "Schema", body: { - content: responses[code].content, - }, - }), - }), - ], + content: responses[code].content + } + }) + }) + ] }); - }), - }), - ], - }), - ], + }) + }) + ] + }) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts index 0f5fdf944..d840fb7dc 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts @@ -12,19 +12,19 @@ export function createTermsOfService(termsOfService: string | undefined) { return create("div", { style: { - marginBottom: "var(--ifm-paragraph-margin-bottom)", + marginBottom: "var(--ifm-paragraph-margin-bottom)" }, children: [ create("h3", { style: { - marginBottom: "0.25rem", + marginBottom: "0.25rem" }, - children: "Terms of Service", + children: "Terms of Service" }), create("a", { href: `${termsOfService}`, - children: termsOfService, - }), - ], + children: termsOfService + }) + ] }); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createVersionBadge.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createVersionBadge.ts index 32c95aa65..243c078ee 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createVersionBadge.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createVersionBadge.ts @@ -11,8 +11,8 @@ export function createVersionBadge(version: string | undefined) { return guard(version, (version) => [ create("span", { className: "theme-doc-version-badge badge badge--secondary", - children: `Version: ${escape(version)}`, + children: `Version: ${escape(version)}` }), - `\n\n`, + `\n\n` ]); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts index dc294d416..25207277d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts @@ -9,7 +9,7 @@ import { ContactObject, LicenseObject, MediaTypeObject, - SecuritySchemeObject, + SecuritySchemeObject } from "../openapi/types"; import { ApiPageMetadata, InfoPageMetadata, TagPageMetadata } from "../types"; import { createAuthentication } from "./createAuthentication"; @@ -53,10 +53,10 @@ export function createApiPageMD({ extensions, parameters, requestBody, - responses, + responses }, infoPath, - frontMatter, + frontMatter }: ApiPageMetadata) { return render([ `import ApiTabs from "@theme/ApiTabs";\n`, @@ -82,9 +82,9 @@ export function createApiPageMD({ createParamsDetails({ parameters, type: "cookie" }), createRequestBodyDetails({ title: "Body", - body: requestBody, + body: requestBody } as Props), - createStatusCodes({ responses }), + createStatusCodes({ responses }) ]); } @@ -97,10 +97,10 @@ export function createInfoPageMD({ license, termsOfService, logo, - darkLogo, + darkLogo }, securitySchemes, - downloadUrl, + downloadUrl }: InfoPageMetadata) { return render([ `import ApiLogo from "@theme/ApiLogo";\n`, @@ -116,7 +116,7 @@ export function createInfoPageMD({ createAuthentication(securitySchemes as unknown as SecuritySchemeObject), createContactInfo(contact as ContactObject), createTermsOfService(termsOfService), - createLicense(license as LicenseObject), + createLicense(license as LicenseObject) ]); } diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/schema.test.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/schema.test.ts index 47852247e..7f7392cdf 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/schema.test.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/schema.test.ts @@ -50,7 +50,7 @@ describe("getQualifierMessage", () => { const actual = getQualifierMessage({ minLength: 1, maxLength: 40, - pattern: "^[a-zA-Z0-9_-]*$", + pattern: "^[a-zA-Z0-9_-]*$" }); expect(actual).toBe(expected); }); @@ -113,7 +113,7 @@ describe("getQualifierMessage", () => { const expected = "**Possible values:** `<= 40`"; const actual = getQualifierMessage({ maximum: 40, - exclusiveMaximum: false, + exclusiveMaximum: false }); expect(actual).toBe(expected); }); @@ -129,7 +129,7 @@ describe("getQualifierMessage", () => { const actual = getQualifierMessage({ minimum: 1, maximum: 40, - exclusiveMinimum: true, + exclusiveMinimum: true }); expect(actual).toBe(expected); }); @@ -139,7 +139,7 @@ describe("getQualifierMessage", () => { const actual = getQualifierMessage({ minimum: 1, maximum: 40, - exclusiveMaximum: true, + exclusiveMaximum: true }); expect(actual).toBe(expected); }); @@ -148,7 +148,7 @@ describe("getQualifierMessage", () => { const expected = "**Possible values:** `> 1` and `<= 40`"; const actual = getQualifierMessage({ exclusiveMinimum: 1, - maximum: 40, + maximum: 40 }); expect(actual).toBe(expected); }); @@ -157,7 +157,7 @@ describe("getQualifierMessage", () => { const expected = "**Possible values:** `>= 1` and `< 40`"; const actual = getQualifierMessage({ minimum: 1, - exclusiveMaximum: 40, + exclusiveMaximum: 40 }); expect(actual).toBe(expected); }); @@ -167,21 +167,21 @@ describe("getQualifierMessage", () => { const actual = getQualifierMessage({ exclusiveMinimum: 1, maximum: 40, - exclusiveMaximum: true, + exclusiveMaximum: true }); expect(actual).toBe(expected); }); it("should render nothing with empty boolean exclusiveMinimum", () => { const actual = getQualifierMessage({ - exclusiveMinimum: true, + exclusiveMinimum: true }); expect(actual).toBeUndefined(); }); it("should render nothing with empty boolean exclusiveMaximum", () => { const actual = getQualifierMessage({ - exclusiveMaximum: true, + exclusiveMaximum: true }); expect(actual).toBeUndefined(); }); @@ -189,7 +189,7 @@ describe("getQualifierMessage", () => { it("should render nothing with empty boolean exclusiveMinimum and exclusiveMaximum", () => { const actual = getQualifierMessage({ exclusiveMinimum: true, - exclusiveMaximum: true, + exclusiveMaximum: true }); expect(actual).toBeUndefined(); }); diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/createRequestExample.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/createRequestExample.ts index 8413cb8ea..0bccdfcd3 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/createRequestExample.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/createRequestExample.ts @@ -35,21 +35,21 @@ const primitives: Primitives = { uuid: () => "3fa85f64-5717-4562-b3fc-2c963f66afa6", hostname: () => "example.com", ipv4: () => "198.51.100.42", - ipv6: () => "2001:0db8:5b96:0000:0000:426f:8e17:642a", + ipv6: () => "2001:0db8:5b96:0000:0000:426f:8e17:642a" }, number: { default: () => 0, - float: () => 0.0, + float: () => 0.0 }, integer: { - default: () => 0, + default: () => 0 }, boolean: { default: (schema) => - typeof schema.default === "boolean" ? schema.default : true, + typeof schema.default === "boolean" ? schema.default : true }, object: {}, - array: {}, + array: {} }; function sampleRequestFromProp(name: string, prop: any, obj: any): any { diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/createResponseExample.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/createResponseExample.ts index 11a287e8b..2c64edbf6 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/createResponseExample.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/createResponseExample.ts @@ -35,21 +35,21 @@ const primitives: Primitives = { uuid: () => "3fa85f64-5717-4562-b3fc-2c963f66afa6", hostname: () => "example.com", ipv4: () => "198.51.100.42", - ipv6: () => "2001:0db8:5b96:0000:0000:426f:8e17:642a", + ipv6: () => "2001:0db8:5b96:0000:0000:426f:8e17:642a" }, number: { default: () => 0, - float: () => 0.0, + float: () => 0.0 }, integer: { - default: () => 0, + default: () => 0 }, boolean: { default: (schema) => - typeof schema.default === "boolean" ? schema.default : true, + typeof schema.default === "boolean" ? schema.default : true }, object: {}, - array: {}, + array: {} }; function sampleResponseFromProp(name: string, prop: any, obj: any): any { diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts index 8dde3c8d0..ae7b0c496 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts @@ -25,7 +25,7 @@ import { ApiPageMetadata, InfoPageMetadata, SidebarOptions, - TagPageMetadata, + TagPageMetadata } from "../types"; import { sampleRequestFromSchema } from "./createRequestExample"; import { OpenApiObject, TagObject } from "./types"; @@ -113,7 +113,7 @@ function createItems( ? splitDescription[0] .replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'") .replace(/\s+$/, "") - : "", + : "" }, securitySchemes: openapiData.components?.securitySchemes, info: { @@ -121,8 +121,8 @@ function createItems( tags: openapiData.tags, title: openapiData.info.title ?? "Introduction", logo: openapiData.info["x-logo"]! as any, - darkLogo: openapiData.info["x-dark-logo"]! as any, - }, + darkLogo: openapiData.info["x-dark-logo"]! as any + } }; items.push(infoPage); } @@ -242,11 +242,11 @@ function createItems( : "", ...(options?.proxy && { proxy: options.proxy }), ...(options?.hideSendButton && { - hide_send_button: options.hideSendButton, + hide_send_button: options.hideSendButton }), ...(options?.showExtensions && { - show_extensions: options.showExtensions, - }), + show_extensions: options.showExtensions + }) }, api: { ...defaults, @@ -258,8 +258,8 @@ function createItems( security, securitySchemes, jsonRequestBodyExample, - info: openapiData.info, - }, + info: openapiData.info + } }; items.push(apiPage); @@ -386,11 +386,11 @@ function createItems( : "", ...(options?.proxy && { proxy: options.proxy }), ...(options?.hideSendButton && { - hide_send_button: options.hideSendButton, + hide_send_button: options.hideSendButton }), ...(options?.showExtensions && { - show_extensions: options.showExtensions, - }), + show_extensions: options.showExtensions + }) }, api: { ...defaults, @@ -402,8 +402,8 @@ function createItems( security, securitySchemes, jsonRequestBodyExample, - info: openapiData.info, - }, + info: openapiData.info + } }; items.push(apiPage); } @@ -445,11 +445,11 @@ function createItems( ? splitDescription[0] .replace(/((?:^|[^\\])(?:\\{2})*)"/g, "$1'") .replace(/\s+$/, "") - : "", + : "" }, tag: { - ...tag, - }, + ...tag + } }; items.push(tagPage); }); @@ -499,7 +499,7 @@ export async function readOpenapiFiles( const allFiles = await Globby(["**/*.{json,yaml,yml}"], { cwd: openapiPath, ignore: GlobExcludeDefault, - deep: 1, + deep: 1 }); const sources = allFiles.filter((x) => !x.includes("_category_")); // todo: regex exclude? return Promise.all( @@ -512,7 +512,7 @@ export async function readOpenapiFiles( return { source: fullPath, // This will be aliased in process. sourceDirName: path.dirname(source), - data, + data }; }) ); @@ -525,8 +525,8 @@ export async function readOpenapiFiles( { source: openapiPath, // This will be aliased in process. sourceDirName: ".", - data, - }, + data + } ]; } @@ -543,7 +543,7 @@ export async function processOpenapiFiles( sidebarOptions ); const itemsObjectsArray = processedFile[0].map((item) => ({ - ...item, + ...item })); const tags = processedFile[1]; return [itemsObjectsArray, tags]; @@ -600,7 +600,7 @@ export function getTagDisplayName(tagName: string, tags: TagObject[]): string { // find the very own tagObject const tagObject = tags.find((tagObject) => tagObject.name === tagName) ?? { // if none found, just fake one - name: tagName, + name: tagName }; // return the first found and filled value from the property list diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/loadAndResolveSpec.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/loadAndResolveSpec.ts index ee59054b2..b251c6c4b 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/loadAndResolveSpec.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/loadAndResolveSpec.ts @@ -71,7 +71,7 @@ export function convertSwagger2OpenAPI(spec: object) { warnOnly: true, text: "{}", anchors: true, - resolveInternal: true, + resolveInternal: true }, (err: any, res: any) => { // TODO: log any warnings @@ -92,12 +92,12 @@ async function resolveJsonRefs(specUrlOrObject: object | string) { file: true, external: true, http: { - timeout: 15000, // 15 sec timeout - }, + timeout: 15000 // 15 sec timeout + } }, dereference: { - circular: true, - }, + circular: true + } }); return schema as OpenApiObject; } catch (err: any) { @@ -119,13 +119,13 @@ export async function loadAndResolveSpec(specUrlOrObject: object | string) { const config = new Config({} as ResolvedConfig); const bundleOpts = { config, - base: process.cwd(), + base: process.cwd() } as any; if (typeof specUrlOrObject === "object" && specUrlOrObject !== null) { bundleOpts["doc"] = { source: { absoluteRef: "" } as Source, - parsed: specUrlOrObject, + parsed: specUrlOrObject } as Document; } else { bundleOpts["ref"] = specUrlOrObject; @@ -135,7 +135,7 @@ export async function loadAndResolveSpec(specUrlOrObject: object | string) { // bundleOpts["dereference"] = true; const { - bundle: { parsed }, + bundle: { parsed } } = await bundle(bundleOpts); //Pre-processing before resolving JSON refs diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/OpenAPIParser.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/OpenAPIParser.ts index 8f18c8b30..dcf8a6326 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/OpenAPIParser.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/OpenAPIParser.ts @@ -190,13 +190,13 @@ export class OpenAPIParser { ) ) { return { - allOf: [rest, resolved], + allOf: [rest, resolved] }; } else { // small optimization return { ...resolved, - ...rest, + ...rest }; } } @@ -227,7 +227,7 @@ export class OpenAPIParser { ...schema, allOf: undefined, parentRefs: [], - title: schema.title || getDefinitionName($ref), + title: schema.title || getDefinitionName($ref) }; // avoid mutating inner objects @@ -258,7 +258,7 @@ export class OpenAPIParser { receiver.parentRefs!.push(...(subMerged.parentRefs || [])); return { $ref: subRef, - schema: subMerged, + schema: subMerged }; }) .filter((child) => child !== undefined) as Array<{ @@ -326,8 +326,8 @@ export class OpenAPIParser { const receiverItems = isBoolean(receiver.items) ? { items: receiver.items } : receiver.items - ? (Object.assign({}, receiver.items) as OpenAPISchema) - : {}; + ? (Object.assign({}, receiver.items) as OpenAPISchema) + : {}; const subSchemaItems = isBoolean(items) ? { items } : (Object.assign({}, items) as OpenAPISchema); @@ -355,7 +355,7 @@ export class OpenAPIParser { receiver = { ...receiver, title: receiver.title || title, - ...otherConstraints, + ...otherConstraints }; if (subSchemaRef) { @@ -389,7 +389,7 @@ export class OpenAPIParser { ) ) { res["#/components/schemas/" + defName] = [ - def["x-discriminator-value"] || defName, + def["x-discriminator-value"] || defName ]; } } @@ -416,14 +416,14 @@ export class OpenAPIParser { return { oneOf: sub.oneOf.map((part) => { const merged = this.mergeAllOf({ - allOf: [...beforeAllOf, part, ...afterAllOf], + allOf: [...beforeAllOf, part, ...afterAllOf] }); // each oneOf should be independent so exiting all the parent refs // otherwise it will cause false-positive recursive detection this.exitParents(merged); return merged; - }), + }) }; } } diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/RedocNormalizedOptions.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/RedocNormalizedOptions.ts index 26793aa2f..fd82bbb17 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/RedocNormalizedOptions.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/services/RedocNormalizedOptions.ts @@ -12,7 +12,7 @@ import { isArray } from "../utils/helpers"; export enum SideNavStyleEnum { SummaryOnly = "summary-only", PathOnly = "path-only", - IdOnly = "id-only", + IdOnly = "id-only" } export interface RedocRawOptions { diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/utils/openapi.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/utils/openapi.ts index 2fbd16d00..909692efb 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/utils/openapi.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/utils/utils/openapi.ts @@ -19,14 +19,14 @@ import { OpenAPIResponse, OpenAPISchema, OpenAPIServer, - Referenced, + Referenced } from "../types"; import { isNumeric, removeQueryString, resolveUrl, isArray, - isBoolean, + isBoolean } from "./helpers"; function isWildcardStatusCode( @@ -79,7 +79,7 @@ const operationNames = { patch: true, delete: true, options: true, - $ref: true, + $ref: true }; export function isOperationName(key: string): boolean { @@ -120,7 +120,7 @@ const schemaKeywordTypes = { additionalProperties: "object", unevaluatedProperties: "object", properties: "object", - patternProperties: "object", + patternProperties: "object" }; export function detectType(schema: OpenAPISchema): string { @@ -623,7 +623,7 @@ export function mergeSimilarMediaTypes( } mergedTypes[normalizedMimeName] = { ...mergedTypes[normalizedMimeName], - ...mime, + ...mime }; }); @@ -659,8 +659,8 @@ export function normalizeServers( // Behaviour defined in OpenAPI spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#openapi-object servers = [ { - url: "/", - }, + url: "/" + } ]; } @@ -672,7 +672,7 @@ export function normalizeServers( return { ...server, url: normalizeUrl(server.url), - description: server.description || "", + description: server.description || "" }; }); } @@ -688,8 +688,8 @@ export function setSecuritySchemePrefix(prefix: string) { export const shortenHTTPVerb = (verb) => ({ delete: "del", - options: "opts", - }[verb] || verb); + options: "opts" + })[verb] || verb; export function isRedocExtension(key: string): boolean { const redocExtensions = { @@ -705,7 +705,7 @@ export function isRedocExtension(key: string): boolean { "x-tagGroups": true, "x-traitTag": true, "x-additionalPropertiesName": true, - "x-explicitMappingOnly": true, + "x-explicitMappingOnly": true }; return key in redocExtensions; @@ -753,7 +753,7 @@ export function getContentWithLegacyExamples( const examples = xExamples[mime]; mediaContent[mime] = { ...mediaContent[mime], - examples, + examples }; } } else if (xExample) { @@ -762,7 +762,7 @@ export function getContentWithLegacyExamples( const example = xExample[mime]; mediaContent[mime] = { ...mediaContent[mime], - example, + example }; } } diff --git a/packages/docusaurus-plugin-openapi-docs/src/options.ts b/packages/docusaurus-plugin-openapi-docs/src/options.ts index d2a56805d..0fcab893e 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/options.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/options.ts @@ -12,13 +12,13 @@ const sidebarOptions = Joi.object({ categoryLinkSource: Joi.string().valid("tag", "info", "auto"), customProps: Joi.object(), sidebarCollapsible: Joi.boolean(), - sidebarCollapsed: Joi.boolean(), + sidebarCollapsed: Joi.boolean() }); const markdownGenerators = Joi.object({ createApiPageMD: Joi.function(), createInfoPageMD: Joi.function(), - createTagPageMD: Joi.function(), + createTagPageMD: Joi.function() }); export const OptionsSchema = Joi.object({ @@ -39,15 +39,15 @@ export const OptionsSchema = Joi.object({ markdownGenerators: markdownGenerators, version: Joi.string().when("versions", { is: Joi.exist(), - then: Joi.required(), + then: Joi.required() }), label: Joi.string().when("versions", { is: Joi.exist(), - then: Joi.required(), + then: Joi.required() }), baseUrl: Joi.string().when("versions", { is: Joi.exist(), - then: Joi.required(), + then: Joi.required() }), versions: Joi.object().pattern( /^/, @@ -55,10 +55,10 @@ export const OptionsSchema = Joi.object({ specPath: Joi.string().required(), outputDir: Joi.string().required(), label: Joi.string().required(), - baseUrl: Joi.string().required(), + baseUrl: Joi.string().required() }) - ), + ) }) ) - .required(), + .required() }); diff --git a/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts b/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts index b3e62abf3..e36de77b2 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/sidebars/index.ts @@ -11,7 +11,7 @@ import { ProcessedSidebar, SidebarItemCategory, SidebarItemCategoryLinkConfig, - SidebarItemDoc, + SidebarItemDoc } from "@docusaurus/plugin-content-docs/src/sidebars/types"; import { posixPath } from "@docusaurus/utils"; import clsx from "clsx"; @@ -23,7 +23,7 @@ import type { SidebarOptions, APIOptions, ApiPageMetadata, - ApiMetadata, + ApiMetadata } from "../types"; function isApiItem(item: ApiMetadata): item is ApiMetadata { @@ -50,7 +50,7 @@ function groupByTags( sidebarCollapsed, sidebarCollapsible, customProps, - categoryLinkSource, + categoryLinkSource } = sidebarOptions; const apiItems = items.filter(isApiItem); @@ -60,7 +60,7 @@ function groupByTags( id: item.id, title: item.title, description: item.description, - tags: item.info.tags, + tags: item.info.tags }; }); @@ -98,10 +98,10 @@ function groupByTags( className: clsx( { "menu__list-item--deprecated": item.api.deprecated, - "api-method": !!item.api.method, + "api-method": !!item.api.method }, item.api.method - ), + ) }; } @@ -111,7 +111,7 @@ function groupByTags( const id = infoItem.id; rootIntroDoc = { type: "doc" as const, - id: basePath === "" || undefined ? `${id}` : `${basePath}/${id}`, + id: basePath === "" || undefined ? `${id}` : `${basePath}/${id}` }; } @@ -125,7 +125,7 @@ function groupByTags( (t) => tag === t.name ?? { name: tag, - description: `${tag} Index`, + description: `${tag} Index` } ); @@ -138,7 +138,7 @@ function groupByTags( id: basePath === "" || undefined ? `${taggedInfoObject.id}` - : `${basePath}/${taggedInfoObject.id}`, + : `${basePath}/${taggedInfoObject.id}` } as SidebarItemCategoryLinkConfig; } @@ -147,8 +147,7 @@ function groupByTags( const tagId = kebabCase(tagObject.name); linkConfig = { type: "doc", - id: - basePath === "" || undefined ? `${tagId}` : `${basePath}/${tagId}`, + id: basePath === "" || undefined ? `${tagId}` : `${basePath}/${tagId}` } as SidebarItemCategoryLinkConfig; } @@ -165,7 +164,7 @@ function groupByTags( kebabCase(tag) ) ) - : posixPath(path.join("/category", basePath, kebabCase(tag))), + : posixPath(path.join("/category", basePath, kebabCase(tag))) } as SidebarItemCategoryLinkConfig; } @@ -177,7 +176,7 @@ function groupByTags( collapsed: sidebarCollapsed, items: apiItems .filter((item) => !!item.api.tags?.includes(tag)) - .map(createDocItem), + .map(createDocItem) }; }) .filter((item) => item.items.length > 0); // Filter out any categories with no items. @@ -196,8 +195,8 @@ function groupByTags( collapsed: sidebarCollapsed!, items: apiItems .filter(({ api }) => api.tags === undefined || api.tags.length === 0) - .map(createDocItem), - }, + .map(createDocItem) + } ]; } diff --git a/packages/docusaurus-plugin-openapi-docs/src/types.ts b/packages/docusaurus-plugin-openapi-docs/src/types.ts index 7c12d0805..a7d3713e6 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/types.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/types.ts @@ -11,14 +11,14 @@ import { InfoObject, OperationObject, SecuritySchemeObject, - TagObject, + TagObject } from "./openapi/types"; export type { PropSidebarItemCategory, SidebarItemLink, PropSidebar, - PropSidebarItem, + PropSidebarItem } from "@docusaurus/plugin-content-docs-types"; export interface PluginOptions { id?: string; diff --git a/packages/docusaurus-theme-openapi-docs/babel.config.js b/packages/docusaurus-theme-openapi-docs/babel.config.js index dfa76c9ab..3b304e7d3 100644 --- a/packages/docusaurus-theme-openapi-docs/babel.config.js +++ b/packages/docusaurus-theme-openapi-docs/babel.config.js @@ -12,14 +12,14 @@ module.exports = { // we mostly need to transpile some features so that node does not crash... lib: { presets: [ - ["@babel/preset-typescript", { isTSX: true, allExtensions: true }], + ["@babel/preset-typescript", { isTSX: true, allExtensions: true }] ], // Useful to transpile for older node versions plugins: [ "@babel/plugin-transform-modules-commonjs", "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-optional-chaining", - ], + "@babel/plugin-proposal-optional-chaining" + ] }, // USED FOR JS SWIZZLE @@ -28,8 +28,8 @@ module.exports = { // This source code should look clean/human readable to be usable "lib-next": { presets: [ - ["@babel/preset-typescript", { isTSX: true, allExtensions: true }], - ], - }, - }, + ["@babel/preset-typescript", { isTSX: true, allExtensions: true }] + ] + } + } }; diff --git a/packages/docusaurus-theme-openapi-docs/package.json b/packages/docusaurus-theme-openapi-docs/package.json index f3a6d6cb9..bc98a1bc0 100644 --- a/packages/docusaurus-theme-openapi-docs/package.json +++ b/packages/docusaurus-theme-openapi-docs/package.json @@ -28,14 +28,14 @@ "watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\"" }, "devDependencies": { - "@docusaurus/types": "^3.0.0", + "@docusaurus/types": "^3.0.1", "@types/crypto-js": "^4.1.0", "@types/file-saver": "^2.0.5", "@types/lodash": "^4.14.176", "concurrently": "^5.2.0" }, "dependencies": { - "@docusaurus/theme-common": "^3.0.0", + "@docusaurus/theme-common": "^3.0.1", "@hookform/error-message": "^2.0.1", "@paloaltonetworks/postman-code-generators": "1.1.15-patch.2", "@paloaltonetworks/postman-collection": "^4.1.0", diff --git a/packages/docusaurus-theme-openapi-docs/src/index.ts b/packages/docusaurus-theme-openapi-docs/src/index.ts index 1ad7976e9..ae821d31b 100644 --- a/packages/docusaurus-theme-openapi-docs/src/index.ts +++ b/packages/docusaurus-theme-openapi-docs/src/index.ts @@ -19,7 +19,7 @@ export default function docusaurusThemeOpenAPI(): Plugin { const modules = [ require.resolve( path.join(__dirname, "..", "lib", "theme", "styles.scss") - ), + ) ]; return modules; }, @@ -51,17 +51,17 @@ export default function docusaurusThemeOpenAPI(): Plugin { ...getStyleLoaders(isServer, {}), { loader: require.resolve("sass-loader"), - options: {}, - }, - ], - }, - ], - }, + options: {} + } + ] + } + ] + } }; } return { - plugins: [new NodePolyfillPlugin()], + plugins: [new NodePolyfillPlugin()] }; - }, + } }; } diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js index cb71c3299..75f9cef5e 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js @@ -24,7 +24,7 @@ export default function ExpandButton({ showLineNumbers, blockClassName, title, - lineClassNames, + lineClassNames }) { const prismTheme = usePrismTheme(); @@ -51,18 +51,18 @@ export default function ExpandButton({ ? translate({ id: "theme.CodeBlock.expanded", message: "Expanded", - description: "The expanded button label on code blocks", + description: "The expanded button label on code blocks" }) : translate({ id: "theme.CodeBlock.expandButtonAriaLabel", message: "Expand code to fullscreen", - description: "The ARIA label for expand code blocks button", + description: "The ARIA label for expand code blocks button" }) } title={translate({ id: "theme.CodeBlock.expand", message: "Expand", - description: "The expand button label on code blocks", + description: "The expand button label on code blocks" })} className={clsx( "clean-btn", diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Accept/slice.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Accept/slice.ts index 3fa72c085..777f3b550 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Accept/slice.ts +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/Accept/slice.ts @@ -20,8 +20,8 @@ export const slice = createSlice({ reducers: { setAccept: (state, action: PayloadAction) => { state.value = action.payload; - }, - }, + } + } }); export const { setAccept } = slice.actions; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js index 4909314d3..a543b9179 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js @@ -13,7 +13,7 @@ import { parseLanguage, parseLines, containsLineNumbers, - useCodeWordWrap, + useCodeWordWrap } from "@docusaurus/theme-common/internal"; import Container from "@theme/ApiExplorer/ApiCodeBlock/Container"; import CopyButton from "@theme/ApiExplorer/ApiCodeBlock/CopyButton"; @@ -29,10 +29,10 @@ export default function CodeBlockString({ metastring, title: titleProp, showLineNumbers: showLineNumbersProp, - language: languageProp, + language: languageProp }) { const { - prism: { defaultLanguage, magicComments }, + prism: { defaultLanguage, magicComments } } = useThemeConfig(); const language = languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage; @@ -45,7 +45,7 @@ export default function CodeBlockString({ const { lineClassNames, code } = parseLines(children, { metastring, language, - magicComments, + magicComments }); const showLineNumbers = showLineNumbersProp ?? containsLineNumbers(metastring); diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js index a85b866b2..81f0443ec 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js @@ -31,18 +31,18 @@ export default function CopyButton({ code, className }) { ? translate({ id: "theme.CodeBlock.copied", message: "Copied", - description: "The copied button label on code blocks", + description: "The copied button label on code blocks" }) : translate({ id: "theme.CodeBlock.copyButtonAriaLabel", message: "Copy code to clipboard", - description: "The ARIA label for copy code blocks button", + description: "The ARIA label for copy code blocks button" }) } title={translate({ id: "theme.CodeBlock.copy", message: "Copy", - description: "The copy button label on code blocks", + description: "The copy button label on code blocks" })} className={clsx( "clean-btn", diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js index 676f3f44b..98d7c3edd 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js @@ -17,12 +17,12 @@ export default function ExitButton({ className, handler }) { aria-label={translate({ id: "theme.CodeBlock.exitButtonAriaLabel", message: "Exit expanded view", - description: "The ARIA label for exit expanded view button", + description: "The ARIA label for exit expanded view button" })} title={translate({ id: "theme.CodeBlock.copy", message: "Copy", - description: "The exit button label on code blocks", + description: "The exit button label on code blocks" })} className={clsx( "clean-btn", diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js index 651732f24..9cbab02d2 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js @@ -24,7 +24,7 @@ export default function ExpandButton({ showLineNumbers, blockClassName, title, - lineClassNames, + lineClassNames }) { const [isModalOpen, setIsModalOpen] = useState(false); const prismTheme = usePrismTheme(); @@ -42,18 +42,18 @@ export default function ExpandButton({ ? translate({ id: "theme.CodeBlock.expanded", message: "Expanded", - description: "The expanded button label on code blocks", + description: "The expanded button label on code blocks" }) : translate({ id: "theme.CodeBlock.expandButtonAriaLabel", message: "Expand code to fullscreen", - description: "The ARIA label for expand code blocks button", + description: "The ARIA label for expand code blocks button" }) } title={translate({ id: "theme.CodeBlock.expand", message: "Expand", - description: "The expand button label on code blocks", + description: "The expand button label on code blocks" })} className={clsx( "clean-btn", diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js index 2cf119bf9..5c4964513 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js @@ -14,7 +14,7 @@ export default function CodeBlockLine({ classNames, showLineNumbers, getLineProps, - getTokenProps, + getTokenProps }) { if (line.length === 1 && line[0].content === "\n") { line[0].content = ""; @@ -24,7 +24,7 @@ export default function CodeBlockLine({ className: clsx( classNames, showLineNumbers && "openapi-explorer__code-block-code-line" - ), + ) }); const lineTokens = line.map((token, key) => ( diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js index 447b776a4..682b8d54d 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js @@ -15,7 +15,7 @@ export default function WordWrapButton({ className, onClick, isEnabled }) { id: "theme.CodeBlock.wordWrapToggle", message: "Toggle word wrap", description: - "The title attribute for toggle word wrapping button of code block lines", + "The title attribute for toggle word wrapping button of code block lines" }); return (