From 63e9c89c28253e7ee5fc0bad59d0b7685c09768d Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 27 Oct 2024 03:44:47 +0900 Subject: [PATCH 1/5] Preparing `@nestia/editor` module. --- package.json | 4 + packages/editor/package.json | 30 +++++++ packages/editor/src/NestiaEditor.tsx | 86 ++++++++++++++++++++ packages/editor/tsconfig.json | 113 +++++++++++++++++++++++++++ 4 files changed, 233 insertions(+) create mode 100644 packages/editor/package.json create mode 100644 packages/editor/src/NestiaEditor.tsx create mode 100644 packages/editor/tsconfig.json diff --git a/package.json b/package.json index 3bb6338ea..cfad611da 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,9 @@ "prettier": "^3.2.4", "rimraf": "^5.0.1", "sloc": "^0.3.0" + }, + "dependencies": { + "@nestia/migrate": "^0.18.2", + "@stackblitz/sdk": "^1.11.0" } } diff --git a/packages/editor/package.json b/packages/editor/package.json new file mode 100644 index 000000000..d5eb84b69 --- /dev/null +++ b/packages/editor/package.json @@ -0,0 +1,30 @@ +{ + "name": "@nestia/editor", + "version": "0.1.0", + "description": "Swagger UI with TypeScript Editor and SDK library in the online browser", + "main": "lib/index.jsx", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/samchon/nestia.git" + }, + "author": "Jeongho Nam", + "license": "MIT", + "bugs": { + "url": "https://github.com/samchon/nestia/issues" + }, + "homepage": "https://github.com/samchon/nestia#readme", + "dependencies": { + "@nestia/migrate": "^0.18.2", + "@samchon/openapi": "^1.1.2", + "@stackblitz/sdk": "^1.11.0", + "typia": "^6.11.3" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "react": "^18.3.1", + "typescript": "^5.6.3" + } +} diff --git a/packages/editor/src/NestiaEditor.tsx b/packages/editor/src/NestiaEditor.tsx new file mode 100644 index 000000000..e1a2788f7 --- /dev/null +++ b/packages/editor/src/NestiaEditor.tsx @@ -0,0 +1,86 @@ +import { MigrateApplication } from "@nestia/migrate"; +import { OpenApi, OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import { embedProject } from "@stackblitz/sdk/types/lib"; +import React from "react"; +import { IValidation } from "typia"; + +export const ReactEditor = (props: ReactEditor.IProps) => { + const [id] = React.useState( + `reactia-editor-div-${Math.random().toString().substring(2)}`, + ); + React.useEffect(() => { + (async () => { + const document: + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | OpenApi.IDocument = + typeof props.swagger === "string" + ? await getDocument(props.swagger) + : props.swagger; + const result: IValidation = + await MigrateApplication.create(document); + if (result.success === false) { + // @todo + return; + } + + const app: MigrateApplication = result.data; + const { files } = app.sdk({ + simulate: !!props.simulate, + e2e: !!props.e2e, + }); + embedProject(id, { + title: document.info?.title ?? "Reactia Editor", + template: "node", + files: Object.fromEntries( + files.map( + (f) => + [ + [f.location, f.location.length ? "/" : "", f.file].join(""), + f.content, + ] as const, + ), + ), + }); + })().catch(() => {}); + }, []); + return ( +
+ ); +}; +export namespace ReactEditor { + export interface IProps { + swagger: + | string + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | OpenApi.IDocument; + simulate?: boolean; + e2e?: boolean; + + /** + * @internal + */ + files?: Record; + } +} + +const getDocument = async ( + url: string, +): Promise< + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | OpenApi.IDocument +> => { + const response: Response = await fetch(url); + return response.json(); +}; diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.json new file mode 100644 index 000000000..19b27c0a8 --- /dev/null +++ b/packages/editor/tsconfig.json @@ -0,0 +1,113 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": [ + "DOM", + "ES2020", + ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "jsx": "react", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} From 3361d29b7defd2788e0d725e239aafa908b8db72 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 28 Oct 2024 06:05:39 +0900 Subject: [PATCH 2/5] Development of `@nestia/editor` completed --- packages/editor.temp/package.json | 30 +++ .../src/NestiaEditor.tsx | 0 packages/editor.temp/tsconfig.json | 113 +++++++++ packages/editor/.gitignore | 24 ++ packages/editor/README.md | 50 ++++ packages/editor/eslint.config.js | 28 +++ packages/editor/index.html | 16 ++ packages/editor/package.json | 40 ++-- .../editor/src/NestiaEditorApplication.tsx | 75 ++++++ packages/editor/src/NestiaEditorIframe.tsx | 222 ++++++++++++++++++ packages/editor/src/NestiaEditorUploader.tsx | 136 +++++++++++ packages/editor/src/assets/react.svg | 1 + packages/editor/src/index.ts | 2 + .../src/internal/NestiaEditorComposer.ts | 85 +++++++ .../src/internal/NestiaEditorFileUploader.tsx | 66 ++++++ packages/editor/src/main.tsx | 10 + packages/editor/src/vite-env.d.ts | 1 + packages/editor/tsconfig.app.json | 25 ++ packages/editor/tsconfig.json | 116 +-------- packages/editor/tsconfig.node.json | 23 ++ packages/editor/vite.config.ts | 7 + 21 files changed, 943 insertions(+), 127 deletions(-) create mode 100644 packages/editor.temp/package.json rename packages/{editor => editor.temp}/src/NestiaEditor.tsx (100%) create mode 100644 packages/editor.temp/tsconfig.json create mode 100644 packages/editor/.gitignore create mode 100644 packages/editor/README.md create mode 100644 packages/editor/eslint.config.js create mode 100644 packages/editor/index.html create mode 100644 packages/editor/src/NestiaEditorApplication.tsx create mode 100644 packages/editor/src/NestiaEditorIframe.tsx create mode 100644 packages/editor/src/NestiaEditorUploader.tsx create mode 100644 packages/editor/src/assets/react.svg create mode 100644 packages/editor/src/index.ts create mode 100644 packages/editor/src/internal/NestiaEditorComposer.ts create mode 100644 packages/editor/src/internal/NestiaEditorFileUploader.tsx create mode 100644 packages/editor/src/main.tsx create mode 100644 packages/editor/src/vite-env.d.ts create mode 100644 packages/editor/tsconfig.app.json create mode 100644 packages/editor/tsconfig.node.json create mode 100644 packages/editor/vite.config.ts diff --git a/packages/editor.temp/package.json b/packages/editor.temp/package.json new file mode 100644 index 000000000..d5eb84b69 --- /dev/null +++ b/packages/editor.temp/package.json @@ -0,0 +1,30 @@ +{ + "name": "@nestia/editor", + "version": "0.1.0", + "description": "Swagger UI with TypeScript Editor and SDK library in the online browser", + "main": "lib/index.jsx", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/samchon/nestia.git" + }, + "author": "Jeongho Nam", + "license": "MIT", + "bugs": { + "url": "https://github.com/samchon/nestia/issues" + }, + "homepage": "https://github.com/samchon/nestia#readme", + "dependencies": { + "@nestia/migrate": "^0.18.2", + "@samchon/openapi": "^1.1.2", + "@stackblitz/sdk": "^1.11.0", + "typia": "^6.11.3" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "react": "^18.3.1", + "typescript": "^5.6.3" + } +} diff --git a/packages/editor/src/NestiaEditor.tsx b/packages/editor.temp/src/NestiaEditor.tsx similarity index 100% rename from packages/editor/src/NestiaEditor.tsx rename to packages/editor.temp/src/NestiaEditor.tsx diff --git a/packages/editor.temp/tsconfig.json b/packages/editor.temp/tsconfig.json new file mode 100644 index 000000000..19b27c0a8 --- /dev/null +++ b/packages/editor.temp/tsconfig.json @@ -0,0 +1,113 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": [ + "DOM", + "ES2020", + ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "jsx": "react", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/packages/editor/.gitignore b/packages/editor/.gitignore new file mode 100644 index 000000000..a547bf36d --- /dev/null +++ b/packages/editor/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/packages/editor/README.md b/packages/editor/README.md new file mode 100644 index 000000000..74872fd4a --- /dev/null +++ b/packages/editor/README.md @@ -0,0 +1,50 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default tseslint.config({ + languageOptions: { + // other options... + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + }, +}) +``` + +- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` +- Optionally add `...tseslint.configs.stylisticTypeChecked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: + +```js +// eslint.config.js +import react from 'eslint-plugin-react' + +export default tseslint.config({ + // Set the react version + settings: { react: { version: '18.3' } }, + plugins: { + // Add the react plugin + react, + }, + rules: { + // other rules... + // Enable its recommended rules + ...react.configs.recommended.rules, + ...react.configs['jsx-runtime'].rules, + }, +}) +``` diff --git a/packages/editor/eslint.config.js b/packages/editor/eslint.config.js new file mode 100644 index 000000000..092408a9f --- /dev/null +++ b/packages/editor/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +) diff --git a/packages/editor/index.html b/packages/editor/index.html new file mode 100644 index 000000000..bef4d75f7 --- /dev/null +++ b/packages/editor/index.html @@ -0,0 +1,16 @@ + + + + + + + Vite + React + TS + + +
+ + + diff --git a/packages/editor/package.json b/packages/editor/package.json index d5eb84b69..d10cb8f39 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,30 +1,38 @@ { "name": "@nestia/editor", + "private": true, "version": "0.1.0", - "description": "Swagger UI with TypeScript Editor and SDK library in the online browser", - "main": "lib/index.jsx", + "type": "module", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" }, - "repository": { - "type": "git", - "url": "git+https://github.com/samchon/nestia.git" - }, - "author": "Jeongho Nam", - "license": "MIT", - "bugs": { - "url": "https://github.com/samchon/nestia/issues" - }, - "homepage": "https://github.com/samchon/nestia#readme", "dependencies": { + "@mui/material": "^5.15.6", "@nestia/migrate": "^0.18.2", - "@samchon/openapi": "^1.1.2", "@stackblitz/sdk": "^1.11.0", + "js-yaml": "^4.1.0", + "prettier": "^3.3.3", + "react-json-tree": "^0.19.0", + "react-mui-fileuploader": "^0.5.2", "typia": "^6.11.3" }, "devDependencies": { - "@types/react": "^18.3.12", + "@eslint/js": "^9.13.0", + "@types/js-yaml": "^4.0.9", + "@types/react": "^18.3.11", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "eslint": "^9.13.0", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-refresh": "^0.4.13", + "globals": "^15.11.0", "react": "^18.3.1", - "typescript": "^5.6.3" + "react-dom": "^18.3.1", + "typescript": "^5.6.2", + "typescript-eslint": "^8.10.0", + "vite": "^5.4.9" } } diff --git a/packages/editor/src/NestiaEditorApplication.tsx b/packages/editor/src/NestiaEditorApplication.tsx new file mode 100644 index 000000000..309c9a854 --- /dev/null +++ b/packages/editor/src/NestiaEditorApplication.tsx @@ -0,0 +1,75 @@ +import { Typography } from "@mui/material"; +import { useEffect, useState } from "react"; + +import { NestiaEditorIframe } from "./NestiaEditorIframe"; +import { NestiaEditorUploader } from "./NestiaEditorUploader"; + +export function NestiaEditorApplication() { + const [ready, setReady] = useState(false); + const [asset, setAsset] = useState(null); + useEffect(() => { + (async () => { + try { + setAsset(await getAsset()); + } catch { + setAsset(null); + } + setReady(true); + })().catch(() => {}); + }, []); + if (ready === false) return <>; + return asset !== null ? ( + + ) : ( +
+ Nestia Editor +
+
+ +
+ ); +} + +async function getAsset(): Promise { + const index: number = window.location.href.indexOf("?"); + if (index === -1) return null; + + const query: URLSearchParams = new URLSearchParams( + window.location.href.substring(index + 1), + ); + const url: string | null = query.get("url") ?? (await findSwagger()); + if (url === null) return null; + try { + new URL(url); + } catch { + return null; + } + + const simulate: string | null = query.get("simulate"); + const e2e: string | null = query.get("e2e"); + return { + url, + simulate: + simulate !== null ? simulate === "true" || simulate === "1" : true, + e2e: e2e !== null ? e2e === "true" || e2e === "1" : true, + }; +} + +async function findSwagger(): Promise { + const response: Response = await fetch("./swagger.json"); + return response.status === 200 ? "./swagger.json" : null; +} + +interface IAsset { + url: string; + simulate: boolean; + e2e: boolean; +} diff --git a/packages/editor/src/NestiaEditorIframe.tsx b/packages/editor/src/NestiaEditorIframe.tsx new file mode 100644 index 000000000..c32360dc6 --- /dev/null +++ b/packages/editor/src/NestiaEditorIframe.tsx @@ -0,0 +1,222 @@ +import { + Alert, + AlertTitle, + CircularProgress, + Step, + StepContent, + StepLabel, + Stepper, + Typography, +} from "@mui/material"; +import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import StackBlitzSDK from "@stackblitz/sdk"; +import { useEffect, useState } from "react"; +import { JSONTree } from "react-json-tree"; +import { IValidation } from "typia"; + +import { NestiaEditorComposer } from "./internal/NestiaEditorComposer"; + +export function NestiaEditorIframe(props: NestiaEditorIframe.IProps) { + const [id] = useState( + `reactia-editor-div-${Math.random().toString().substring(2)}`, + ); + const [step, setStep] = useState(0); + const [fetchError, setFetchError] = useState(null); + const [operations, setOperationCount] = useState>({}); + const [composerError, setComposerError] = useState(null); + + useEffect(() => { + (async () => { + // LOADING OPENAPI DOCUMENTS + setStep(0); + const document: + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | string = + typeof props.swagger === "string" + ? await getDocument(props.swagger) + : props.swagger; + if (typeof document === "string") { + setFetchError(document); + return; + } else setOperationCount(aggregateOperation(document)); + + // GENERATING SOFTWARE DEVELOPMENT KIT + setStep(1); + const result: IValidation = + await NestiaEditorComposer.sdk({ + document, + simulate: props.simulate ?? true, + e2e: props.e2e ?? true, + }); + if (result.success === false) { + setComposerError(result.errors); + return; + } + + // COMPOSING STACKBLITZ PROJECT + setStep(2); + StackBlitzSDK.embedProject( + id, + { + title: document.info?.title ?? "Nestia Editor", + template: "node", + files: result.data.files, + }, + { + width: "100%", + height: "100%", + openFile: result.data.openFile, + startScript: result.data.startScript as any, // no problem + }, + ); + })().catch(() => {}); + }, []); + return ( +
+
+ Nestia Editor +
+
+ + + + Loading OpenAPI Document + + +
+ +
+
+ {typeof props.swagger === "string" ? ( + <> +

Fetching OpenAPI Document from

+

+ + {props.swagger} + +

+ + ) : ( + "Delivering OpenAPI Document to the composer" + )} + {fetchError !== null ? ( + + Fetch Error + {fetchError} + + ) : null} +
+
+ + + + Generating Software Development Kit + + + +
+ +
+
+ Generating SDK funtions... +
+
    +
  • + total operations: # + {Object.values(operations) + .reduce((a, b) => a + b, 0) + .toLocaleString()} +
  • + {Object.entries(operations).map(([method, count]) => ( +
  • + {method}: #{count.toLocaleString()} +
  • + ))} +
+ {composerError !== null ? ( + <> +
+ + Composition Error + + + + ) : null} +
+
+ + + Composing TypeScript Project + + + +
+
+
+ ); +} +export namespace NestiaEditorIframe { + export interface IProps { + swagger: + | string + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument; + simulate?: boolean; + e2e?: boolean; + + /** + * @internal + */ + files?: Record; + } +} + +const getDocument = async ( + url: string, +): Promise< + SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument | string +> => { + try { + const response: Response = await fetch(url); + if (response.status !== 200) return await response.text(); + return await response.json(); + } catch (error) { + if (error instanceof Error) return error.message; + return "Unknown error"; + } +}; + +const aggregateOperation = ( + document: SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument, +): Record => { + const map: Record = {}; + if (!(typeof document === "object" && document !== null)) return map; + for (const collection of Object.values(document.paths ?? {})) + if (typeof collection === "object" && collection !== null) + for (const [method] of Object.entries(collection)) + if ( + method === "head" || + method === "get" || + method === "post" || + method === "patch" || + method === "put" || + method === "delete" + ) + map[method] = (map[method] ?? 0) + 1; + return map; +}; diff --git a/packages/editor/src/NestiaEditorUploader.tsx b/packages/editor/src/NestiaEditorUploader.tsx new file mode 100644 index 000000000..35cbd525b --- /dev/null +++ b/packages/editor/src/NestiaEditorUploader.tsx @@ -0,0 +1,136 @@ +import { + Button, + FormControl, + FormControlLabel, + FormLabel, + Radio, + RadioGroup, + Switch, +} from "@mui/material"; +import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import StackBlitzSDK from "@stackblitz/sdk"; +import { useState } from "react"; + +import { NestiaEditorComposer } from "./internal/NestiaEditorComposer"; +import { NestiaEditorFileUploader } from "./internal/NestiaEditorFileUploader"; + +export function NestiaEditorUploader(props: NestiaEditorUploader.IProps) { + // PARAMETERS + const [mode, setMode] = useState<"nest" | "sdk">("sdk"); + const [simulate, setSimulate] = useState(true); + const [e2e, setE2e] = useState(true); + + // RESULT + const [document, setDocument] = useState< + SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument | null + >(null); + const [progress, setProgress] = useState(false); + + const handleError = (error: string) => { + if (props.onError) props.onError(error); + else alert(error); + }; + const handleSwagger = ( + document: + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | null, + error: string | null, + ) => { + setDocument(document); + if (error !== null) handleError(error); + }; + + const generate = async () => { + if (document === null) return; + + setProgress(true); + try { + const result = await NestiaEditorComposer[mode]({ + document, + e2e, + simulate, + }); + if (result.success === true) { + StackBlitzSDK.openProject( + { + title: document.info?.title ?? "Nestia Editor", + template: "node", + files: result.data.files, + }, + { + newWindow: true, + openFile: result.data.openFile, + startScript: result.data.startScript as any, + }, + ); + } else { + handleError(JSON.stringify(result.errors, null, 2)); + } + } catch (exp) { + handleError(exp instanceof Error ? exp.message : "unknown error"); + } + setProgress(false); + }; + + return ( + <> + +
+ + Mode + setMode(value as "nest" | "sdk")} + style={{ paddingLeft: 15 }} + > + } + label="Software Development Kit" + /> + } + label="NestJS Project" + /> + + Options + setSimulate(!simulate)} + /> + } + /> + setE2e(!e2e)} />} + /> + +
+
+ + + ); +} +export namespace NestiaEditorUploader { + export interface IProps { + onError?: (error: string) => void; + } +} diff --git a/packages/editor/src/assets/react.svg b/packages/editor/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/packages/editor/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.ts new file mode 100644 index 000000000..6eb7a3355 --- /dev/null +++ b/packages/editor/src/index.ts @@ -0,0 +1,2 @@ +export * from "./NestiaEditorIframe"; +export * from "./NestiaEditorUploader"; diff --git a/packages/editor/src/internal/NestiaEditorComposer.ts b/packages/editor/src/internal/NestiaEditorComposer.ts new file mode 100644 index 000000000..c46acf80b --- /dev/null +++ b/packages/editor/src/internal/NestiaEditorComposer.ts @@ -0,0 +1,85 @@ +import { MigrateApplication } from "@nestia/migrate"; +import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import prettierEsTreePlugin from "prettier/plugins/estree"; +import prettierTsPlugin from "prettier/plugins/typescript"; +import { format } from "prettier/standalone"; +import { IValidation } from "typia"; + +export namespace NestiaEditorComposer { + export interface IProps { + document: SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument; + e2e: boolean; + simulate: boolean; + /** + * @internal + */ + files?: Record; + } + export interface IOutput { + files: Record; + openFile: string; + startScript: string[]; + } + + export const nest = (props: IProps): Promise> => + compose({ + openFile: "README.md,test/start.ts", + startScript: ["build:test,test", ""], + migrate: (app) => app.nest(props), + })(props); + + export const sdk = (props: IProps): Promise> => + compose({ + openFile: "README.md,test/start.ts", + startScript: ["swagger", "hello"], + migrate: (app) => app.sdk(props), + })(props); + + const compose = + (config: { + openFile: string; + startScript: string[]; + migrate: (app: MigrateApplication) => MigrateApplication.IOutput; + }) => + async (props: IProps): Promise> => { + if (props.files !== undefined) + return { + success: true, + data: { + files: props.files, + openFile: config.openFile, + startScript: config.startScript, + }, + errors: [], + }; + const result: IValidation = + await MigrateApplication.create(props.document); + if (result.success === false) return result; + + const app: MigrateApplication = result.data; + const { files } = config.migrate(app); + for (const f of files) + if (f.file.substring(f.file.length - 3) === ".ts") + f.content = await format(f.content, { + parser: "typescript", + plugins: [prettierEsTreePlugin, prettierTsPlugin], + }); + return { + success: true, + data: { + files: Object.fromEntries( + files.map( + (f) => + [ + [f.location, f.location.length ? "/" : "", f.file].join(""), + f.content, + ] as const, + ), + ), + openFile: config.openFile, + startScript: config.startScript, + }, + errors: [], + } satisfies IValidation; + }; +} diff --git a/packages/editor/src/internal/NestiaEditorFileUploader.tsx b/packages/editor/src/internal/NestiaEditorFileUploader.tsx new file mode 100644 index 000000000..8db38d1cb --- /dev/null +++ b/packages/editor/src/internal/NestiaEditorFileUploader.tsx @@ -0,0 +1,66 @@ +import { OpenApi, OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import { load } from "js-yaml"; +import { useState } from "react"; +import FileUpload from "react-mui-fileuploader"; +import { ExtendedFileProps } from "react-mui-fileuploader/dist/types/index.types"; + +export function NestiaEditorFileUploader( + props: NestiaEditorFileUploader.IProps, +) { + const [elements, setElements] = useState([]); + const onChange = async (array: ExtendedFileProps[]) => { + if (array.length === 0) { + props.onChange(null, null); + return; + } + const file: ExtendedFileProps = array[array.length - 1]; + const buffer: ArrayBuffer = await file.arrayBuffer(); + const content: string = new TextDecoder().decode(buffer); + const extension: "json" | "yaml" = file.name.split(".").pop()! as + | "json" + | "yaml"; + + try { + const json: + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument = + extension === "json" ? JSON.parse(content) : load(content); + props.onChange(json, null); + } catch { + props.onChange( + null, + extension === "json" ? "Invalid JSON file" : "Invalid YAML file", + ); + return; + } + if (array.length > 1) setElements([file]); + }; + return ( + + ); +} +export namespace NestiaEditorFileUploader { + export interface IProps { + onChange: ( + swagger: + | SwaggerV2.IDocument + | OpenApiV3.IDocument + | OpenApiV3_1.IDocument + | null, + error: string | null, + ) => void; + } +} diff --git a/packages/editor/src/main.tsx b/packages/editor/src/main.tsx new file mode 100644 index 000000000..c8bfa7c92 --- /dev/null +++ b/packages/editor/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; + +import { NestiaEditorApplication } from "./NestiaEditorApplication.tsx"; + +createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/packages/editor/src/vite-env.d.ts b/packages/editor/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/packages/editor/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/packages/editor/tsconfig.app.json b/packages/editor/tsconfig.app.json new file mode 100644 index 000000000..5a2def4b7 --- /dev/null +++ b/packages/editor/tsconfig.app.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.json index 19b27c0a8..1ffef600d 100644 --- a/packages/editor/tsconfig.json +++ b/packages/editor/tsconfig.json @@ -1,113 +1,7 @@ { - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "lib": [ - "DOM", - "ES2020", - ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - "jsx": "react", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] } diff --git a/packages/editor/tsconfig.node.json b/packages/editor/tsconfig.node.json new file mode 100644 index 000000000..9dad70185 --- /dev/null +++ b/packages/editor/tsconfig.node.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/packages/editor/vite.config.ts b/packages/editor/vite.config.ts new file mode 100644 index 000000000..8b0f57b91 --- /dev/null +++ b/packages/editor/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], +}) From 6d35940b3fd7ba00b962229117fc8abb86280ca6 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 28 Oct 2024 06:47:46 +0900 Subject: [PATCH 3/5] Publish `@nestia/editor` --- packages/editor.temp/package.json | 30 ---- packages/editor.temp/src/NestiaEditor.tsx | 86 ----------- packages/editor/.gitignore | 1 + packages/editor/LICENSE | 21 +++ packages/editor/README.md | 138 +++++++++++------- packages/editor/index.html | 3 +- packages/editor/package.json | 40 ++++- packages/editor/rollup.config.js | 29 ++++ packages/editor/src/assets/react.svg | 1 - .../src/internal/NestiaEditorFileUploader.tsx | 4 +- packages/editor/src/main.tsx | 2 +- .../tsconfig.lib.json} | 104 ++++++------- 12 files changed, 227 insertions(+), 232 deletions(-) delete mode 100644 packages/editor.temp/package.json delete mode 100644 packages/editor.temp/src/NestiaEditor.tsx create mode 100644 packages/editor/LICENSE create mode 100644 packages/editor/rollup.config.js delete mode 100644 packages/editor/src/assets/react.svg rename packages/{editor.temp/tsconfig.json => editor/tsconfig.lib.json} (53%) diff --git a/packages/editor.temp/package.json b/packages/editor.temp/package.json deleted file mode 100644 index d5eb84b69..000000000 --- a/packages/editor.temp/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@nestia/editor", - "version": "0.1.0", - "description": "Swagger UI with TypeScript Editor and SDK library in the online browser", - "main": "lib/index.jsx", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/samchon/nestia.git" - }, - "author": "Jeongho Nam", - "license": "MIT", - "bugs": { - "url": "https://github.com/samchon/nestia/issues" - }, - "homepage": "https://github.com/samchon/nestia#readme", - "dependencies": { - "@nestia/migrate": "^0.18.2", - "@samchon/openapi": "^1.1.2", - "@stackblitz/sdk": "^1.11.0", - "typia": "^6.11.3" - }, - "devDependencies": { - "@types/react": "^18.3.12", - "react": "^18.3.1", - "typescript": "^5.6.3" - } -} diff --git a/packages/editor.temp/src/NestiaEditor.tsx b/packages/editor.temp/src/NestiaEditor.tsx deleted file mode 100644 index e1a2788f7..000000000 --- a/packages/editor.temp/src/NestiaEditor.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { MigrateApplication } from "@nestia/migrate"; -import { OpenApi, OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; -import { embedProject } from "@stackblitz/sdk/types/lib"; -import React from "react"; -import { IValidation } from "typia"; - -export const ReactEditor = (props: ReactEditor.IProps) => { - const [id] = React.useState( - `reactia-editor-div-${Math.random().toString().substring(2)}`, - ); - React.useEffect(() => { - (async () => { - const document: - | SwaggerV2.IDocument - | OpenApiV3.IDocument - | OpenApiV3_1.IDocument - | OpenApi.IDocument = - typeof props.swagger === "string" - ? await getDocument(props.swagger) - : props.swagger; - const result: IValidation = - await MigrateApplication.create(document); - if (result.success === false) { - // @todo - return; - } - - const app: MigrateApplication = result.data; - const { files } = app.sdk({ - simulate: !!props.simulate, - e2e: !!props.e2e, - }); - embedProject(id, { - title: document.info?.title ?? "Reactia Editor", - template: "node", - files: Object.fromEntries( - files.map( - (f) => - [ - [f.location, f.location.length ? "/" : "", f.file].join(""), - f.content, - ] as const, - ), - ), - }); - })().catch(() => {}); - }, []); - return ( -
- ); -}; -export namespace ReactEditor { - export interface IProps { - swagger: - | string - | SwaggerV2.IDocument - | OpenApiV3.IDocument - | OpenApiV3_1.IDocument - | OpenApi.IDocument; - simulate?: boolean; - e2e?: boolean; - - /** - * @internal - */ - files?: Record; - } -} - -const getDocument = async ( - url: string, -): Promise< - | SwaggerV2.IDocument - | OpenApiV3.IDocument - | OpenApiV3_1.IDocument - | OpenApi.IDocument -> => { - const response: Response = await fetch(url); - return response.json(); -}; diff --git a/packages/editor/.gitignore b/packages/editor/.gitignore index a547bf36d..b48a9caf1 100644 --- a/packages/editor/.gitignore +++ b/packages/editor/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist dist-ssr +lib *.local # Editor directories and files diff --git a/packages/editor/LICENSE b/packages/editor/LICENSE new file mode 100644 index 000000000..078d83d13 --- /dev/null +++ b/packages/editor/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jeongho Nam + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/editor/README.md b/packages/editor/README.md index 74872fd4a..3dab8f3f3 100644 --- a/packages/editor/README.md +++ b/packages/editor/README.md @@ -1,50 +1,88 @@ -# React + TypeScript + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: - -- Configure the top-level `parserOptions` property like this: - -```js -export default tseslint.config({ - languageOptions: { - // other options... - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - }, -}) -``` - -- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` -- Optionally add `...tseslint.configs.stylisticTypeChecked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: - -```js -// eslint.config.js -import react from 'eslint-plugin-react' - -export default tseslint.config({ - // Set the react version - settings: { react: { version: '18.3' } }, - plugins: { - // Add the react plugin - react, - }, - rules: { - // other rules... - // Enable its recommended rules - ...react.configs.recommended.rules, - ...react.configs['jsx-runtime'].rules, - }, -}) -``` +# Nestia +![Nestia Logo](https://nestia.io/logo.png) + +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) +[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) +[![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) +[![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) + +Nestia is a set of helper libraries for NestJS, supporting below features: + + - `@nestia/core`: + - Super-fast/easy decorators + - Advanced WebSocket routes + - `@nestia/sdk`: + - Swagger generator evolved than ever + - OpenAI function calling schema generator + - SDK library generator for clients + - Mockup Simulator for client applications + - Automatic E2E test functions generator + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions + - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK + - `@nestia/editor`: Swagger-UI with Online TypeScript Editor + - `nestia`: Just CLI (command line interface) tool + +> [!NOTE] +> +> - **Only one line** required, with pure TypeScript type +> - Enhance performance **30x** up +> - Runtime validator is **20,000x faster** than `class-validator` +> - JSON serialization is **200x faster** than `class-transformer` +> - Software Development Kit +> - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/) +> - Mockup simulator means embedded backend simulator in the SDK +> - similar with [msw](https://mswjs.io/), but fully automated + +![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif) + +> Left is NestJS server code, and right is client (frontend) code utilizing SDK + + + + +## Sponsors and Backers +Thanks for your support. + +Your donation would encourage `nestia` development. + +[![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia) + + + + +## Guide Documents +Check out the document in the [website](https://nestia.io/docs/): + +### 🏠 Home + - [Introduction](https://nestia.io/docs/) + - [Setup](https://nestia.io/docs/setup/) + - [Pure TypeScript](https://nestia.io/docs/pure) + +### 📖 Features + - Core Library + - [WebSocketRoute](https://nestia.io/docs/core/WebSocketRoute) + - [TypedRoute](https://nestia.io/docs/core/TypedRoute/) + - [TypedBody](https://nestia.io/docs/core/TypedBody/) + - [TypedParam](https://nestia.io/docs/core/TypedParam/) + - [TypedQuery](https://nestia.io/docs/core/TypedQuery/) + - [TypedHeaders](https://nestia.io/docs/core/TypedHeaders/) + - [TypedException](https://nestia.io/docs/core/TypedException/) + - Generators + - [Swagger Documents](https://nestia.io/docs/sdk/swagger/) + - [Software Development Kit](https://nestia.io/docs/sdk/sdk/) + - [E2E Functions](https://nestia.io/docs/sdk/e2e/) + - [Mockup Simulator](https://nestia.io/docs/sdk/simulator/) + - E2E Testing + - [Why E2E Test?](https://nestia.io/docs/e2e/why/) + - [Test Program Development](https://nestia.io/docs/e2e/development/) + - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/) + - [Swagger to NestJS](https://nestia.io/docs/migrate/) + - [TypeScript Swagger Editor](https://nestia.io/docs/editor/) + +### 🔗 Appendix + - [API Documents](https://nestia.io/api) + - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz) + - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751) diff --git a/packages/editor/index.html b/packages/editor/index.html index bef4d75f7..b6d27390e 100644 --- a/packages/editor/index.html +++ b/packages/editor/index.html @@ -6,8 +6,7 @@ name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=3.0s" /> - - Vite + React + TS + Nestia Editor
diff --git a/packages/editor/package.json b/packages/editor/package.json index d10cb8f39..cb94bccf3 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,14 +1,36 @@ { "name": "@nestia/editor", - "private": true, "version": "0.1.0", - "type": "module", + "typings": "lib/index.d.ts", + "main": "lib/index.js", + "module": "lib/index.mjs", "scripts": { + "build:lib": "tsc --project tsconfig.lib.json && rollup -c", + "build:static": "tsc -b && vite build", "dev": "vite", - "build": "tsc -b && vite build", "lint": "eslint .", "preview": "vite preview" }, + "repository": { + "type": "git", + "url": "https://github.com/samchon/nestia" + }, + "keywords": [ + "openapi", + "swagger", + "generator", + "typescript", + "editor", + "sdk", + "nestjs", + "nestia" + ], + "author": "Jeongho Nam", + "license": "MIT", + "bugs": { + "url": "https://github.com/samchon/nestia/issues" + }, + "homepage": "https://nestia.io", "dependencies": { "@mui/material": "^5.15.6", "@nestia/migrate": "^0.18.2", @@ -21,6 +43,8 @@ }, "devDependencies": { "@eslint/js": "^9.13.0", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^12.1.1", "@types/js-yaml": "^4.0.9", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", @@ -31,8 +55,16 @@ "globals": "^15.11.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "rollup": "^4.24.2", "typescript": "^5.6.2", "typescript-eslint": "^8.10.0", "vite": "^5.4.9" - } + }, + "files": [ + "README.md", + "LICENSE", + "package.json", + "lib", + "src" + ] } diff --git a/packages/editor/rollup.config.js b/packages/editor/rollup.config.js new file mode 100644 index 000000000..9dac511e6 --- /dev/null +++ b/packages/editor/rollup.config.js @@ -0,0 +1,29 @@ +const typescript = require("@rollup/plugin-typescript"); +const terser = require("@rollup/plugin-terser"); + +module.exports = { + input: "./src/index.ts", + output: { + dir: "lib", + format: "esm", + entryFileNames: "[name].mjs", + sourcemap: true, + }, + plugins: [ + typescript({ + tsconfig: "tsconfig.lib.json", + module: "ES2020", + target: "ES2020", + }), + terser({ + format: { + comments: "some", + beautify: true, + ecma: "2020", + }, + compress: false, + mangle: false, + module: true, + }), + ], +}; diff --git a/packages/editor/src/assets/react.svg b/packages/editor/src/assets/react.svg deleted file mode 100644 index 6c87de9bb..000000000 --- a/packages/editor/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/editor/src/internal/NestiaEditorFileUploader.tsx b/packages/editor/src/internal/NestiaEditorFileUploader.tsx index 8db38d1cb..fbb338de8 100644 --- a/packages/editor/src/internal/NestiaEditorFileUploader.tsx +++ b/packages/editor/src/internal/NestiaEditorFileUploader.tsx @@ -1,4 +1,4 @@ -import { OpenApi, OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; +import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; import { load } from "js-yaml"; import { useState } from "react"; import FileUpload from "react-mui-fileuploader"; @@ -13,7 +13,7 @@ export function NestiaEditorFileUploader( props.onChange(null, null); return; } - const file: ExtendedFileProps = array[array.length - 1]; + const file: ExtendedFileProps = array[array.length - 1]!; const buffer: ArrayBuffer = await file.arrayBuffer(); const content: string = new TextDecoder().decode(buffer); const extension: "json" | "yaml" = file.name.split(".").pop()! as diff --git a/packages/editor/src/main.tsx b/packages/editor/src/main.tsx index c8bfa7c92..655a86f86 100644 --- a/packages/editor/src/main.tsx +++ b/packages/editor/src/main.tsx @@ -1,7 +1,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; -import { NestiaEditorApplication } from "./NestiaEditorApplication.tsx"; +import { NestiaEditorApplication } from "./NestiaEditorApplication"; createRoot(document.getElementById("root")!).render( diff --git a/packages/editor.temp/tsconfig.json b/packages/editor/tsconfig.lib.json similarity index 53% rename from packages/editor.temp/tsconfig.json rename to packages/editor/tsconfig.lib.json index 19b27c0a8..1624b34c2 100644 --- a/packages/editor.temp/tsconfig.json +++ b/packages/editor/tsconfig.lib.json @@ -1,113 +1,105 @@ { "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "incremental": true, /* Enable incremental compilation */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": [ "DOM", - "ES2020", + "ES2020" ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - "jsx": "react", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + "jsx": "react-jsx", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ "module": "commonjs", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + // "resolveJsonModule": true, /* Enable importing .json files */ + // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./lib", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ + "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + "newLine": "lf", /* Set the newline character for emitting files. */ + "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ /* Type Checking */ "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ + "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + }, + "include": ["src"], } From 309d515e9b8b7bf8076d09b0451ae4211b9d3920 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 28 Oct 2024 12:31:05 +0900 Subject: [PATCH 4/5] Preparing documents --- README.md | 4 +- packages/core/README.md | 4 +- packages/editor/README.md | 4 +- packages/editor/index.html | 7 +- packages/editor/package.json | 3 +- .../editor/src/NestiaEditorApplication.tsx | 13 +- packages/editor/src/NestiaEditorIframe.tsx | 48 +- packages/editor/src/NestiaEditorUploader.tsx | 12 +- .../src/internal/NestiaEditorComposer.ts | 16 +- .../src/internal/NestiaEditorFileUploader.tsx | 4 +- packages/fetcher/README.md | 4 +- packages/sdk/README.md | 4 +- website/next-env.d.ts | 2 +- website/next-sitemap.config.js | 6 +- website/package-lock.json | 1359 ++++++----------- website/package.json | 11 +- website/pages/_meta.json | 10 + website/pages/docs/editor.mdx | 34 +- website/pages/docs/migrate.mdx | 62 +- website/pages/editor.tsx | 19 + .../src/components/editor/EditorUploader.tsx | 58 - website/src/constants/EDITOR_EXAMPLES.ts | 24 +- website/src/movies/editor/EditorMovie.tsx | 111 +- website/tsconfig.json | 2 +- 24 files changed, 663 insertions(+), 1158 deletions(-) create mode 100644 website/pages/editor.tsx delete mode 100644 website/src/components/editor/EditorUploader.tsx diff --git a/README.md b/README.md index 3dab8f3f3..37bb5894e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) -[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) diff --git a/packages/core/README.md b/packages/core/README.md index 3dab8f3f3..37bb5894e 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) -[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) diff --git a/packages/editor/README.md b/packages/editor/README.md index 3dab8f3f3..37bb5894e 100644 --- a/packages/editor/README.md +++ b/packages/editor/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) -[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) diff --git a/packages/editor/index.html b/packages/editor/index.html index b6d27390e..090262ad7 100644 --- a/packages/editor/index.html +++ b/packages/editor/index.html @@ -1,14 +1,13 @@ - - + Nestia Editor - +
diff --git a/packages/editor/package.json b/packages/editor/package.json index cb94bccf3..de6c018bb 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/editor", - "version": "0.1.0", + "version": "0.3.0", "typings": "lib/index.d.ts", "main": "lib/index.js", "module": "lib/index.mjs", @@ -37,7 +37,6 @@ "@stackblitz/sdk": "^1.11.0", "js-yaml": "^4.1.0", "prettier": "^3.3.3", - "react-json-tree": "^0.19.0", "react-mui-fileuploader": "^0.5.2", "typia": "^6.11.3" }, diff --git a/packages/editor/src/NestiaEditorApplication.tsx b/packages/editor/src/NestiaEditorApplication.tsx index 309c9a854..75668f59e 100644 --- a/packages/editor/src/NestiaEditorApplication.tsx +++ b/packages/editor/src/NestiaEditorApplication.tsx @@ -1,13 +1,14 @@ import { Typography } from "@mui/material"; -import { useEffect, useState } from "react"; +import React from "react"; import { NestiaEditorIframe } from "./NestiaEditorIframe"; import { NestiaEditorUploader } from "./NestiaEditorUploader"; export function NestiaEditorApplication() { - const [ready, setReady] = useState(false); - const [asset, setAsset] = useState(null); - useEffect(() => { + const [ready, setReady] = React.useState(false); + const [asset, setAsset] = React.useState(null); + + React.useEffect(() => { (async () => { try { setAsset(await getAsset()); @@ -18,6 +19,7 @@ export function NestiaEditorApplication() { })().catch(() => {}); }, []); if (ready === false) return <>; + return asset !== null ? ( { const simulate: string | null = query.get("simulate"); const e2e: string | null = query.get("e2e"); + const mode: string | null = query.get("mode"); return { url, simulate: simulate !== null ? simulate === "true" || simulate === "1" : true, e2e: e2e !== null ? e2e === "true" || e2e === "1" : true, + mode: mode === "nest" ? "nest" : "sdk", }; } @@ -72,4 +76,5 @@ interface IAsset { url: string; simulate: boolean; e2e: boolean; + mode: "nest" | "sdk"; } diff --git a/packages/editor/src/NestiaEditorIframe.tsx b/packages/editor/src/NestiaEditorIframe.tsx index c32360dc6..572f97928 100644 --- a/packages/editor/src/NestiaEditorIframe.tsx +++ b/packages/editor/src/NestiaEditorIframe.tsx @@ -10,22 +10,23 @@ import { } from "@mui/material"; import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; import StackBlitzSDK from "@stackblitz/sdk"; -import { useEffect, useState } from "react"; -import { JSONTree } from "react-json-tree"; +import React from "react"; import { IValidation } from "typia"; import { NestiaEditorComposer } from "./internal/NestiaEditorComposer"; export function NestiaEditorIframe(props: NestiaEditorIframe.IProps) { - const [id] = useState( + const [id] = React.useState( `reactia-editor-div-${Math.random().toString().substring(2)}`, ); - const [step, setStep] = useState(0); - const [fetchError, setFetchError] = useState(null); - const [operations, setOperationCount] = useState>({}); - const [composerError, setComposerError] = useState(null); + const [step, setStep] = React.useState(0); + const [fetchError, setFetchError] = React.useState(null); + const [operations, setOperationCount] = React.useState< + Record + >({}); + const [composerError, setComposerError] = React.useState(null); - useEffect(() => { + React.useEffect(() => { (async () => { // LOADING OPENAPI DOCUMENTS setStep(0); @@ -45,11 +46,20 @@ export function NestiaEditorIframe(props: NestiaEditorIframe.IProps) { // GENERATING SOFTWARE DEVELOPMENT KIT setStep(1); const result: IValidation = - await NestiaEditorComposer.sdk({ - document, - simulate: props.simulate ?? true, - e2e: props.e2e ?? true, - }); + await (async () => { + try { + return await NestiaEditorComposer[props.mode ?? "sdk"]({ + document, + simulate: props.simulate ?? true, + e2e: props.e2e ?? true, + }); + } catch (exp) { + return { + success: false, + errors: exp as any, + } satisfies IValidation.IFailure; + } + })(); if (result.success === false) { setComposerError(result.errors); return; @@ -69,9 +79,12 @@ export function NestiaEditorIframe(props: NestiaEditorIframe.IProps) { height: "100%", openFile: result.data.openFile, startScript: result.data.startScript as any, // no problem + crossOriginIsolated: true, }, ); - })().catch(() => {}); + })().catch((exp) => { + console.error("unknown error", exp); + }); }, []); return (
Composition Error - +
{JSON.stringify(composerError, null, 2)}
) : null} @@ -179,6 +192,11 @@ export namespace NestiaEditorIframe { simulate?: boolean; e2e?: boolean; + /** + * @internal + */ + mode?: "nest" | "sdk"; + /** * @internal */ diff --git a/packages/editor/src/NestiaEditorUploader.tsx b/packages/editor/src/NestiaEditorUploader.tsx index 35cbd525b..1c40aa822 100644 --- a/packages/editor/src/NestiaEditorUploader.tsx +++ b/packages/editor/src/NestiaEditorUploader.tsx @@ -9,22 +9,22 @@ import { } from "@mui/material"; import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; import StackBlitzSDK from "@stackblitz/sdk"; -import { useState } from "react"; +import React from "react"; import { NestiaEditorComposer } from "./internal/NestiaEditorComposer"; import { NestiaEditorFileUploader } from "./internal/NestiaEditorFileUploader"; export function NestiaEditorUploader(props: NestiaEditorUploader.IProps) { // PARAMETERS - const [mode, setMode] = useState<"nest" | "sdk">("sdk"); - const [simulate, setSimulate] = useState(true); - const [e2e, setE2e] = useState(true); + const [mode, setMode] = React.useState<"nest" | "sdk">("sdk"); + const [simulate, setSimulate] = React.useState(true); + const [e2e, setE2e] = React.useState(true); // RESULT - const [document, setDocument] = useState< + const [document, setDocument] = React.useState< SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument | null >(null); - const [progress, setProgress] = useState(false); + const [progress, setProgress] = React.useState(false); const handleError = (error: string) => { if (props.onError) props.onError(error); diff --git a/packages/editor/src/internal/NestiaEditorComposer.ts b/packages/editor/src/internal/NestiaEditorComposer.ts index c46acf80b..48d1c48ca 100644 --- a/packages/editor/src/internal/NestiaEditorComposer.ts +++ b/packages/editor/src/internal/NestiaEditorComposer.ts @@ -28,12 +28,14 @@ export namespace NestiaEditorComposer { migrate: (app) => app.nest(props), })(props); - export const sdk = (props: IProps): Promise> => - compose({ + export const sdk = async (props: IProps): Promise> => { + console.log("NestiaEditorComposer.sdk()", props); + return compose({ openFile: "README.md,test/start.ts", startScript: ["swagger", "hello"], migrate: (app) => app.sdk(props), })(props); + }; const compose = (config: { @@ -60,10 +62,12 @@ export namespace NestiaEditorComposer { const { files } = config.migrate(app); for (const f of files) if (f.file.substring(f.file.length - 3) === ".ts") - f.content = await format(f.content, { - parser: "typescript", - plugins: [prettierEsTreePlugin, prettierTsPlugin], - }); + try { + f.content = await format(f.content, { + parser: "typescript", + plugins: [prettierEsTreePlugin, prettierTsPlugin], + }); + } catch {} return { success: true, data: { diff --git a/packages/editor/src/internal/NestiaEditorFileUploader.tsx b/packages/editor/src/internal/NestiaEditorFileUploader.tsx index fbb338de8..38e0951df 100644 --- a/packages/editor/src/internal/NestiaEditorFileUploader.tsx +++ b/packages/editor/src/internal/NestiaEditorFileUploader.tsx @@ -1,13 +1,13 @@ import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; import { load } from "js-yaml"; -import { useState } from "react"; +import React from "react"; import FileUpload from "react-mui-fileuploader"; import { ExtendedFileProps } from "react-mui-fileuploader/dist/types/index.types"; export function NestiaEditorFileUploader( props: NestiaEditorFileUploader.IProps, ) { - const [elements, setElements] = useState([]); + const [elements, setElements] = React.useState([]); const onChange = async (array: ExtendedFileProps[]) => { if (array.length === 0) { props.onChange(null, null); diff --git a/packages/fetcher/README.md b/packages/fetcher/README.md index 3dab8f3f3..37bb5894e 100644 --- a/packages/fetcher/README.md +++ b/packages/fetcher/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) -[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 3dab8f3f3..37bb5894e 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) -[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) diff --git a/website/next-env.d.ts b/website/next-env.d.ts index 4f11a03dc..a4a7b3f5c 100644 --- a/website/next-env.d.ts +++ b/website/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/website/next-sitemap.config.js b/website/next-sitemap.config.js index 9e299153b..5f6521a28 100644 --- a/website/next-sitemap.config.js +++ b/website/next-sitemap.config.js @@ -1,5 +1,5 @@ /** @type {import('next-sitemap').IConfig} */ module.exports = { - siteUrl: 'https://nestia.io', - generateRobotsTxt: true, -}; \ No newline at end of file + siteUrl: "https://nestia.io", + generateRobotsTxt: true, +}; diff --git a/website/package-lock.json b/website/package-lock.json index fde3d0a7e..1739eb8fc 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -14,21 +14,14 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.18.2", - "@samchon/openapi": "^1.1.0", - "@stackblitz/sdk": "^1.9.0", - "js-yaml": "^4.1.0", + "@nestia/editor": "0.3.0", "next": "14.2.13", "nextra": "^2.13.4", "nextra-theme-docs": "^2.13.4", - "prettier": "^3.2.5", "react": "18.2.0", - "react-dom": "18.2.0", - "react-mui-fileuploader": "^0.5.2", - "typia": "^6.11.0" + "react-dom": "18.2.0" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/node": "18.11.10", "@types/react": "18.0.35", "gh-pages": "^5.0.0", @@ -40,11 +33,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", + "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -52,116 +46,54 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.4.tgz", - "integrity": "sha512-NFtZmZsyzDPJnk9Zg3BbTfKKc9UlHYzD0E//p2Z3B9nCwwtJW9T0gVbCz8+fBngnn4zf1Dr3IK8PHQQHq0lDQw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", + "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", "dependencies": { - "@babel/types": "^7.25.4", + "@babel/parser": "^7.26.0", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", - "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "version": "7.26.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", + "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", "dependencies": { - "@babel/types": "^7.25.4" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -171,9 +103,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz", - "integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -182,28 +114,28 @@ } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.4.tgz", - "integrity": "sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg==", - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.25.4", - "@babel/parser": "^7.25.4", - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.4", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -212,13 +144,12 @@ } }, "node_modules/@babel/types": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", - "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -298,9 +229,9 @@ "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.0.tgz", - "integrity": "sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", + "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", "dependencies": { "@emotion/memoize": "^0.9.0" } @@ -334,14 +265,14 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.1.tgz", - "integrity": "sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.2.tgz", + "integrity": "sha512-grVnMvVPK9yUVE6rkKfAJlYZgo0cu3l9iMC77V7DW6E1DUIrU68pSEXRmFZFOFB1QFo57TncmOcvcbMDWsL4yA==", "dependencies": { "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", "@emotion/unitless": "^0.10.0", - "@emotion/utils": "^1.4.0", + "@emotion/utils": "^1.4.1", "csstype": "^3.0.2" } }, @@ -386,9 +317,9 @@ } }, "node_modules/@emotion/utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.0.tgz", - "integrity": "sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.1.tgz", + "integrity": "sha512-BymCXzCG3r72VKJxaYVwOXATqXIZ85cuvg0YOUDxMGNrKc1DJRZk8MgV5wyXRyEayIMd4FuXJIUgTBXvDNW5cA==" }, "node_modules/@emotion/weak-memoize": { "version": "0.3.1", @@ -396,26 +327,26 @@ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@floating-ui/core": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.7.tgz", - "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", "dependencies": { - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.10.tgz", - "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", + "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", "dependencies": { "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", - "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", "dependencies": { "@floating-ui/dom": "^1.0.0" }, @@ -425,9 +356,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz", - "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==" }, "node_modules/@headlessui/react": { "version": "1.7.19", @@ -463,9 +394,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -861,11 +792,11 @@ } }, "node_modules/@mui/types": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.15.tgz", - "integrity": "sha512-nbo7yPhtKJkdf9kcVOF8JZHPZTmqXjJ/tI0bdWgHg5tp9AnIN4Y7f7wm9T+0SyGYJk76+GYZ8Q5XaTYAsUHN0Q==", + "version": "7.2.18", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.18.tgz", + "integrity": "sha512-uvK9dWeyCJl/3ocVnTOS6nlji/Knj8/tVqVX03UVTpdmTJYu/s4jtDd9Kvv0nRGE0CUSNW1UYAci7PYypjealg==", "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -903,33 +834,33 @@ } }, "node_modules/@napi-rs/simple-git": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.17.tgz", - "integrity": "sha512-lH8bYk2kqfbKsht/Gejd8K+y069ZXPHBfrlcj1ptS6xlJbHhncHxpFyy57W+PTuCcN+MPGVjs+3CiufG8EUrCQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git/-/simple-git-0.1.19.tgz", + "integrity": "sha512-jMxvwzkKzd3cXo2EB9GM2ic0eYo2rP/BS6gJt6HnWbsDO1O8GSD4k7o2Cpr2YERtMpGF/MGcDfsfj2EbQPtrXw==", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@napi-rs/simple-git-android-arm-eabi": "0.1.17", - "@napi-rs/simple-git-android-arm64": "0.1.17", - "@napi-rs/simple-git-darwin-arm64": "0.1.17", - "@napi-rs/simple-git-darwin-x64": "0.1.17", - "@napi-rs/simple-git-freebsd-x64": "0.1.17", - "@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.17", - "@napi-rs/simple-git-linux-arm64-gnu": "0.1.17", - "@napi-rs/simple-git-linux-arm64-musl": "0.1.17", - "@napi-rs/simple-git-linux-powerpc64le-gnu": "0.1.17", - "@napi-rs/simple-git-linux-s390x-gnu": "0.1.17", - "@napi-rs/simple-git-linux-x64-gnu": "0.1.17", - "@napi-rs/simple-git-linux-x64-musl": "0.1.17", - "@napi-rs/simple-git-win32-arm64-msvc": "0.1.17", - "@napi-rs/simple-git-win32-x64-msvc": "0.1.17" + "@napi-rs/simple-git-android-arm-eabi": "0.1.19", + "@napi-rs/simple-git-android-arm64": "0.1.19", + "@napi-rs/simple-git-darwin-arm64": "0.1.19", + "@napi-rs/simple-git-darwin-x64": "0.1.19", + "@napi-rs/simple-git-freebsd-x64": "0.1.19", + "@napi-rs/simple-git-linux-arm-gnueabihf": "0.1.19", + "@napi-rs/simple-git-linux-arm64-gnu": "0.1.19", + "@napi-rs/simple-git-linux-arm64-musl": "0.1.19", + "@napi-rs/simple-git-linux-powerpc64le-gnu": "0.1.19", + "@napi-rs/simple-git-linux-s390x-gnu": "0.1.19", + "@napi-rs/simple-git-linux-x64-gnu": "0.1.19", + "@napi-rs/simple-git-linux-x64-musl": "0.1.19", + "@napi-rs/simple-git-win32-arm64-msvc": "0.1.19", + "@napi-rs/simple-git-win32-x64-msvc": "0.1.19" } }, "node_modules/@napi-rs/simple-git-android-arm-eabi": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.17.tgz", - "integrity": "sha512-P+B95PKy46Dq9q1sr18wCn+Uj/WShMIyBBA+ezVHWJge6JSeGh4hLhKEpv3+Rk6S7ITCXxrr7Pn7U4o20nVqhQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.19.tgz", + "integrity": "sha512-XryEH/hadZ4Duk/HS/HC/cA1j0RHmqUGey3MsCf65ZS0VrWMqChXM/xlTPWuY5jfCc/rPubHaqI7DZlbexnX/g==", "cpu": [ "arm" ], @@ -942,9 +873,9 @@ } }, "node_modules/@napi-rs/simple-git-android-arm64": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.17.tgz", - "integrity": "sha512-qggMcxfNKiQsAa1pupFuC8fajvAz6QQcZirHxTPWUxQSEwUvliL8cyKM4QdJwSac0VEITTmHaegDSXsn43EvGg==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.19.tgz", + "integrity": "sha512-ZQ0cPvY6nV9p7zrR9ZPo7hQBkDAcY/CHj3BjYNhykeUCiSNCrhvwX+WEeg5on8M1j4d5jcI/cwVG2FslfiByUg==", "cpu": [ "arm64" ], @@ -957,9 +888,9 @@ } }, "node_modules/@napi-rs/simple-git-darwin-arm64": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.17.tgz", - "integrity": "sha512-LYgvP3Rw1lCkBW0Ud4xZFUZ2SI+Y2vvy9X/OEzlmqee5VPC1wiez2kZ62lD3ABU0Ta4Khv7W+eJsaXiTuvcq+Q==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.19.tgz", + "integrity": "sha512-viZB5TYgjA1vH+QluhxZo0WKro3xBA+1xSzYx8mcxUMO5gnAoUMwXn0ZO/6Zy6pai+aGae+cj6XihGnrBRu3Pg==", "cpu": [ "arm64" ], @@ -972,9 +903,9 @@ } }, "node_modules/@napi-rs/simple-git-darwin-x64": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.17.tgz", - "integrity": "sha512-CyLbxyLILT47jdNDTCREdO0LELKWqfkbw9EV4gaFrLZVD1Dej+NnZogR4oDrg7N12pcgVWnleaK1hcBDs7SeLQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.19.tgz", + "integrity": "sha512-6dNkzSNUV5X9rsVYQbpZLyJu4Gtkl2vNJ3abBXHX/Etk0ILG5ZasO3ncznIANZQpqcbn/QPHr49J2QYAXGoKJA==", "cpu": [ "x64" ], @@ -987,9 +918,9 @@ } }, "node_modules/@napi-rs/simple-git-freebsd-x64": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-freebsd-x64/-/simple-git-freebsd-x64-0.1.17.tgz", - "integrity": "sha512-SHWa3o5EZWYh7UoLi2sO4uLjZd58UFHaMttw4O9PZPvFcdjz5LjC6CQclwZbLyPDPMGefalrkUeYTs+/VJ+XEA==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-freebsd-x64/-/simple-git-freebsd-x64-0.1.19.tgz", + "integrity": "sha512-sB9krVIchzd20FjI2ZZ8FDsTSsXLBdnwJ6CpeVyrhXHnoszfcqxt49ocZHujAS9lMpXq7i2Nv1EXJmCy4KdhwA==", "cpu": [ "x64" ], @@ -1002,9 +933,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-arm-gnueabihf": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.17.tgz", - "integrity": "sha512-nQpwitNfSN4qGmDpWOlS3XqeE7NARxCvL+lxO0CtKih2iBuWIoU0wViVKdf9fb/Rm3xsQHcblMkliMnjcAOupg==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.19.tgz", + "integrity": "sha512-6HPn09lr9N1n5/XKfP8Np53g4fEXVxOFqNkS6rTH3Rm1lZHdazTRH62RggXLTguZwjcE+MvOLvoTIoR5kAS8+g==", "cpu": [ "arm" ], @@ -1017,9 +948,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-arm64-gnu": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.17.tgz", - "integrity": "sha512-JD8nSLa9WY1kAppMufYqcqFYYjZKjZZFdZtlpz6Kn0kk4Qmm3Rvt1etnuQBwax9R2wG4n9YPYfpidDxic8rlNw==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.19.tgz", + "integrity": "sha512-G0gISckt4cVDp3oh5Z6PV3GHJrJO6Z8bIS+9xA7vTtKdqB1i5y0n3cSFLlzQciLzhr+CajFD27doW4lEyErQ/Q==", "cpu": [ "arm64" ], @@ -1032,9 +963,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-arm64-musl": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.17.tgz", - "integrity": "sha512-PRdVIEvgdIuJhDvdneO3X7XfZwujU7MOyymwK3kR1RMJPlbwzxdQBA86am/jEkBP7d8Cx8RbREzJ6y/2hAHKOQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.19.tgz", + "integrity": "sha512-OwTRF+H4IZYxmDFRi1IrLMfqbdIpvHeYbJl2X94NVsLVOY+3NUHvEzL3fYaVx5urBaMnIK0DD3wZLbcueWvxbA==", "cpu": [ "arm64" ], @@ -1047,9 +978,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-powerpc64le-gnu": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-powerpc64le-gnu/-/simple-git-linux-powerpc64le-gnu-0.1.17.tgz", - "integrity": "sha512-afbfsJMpQjtdLP3BRGj/hKpRqymxw2Lt+dmyoRej0zKxZnuPrws3Fi85RyYsT/6Tq0hSUAMeh5UtxGAOH3q8gA==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-powerpc64le-gnu/-/simple-git-linux-powerpc64le-gnu-0.1.19.tgz", + "integrity": "sha512-p7zuNNVyzpRvkCt2RIGv9FX/WPcPbZ6/FRUgUTZkA2WU33mrbvNqSi4AOqCCl6mBvEd+EOw5NU4lS9ORRJvAEg==", "cpu": [ "powerpc64le" ], @@ -1062,9 +993,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-s390x-gnu": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-s390x-gnu/-/simple-git-linux-s390x-gnu-0.1.17.tgz", - "integrity": "sha512-qTgRIUsU+b7RMls+Ji4xlDYq0rsUuNBpzVgb991UPnzrhFWFFkCtyk6I6tJqMtRfg7Vgn1stCghFEQiHmpqkew==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-s390x-gnu/-/simple-git-linux-s390x-gnu-0.1.19.tgz", + "integrity": "sha512-6N2vwJUPLiak8GLrS0a3is0gSb0UwI2CHOOqtvQxPmv+JVI8kn3vKiUscsktdDb0wGEPeZ8PvZs0y8UWix7K4g==", "cpu": [ "s390x" ], @@ -1077,9 +1008,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-x64-gnu": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.17.tgz", - "integrity": "sha512-xHlyUDJhjPUCR07JGrvMfLg5XSRVDsxgpo6B6zYQOSMcVgM7fjvyWNMBe508r4eD5YZKZyBPfSJUc5Ls9ToJNQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.19.tgz", + "integrity": "sha512-61YfeO1J13WK7MalLgP3QlV6of2rWnVw1aqxWkAgy/lGxoOFSJ4Wid6ANVCEZk4tJpPX/XNeneqkUz5xpeb2Cw==", "cpu": [ "x64" ], @@ -1092,9 +1023,9 @@ } }, "node_modules/@napi-rs/simple-git-linux-x64-musl": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.17.tgz", - "integrity": "sha512-eaTr+WPeiuEegduE3O7VzHhHftGXmX1pzzILoOTbbdmeEuH1BHnGAr35XTu+1lUHUqE2JHef3d3PgBHeh844hA==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.19.tgz", + "integrity": "sha512-cCTWNpMJnN3PrUBItWcs3dQKCydsIasbrS3laMzq8k7OzF93Zrp2LWDTPlLCO9brbBVpBzy2Qk5Xg9uAfe/Ukw==", "cpu": [ "x64" ], @@ -1107,9 +1038,9 @@ } }, "node_modules/@napi-rs/simple-git-win32-arm64-msvc": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.17.tgz", - "integrity": "sha512-v1F72stOCjapCd0Ha928m8X8i/IPhPQIXbYEGX0MEmaaAzbAJ3PTSSFpb0rFLShXaDFA2Wuw/jzlkPLESPdKVQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.19.tgz", + "integrity": "sha512-sWavb1BjeLKKBA+PbTsRSSzVNfb7V/dOpaJvkgR5d2kWFn/AHmCZHSSj/3nyZdYf0BdDC+DIvqk3daAEZ6QMVw==", "cpu": [ "arm64" ], @@ -1122,9 +1053,9 @@ } }, "node_modules/@napi-rs/simple-git-win32-x64-msvc": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.17.tgz", - "integrity": "sha512-ziSqhCGE2eTUqpQKEutGobU2fH1t9fXwGF58dMFaPgTJIISaENvdnKu5FDJfA94vPbe3BMN64JoTmjBSglGFhQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.19.tgz", + "integrity": "sha512-FmNuPoK4+qwaSCkp8lm3sJlrxk374enW+zCE5ZksXlZzj/9BDJAULJb5QUJ7o9Y8A/G+d8LkdQLPBE2Jaxe5XA==", "cpu": [ "x64" ], @@ -1136,6 +1067,20 @@ "node": ">= 10" } }, + "node_modules/@nestia/editor": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@nestia/editor/-/editor-0.3.0.tgz", + "integrity": "sha512-daAeLCdQliJxDL/bpaNVowkbTI2bMDkeQ/AIoK7/HnpbuC/D/hZu0Gg5sStS0XyOTsUAcywnCTC0euRAdqGbxQ==", + "dependencies": { + "@mui/material": "^5.15.6", + "@nestia/migrate": "^0.18.2", + "@stackblitz/sdk": "^1.11.0", + "js-yaml": "^4.1.0", + "prettier": "^3.3.3", + "react-mui-fileuploader": "^0.5.2", + "typia": "^6.11.3" + } + }, "node_modules/@nestia/migrate": { "version": "0.18.2", "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.18.2.tgz", @@ -1348,17 +1293,22 @@ } }, "node_modules/@samchon/openapi": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-1.1.0.tgz", - "integrity": "sha512-BX7Hhi7ZvqXerAml613p3ZP4YPUHRNHZ5tWlbk999SHB1liPB+KHfkEIyGOAooPHUFMpeIS/PRaw88bsUZB3Uw==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-1.1.2.tgz", + "integrity": "sha512-qg6cs2mEcY4ULUL19i0SN2hsWoQF9hntRYIVuuvZcjry85LkRgSMBM4PA1s1Yaf9b/abZnCU97L45tiz69G+9Q==" }, "node_modules/@shikijs/core": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.14.1.tgz", - "integrity": "sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.22.1.tgz", + "integrity": "sha512-bqAhT/Ri5ixV4oYsvJNH8UJjpjbINWlWyXY6tBTsP4OmD6XnFv43nRJ+lTdxd2rmG5pgam/x+zGR6kLRXrpEKA==", "dev": true, "dependencies": { - "@types/hast": "^3.0.4" + "@shikijs/engine-javascript": "1.22.1", + "@shikijs/engine-oniguruma": "1.22.1", + "@shikijs/types": "1.22.1", + "@shikijs/vscode-textmate": "^9.3.0", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.3" } }, "node_modules/@shikijs/core/node_modules/@types/hast": { @@ -1370,6 +1320,52 @@ "@types/unist": "*" } }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.22.1.tgz", + "integrity": "sha512-540pyoy0LWe4jj2BVbgELwOFu1uFvRI7lg4hdsExrSXA9x7gqfzZ/Nnh4RfX86aDAgJ647gx4TCmRwACbnQSvw==", + "dev": true, + "dependencies": { + "@shikijs/types": "1.22.1", + "@shikijs/vscode-textmate": "^9.3.0", + "oniguruma-to-js": "0.4.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.1.tgz", + "integrity": "sha512-L+1Vmd+a2kk8HtogUFymQS6BjUfJnzcWoUp1BUgxoDiklbKSMvrsMuLZGevTOP1m0rEjgnC5MsDmsr8lX1lC+Q==", + "dev": true, + "dependencies": { + "@shikijs/types": "1.22.1", + "@shikijs/vscode-textmate": "^9.3.0" + } + }, + "node_modules/@shikijs/types": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.22.1.tgz", + "integrity": "sha512-+45f8mu/Hxqs6Kyhfm98Nld5n7Q7lwhjU8UtdQwrOPs7BnM4VAb929O3IQ2ce+4D7SlNFlZGd8CnKRSnwbQreQ==", + "dev": true, + "dependencies": { + "@shikijs/vscode-textmate": "^9.3.0", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/types/node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.3.0.tgz", + "integrity": "sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==", + "dev": true + }, "node_modules/@stackblitz/sdk": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/@stackblitz/sdk/-/sdk-1.11.0.tgz", @@ -1390,11 +1386,11 @@ } }, "node_modules/@tanstack/react-virtual": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.10.2.tgz", - "integrity": "sha512-RXOj33/xYgylGNczUrufi/ZbpUreBQmlD9ewz1PNZ4NIe6clTMh5NqAL9gXjRBy59UyZSlqo3c1p3EEzEX27oA==", + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.10.8.tgz", + "integrity": "sha512-VbzbVGSsZlQktyLrP5nxE+vE1ZR+U0NFAWPbJLoG2+DKPwd2D7dVICTVIIaYlJqX1ZCEnYDbaOpmMwbsyhBoIA==", "dependencies": { - "@tanstack/virtual-core": "3.10.2" + "@tanstack/virtual-core": "3.10.8" }, "funding": { "type": "github", @@ -1406,9 +1402,9 @@ } }, "node_modules/@tanstack/virtual-core": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.10.2.tgz", - "integrity": "sha512-nQXJnavN0D5PcKW2XL+w05aO/bxnuBq0+p3X+RG+R+lTHluNSWp5ePNbz0wIfg7U4HPrX/LBE9llMOvS3/6Cuw==", + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.10.8.tgz", + "integrity": "sha512-PBu00mtt95jbKFi6Llk9aik8bnR3tR/oQP1o3TSi+iG//+Q2RTIzCEgKkHG8BB86kxMNW6O8wku+Lmi+QFR6jA==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -1435,106 +1431,6 @@ "unist-util-visit": "^5.0.0" } }, - "node_modules/@trivago/prettier-plugin-sort-imports": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", - "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", - "dev": true, - "dependencies": { - "@babel/generator": "7.17.7", - "@babel/parser": "^7.20.5", - "@babel/traverse": "7.23.2", - "@babel/types": "7.17.0", - "javascript-natural-sort": "0.7.1", - "lodash": "^4.17.21" - }, - "peerDependencies": { - "@vue/compiler-sfc": "3.x", - "prettier": "2.x - 3.x" - }, - "peerDependenciesMeta": { - "@vue/compiler-sfc": { - "optional": true - } - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@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.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.4.tgz", - "integrity": "sha512-NFtZmZsyzDPJnk9Zg3BbTfKKc9UlHYzD0E//p2Z3B9nCwwtJW9T0gVbCz8+fBngnn4zf1Dr3IK8PHQQHq0lDQw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.25.4", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", - "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", @@ -1594,9 +1490,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" }, "node_modules/@types/estree-jsx": { "version": "1.0.5", @@ -1654,9 +1550,9 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==" }, "node_modules/@types/react": { "version": "18.0.35", @@ -1692,9 +1588,9 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "bin": { "acorn": "bin/acorn" }, @@ -1711,9 +1607,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, "dependencies": { "acorn": "^8.11.0" @@ -1750,14 +1646,17 @@ "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==" }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/arch": { @@ -1816,9 +1715,9 @@ } }, "node_modules/astring": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", - "integrity": "sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz", + "integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==", "bin": { "astring": "bin/astring" } @@ -1952,9 +1851,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001651", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", - "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "version": "1.0.30001673", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz", + "integrity": "sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==", "funding": [ { "type": "opencollective", @@ -1980,24 +1879,18 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/character-entities": { @@ -2105,17 +1998,20 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/comma-separated-tokens": { "version": "2.0.3", @@ -2221,9 +2117,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cytoscape": { - "version": "3.30.2", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.2.tgz", - "integrity": "sha512-oICxQsjW8uSaRmn4UK/jkczKOqTrVqt5/1WL0POiJUT2EKNc9STM4hYFHv917yu55aTBMFNRzymlJhVAiWPCxw==", + "version": "3.30.3", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.3.tgz", + "integrity": "sha512-HncJ9gGJbVtw7YXtIs3+6YAFSSiKsom0amWc33Z7QbylbY2JGMrA0yz4EwrdTScZxnwclXeEZHzO5pxoy0ZE4g==", "engines": { "node": ">=0.10" } @@ -2678,11 +2574,11 @@ "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3374,11 +3270,11 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-own-prop": { @@ -3450,9 +3346,9 @@ } }, "node_modules/hast-util-from-html": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.2.tgz", - "integrity": "sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", + "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.1.0", @@ -3502,25 +3398,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, - "node_modules/hast-util-from-html/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/hast-util-from-html/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -3560,25 +3443,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, - "node_modules/hast-util-from-parse5/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/hast-util-from-parse5/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -3675,25 +3545,12 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/hast-util-raw/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/hast-util-raw/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -3727,6 +3584,57 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", + "integrity": "sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html/node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/hast-util-to-html/node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true + }, + "node_modules/hast-util-to-html/node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-to-parse5": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", @@ -3927,70 +3835,6 @@ "node": ">=12.0.0" } }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/internmap": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", @@ -4216,12 +4060,6 @@ "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", - "dev": true - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4239,14 +4077,14 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { @@ -4332,109 +4170,45 @@ } }, "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { "node": ">=8" } }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dependencies": { - "has-flag": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/longest-streak": { @@ -4519,9 +4293,9 @@ } }, "node_modules/markdown-table": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", - "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5015,25 +4789,12 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/mdast-util-to-hast/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/mdast-util-to-hast/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -5115,9 +4876,9 @@ } }, "node_modules/mermaid": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.1.tgz", - "integrity": "sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==", + "version": "10.9.3", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.9.3.tgz", + "integrity": "sha512-V80X1isSEvAewIL3xhmz/rVmc27CVljcsbWxkxlWJWY/1kQa4XOABqpDl2qQLGKzpKm6WbTfUEKImBlUfFYArw==", "dependencies": { "@braintree/sanitize-url": "^6.0.1", "@types/d3-scale": "^4.0.3", @@ -5128,7 +4889,7 @@ "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.10", "dayjs": "^1.11.7", - "dompurify": "^3.0.5", + "dompurify": "^3.0.5 <3.1.7", "elkjs": "^0.9.0", "katex": "^0.16.9", "khroma": "^2.0.0", @@ -5894,9 +5655,9 @@ ] }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -5953,9 +5714,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/mute-stream": { "version": "0.0.8", @@ -6048,9 +5809,9 @@ } }, "node_modules/next-seo": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-6.5.0.tgz", - "integrity": "sha512-MfzUeWTN/x/rsKp/1n0213eojO97lIl0unxqbeCY+6pAucViHDA8GSLRRcXpgjsSmBxfCFdfpu7LXbt4ANQoNQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/next-seo/-/next-seo-6.6.0.tgz", + "integrity": "sha512-0VSted/W6XNtgAtH3D+BZrMLLudqfm0D5DYNJRXHcDgan/1ZF1tDFIsWrmvQlYngALyphPfZ3ZdOqlKpKdvG6w==", "peerDependencies": { "next": "^8.1.1-canary.54 || >=9.0.0", "react": ">=16.0.0", @@ -6085,9 +5846,9 @@ } }, "node_modules/next-sitemap/node_modules/@next/env": { - "version": "13.5.6", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz", - "integrity": "sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==", + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.7.tgz", + "integrity": "sha512-uVuRqoj28Ys/AI/5gVEgRAISd0KWI0HRjOO1CTpNgmX3ZsHb5mdn14Y59yk0IxizXdo7ZjsI2S7qbWnO+GNBcA==", "dev": true }, "node_modules/next-themes": { @@ -6236,6 +5997,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-to-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", + "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "dev": true, + "dependencies": { + "regex": "^4.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -6258,70 +6031,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ora/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/ora/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ora/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -6389,15 +6098,15 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, "node_modules/package-manager-detector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.0.tgz", - "integrity": "sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.2.tgz", + "integrity": "sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==" }, "node_modules/parent-module": { "version": "1.0.1", @@ -6468,11 +6177,11 @@ } }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", "dependencies": { - "entities": "^4.4.0" + "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -6550,9 +6259,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -6808,6 +6517,12 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, + "node_modules/regex": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.3.tgz", + "integrity": "sha512-r/AadFO7owAq1QJVeZ/nq9jNS1vyZt+6t1p/E59B56Rn2GCya+gr1KSyOzNL/er+r+B7phv5jG2xU2Nz1YkmJg==", + "dev": true + }, "node_modules/rehype-katex": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/rehype-katex/-/rehype-katex-7.0.1.tgz", @@ -6839,25 +6554,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, - "node_modules/rehype-katex/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/rehype-katex/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -6908,25 +6610,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, - "node_modules/rehype-raw/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/rehype-raw/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -7381,9 +7070,9 @@ } }, "node_modules/sort-keys": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-5.0.0.tgz", - "integrity": "sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-5.1.0.tgz", + "integrity": "sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ==", "dependencies": { "is-plain-obj": "^4.0.0" }, @@ -7414,9 +7103,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "engines": { "node": ">=0.10.0" } @@ -7589,14 +7278,14 @@ "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -7629,6 +7318,17 @@ "title": "bin/title.js" } }, + "node_modules/title/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/title/node_modules/chalk": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", @@ -7642,6 +7342,19 @@ "node": ">=4" } }, + "node_modules/title/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/title/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, "node_modules/title/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7688,14 +7401,6 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7805,9 +7510,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" }, "node_modules/tstl": { "version": "3.0.0", @@ -7826,16 +7531,16 @@ } }, "node_modules/typedoc": { - "version": "0.26.6", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.6.tgz", - "integrity": "sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA==", + "version": "0.26.10", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.10.tgz", + "integrity": "sha512-xLmVKJ8S21t+JeuQLNueebEuTVphx6IrP06CdV7+0WVflUSW3SPmR+h1fnWVdAR/FQePEgsSWCUHXqKKjzuUAw==", "dev": true, "dependencies": { "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "shiki": "^1.9.1", - "yaml": "^2.4.5" + "shiki": "^1.16.2", + "yaml": "^2.5.1" }, "bin": { "typedoc": "bin/typedoc" @@ -7844,7 +7549,7 @@ "node": ">= 18" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x" } }, "node_modules/typedoc/node_modules/@types/hast": { @@ -7881,19 +7586,23 @@ } }, "node_modules/typedoc/node_modules/shiki": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.14.1.tgz", - "integrity": "sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.22.1.tgz", + "integrity": "sha512-PbJ6XxrWLMwB2rm3qdjIHNm3zq4SfFnOx0B3rEoi4AN8AUngsdyZ1tRe5slMPtn6jQkbUURLNZPpLR7Do3k78g==", "dev": true, "dependencies": { - "@shikijs/core": "1.14.1", + "@shikijs/core": "1.22.1", + "@shikijs/engine-javascript": "1.22.1", + "@shikijs/engine-oniguruma": "1.22.1", + "@shikijs/types": "1.22.1", + "@shikijs/vscode-textmate": "^9.3.0", "@types/hast": "^3.0.4" } }, "node_modules/typedoc/node_modules/yaml": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", - "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "dev": true, "bin": { "yaml": "bin.mjs" @@ -7915,11 +7624,11 @@ } }, "node_modules/typia": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/typia/-/typia-6.11.0.tgz", - "integrity": "sha512-/rhxRZ7ECx6ZPa7EhBSC3/DlLUl5RVah/+185qdX9YHgQjmhdpd+USRi7ZpKMMnVZge9MTj4bBylfWQY6EplfQ==", + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/typia/-/typia-6.11.3.tgz", + "integrity": "sha512-M4tNvgs1J0SWVd4eyIKnicJC2of/IlD9cZ46QZ2PbyF7yu+Wg6oUWS1NwYP8wjXo8h6LKIGeUVy7W9JsCgZYnw==", "dependencies": { - "@samchon/openapi": "^1.1.0", + "@samchon/openapi": "^1.1.1", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", @@ -8255,25 +7964,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==" }, - "node_modules/vfile-location/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/vfile-location/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -8415,69 +8111,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/website/package.json b/website/package.json index f4a82e7a7..9056a8e7a 100644 --- a/website/package.json +++ b/website/package.json @@ -23,21 +23,14 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.18.2", - "@samchon/openapi": "^1.1.0", - "@stackblitz/sdk": "^1.9.0", - "js-yaml": "^4.1.0", + "@nestia/editor": "0.3.0", "next": "14.2.13", "nextra": "^2.13.4", "nextra-theme-docs": "^2.13.4", - "prettier": "^3.2.5", "react": "18.2.0", - "react-dom": "18.2.0", - "react-mui-fileuploader": "^0.5.2", - "typia": "^6.11.0" + "react-dom": "18.2.0" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/node": "18.11.10", "@types/react": "18.0.35", "gh-pages": "^5.0.0", diff --git a/website/pages/_meta.json b/website/pages/_meta.json index 1a53153c9..333a2cf85 100644 --- a/website/pages/_meta.json +++ b/website/pages/_meta.json @@ -12,6 +12,16 @@ "title": "📖 Guide Documents", "type": "page" }, + "editor": { + "title": "🛠️ Nestia Editor", + "type": "page", + "hidden": true, + "display": "hidden", + "theme": { + "layout": "raw", + "footer": false + } + }, "playground": { "title": "💻 Playground", "type": "page" diff --git a/website/pages/docs/editor.mdx b/website/pages/docs/editor.mdx index 7d33cfbbe..796bf87b0 100644 --- a/website/pages/docs/editor.mdx +++ b/website/pages/docs/editor.mdx @@ -1,9 +1,8 @@ -import EditorMovie from "../../src/movies/editor/EditorMovie"; -import { EditorComposer } from "../../src/functional/EditorComposer"; import { EDITOR_EXAMPLES } from "../../src/constants/EDITOR_EXAMPLES"; +import EditorMovie from "../../src/movies/editor/EditorMovie"; ## TypeScript Swagger Editor - + > Put your `swagger.json` file, then "TypeScript Swagger Editor" be opened. @@ -25,28 +24,15 @@ Here are the some example projects generated by "TypeScript Swagger Editor". Tra {EDITOR_EXAMPLES.map((example) => (
  • {example.title}{": "} - { - if (evt.which === 3) return; - EditorComposer.sdk({ - title: example.title, - swagger: example.swagger, - e2e: true, - simulate: true, - }).catch(() => {}); - }}> SDK & Simulator + + SDK & Simulator + {" / "} - { - if (evt.which === 3) return; - EditorComposer.nest({ - title: example.title, - swagger: example.swagger, - e2e: true, - simulate: true, - }).catch(() => {}); - }}> NestJS Project + + NestJS Project +
  • ))} diff --git a/website/pages/docs/migrate.mdx b/website/pages/docs/migrate.mdx index 82ea4b416..161b3e93a 100644 --- a/website/pages/docs/migrate.mdx +++ b/website/pages/docs/migrate.mdx @@ -65,43 +65,35 @@ Visit [TypeScript Swagger Editor](./editor) and upload your `swagger.json` file. Then, you can test the migrated NestJS Project, SDK library and Mockup Simulator in the web browser. - + > Put your `swagger.json` file, then "TypeScript Swagger Editor" be opened. -{ - -} +{
      +
    • Concepts +
        +
      • SDK: collection of typed fetch functions with DTO structures
      • +
      • Mockup Simulator: embedded backend simulator in the SDK
      • +
      +
    • +
    • Demo Editors + +
    • +
    } ![Example Case](/images/editor/stackblitz.png) \ No newline at end of file diff --git a/website/pages/editor.tsx b/website/pages/editor.tsx new file mode 100644 index 000000000..ee565166f --- /dev/null +++ b/website/pages/editor.tsx @@ -0,0 +1,19 @@ +import { NestiaEditorApplication } from "@nestia/editor/lib/NestiaEditorApplication"; + +export default function Editor() { + return ( +
    + +
    + ); +} diff --git a/website/src/components/editor/EditorUploader.tsx b/website/src/components/editor/EditorUploader.tsx deleted file mode 100644 index 6d68dde3e..000000000 --- a/website/src/components/editor/EditorUploader.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { SwaggerV2, OpenApiV3, OpenApiV3_1 } from "@samchon/openapi"; -import { load } from "js-yaml"; -import { useState } from "react"; -import FileUpload from "react-mui-fileuploader"; -import { ExtendedFileProps } from "react-mui-fileuploader/dist/types/index.types"; - -type Swagger = SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument; - -const EditorUploader = (props: { - onChange: (swagger: Swagger | null, error: string | null) => void; -}) => { - const [elements, setElements] = useState([]); - - const onChange = async (array: ExtendedFileProps[]) => { - if (array.length === 0) { - props.onChange(null, null); - return; - } - - const file: ExtendedFileProps = array.at(-1)!; - const buffer: ArrayBuffer = await file.arrayBuffer(); - const content: string = new TextDecoder().decode(buffer); - const extension: "json" | "yaml" = file.name.split(".").pop()! as - | "json" - | "yaml"; - - try { - const json: Swagger = - extension === "json" ? JSON.parse(content) : load(content); - props.onChange(json, null); - } catch { - props.onChange( - null, - extension === "json" ? "Invalid JSON file" : "Invalid YAML file", - ); - return; - } - if (array.length > 1) { - setElements([file]); - } - }; - return ( - - ); -}; -export default EditorUploader; diff --git a/website/src/constants/EDITOR_EXAMPLES.ts b/website/src/constants/EDITOR_EXAMPLES.ts index bb9a04aa5..e3640b893 100644 --- a/website/src/constants/EDITOR_EXAMPLES.ts +++ b/website/src/constants/EDITOR_EXAMPLES.ts @@ -1,35 +1,43 @@ export const EDITOR_EXAMPLES: IAsset[] = [ { title: "BBS (Bullet-in Board System)", - swagger: "/swaggers/bbs.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.1/example.json", }, { title: "Shopping Mall", - swagger: "/swaggers/shopping.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.1/shopping.json", }, { title: "Clickhouse", - swagger: "/swaggers/clickhouse.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.0/clickhouse.json", }, { title: "Fireblocks", - swagger: "/swaggers/fireblocks.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.0/fireblocks.json", }, { title: "Uber", - swagger: "/swaggers/uber.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v2.0/uber.json", }, { title: "OpenAI", - swagger: "/swaggers/openai.json", + swagger: + "https://raw.githubusercontent.com/samchon/openapi/refs/heads/master/examples/v3.0/openai.json", }, { title: "아임포트", - swagger: "/swaggers/iamport.json", + swagger: + "https://raw.githubusercontent.com/samchon/payments/refs/heads/master/packages/fake-iamport-server/packages/api/swagger.json", }, { title: "토스페이먼츠", - swagger: "/swaggers/toss-payments.json", + swagger: + "https://raw.githubusercontent.com/samchon/payments/refs/heads/master/packages/fake-toss-payments-server/packages/api/swagger.json", }, ]; interface IAsset { diff --git a/website/src/movies/editor/EditorMovie.tsx b/website/src/movies/editor/EditorMovie.tsx index f555a3481..5f573882c 100644 --- a/website/src/movies/editor/EditorMovie.tsx +++ b/website/src/movies/editor/EditorMovie.tsx @@ -1,113 +1,10 @@ -import { - Button, - FormControl, - FormControlLabel, - FormLabel, - Paper, - Radio, - RadioGroup, - Switch, -} from "@mui/material"; -import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; -import { useState } from "react"; - -import EditorUploader from "../../components/editor/EditorUploader"; -import { EditorComposer } from "../../functional/EditorComposer"; - -const EditorMovie = (props: { mode: "nest" | "sdk" }) => { - // PARAMETERS - const [mode, setMode] = useState<"nest" | "sdk">(props.mode); - const [simulate, setSimulate] = useState(true); - const [e2e, setE2e] = useState(true); - - // RESULT - const [swagger, setSwagger] = useState< - SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument | null - >(null); - const [error, setError] = useState(null); - const [progress, setProgress] = useState(false); - - const handleSwagger = ( - swagger: - | SwaggerV2.IDocument - | OpenApiV3.IDocument - | OpenApiV3_1.IDocument - | null, - error: string | null, - ) => { - setSwagger(swagger); - setError(error); - }; - - const generate = async () => { - if (swagger === null) return; - - setProgress(true); - try { - await EditorComposer[mode]({ - swagger, - e2e, - simulate, - }); - } catch (exp) { - setError(exp instanceof Error ? exp.message : "unknown error"); - } - setProgress(false); - }; +import { Paper } from "@mui/material"; +import { NestiaEditorUploader } from "@nestia/editor"; +const EditorMovie = () => { return ( - -
    - - Mode - setMode(value as "nest" | "sdk")} - style={{ paddingLeft: 15 }} - > - } - label="Software Development Kit" - /> - } - label="NestJS Project" - /> - - Options - setSimulate(!simulate)} - /> - } - /> - setE2e(!e2e)} />} - /> - -
    -
    - - {...error ? [
    {error}
    ] : []} +
    ); }; diff --git a/website/tsconfig.json b/website/tsconfig.json index 50bcb22f6..667913a63 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es2022", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, From 0f8ac7364345911672470a5c2d3e2947c2643e2f Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 28 Oct 2024 19:03:48 +0900 Subject: [PATCH 5/5] Deploy `@nestia/editor` --- packages/editor/package.json | 2 +- .../editor/src/NestiaEditorApplication.tsx | 10 +-- .../src/internal/NestiaEditorFileUploader.tsx | 2 + packages/editor/tsconfig.app.tsbuildinfo | 1 + packages/editor/tsconfig.node.tsbuildinfo | 1 + website/.gitignore | 1 + website/build/editor.js | 37 +++++++++ website/package.json | 1 + website/pages/docs/editor.mdx | 71 ++++++++++++------ website/public/images/editor/unzipped.png | Bin 0 -> 38998 bytes 10 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 packages/editor/tsconfig.app.tsbuildinfo create mode 100644 packages/editor/tsconfig.node.tsbuildinfo create mode 100644 website/build/editor.js create mode 100644 website/public/images/editor/unzipped.png diff --git a/packages/editor/package.json b/packages/editor/package.json index de6c018bb..4be256630 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/editor", - "version": "0.3.0", + "version": "0.3.1", "typings": "lib/index.d.ts", "main": "lib/index.js", "module": "lib/index.mjs", diff --git a/packages/editor/src/NestiaEditorApplication.tsx b/packages/editor/src/NestiaEditorApplication.tsx index 75668f59e..3ac86c8fe 100644 --- a/packages/editor/src/NestiaEditorApplication.tsx +++ b/packages/editor/src/NestiaEditorApplication.tsx @@ -42,18 +42,11 @@ export function NestiaEditorApplication() { async function getAsset(): Promise { const index: number = window.location.href.indexOf("?"); - if (index === -1) return null; - const query: URLSearchParams = new URLSearchParams( - window.location.href.substring(index + 1), + index === -1 ? "" : window.location.href.substring(index + 1), ); const url: string | null = query.get("url") ?? (await findSwagger()); if (url === null) return null; - try { - new URL(url); - } catch { - return null; - } const simulate: string | null = query.get("simulate"); const e2e: string | null = query.get("e2e"); @@ -69,6 +62,7 @@ async function getAsset(): Promise { async function findSwagger(): Promise { const response: Response = await fetch("./swagger.json"); + console.log("swagger", response.status); return response.status === 200 ? "./swagger.json" : null; } diff --git a/packages/editor/src/internal/NestiaEditorFileUploader.tsx b/packages/editor/src/internal/NestiaEditorFileUploader.tsx index 38e0951df..e0bf6ddf1 100644 --- a/packages/editor/src/internal/NestiaEditorFileUploader.tsx +++ b/packages/editor/src/internal/NestiaEditorFileUploader.tsx @@ -1,7 +1,9 @@ import { OpenApiV3, OpenApiV3_1, SwaggerV2 } from "@samchon/openapi"; import { load } from "js-yaml"; import React from "react"; +// @ts-ignore import FileUpload from "react-mui-fileuploader"; +// @ts-ignore import { ExtendedFileProps } from "react-mui-fileuploader/dist/types/index.types"; export function NestiaEditorFileUploader( diff --git a/packages/editor/tsconfig.app.tsbuildinfo b/packages/editor/tsconfig.app.tsbuildinfo new file mode 100644 index 000000000..ae1e0c308 --- /dev/null +++ b/packages/editor/tsconfig.app.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/nestiaeditorapplication.tsx","./src/nestiaeditoriframe.tsx","./src/nestiaeditoruploader.tsx","./src/index.ts","./src/main.tsx","./src/vite-env.d.ts","./src/internal/nestiaeditorcomposer.ts","./src/internal/nestiaeditorfileuploader.tsx"],"version":"5.6.3"} \ No newline at end of file diff --git a/packages/editor/tsconfig.node.tsbuildinfo b/packages/editor/tsconfig.node.tsbuildinfo new file mode 100644 index 000000000..75ea0011d --- /dev/null +++ b/packages/editor/tsconfig.node.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./vite.config.ts"],"version":"5.6.3"} \ No newline at end of file diff --git a/website/.gitignore b/website/.gitignore index 242b2042a..bbb158b06 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -4,6 +4,7 @@ out/ public/api/ typedoc-json/ +public/downloads public/robots.txt public/sitemap*.xml !package-lock.json \ No newline at end of file diff --git a/website/build/editor.js b/website/build/editor.js new file mode 100644 index 000000000..46672b8b5 --- /dev/null +++ b/website/build/editor.js @@ -0,0 +1,37 @@ +const cp = require("child_process"); +const fs = require("fs"); +const JsZip = require("jszip"); + +const PACKAGE = `${__dirname}/../../packages/editor`; +const ASSETS = `${PACKAGE}/dist/assets`; + +const main = async () => { + cp.execSync("npm install && npm run build:static", { + stdio: "ignore", + cwd: PACKAGE, + }); + const zip = new JsZip(); + zip.file( + "index.html", + await fs.promises.readFile(`${PACKAGE}/dist/index.html`), + ); + for (const file of await fs.promises.readdir(ASSETS)) + zip.file(`assets/${file}`, await fs.promises.readFile(`${ASSETS}/${file}`)); + const buffer = await zip.generateAsync({ + type: "uint8array", + compressionOptions: { + level: 0, + }, + }); + try { + await fs.promises.mkdir(`${__dirname}/../public/downloads`); + } catch {} + await fs.promises.writeFile( + `${__dirname}/../public/downloads/editor.zip`, + buffer, + ); +}; +main().catch((error) => { + console.error(error); + process.exit(-1); +}); diff --git a/website/package.json b/website/package.json index 9056a8e7a..540abd81b 100644 --- a/website/package.json +++ b/website/package.json @@ -24,6 +24,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/editor": "0.3.0", + "jszip": "^3.10.1", "next": "14.2.13", "nextra": "^2.13.4", "nextra-theme-docs": "^2.13.4", diff --git a/website/pages/docs/editor.mdx b/website/pages/docs/editor.mdx index 796bf87b0..9cfac24a8 100644 --- a/website/pages/docs/editor.mdx +++ b/website/pages/docs/editor.mdx @@ -1,16 +1,16 @@ import { EDITOR_EXAMPLES } from "../../src/constants/EDITOR_EXAMPLES"; import EditorMovie from "../../src/movies/editor/EditorMovie"; -## TypeScript Swagger Editor +## Demonstration -> Put your `swagger.json` file, then "TypeScript Swagger Editor" be opened. +> Put your `swagger.json` file, then `@nestia/editor` be opened. -"TypeScript Swagger Editor" is a web-based TypeScript editor (of [StackBlitz](https://stackblitz.com/)) for Swagger API specifications, with SDK (Software Development Kit) library generated by [`@nestia/migrate`](./migrate). With the cloud "TypeScript Swagger Editor", you can easily test the backend API with TypeScript code, and it is much convenient than the traditional way of using Swagger UI, due to type checking and auto-completion. +`@nestia/editor` is a combination of Swagger-UI and web-based TypeScript editor (of [StackBlitz](https://stackblitz.com/)) embedding SDK (Software Development Kit) library generated by [`@nestia/migrate`](./migrate). With the `@nestia/editor`, you can easily test the backend API with TypeScript code, and it is much convenient than the traditional way of using Swagger UI, due to type checking and auto-completion. -Also, "TypeScript Swagger Editor" provides [Mockup Simulator](./sdk/simulator). With the simulator, you can start the frontend (or client) development even when the backend API is not ready yet. Furthermore, "TypeScript Swagger Editor" supports automatic [e2e (end-to-end) test functions' generation](./sdk/e2e), so that you can easily validate the API with the generated test code. +Also, `@nestia/editor` provides [Mockup Simulator](./sdk/simulator). With the simulator, you can start the frontend (or client) development even when the backend API has not been ready yet. Furthermore, `@nestia/editor` supports automatic [e2e (end-to-end) test functions' generation](./sdk/e2e), so that you can easily validate the API with the generated test code. -Here are the some example projects generated by "TypeScript Swagger Editor". Traveling those example projects, you may understand how to utilize the "TypeScript Swagger Editor". Let's start the type safe API interaction development with "TypeScript Swagger Editor"! +Here are the some example projects generated by `@nestia/editor`. Traveling those example projects, you may understand how to utilize the `@nestia/editor`. Let's start the type safe API interaction development with `@nestia/editor`! {
    • Concepts @@ -44,32 +44,57 @@ Here are the some example projects generated by "TypeScript Swagger Editor". Tra -## How to use in local -```bash -npx @nestia/migrate -? Migration mode (Use arrow keys): - NestJS - > SDK -? Swagger file location: assets/input/clickhouse.json -? Output directory path: assets/output/clickhouse-sdk-manual -? Mokup Simulator: true -? E2E Test Functions: true + +## React Library +```typescript +import { NestiaEditorIframe } from "@nestia/editor"; +import { SwaggerV2, OpenApiV3, OpenApiV3_1 } from "@samchon/openapi"; + +const document: SwaggerV2 | OpenApiV3 | OpenApiV3_1; + + + ``` -> Related document: [Nestia > Guide Documents > Migration from Swagger](./migrate) +Install `@nestia/editor` and import one of below components. + + - `NestiaEditorIframe`: directly launch the cloud editor by given document + - `NestiaEditorUploader`: upload the `swagger.json` file and launch the cloud editor + + -Run `npx @nestia/migrate` command in your terminal. The `@nestia/migrate` program will inquiry you something. After that, you can generate the SDK library in your local machine, what you've seen in the "TypeScript Swagger Editor". -For reference, if your backend application utilizes `nestia` (NestJS), you don't need to build the SDK (Software Development Kit) library by converting from the Swagger Documents. The `nestia` will automatically generate the much advanced SDK library, just by analyzing your backend application's source code. +## Static Hosting +![Unzipped](/images/editor/unzipped.png) +> [💾 https://nestia.io/downloads/editor.zip](/downloads/editor.zip) +Just unzip the above [`editor.zip`]((/downloads/editor.zip)) file, and place your `swagger.json` file into the extracted directory. +If you open the extracted `index.html` in your browser, you can see the `@nestia/editor` is serving the "TypeScript Swagger Editor" application with your `swagger.json` file. -## Roadmap -Currently, "TypeScript Swagger Editor" is utilizing the [StackBlitz](https://stackblitz.com/) as the web-based TypeScript editor. -However, if many developers agree with the usefulness of the SDK and are interested in "TypeScript Swagger Editor", I am planning to develop a new standalone web application called `@nestia/editor`. It will take advantages of both "Swagger-UI" and "TypeScript Swagger Editor", and provide more convenient features for the API interaction development. -I don't know how popular "TypeScript Swagger Editor" would be at this stage, but I hope that I can proceed with the `@nestia/editor` project as I have created something that front (client) developers desperately need. -Let's `nestia` together. \ No newline at end of file +## ` +``` + +You also can embed the `@nestia/editor` with static URL address. + +When embedding the `@nestia/editor` application through the `