From d19f21e8b02b733ba9cfc23395f1bde671515d4e Mon Sep 17 00:00:00 2001 From: luhc228 <44047106+luhc228@users.noreply.github.com> Date: Thu, 14 Apr 2022 17:16:51 +0800 Subject: [PATCH] Feat: define routes and ignore route files (#69) * feat: support define routes * fix: test * fix: test * chore: undefined type * fix: conflict * chore: remove pages str from route id * fix: watch route change * fix: warn * fix: test * fix: test * chore: example * chore: add route-gen example * feat: add integration test * chore: test * chore: update config file * chore: remove pnpm cache * chore: test * chore: remove test:ci from ci workflow * chore: update build-scripts version * chore: build fixture * chore: remove devServer test * chore: buildFixture * feat: add vitest * chore: add ts-ignore * chore: node ci version * chore: comment bundle analyzer * chore: add test timeout * fix: lint * chore: remove threads * chore: set maxThreads and minThreads * chore: add maxConcurrency * chore: remove coverage * chore: threads * chore: set threads to false * fix: conflict * fix: comment --- examples/routes-generate/ice.config.ts | 14 + examples/routes-generate/package.json | 23 + examples/routes-generate/src/app.tsx | 3 + examples/routes-generate/src/document.tsx | 26 + examples/routes-generate/src/pages/about.tsx | 6 + .../routes-generate/src/pages/dashboard/a.tsx | 7 + .../routes-generate/src/pages/dashboard/b.tsx | 7 + .../src/pages/dashboard/index.tsx | 7 + .../src/pages/dashboard/layout.tsx | 15 + .../routes-generate/src/pages/detail/$id.tsx | 13 + .../src/pages/detail/index.tsx | 14 + examples/routes-generate/src/pages/index.tsx | 15 + examples/routes-generate/src/pages/layout.tsx | 11 + .../routes-generate/src/pages/products.tsx | 6 + examples/routes-generate/tsconfig.json | 32 + package.json | 2 +- packages/build-webpack-config/package.json | 2 +- packages/build-webpack-config/src/index.ts | 2 +- packages/ice/package.json | 2 +- packages/ice/src/createService.ts | 32 +- packages/ice/src/getWatchEvents.ts | 15 +- packages/ice/src/plugins/config.ts | 4 + .../ice/src/plugins/web/ssr/generateHTML.ts | 14 +- packages/ice/src/routes.ts | 7 +- packages/ice/src/service/runtimeGenerator.ts | 4 +- packages/ice/src/service/watchSource.ts | 4 +- packages/ice/template/index.ts.ejs | 4 + packages/route-manifest/src/index.ts | 65 +- packages/route-manifest/src/routes.ts | 7 +- .../formatNestedRouteManifest.spec.ts.snap | 67 +- .../generateRouteManifest.spec.ts.snap | 497 +++++-------- .../tests/generateRouteManifest.spec.ts | 18 +- packages/runtime/src/index.ts | 15 +- packages/runtime/src/runClientApp.tsx | 4 +- packages/types/package.json | 2 +- packages/types/src/userConfig.ts | 5 + pnpm-lock.yaml | 702 +++++++++--------- tests/integration/basic-project.test.ts | 1 - tests/integration/routes-generate.test.ts | 107 +++ vitest.config.ts | 5 +- 40 files changed, 1011 insertions(+), 775 deletions(-) create mode 100644 examples/routes-generate/ice.config.ts create mode 100644 examples/routes-generate/package.json create mode 100644 examples/routes-generate/src/app.tsx create mode 100644 examples/routes-generate/src/document.tsx create mode 100644 examples/routes-generate/src/pages/about.tsx create mode 100644 examples/routes-generate/src/pages/dashboard/a.tsx create mode 100644 examples/routes-generate/src/pages/dashboard/b.tsx create mode 100644 examples/routes-generate/src/pages/dashboard/index.tsx create mode 100644 examples/routes-generate/src/pages/dashboard/layout.tsx create mode 100644 examples/routes-generate/src/pages/detail/$id.tsx create mode 100644 examples/routes-generate/src/pages/detail/index.tsx create mode 100644 examples/routes-generate/src/pages/index.tsx create mode 100644 examples/routes-generate/src/pages/layout.tsx create mode 100644 examples/routes-generate/src/pages/products.tsx create mode 100644 examples/routes-generate/tsconfig.json create mode 100644 tests/integration/routes-generate.test.ts diff --git a/examples/routes-generate/ice.config.ts b/examples/routes-generate/ice.config.ts new file mode 100644 index 000000000..b2fda15c9 --- /dev/null +++ b/examples/routes-generate/ice.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from '@ice/app'; + +export default defineConfig({ + routes: { + ignoreFiles: ['about.tsx', 'products.tsx'], + defineRoutes: (route) => { + route('/about-me', 'about.tsx'); + + route('/', 'layout.tsx', () => { + route('/product', 'products.tsx'); + }); + }, + }, +}); \ No newline at end of file diff --git a/examples/routes-generate/package.json b/examples/routes-generate/package.json new file mode 100644 index 000000000..dc63256b0 --- /dev/null +++ b/examples/routes-generate/package.json @@ -0,0 +1,23 @@ +{ + "name": "basic-project", + "version": "1.0.0", + "scripts": { + "start": "ice start", + "build": "ice build" + }, + "description": "", + "author": "", + "license": "MIT", + "dependencies": { + "@ice/app": "file:../../packages/ice", + "@ice/runtime": "^1.0.0", + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "devDependencies": { + "@types/react": "^17.0.39", + "@types/react-dom": "^17.0.11", + "browserslist": "^4.19.3", + "regenerator-runtime": "^0.13.9" + } +} \ No newline at end of file diff --git a/examples/routes-generate/src/app.tsx b/examples/routes-generate/src/app.tsx new file mode 100644 index 000000000..c1664902e --- /dev/null +++ b/examples/routes-generate/src/app.tsx @@ -0,0 +1,3 @@ +import { defineAppConfig } from 'ice'; + +export default defineAppConfig({}); diff --git a/examples/routes-generate/src/document.tsx b/examples/routes-generate/src/document.tsx new file mode 100644 index 000000000..24c078287 --- /dev/null +++ b/examples/routes-generate/src/document.tsx @@ -0,0 +1,26 @@ +/* eslint-disable react/self-closing-comp */ +import React from 'react'; +import { Meta, Title, Links, Main, Scripts } from 'ice'; + +function Document(props) { + return ( + + + + + + + + <Links /> + </head> + <body> + <Main> + {props.children} + </Main> + <Scripts /> + </body> + </html> + ); +} + +export default Document; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/about.tsx b/examples/routes-generate/src/pages/about.tsx new file mode 100644 index 000000000..43bfb7bae --- /dev/null +++ b/examples/routes-generate/src/pages/about.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import { Link } from 'ice'; + +export default function About() { + return <><h2>About</h2><Link to="/">home</Link></>; +} diff --git a/examples/routes-generate/src/pages/dashboard/a.tsx b/examples/routes-generate/src/pages/dashboard/a.tsx new file mode 100644 index 000000000..7b5f063c5 --- /dev/null +++ b/examples/routes-generate/src/pages/dashboard/a.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +export default () => { + return ( + <h3>A page</h3> + ); +}; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/dashboard/b.tsx b/examples/routes-generate/src/pages/dashboard/b.tsx new file mode 100644 index 000000000..1ce33353f --- /dev/null +++ b/examples/routes-generate/src/pages/dashboard/b.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +export default () => { + return ( + <h3>B page</h3> + ); +}; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/dashboard/index.tsx b/examples/routes-generate/src/pages/dashboard/index.tsx new file mode 100644 index 000000000..e9a67fe0c --- /dev/null +++ b/examples/routes-generate/src/pages/dashboard/index.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +export default () => { + return ( + <div>Index</div> + ); +}; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/dashboard/layout.tsx b/examples/routes-generate/src/pages/dashboard/layout.tsx new file mode 100644 index 000000000..6c594e432 --- /dev/null +++ b/examples/routes-generate/src/pages/dashboard/layout.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { Outlet, Link } from 'ice'; + +export default () => { + return ( + <div> + <h2>Dashboard</h2> + <ul> + <li><Link to="/dashboard/a">a</Link></li> + <li><Link to="/dashboard/b">b</Link></li> + </ul> + <Outlet /> + </div> + ); +}; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/detail/$id.tsx b/examples/routes-generate/src/pages/detail/$id.tsx new file mode 100644 index 000000000..f0f0b9905 --- /dev/null +++ b/examples/routes-generate/src/pages/detail/$id.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { useParams, Link } from 'ice'; + +export default function DetailId() { + const params = useParams(); + + return ( + <div> + <h2>Detail id: {params.id}</h2> + <Link to="/detail">Back to Detail</Link> + </div> + ); +} diff --git a/examples/routes-generate/src/pages/detail/index.tsx b/examples/routes-generate/src/pages/detail/index.tsx new file mode 100644 index 000000000..2658ca7a2 --- /dev/null +++ b/examples/routes-generate/src/pages/detail/index.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { Link } from 'ice'; + +export default function Detail() { + return ( + <div> + <h2>Detail</h2> + <ul> + <li><Link to="/detail/join">join</Link></li> + <li><Link to="/detail/dashboard">dashboard</Link></li> + </ul> + </div> + ); +} \ No newline at end of file diff --git a/examples/routes-generate/src/pages/index.tsx b/examples/routes-generate/src/pages/index.tsx new file mode 100644 index 000000000..0c9f084ef --- /dev/null +++ b/examples/routes-generate/src/pages/index.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { Link } from 'ice'; + +export default function Home() { + return ( + <> + <h2>Home</h2> + <ul> + <li><Link to="/about-me">about</Link></li> + <li><Link to="/detail">detail</Link></li> + <li><Link to="/dashboard">dashboard</Link></li> + </ul> + </> + ); +} diff --git a/examples/routes-generate/src/pages/layout.tsx b/examples/routes-generate/src/pages/layout.tsx new file mode 100644 index 000000000..45c897cd4 --- /dev/null +++ b/examples/routes-generate/src/pages/layout.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { Outlet } from 'ice'; + +export default () => { + return ( + <div> + <h1>Layout</h1> + <Outlet /> + </div> + ); +}; \ No newline at end of file diff --git a/examples/routes-generate/src/pages/products.tsx b/examples/routes-generate/src/pages/products.tsx new file mode 100644 index 000000000..ebea3a78c --- /dev/null +++ b/examples/routes-generate/src/pages/products.tsx @@ -0,0 +1,6 @@ +import * as React from 'react'; +import { Link } from 'ice'; + +export default function Products() { + return <><h2>Products Page</h2><Link to="/">home</Link></>; +} diff --git a/examples/routes-generate/tsconfig.json b/examples/routes-generate/tsconfig.json new file mode 100644 index 000000000..1abf2c77d --- /dev/null +++ b/examples/routes-generate/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "buildOnSave": false, + "compilerOptions": { + "baseUrl": ".", + "outDir": "build", + "module": "esnext", + "target": "es6", + "jsx": "react", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "lib": ["es6", "dom"], + "sourceMap": true, + "allowJs": true, + "rootDir": "./", + "forceConsistentCasingInFileNames": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noImplicitAny": false, + "importHelpers": true, + "strictNullChecks": true, + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true, + "skipLibCheck": true, + "paths": { + "@/*": ["./src/*"], + "ice": [".ice"] + } + }, + "include": ["src", ".ice", "ice.config.*"], + "exclude": ["node_modules", "build", "public"] +} \ No newline at end of file diff --git a/package.json b/package.json index 215a021ee..404110899 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "semver": "^7.3.5", "stylelint": "^14.3.0", "typescript": "^4.5.5", - "vitest": "^0.8.4" + "vitest": "^0.9.2" }, "packageManager": "pnpm" } diff --git a/packages/build-webpack-config/package.json b/packages/build-webpack-config/package.json index 705c6275d..898792fef 100644 --- a/packages/build-webpack-config/package.json +++ b/packages/build-webpack-config/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@ice/types": "^1.0.0", - "build-scripts": "^2.0.0-15", + "build-scripts": "^2.0.0-16", "webpack": "^5.69.1", "webpack-dev-server": "^4.7.4" } diff --git a/packages/build-webpack-config/src/index.ts b/packages/build-webpack-config/src/index.ts index 7c6a5dd66..c1e0f8c51 100644 --- a/packages/build-webpack-config/src/index.ts +++ b/packages/build-webpack-config/src/index.ts @@ -41,7 +41,7 @@ function getEntry(rootDir: string) { } return { runtime: ['react', 'react-dom', '@ice/runtime'], - index: { + main: { import: [entryFile], dependOn: 'runtime', }, diff --git a/packages/ice/package.json b/packages/ice/package.json index 29c93c144..154530b79 100644 --- a/packages/ice/package.json +++ b/packages/ice/package.json @@ -24,7 +24,7 @@ "@ice/runtime": "^1.0.0", "@ice/webpack-config": "^1.0.0", "address": "^1.1.2", - "build-scripts": "^2.0.0-15", + "build-scripts": "^2.0.0-16", "chalk": "^4.0.0", "commander": "^9.0.0", "consola": "^2.15.3", diff --git a/packages/ice/src/createService.ts b/packages/ice/src/createService.ts index 619d3f01b..c51f66d45 100644 --- a/packages/ice/src/createService.ts +++ b/packages/ice/src/createService.ts @@ -32,16 +32,9 @@ async function createService({ rootDir, command, commandArgs }: CreateServiceOpt const templateDir = path.join(__dirname, '../template/'); const configFile = 'ice.config.(mts|mjs|ts|js|cjs|json)'; const dataCache = new Map<string, string>(); - - const routesRenderData = generateRoutesInfo(rootDir); - dataCache.set('routes', JSON.stringify(routesRenderData)); - const generator = new Generator({ rootDir, targetDir, - defaultRenderData: { - ...routesRenderData, - }, // add default template of ice templates: [templateDir], }); @@ -49,14 +42,6 @@ async function createService({ rootDir, command, commandArgs }: CreateServiceOpt const { addWatchEvent, removeWatchEvent } = createWatch({ watchDir: rootDir, command, - watchEvents: getWatchEvents({ - generator, - rootDir, - targetDir, - templateDir, - configFile, - cache: dataCache, - }), }); const generatorAPI = { @@ -72,6 +57,7 @@ async function createService({ rootDir, command, commandArgs }: CreateServiceOpt addRenderFile: generator.addRenderFile, addRenderTemplate: generator.addTemplateFiles, }; + const ctx = new Context<any, ExtendsPluginAPI>({ rootDir, command, @@ -90,16 +76,32 @@ async function createService({ rootDir, command, commandArgs }: CreateServiceOpt }, }); await ctx.resolveConfig(); + const { userConfig: { routes: routesConfig } } = ctx; + const routesRenderData = generateRoutesInfo(rootDir, routesConfig); + generator.modifyRenderData((renderData) => ({ + ...renderData, + ...routesRenderData, + })); + dataCache.set('routes', JSON.stringify(routesRenderData.routeManifest)); + const runtimeModules = getRuntimeModules(ctx.getAllPlugin()); generator.modifyRenderData((renderData) => ({ ...renderData, runtimeModules, })); await ctx.setup(); + // render template before webpack compile const renderStart = new Date().getTime(); + generator.render(); + + addWatchEvent( + ...getWatchEvents({ generator, targetDir, templateDir, cache: dataCache, ctx }), + ); + consola.debug('template render cost:', new Date().getTime() - renderStart); + // define runtime env before get webpack config defineRuntimeEnv(); const compileIncludes = runtimeModules.map(({ name }) => `${name}/runtime`); diff --git a/packages/ice/src/getWatchEvents.ts b/packages/ice/src/getWatchEvents.ts index 9f987bec4..5fce7ed53 100644 --- a/packages/ice/src/getWatchEvents.ts +++ b/packages/ice/src/getWatchEvents.ts @@ -1,32 +1,34 @@ import * as path from 'path'; import consola from 'consola'; import type { WatchEvent } from '@ice/types/esm/plugin.js'; +import type { Context } from 'build-scripts'; +import type { Config } from '@ice/types'; import { generateRoutesInfo } from './routes.js'; import type Generator from './service/runtimeGenerator'; interface Options { - rootDir: string; targetDir: string; templateDir: string; - configFile: string; generator: Generator; cache: Map<string, string>; + ctx: Context<Config>; } const getWatchEvents = (options: Options): WatchEvent[] => { - const { rootDir, generator, targetDir, templateDir, configFile, cache } = options; + const { generator, targetDir, templateDir, cache, ctx } = options; + const { userConfig: { routes: routesConfig }, configFile, rootDir } = ctx; const watchRoutes: WatchEvent = [ /src\/pages\/?[\w*-:.$]+$/, (eventName: string) => { if (eventName === 'add' || eventName === 'unlink') { - const routesRenderData = generateRoutesInfo(rootDir); + const routesRenderData = generateRoutesInfo(rootDir, routesConfig); const stringifiedData = JSON.stringify(routesRenderData); if (cache.get('routes') !== stringifiedData) { cache.set('routes', stringifiedData); consola.debug('[event]', `routes data regenerated: ${stringifiedData}`); generator.renderFile( path.join(templateDir, 'routes.ts.ejs'), - path.join(rootDir, targetDir, 'route.ts'), + path.join(rootDir, targetDir, 'routes.ts'), routesRenderData, ); generator.renderFile( @@ -38,6 +40,7 @@ const getWatchEvents = (options: Options): WatchEvent[] => { } }, ]; + const watchGlobalStyle: WatchEvent = [ /src\/global.(scss|less|css)/, (event: string, filePath: string) => { @@ -49,7 +52,7 @@ const getWatchEvents = (options: Options): WatchEvent[] => { ]; const watchConfigFile: WatchEvent = [ - new RegExp(configFile), + new RegExp((typeof configFile === 'string' ? [configFile] : configFile).join('|')), (event: string, filePath: string) => { if (event === 'change') { consola.warn(`Found a change in ${path.basename(filePath)}. Restart the dev server to see the changes in effect.`); diff --git a/packages/ice/src/plugins/config.ts b/packages/ice/src/plugins/config.ts index 8f5a3689b..4088cff21 100644 --- a/packages/ice/src/plugins/config.ts +++ b/packages/ice/src/plugins/config.ts @@ -112,6 +112,10 @@ const userConfig = [ } }, }, + { + name: 'routes', + validation: 'object', + }, ]; const cliOptions = [ diff --git a/packages/ice/src/plugins/web/ssr/generateHTML.ts b/packages/ice/src/plugins/web/ssr/generateHTML.ts index d9299696a..a804a1702 100644 --- a/packages/ice/src/plugins/web/ssr/generateHTML.ts +++ b/packages/ice/src/plugins/web/ssr/generateHTML.ts @@ -1,5 +1,5 @@ -import * as fs from 'fs'; import * as path from 'path'; +import fse from 'fs-extra'; import type { RouteItem } from '@ice/runtime'; interface Options { @@ -20,7 +20,7 @@ export default async function generateHTML(options: Options) { } = options; const serverEntry = await import(entry); - const routes = JSON.parse(fs.readFileSync(routeManifest, 'utf8')); + const routes = JSON.parse(fse.readFileSync(routeManifest, 'utf8')); const paths = getPaths(routes); for (let i = 0, n = paths.length; i < n; i++) { @@ -40,7 +40,9 @@ export default async function generateHTML(options: Options) { } const fileName = routePath === '/' ? 'index.html' : `${routePath}.html`; - fs.writeFileSync(path.join(outDir, fileName), html); + const contentPath = path.join(outDir, fileName); + await fse.ensureFile(contentPath); + await fse.writeFile(contentPath, html); } } @@ -49,14 +51,14 @@ export default async function generateHTML(options: Options) { * @param routes * @returns */ -function getPaths(routes: RouteItem[]): string[] { +function getPaths(routes: RouteItem[], parentPath = ''): string[] { let pathList = []; routes.forEach(route => { if (route.children) { - pathList = pathList.concat(getPaths(route.children)); + pathList = pathList.concat(getPaths(route.children, route.path)); } else { - pathList.push(route.path || '/'); + pathList.push(path.join('/', parentPath, route.path || '')); } }); diff --git a/packages/ice/src/routes.ts b/packages/ice/src/routes.ts index 48dce9008..0b2a233c5 100644 --- a/packages/ice/src/routes.ts +++ b/packages/ice/src/routes.ts @@ -1,9 +1,10 @@ import * as path from 'path'; import { formatNestedRouteManifest, generateRouteManifest } from '@ice/route-manifest'; import type { NestedRouteManifest } from '@ice/route-manifest'; +import type { UserConfig } from '@ice/types'; -export function generateRoutesInfo(rootDir: string) { - const routeManifest = generateRouteManifest(rootDir); +export function generateRoutesInfo(rootDir: string, routesConfig: UserConfig['routes'] = {}) { + const routeManifest = generateRouteManifest(rootDir, routesConfig.ignoreFiles, routesConfig.defineRoutes); const routes = formatNestedRouteManifest(routeManifest); const str = generateNestRoutesStr(routes); @@ -23,7 +24,7 @@ function generateNestRoutesStr(nestRouteManifest: NestedRouteManifest[]) { let str = `{ path: '${routePath || ''}', - load: () => import(/* webpackChunkName: "${componentName}" */ '@/${componentFile}'), + load: () => import(/* webpackChunkName: "${componentName}" */ '@/pages/${componentFile}'), componentName: '${componentName}', index: ${index}, id: '${id}', diff --git a/packages/ice/src/service/runtimeGenerator.ts b/packages/ice/src/service/runtimeGenerator.ts index 14338af11..48d409a0d 100644 --- a/packages/ice/src/service/runtimeGenerator.ts +++ b/packages/ice/src/service/runtimeGenerator.ts @@ -32,7 +32,7 @@ const RENDER_WAIT = 150; interface Options { rootDir: string; targetDir: string; - defaultRenderData: RenderData; + defaultRenderData?: RenderData; templates?: (string | TemplateOptions)[]; } @@ -106,7 +106,7 @@ export default class Generator { private contentTypes: string[]; public constructor(options: Options) { - const { rootDir, targetDir, defaultRenderData, templates } = options; + const { rootDir, targetDir, defaultRenderData = {}, templates } = options; this.rootDir = rootDir; this.targetDir = targetDir; this.renderData = defaultRenderData; diff --git a/packages/ice/src/service/watchSource.ts b/packages/ice/src/service/watchSource.ts index 518efd148..a44ab1f19 100644 --- a/packages/ice/src/service/watchSource.ts +++ b/packages/ice/src/service/watchSource.ts @@ -29,8 +29,8 @@ function createWatch(options: { return { watcher, - addWatchEvent: ([pattern, action, name]: WatchEvent) => { - watchEvents.push([pattern, action, name]); + addWatchEvent: (...args: WatchEvent[]) => { + watchEvents.push(...args); }, removeWatchEvent: (name: string) => { const eventIndex = watchEvents.findIndex(([,,watchName]) => watchName === name); diff --git a/packages/ice/template/index.ts.ejs b/packages/ice/template/index.ts.ejs index 2f6a46d59..7a92b6144 100644 --- a/packages/ice/template/index.ts.ejs +++ b/packages/ice/template/index.ts.ejs @@ -3,6 +3,8 @@ import { useAppContext, Link, Outlet, + useParams, + useSearchParams, Meta, Title, Links, @@ -16,6 +18,8 @@ export { useAppContext, Link, Outlet, + useParams, + useSearchParams, Meta, Title, Links, diff --git a/packages/route-manifest/src/index.ts b/packages/route-manifest/src/index.ts index 3ea785a02..ef5e0e4ba 100644 --- a/packages/route-manifest/src/index.ts +++ b/packages/route-manifest/src/index.ts @@ -5,9 +5,10 @@ import minimatch from 'minimatch'; import { createRouteId, defineRoutes } from './routes.js'; import type { RouteManifest, DefineRouteFunction, NestedRouteManifest } from './routes.js'; -export { +export type { RouteManifest, NestedRouteManifest, + DefineRouteFunction, }; const validRouteChar = ['-', '\\w', '/', ':', '*']; @@ -26,14 +27,18 @@ export function isRouteModuleFile(filename: string): boolean { return routeModuleExts.includes(path.extname(filename)); } -export function generateRouteManifest(rootDir: string) { +export function generateRouteManifest( + rootDir: string, + ignoreFiles: string[] = [], + defineExtraRoutes?: (defineRoute: DefineRouteFunction) => void, +) { const srcDir = path.join(rootDir, 'src'); const routeManifest: RouteManifest = {}; // 2. find routes in `src/pages` directory if (fs.existsSync(path.resolve(srcDir, 'pages'))) { const conventionalRoutes = defineConventionalRoutes( rootDir, - [], // TODO: add ignoredFilePatterns defined in ice.config.js + ignoreFiles, ); for (const key of Object.keys(conventionalRoutes)) { @@ -44,7 +49,17 @@ export function generateRouteManifest(rootDir: string) { }; } } - + // 3. add extra routes from user config + if (defineExtraRoutes) { + const extraRoutes = defineRoutes(defineExtraRoutes); + for (const key of Object.keys(extraRoutes)) { + const route = extraRoutes[key]; + routeManifest[route.id] = { + ...route, + parentId: route.parentId || undefined, + }; + } + } return routeManifest; } @@ -66,7 +81,6 @@ function defineConventionalRoutes( ignoredFilePatterns?: string[], ): RouteManifest { const files: { [routeId: string]: string } = {}; - // 1. find all route components in src/pages visitFiles( path.join(rootDir, 'src', 'pages'), @@ -78,10 +92,9 @@ function defineConventionalRoutes( return; } - const filePath = path.join('pages', file); if (isRouteModuleFile(file)) { - let routeId = createRouteId(filePath); - files[routeId] = filePath; + let routeId = createRouteId(file); + files[routeId] = file; return; } }, @@ -102,24 +115,25 @@ function defineConventionalRoutes( }); for (let routeId of childRouteIds) { + const parentRoutePath = removeLastLayoutStrFromId(parentId) || ''; const routePath: string | undefined = createRoutePath( - routeId.slice((removeLayoutStrFromId(parentId) || 'pages').length), + // parentRoutePath = 'home', routeId = 'home/me', the new routeId is 'me' + // in order to escape the child route path is absolute path + routeId.slice(parentRoutePath.length + (parentRoutePath ? 1 : 0)), ); + const routeFilePath = path.join('src', 'pages', files[routeId]); if (RegExp(`[^${validRouteChar.join(',')}]`).test(routePath)) { - throw new Error(`invalid character in '${routeId}'. Only support char: ${validRouteChar.join(', ')}`); + throw new Error(`invalid character in '${routeFilePath}'. Only support char: ${validRouteChar.join(', ')}`); } - const isIndexRoute = routeId.endsWith('/index'); - let fullPath = createRoutePath(routeId.slice('pages'.length + 1)); - let uniqueRouteId = (fullPath || '') + (isIndexRoute ? '?index' : ''); + const isIndexRoute = routeId === 'index' || routeId.endsWith('/index'); + const fullPath = createRoutePath(routeId); + const uniqueRouteId = (fullPath || '') + (isIndexRoute ? '?index' : ''); if (uniqueRouteId) { if (uniqueRoutes.has(uniqueRouteId)) { throw new Error( - `Path ${JSON.stringify(fullPath)} defined by route ${JSON.stringify( - routeId, - )} conflicts with route ${JSON.stringify( - uniqueRoutes.get(uniqueRouteId), - )}`, + `Path ${JSON.stringify(fullPath)} defined by route ${JSON.stringify(routeFilePath)} + conflicts with route ${JSON.stringify(uniqueRoutes.get(uniqueRouteId))}`, ); } else { uniqueRoutes.set(uniqueRouteId, routeId); @@ -155,7 +169,7 @@ export function createRoutePath(routeId: string): string | undefined { let result = ''; let rawSegmentBuffer = ''; - const partialRouteId = removeLayoutStrFromId(routeId); + const partialRouteId = removeLastLayoutStrFromId(routeId); for (let i = 0; i < partialRouteId.length; i++) { const char = partialRouteId.charAt(i); @@ -196,7 +210,7 @@ function findParentRouteId( return routeIds.find((id) => { // childRouteId is `pages/about` and id is `pages/layout` will match // childRouteId is `pages/about/index` and id is `pages/about/layout` will match - return childRouteId !== id && id.endsWith('layout') && childRouteId.startsWith(`${id.slice(0, id.length - '/layout'.length)}`); + return childRouteId !== id && id.endsWith('layout') && childRouteId.startsWith(`${id.slice(0, id.length - 'layout'.length)}`); }); } @@ -224,9 +238,12 @@ function visitFiles( /** * remove `/layout` str if the routeId has it * - * /About/layout -> /About - * /About/layout/index -> /About/layout/index + * 'layout' -> '' + * 'About/layout' -> 'About' + * 'About/layout/index' -> 'About/layout/index' */ -function removeLayoutStrFromId(id?: string) { - return id?.endsWith('/layout') ? id.slice(0, id.length - '/layout'.length) : id; +function removeLastLayoutStrFromId(id?: string) { + const layoutStrs = ['/layout', 'layout']; + const currentLayoutStr = layoutStrs.find(layoutStr => id?.endsWith(layoutStr)); + return currentLayoutStr ? id.slice(0, id.length - currentLayoutStr.length) : id; } diff --git a/packages/route-manifest/src/routes.ts b/packages/route-manifest/src/routes.ts index db8135867..22279f414 100644 --- a/packages/route-manifest/src/routes.ts +++ b/packages/route-manifest/src/routes.ts @@ -100,9 +100,10 @@ export function defineRoutes( // route(path, file, options) options = optionsOrChildren || {}; } + const id = createRouteId(file); const route: ConfigRoute = { - path: path || undefined, + path, index: options.index ? true : undefined, id, parentId: @@ -144,6 +145,6 @@ function stripFileExtension(file: string) { function createComponentName(id: string) { return id.replace('.', '/') // 'pages/home.news' -> pages/home/news .split('/') - .map((item: string) => item[0].toUpperCase() + item.slice(1, item.length)) - .join(''); + .map((item: string) => item.toLowerCase()) + .join('-'); } \ No newline at end of file diff --git a/packages/route-manifest/tests/__snapshots__/formatNestedRouteManifest.spec.ts.snap b/packages/route-manifest/tests/__snapshots__/formatNestedRouteManifest.spec.ts.snap index 270f8ddd1..c8c8949d0 100644 --- a/packages/route-manifest/tests/__snapshots__/formatNestedRouteManifest.spec.ts.snap +++ b/packages/route-manifest/tests/__snapshots__/formatNestedRouteManifest.spec.ts.snap @@ -3,70 +3,33 @@ exports[`generateRouteManifest function > layout-routes 1`] = ` [ { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", + "componentName": "blog-index", + "file": "blog/index.tsx", + "id": "blog/index", "index": true, "parentId": undefined, - "path": "/blog", + "path": "blog", }, { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", + "componentName": "blog-$id", + "file": "blog/$id.tsx", + "id": "blog/$id", "index": undefined, "parentId": undefined, - "path": "/blog/:id", + "path": "blog/:id", }, { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", + "componentName": "about", + "file": "about.tsx", + "id": "about", "index": undefined, "parentId": undefined, - "path": "/about", + "path": "about", }, { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", - "index": true, - "parentId": undefined, - "path": undefined, - }, -] -`; - -exports[`generateRouteManifest function layout-routes 1`] = ` -Array [ - Object { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", - "index": true, - "parentId": undefined, - "path": "/blog", - }, - Object { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", - "index": undefined, - "parentId": undefined, - "path": "/blog/:id", - }, - Object { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", - "index": undefined, - "parentId": undefined, - "path": "/about", - }, - Object { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", + "componentName": "index", + "file": "index.tsx", + "id": "index", "index": true, "parentId": undefined, "path": undefined, diff --git a/packages/route-manifest/tests/__snapshots__/generateRouteManifest.spec.ts.snap b/packages/route-manifest/tests/__snapshots__/generateRouteManifest.spec.ts.snap index e399fc461..2282dae53 100644 --- a/packages/route-manifest/tests/__snapshots__/generateRouteManifest.spec.ts.snap +++ b/packages/route-manifest/tests/__snapshots__/generateRouteManifest.spec.ts.snap @@ -2,42 +2,42 @@ exports[`generateRouteManifest function > basic-routes 1`] = ` { - "pages/About/index": { - "componentName": "PagesAboutIndex", - "file": "pages/About/index.tsx", - "id": "pages/About/index", + "About/index": { + "componentName": "about-index", + "file": "About/index.tsx", + "id": "About/index", "index": true, - "parentId": "pages/layout", - "path": "/About", + "parentId": "layout", + "path": "About", }, - "pages/About/me/index": { - "componentName": "PagesAboutMeIndex", - "file": "pages/About/me/index.tsx", - "id": "pages/About/me/index", + "About/me/index": { + "componentName": "about-me-index", + "file": "About/me/index.tsx", + "id": "About/me/index", "index": true, - "parentId": "pages/layout", - "path": "/About/me", + "parentId": "layout", + "path": "About/me", }, - "pages/home": { - "componentName": "PagesHome", - "file": "pages/home.tsx", - "id": "pages/home", + "home": { + "componentName": "home", + "file": "home.tsx", + "id": "home", "index": undefined, - "parentId": "pages/layout", - "path": "/home", + "parentId": "layout", + "path": "home", }, - "pages/index": { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", + "index": { + "componentName": "index", + "file": "index.tsx", + "id": "index", "index": true, - "parentId": "pages/layout", + "parentId": "layout", "path": undefined, }, - "pages/layout": { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", "index": undefined, "parentId": undefined, "path": undefined, @@ -45,134 +45,44 @@ exports[`generateRouteManifest function > basic-routes 1`] = ` } `; -exports[`generateRouteManifest function > doc-delimeters-routes 1`] = ` +exports[`generateRouteManifest function > define-extra-routes 1`] = ` { - "pages/home.news": { - "componentName": "PagesHomeNews", - "file": "pages/home.news.tsx", - "id": "pages/home.news", - "index": undefined, - "parentId": "pages/layout", - "path": "/home/news", - }, - "pages/layout": { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "About/index": { + "componentName": "about-index", + "file": "About/index.tsx", + "id": "About/index", "index": undefined, "parentId": undefined, - "path": undefined, - }, -} -`; - -exports[`generateRouteManifest function > dynamic-routes 1`] = ` -{ - "pages/about": { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", - "index": undefined, - "parentId": undefined, - "path": "/about", - }, - "pages/blog/$id": { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", - "index": undefined, - "parentId": undefined, - "path": "/blog/:id", - }, - "pages/blog/index": { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", - "index": true, - "parentId": undefined, - "path": "/blog", - }, - "pages/index": { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", - "index": true, - "parentId": undefined, - "path": undefined, - }, -} -`; - -exports[`generateRouteManifest function > layout-routes 1`] = ` -{ - "pages/about": { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", - "index": undefined, - "parentId": "pages/layout", - "path": "/about", + "path": "/about-me", }, - "pages/blog/$id": { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", - "index": undefined, - "parentId": "pages/blog/layout", - "path": "/:id", - }, - "pages/blog/index": { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", + "About/me/index": { + "componentName": "about-me-index", + "file": "About/me/index.tsx", + "id": "About/me/index", "index": true, - "parentId": "pages/blog/layout", - "path": undefined, + "parentId": "layout", + "path": "About/me", }, - "pages/blog/layout": { - "componentName": "PagesBlogLayout", - "file": "pages/blog/layout.tsx", - "id": "pages/blog/layout", + "home": { + "componentName": "home", + "file": "home.tsx", + "id": "home", "index": undefined, - "parentId": "pages/layout", - "path": "/blog", + "parentId": "layout", + "path": "home", }, - "pages/home/index": { - "componentName": "PagesHomeIndex", - "file": "pages/home/index.tsx", - "id": "pages/home/index", + "index": { + "componentName": "index", + "file": "index.tsx", + "id": "index", "index": true, - "parentId": "pages/home/layout", + "parentId": "layout", "path": undefined, }, - "pages/home/layout": { - "componentName": "PagesHomeLayout", - "file": "pages/home/layout.tsx", - "id": "pages/home/layout", - "index": undefined, - "parentId": "pages/layout", - "path": "/home", - }, - "pages/home/layout/index": { - "componentName": "PagesHomeLayoutIndex", - "file": "pages/home/layout/index.tsx", - "id": "pages/home/layout/index", - "index": true, - "parentId": "pages/home/layout", - "path": "/layout", - }, - "pages/index": { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", - "index": true, - "parentId": "pages/layout", - "path": undefined, - }, - "pages/layout": { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", "index": undefined, "parentId": undefined, "path": undefined, @@ -180,28 +90,20 @@ exports[`generateRouteManifest function > layout-routes 1`] = ` } `; -exports[`generateRouteManifest function > splat-routes 1`] = ` +exports[`generateRouteManifest function > doc-delimeters-routes 1`] = ` { - "pages/$": { - "componentName": "Pages$", - "file": "pages/$.tsx", - "id": "pages/$", - "index": undefined, - "parentId": "pages/layout", - "path": "/*", - }, - "pages/home": { - "componentName": "PagesHome", - "file": "pages/home.tsx", - "id": "pages/home", + "home.news": { + "componentName": "home-news", + "file": "home.news.tsx", + "id": "home.news", "index": undefined, - "parentId": "pages/layout", - "path": "/home", + "parentId": "layout", + "path": "home/news", }, - "pages/layout": { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", "index": undefined, "parentId": undefined, "path": undefined, @@ -209,179 +111,150 @@ exports[`generateRouteManifest function > splat-routes 1`] = ` } `; -exports[`generateRouteManifest function basic-routes 1`] = ` -Object { - "pages/About/index": Object { - "componentName": "PagesAboutIndex", - "file": "pages/About/index.tsx", - "id": "pages/About/index", - "index": true, - "parentId": "pages/layout", - "path": "/About", - }, - "pages/About/me/index": Object { - "componentName": "PagesAboutMeIndex", - "file": "pages/About/me/index.tsx", - "id": "pages/About/me/index", - "index": true, - "parentId": "pages/layout", - "path": "/About/me", - }, - "pages/home": Object { - "componentName": "PagesHome", - "file": "pages/home.tsx", - "id": "pages/home", +exports[`generateRouteManifest function > dynamic-routes 1`] = ` +{ + "about": { + "componentName": "about", + "file": "about.tsx", + "id": "about", "index": undefined, - "parentId": "pages/layout", - "path": "/home", - }, - "pages/index": Object { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", - "index": true, - "parentId": "pages/layout", - "path": undefined, + "parentId": undefined, + "path": "about", }, - "pages/layout": Object { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "blog/$id": { + "componentName": "blog-$id", + "file": "blog/$id.tsx", + "id": "blog/$id", "index": undefined, "parentId": undefined, - "path": undefined, + "path": "blog/:id", }, -} -`; - -exports[`generateRouteManifest function doc-delimeters-routes 1`] = ` -Object { - "pages/home.news": Object { - "componentName": "PagesHomeNews", - "file": "pages/home.news.tsx", - "id": "pages/home.news", - "index": undefined, - "parentId": "pages/layout", - "path": "/home/news", + "blog/index": { + "componentName": "blog-index", + "file": "blog/index.tsx", + "id": "blog/index", + "index": true, + "parentId": undefined, + "path": "blog", }, - "pages/layout": Object { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", - "index": undefined, + "index": { + "componentName": "index", + "file": "index.tsx", + "id": "index", + "index": true, "parentId": undefined, "path": undefined, }, } `; -exports[`generateRouteManifest function dynamic-routes 1`] = ` -Object { - "pages/about": Object { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", - "index": undefined, - "parentId": undefined, - "path": "/about", +exports[`generateRouteManifest function > ignore-routes 1`] = ` +{ + "About/me/index": { + "componentName": "about-me-index", + "file": "About/me/index.tsx", + "id": "About/me/index", + "index": true, + "parentId": "layout", + "path": "About/me", }, - "pages/blog/$id": Object { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", + "home": { + "componentName": "home", + "file": "home.tsx", + "id": "home", "index": undefined, - "parentId": undefined, - "path": "/blog/:id", + "parentId": "layout", + "path": "home", }, - "pages/blog/index": Object { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", + "index": { + "componentName": "index", + "file": "index.tsx", + "id": "index", "index": true, - "parentId": undefined, - "path": "/blog", + "parentId": "layout", + "path": undefined, }, - "pages/index": Object { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", - "index": true, + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", + "index": undefined, "parentId": undefined, "path": undefined, }, } `; -exports[`generateRouteManifest function layout-routes 1`] = ` -Object { - "pages/about": Object { - "componentName": "PagesAbout", - "file": "pages/about.tsx", - "id": "pages/about", +exports[`generateRouteManifest function > layout-routes 1`] = ` +{ + "about": { + "componentName": "about", + "file": "about.tsx", + "id": "about", "index": undefined, - "parentId": "pages/layout", - "path": "/about", + "parentId": "layout", + "path": "about", }, - "pages/blog/$id": Object { - "componentName": "PagesBlog$id", - "file": "pages/blog/$id.tsx", - "id": "pages/blog/$id", + "blog/$id": { + "componentName": "blog-$id", + "file": "blog/$id.tsx", + "id": "blog/$id", "index": undefined, - "parentId": "pages/blog/layout", - "path": "/:id", + "parentId": "blog/layout", + "path": ":id", }, - "pages/blog/index": Object { - "componentName": "PagesBlogIndex", - "file": "pages/blog/index.tsx", - "id": "pages/blog/index", + "blog/index": { + "componentName": "blog-index", + "file": "blog/index.tsx", + "id": "blog/index", "index": true, - "parentId": "pages/blog/layout", + "parentId": "blog/layout", "path": undefined, }, - "pages/blog/layout": Object { - "componentName": "PagesBlogLayout", - "file": "pages/blog/layout.tsx", - "id": "pages/blog/layout", + "blog/layout": { + "componentName": "blog-layout", + "file": "blog/layout.tsx", + "id": "blog/layout", "index": undefined, - "parentId": "pages/layout", - "path": "/blog", + "parentId": "layout", + "path": "blog", }, - "pages/home/index": Object { - "componentName": "PagesHomeIndex", - "file": "pages/home/index.tsx", - "id": "pages/home/index", + "home/index": { + "componentName": "home-index", + "file": "home/index.tsx", + "id": "home/index", "index": true, - "parentId": "pages/home/layout", + "parentId": "home/layout", "path": undefined, }, - "pages/home/layout": Object { - "componentName": "PagesHomeLayout", - "file": "pages/home/layout.tsx", - "id": "pages/home/layout", + "home/layout": { + "componentName": "home-layout", + "file": "home/layout.tsx", + "id": "home/layout", "index": undefined, - "parentId": "pages/layout", - "path": "/home", + "parentId": "layout", + "path": "home", }, - "pages/home/layout/index": Object { - "componentName": "PagesHomeLayoutIndex", - "file": "pages/home/layout/index.tsx", - "id": "pages/home/layout/index", + "home/layout/index": { + "componentName": "home-layout-index", + "file": "home/layout/index.tsx", + "id": "home/layout/index", "index": true, - "parentId": "pages/home/layout", - "path": "/layout", + "parentId": "home/layout", + "path": "layout", }, - "pages/index": Object { - "componentName": "PagesIndex", - "file": "pages/index.tsx", - "id": "pages/index", + "index": { + "componentName": "index", + "file": "index.tsx", + "id": "index", "index": true, - "parentId": "pages/layout", + "parentId": "layout", "path": undefined, }, - "pages/layout": Object { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", "index": undefined, "parentId": undefined, "path": undefined, @@ -389,28 +262,28 @@ Object { } `; -exports[`generateRouteManifest function splat-routes 1`] = ` -Object { - "pages/$": Object { - "componentName": "Pages$", - "file": "pages/$.tsx", - "id": "pages/$", +exports[`generateRouteManifest function > splat-routes 1`] = ` +{ + "$": { + "componentName": "$", + "file": "$.tsx", + "id": "$", "index": undefined, - "parentId": "pages/layout", - "path": "/*", + "parentId": "layout", + "path": "*", }, - "pages/home": Object { - "componentName": "PagesHome", - "file": "pages/home.tsx", - "id": "pages/home", + "home": { + "componentName": "home", + "file": "home.tsx", + "id": "home", "index": undefined, - "parentId": "pages/layout", - "path": "/home", + "parentId": "layout", + "path": "home", }, - "pages/layout": Object { - "componentName": "PagesLayout", - "file": "pages/layout.tsx", - "id": "pages/layout", + "layout": { + "componentName": "layout", + "file": "layout.tsx", + "id": "layout", "index": undefined, "parentId": undefined, "path": undefined, diff --git a/packages/route-manifest/tests/generateRouteManifest.spec.ts b/packages/route-manifest/tests/generateRouteManifest.spec.ts index 6a613b0de..5f2df90e2 100644 --- a/packages/route-manifest/tests/generateRouteManifest.spec.ts +++ b/packages/route-manifest/tests/generateRouteManifest.spec.ts @@ -33,6 +33,22 @@ describe('generateRouteManifest function', () => { }); test('invalid-routes', () => { - expect(() => generateRouteManifest(path.join(fixturesDir, 'invalid-routes'))).toThrow(`invalid character in 'pages/[a.pdf]'. Only support char: -, \\w, /`); + expect(() => generateRouteManifest(path.join(fixturesDir, 'invalid-routes'))).toThrow(`invalid character in 'src/pages/[a.pdf].tsx'. Only support char: -, \\w, /`); + }); + + test('ignore-routes', () => { + const routeManifest = generateRouteManifest(path.join(fixturesDir, 'basic-routes'), ['About/index.tsx']); + expect(routeManifest).toMatchSnapshot(); + }); + + test('define-extra-routes', () => { + const routeManifest = generateRouteManifest( + path.join(fixturesDir, 'basic-routes'), + ['About/index.tsx'], + (defineRoute) => { + defineRoute('/about-me', 'About/index.tsx'); + } + ); + expect(routeManifest).toMatchSnapshot(); }); }); diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts index 40bff8c3c..02defadfc 100644 --- a/packages/runtime/src/index.ts +++ b/packages/runtime/src/index.ts @@ -1,6 +1,8 @@ import { Link, Outlet, + useParams, + useSearchParams, } from 'react-router-dom'; import Runtime from './runtime.js'; import App from './App.js'; @@ -14,7 +16,7 @@ import { Scripts, Main, } from './Document.js'; -import { +import type { RuntimePlugin, AppContext, AppConfig, @@ -32,15 +34,20 @@ export { runServerApp, renderDocument, useAppContext, - Link, - Outlet, Meta, Title, Links, Scripts, Main, defineAppConfig, - // types + // react-router-dom API + Link, + Outlet, + useParams, + useSearchParams, +}; + +export type { RuntimePlugin, AppContext, AppConfig, diff --git a/packages/runtime/src/runClientApp.tsx b/packages/runtime/src/runClientApp.tsx index d2d370cf2..d175e34f6 100644 --- a/packages/runtime/src/runClientApp.tsx +++ b/packages/runtime/src/runClientApp.tsx @@ -107,8 +107,8 @@ function BrowserEntry({ history, appContext, Document, ...rest }: BrowserEntryPr useLayoutEffect(() => { history.listen(({ action, location }) => { const matches = matchRoutes(routes, location); - if (!matches) { - throw new Error(`Routes not found in location ${location}.`); + if (!matches.length) { + throw new Error(`Routes not found in location ${location.pathname}.`); } loadNextPage(matches, (pageData) => { diff --git a/packages/types/package.json b/packages/types/package.json index 7839923a7..69afbfb0d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -26,7 +26,7 @@ "bugs": "https://github.com/ice-lab/ice-next/issues", "homepage": "https://next.ice.work", "devDependencies": { - "build-scripts": "^2.0.0-15", + "build-scripts": "^2.0.0-16", "esbuild": "^0.14.23", "@ice/runtime": "^1.0.0", "@ice/route-manifest": "^1.0.0", diff --git a/packages/types/src/userConfig.ts b/packages/types/src/userConfig.ts index 2b44dd1bf..4f5f73709 100644 --- a/packages/types/src/userConfig.ts +++ b/packages/types/src/userConfig.ts @@ -1,3 +1,4 @@ +import type { DefineRouteFunction } from '@ice/route-manifest'; import type { IPluginList } from 'build-scripts'; import type { Config, ModifyWebpackConfig } from './config'; @@ -12,5 +13,9 @@ export interface UserConfig { proxy?: Config['proxy']; filename?: string; webpack?: ModifyWebpackConfig; + routes?: { + ignoreFiles?: string[]; + defineRoutes?: (defineRoute: DefineRouteFunction) => void; + }; plugins?: IPluginList; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9fc77e032..a1b7e857b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,21 +33,21 @@ importers: semver: ^7.3.5 stylelint: ^14.3.0 typescript: ^4.5.5 - vitest: ^0.8.4 + vitest: ^0.9.2 devDependencies: - '@applint/spec': 1.2.0_dcc7a92cec4fbc101cf834f08b738218 + '@applint/spec': 1.2.0_43d44b12714eb37088c9a39f232c5b8a '@commitlint/cli': 16.2.3 '@types/eslint': 8.4.1 '@types/fs-extra': 9.0.13 '@types/glob': 7.2.0 - '@types/node': 17.0.23 + '@types/node': 17.0.24 '@types/semver': 7.3.9 - build-scripts: 2.0.0-16 + build-scripts: 2.0.0-17 c8: 7.11.0 chalk: 4.1.2 chokidar: 3.5.3 dependency-check: 4.1.0 - eslint: 8.12.0 + eslint: 8.13.0 esno: 0.14.1 execa: 6.1.0 fs-extra: 10.0.1 @@ -61,10 +61,10 @@ importers: puppeteer: 13.5.2 react: 17.0.2 rimraf: 3.0.2 - semver: 7.3.6 + semver: 7.3.7 stylelint: 14.6.1 typescript: 4.6.3 - vitest: 0.8.5_c8@7.11.0 + vitest: 0.9.3_c8@7.11.0 examples/basic-project: specifiers: @@ -91,6 +91,27 @@ importers: regenerator-runtime: 0.13.9 webpack-bundle-analyzer: 4.5.0 + examples/routes-generate: + specifiers: + '@ice/app': file:../../packages/ice + '@ice/runtime': ^1.0.0 + '@types/react': ^17.0.39 + '@types/react-dom': ^17.0.11 + browserslist: ^4.19.3 + react: ^17.0.2 + react-dom: ^17.0.2 + regenerator-runtime: ^0.13.9 + dependencies: + '@ice/app': link:../../packages/ice + '@ice/runtime': link:../../packages/runtime + react: 17.0.2 + react-dom: 17.0.2_react@17.0.2 + devDependencies: + '@types/react': 17.0.44 + '@types/react-dom': 17.0.15 + browserslist: 4.20.2 + regenerator-runtime: 0.13.9 + packages/build-webpack-config: specifiers: '@builder/pack': ^0.6.0 @@ -100,7 +121,7 @@ importers: '@rollup/pluginutils': ^4.2.0 '@swc/core': ^1.2.146 browserslist: ^4.19.3 - build-scripts: ^2.0.0-15 + build-scripts: ^2.0.0-16 consola: ^2.15.3 es-module-lexer: ^0.10.0 event: ^1.0.0 @@ -116,11 +137,11 @@ importers: webpack: ^5.69.1 webpack-dev-server: ^4.7.4 dependencies: - '@builder/pack': 0.6.0 + '@builder/pack': 0.6.1 '@builder/swc': 0.1.3 '@pmmmwh/react-refresh-webpack-plugin': 0.5.5_71ded90fc5f197eeccab1f0382e7a4aa - '@rollup/pluginutils': 4.2.0 - '@swc/core': 1.2.164 + '@rollup/pluginutils': 4.2.1 + '@swc/core': 1.2.165 browserslist: 4.20.2 consola: 2.15.3 es-module-lexer: 0.10.5 @@ -136,8 +157,8 @@ importers: unplugin: 0.3.3_webpack@5.72.0 devDependencies: '@ice/types': link:../types - build-scripts: 2.0.0-16 - webpack: 5.72.0_@swc+core@1.2.164 + build-scripts: 2.0.0-17 + webpack: 5.72.0_@swc+core@1.2.165 webpack-dev-server: 4.8.1_webpack@5.72.0 packages/ice: @@ -154,7 +175,7 @@ importers: '@types/sass': ^1.43.1 '@types/temp': ^0.9.1 address: ^1.1.2 - build-scripts: ^2.0.0-15 + build-scripts: ^2.0.0-16 chalk: ^4.0.0 chokidar: ^3.5.3 commander: ^9.0.0 @@ -177,18 +198,18 @@ importers: webpack: ^5.69.1 webpack-dev-server: ^4.7.4 dependencies: - '@builder/pack': 0.6.0 + '@builder/pack': 0.6.1 '@ice/route-manifest': link:../route-manifest '@ice/runtime': link:../runtime '@ice/webpack-config': link:../build-webpack-config address: 1.1.2 - build-scripts: 2.0.0-16 + build-scripts: 2.0.0-17 chalk: 4.1.2 commander: 9.1.0 consola: 2.15.3 ejs: 3.1.6 es-module-lexer: 0.10.5 - esbuild: 0.14.34 + esbuild: 0.14.36 fast-glob: 3.2.11 find-up: 5.0.0 fs-extra: 10.0.1 @@ -198,9 +219,9 @@ importers: postcss-modules: 4.3.1_postcss@8.4.12 prettier: 2.6.2 sass: 1.50.0 - semver: 7.3.5 + semver: 7.3.7 temp: 0.9.4 - webpack: 5.72.0_esbuild@0.14.34 + webpack: 5.72.0_esbuild@0.14.36 webpack-dev-server: 4.8.1_webpack@5.72.0 devDependencies: '@ice/types': link:../types @@ -211,7 +232,7 @@ importers: '@types/sass': 1.43.1 '@types/temp': 0.9.1 chokidar: 3.5.3 - unplugin: 0.3.3_esbuild@0.14.34+webpack@5.72.0 + unplugin: 0.3.3_esbuild@0.14.36+webpack@5.72.0 packages/plugin-auth: specifiers: @@ -244,7 +265,7 @@ importers: specifiers: '@ice/route-manifest': ^1.0.0 '@ice/runtime': ^1.0.0 - build-scripts: ^2.0.0-15 + build-scripts: ^2.0.0-16 esbuild: ^0.14.23 react: ^17.0.2 unplugin: ^0.3.2 @@ -253,11 +274,11 @@ importers: devDependencies: '@ice/route-manifest': link:../route-manifest '@ice/runtime': link:../runtime - build-scripts: 2.0.0-16 - esbuild: 0.14.34 + build-scripts: 2.0.0-17 + esbuild: 0.14.36 react: 17.0.2 - unplugin: 0.3.3_esbuild@0.14.34+webpack@5.72.0 - webpack: 5.72.0_esbuild@0.14.34 + unplugin: 0.3.3_esbuild@0.14.36+webpack@5.72.0 + webpack: 5.72.0_esbuild@0.14.36 webpack-dev-server: 4.8.1_webpack@5.72.0 packages: @@ -280,8 +301,8 @@ packages: husky: 7.0.4 dev: true - /@applint/eslint-config/1.1.5_57a50e23f6f3ae380d5986babc34ba7e: - resolution: {integrity: sha512-Lf/9BqwH95RMAYSO3Iaga+vYh33K8t7+z8/nfwmlBKw7lF4Ta36xLfthgaeA5wKQv2rHA3bAqtnq+qSFW0m7Ww==} + /@applint/eslint-config/1.1.6_4e81bb519d2371f7dd38072b4b0f75f7: + resolution: {integrity: sha512-x3L6L1hOD/1WVwcEFbkQsNLAOS9towQePpCZ0sziCCgArL+UOXpmRDkDthAupf+rn02dfIoguoGPgI48RvJjQw==} peerDependencies: '@typescript-eslint/eslint-plugin': '>=5.0.0' eslint: '>=6.8.0' @@ -291,14 +312,14 @@ packages: eslint-plugin-react: '>=7.26.1' eslint-plugin-react-hooks: '>=4.2.0' dependencies: - '@typescript-eslint/eslint-plugin': 5.18.0_a07dca3bdfc4bfa60f4dda0c1f9e3287 - '@typescript-eslint/parser': 5.18.0_eslint@8.12.0+typescript@4.6.3 - eslint: 8.12.0 - eslint-plugin-import: 2.26.0_eslint@8.12.0 - eslint-plugin-jsx-a11y: 6.5.1_eslint@8.12.0 + '@typescript-eslint/eslint-plugin': 5.19.0_f34adc8488d2e4f014fe61432d70cbf2 + '@typescript-eslint/parser': 5.19.0_eslint@8.13.0+typescript@4.6.3 + eslint: 8.13.0 + eslint-plugin-import: 2.26.0_eslint@8.13.0 + eslint-plugin-jsx-a11y: 6.5.1_eslint@8.13.0 eslint-plugin-jsx-plus: 0.1.0 - eslint-plugin-react: 7.29.4_eslint@8.12.0 - eslint-plugin-react-hooks: 4.4.0_eslint@8.12.0 + eslint-plugin-react: 7.29.4_eslint@8.13.0 + eslint-plugin-react-hooks: 4.4.0_eslint@8.13.0 transitivePeerDependencies: - supports-color - typescript @@ -312,7 +333,7 @@ packages: prettier: 2.6.2 dev: true - /@applint/spec/1.2.0_dcc7a92cec4fbc101cf834f08b738218: + /@applint/spec/1.2.0_43d44b12714eb37088c9a39f232c5b8a: resolution: {integrity: sha512-czCiJ7IA/JmKROG6yGKM7ic1Lol9ij7vR8RULP03Gt0l5x84q5KrTb2tqQLqwlwJasm9DGlGAmvS37Hd7TVOXA==} engines: {node: '>=12.0.0'} peerDependencies: @@ -322,25 +343,25 @@ packages: stylelint: '>=14.0.0' dependencies: '@applint/commitlint-config': 1.0.1_56b2b98a64d394d202db7e7a3f060c06 - '@applint/eslint-config': 1.1.5_57a50e23f6f3ae380d5986babc34ba7e + '@applint/eslint-config': 1.1.6_4e81bb519d2371f7dd38072b4b0f75f7 '@applint/prettier-config': 1.0.0_prettier@2.6.2 '@applint/stylelint-config': 1.0.2_cf3d21d8ae6e78c12c40aa84cba759e2 '@babel/core': 7.17.9 - '@babel/eslint-parser': 7.17.0_@babel+core@7.17.9+eslint@8.12.0 + '@babel/eslint-parser': 7.17.0_@babel+core@7.17.9+eslint@8.13.0 '@babel/preset-react': 7.16.7_@babel+core@7.17.9 '@commitlint/cli': 16.2.3 - '@typescript-eslint/eslint-plugin': 5.18.0_a07dca3bdfc4bfa60f4dda0c1f9e3287 - '@typescript-eslint/parser': 5.18.0_eslint@8.12.0+typescript@4.6.3 + '@typescript-eslint/eslint-plugin': 5.19.0_f34adc8488d2e4f014fe61432d70cbf2 + '@typescript-eslint/parser': 5.19.0_eslint@8.13.0+typescript@4.6.3 deepmerge: 4.2.2 - eslint: 8.12.0 - eslint-config-ali: 13.1.0_eslint@8.12.0 - eslint-plugin-import: 2.26.0_eslint@8.12.0 - eslint-plugin-jsx-a11y: 6.5.1_eslint@8.12.0 + eslint: 8.13.0 + eslint-config-ali: 13.1.0_eslint@8.13.0 + eslint-plugin-import: 2.26.0_eslint@8.13.0 + eslint-plugin-jsx-a11y: 6.5.1_eslint@8.13.0 eslint-plugin-jsx-plus: 0.1.0 eslint-plugin-rax-compile-time-miniapp: 1.0.0 - eslint-plugin-react: 7.29.4_eslint@8.12.0 - eslint-plugin-react-hooks: 4.4.0_eslint@8.12.0 - eslint-plugin-vue: 8.6.0_eslint@8.12.0 + eslint-plugin-react: 7.29.4_eslint@8.13.0 + eslint-plugin-react-hooks: 4.4.0_eslint@8.13.0 + eslint-plugin-vue: 8.6.0_eslint@8.13.0 postcss: 8.4.12 postcss-less: 6.0.0_postcss@8.4.12 postcss-scss: 4.0.3_postcss@8.4.12 @@ -348,7 +369,7 @@ packages: require-all: 3.0.0 stylelint: 14.6.1 stylelint-scss: 4.2.0_stylelint@14.6.1 - vue-eslint-parser: 8.3.0_eslint@8.12.0 + vue-eslint-parser: 8.3.0_eslint@8.13.0 transitivePeerDependencies: - husky - supports-color @@ -412,7 +433,7 @@ packages: - supports-color dev: true - /@babel/eslint-parser/7.17.0_@babel+core@7.17.9+eslint@8.12.0: + /@babel/eslint-parser/7.17.0_@babel+core@7.17.9+eslint@8.13.0: resolution: {integrity: sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: @@ -420,7 +441,7 @@ packages: eslint: ^7.5.0 || ^8.0.0 dependencies: '@babel/core': 7.17.9 - eslint: 8.12.0 + eslint: 8.13.0 eslint-scope: 5.1.1 eslint-visitor-keys: 2.1.0 semver: 6.3.0 @@ -678,8 +699,8 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@builder/pack/0.6.0: - resolution: {integrity: sha512-+NCcn8LOunJ8FC1awZHJTPKqK5LoI+LzX15wliU2O4aOnZGrHi2unSVfWDKOCOaUsDbboCpHhxUXdrALTFNPtw==} + /@builder/pack/0.6.1: + resolution: {integrity: sha512-Y/Ys5e3dzg+bijU0CzGfJ/8ITXEXVB2dIiHFm3aAB53C+yhIwn0VJsNJ7OY7/3X3LlncqbRvgTfD8/s//8FqUw==} dependencies: ansi-html: 0.0.7 ansi-html-community: 0.0.8 @@ -688,6 +709,7 @@ packages: error-stack-parser: 2.0.7 html-entities: 2.3.3 jest-worker: 27.0.6 + react-refresh: 0.10.0 workbox-background-sync: 6.4.2 workbox-broadcast-update: 6.4.2 workbox-cacheable-response: 6.4.2 @@ -759,7 +781,7 @@ packages: lodash: 4.17.21 resolve-from: 5.0.0 resolve-global: 1.0.0 - yargs: 17.4.0 + yargs: 17.4.1 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -820,10 +842,10 @@ packages: '@commitlint/execute-rule': 16.2.1 '@commitlint/resolve-extends': 16.2.1 '@commitlint/types': 16.2.1 - '@types/node': 17.0.23 + '@types/node': 17.0.24 chalk: 4.1.2 cosmiconfig: 7.0.1 - cosmiconfig-typescript-loader: 1.0.9_ee885bc7281b682b6adbed6ae09ee090 + cosmiconfig-typescript-loader: 1.0.9_17a82b5ac88a5de7094eac76b4edda13 lodash: 4.17.21 resolve-from: 5.0.0 typescript: 4.6.3 @@ -1024,7 +1046,7 @@ packages: react-refresh: 0.11.0 schema-utils: 3.1.1 source-map: 0.7.3 - webpack: 5.72.0_@swc+core@1.2.164 + webpack: 5.72.0_@swc+core@1.2.165 webpack-dev-server: 4.8.1_webpack@5.72.0 dev: false @@ -1032,16 +1054,16 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/pluginutils/4.2.0: - resolution: {integrity: sha512-2WUyJNRkyH5p487pGnn4tWAsxhEFKN/pT8CMgHshd5H+IXkOnKvKZwsz5ZWz+YCXkleZRAU5kwbfgF8CPfDRqA==} + /@rollup/pluginutils/4.2.1: + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} dependencies: estree-walker: 2.0.2 picomatch: 2.3.1 dev: false - /@swc/core-android-arm-eabi/1.2.164: - resolution: {integrity: sha512-TdVOB3SJEpcBr+AfWXtK/r8GWJjddLD2bVHZe5wcN+GOGFZpkDTvhT66neK3Z13IBOMWkc5HckjdZ+Rfj+n3Ew==} + /@swc/core-android-arm-eabi/1.2.165: + resolution: {integrity: sha512-DjX1/5qElHOnlrqhefcZsD1LEspJWDLpW31SKv9cNT2T13U76MkcrHi5ePI50NhG/bWDpHuWFWfuEmgcU+mwHA==} engines: {node: '>=10'} cpu: [arm] os: [android] @@ -1049,8 +1071,8 @@ packages: dev: false optional: true - /@swc/core-android-arm64/1.2.164: - resolution: {integrity: sha512-nAl9QFzA94ESL+UL+UvPywuEjHIADHBCurIVOHMg4XIrgNQwRlbi7RQDKtLyhsTSmZoGoP4bGt5dRnKEyiSzNg==} + /@swc/core-android-arm64/1.2.165: + resolution: {integrity: sha512-lPgG+td9/JlV3ZQiHZtdtqn+lZzGly+s/VQXfnaXgaHQE4JjWU2B4rhTVkVOQxEYbA/Cd9pszNWWxjJSrXytMA==} engines: {node: '>=10'} cpu: [arm64] os: [android] @@ -1058,8 +1080,8 @@ packages: dev: false optional: true - /@swc/core-darwin-arm64/1.2.164: - resolution: {integrity: sha512-OOsZybjAqcvsV/foB0K3RN6SEDJPb9UEJAYtKGeL1sae1vDq4JyuUhgWhGNmLJy4W1yeMCaDXLFSa9c/YN9pEg==} + /@swc/core-darwin-arm64/1.2.165: + resolution: {integrity: sha512-O6eFbCD4lZ4ZW2E1a4CsIo3zVTI5Tu2MpTbaVan7LvYyv2RK+tot9xjysVbOx/1nfgYDym9JLHU9gY/ayrdOtA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -1067,8 +1089,8 @@ packages: dev: false optional: true - /@swc/core-darwin-x64/1.2.164: - resolution: {integrity: sha512-nKh3qoM4V60NruuY+GZgVwS7aGOjRxovakT84L3ELVCoa1Z/1qnLy5Lq3b1wW+PICxCjapqFGQAu3TQ8IRUNEg==} + /@swc/core-darwin-x64/1.2.165: + resolution: {integrity: sha512-R1WRiDnkmXWBkyNGR09WDq+mCFIujhdUs3e4QiHJih1HY2rKGXU0SZKoqaBTjeVerk/IYXaEnZM3Bx7sb0oyEQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -1076,8 +1098,8 @@ packages: dev: false optional: true - /@swc/core-freebsd-x64/1.2.164: - resolution: {integrity: sha512-yawmWGxFmFHMXc40ojmN4yXNXdNBGiauf1ZgF8VQK1Zqn+hcUaSIpNGJ4V9cDX97QKMmTJSEoeUbPGR5cIqEzQ==} + /@swc/core-freebsd-x64/1.2.165: + resolution: {integrity: sha512-bL7Jxy2is/+YLZedQsF5a7swpbq9RGsvtXJmx5Bi0JqaavqWpbICmQtTr9I2S97taw16S/k8vOJ6DPzEvgJWWQ==} engines: {node: '>=10'} cpu: [x64] os: [freebsd] @@ -1085,8 +1107,8 @@ packages: dev: false optional: true - /@swc/core-linux-arm-gnueabihf/1.2.164: - resolution: {integrity: sha512-8U85zH0hIbgqFe/71ocDatvCLDzIv/GIIzcuuoTFsdPCDDUzxRjmyZqQfVdwqrbk/j4MiV+iSFnM86VQYs1fRQ==} + /@swc/core-linux-arm-gnueabihf/1.2.165: + resolution: {integrity: sha512-6m+X7a0iw5G97WfkJBKNy7/KfSEivRVRHbWB4VvJgRanNIO4tb//LxlUJFn58frQJg+H7bMFyOXhDJ/taRYAyg==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -1094,8 +1116,8 @@ packages: dev: false optional: true - /@swc/core-linux-arm64-gnu/1.2.164: - resolution: {integrity: sha512-NT3IuJGstGnAbBXxE2O2LrMlVUDUFVyybXoklNSL811Y1g6HPPbnGl+by1iEFyMHxSPnn5d6R5dvpvezMwBUDA==} + /@swc/core-linux-arm64-gnu/1.2.165: + resolution: {integrity: sha512-4roZScf8UZLhKTYBEqqbTNasZPqs3zDA2LF+SJuc4eFUGJyyrl9KgeVC08vTMtkAI47EebT15FgcQ+9LhtMlkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1103,8 +1125,8 @@ packages: dev: false optional: true - /@swc/core-linux-arm64-musl/1.2.164: - resolution: {integrity: sha512-L/he+XSa1oQ7V95kbjrcmef8fxTZFA6RMj9bbGk62Nj/kQFOyUpXKVvWD+kQkLxqPeN9s7OV6fCyBwRly2SpNQ==} + /@swc/core-linux-arm64-musl/1.2.165: + resolution: {integrity: sha512-xM5MDECEnptdsClSitld/f+azudbkeT8nNCkXCP+vFsurex9ISJ2DCWTvw7hgpkFElVv/qFEagDCucgESHcUzw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1112,8 +1134,8 @@ packages: dev: false optional: true - /@swc/core-linux-x64-gnu/1.2.164: - resolution: {integrity: sha512-FiNan0A3zkgpMqhWMUvJ1QmpJlpPwkQ4OhERgyos1ZiTnF8PuTcN4kUqV0Pc4mrX5bfSeHRbrYr4owa2PjHv8w==} + /@swc/core-linux-x64-gnu/1.2.165: + resolution: {integrity: sha512-MTEhtso3De+HP+qZKZw1DfPTbngn4ms3+7XG6jqUs6CKpmLTJkvnpPJ5swlXGvpKyDq367O2Aicft52Uoaoq+Q==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1121,8 +1143,8 @@ packages: dev: false optional: true - /@swc/core-linux-x64-musl/1.2.164: - resolution: {integrity: sha512-yN8GLowpJAlKFnxfVEOEwHIVK3wC587Hyo+MwYx8dDDaQS/n4GQ9XyHjbEDVyf2thGtr3C+2umozi19AgbIs5g==} + /@swc/core-linux-x64-musl/1.2.165: + resolution: {integrity: sha512-T2ZSApYoK4VTMTTqhUKcrNcv68ChoAOZDKUNfOik8zXcN1pMttus/VaqfZjxT2+orviRTD5Bkdsc3UvrhHqHnw==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1130,8 +1152,8 @@ packages: dev: false optional: true - /@swc/core-win32-arm64-msvc/1.2.164: - resolution: {integrity: sha512-Hdt+Q2kAPNjLfVj+xHbtjDNJjQNtktb3s+CrGhYkz9iW6w3qb7wO8i18yu6gUVH6HgVYuyDK56oRxOX7T7iP8w==} + /@swc/core-win32-arm64-msvc/1.2.165: + resolution: {integrity: sha512-Icg6dtQpQZKjAUG6kME4WuYpG6cqZjUzzmiZPQ9wWOw7wY8EYFPwC2ZjTg8KwbOJFkAKN6cjk3O2IAFsOWuUGg==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -1139,8 +1161,8 @@ packages: dev: false optional: true - /@swc/core-win32-ia32-msvc/1.2.164: - resolution: {integrity: sha512-+nNJMnFNQBUPoA3Zu/v9pBn1ZD13b0vHLrPhg6qDAkXCZJJYpr6jUvEcED4F/9sjQs3S+JrH47S6DtkuBn+TzQ==} + /@swc/core-win32-ia32-msvc/1.2.165: + resolution: {integrity: sha512-ldrTYG1zydyJP54YmYie3VMGcU7gCT2dZ7S1uZ1Tab+10GzZtdvePGGlQ/39jJVpr36/DZ34L6PsjwQkPG7AOw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -1148,8 +1170,8 @@ packages: dev: false optional: true - /@swc/core-win32-x64-msvc/1.2.164: - resolution: {integrity: sha512-qoE7VNS5Fo6BrmSCtVumrp0v86xoQtHIgCymymjF7C/DQ/lbVDdZ7kSREMnJD2OujKstsJmfiJiRdQcpEJKoAw==} + /@swc/core-win32-x64-msvc/1.2.165: + resolution: {integrity: sha512-gi2ZELsRLC3RfQFk+qwccL0VZ6ZgprMOP/phCVd8sA2MZsVVrFu6QBEJNGO0Z6hEqQ2BWrva6+cMF/eHSzuAsQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -1157,24 +1179,24 @@ packages: dev: false optional: true - /@swc/core/1.2.164: - resolution: {integrity: sha512-vw+jzMIVNzSK+lURMH3kANNRLPGROMvw3NpNm9vbtyjgKz9k/qf5ULCq96mayTPB5yXa9bWGBvzvhy6PtsKtqA==} + /@swc/core/1.2.165: + resolution: {integrity: sha512-+Z/FquMEUQLOOVWJY4B2QnHvcAIgBKKJMVtVQLVlIwfC4Ez8OvzGPTfL1W4ixYlUoIaTbAd1956kjBXalr4wEg==} engines: {node: '>=10'} hasBin: true optionalDependencies: - '@swc/core-android-arm-eabi': 1.2.164 - '@swc/core-android-arm64': 1.2.164 - '@swc/core-darwin-arm64': 1.2.164 - '@swc/core-darwin-x64': 1.2.164 - '@swc/core-freebsd-x64': 1.2.164 - '@swc/core-linux-arm-gnueabihf': 1.2.164 - '@swc/core-linux-arm64-gnu': 1.2.164 - '@swc/core-linux-arm64-musl': 1.2.164 - '@swc/core-linux-x64-gnu': 1.2.164 - '@swc/core-linux-x64-musl': 1.2.164 - '@swc/core-win32-arm64-msvc': 1.2.164 - '@swc/core-win32-ia32-msvc': 1.2.164 - '@swc/core-win32-x64-msvc': 1.2.164 + '@swc/core-android-arm-eabi': 1.2.165 + '@swc/core-android-arm64': 1.2.165 + '@swc/core-darwin-arm64': 1.2.165 + '@swc/core-darwin-x64': 1.2.165 + '@swc/core-freebsd-x64': 1.2.165 + '@swc/core-linux-arm-gnueabihf': 1.2.165 + '@swc/core-linux-arm64-gnu': 1.2.165 + '@swc/core-linux-arm64-musl': 1.2.165 + '@swc/core-linux-x64-gnu': 1.2.165 + '@swc/core-linux-x64-musl': 1.2.165 + '@swc/core-win32-arm64-msvc': 1.2.165 + '@swc/core-win32-ia32-msvc': 1.2.165 + '@swc/core-win32-x64-msvc': 1.2.165 dev: false /@tsconfig/node10/1.0.8: @@ -1197,33 +1219,33 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/bonjour/3.5.10: resolution: {integrity: sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/chai-subset/1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: - '@types/chai': 4.3.0 + '@types/chai': 4.3.1 dev: true - /@types/chai/4.3.0: - resolution: {integrity: sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==} + /@types/chai/4.3.1: + resolution: {integrity: sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==} dev: true /@types/connect-history-api-fallback/1.3.5: resolution: {integrity: sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==} dependencies: '@types/express-serve-static-core': 4.17.28 - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/ejs/3.1.0: resolution: {integrity: sha512-DCg+Ka+uDQ31lJ/UtEXVlaeV3d6t81gifaVWKJy4MYVVgvJttyX/viREy+If7fz+tK/gVxTGMtyrFPnm4gjrVA==} @@ -1247,7 +1269,7 @@ packages: /@types/express-serve-static-core/4.17.28: resolution: {integrity: sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 @@ -1262,20 +1284,20 @@ packages: /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 dev: true /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 17.0.23 + '@types/node': 17.0.24 dev: true /@types/http-proxy/1.17.8: resolution: {integrity: sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/istanbul-lib-coverage/2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} @@ -1319,8 +1341,8 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/17.0.23: - resolution: {integrity: sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==} + /@types/node/17.0.24: + resolution: {integrity: sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1360,7 +1382,7 @@ packages: /@types/sass/1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 dev: true /@types/scheduler/0.16.2: @@ -1380,34 +1402,34 @@ packages: resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} dependencies: '@types/mime': 1.3.2 - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/sockjs/0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 /@types/temp/0.9.1: resolution: {integrity: sha512-yDQ8Y+oQi9V7VkexwE6NBSVyNuyNFeGI275yWXASc2DjmxNicMi9O50KxDpNlST1kBbV9jKYBHGXhgNYFMPqtA==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 dev: true /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 - /@types/yauzl/2.9.2: - resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} + /@types/yauzl/2.10.0: + resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 dev: true optional: true - /@typescript-eslint/eslint-plugin/5.18.0_a07dca3bdfc4bfa60f4dda0c1f9e3287: - resolution: {integrity: sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==} + /@typescript-eslint/eslint-plugin/5.19.0_f34adc8488d2e4f014fe61432d70cbf2: + resolution: {integrity: sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1417,24 +1439,24 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.18.0_eslint@8.12.0+typescript@4.6.3 - '@typescript-eslint/scope-manager': 5.18.0 - '@typescript-eslint/type-utils': 5.18.0_eslint@8.12.0+typescript@4.6.3 - '@typescript-eslint/utils': 5.18.0_eslint@8.12.0+typescript@4.6.3 + '@typescript-eslint/parser': 5.19.0_eslint@8.13.0+typescript@4.6.3 + '@typescript-eslint/scope-manager': 5.19.0 + '@typescript-eslint/type-utils': 5.19.0_eslint@8.13.0+typescript@4.6.3 + '@typescript-eslint/utils': 5.19.0_eslint@8.13.0+typescript@4.6.3 debug: 4.3.4 - eslint: 8.12.0 + eslint: 8.13.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 - semver: 7.3.6 + semver: 7.3.7 tsutils: 3.21.0_typescript@4.6.3 typescript: 4.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.18.0_eslint@8.12.0+typescript@4.6.3: - resolution: {integrity: sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==} + /@typescript-eslint/parser/5.19.0_eslint@8.13.0+typescript@4.6.3: + resolution: {integrity: sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1443,26 +1465,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.18.0 - '@typescript-eslint/types': 5.18.0 - '@typescript-eslint/typescript-estree': 5.18.0_typescript@4.6.3 + '@typescript-eslint/scope-manager': 5.19.0 + '@typescript-eslint/types': 5.19.0 + '@typescript-eslint/typescript-estree': 5.19.0_typescript@4.6.3 debug: 4.3.4 - eslint: 8.12.0 + eslint: 8.13.0 typescript: 4.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.18.0: - resolution: {integrity: sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==} + /@typescript-eslint/scope-manager/5.19.0: + resolution: {integrity: sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.18.0 - '@typescript-eslint/visitor-keys': 5.18.0 + '@typescript-eslint/types': 5.19.0 + '@typescript-eslint/visitor-keys': 5.19.0 dev: true - /@typescript-eslint/type-utils/5.18.0_eslint@8.12.0+typescript@4.6.3: - resolution: {integrity: sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==} + /@typescript-eslint/type-utils/5.19.0_eslint@8.13.0+typescript@4.6.3: + resolution: {integrity: sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1471,22 +1493,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.18.0_eslint@8.12.0+typescript@4.6.3 + '@typescript-eslint/utils': 5.19.0_eslint@8.13.0+typescript@4.6.3 debug: 4.3.4 - eslint: 8.12.0 + eslint: 8.13.0 tsutils: 3.21.0_typescript@4.6.3 typescript: 4.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.18.0: - resolution: {integrity: sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==} + /@typescript-eslint/types/5.19.0: + resolution: {integrity: sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.18.0_typescript@4.6.3: - resolution: {integrity: sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==} + /@typescript-eslint/typescript-estree/5.19.0_typescript@4.6.3: + resolution: {integrity: sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1494,41 +1516,41 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.18.0 - '@typescript-eslint/visitor-keys': 5.18.0 + '@typescript-eslint/types': 5.19.0 + '@typescript-eslint/visitor-keys': 5.19.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.6 + semver: 7.3.7 tsutils: 3.21.0_typescript@4.6.3 typescript: 4.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.18.0_eslint@8.12.0+typescript@4.6.3: - resolution: {integrity: sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==} + /@typescript-eslint/utils/5.19.0_eslint@8.13.0+typescript@4.6.3: + resolution: {integrity: sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.18.0 - '@typescript-eslint/types': 5.18.0 - '@typescript-eslint/typescript-estree': 5.18.0_typescript@4.6.3 - eslint: 8.12.0 + '@typescript-eslint/scope-manager': 5.19.0 + '@typescript-eslint/types': 5.19.0 + '@typescript-eslint/typescript-estree': 5.19.0_typescript@4.6.3 + eslint: 8.13.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.12.0 + eslint-utils: 3.0.0_eslint@8.13.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.18.0: - resolution: {integrity: sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==} + /@typescript-eslint/visitor-keys/5.19.0: + resolution: {integrity: sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.18.0 + '@typescript-eslint/types': 5.19.0 eslint-visitor-keys: 3.3.0 dev: true @@ -1822,7 +1844,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 get-intrinsic: 1.1.1 is-string: 1.0.7 dev: true @@ -1832,22 +1854,24 @@ packages: engines: {node: '>=8'} dev: true - /array.prototype.flat/1.2.5: - resolution: {integrity: sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==} + /array.prototype.flat/1.3.0: + resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 + es-shim-unscopables: 1.0.0 dev: true - /array.prototype.flatmap/1.2.5: - resolution: {integrity: sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==} + /array.prototype.flatmap/1.3.0: + resolution: {integrity: sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 + es-shim-unscopables: 1.0.0 dev: true /arrify/1.0.1: @@ -1872,8 +1896,8 @@ packages: resolution: {integrity: sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=} dev: false - /async/2.6.3: - resolution: {integrity: sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==} + /async/2.6.4: + resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: lodash: 4.17.21 @@ -1970,10 +1994,10 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001325 - electron-to-chromium: 1.4.106 + caniuse-lite: 1.0.30001332 + electron-to-chromium: 1.4.107 escalade: 3.1.1 - node-releases: 2.0.2 + node-releases: 2.0.3 picocolors: 1.0.0 /buffer-crc32/0.2.13: @@ -1990,27 +2014,27 @@ packages: ieee754: 1.2.1 dev: true - /build-scripts/2.0.0-16: - resolution: {integrity: sha512-w6Z+yIwhDxCKqORg//mHO0F4o6uNVEhBo3EiAk9zR9T0hDLazRHVBSz1Tsf+GErvGVGp6g2iBt1tv7z/5tynzg==} + /build-scripts/2.0.0-17: + resolution: {integrity: sha512-UDyLApU4X1ZV+sB8DgHG1SBuWLtP9jaEdr7W7XHfInEf3Te5dSTVVIwqlqvtpwuKI1aPQIZK/Bmqk8vu6iHqNw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: camelcase: 5.3.1 commander: 2.20.3 consola: 2.15.3 deepmerge: 4.2.2 - esbuild: 0.14.34 + esbuild: 0.14.36 fast-glob: 3.2.11 fs-extra: 8.1.0 json5: 2.2.1 lodash: 4.17.21 npmlog: 4.1.2 picocolors: 1.0.0 - semver: 7.3.6 + semver: 7.3.7 /builtins/4.1.0: resolution: {integrity: sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==} dependencies: - semver: 7.3.6 + semver: 7.3.7 dev: true /bytes/3.0.0: @@ -2065,8 +2089,8 @@ packages: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} - /caniuse-lite/1.0.30001325: - resolution: {integrity: sha512-sB1bZHjseSjDtijV1Hb7PB2Zd58Kyx+n/9EotvZ4Qcz2K3d0lWB8dB4nb8wN/TsOGFq3UuAm0zQZNQ4SoR7TrQ==} + /caniuse-lite/1.0.30001332: + resolution: {integrity: sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==} /chai/4.3.6: resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} @@ -2309,16 +2333,16 @@ packages: /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - /cosmiconfig-typescript-loader/1.0.9_ee885bc7281b682b6adbed6ae09ee090: + /cosmiconfig-typescript-loader/1.0.9_17a82b5ac88a5de7094eac76b4edda13: resolution: {integrity: sha512-tRuMRhxN4m1Y8hP9SNYfz7jRwt8lZdWxdjg/ohg5esKmsndJIn4yT96oJVcf5x0eA11taXl+sIp+ielu529k6g==} engines: {node: '>=12', npm: '>=6'} peerDependencies: '@types/node': '*' typescript: '>=3' dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 cosmiconfig: 7.0.1 - ts-node: 10.7.0_ee885bc7281b682b6adbed6ae09ee090 + ts-node: 10.7.0_17a82b5ac88a5de7094eac76b4edda13 typescript: 4.6.3 transitivePeerDependencies: - '@swc/core' @@ -2561,8 +2585,8 @@ packages: jake: 10.8.4 dev: false - /electron-to-chromium/1.4.106: - resolution: {integrity: sha512-ZYfpVLULm67K7CaaGP7DmjyeMY4naxsbTy+syVVxT6QHI1Ww8XbJjmr9fDckrhq44WzCrcC5kH3zGpdusxwwqg==} + /electron-to-chromium/1.4.107: + resolution: {integrity: sha512-Huen6taaVrUrSy8o7mGStByba8PfOWWluHNxSHGBrCgEdFVLtvdQDBr9LBCF9Uci8SYxh28QNNMO0oC17wbGAg==} /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2587,8 +2611,8 @@ packages: once: 1.4.0 dev: true - /enhanced-resolve/5.9.2: - resolution: {integrity: sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==} + /enhanced-resolve/5.9.3: + resolution: {integrity: sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.10 @@ -2615,8 +2639,8 @@ packages: stackframe: 1.2.1 dev: false - /es-abstract/1.19.2: - resolution: {integrity: sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==} + /es-abstract/1.19.5: + resolution: {integrity: sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -2648,6 +2672,12 @@ packages: /es-module-lexer/0.9.3: resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} + /es-shim-unscopables/1.0.0: + resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + dependencies: + has: 1.0.3 + dev: true + /es-to-primitive/1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} @@ -2657,120 +2687,120 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild-android-64/0.14.34: - resolution: {integrity: sha512-XfxcfJqmMYsT/LXqrptzFxmaR3GWzXHDLdFNIhm6S00zPaQF1TBBWm+9t0RZ6LRR7iwH57DPjaOeW20vMqI4Yw==} + /esbuild-android-64/0.14.36: + resolution: {integrity: sha512-jwpBhF1jmo0tVCYC/ORzVN+hyVcNZUWuozGcLHfod0RJCedTDTvR4nwlTXdx1gtncDqjk33itjO+27OZHbiavw==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true optional: true - /esbuild-android-arm64/0.14.34: - resolution: {integrity: sha512-T02+NXTmSRL1Mc6puz+R9CB54rSPICkXKq6+tw8B6vxZFnCPzbJxgwIX4kcluz9p8nYBjF3+lSilTGWb7+Xgew==} + /esbuild-android-arm64/0.14.36: + resolution: {integrity: sha512-/hYkyFe7x7Yapmfv4X/tBmyKnggUmdQmlvZ8ZlBnV4+PjisrEhAvC3yWpURuD9XoB8Wa1d5dGkTsF53pIvpjsg==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true optional: true - /esbuild-darwin-64/0.14.34: - resolution: {integrity: sha512-pLRip2Bh4Ng7Bf6AMgCrSp3pPe/qZyf11h5Qo2mOfJqLWzSVjxrXW+CFRJfrOVP7TCnh/gmZSM2AFdCPB72vtw==} + /esbuild-darwin-64/0.14.36: + resolution: {integrity: sha512-kkl6qmV0dTpyIMKagluzYqlc1vO0ecgpviK/7jwPbRDEv5fejRTaBBEE2KxEQbTHcLhiiDbhG7d5UybZWo/1zQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /esbuild-darwin-arm64/0.14.34: - resolution: {integrity: sha512-vpidSJEBxx6lf1NWgXC+DCmGqesJuZ5Y8aQVVsaoO4i8tRXbXb0whChRvop/zd3nfNM4dIl5EXAky0knRX5I6w==} + /esbuild-darwin-arm64/0.14.36: + resolution: {integrity: sha512-q8fY4r2Sx6P0Pr3VUm//eFYKVk07C5MHcEinU1BjyFnuYz4IxR/03uBbDwluR6ILIHnZTE7AkTUWIdidRi1Jjw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /esbuild-freebsd-64/0.14.34: - resolution: {integrity: sha512-m0HBjePhe0hAQJgtMRMNV9kMgIyV4/qSnzPx42kRMQBcPhgjAq1JRu4Il26czC+9FgpMbFkUktb07f/Lwnc6CA==} + /esbuild-freebsd-64/0.14.36: + resolution: {integrity: sha512-Hn8AYuxXXRptybPqoMkga4HRFE7/XmhtlQjXFHoAIhKUPPMeJH35GYEUWGbjteai9FLFvBAjEAlwEtSGxnqWww==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true optional: true - /esbuild-freebsd-arm64/0.14.34: - resolution: {integrity: sha512-cpRc2B94L1KvMPPYB4D6G39jLqpKlD3noAMY4/e86iXXXkhUYJJEtTuyNFTa9JRpWM0xCAp4mxjHjoIiLuoCLA==} + /esbuild-freebsd-arm64/0.14.36: + resolution: {integrity: sha512-S3C0attylLLRiCcHiJd036eDEMOY32+h8P+jJ3kTcfhJANNjP0TNBNL30TZmEdOSx/820HJFgRrqpNAvTbjnDA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true optional: true - /esbuild-linux-32/0.14.34: - resolution: {integrity: sha512-8nQaEaoW7MH/K/RlozJa+lE1ejHIr8fuPIHhc513UebRav7HtXgQvxHQ6VZRUkWtep23M6dd7UqhwO1tMOfzQQ==} + /esbuild-linux-32/0.14.36: + resolution: {integrity: sha512-Eh9OkyTrEZn9WGO4xkI3OPPpUX7p/3QYvdG0lL4rfr73Ap2HAr6D9lP59VMF64Ex01LhHSXwIsFG/8AQjh6eNw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true optional: true - /esbuild-linux-64/0.14.34: - resolution: {integrity: sha512-Y3of4qQoLLlAgf042MlrY1P+7PnN9zWj8nVtw9XQG5hcLOZLz7IKpU35oeu7n4wvyaZHwvQqDJ93gRLqdJekcQ==} + /esbuild-linux-64/0.14.36: + resolution: {integrity: sha512-vFVFS5ve7PuwlfgoWNyRccGDi2QTNkQo/2k5U5ttVD0jRFaMlc8UQee708fOZA6zTCDy5RWsT5MJw3sl2X6KDg==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-arm/0.14.34: - resolution: {integrity: sha512-9lpq1NcJqssAF7alCO6zL3gvBVVt/lKw4oetUM7OgNnRX0OWpB+ZIO9FwCrSj/dMdmgDhPLf+119zB8QxSMmAg==} + /esbuild-linux-arm/0.14.36: + resolution: {integrity: sha512-NhgU4n+NCsYgt7Hy61PCquEz5aevI6VjQvxwBxtxrooXsxt5b2xtOUXYZe04JxqQo+XZk3d1gcr7pbV9MAQ/Lg==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /esbuild-linux-arm64/0.14.34: - resolution: {integrity: sha512-IlWaGtj9ir7+Nrume1DGcyzBDlK8GcnJq0ANKwcI9pVw8tqr+6GD0eqyF9SF1mR8UmAp+odrx1H5NdR2cHdFHA==} + /esbuild-linux-arm64/0.14.36: + resolution: {integrity: sha512-24Vq1M7FdpSmaTYuu1w0Hdhiqkbto1I5Pjyi+4Cdw5fJKGlwQuw+hWynTcRI/cOZxBcBpP21gND7W27gHAiftw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-mips64le/0.14.34: - resolution: {integrity: sha512-k3or+01Rska1AjUyNjA4buEwB51eyN/xPQAoOx1CjzAQC3l8rpjUDw55kXyL63O/1MUi4ISvtNtl8gLwdyEcxw==} + /esbuild-linux-mips64le/0.14.36: + resolution: {integrity: sha512-hZUeTXvppJN+5rEz2EjsOFM9F1bZt7/d2FUM1lmQo//rXh1RTFYzhC0txn7WV0/jCC7SvrGRaRz0NMsRPf8SIA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true optional: true - /esbuild-linux-ppc64le/0.14.34: - resolution: {integrity: sha512-+qxb8M9FfM2CJaVU7GgYpJOHM1ngQOx+/VrtBjb4C8oVqaPcESCeg2anjl+HRZy8VpYc71q/iBYausPPbJ+Keg==} + /esbuild-linux-ppc64le/0.14.36: + resolution: {integrity: sha512-1Bg3QgzZjO+QtPhP9VeIBhAduHEc2kzU43MzBnMwpLSZ890azr4/A9Dganun8nsqD/1TBcqhId0z4mFDO8FAvg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-riscv64/0.14.34: - resolution: {integrity: sha512-Y717ltBdQ5j5sZIHdy1DV9kieo0wMip0dCmVSTceowCPYSn1Cg33Kd6981+F/3b9FDMzNWldZFOBRILViENZSA==} + /esbuild-linux-riscv64/0.14.36: + resolution: {integrity: sha512-dOE5pt3cOdqEhaufDRzNCHf5BSwxgygVak9UR7PH7KPVHwSTDAZHDoEjblxLqjJYpc5XaU9+gKJ9F8mp9r5I4A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /esbuild-linux-s390x/0.14.34: - resolution: {integrity: sha512-bDDgYO4LhL4+zPs+WcBkXph+AQoPcQRTv18FzZS0WhjfH8TZx2QqlVPGhmhZ6WidrY+jKthUqO6UhGyIb4MpmA==} + /esbuild-linux-s390x/0.14.36: + resolution: {integrity: sha512-g4FMdh//BBGTfVHjF6MO7Cz8gqRoDPzXWxRvWkJoGroKA18G9m0wddvPbEqcQf5Tbt2vSc1CIgag7cXwTmoTXg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /esbuild-netbsd-64/0.14.34: - resolution: {integrity: sha512-cfaFGXdRt0+vHsjNPyF0POM4BVSHPSbhLPe8mppDc7GDDxjIl08mV1Zou14oDWMp/XZMjYN1kWYRSfftiD0vvQ==} + /esbuild-netbsd-64/0.14.36: + resolution: {integrity: sha512-UB2bVImxkWk4vjnP62ehFNZ73lQY1xcnL5ZNYF3x0AG+j8HgdkNF05v67YJdCIuUJpBuTyCK8LORCYo9onSW+A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2780,83 +2810,83 @@ packages: /esbuild-node-loader/0.6.5: resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==} dependencies: - esbuild: 0.14.34 + esbuild: 0.14.36 dev: true - /esbuild-openbsd-64/0.14.34: - resolution: {integrity: sha512-vmy9DxXVnRiI14s8GKuYBtess+EVcDALkbpTqd5jw4XITutIzyB7n4x0Tj5utAkKsgZJB22lLWGekr0ABnSLow==} + /esbuild-openbsd-64/0.14.36: + resolution: {integrity: sha512-NvGB2Chf8GxuleXRGk8e9zD3aSdRO5kLt9coTQbCg7WMGXeX471sBgh4kSg8pjx0yTXRt0MlrUDnjVYnetyivg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true optional: true - /esbuild-register/3.3.2_esbuild@0.14.34: + /esbuild-register/3.3.2_esbuild@0.14.36: resolution: {integrity: sha512-jceAtTO6zxPmCfSD5cBb3rgIK1vmuqCKYwgylHiS1BF4pq0jJiJb4K2QMuqF4BEw7XDBRatYzip0upyTzfkgsQ==} peerDependencies: esbuild: '>=0.12 <1' dependencies: - esbuild: 0.14.34 + esbuild: 0.14.36 dev: true - /esbuild-sunos-64/0.14.34: - resolution: {integrity: sha512-eNPVatNET1F7tRMhii7goL/eptfxc0ALRjrj9SPFNqp0zmxrehBFD6BaP3R4LjMn6DbMO0jOAnTLFKr8NqcJAA==} + /esbuild-sunos-64/0.14.36: + resolution: {integrity: sha512-VkUZS5ftTSjhRjuRLp+v78auMO3PZBXu6xl4ajomGenEm2/rGuWlhFSjB7YbBNErOchj51Jb2OK8lKAo8qdmsQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true optional: true - /esbuild-windows-32/0.14.34: - resolution: {integrity: sha512-EFhpXyHEcnqWYe2rAHFd8dRw8wkrd9U+9oqcyoEL84GbanAYjiiIjBZsnR8kl0sCQ5w6bLpk7vCEIA2VS32Vcg==} + /esbuild-windows-32/0.14.36: + resolution: {integrity: sha512-bIar+A6hdytJjZrDxfMBUSEHHLfx3ynoEZXx/39nxy86pX/w249WZm8Bm0dtOAByAf4Z6qV0LsnTIJHiIqbw0w==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /esbuild-windows-64/0.14.34: - resolution: {integrity: sha512-a8fbl8Ky7PxNEjf1aJmtxdDZj32/hC7S1OcA2ckEpCJRTjiKslI9vAdPpSjrKIWhws4Galpaawy0nB7fjHYf5Q==} + /esbuild-windows-64/0.14.36: + resolution: {integrity: sha512-+p4MuRZekVChAeueT1Y9LGkxrT5x7YYJxYE8ZOTcEfeUUN43vktSn6hUNsvxzzATrSgq5QqRdllkVBxWZg7KqQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true optional: true - /esbuild-windows-arm64/0.14.34: - resolution: {integrity: sha512-EYvmKbSa2B3sPnpC28UEu9jBK5atGV4BaVRE7CYGUci2Hlz4AvtV/LML+TcDMT6gBgibnN2gcltWclab3UutMg==} + /esbuild-windows-arm64/0.14.36: + resolution: {integrity: sha512-fBB4WlDqV1m18EF/aheGYQkQZHfPHiHJSBYzXIo8yKehek+0BtBwo/4PNwKGJ5T0YK0oc8pBKjgwPbzSrPLb+Q==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /esbuild/0.14.34: - resolution: {integrity: sha512-QIWdPT/gFF6hCaf4m7kP0cJ+JIuFkdHibI7vVFvu3eJS1HpVmYHWDulyN5WXwbRA0SX/7ZDaJ/1DH8SdY9xOJg==} + /esbuild/0.14.36: + resolution: {integrity: sha512-HhFHPiRXGYOCRlrhpiVDYKcFJRdO0sBElZ668M4lh2ER0YgnkLxECuFe7uWCf23FrcLc59Pqr7dHkTqmRPDHmw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-64: 0.14.34 - esbuild-android-arm64: 0.14.34 - esbuild-darwin-64: 0.14.34 - esbuild-darwin-arm64: 0.14.34 - esbuild-freebsd-64: 0.14.34 - esbuild-freebsd-arm64: 0.14.34 - esbuild-linux-32: 0.14.34 - esbuild-linux-64: 0.14.34 - esbuild-linux-arm: 0.14.34 - esbuild-linux-arm64: 0.14.34 - esbuild-linux-mips64le: 0.14.34 - esbuild-linux-ppc64le: 0.14.34 - esbuild-linux-riscv64: 0.14.34 - esbuild-linux-s390x: 0.14.34 - esbuild-netbsd-64: 0.14.34 - esbuild-openbsd-64: 0.14.34 - esbuild-sunos-64: 0.14.34 - esbuild-windows-32: 0.14.34 - esbuild-windows-64: 0.14.34 - esbuild-windows-arm64: 0.14.34 + esbuild-android-64: 0.14.36 + esbuild-android-arm64: 0.14.36 + esbuild-darwin-64: 0.14.36 + esbuild-darwin-arm64: 0.14.36 + esbuild-freebsd-64: 0.14.36 + esbuild-freebsd-arm64: 0.14.36 + esbuild-linux-32: 0.14.36 + esbuild-linux-64: 0.14.36 + esbuild-linux-arm: 0.14.36 + esbuild-linux-arm64: 0.14.36 + esbuild-linux-mips64le: 0.14.36 + esbuild-linux-ppc64le: 0.14.36 + esbuild-linux-riscv64: 0.14.36 + esbuild-linux-s390x: 0.14.36 + esbuild-netbsd-64: 0.14.36 + esbuild-openbsd-64: 0.14.36 + esbuild-sunos-64: 0.14.36 + esbuild-windows-32: 0.14.36 + esbuild-windows-64: 0.14.36 + esbuild-windows-arm64: 0.14.36 /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -2875,12 +2905,12 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-ali/13.1.0_eslint@8.12.0: + /eslint-config-ali/13.1.0_eslint@8.13.0: resolution: {integrity: sha512-ZjWrpiKADEmNhtfB64iVN3ejlDS5sS9OZx9+jN3mF+oqaroWqrTPvqQvY472M4ykL0JgT+AqsZdG+kWDqUw/6g==} peerDependencies: eslint: '>=6.8.0' dependencies: - eslint: 8.12.0 + eslint: 8.13.0 dev: true /eslint-import-resolver-node/0.3.6: @@ -2898,17 +2928,17 @@ packages: find-up: 2.1.0 dev: true - /eslint-plugin-import/2.26.0_eslint@8.12.0: + /eslint-plugin-import/2.26.0_eslint@8.13.0: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 dependencies: array-includes: 3.1.4 - array.prototype.flat: 1.2.5 + array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.12.0 + eslint: 8.13.0 eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.3 has: 1.0.3 @@ -2920,7 +2950,7 @@ packages: tsconfig-paths: 3.14.1 dev: true - /eslint-plugin-jsx-a11y/6.5.1_eslint@8.12.0: + /eslint-plugin-jsx-a11y/6.5.1_eslint@8.13.0: resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} engines: {node: '>=4.0'} peerDependencies: @@ -2934,7 +2964,7 @@ packages: axobject-query: 2.2.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.12.0 + eslint: 8.13.0 has: 1.0.3 jsx-ast-utils: 3.2.2 language-tags: 1.0.5 @@ -2956,25 +2986,25 @@ packages: requireindex: 1.1.0 dev: true - /eslint-plugin-react-hooks/4.4.0_eslint@8.12.0: + /eslint-plugin-react-hooks/4.4.0_eslint@8.13.0: resolution: {integrity: sha512-U3RVIfdzJaeKDQKEJbz5p3NW8/L80PCATJAfuojwbaEL+gBjfGdhUcGde+WGUW46Q5sr/NgxevsIiDtNXrvZaQ==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.12.0 + eslint: 8.13.0 dev: true - /eslint-plugin-react/7.29.4_eslint@8.12.0: + /eslint-plugin-react/7.29.4_eslint@8.13.0: resolution: {integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: array-includes: 3.1.4 - array.prototype.flatmap: 1.2.5 + array.prototype.flatmap: 1.3.0 doctrine: 2.1.0 - eslint: 8.12.0 + eslint: 8.13.0 estraverse: 5.3.0 jsx-ast-utils: 3.2.2 minimatch: 3.1.2 @@ -2988,17 +3018,17 @@ packages: string.prototype.matchall: 4.0.7 dev: true - /eslint-plugin-vue/8.6.0_eslint@8.12.0: + /eslint-plugin-vue/8.6.0_eslint@8.13.0: resolution: {integrity: sha512-abXiF2J18n/7ZPy9foSlJyouKf54IqpKlNvNmzhM93N0zs3QUxZG/oBd3tVPOJTKg7SlhBUtPxugpqzNbgGpQQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.12.0 - eslint-utils: 3.0.0_eslint@8.12.0 + eslint: 8.13.0 + eslint-utils: 3.0.0_eslint@8.13.0 natural-compare: 1.4.0 - semver: 7.3.6 - vue-eslint-parser: 8.3.0_eslint@8.12.0 + semver: 7.3.7 + vue-eslint-parser: 8.3.0_eslint@8.13.0 transitivePeerDependencies: - supports-color dev: true @@ -3018,13 +3048,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.12.0: + /eslint-utils/3.0.0_eslint@8.13.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.12.0 + eslint: 8.13.0 eslint-visitor-keys: 2.1.0 dev: true @@ -3038,8 +3068,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.12.0: - resolution: {integrity: sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==} + /eslint/8.13.0: + resolution: {integrity: sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -3052,7 +3082,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.12.0 + eslint-utils: 3.0.0_eslint@8.13.0 eslint-visitor-keys: 3.3.0 espree: 9.3.1 esquery: 1.4.0 @@ -3087,9 +3117,9 @@ packages: hasBin: true dependencies: cross-spawn: 7.0.3 - esbuild: 0.14.34 + esbuild: 0.14.36 esbuild-node-loader: 0.6.5 - esbuild-register: 3.3.2_esbuild@0.14.34 + esbuild-register: 3.3.2_esbuild@0.14.36 import-meta-resolve: 1.1.1 dev: true @@ -3231,7 +3261,7 @@ packages: get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - '@types/yauzl': 2.9.2 + '@types/yauzl': 2.10.0 transitivePeerDependencies: - supports-color dev: true @@ -3788,7 +3818,7 @@ packages: axios: 0.23.0 fs-extra: 10.0.1 mkdirp: 1.0.4 - semver: 7.3.6 + semver: 7.3.7 tar: 6.1.11 url-join: 4.0.1 transitivePeerDependencies: @@ -4131,7 +4161,7 @@ packages: resolution: {integrity: sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 merge-stream: 2.0.0 supports-color: 8.1.1 dev: false @@ -4140,7 +4170,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 17.0.23 + '@types/node': 17.0.24 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -4275,8 +4305,8 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /loader-runner/4.2.0: - resolution: {integrity: sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==} + /loader-runner/4.3.0: + resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} /loader-utils/2.0.2: @@ -4359,10 +4389,6 @@ packages: dependencies: yallist: 4.0.0 - /lru-cache/7.8.0: - resolution: {integrity: sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg==} - engines: {node: '>=12'} - /magic-string/0.26.1: resolution: {integrity: sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==} engines: {node: '>=12'} @@ -4631,8 +4657,8 @@ packages: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} - /node-releases/2.0.2: - resolution: {integrity: sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==} + /node-releases/2.0.3: + resolution: {integrity: sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw==} /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -4649,7 +4675,7 @@ packages: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.8.1 - semver: 7.3.6 + semver: 7.3.7 validate-npm-package-license: 3.0.4 dev: true @@ -4719,7 +4745,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 dev: true /object.fromentries/2.0.5: @@ -4728,14 +4754,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 dev: true /object.hasown/1.1.0: resolution: {integrity: sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==} dependencies: define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 dev: true /object.values/1.1.5: @@ -4744,7 +4770,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 dev: true /obuf/1.1.2: @@ -4966,7 +4992,7 @@ packages: resolution: {integrity: sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==} engines: {node: '>= 0.12.0'} dependencies: - async: 2.6.3 + async: 2.6.4 debug: 3.2.7 mkdirp: 0.5.6 @@ -5230,6 +5256,11 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true + /react-refresh/0.10.0: + resolution: {integrity: sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==} + engines: {node: '>=0.10.0'} + dev: false + /react-refresh/0.11.0: resolution: {integrity: sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==} engines: {node: '>=0.10.0'} @@ -5333,8 +5364,8 @@ packages: /regenerator-runtime/0.13.9: resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} - /regexp.prototype.flags/1.4.1: - resolution: {integrity: sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==} + /regexp.prototype.flags/1.4.2: + resolution: {integrity: sha512-Ynz8fTQW5/1elh+jWU2EDDzeoNbD0OQ0R+D1VJU5ATOkUaro4A9YEkdN2ODQl/8UQFPPpZNw91fOcLFamM7Pww==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -5511,13 +5542,14 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 + dev: true - /semver/7.3.6: - resolution: {integrity: sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==} - engines: {node: ^10.0.0 || ^12.0.0 || ^14.0.0 || >=16.0.0} + /semver/7.3.7: + resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + engines: {node: '>=10'} hasBin: true dependencies: - lru-cache: 7.8.0 + lru-cache: 6.0.0 /send/0.17.2: resolution: {integrity: sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==} @@ -5757,11 +5789,11 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - es-abstract: 1.19.2 + es-abstract: 1.19.5 get-intrinsic: 1.1.1 has-symbols: 1.0.3 internal-slot: 1.0.3 - regexp.prototype.flags: 1.4.1 + regexp.prototype.flags: 1.4.2 side-channel: 1.0.4 dev: true @@ -5986,7 +6018,7 @@ packages: rimraf: 2.6.3 dev: false - /terser-webpack-plugin/5.3.1_@swc+core@1.2.164+webpack@5.72.0: + /terser-webpack-plugin/5.3.1_@swc+core@1.2.165+webpack@5.72.0: resolution: {integrity: sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -6002,16 +6034,16 @@ packages: uglify-js: optional: true dependencies: - '@swc/core': 1.2.164 + '@swc/core': 1.2.165 jest-worker: 27.5.1 schema-utils: 3.1.1 serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.12.1 - webpack: 5.72.0_@swc+core@1.2.164 + webpack: 5.72.0_@swc+core@1.2.165 dev: true - /terser-webpack-plugin/5.3.1_esbuild@0.14.34+webpack@5.72.0: + /terser-webpack-plugin/5.3.1_esbuild@0.14.36+webpack@5.72.0: resolution: {integrity: sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -6027,13 +6059,13 @@ packages: uglify-js: optional: true dependencies: - esbuild: 0.14.34 + esbuild: 0.14.36 jest-worker: 27.5.1 schema-utils: 3.1.1 serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.12.1 - webpack: 5.72.0_esbuild@0.14.34 + webpack: 5.72.0_esbuild@0.14.36 /terser/5.12.1: resolution: {integrity: sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==} @@ -6115,7 +6147,7 @@ packages: engines: {node: '>=8'} dev: true - /ts-node/10.7.0_ee885bc7281b682b6adbed6ae09ee090: + /ts-node/10.7.0_17a82b5ac88a5de7094eac76b4edda13: resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} hasBin: true peerDependencies: @@ -6134,7 +6166,7 @@ packages: '@tsconfig/node12': 1.0.9 '@tsconfig/node14': 1.0.1 '@tsconfig/node16': 1.0.2 - '@types/node': 17.0.23 + '@types/node': 17.0.24 acorn: 8.7.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -6251,7 +6283,7 @@ packages: resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=} engines: {node: '>= 0.8'} - /unplugin/0.3.3_esbuild@0.14.34+webpack@5.72.0: + /unplugin/0.3.3_esbuild@0.14.36+webpack@5.72.0: resolution: {integrity: sha512-WjZWpUqqcYPQ/efR00Zm2m1+J1LitwoZ4uhHV4VdZ+IpW0Nh/qnDYtVf+nLhozXdGxslMPecOshVR7NiWFl4gA==} peerDependencies: esbuild: '>=0.13' @@ -6268,8 +6300,8 @@ packages: webpack: optional: true dependencies: - esbuild: 0.14.34 - webpack: 5.72.0_esbuild@0.14.34 + esbuild: 0.14.36 + webpack: 5.72.0_esbuild@0.14.36 webpack-virtual-modules: 0.4.3 dev: true @@ -6290,7 +6322,7 @@ packages: webpack: optional: true dependencies: - webpack: 5.72.0_@swc+core@1.2.164 + webpack: 5.72.0_@swc+core@1.2.165 webpack-virtual-modules: 0.4.3 dev: false @@ -6342,8 +6374,8 @@ packages: resolution: {integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=} engines: {node: '>= 0.8'} - /vite/2.9.1: - resolution: {integrity: sha512-vSlsSdOYGcYEJfkQ/NeLXgnRv5zZfpAsdztkIrs7AZHV8RCMZQkwjo4DS5BnrYTqoWqLoUe1Cah4aVO4oNNqCQ==} + /vite/2.9.4: + resolution: {integrity: sha512-7pO6ruZMsyTpaPB7kGtW+yj15Ze5g+E4w4Ramk1sAJLIuI4uPd5sauqubmZNpq0Yc1vLVxoXRf2Uj+qWxk5aXw==} engines: {node: '>=12.2.0'} hasBin: true peerDependencies: @@ -6358,7 +6390,7 @@ packages: stylus: optional: true dependencies: - esbuild: 0.14.34 + esbuild: 0.14.36 postcss: 8.4.12 resolve: 1.22.0 rollup: 2.70.1 @@ -6366,8 +6398,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.8.5_c8@7.11.0: - resolution: {integrity: sha512-UOBAfyLUn9++isUDC5vk8joLcaBZj7esLS2Yx3GZSRMWzayOfEEzU1Iv4SBb4HkJun9e1D5ifZoSclhNHKn7IA==} + /vitest/0.9.3_c8@7.11.0: + resolution: {integrity: sha512-hKjqdBI732cV5giNLERyAsaJBebstrX5mvTbZr+jUDYUHnX1O4DpAJcHtqBOutuBi7lVIGQ5IF8eWvHHqbCHBA==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -6385,34 +6417,34 @@ packages: jsdom: optional: true dependencies: - '@types/chai': 4.3.0 + '@types/chai': 4.3.1 '@types/chai-subset': 1.3.3 c8: 7.11.0 chai: 4.3.6 local-pkg: 0.4.1 tinypool: 0.1.2 tinyspy: 0.3.2 - vite: 2.9.1 + vite: 2.9.4 transitivePeerDependencies: - less - sass - stylus dev: true - /vue-eslint-parser/8.3.0_eslint@8.12.0: + /vue-eslint-parser/8.3.0_eslint@8.13.0: resolution: {integrity: sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.12.0 + eslint: 8.13.0 eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.3.1 esquery: 1.4.0 lodash: 4.17.21 - semver: 7.3.6 + semver: 7.3.7 transitivePeerDependencies: - supports-color dev: true @@ -6463,7 +6495,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.0 - webpack: 5.72.0_esbuild@0.14.34 + webpack: 5.72.0_esbuild@0.14.36 /webpack-dev-server/4.8.1_webpack@5.72.0: resolution: {integrity: sha512-dwld70gkgNJa33czmcj/PlKY/nOy/BimbrgZRaR9vDATBQAYgLzggR0nxDtPLJiLrMgZwbE6RRfJ5vnBBasTyg==} @@ -6503,7 +6535,7 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.72.0_esbuild@0.14.34 + webpack: 5.72.0_esbuild@0.14.36 webpack-dev-middleware: 5.3.1_webpack@5.72.0 ws: 8.5.0 transitivePeerDependencies: @@ -6519,7 +6551,7 @@ packages: /webpack-virtual-modules/0.4.3: resolution: {integrity: sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==} - /webpack/5.72.0_@swc+core@1.2.164: + /webpack/5.72.0_@swc+core@1.2.165: resolution: {integrity: sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==} engines: {node: '>=10.13.0'} hasBin: true @@ -6538,19 +6570,19 @@ packages: acorn-import-assertions: 1.8.0_acorn@8.7.0 browserslist: 4.20.2 chrome-trace-event: 1.0.3 - enhanced-resolve: 5.9.2 + enhanced-resolve: 5.9.3 es-module-lexer: 0.9.3 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 graceful-fs: 4.2.10 json-parse-better-errors: 1.0.2 - loader-runner: 4.2.0 + loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.1_@swc+core@1.2.164+webpack@5.72.0 + terser-webpack-plugin: 5.3.1_@swc+core@1.2.165+webpack@5.72.0 watchpack: 2.3.1 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -6559,7 +6591,7 @@ packages: - uglify-js dev: true - /webpack/5.72.0_esbuild@0.14.34: + /webpack/5.72.0_esbuild@0.14.36: resolution: {integrity: sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==} engines: {node: '>=10.13.0'} hasBin: true @@ -6578,19 +6610,19 @@ packages: acorn-import-assertions: 1.8.0_acorn@8.7.0 browserslist: 4.20.2 chrome-trace-event: 1.0.3 - enhanced-resolve: 5.9.2 + enhanced-resolve: 5.9.3 es-module-lexer: 0.9.3 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 graceful-fs: 4.2.10 json-parse-better-errors: 1.0.2 - loader-runner: 4.2.0 + loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 - terser-webpack-plugin: 5.3.1_esbuild@0.14.34+webpack@5.72.0 + terser-webpack-plugin: 5.3.1_esbuild@0.14.36+webpack@5.72.0 watchpack: 2.3.1 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -6793,8 +6825,8 @@ packages: yargs-parser: 20.2.9 dev: true - /yargs/17.4.0: - resolution: {integrity: sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA==} + /yargs/17.4.1: + resolution: {integrity: sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==} engines: {node: '>=12'} dependencies: cliui: 7.0.4 diff --git a/tests/integration/basic-project.test.ts b/tests/integration/basic-project.test.ts index da76d7a4a..50862c5d2 100644 --- a/tests/integration/basic-project.test.ts +++ b/tests/integration/basic-project.test.ts @@ -16,7 +16,6 @@ describe(`build ${example}`, () => { test('open /', async () => { await buildFixture(example); - const res = await setupBrowser({ example }); page = res.page; browser = res.browser; diff --git a/tests/integration/routes-generate.test.ts b/tests/integration/routes-generate.test.ts new file mode 100644 index 000000000..07880a910 --- /dev/null +++ b/tests/integration/routes-generate.test.ts @@ -0,0 +1,107 @@ +import { expect, test, describe, afterAll } from 'vitest'; +import { buildFixture, setupBrowser } from '../utils/build'; +import { startFixture, setupStartBrowser } from '../utils/start'; +import { Page } from '../utils/browser'; + +const example = 'routes-generate'; + +describe(`build ${example}`, () => { + let page: Page = null; + let browser = null; + + test('open /', async () => { + await buildFixture(example); + const res = await setupBrowser({ example }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Home']); + }, 120000); + + test('define extra routes', async () => { + let res = await setupBrowser({ example, defaultHtml: 'about-me.html' }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual([]); + expect(await page.$$text('h2')).toStrictEqual(['About']); + + res = await setupBrowser({ example, defaultHtml: 'product.html' }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Products Page']); + }); + + test('page layout', async () => { + let res = await setupBrowser({ example, defaultHtml: 'dashboard/a.html' }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Dashboard']); + expect(await page.$$text('h3')).toStrictEqual(['A page']); + + res = await setupBrowser({ example, defaultHtml: 'dashboard/b.html' }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Dashboard']); + expect(await page.$$text('h3')).toStrictEqual(['B page']); + }); + + // TODO: dynamic-routes test + test.todo('dynamic routes', async () => {}); + + afterAll(async () => { + await browser.close(); + }); +}); + +describe(`start ${example}`, () => { + let page: Page = null; + let browser = null; + + test('setup devServer', async () => { + const { devServer, port } = await startFixture(example); + const res = await setupStartBrowser({ server: devServer, port }); + page = res.page; + browser = res.browser; + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Home']); + }, 120000); + + test('define extra routes', async () => { + await page.push('about-me'); + expect(await page.$$text('h1')).toStrictEqual([]); + expect(await page.$$text('h2')).toStrictEqual(['About']); + + await page.push('product'); + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Products Page']); + }); + + test('page layout', async () => { + await page.push('dashboard/a'); + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Dashboard']); + expect(await page.$$text('h3')).toStrictEqual(['A page']); + + await page.push('dashboard/b'); + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Dashboard']); + expect(await page.$$text('h3')).toStrictEqual(['B page']); + }); + + test('dynamic routes layout', async () => { + await page.push('detail/a'); + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Detail id: a']); + + await page.push('detail/b'); + expect(await page.$$text('h1')).toStrictEqual(['Layout']); + expect(await page.$$text('h2')).toStrictEqual(['Detail id: b']); + }); + + afterAll(async () => { + await browser.close(); + }); +}); diff --git a/vitest.config.ts b/vitest.config.ts index deed728c6..c39bd1311 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -11,7 +11,8 @@ export default defineConfig({ alias: { ...moduleNameMapper }, }, test: { - // disable threads to avoid `Segmentation fault (core dumped)` error: https://github.com/vitest-dev/vitest/issues/317 + // To avoid error `Segmentation fault (core dumped)` in CI environment, disable threads + // ref: https://github.com/vitest-dev/vitest/issues/317 threads: false, exclude: [ '**/node_modules/**', @@ -19,4 +20,4 @@ export default defineConfig({ '**/tests/fixtures/**', ], }, -}); \ No newline at end of file +});