diff --git a/.changeset/clever-coins-call.md b/.changeset/clever-coins-call.md new file mode 100644 index 000000000..1a333954c --- /dev/null +++ b/.changeset/clever-coins-call.md @@ -0,0 +1,6 @@ +--- +"nextjs-website": minor +"gitbook-docs": patch +--- + +[DEV-1040] Rendering component OpenAPI Gitbook diff --git a/apps/nextjs-website/package.json b/apps/nextjs-website/package.json index 3cf44d40f..ad625f112 100644 --- a/apps/nextjs-website/package.json +++ b/apps/nextjs-website/package.json @@ -12,6 +12,7 @@ "test": "jest -i" }, "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", "@aws-amplify/auth": "^5.6.6", "@aws-amplify/ui-react": "^5.3.1", "@aws-sdk/client-dynamodb": "^3.496.0", @@ -37,6 +38,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-syntax-highlighter": "^15.5.0", + "swagger-ui": "^5.9.1", "swiper": "^10.0.3" }, "devDependencies": { @@ -45,11 +47,13 @@ "@types/react": "18.2.21", "@types/react-dom": "18.2.7", "@types/react-syntax-highlighter": "^15.5.7", + "@types/swagger-ui": "^3.52.4", "eslint": "8.47.0", "eslint-config-custom": "*", "eslint-config-next": "13.4.19", "jest": "^29.5.0", "jest-mock-extended": "^3.0.5", + "openapi-types": "^12.1.3", "ts-jest": "^29.1.1", "typescript": "5.1.6" }, diff --git a/apps/nextjs-website/src/app/layout.tsx b/apps/nextjs-website/src/app/layout.tsx index 30bbbf090..4d598cbde 100644 --- a/apps/nextjs-website/src/app/layout.tsx +++ b/apps/nextjs-website/src/app/layout.tsx @@ -4,6 +4,7 @@ import 'swiper/css'; import 'swiper/css/navigation'; import 'swiper/css/pagination'; import '@/styles/globals.css'; +import '@/polyfill'; import ThemeRegistry from './ThemeRegistry'; import { getProducts } from '@/lib/api'; import SiteFooter from '@/components/atoms/SiteFooter/SiteFooter'; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/GitBookContent.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/GitBookContent.tsx index 8d3f4b691..08ef7b7eb 100644 --- a/apps/nextjs-website/src/components/organisms/GitBookContent/GitBookContent.tsx +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/GitBookContent.tsx @@ -26,7 +26,7 @@ import Tabs from './components/Tabs'; import Quote from './components/Quote'; import Embed from './components/Embed'; import CodeBlock from './components/CodeBlock'; -import Swagger from './components/Swagger'; +import Swagger from './components/Swagger/Swagger'; import PageLink from '@/components/organisms/GitBookContent/components/PageLink'; import Cards, { Card, CardItem } from './components/Cards'; import { ParseContentConfig } from 'gitbook-docs/parseContent'; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger.tsx deleted file mode 100644 index 950d3b991..000000000 --- a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { SwaggerProps } from 'gitbook-docs/markdoc/schema/swagger'; - -const Swagger = (props: SwaggerProps) => <>; - -export default Swagger; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Model.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Model.tsx new file mode 100644 index 000000000..1125908ae --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Model.tsx @@ -0,0 +1,148 @@ +import { KeyboardArrowRight } from '@mui/icons-material'; +import { + Box, + Collapse, + List, + ListItemButton, + ListItemIcon, + Typography, +} from '@mui/material'; +import { OpenAPIV3 } from 'openapi-types'; +import { MouseEventHandler, PropsWithChildren, useState } from 'react'; +import { useModelProps } from './hooks/useModel'; + +type ModelEntryProps = { + title?: string; + required?: boolean; + schemaType?: string; +}; + +type ModelItemProps = ModelEntryProps & { + description?: string; + onClick?: MouseEventHandler; +}; + +const ModelItem = ({ + description, + title, + required, + schemaType, + onClick, +}: ModelItemProps) => { + const showIcon = typeof onClick === 'function'; + return ( + + + + {showIcon && } + + {title && ( + + {title} + {required && ( + + * + + )} + + )} + theme.palette.primary.main }}> + {schemaType} + + + {description} + + ); +}; + +const ModelListEntry = ({ + title, + required, + schemaType, + children, +}: PropsWithChildren) => { + const [open, setOpen] = useState(false); + + return ( + + setOpen(!open)} + /> + + {children} + + + ); +}; + +type ModelProps = { + label?: string; + model: OpenAPIV3.SchemaObject; + requiredAttrs?: ReadonlyArray; +}; + +export const Model = (props: ModelProps) => { + const { + description, + items, + properties, + required, + requiredAttrs, + schemaType, + title, + } = useModelProps(props); + + if (schemaType === 'object') { + return ( + + {Object.entries(properties).map(([key, property]) => ( + + ))} + + ); + } else if (schemaType === 'array') { + return ( + + + + ); + } else { + return ( + + ); + } +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operation.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operation.tsx new file mode 100644 index 000000000..6f95029a8 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operation.tsx @@ -0,0 +1,91 @@ +import { + Box, + Chip, + ChipProps, + Typography, + chipClasses, + styled, +} from '@mui/material'; +import { OpenAPIV3 } from 'openapi-types'; + +import Expandable, { + ExpandableDetails, + ExpandableSummary, +} from '../Expandable'; +import { Parameters } from './Parameters'; +import { RequestBody } from './RequestBody'; +import { Responses } from './Responses'; + +const StyledChip = styled(Chip)(() => ({ + [`& .${chipClasses.label}`]: { + textTransform: 'uppercase', + fontWeight: 'bold', + color: 'white!important', + }, +})); + +export const API_METHODS_COLORS: Record< + OpenAPIV3.HttpMethods, + ChipProps['color'] +> = { + get: 'primary', + post: 'success', + put: 'warning', + delete: 'error', + options: 'default', + head: 'default', + patch: 'default', + trace: 'default', +}; + +type OperationProps = OpenAPIV3.OperationObject<{ + method: OpenAPIV3.HttpMethods; + path: string; +}>; + +export const Operation = ({ + method, + path, + summary, + description, + parameters, + responses, + requestBody, + servers = [], +}: OperationProps) => { + const chipColor = API_METHODS_COLORS[method] || 'default'; + const baseUrl = servers[0]?.url || ''; + + return ( + + + + + theme.palette.text.secondary }} + > + {baseUrl} + + {path} + + + {summary} + + + + {description} + + {requestBody && ( + + )} + {responses && } + + + ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operations.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operations.tsx new file mode 100644 index 000000000..a14441f16 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Operations.tsx @@ -0,0 +1,93 @@ +import { useTranslations } from 'next-intl'; +import { OpenAPIV3 } from 'openapi-types'; + +import { Operation } from './Operation'; +import { Card, Typography } from '@mui/material'; + +const methods = [ + 'get', + 'post', + 'put', + 'delete', + 'options', + 'head', + 'patch', + 'trace', +]; + +const getOperations = ( + pathItemObj: Omit +) => + Object.keys(pathItemObj) + .filter((key) => methods.includes(key)) + .reduce<[string, OpenAPIV3.OperationObject][]>((acc, key) => { + const method = key as OpenAPIV3.HttpMethods; + const operation = pathItemObj[method] as OpenAPIV3.OperationObject; + return [...acc, [method, operation]]; + }, []); + +type OperationsProps = { + spec: OpenAPIV3.Document; + validOperations?: Record; +}; + +export const Operations = ({ spec, validOperations }: OperationsProps) => { + const t = useTranslations('swagger'); + + if (!spec.paths || !validOperations) { + const noOpHeader = t('emptyOperations.header'); + const noOpMessage = t('emptyOperations.message'); + return ( + + + {noOpHeader} + + theme.palette.text.secondary }} + > + {noOpMessage} + + + ); + } + + const paths = Object.entries(spec.paths); + const specServers = spec.servers || []; + + const renderOperationTag = ([path, pathItemObj = {}]: [ + string, + OpenAPIV3.PathItemObject | undefined + ]) => { + const operations = getOperations(pathItemObj); + const headerParameters = pathItemObj?.parameters || []; + const validOperationMethods = validOperations[path] || []; + + return ( +
+ {operations.map(([method, operation]) => { + const httpMethod = method as OpenAPIV3.HttpMethods; + const renderOp = validOperationMethods.includes(httpMethod); + + if (!renderOp) return null; + + const { parameters: pathParameters = [], servers, ...op } = operation; + const parameters = pathParameters.concat(headerParameters); + const operationServers = servers || specServers; + return ( + + ); + })} +
+ ); + }; + + return
{paths.map(renderOperationTag)}
; +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameter.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameter.tsx new file mode 100644 index 000000000..2d6d53288 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameter.tsx @@ -0,0 +1,39 @@ +import { Box, Typography } from '@mui/material'; +import { OpenAPIV3 } from 'openapi-types'; + +export const Parameter = ({ + name, + description, + schema, + required, +}: OpenAPIV3.ParameterObject) => { + const type = schema ? (schema as OpenAPIV3.SchemaObject)?.type : ''; + return ( + theme.typography.caption.fontSize, + }} + > + + {name} + {required && ( + + * + + )} + + {type} + {description} + + ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/ParameterRow.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/ParameterRow.tsx new file mode 100644 index 000000000..e170b3b30 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/ParameterRow.tsx @@ -0,0 +1,31 @@ +import { Stack, Typography } from '@mui/material'; +import { OpenAPIV3 } from 'openapi-types'; + +import { Parameter } from './Parameter'; + +type ParameterRowProps = { + title: string; + parameters: OpenAPIV3.ParameterObject[]; +}; + +export const ParameterRow = ({ title, parameters }: ParameterRowProps) => { + return ( + + + {title} + +
+ {parameters.map((parameter, index) => ( + + ))} +
+
+ ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameters.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameters.tsx new file mode 100644 index 000000000..4fffd0d5f --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Parameters.tsx @@ -0,0 +1,60 @@ +import { Stack, Typography } from '@mui/material'; +import { useTranslations } from 'next-intl'; +import { OpenAPIV3 } from 'openapi-types'; +import { useMemo } from 'react'; + +import { ParameterRow } from './ParameterRow'; + +const groupBy = ( + acc: Record, + parameter: OpenAPIV3.ParameterObject +): Record => { + const { in: group } = parameter; + if (Reflect.has(acc, group)) { + return { ...acc, [group]: [...acc[group], parameter] }; + } else { + return { ...acc, [group]: [parameter] }; + } +}; + +type ParametersProps = { + parameters: OpenAPIV3.ParameterObject[]; +}; + +// Parameters are grouped into Path, Query, Header, Cookie and Body +export const Parameters = ({ parameters = [] }: ParametersProps) => { + const t = useTranslations('swagger'); + const [hasParameters, groups] = useMemo(() => { + if (parameters.length === 0) return [false, []]; + + const parametersObj = parameters as OpenAPIV3.ParameterObject[]; + const grouped = parametersObj.reduce(groupBy, {}); + const entries = Object.entries(grouped); + + return [true, entries]; + }, [parameters]); + + const isEmpty = !hasParameters; + + return ( + + + {t('parameters.header')} + + {isEmpty && ( + {t('parameters.empty')} + )} + {hasParameters && + groups.map(([groupKey, parameters]) => ( + + ))} + + ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/RequestBody.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/RequestBody.tsx new file mode 100644 index 000000000..7bb99c2b1 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/RequestBody.tsx @@ -0,0 +1,33 @@ +import { Stack, Typography } from '@mui/material'; +import { useTranslations } from 'next-intl'; +import { OpenAPIV3 } from 'openapi-types'; + +import { SchemaWithExample } from './SchemaWithExample'; + +export const RequestBody = ({ content }: OpenAPIV3.RequestBodyObject) => { + const t = useTranslations('swagger'); + const body = content?.['application/json']; + const hasDetails = !!body; + + if (!hasDetails) { + return null; + } + + return ( + + + {t('requestBody.header')} + +
+ +
+
+ ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Response.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Response.tsx new file mode 100644 index 000000000..7869d9335 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Response.tsx @@ -0,0 +1,71 @@ +import { Circle, KeyboardArrowRight } from '@mui/icons-material'; +import { + Accordion, + AccordionDetails, + Box, + AccordionSummary as MuiAccordionSummary, + Typography, + styled, +} from '@mui/material'; +import { OpenAPIV3 } from 'openapi-types'; + +import { SchemaWithExample } from './SchemaWithExample'; +import { useState } from 'react'; + +const AccordionSummary = styled(MuiAccordionSummary)(({ theme }) => ({ + '& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': { + color: theme.palette.primary.main, + transform: 'rotate(90deg)', + }, + '& .MuiAccordionSummary-content': { + alignItems: 'center', + }, +})); + +function getResponseCodeColor(code: string) { + const codeNumber = Number(code); + if (codeNumber >= 200 && codeNumber < 300) { + return 'success'; + } else if (codeNumber >= 300 && codeNumber < 400) { + return 'primary'; + } else if (codeNumber >= 400 && codeNumber < 500) { + return 'warning'; + } else { + return 'error'; + } +} + +type ResponseProps = OpenAPIV3.ResponseObject & { + code: string; +}; + +export const Response = ({ code, content, description }: ResponseProps) => { + const [open, setOpen] = useState(false); + const response = content?.['application/json']; + const codeColor = getResponseCodeColor(code); + const hasDetails = !!response; + const expandIcon = hasDetails ? ( + + ) : undefined; + + const handleToggle = () => { + hasDetails && setOpen(!open); + }; + + return ( + + + + + {code} + + {description} + + {hasDetails && ( + + + + )} + + ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Responses.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Responses.tsx new file mode 100644 index 000000000..d4f95e7ba --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Responses.tsx @@ -0,0 +1,31 @@ +import { Stack, Typography } from '@mui/material'; +import { useTranslations } from 'next-intl'; +import { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'; +import { Response } from './Response'; + +type ResponsesProps = { + responses: + | OpenAPIV2.ResponsesObject + | OpenAPIV3.ResponsesObject + | OpenAPIV3_1.ResponsesObject; +}; + +export const Responses = ({ responses }: ResponsesProps) => { + const t = useTranslations('swagger'); + const entries = Object.entries(responses); + return ( + + + {t('responses.header')} + +
+ {entries.map(([code, response], index) => ( + + ))} +
+
+ ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/SchemaWithExample.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/SchemaWithExample.tsx new file mode 100644 index 000000000..505580e0f --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/SchemaWithExample.tsx @@ -0,0 +1,39 @@ +import { OpenAPIV3 } from 'openapi-types'; +import { useTranslations } from 'next-intl'; + +import { system } from '@/helpers/swagger'; +import CodeBlock from '../CodeBlock'; +import Tabs from '../Tabs'; +import { Model } from './Model'; + +type SchemaWithExampleProps = OpenAPIV3.MediaTypeObject; + +export const SchemaWithExample = ({ + schema, + example, + examples, +}: SchemaWithExampleProps) => { + const t = useTranslations('swagger'); + const exampleLabel = t('example'); + const schemaLabel = t('schema'); + const titles = schema ? [exampleLabel, schemaLabel] : [exampleLabel]; + const mediaTypeExample = + (examples?.response as OpenAPIV3.ExampleObject)?.value || example?.value; + + const exampleAsJson = system.fn.jsonSchema5.getSampleSchema( + schema ?? {}, + undefined, + { includeReadOnly: true }, + mediaTypeExample + ); + + // TODO: Add support for undefined schema but with example + // For responses, the schema can be undefined but the example can be defined. + // The old code supported this, generating a schema from the example. + return ( + + {exampleAsJson} + {schema && } + + ); +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Swagger.tsx b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Swagger.tsx new file mode 100644 index 000000000..d95081e86 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/Swagger.tsx @@ -0,0 +1,39 @@ +import { Card, Typography } from '@mui/material'; +import { SwaggerProps } from 'gitbook-docs/markdoc/schema/swagger'; +import { useTranslations } from 'next-intl'; +import { OpenAPIV3 } from 'openapi-types'; + +import { Operations } from './Operations'; +import { useSpec } from './hooks/useSpec'; + +const Swagger = ({ path, method, src }: SwaggerProps) => { + const { spec, loading } = useSpec(src); + const t = useTranslations('swagger'); + + if (loading) return null; + if (!spec || !src) + return ( + + + {t('errorCard.header')} + + theme.palette.text.secondary }} + > + {t('errorCard.message')} + + + ); + + const validOperations = { [path]: [method] as OpenAPIV3.HttpMethods[] }; + + return ( + + ); +}; + +export default Swagger; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useModel.ts b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useModel.ts new file mode 100644 index 000000000..d00750d78 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useModel.ts @@ -0,0 +1,34 @@ +import { OpenAPIV3 } from 'openapi-types'; + +type ModelObjectProps = { + readonly label?: string; + readonly model: OpenAPIV3.SchemaObject; + readonly requiredAttrs?: ReadonlyArray; +}; + +// TODO: Add tests + +export const useModelProps = ({ + model = {}, + label = '', + requiredAttrs = [], +}: ModelObjectProps) => { + const title = model?.title || label; + const attrs = (model?.required ?? []) as ReadonlyArray; + const required = requiredAttrs.includes(title); + const schemaType = model?.type ?? ''; + const description = model?.description ?? ''; + const properties = (model?.properties || {}) as OpenAPIV3.SchemaObject; + const items = (model as OpenAPIV3.ArraySchemaObject) + ?.items as OpenAPIV3.SchemaObject; + + return { + title, + required, + schemaType, + description, + items, + properties, + requiredAttrs: attrs, + }; +}; diff --git a/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useSpec.ts b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useSpec.ts new file mode 100644 index 000000000..e14ba1673 --- /dev/null +++ b/apps/nextjs-website/src/components/organisms/GitBookContent/components/Swagger/hooks/useSpec.ts @@ -0,0 +1,21 @@ +import SwaggerParser from '@apidevtools/swagger-parser'; +import { OpenAPI } from 'openapi-types'; +import { useState, useEffect } from 'react'; + +export const useSpec = (src?: string) => { + const [spec, setSpec] = useState(); + const [loading, setLoading] = useState(false); + + /* eslint-disable functional/no-expression-statements */ + useEffect(() => { + if (src) { + setLoading(true); + SwaggerParser.dereference(src) + .then(setSpec) + .catch(console.error) + .finally(() => setLoading(false)); + } + }, [src]); + + return { spec, loading }; +}; diff --git a/apps/nextjs-website/src/helpers/swagger.ts b/apps/nextjs-website/src/helpers/swagger.ts new file mode 100644 index 000000000..40e0c58bf --- /dev/null +++ b/apps/nextjs-website/src/helpers/swagger.ts @@ -0,0 +1,12 @@ +import SwaggerUI from 'swagger-ui'; + +//@ts-expect-error the types are not exported as expected, the following code +//should type +//https://github.com/swagger-api/swagger-ui/wiki/JSON-Schema-samples-API +export const system = new SwaggerUI.System({ + //@ts-expect-error same as above, the types are not exported as expected, the + //following code should type + //https://github.com/swagger-api/swagger-ui/wiki/JSON-Schema-samples-API + plugins: [SwaggerUI.plugins.JSONSchema5Samples], + presets: [], +}).getSystem(); diff --git a/apps/nextjs-website/src/messages/en.json b/apps/nextjs-website/src/messages/en.json index c22440250..0613c752e 100644 --- a/apps/nextjs-website/src/messages/en.json +++ b/apps/nextjs-website/src/messages/en.json @@ -2,6 +2,28 @@ "shared": { "goToModel": "Go to model" }, + "swagger": { + "errorCard": { + "header": "Oops, manca qualcosa.", + "message": "Non siamo riusciti a trovare la fonte originale per visualizzare questo contenuto." + }, + "parameters": { + "header": "Parameters", + "empty": "No parameters" + }, + "requestBody": { + "header": "Body" + }, + "responses": { + "header": "Responses" + }, + "example": "Example", + "schema": "Schema", + "emptyOperations": { + "header": "No operations", + "message": "No operations defined in this endpoint." + } + }, "webinar": { "subscriptionError": "Registration limit reached", "genericSubscriptionError": "Something went wrong, please try again later", diff --git a/apps/nextjs-website/src/messages/it.json b/apps/nextjs-website/src/messages/it.json index f2f7e7970..29dd50961 100644 --- a/apps/nextjs-website/src/messages/it.json +++ b/apps/nextjs-website/src/messages/it.json @@ -503,5 +503,27 @@ "ExpiredCodeException": "Codice scaduto.", "TooManyFailedAttemptsException": "Troppi tentativi errati.", "LimitExceededException": "Limiti di autenticazione superati." + }, + "swagger": { + "errorCard": { + "header": "Oops, manca qualcosa.", + "message": "Non siamo riusciti a trovare la fonte originale per visualizzare questo contenuto." + }, + "parameters": { + "header": "Parametri", + "empty": "Nessun parametro" + }, + "requestBody": { + "header": "Corpo" + }, + "responses": { + "header": "Risposte" + }, + "example": "Esempio", + "schema": "Modello", + "emptyOperations": { + "header": "Nessuna operazione", + "message": "Non ci sono operazioni disponibili per questo endpoint." + } } } diff --git a/apps/nextjs-website/src/polyfill.ts b/apps/nextjs-website/src/polyfill.ts new file mode 100644 index 000000000..908a41504 --- /dev/null +++ b/apps/nextjs-website/src/polyfill.ts @@ -0,0 +1,8 @@ +// Problem: https://github.com/char0n/swagger-ui-nextjs/issues/1 +// Applied Solution: https://github.com/swagger-api/swagger-ui/issues/8245#issuecomment-1719034039 + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const Undici = require('next/dist/compiled/undici'); + +// eslint-disable-next-line functional/no-expression-statements, functional/immutable-data, no-undef +globalThis.File = globalThis.File ?? Undici.File; diff --git a/package-lock.json b/package-lock.json index e10b2978f..3df85932b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -446,6 +446,7 @@ "apps/nextjs-website": { "version": "0.7.2", "dependencies": { + "@apidevtools/swagger-parser": "^10.1.0", "@aws-amplify/auth": "^5.6.6", "@aws-amplify/ui-react": "^5.3.1", "@aws-sdk/client-dynamodb": "^3.496.0", @@ -471,6 +472,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-syntax-highlighter": "^15.5.0", + "swagger-ui": "^5.9.1", "swiper": "^10.0.3" }, "devDependencies": { @@ -479,11 +481,13 @@ "@types/react": "18.2.21", "@types/react-dom": "18.2.7", "@types/react-syntax-highlighter": "^15.5.7", + "@types/swagger-ui": "^3.52.4", "eslint": "8.47.0", "eslint-config-custom": "*", "eslint-config-next": "13.4.19", "jest": "^29.5.0", "jest-mock-extended": "^3.0.5", + "openapi-types": "^12.1.3", "ts-jest": "^29.1.1", "typescript": "5.1.6" } @@ -701,6 +705,99 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz", + "integrity": "sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.6", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "ajv": "^8.6.3", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.1" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, + "node_modules/@apidevtools/swagger-parser/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@apidevtools/swagger-parser/node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/@apidevtools/swagger-parser/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/@aws-amplify/analytics": { "version": "6.5.5", "resolved": "https://registry.npmjs.org/@aws-amplify/analytics/-/analytics-6.5.5.tgz", @@ -11297,9 +11394,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.1.tgz", - "integrity": "sha512-OKKfytwoc0tr7cDHwQm0RLVR3y+hDGFz3EPuvLNU/0fOeXJeKNIHj7ffNVFnncWt3sC58uyUCRSzf8nBQbyF6A==", + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.9.tgz", + "integrity": "sha512-oeOFTrYWdWXCvXGB5orvMTJ6gCZ9I6FBjR+M38iKNXCsPxr4xT0RTdg5uz1H7QP8pp74IzPtwritEr+JscqHXQ==", "dependencies": { "core-js-pure": "^3.30.2", "regenerator-runtime": "^0.14.0" @@ -11360,6 +11457,11 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@braintree/sanitize-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.0.0.tgz", + "integrity": "sha512-GMu2OJiTd1HSe74bbJYQnVvELANpYiGFZELyyTM1CR0sdv5ReQAcJ/c/8pIrPab3lO11+D+EpuGLUxqz+y832g==" + }, "node_modules/@casl/ability": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/@casl/ability/-/ability-5.4.4.tgz", @@ -12969,6 +13071,14 @@ "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==" }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" + } + }, "node_modules/@floating-ui/core": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", @@ -19137,6 +19247,471 @@ "npm": ">=6.0.0" } }, + "node_modules/@swagger-api/apidom-ast": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-0.93.0.tgz", + "integrity": "sha512-iGrhEXdlgFEQYX4bAootcX+FaeLXruoJnHCFTO6IQ7yKlml3QIl1G9l2KwTzHybHQ70u3nfgE3ovLGOiy8NM5g==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-error": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "unraw": "^3.0.0" + } + }, + "node_modules/@swagger-api/apidom-core": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-0.93.0.tgz", + "integrity": "sha512-OxbLBcnJQ8seFmeKqM2KDMkLJox0YTEhnLq3DnCyvOXnzVHdau+wNIhYSUc1+ZzrjsWqJLU0ntS3LEPb7ttnGw==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@types/ramda": "~0.29.6", + "minim": "~0.23.8", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "short-unique-id": "^5.0.2", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-error": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-0.93.0.tgz", + "integrity": "sha512-vJiG0IZS8lOhXn8ZPSsKMh0mun6lOB7m4I8Ju6XeWR0khB7dbp15PAtk6xiFjekbWDa7hPn9584hp0YqXb6p5Q==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7" + } + }, + "node_modules/@swagger-api/apidom-json-pointer": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-0.93.0.tgz", + "integrity": "sha512-DnZb/xNKzgBtjKk+5KFMEp5olCeH1wEHbx1YaNY4DDRRtnafphtMxd5/xmapWKj7Glfjfswxi3Uo4m/FAasKPA==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-ns-api-design-systems": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-0.93.0.tgz", + "integrity": "sha512-f3RcUBmZjqmADubnV+yslvtbOJGV3jeMpQuzM9ByS3ASVg+XU1YxKkH5em8BcW3SDj0lqDiQ2ggA9kfPLSuV8A==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-asyncapi-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-0.93.0.tgz", + "integrity": "sha512-cEAFsVo/CiPFlw9FAeu/9WR6WixQKxH50SHNvmy8OsCOgYcl5VHF06majZTFCrgZlpCNXPJh9m5A2pUoHtxxUw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-json-schema-draft-7": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-0.93.0.tgz", + "integrity": "sha512-dBY7LHrWZ+ydsgD00fQtRq/wOAZjdUh2+PE7/Xe3tYPeD1tv3DZ4F1tcVQeiyGBskF7vReUxUwnQo4uPJipPzA==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.93.0", + "@swagger-api/apidom-core": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-6": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-0.93.0.tgz", + "integrity": "sha512-u0e0Nq9nuuZyGoOCEjVQJKe5NdsIWezH+q8ev3dABlUNEiWMbtFLS9TvHFBeU11plCsyxjJyYRg8TjnI2Q8xzQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-7": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-0.93.0.tgz", + "integrity": "sha512-NkHhyezG5ghx5FhclbIzCwo1wH4gmI8KwMnEuorsXJhanmnkl+JXzDSrpCM3Orvezl+4DEnBeMLyLfbnQMMknw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-ns-json-schema-draft-6": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-2/-/apidom-ns-openapi-2-0.93.0.tgz", + "integrity": "sha512-sUZgGyuraLP7rarBp8CISdDLuO8n8L9Q+G8XMiYgl53HGRUY5a7HSGnybcQPpyNPQSNTFKigytSjvsSu8h33ZQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-0": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-0.93.0.tgz", + "integrity": "sha512-zmyMUg9+BocHxJuNbUmJCYi/ArOv38Am3/oSkh/5+ANAYOzB1O+ukVvdy7pHDxfZId6KRiP9ZWW6M7VBxz/t/g==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-ns-json-schema-draft-4": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-0.93.0.tgz", + "integrity": "sha512-kUkdcNmJloqqhvEDIAGvamyh1fQrITKGFUqRj5v0YWch/hKrfYk61eHG7igWxnVv3r/wDdM9T3uDWlBefMsj1g==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.93.0", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-ns-workflows-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-workflows-1/-/apidom-ns-workflows-1-0.93.0.tgz", + "integrity": "sha512-dL92YBMULuI6HiuOVnB24ozOp4P02xN6Zw8tWzTm/H/W5EWVdso8krq5utjuSTFcurj4rODkPQxY8WRKuIuMDw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-0.93.0.tgz", + "integrity": "sha512-lKaSt9YOXbhiBMTJcSCIF0C1fjyWLxKrTWkvbFwwqCcjeMt5vg8N/0nKqQeQm4mcZ946mqnssRVpPbJfWEoIWA==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-0.93.0.tgz", + "integrity": "sha512-fjIQs0vRP/46M8kwQ3UGpq8piMboIXvrJqu1lDTylS5PYzE9qXpx1BhESZPtBwuoR9kvVYbumlD+BgjCuyzc8g==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-api-design-systems": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-0.93.0.tgz", + "integrity": "sha512-65Io5+Zy5LBJTvRt3yKBXXfk5M/DCq3mDUSiVcZuyRPHGNi9ViMTdEFCH3rzF0x2v0omG+6OqryndIBVAXEo/g==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-0.93.0.tgz", + "integrity": "sha512-WwGH6StA7kplkTAaV43MziJeJonnJCW6pBOp1bwoEhGaeYO/Yd/dpoFZVDfxAnXJYmDnzk7pqjJm3U6A9BCPcw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-json": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-0.93.0.tgz", + "integrity": "sha512-FNA36GAqG1EMErkRhMFb4GeW8fuYdzRkOwQmTLWZfKIUzLYOvVMbki8R2dE8ruNs/Gf5VhiQH85mLaCyLwp3xw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.93.0", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "tree-sitter": "=0.20.4", + "tree-sitter-json": "=0.20.1", + "web-tree-sitter": "=0.20.3" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-2/-/apidom-parser-adapter-openapi-json-2-0.93.0.tgz", + "integrity": "sha512-bBEYiZdiYQQoubZVdkHw3I/qwgI3nvCcrbFAlqELvpFgRZywJzXssxqHqFOR8clvoX8+JVYx5E/MgSC6Rn77uQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-0.93.0.tgz", + "integrity": "sha512-UlM924syGaSa5c35OuDC614xBsjIm5DaWUqshFf6DmmP5iDZFQUh0cyIfLDD5/n1wZvAtiIL040zwfTBrK0Udw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-0.93.0.tgz", + "integrity": "sha512-9rqOLv0ip7knvbdmk8hNa1aN/kaeIIoUKdwO6GaMW9eFh2cvIDyriLxp+FwTatnwhlJjWMwp7Mfyv62WT0cfKQ==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-2/-/apidom-parser-adapter-openapi-yaml-2-0.93.0.tgz", + "integrity": "sha512-8laGpR9MrFBsBDmGNSexKdvLvGnr5QnjhqOSqFIViK/WFG+zEpE5SsWyJkCQJE4EJ5IvxVA8BfBrjjUqe0Z5uA==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-0.93.0.tgz", + "integrity": "sha512-Tf8eX+MzTsCijXbE5lkfF0/wG5VkvCPGg7hZV7ZGYrzQ584R/Z0xkgHEu3Atqu3Ji9XPGP0u6LqWM/wATuWK0A==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-0.93.0.tgz", + "integrity": "sha512-1Yt3SmgV2x5PAV8NeXIztuRWbIMhAU3cs3SIDJlObzFxXitnsf3cVIRrFTNrK28mqhHU3XNVTat5GrGtlJeD8Q==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-workflows-json-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-json-1/-/apidom-parser-adapter-workflows-json-1-0.93.0.tgz", + "integrity": "sha512-tUm049GrXtBHoP8rcLTp+yz5EbJkq/stSgHb4nUNyFH00MKtMkP3j3KnXSCQz2w6br5gzv54DDCKwqPAh7IjuA==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-workflows-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-workflows-yaml-1": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-workflows-yaml-1/-/apidom-parser-adapter-workflows-yaml-1-0.93.0.tgz", + "integrity": "sha512-8knwzutGHH+69061yHY0xUwmMW/wWUP5jjn4CVDctxYS7BYXb9iaH84VuKJRuDm5M5L/C6yJHgdoWo4IHnpVBw==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-ns-workflows-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-0.93.0.tgz", + "integrity": "sha512-0z/d/t19f78o4CTxtpMMLdi+7js+JNz7s4/WSJXZ0Q0k5O4pEhlARMMEqJXE4qUXxTGnoXbi4sQY9FV/yA5V0Q==", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-ast": "^0.93.0", + "@swagger-api/apidom-core": "^0.93.0", + "@swagger-api/apidom-error": "^0.93.0", + "@types/ramda": "~0.29.6", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "tree-sitter": "=0.20.4", + "tree-sitter-yaml": "=0.5.0", + "web-tree-sitter": "=0.20.3" + } + }, + "node_modules/@swagger-api/apidom-reference": { + "version": "0.93.0", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-0.93.0.tgz", + "integrity": "sha512-kii8DqU3v+Fqv4gLi/3pTEYqR0AhjogcJnJUuKZqs1G/UiGk2RiEN4i/VyJQn0iwL4w4UyFcLOG4kyYxNgDAJw==", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7", + "@swagger-api/apidom-core": "^0.93.0", + "@types/ramda": "~0.29.6", + "axios": "^1.4.0", + "minimatch": "^7.4.3", + "process": "^0.11.10", + "ramda": "~0.29.1", + "ramda-adjunct": "^4.1.1", + "stampit": "^4.3.2" + }, + "optionalDependencies": { + "@swagger-api/apidom-error": "^0.93.0", + "@swagger-api/apidom-json-pointer": "^0.93.0", + "@swagger-api/apidom-ns-asyncapi-2": "^0.93.0", + "@swagger-api/apidom-ns-openapi-2": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-0": "^0.93.0", + "@swagger-api/apidom-ns-openapi-3-1": "^0.93.0", + "@swagger-api/apidom-ns-workflows-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^0.93.0", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^0.93.0", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-json": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-json-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^0.93.0", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-workflows-json-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-workflows-yaml-1": "^0.93.0", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^0.93.0" + } + }, + "node_modules/@swagger-api/apidom-reference/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@swagger-api/apidom-reference/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@swc/helpers": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", @@ -19717,6 +20292,14 @@ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==" }, + "node_modules/@types/ramda": { + "version": "0.29.10", + "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.29.10.tgz", + "integrity": "sha512-0BzWVKtSEtignlk+XBuK88Il5wzQwbRVfEkzE8iKm02NYHMGQ/9ffB05M+zXhTCqo50DOIAT9pNSJsjFMMG4rQ==", + "dependencies": { + "types-ramda": "^0.29.7" + } + }, "node_modules/@types/range-parser": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.5.tgz", @@ -19843,6 +20426,12 @@ "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.22.tgz", "integrity": "sha512-7yQiX6MWSFSvc/1wW5smJMZTZ4fHOd+hqLr3qr/HONDxHEa2bnYAsOcGBOEqFIjd4yetwMOdEDdeW+udRAQnHA==" }, + "node_modules/@types/swagger-ui": { + "version": "3.52.4", + "resolved": "https://registry.npmjs.org/@types/swagger-ui/-/swagger-ui-3.52.4.tgz", + "integrity": "sha512-7NV7q8BfupqdQxr26OkM0g0YEPB9uXnKGzXadgcearvI9MoCHt3F72lPTX3fZZIlrr21DC0IK26wcDMZ37oFDA==", + "dev": true + }, "node_modules/@types/through": { "version": "0.0.31", "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.31.tgz", @@ -20459,6 +21048,11 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" + }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -21064,6 +21658,14 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -21075,6 +21677,14 @@ "node": ">= 4.5.0" } }, + "node_modules/autolinker": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz", + "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==", + "dependencies": { + "tslib": "^2.3.0" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.5", "license": "MIT", @@ -22009,11 +22619,13 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -22534,9 +23146,9 @@ } }, "node_modules/classnames": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", - "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "node_modules/clean-css": { "version": "5.3.2", @@ -23623,6 +24235,11 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==" + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -23878,6 +24495,19 @@ "node": ">=10" } }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "license": "MIT", @@ -24179,6 +24809,11 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, + "node_modules/dompurify": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.8.tgz", + "integrity": "sha512-b7uwreMYL2eZhrSCRC4ahLTeZcPZxSmYfmcQGXGkXiZSNW1X85v+SDM5KsWcpivIiUBH47Ji7NtyUdpLeF5JZQ==" + }, "node_modules/domutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", @@ -24227,6 +24862,14 @@ "node": ">=12" } }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "engines": { + "node": ">=4" + } + }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -25863,6 +26506,11 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "license": "MIT" @@ -26182,6 +26830,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/find-yarn-workspace-root2": { "version": "1.2.16", "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", @@ -26742,8 +27398,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -26788,12 +27448,14 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "license": "MIT", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -27160,10 +27822,11 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "license": "MIT", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -27274,6 +27937,17 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-to-hyperscript": { "version": "10.0.3", "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-10.0.3.tgz", @@ -28091,6 +28765,14 @@ "url": "https://opencollective.com/immer" } }, + "node_modules/immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "license": "MIT", @@ -29847,6 +30529,11 @@ "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" }, + "node_modules/js-file-download": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", + "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==" + }, "node_modules/js-sdsl": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", @@ -30000,6 +30687,23 @@ "version": "0.4.1", "license": "MIT" }, + "node_modules/json-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", + "dependencies": { + "call-bind": "^1.0.5", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "license": "MIT" @@ -30030,6 +30734,14 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", @@ -30184,6 +30896,14 @@ "node": ">=0.10.0" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/kleur": { "version": "3.0.3", "license": "MIT", @@ -30696,8 +31416,7 @@ "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "peer": true + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, "node_modules/lodash.deburr": { "version": "4.1.0", @@ -32552,6 +33271,17 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/minim": { + "version": "0.23.8", + "resolved": "https://registry.npmjs.org/minim/-/minim-0.23.8.tgz", + "integrity": "sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==", + "dependencies": { + "lodash": "^4.15.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -33330,6 +34060,12 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, "node_modules/nano-css": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.3.5.tgz", @@ -33619,6 +34355,30 @@ } } }, + "node_modules/node-fetch-commonjs": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch-commonjs/-/node-fetch-commonjs-3.3.2.tgz", + "integrity": "sha512-VBlAiynj3VMLrotgwOS3OyECFxas5y7ltLcK4t41lMUZeaK15Ym4QRkqN0EQKAFL42q9i21EPKjzLUPfltR72A==", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-fetch-commonjs/node_modules/web-streams-polyfill": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", + "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "engines": { + "node": ">= 8" + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -34192,6 +34952,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==" + }, "node_modules/openapi3-ts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-2.0.2.tgz", @@ -34613,6 +35378,116 @@ "node": ">= 0.4.0" } }, + "node_modules/patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/patch-package/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/patch-package/node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "engines": { + "node": ">= 14" + } + }, "node_modules/path-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", @@ -35392,8 +36267,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "optional": true, - "peer": true, "engines": { "node": ">= 0.6.0" } @@ -35698,6 +36571,11 @@ "node": ">=0.4.x" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, "node_modules/queue": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", @@ -35741,6 +36619,50 @@ "resolved": "https://registry.npmjs.org/quote/-/quote-0.4.0.tgz", "integrity": "sha512-KHp3y3xDjuBhRx+tYKOgzPnVHMRlgpn2rU450GcU4PL24r1H6ls/hfPrxDwX2pvYMlwODHI2l8WwgoV69x5rUQ==" }, + "node_modules/ramda": { + "version": "0.29.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.29.1.tgz", + "integrity": "sha512-OfxIeWzd4xdUNxlWhgFazxsA/nl3mS4/jGZI5n00uWOoSSFRhC1b6gl6xvmzUamgmqELraWp0J/qqVlXYPDPyA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, + "node_modules/ramda-adjunct": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-4.1.1.tgz", + "integrity": "sha512-BnCGsZybQZMDGram9y7RiryoRHS5uwx8YeGuUeDKuZuvK38XO6JJfmK85BwRWAKFA6pZ5nZBO/HBFtExVaf31w==", + "engines": { + "node": ">=0.10.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda-adjunct" + }, + "peerDependencies": { + "ramda": ">= 0.29.0" + } + }, + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "dependencies": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/randexp/node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -35837,6 +36759,30 @@ "node": ">=0.10.0" } }, + "node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "dependencies": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, "node_modules/react-devtools-core": { "version": "4.28.0", "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.28.0.tgz", @@ -35961,6 +36907,35 @@ "react": ">=16.3.0" } }, + "node_modules/react-immutable-proptypes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz", + "integrity": "sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ==", + "dependencies": { + "invariant": "^2.2.2" + }, + "peerDependencies": { + "immutable": ">=3.6.2" + } + }, + "node_modules/react-immutable-pure-component": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", + "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", + "peerDependencies": { + "immutable": ">= 2 || >= 4.0.0-rc", + "react": ">= 16.6", + "react-dom": ">= 16.6" + } + }, + "node_modules/react-inspector": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", + "integrity": "sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==", + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-intl": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-6.4.1.tgz", @@ -36698,6 +37673,14 @@ "@babel/runtime": "^7.9.2" } }, + "node_modules/redux-immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", + "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", + "peerDependencies": { + "immutable": "^3.8.1 || ^4.0.0-rc.1" + } + }, "node_modules/refractor": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", @@ -36970,6 +37953,29 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "dependencies": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/remarkable/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/remove-accents": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/remove-accents/-/remove-accents-0.4.2.tgz", @@ -37928,6 +38934,21 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/set-function-length": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", + "dependencies": { + "define-data-property": "^1.1.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-harmonic-interval": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz", @@ -37974,6 +38995,18 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -38078,6 +39111,15 @@ "node": ">=4" } }, + "node_modules/short-unique-id": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/short-unique-id/-/short-unique-id-5.0.3.tgz", + "integrity": "sha512-yhniEILouC0s4lpH0h7rJsfylZdca10W9mDJRAFh3EpcSUanCHGb0R7kcFOIUCZYSAPo0PUD5ZxWQdW0T4xaug==", + "bin": { + "short-unique-id": "bin/short-unique-id", + "suid": "bin/short-unique-id" + } + }, "node_modules/shx": { "version": "0.3.4", "dev": true, @@ -38912,6 +39954,11 @@ "node": ">=8" } }, + "node_modules/stampit": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stampit/-/stampit-4.3.2.tgz", + "integrity": "sha512-pE2org1+ZWQBnIxRPrBM2gVupkuDD0TTNIo1H6GdT/vO82NXli2z8lRE8cu/nBIHrcOCXFBAHpb9ZldrB2/qOA==" + }, "node_modules/static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -39536,6 +40583,151 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swagger-client": { + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.25.0.tgz", + "integrity": "sha512-p143zWkIhgyh2E5+3HPFMlCw3WkV9RbX9HyftfBdiccCbOlmHdcJC0XEJZxcm+ZA+80DORs0F30/mzk7sx4iwA==", + "dependencies": { + "@babel/runtime-corejs3": "^7.22.15", + "@swagger-api/apidom-core": ">=0.90.0 <1.0.0", + "@swagger-api/apidom-error": ">=0.90.0 <1.0.0", + "@swagger-api/apidom-json-pointer": ">=0.90.0 <1.0.0", + "@swagger-api/apidom-ns-openapi-3-1": ">=0.90.0 <1.0.0", + "@swagger-api/apidom-reference": ">=0.90.0 <1.0.0", + "cookie": "~0.6.0", + "deepmerge": "~4.3.0", + "fast-json-patch": "^3.0.0-1", + "is-plain-object": "^5.0.0", + "js-yaml": "^4.1.0", + "node-abort-controller": "^3.1.1", + "node-fetch-commonjs": "^3.3.1", + "qs": "^6.10.2", + "traverse": "~0.6.6", + "undici": "^5.24.0" + } + }, + "node_modules/swagger-client/node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/swagger-client/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/swagger-ui": { + "version": "5.11.2", + "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-5.11.2.tgz", + "integrity": "sha512-EjaON++6ACRohBc+fla4xDytxV+df+1Y7OatFaDoMfEb66rVdLlfNnbdx6Ld1FxWIc4kw/9dRltvR1hdIoGRZg==", + "hasInstallScript": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.23.8", + "@braintree/sanitize-url": "=7.0.0", + "base64-js": "^1.5.1", + "classnames": "^2.5.1", + "css.escape": "1.5.1", + "deep-extend": "0.6.0", + "dompurify": "=3.0.8", + "ieee754": "^1.2.1", + "immutable": "^3.x.x", + "js-file-download": "^0.4.12", + "js-yaml": "=4.1.0", + "lodash": "^4.17.21", + "patch-package": "^8.0.0", + "prop-types": "^15.8.1", + "randexp": "^0.5.3", + "randombytes": "^2.1.0", + "react": ">=16.8.0 <19", + "react-copy-to-clipboard": "5.1.0", + "react-debounce-input": "=3.3.0", + "react-dom": ">=16.8.0 <19", + "react-immutable-proptypes": "2.2.0", + "react-immutable-pure-component": "^2.2.0", + "react-inspector": "^6.0.1", + "react-redux": "^9.1.0", + "react-syntax-highlighter": "^15.5.0", + "redux": "^5.0.1", + "redux-immutable": "^4.0.0", + "remarkable": "^2.0.1", + "reselect": "^5.1.0", + "serialize-error": "^8.1.0", + "sha.js": "^2.4.11", + "swagger-client": "^3.25.0", + "url-parse": "^1.5.10", + "xml": "=1.0.1", + "xml-but-prettier": "^1.0.1", + "zenscroll": "^4.0.2" + } + }, + "node_modules/swagger-ui/node_modules/@types/react": { + "version": "18.2.48", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", + "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "optional": true, + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/swagger-ui/node_modules/react-redux": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.0.tgz", + "integrity": "sha512-6qoDzIO+gbrza8h3hjMA9aq4nwVFCKFtY2iLxCtVT38Swyy2C/dJCGBXHeHLtx6qlg/8qzc2MrhOeduf5K32wQ==", + "dependencies": { + "@types/use-sync-external-store": "^0.0.3", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25", + "react": "^18.0", + "react-native": ">=0.69", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/swagger-ui/node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" + }, + "node_modules/swagger-ui/node_modules/reselect": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.0.tgz", + "integrity": "sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg==" + }, + "node_modules/swagger-ui/node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/swap-case": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", @@ -40067,6 +41259,48 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/traverse": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz", + "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tree-sitter": { + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.20.4.tgz", + "integrity": "sha512-rjfR5dc4knG3jnJNN/giJ9WOoN1zL/kZyrS0ILh+eqq8RNcIbiXA63JsMEgluug0aNvfQvK4BfCErN1vIzvKog==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.17.0", + "prebuild-install": "^7.1.1" + } + }, + "node_modules/tree-sitter-json": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.20.1.tgz", + "integrity": "sha512-482hf7J+aBwhksSw8yWaqI8nyP1DrSwnS4IMBShsnkFWD3SE8oalHnsEik59fEVi3orcTCUtMzSjZx+0Tpa6Vw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.18.0" + } + }, + "node_modules/tree-sitter-yaml": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tree-sitter-yaml/-/tree-sitter-yaml-0.5.0.tgz", + "integrity": "sha512-POJ4ZNXXSWIG/W4Rjuyg36MkUD4d769YRUGKRqN+sVaj/VCo6Dh6Pkssn1Rtewd5kybx+jT1BWMyWN0CijXnMA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.14.0" + } + }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -40190,6 +41424,12 @@ "resolved": "https://registry.npmjs.org/ts-keycode-enum/-/ts-keycode-enum-1.0.6.tgz", "integrity": "sha512-DF8+Cf/FJJnPRxwz8agCoDelQXKZWQOS/gnnwx01nZ106tPJdB3BgJ9QTtLwXgR82D8O+nTjuZzWgf0Rg4vuRA==" }, + "node_modules/ts-mixer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", + "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==", + "optional": true + }, "node_modules/ts-node": { "version": "10.9.1", "dev": true, @@ -40232,6 +41472,11 @@ } } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==" + }, "node_modules/tsconfig-paths": { "version": "3.14.2", "license": "MIT", @@ -40475,6 +41720,14 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/types-ramda": { + "version": "0.29.7", + "resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.29.7.tgz", + "integrity": "sha512-8KBxZGJwUF3MpRkkJauSpvfHXk8Ssq15QXGuCBTDGeKd9PfheokkC3wAKRV3djej9O31Qa5M7Owsg8hF0GjtAw==", + "dependencies": { + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/typescript": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", @@ -40630,6 +41883,17 @@ "node": ">=0.10.0" } }, + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/unfetch": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", @@ -40880,6 +42144,11 @@ "node": ">= 0.8" } }, + "node_modules/unraw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unraw/-/unraw-3.0.0.tgz", + "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==" + }, "node_modules/unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -41011,6 +42280,15 @@ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", @@ -42036,6 +43314,12 @@ "node": ">= 14" } }, + "node_modules/web-tree-sitter": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.3.tgz", + "integrity": "sha512-zKGJW9r23y3BcJusbgvnOH2OYAW40MXAOi9bi3Gcc7T4Gms9WWgXF8m6adsJWpGJEhgOzCrfiz1IzKowJWrtYw==", + "optional": true + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -42699,6 +43983,19 @@ "node": ">=8" } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==" + }, + "node_modules/xml-but-prettier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-but-prettier/-/xml-but-prettier-1.0.1.tgz", + "integrity": "sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==", + "dependencies": { + "repeat-string": "^1.5.2" + } + }, "node_modules/xml-formatter": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-2.6.1.tgz", @@ -42859,6 +44156,11 @@ "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.7.1.tgz", "integrity": "sha512-OI6VMSe0yeqaouIXtedC+F55Sr6r9ppS7+wTbSexkYdHbdt4ctTuPNXP/rwm7GTVI63YBc+EBT0b0tl7YnJLRg==" }, + "node_modules/zenscroll": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", + "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==" + }, "node_modules/zod": { "version": "3.21.4", "license": "MIT", diff --git a/packages/gitbook-docs/src/__tests__/parseContent.test.ts b/packages/gitbook-docs/src/__tests__/parseContent.test.ts index e9b2ccfd7..42bfa22f3 100644 --- a/packages/gitbook-docs/src/__tests__/parseContent.test.ts +++ b/packages/gitbook-docs/src/__tests__/parseContent.test.ts @@ -361,22 +361,23 @@ describe('parseContent', () => { }); it('should parse swagger', () => { - expect( - parseContent( - '{% swagger src="index.yaml" path="/p" method="post" %}\n[index.yaml](index.yaml)\n{% endswagger %}', - config - ) - ).toStrictEqual([ + const result = [ new Markdoc.Tag( 'Swagger', { - src: 'index.yaml', + src: '/assets/prefix/index.yaml', path: '/p', method: 'post', }, [] ), - ]); + ]; + + const parsed = parseContent( + '{% swagger src="index.yaml" path="/p" method="post" %}\n[index.yaml](index.yaml)\n{% endswagger %}', + config + ); + expect(parsed).toStrictEqual(result); }); it('should parse code block', () => { diff --git a/packages/gitbook-docs/src/markdoc/schema/swagger.ts b/packages/gitbook-docs/src/markdoc/schema/swagger.ts index e624ddcab..4e90f0612 100644 --- a/packages/gitbook-docs/src/markdoc/schema/swagger.ts +++ b/packages/gitbook-docs/src/markdoc/schema/swagger.ts @@ -1,16 +1,21 @@ import Markdoc, { Schema } from '@markdoc/markdoc'; +import { SrcAttr } from '../attributes'; export type SwaggerProps = { - readonly src: string; - readonly path: string; + readonly baseUrl?: string; readonly method: string; + readonly path: string; + readonly src?: string; + readonly summary?: string; }; export const swagger: Schema = { attributes: { - src: { type: String, required: true }, + src: { type: SrcAttr }, path: { type: String, required: true }, method: { type: String, required: true }, + summary: { type: String }, + baseUrl: { type: String }, }, transform: (node, config) => { const attrs = node.transformAttributes(config);