From 0c85ec275124a2fe795213a8a9c88c4ca4109dd5 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Tue, 17 Oct 2023 14:21:40 +0800 Subject: [PATCH 01/19] chore: bundle client imports --- .../with-rsc/src/components/index.module.css | 31 ---- examples/with-rsc/src/pages/about.module.css | 30 ++++ examples/with-rsc/src/pages/about.tsx | 10 +- examples/with-rsc/src/pages/index.module.css | 17 +- .../src/bundler/webpack/getWebpackConfig.ts | 12 ++ packages/ice/src/plugins/web/index.ts | 6 +- .../src/webpack/FlightClientEntryLoader.ts | 27 ++++ .../src/webpack/FlightClientEntryPlugin.ts | 153 ++++++++++++++++++ packages/runtime/src/routesConfig.ts | 2 +- packages/runtime/src/runRSCServerApp.tsx | 9 +- 10 files changed, 239 insertions(+), 58 deletions(-) create mode 100644 examples/with-rsc/src/pages/about.module.css create mode 100644 packages/ice/src/webpack/FlightClientEntryLoader.ts create mode 100644 packages/ice/src/webpack/FlightClientEntryPlugin.ts diff --git a/examples/with-rsc/src/components/index.module.css b/examples/with-rsc/src/components/index.module.css index d11aa6a0b6..75eea836a4 100644 --- a/examples/with-rsc/src/components/index.module.css +++ b/examples/with-rsc/src/components/index.module.css @@ -1,34 +1,3 @@ -.app { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 100vh; -} - -.app > header { - display: flex; - flex-direction: column; - align-items: center; -} - -.app > header > img { - width: 120px; -} - -.app > header > p { - margin: 20px 0; - text-align: center; - font-size: 2.6rem; -} - -.app > main { - display: flex; - flex-direction: column; - margin: 20px 0 10px; - font-size: 0.9rem; -} - .link { font-size: 1.2rem; color: var(--primary); diff --git a/examples/with-rsc/src/pages/about.module.css b/examples/with-rsc/src/pages/about.module.css new file mode 100644 index 0000000000..18968098e0 --- /dev/null +++ b/examples/with-rsc/src/pages/about.module.css @@ -0,0 +1,30 @@ +.about { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; +} + +.about > header { + display: flex; + flex-direction: column; + align-items: center; +} + +.about > header > img { + width: 120px; +} + +.about > header > p { + margin: 20px 0; + text-align: center; + font-size: 2.6rem; +} + +.about > main { + display: flex; + flex-direction: column; + margin: 20px 0 10px; + font-size: 0.9rem; +} \ No newline at end of file diff --git a/examples/with-rsc/src/pages/about.tsx b/examples/with-rsc/src/pages/about.tsx index b9a1859c37..b627f1edf3 100644 --- a/examples/with-rsc/src/pages/about.tsx +++ b/examples/with-rsc/src/pages/about.tsx @@ -1,6 +1,6 @@ import { useAppContext } from 'ice'; -import styles from './index.module.css'; -import RefreshButton from '@/components/RefreshButton.client'; +import styles from './about.module.css'; +// import RefreshButton from '@/components/RefreshButton.client'; import Counter from '@/components/Counter.client'; if (!global.requestCount) { @@ -14,13 +14,13 @@ export default function Home() { console.log(appContext); return ( -
+

About Page

server request count: { global.requestCount++ }
- + {/* Refresh Button - + */}
); } diff --git a/examples/with-rsc/src/pages/index.module.css b/examples/with-rsc/src/pages/index.module.css index d11aa6a0b6..67e8c355ea 100644 --- a/examples/with-rsc/src/pages/index.module.css +++ b/examples/with-rsc/src/pages/index.module.css @@ -27,19 +27,4 @@ flex-direction: column; margin: 20px 0 10px; font-size: 0.9rem; -} - -.link { - font-size: 1.2rem; - color: var(--primary); -} - -.button { - outline: none; - border: none; - border-radius: 8px; - padding: 10px 35px; - background: var(--primary); - box-shadow: 0 5px 10px 0 #ddd; - font-size: calc(10px + 2vmin); -} +} \ No newline at end of file diff --git a/packages/ice/src/bundler/webpack/getWebpackConfig.ts b/packages/ice/src/bundler/webpack/getWebpackConfig.ts index c0e7843198..3c8617263c 100644 --- a/packages/ice/src/bundler/webpack/getWebpackConfig.ts +++ b/packages/ice/src/bundler/webpack/getWebpackConfig.ts @@ -1,8 +1,11 @@ +import * as path from 'path'; +import { fileURLToPath } from 'url'; import webpack from '@ice/bundles/compiled/webpack/index.js'; import lodash from '@ice/bundles/compiled/lodash/index.js'; import { getWebpackConfig as getDefaultWebpackConfig } from '@ice/webpack-config'; import type { Configuration } from 'webpack'; import { FlightManifestPlugin } from '../../webpack/FlightManifestPlugin.js'; +import { FlightClientEntryPlugin } from '../../webpack/FlightClientEntryPlugin.js'; import { getExpandedEnvs } from '../../utils/runtimeEnv.js'; import { getRouteExportConfig } from '../../service/config.js'; import { getFileHash } from '../../utils/hash.js'; @@ -14,6 +17,8 @@ import type ServerRunnerPlugin from '../../webpack/ServerRunnerPlugin.js'; import type ServerCompilerPlugin from '../../webpack/ServerCompilerPlugin.js'; import type { BundlerOptions, Context } from '../types.js'; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const { debounce } = lodash; type GetWebpackConfig = ( @@ -118,6 +123,13 @@ const getWebpackConfig: GetWebpackConfig = async (context, options) => { // Add spinner for webpack task. webpackConfig.plugins.push(getSpinnerPlugin(spinner)); if (userConfig.rsc) { + webpackConfig.resolveLoader = { + alias: { + 'flight-client-entry-loader': path.join(__dirname, '../../webpack/FlightClientEntryLoader.js'), + }, + }; + + webpackConfig.plugins.push(new FlightClientEntryPlugin()); webpackConfig.plugins.push(new FlightManifestPlugin()); } diff --git a/packages/ice/src/plugins/web/index.ts b/packages/ice/src/plugins/web/index.ts index e8256fdf8d..a07fc75738 100644 --- a/packages/ice/src/plugins/web/index.ts +++ b/packages/ice/src/plugins/web/index.ts @@ -49,7 +49,11 @@ const plugin: Plugin = () => ({ ...(userConfig.rsc ? { alias: createRSCAliases(), // TODO: temporary solution for rsc. - entry: { main: [path.join(rootDir, RUNTIME_TMP_DIR, 'rsc.client.tsx')] }, + entry: { + main: [path.join(rootDir, RUNTIME_TMP_DIR, 'rsc.client.tsx')], + 'pages/about': [path.join(rootDir, 'src', 'pages/about.tsx')], + // route: [path.join(rootDir, RUNTIME_TMP_DIR, 'routes.tsx')], + }, } : {}), }); diff --git a/packages/ice/src/webpack/FlightClientEntryLoader.ts b/packages/ice/src/webpack/FlightClientEntryLoader.ts new file mode 100644 index 0000000000..eb74144f3d --- /dev/null +++ b/packages/ice/src/webpack/FlightClientEntryLoader.ts @@ -0,0 +1,27 @@ +export type ClientComponentImports = string[]; +export type CssImports = Record; + +export type FlightClientEntryLoaderOptions = { + modules: ClientComponentImports; + /** This is transmitted as a string to `getOptions` */ + server: boolean | 'true' | 'false'; +}; + +export default function transformSource() { + let { modules } = this.getOptions(); + + if (!Array.isArray(modules)) { + modules = modules ? [modules] : []; + } + + const requests = modules; + const code = requests + .map( + (request) => + `import(/* webpackMode: "eager" */ ${JSON.stringify(request)})`, + ) + .join(';\n'); + + console.log(code); + return code; +} diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts new file mode 100644 index 0000000000..8de0a02514 --- /dev/null +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -0,0 +1,153 @@ +import * as path from 'path'; +import _querystring from 'querystring'; +import webpack from '@ice/bundles/compiled/webpack/index.js'; +import type { Compiler, Compilation } from 'webpack'; + +const PLUGIN_NAME = 'FlightClientEntryPlugin'; + +export class FlightClientEntryPlugin { + constructor() { + } + + apply(compiler: Compiler) { + compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) => + this.createClientEntries(compiler, compilation), + ); + } + + async createClientEntries(compiler: Compiler, compilation: Compilation) { + const addClientEntryAndSSRModulesList = []; + + for (const [name, entry] of compilation.entries.entries()) { + if (name === 'main') { + continue; + } + + const clientEntriesToInject = new Set(); + + let _entry_dependencies; + const entryDependency = (_entry_dependencies = entry.dependencies) == null ? void 0 : _entry_dependencies[0]; + let entryModule = compilation.moduleGraph.getResolvedModule(entryDependency); + + for (const connection of compilation.moduleGraph.getOutgoingConnections(entryModule)) { + // @ts-ignore + const entryRequest = connection.dependency.request; + + const result = this.collectComponentInfoFromServerEntryDependency({ + entryRequest, + compilation, + resolvedModule: connection.resolvedModule, + }); + + if (result && result.length > 0) { + result.forEach((value) => clientEntriesToInject.add(value)); + } + } + + if (clientEntriesToInject.size) { + const injected = this.injectClientEntryAndSSRModules({ + compiler, + compilation, + entryName: name, + clientImports: clientEntriesToInject, + }); + addClientEntryAndSSRModulesList.push(injected); + } + } + + await Promise.all(addClientEntryAndSSRModulesList); + } + + injectClientEntryAndSSRModules({ compiler, compilation, entryName, clientImports }) { + const clientLoader = `flight-client-entry-loader?${(0, _querystring.stringify)({ + modules: [...clientImports], + })}!`; + + const clientComponentEntryDep = webpack.EntryPlugin.createDependency(clientLoader, { + name: `rsc@${entryName}`, + }); + + // const block = new webpack.AsyncDependenciesBlock( + // { + // name: 'about_chunk', + // }, + // null, + // clientLoader, + // ); + // // @ts-expect-error TODO: add types for ModuleDependency. + // block.addDependency(clientLoader); + + // const entry = compilation.entries.get('main'); + // let entryModule = compilation.moduleGraph.getResolvedModule(entry.dependencies[0]); + // entryModule.addBlock(block); + + return new Promise((resolve, reject) => { + compilation.addEntry(compiler.context, clientComponentEntryDep, { name: `rsc@${entryName}`, import: clientLoader }, (err) => { + if (err) { + console.error(err); + reject(err); + } + resolve(); + }); + + // compilation.addModuleTree({ + // context: compiler.context, + // dependency: clientComponentEntryDep, + // }, (err, module)=>{ + // if (err) { + // compilation.hooks.failedEntry.call(clientComponentEntryDep, {}, err); + // return reject(err); + // } + // console.log('after add entry ----'); + // console.log(compilation.entries) + // compilation.hooks.succeedEntry.call(clientComponentEntryDep, {}, module); + // return resolve(module); + // }); + }); + } + + collectComponentInfoFromServerEntryDependency({ entryRequest, compilation, resolvedModule }) { + // Keep track of checked modules to avoid infinite loops with recursive imports. + const visited = new Set(); + // Info to collect. + const result = []; + const filterClientComponents = (mod) => { + let _mod_resourceResolveData, +_mod_resourceResolveData1; + if (!mod) return; + const isCSS = isCSSMod(mod); + // We have to always use the resolved request here to make sure the + // server and client are using the same module path (required by RSC), as + // the server compiler and client compiler have different resolve configs. + let modRequest = ((_mod_resourceResolveData = mod.resourceResolveData) == null ? void 0 : _mod_resourceResolveData.path) + ((_mod_resourceResolveData1 = mod.resourceResolveData) == null ? void 0 : _mod_resourceResolveData1.query); + // Context modules don't have a resource path, we use the identifier instead. + if (mod.constructor.name === 'ContextModule') { + modRequest = mod._identifier; + } + if (!modRequest || visited.has(modRequest)) return; + visited.add(modRequest); + if (isCSS) { + result.push(modRequest); + } + if (isClientComponentEntryModule(mod)) { + result.push(modRequest); + return; + } + compilation.moduleGraph.getOutgoingConnections(mod).forEach((connection) => { + filterClientComponents(connection.resolvedModule); + }); + }; + // Traverse the module graph to find all client components. + filterClientComponents(resolvedModule); + return result; + } +} + +const regexCSS = /\.(css|scss|sass)(\?.*)?$/; +function isCSSMod(mod) { + return mod.resource && regexCSS.test(mod.resource); +} + +function isClientComponentEntryModule(mod) { + return mod.resource && mod.resource.indexOf('.client.tsx') > -1; +} \ No newline at end of file diff --git a/packages/runtime/src/routesConfig.ts b/packages/runtime/src/routesConfig.ts index e377ec2cee..4b2a435ccf 100644 --- a/packages/runtime/src/routesConfig.ts +++ b/packages/runtime/src/routesConfig.ts @@ -32,7 +32,7 @@ function getMergedValue(key: string, matches: RouteMatch[], loadersData: Loaders let result; for (let match of matches) { const routeId = match.route.id; - const data = loadersData[routeId]?.pageConfig; + const data = loadersData?.[routeId]?.pageConfig; const value = data?.[key]; if (Array.isArray(value)) { diff --git a/packages/runtime/src/runRSCServerApp.tsx b/packages/runtime/src/runRSCServerApp.tsx index 11f3c0e4d8..f0e969721c 100644 --- a/packages/runtime/src/runRSCServerApp.tsx +++ b/packages/runtime/src/runRSCServerApp.tsx @@ -50,7 +50,7 @@ export async function runRSCServerApp(serverContext: ServerContext, renderOption }; if (req.url?.indexOf('rsc') === -1) { - return renderDocument(serverContext, renderOptions, appContext); + return renderDocument(serverContext, renderOptions, appContext, matches); } const routeModules = await loadRouteModules(matches.map(({ route: { id, lazy } }) => ({ id, lazy }))); @@ -83,11 +83,12 @@ function renderMatches(matches: RouteMatch[], routeModules: RouteModules) { }, React.createElement(null)); } -function renderDocument(requestContext, renderOptions, appContext) { +function renderDocument(requestContext, renderOptions, appContext, matches) { const { res } = requestContext; const { Document, + routePath, } = renderOptions; const documentContext = { @@ -95,9 +96,9 @@ function renderDocument(requestContext, renderOptions, appContext) { }; const htmlStr = ReactDOMServer.renderToString( - + - + , ); From a15c88c3156cfc708e45beb2bb238bb74425d33a Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Wed, 18 Oct 2023 09:25:44 +0800 Subject: [PATCH 02/19] chore: build as chunk --- packages/ice/src/plugins/web/index.ts | 7 +++++- .../src/webpack/FlightClientEntryPlugin.ts | 9 +++++--- .../ice/src/webpack/FlightManifestPlugin.ts | 22 ++++++++++--------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/ice/src/plugins/web/index.ts b/packages/ice/src/plugins/web/index.ts index a07fc75738..2f0506eaf0 100644 --- a/packages/ice/src/plugins/web/index.ts +++ b/packages/ice/src/plugins/web/index.ts @@ -51,7 +51,12 @@ const plugin: Plugin = () => ({ // TODO: temporary solution for rsc. entry: { main: [path.join(rootDir, RUNTIME_TMP_DIR, 'rsc.client.tsx')], - 'pages/about': [path.join(rootDir, 'src', 'pages/about.tsx')], + 'pages/index': [path.join(rootDir, 'src', 'pages/index.tsx')], + // 'aaa': { + // // @ts-ignore + // dependOn: ['main'], + // import: 'flight-client-entry-loader?modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FCounter.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FRefreshButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FEditButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fpages%2Fabout.module.css!' + // } // route: [path.join(rootDir, RUNTIME_TMP_DIR, 'routes.tsx')], }, } : {}), diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 8de0a02514..6db5fe363a 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import _querystring from 'querystring'; +import querystring from 'querystring'; import webpack from '@ice/bundles/compiled/webpack/index.js'; import type { Compiler, Compilation } from 'webpack'; @@ -59,10 +59,13 @@ export class FlightClientEntryPlugin { } injectClientEntryAndSSRModules({ compiler, compilation, entryName, clientImports }) { - const clientLoader = `flight-client-entry-loader?${(0, _querystring.stringify)({ + // @ts-ignore + const clientLoader = `flight-client-entry-loader?${querystring.stringify({ modules: [...clientImports], })}!`; + console.log(clientLoader); + const clientComponentEntryDep = webpack.EntryPlugin.createDependency(clientLoader, { name: `rsc@${entryName}`, }); @@ -82,7 +85,7 @@ export class FlightClientEntryPlugin { // entryModule.addBlock(block); return new Promise((resolve, reject) => { - compilation.addEntry(compiler.context, clientComponentEntryDep, { name: `rsc@${entryName}`, import: clientLoader }, (err) => { + compilation.addEntry(compiler.context, clientComponentEntryDep, { name: `rsc@${entryName}`, dependOn: ['main'] }, (err) => { if (err) { console.error(err); reject(err); diff --git a/packages/ice/src/webpack/FlightManifestPlugin.ts b/packages/ice/src/webpack/FlightManifestPlugin.ts index 49cab9afea..0f5ec671ab 100644 --- a/packages/ice/src/webpack/FlightManifestPlugin.ts +++ b/packages/ice/src/webpack/FlightManifestPlugin.ts @@ -130,16 +130,16 @@ export class FlightManifestPlugin { .replace(/\[index\]/g, `${i}`) .replace(/\[request\]/g, toPath(dep.userRequest)); - const block = new webpack.AsyncDependenciesBlock( - { - name: chunkName, - }, - null, - dep.request, - ); - // @ts-expect-error TODO: add types for ModuleDependency. - block.addDependency(dep); - module.addBlock(block); + // const block = new webpack.AsyncDependenciesBlock( + // { + // name: chunkName, + // }, + // null, + // dep.request, + // ); + // // @ts-expect-error TODO: add types for ModuleDependency. + // block.addDependency(dep); + // module.addBlock(block); } } } @@ -178,6 +178,7 @@ export class FlightManifestPlugin { compilation.chunkGroups.forEach((chunkGroup) => { const chunkIds = chunkGroup.chunks.map((chunk) => chunk.id); + const recordModule = (id: string | number, module: any) => { if (!resolveClientFiles.has(module.resource)) { return; @@ -220,6 +221,7 @@ export class FlightManifestPlugin { }); }); }); + console.log(clientManifest); const clientOutput = JSON.stringify(clientManifest, null, 2); compilation.emitAsset( _this.clientManifestFilename, From 318990ac7b97f5b153388435ac2b4da49eceb1e4 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Wed, 18 Oct 2023 14:05:13 +0800 Subject: [PATCH 03/19] refactor: entry plugin --- packages/ice/src/plugins/web/index.ts | 4 +- .../src/webpack/FlightClientEntryPlugin.ts | 151 ++++++++---------- .../ice/src/webpack/FlightManifestPlugin.ts | 3 + 3 files changed, 69 insertions(+), 89 deletions(-) diff --git a/packages/ice/src/plugins/web/index.ts b/packages/ice/src/plugins/web/index.ts index 2f0506eaf0..ae1b19e3b1 100644 --- a/packages/ice/src/plugins/web/index.ts +++ b/packages/ice/src/plugins/web/index.ts @@ -51,13 +51,13 @@ const plugin: Plugin = () => ({ // TODO: temporary solution for rsc. entry: { main: [path.join(rootDir, RUNTIME_TMP_DIR, 'rsc.client.tsx')], - 'pages/index': [path.join(rootDir, 'src', 'pages/index.tsx')], + // 'pages/index': [path.join(rootDir, 'src', 'pages/index.tsx')], // 'aaa': { // // @ts-ignore // dependOn: ['main'], // import: 'flight-client-entry-loader?modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FCounter.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FRefreshButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FEditButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fpages%2Fabout.module.css!' // } - // route: [path.join(rootDir, RUNTIME_TMP_DIR, 'routes.tsx')], + route: [path.join(rootDir, RUNTIME_TMP_DIR, 'routes.tsx')], }, } : {}), }); diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 6db5fe363a..80b0db7110 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import querystring from 'querystring'; +import { stringify } from 'querystring'; import webpack from '@ice/bundles/compiled/webpack/index.js'; import type { Compiler, Compilation } from 'webpack'; @@ -16,133 +16,110 @@ export class FlightClientEntryPlugin { } async createClientEntries(compiler: Compiler, compilation: Compilation) { - const addClientEntryAndSSRModulesList = []; + const addClientEntryList = []; for (const [name, entry] of compilation.entries.entries()) { if (name === 'main') { continue; } - const clientEntriesToInject = new Set(); - - let _entry_dependencies; - const entryDependency = (_entry_dependencies = entry.dependencies) == null ? void 0 : _entry_dependencies[0]; - let entryModule = compilation.moduleGraph.getResolvedModule(entryDependency); + const entryDependency = entry.dependencies?.[0]; + if (!entryDependency) { + continue; + } + const entryModule = compilation.moduleGraph.getResolvedModule(entryDependency); for (const connection of compilation.moduleGraph.getOutgoingConnections(entryModule)) { - // @ts-ignore - const entryRequest = connection.dependency.request; + const entryRequest = (connection.dependency as any).request; + + if (entryRequest.indexOf('@/pages/') === -1) continue; - const result = this.collectComponentInfoFromServerEntryDependency({ - entryRequest, + const { clientComponentImports, CSSImports } = this.collectComponentInfoFromDependency({ compilation, resolvedModule: connection.resolvedModule, }); - if (result && result.length > 0) { - result.forEach((value) => clientEntriesToInject.add(value)); - } - } + if (clientComponentImports.length || CSSImports.length) { + console.log(name, entryRequest, clientComponentImports, CSSImports); - if (clientEntriesToInject.size) { - const injected = this.injectClientEntryAndSSRModules({ - compiler, - compilation, - entryName: name, - clientImports: clientEntriesToInject, - }); - addClientEntryAndSSRModulesList.push(injected); + const injected = this.injectClientEntry({ + compiler, + compilation, + bundlePath: entryRequest, + clientImports: [ + ...clientComponentImports, + ...CSSImports, + ], + }); + + addClientEntryList.push(injected); + } } } - await Promise.all(addClientEntryAndSSRModulesList); + await Promise.all(addClientEntryList); } - injectClientEntryAndSSRModules({ compiler, compilation, entryName, clientImports }) { - // @ts-ignore - const clientLoader = `flight-client-entry-loader?${querystring.stringify({ - modules: [...clientImports], + injectClientEntry({ compiler, compilation, bundlePath, clientImports }) { + const clientLoader = `flight-client-entry-loader?${stringify({ + modules: clientImports, })}!`; - console.log(clientLoader); - + const name = `rsc${bundlePath}`; const clientComponentEntryDep = webpack.EntryPlugin.createDependency(clientLoader, { - name: `rsc@${entryName}`, + name, }); - // const block = new webpack.AsyncDependenciesBlock( - // { - // name: 'about_chunk', - // }, - // null, - // clientLoader, - // ); - // // @ts-expect-error TODO: add types for ModuleDependency. - // block.addDependency(clientLoader); - - // const entry = compilation.entries.get('main'); - // let entryModule = compilation.moduleGraph.getResolvedModule(entry.dependencies[0]); - // entryModule.addBlock(block); - return new Promise((resolve, reject) => { - compilation.addEntry(compiler.context, clientComponentEntryDep, { name: `rsc@${entryName}`, dependOn: ['main'] }, (err) => { + compilation.addEntry(compiler.context, clientComponentEntryDep, { name, dependOn: ['main'] }, (err) => { if (err) { console.error(err); reject(err); } + resolve(); }); - - // compilation.addModuleTree({ - // context: compiler.context, - // dependency: clientComponentEntryDep, - // }, (err, module)=>{ - // if (err) { - // compilation.hooks.failedEntry.call(clientComponentEntryDep, {}, err); - // return reject(err); - // } - // console.log('after add entry ----'); - // console.log(compilation.entries) - // compilation.hooks.succeedEntry.call(clientComponentEntryDep, {}, module); - // return resolve(module); - // }); }); } - collectComponentInfoFromServerEntryDependency({ entryRequest, compilation, resolvedModule }) { + collectComponentInfoFromDependency({ compilation, resolvedModule }) { // Keep track of checked modules to avoid infinite loops with recursive imports. const visited = new Set(); // Info to collect. - const result = []; + const clientComponentImports = []; + const CSSImports = []; + const filterClientComponents = (mod) => { - let _mod_resourceResolveData, -_mod_resourceResolveData1; - if (!mod) return; - const isCSS = isCSSMod(mod); - // We have to always use the resolved request here to make sure the - // server and client are using the same module path (required by RSC), as - // the server compiler and client compiler have different resolve configs. - let modRequest = ((_mod_resourceResolveData = mod.resourceResolveData) == null ? void 0 : _mod_resourceResolveData.path) + ((_mod_resourceResolveData1 = mod.resourceResolveData) == null ? void 0 : _mod_resourceResolveData1.query); - // Context modules don't have a resource path, we use the identifier instead. - if (mod.constructor.name === 'ContextModule') { - modRequest = mod._identifier; - } - if (!modRequest || visited.has(modRequest)) return; - visited.add(modRequest); - if (isCSS) { - result.push(modRequest); - } - if (isClientComponentEntryModule(mod)) { - result.push(modRequest); - return; - } - compilation.moduleGraph.getOutgoingConnections(mod).forEach((connection) => { - filterClientComponents(connection.resolvedModule); - }); + if (!mod) return; + + const modRequest: string | undefined = mod.resourceResolveData?.path + mod.resourceResolveData?.query; + + if (!modRequest || visited.has(modRequest)) return; + visited.add(modRequest); + + const isCSS = isCSSMod(mod); + + if (isCSS) { + CSSImports.push(modRequest); + } + + if (isClientComponentEntryModule(mod)) { + clientComponentImports.push(modRequest); + return; + } + + compilation.moduleGraph.getOutgoingConnections(mod).forEach((connection) => { + filterClientComponents(connection.resolvedModule); + }); }; + // Traverse the module graph to find all client components. filterClientComponents(resolvedModule); - return result; + + return { + clientComponentImports, + CSSImports, + }; } } diff --git a/packages/ice/src/webpack/FlightManifestPlugin.ts b/packages/ice/src/webpack/FlightManifestPlugin.ts index 0f5ec671ab..6ecd5a1265 100644 --- a/packages/ice/src/webpack/FlightManifestPlugin.ts +++ b/packages/ice/src/webpack/FlightManifestPlugin.ts @@ -120,6 +120,9 @@ export class FlightManifestPlugin { if (!module.resource.includes('react-server-dom-webpack/client.browser')) { return; } + + console.log(module.resource); + clientFileNameFound = true; if (resolvedClientReferences) { if (resolvedClientReferences) { From 5891fe8a226e2539f53d6717f9d63d53f2b3fc0c Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Wed, 18 Oct 2023 15:29:33 +0800 Subject: [PATCH 04/19] feat: generate client entry for rsc --- .../src/webpack/FlightClientEntryPlugin.ts | 194 +++++++++++- .../ice/src/webpack/FlightManifestPlugin.ts | 295 +++--------------- 2 files changed, 229 insertions(+), 260 deletions(-) diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 80b0db7110..42927f6353 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,15 +1,90 @@ import * as path from 'path'; import { stringify } from 'querystring'; +import { asyncLib, acorn } from '@ice/bundles'; import webpack from '@ice/bundles/compiled/webpack/index.js'; +import NullDependency from '@ice/bundles/compiled/webpack/NullDependency.js'; +import ModuleDependency from '@ice/bundles/compiled/webpack/ModuleDependency.js'; import type { Compiler, Compilation } from 'webpack'; const PLUGIN_NAME = 'FlightClientEntryPlugin'; +interface ClientReferenceSearchPath { + directory: string; + recursive?: boolean; + include: RegExp; + exclude?: RegExp; +} + +interface Options { + clientReferences?: ClientReferenceSearchPath[]; +} + +class ClientReferenceDependency extends ModuleDependency { + userRequest: string; + request: string; + + constructor(request: string) { + super(request); + this.request = request; + } + get type(): string { + return 'client-reference'; + } +} + export class FlightClientEntryPlugin { - constructor() { + clientReferences: ClientReferenceSearchPath[]; + clientFiles = new Set(); + + constructor(options: Options = {}) { + if (options.clientReferences) { + this.clientReferences = options.clientReferences; + } else { + this.clientReferences = [ + { + directory: '.', + recursive: true, + include: /\.(js|ts|jsx|tsx)$/, + exclude: /types.ts|.d.ts|node_modules/, + }, + ]; + } } apply(compiler: Compiler) { + const _this = this; + + compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation, { normalModuleFactory }) => { + // @ts-expect-error TODO: add types for ModuleDependency. + compilation.dependencyFactories.set(ClientReferenceDependency, normalModuleFactory); + // @ts-expect-error TODO: add types for ModuleDependency. + compilation.dependencyTemplates.set(ClientReferenceDependency, new NullDependency.Template()); + }); + + compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, ({ contextModuleFactory }, callback) => { + const contextResolver = compiler.resolverFactory.get('context', {}); + const normalResolver = compiler.resolverFactory.get('normal'); + + _this.resolveClientFiles( + compiler.context, + contextResolver, + normalResolver, + compiler.inputFileSystem, + contextModuleFactory, + (err, resolvedClientRefs) => { + if (err) { + callback(err); + return; + } + resolvedClientRefs.forEach(dep => { + this.clientFiles.add(dep.request); + }); + + callback(); + }, + ); + }); + compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) => this.createClientEntries(compiler, compilation), ); @@ -40,8 +115,6 @@ export class FlightClientEntryPlugin { }); if (clientComponentImports.length || CSSImports.length) { - console.log(name, entryRequest, clientComponentImports, CSSImports); - const injected = this.injectClientEntry({ compiler, compilation, @@ -73,7 +146,6 @@ export class FlightClientEntryPlugin { return new Promise((resolve, reject) => { compilation.addEntry(compiler.context, clientComponentEntryDep, { name, dependOn: ['main'] }, (err) => { if (err) { - console.error(err); reject(err); } @@ -103,7 +175,7 @@ export class FlightClientEntryPlugin { CSSImports.push(modRequest); } - if (isClientComponentEntryModule(mod)) { + if (this.isClientComponentEntryModule(mod)) { clientComponentImports.push(modRequest); return; } @@ -121,6 +193,118 @@ export class FlightClientEntryPlugin { CSSImports, }; } + + isClientComponentEntryModule(mod) { + if (this.clientFiles.has(mod.resource)) { + return true; + } + + return false; + } + + resolveClientFiles( + context: string, + contenxtResolver: ReturnType, + normalResolver: ReturnType, + fs: Compilation['inputFileSystem'], + contextModuleFactory: Compilation['params']['contextModuleFactory'], + callback: (err: Error | null, files?: ClientReferenceDependency[]) => void, + ) { + function hasUseClientDirective(source: string): boolean { + if (source.indexOf('use client') === -1) { + return false; + } + let body; + try { + // TODO: check client directive by comment injected by swc plugin. + body = acorn.parse(source, { + ecmaVersion: '2024', + sourceType: 'module', + }).body; + } catch (x) { + return false; + } + for (let i = 0; i < body.length; i++) { + const node = body[i]; + if (node.type !== 'ExpressionStatement' || !node.directive) { + break; + } + if (node.directive === 'use client') { + return true; + } + } + return false; + } + asyncLib.map(this.clientReferences, ( + clientReference: ClientReferenceSearchPath, + cb: (err: null | Error, result?: ClientReferenceDependency[]) => void, + ) => { + contenxtResolver.resolve({}, context, clientReference.directory, {}, (err, resolvedDirectory) => { + if (err) return cb(err); + const options = { + resource: resolvedDirectory, + resourceQuery: '', + recursive: + clientReference.recursive === undefined + ? true + : clientReference.recursive, + regExp: clientReference.include, + include: undefined, + exclude: clientReference.exclude, + }; + // @ts-expect-error TODO: add types for resolveDependencies options. + contextModuleFactory.resolveDependencies(fs, options, (err, dependencies) => { + if (err) return cb(err); + const clientRefDeps = dependencies.map(dep => { + // Use userRequest instead of request. request always end with undefined which is wrong. + const request = path.join(resolvedDirectory as string, dep.userRequest); + const clientRefDep = new ClientReferenceDependency(request); + clientRefDep.userRequest = dep.userRequest; + return clientRefDep; + }); + asyncLib.filter( + clientRefDeps, + (dep: ClientReferenceDependency, filterCb: (err: null | Error, truthValue: boolean) => void, + ) => { + normalResolver.resolve( + {}, + context, + dep.request, + {}, + (err: null | Error, resolvedPath: any) => { + if (err || typeof resolvedPath !== 'string') { + return filterCb(null, false); + } + + fs.readFile( + resolvedPath, + 'utf-8', + // @ts-expect-error + (err: null | Error, content: string) => { + if (err || typeof content !== 'string') { + return filterCb(null, false); + } + const useClient = hasUseClientDirective(content); + filterCb(null, useClient); + }, + ); + }, + ); + }, cb); + }); + }); + }, ( + err: null | Error, + result: ClientReferenceDependency[], + ) => { + if (err) return callback(err); + const flat: ClientReferenceDependency[] = []; + for (let i = 0; i < result.length; i++) { + flat.push.apply(flat, result[i]); + } + callback(null, flat); + }); + } } const regexCSS = /\.(css|scss|sass)(\?.*)?$/; diff --git a/packages/ice/src/webpack/FlightManifestPlugin.ts b/packages/ice/src/webpack/FlightManifestPlugin.ts index 6ecd5a1265..e689838daa 100644 --- a/packages/ice/src/webpack/FlightManifestPlugin.ts +++ b/packages/ice/src/webpack/FlightManifestPlugin.ts @@ -1,24 +1,11 @@ // Fork form https://github.com/facebook/react/blob/main/packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js // Add special handling for ice.js when enable RSC. -import * as path from 'path'; -import { asyncLib, acorn } from '@ice/bundles'; -import ModuleDependency from '@ice/bundles/compiled/webpack/ModuleDependency.js'; -import NullDependency from '@ice/bundles/compiled/webpack/NullDependency.js'; import webpack from '@ice/bundles/compiled/webpack/index.js'; -import type { Compiler, Compilation } from 'webpack'; +import type { Compiler } from 'webpack'; const PLUGIN_NAME = 'FlightManifestPlugin'; -interface ClientReferenceSearchPath { - directory: string; - recursive?: boolean; - include: RegExp; - exclude?: RegExp; -} - interface Options { - clientReferences?: ClientReferenceSearchPath[]; - chunkName?: string; clientManifestFilename?: string; ssrManifestFilename?: string; } @@ -27,55 +14,11 @@ interface SSRExports { [chunkName: string]: { specifier: string; name: string }; } -class ClientReferenceDependency extends ModuleDependency { - userRequest: string; - request: string; - - constructor(request: string) { - super(request); - this.request = request; - } - get type(): string { - return 'client-reference'; - } -} -// Webpack template utils of toPath. -const PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g; -const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; -const toPath = (str: any) => { - if (typeof str !== 'string') return ''; - return str - .replace(PATH_NAME_NORMALIZE_REPLACE_REGEX, '-') - .replace(MATCH_PADDED_HYPHENS_REPLACE_REGEX, ''); -}; - export class FlightManifestPlugin { - clientReferences: ClientReferenceSearchPath[]; - chunkName?: string; clientManifestFilename?: string; ssrManifestFilename?: string; constructor(options: Options = {}) { - if (options.clientReferences) { - this.clientReferences = options.clientReferences; - } else { - this.clientReferences = [ - { - directory: '.', - recursive: true, - include: /\.(js|ts|jsx|tsx)$/, - exclude: /types.ts|.d.ts|node_modules/, - }, - ]; - } - if (typeof options.chunkName === 'string') { - this.chunkName = options.chunkName; - if (!/\[(index|request)\]/.test(this.chunkName)) { - this.chunkName += '[index]'; - } - } else { - this.chunkName = 'client[index]'; - } this.clientManifestFilename = options.clientManifestFilename || 'react-client-manifest.json'; this.ssrManifestFilename = @@ -84,97 +27,18 @@ export class FlightManifestPlugin { apply(compiler: Compiler) { const _this = this; - let resolvedClientReferences: ClientReferenceDependency[]; - let clientFileNameFound = false; - - compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, ({ contextModuleFactory }, callback) => { - const contextResolver = compiler.resolverFactory.get('context', {}); - const normalResolver = compiler.resolverFactory.get('normal'); - - _this.resolveClientFiles( - compiler.context, - contextResolver, - normalResolver, - compiler.inputFileSystem, - contextModuleFactory, - (err, resolvedClientRefs) => { - if (err) { - callback(err); - return; - } - resolvedClientReferences = resolvedClientRefs; - callback(); - }, - ); - }); - - compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation, { normalModuleFactory }) => { - // @ts-expect-error TODO: add types for ModuleDependency. - compilation.dependencyFactories.set(ClientReferenceDependency, normalModuleFactory); - // @ts-expect-error TODO: add types for ModuleDependency. - compilation.dependencyTemplates.set(ClientReferenceDependency, new NullDependency.Template()); - - const handler = (parser) => { - parser.hooks.program.tap(PLUGIN_NAME, () => { - const { module } = parser.state; - if (!module.resource.includes('react-server-dom-webpack/client.browser')) { - return; - } - - console.log(module.resource); - - clientFileNameFound = true; - if (resolvedClientReferences) { - if (resolvedClientReferences) { - for (let i = 0; i < resolvedClientReferences.length; i++) { - const dep = resolvedClientReferences[i]; - - const chunkName = _this.chunkName - .replace(/\[index\]/g, `${i}`) - .replace(/\[request\]/g, toPath(dep.userRequest)); - - // const block = new webpack.AsyncDependenciesBlock( - // { - // name: chunkName, - // }, - // null, - // dep.request, - // ); - // // @ts-expect-error TODO: add types for ModuleDependency. - // block.addDependency(dep); - // module.addBlock(block); - } - } - } - }); - }; - - normalModuleFactory.hooks.parser.for('javascript/auto').tap('HarmonyModulesPlugin', handler); - normalModuleFactory.hooks.parser.for('javascript/esm').tap('HarmonyModulesPlugin', handler); - normalModuleFactory.hooks.parser.for('javascript/dynamic').tap('HarmonyModulesPlugin', handler); - }); compiler.hooks.make.tap(PLUGIN_NAME, (compilation) => { compilation.hooks.processAssets.tap({ name: PLUGIN_NAME, stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, }, () => { - if (clientFileNameFound === false) { - compilation.warnings.push( - // @ts-expect-error mismatch import path of webpack. - new webpack.WebpackError( - `Client runtime at 'react-server-dom-webpack/client' was not found. React Server Components module map file ${_this.clientManifestFilename} was not created.`, - ), - ); - return; - } - - const resolveClientFiles = new Set((resolvedClientReferences || []).map((dep) => dep.request)); const clientManifest: { [key: string]: { chunks: (string | number)[]; id: string | number; name: string; };} = {}; + const ssrManifest: { [key: string]: SSRExports; } = {}; @@ -183,9 +47,6 @@ export class FlightManifestPlugin { const chunkIds = chunkGroup.chunks.map((chunk) => chunk.id); const recordModule = (id: string | number, module: any) => { - if (!resolveClientFiles.has(module.resource)) { - return; - } // const modId = path.relative(compiler.context, module.resource); const modId = module.resource; if (modId !== undefined) { @@ -211,25 +72,53 @@ export class FlightManifestPlugin { chunkGroup.chunks.forEach((chunk) => { const chunkModules = compilation.chunkGraph.getChunkModulesIterable(chunk); [...chunkModules].forEach((module) => { - const moduleId = compilation.chunkGraph.getModuleId(module); - recordModule(moduleId, module); - // If this is a concatenation, register each child to the parent ID. - // @ts-expect-error - if (module.modules) { - // @ts-expect-error - module.modules.forEach(concatenatedMod => { - recordModule(moduleId, concatenatedMod); - }); + const { request } = module as any; + + if ( + !request || + !request.includes('FlightClientEntryLoader.js') + ) { + return; + } + + const connections = compilation.moduleGraph.getOutgoingConnections(module); + + for (const connection of connections) { + const { dependency } = connection; + if (!dependency) continue; + + const clientEntryMod = compilation.moduleGraph.getResolvedModule( + dependency, + ) as any; + const modId = compilation.chunkGraph.getModuleId(clientEntryMod) as + | string + | number + | null; + + if (modId !== null) { + recordModule(modId, clientEntryMod); + } else { + // If this is a concatenation, register each child to the parent ID. + if ( + connection.module?.constructor.name === 'ConcatenatedModule' + ) { + const concatenatedMod = connection.module; + const concatenatedModId = + compilation.chunkGraph.getModuleId(concatenatedMod); + recordModule(concatenatedModId, clientEntryMod); + } + } } }); }); }); - console.log(clientManifest); + const clientOutput = JSON.stringify(clientManifest, null, 2); compilation.emitAsset( _this.clientManifestFilename, new webpack.sources.RawSource(clientOutput, false), ); + const ssrOutput = JSON.stringify(ssrManifest, null, 2); compilation.emitAsset( _this.ssrManifestFilename, @@ -238,108 +127,4 @@ export class FlightManifestPlugin { }); }); } - - resolveClientFiles( - context: string, - contenxtResolver: ReturnType, - normalResolver: ReturnType, - fs: Compilation['inputFileSystem'], - contextModuleFactory: Compilation['params']['contextModuleFactory'], - callback: (err: Error | null, files?: ClientReferenceDependency[]) => void, - ) { - function hasUseClientDirective(source: string): boolean { - if (source.indexOf('use client') === -1) { - return false; - } - let body; - try { - // TODO: check client directive by comment injected by swc plugin. - body = acorn.parse(source, { - ecmaVersion: '2024', - sourceType: 'module', - }).body; - } catch (x) { - return false; - } - for (let i = 0; i < body.length; i++) { - const node = body[i]; - if (node.type !== 'ExpressionStatement' || !node.directive) { - break; - } - if (node.directive === 'use client') { - return true; - } - } - return false; - } - asyncLib.map(this.clientReferences, ( - clientReference: ClientReferenceSearchPath, - cb: (err: null | Error, result?: ClientReferenceDependency[]) => void, - ) => { - contenxtResolver.resolve({}, context, clientReference.directory, {}, (err, resolvedDirectory) => { - if (err) return cb(err); - const options = { - resource: resolvedDirectory, - resourceQuery: '', - recursive: - clientReference.recursive === undefined - ? true - : clientReference.recursive, - regExp: clientReference.include, - include: undefined, - exclude: clientReference.exclude, - }; - // @ts-expect-error TODO: add types for resolveDependencies options. - contextModuleFactory.resolveDependencies(fs, options, (err, dependencies) => { - if (err) return cb(err); - const clientRefDeps = dependencies.map(dep => { - // Use userRequest instead of request. request always end with undefined which is wrong. - const request = path.join(resolvedDirectory as string, dep.userRequest); - const clientRefDep = new ClientReferenceDependency(request); - clientRefDep.userRequest = dep.userRequest; - return clientRefDep; - }); - asyncLib.filter( - clientRefDeps, - (dep: ClientReferenceDependency, filterCb: (err: null | Error, truthValue: boolean) => void, - ) => { - normalResolver.resolve( - {}, - context, - dep.request, - {}, - (err: null | Error, resolvedPath: any) => { - if (err || typeof resolvedPath !== 'string') { - return filterCb(null, false); - } - - fs.readFile( - resolvedPath, - 'utf-8', - // @ts-expect-error - (err: null | Error, content: string) => { - if (err || typeof content !== 'string') { - return filterCb(null, false); - } - const useClient = hasUseClientDirective(content); - filterCb(null, useClient); - }, - ); - }, - ); - }, cb); - }); - }); - }, ( - err: null | Error, - result: ClientReferenceDependency[], - ) => { - if (err) return callback(err); - const flat: ClientReferenceDependency[] = []; - for (let i = 0; i < result.length; i++) { - flat.push.apply(flat, result[i]); - } - callback(null, flat); - }); - } } From a11178aebca235b11d7cd1f0d11a868ecdb9216f Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Wed, 18 Oct 2023 15:45:36 +0800 Subject: [PATCH 05/19] fix: type --- packages/ice/src/webpack/FlightClientEntryLoader.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ice/src/webpack/FlightClientEntryLoader.ts b/packages/ice/src/webpack/FlightClientEntryLoader.ts index eb74144f3d..748c947526 100644 --- a/packages/ice/src/webpack/FlightClientEntryLoader.ts +++ b/packages/ice/src/webpack/FlightClientEntryLoader.ts @@ -3,18 +3,16 @@ export type CssImports = Record; export type FlightClientEntryLoaderOptions = { modules: ClientComponentImports; - /** This is transmitted as a string to `getOptions` */ - server: boolean | 'true' | 'false'; }; export default function transformSource() { - let { modules } = this.getOptions(); + let { modules }: FlightClientEntryLoaderOptions = this.getOptions(); if (!Array.isArray(modules)) { modules = modules ? [modules] : []; } - const requests = modules; + const requests = modules as string[]; const code = requests .map( (request) => @@ -22,6 +20,5 @@ export default function transformSource() { ) .join(';\n'); - console.log(code); return code; } From eaa3f625a05486bfacf0233c65df393182b618af Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Thu, 19 Oct 2023 11:30:39 +0800 Subject: [PATCH 06/19] feat: remove temp route assets --- .../src/webpack/FlightClientEntryPlugin.ts | 23 ++++++++---- .../webpackPlugins/AssetsManifestPlugin.ts | 36 ++++++++++++++----- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 42927f6353..63b6d4cee7 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -77,7 +77,7 @@ export class FlightClientEntryPlugin { return; } resolvedClientRefs.forEach(dep => { - this.clientFiles.add(dep.request); + _this.clientFiles.add(dep.request); }); callback(); @@ -86,8 +86,23 @@ export class FlightClientEntryPlugin { }); compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) => - this.createClientEntries(compiler, compilation), + _this.createClientEntries(compiler, compilation), ); + + compiler.hooks.make.tap(PLUGIN_NAME, (compilation) => { + compilation.hooks.processAssets.tap({ + name: PLUGIN_NAME, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS, + }, () => { + compilation.chunks.forEach((chunk) => { + if (chunk.name === 'route' || chunk.runtime === 'route') { + chunk.files.forEach((file) => { + delete compilation.assets[file]; + }); + } + }); + }); + }); } async createClientEntries(compiler: Compiler, compilation: Compilation) { @@ -310,8 +325,4 @@ export class FlightClientEntryPlugin { const regexCSS = /\.(css|scss|sass)(\?.*)?$/; function isCSSMod(mod) { return mod.resource && regexCSS.test(mod.resource); -} - -function isClientComponentEntryModule(mod) { - return mod.resource && mod.resource.indexOf('.client.tsx') > -1; } \ No newline at end of file diff --git a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts index fe494cd1a9..35e1c26975 100644 --- a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts +++ b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts @@ -9,13 +9,15 @@ interface Assets { getFiles: () => string[]; } -function filterAssets(assets: Assets): string[] { +function filterAssets(compilation: Compilation, assets: Assets): string[] { return ( assets ?.getFiles() .filter((file: string) => { + const exists = compilation.assets[file]; // We don't want to include `.hot-update.js` files into the initial page - return /(? file.replace(/\\/g, '/')) ?? [] ); @@ -43,19 +45,34 @@ export default class AssetsManifestPlugin { assets[asset.sourceFilename] = asset.contenthash; } } + const entryFiles = []; for (const entrypoint of entrypoints) { const entryName = entrypoint.name; - const mainFiles = filterAssets(entrypoint); - entries[entryName] = mainFiles; - const jsMainFiles = mainFiles.filter((file) => file.endsWith('.js')); - entryFiles.push(jsMainFiles[0]); - const chunks = entrypoint?.getChildren(); - chunks.forEach((chunk) => { + + // Keep only main chunk as entry files. + const entryChunk = entrypoint.getEntrypointChunk(); + const entryFile = entryChunk.files[0]; + if (entryChunk.runtime === entryChunk.name && compilation.assets[entryFile]) { + entryFiles.push(entryFile); + } else { + continue; + } + + const mainFiles = filterAssets(compilation, entrypoint); + // Temp files may have been deleted. + if (mainFiles.length) { + entries[entryName] = mainFiles; + } else { + continue; + } + + const childChunks = entrypoint?.getChildren(); + childChunks.forEach((chunk) => { // Dynamic import missing chunk name, but not output solid assets. const chunkName = chunk.name; if (chunkName) { - pages[chunkName.replace(/^p_/, '')] = filterAssets(chunk); + pages[chunkName.replace(/^p_/, '')] = filterAssets(compilation, chunk); } }); } @@ -76,6 +93,7 @@ export default class AssetsManifestPlugin { const output = JSON.stringify(manifest, null, 2); // Emit asset manifest for server compile. compilation.emitAsset(this.fileName, new webpack.sources.RawSource(output)); + // Inject assets manifest to entry file. entryFiles.forEach((entryFile) => { compilation.assets[entryFile] = new webpack.sources.ConcatSource( From 0c0b3680c33bfb6dbdac6fb91fa768bff5be32ea Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 10:35:09 +0800 Subject: [PATCH 07/19] feat: load assets by default --- .../src/bundler/webpack/getWebpackConfig.ts | 4 +++- .../src/webpack/FlightClientEntryPlugin.ts | 21 ++++++++++++++----- packages/route-manifest/src/index.ts | 5 ++++- .../webpackPlugins/AssetsManifestPlugin.ts | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/ice/src/bundler/webpack/getWebpackConfig.ts b/packages/ice/src/bundler/webpack/getWebpackConfig.ts index 3c8617263c..45c230c0d9 100644 --- a/packages/ice/src/bundler/webpack/getWebpackConfig.ts +++ b/packages/ice/src/bundler/webpack/getWebpackConfig.ts @@ -129,7 +129,9 @@ const getWebpackConfig: GetWebpackConfig = async (context, options) => { }, }; - webpackConfig.plugins.push(new FlightClientEntryPlugin()); + webpackConfig.plugins.push(new FlightClientEntryPlugin({ + rootDir, + })); webpackConfig.plugins.push(new FlightManifestPlugin()); } diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 63b6d4cee7..af11866098 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,10 +1,15 @@ -import * as path from 'path'; +import { join, isAbsolute, relative, sep } from 'path'; import { stringify } from 'querystring'; import { asyncLib, acorn } from '@ice/bundles'; import webpack from '@ice/bundles/compiled/webpack/index.js'; import NullDependency from '@ice/bundles/compiled/webpack/NullDependency.js'; import ModuleDependency from '@ice/bundles/compiled/webpack/ModuleDependency.js'; import type { Compiler, Compilation } from 'webpack'; +import { createComponentName } from '@ice/route-manifest'; + +export function formatPath(pathStr) { + return process.platform === 'win32' ? pathStr.split(sep).join('/') : pathStr; +} const PLUGIN_NAME = 'FlightClientEntryPlugin'; @@ -16,6 +21,7 @@ interface ClientReferenceSearchPath { } interface Options { + rootDir: string; clientReferences?: ClientReferenceSearchPath[]; } @@ -35,8 +41,11 @@ class ClientReferenceDependency extends ModuleDependency { export class FlightClientEntryPlugin { clientReferences: ClientReferenceSearchPath[]; clientFiles = new Set(); + pageDir: string; + + constructor(options: Options) { + this.pageDir = join(options.rootDir, 'src', 'pages'); - constructor(options: Options = {}) { if (options.clientReferences) { this.clientReferences = options.clientReferences; } else { @@ -133,7 +142,8 @@ export class FlightClientEntryPlugin { const injected = this.injectClientEntry({ compiler, compilation, - bundlePath: entryRequest, + // @ts-ignore + bundlePath: connection.resolvedModule?.resource, clientImports: [ ...clientComponentImports, ...CSSImports, @@ -153,7 +163,8 @@ export class FlightClientEntryPlugin { modules: clientImports, })}!`; - const name = `rsc${bundlePath}`; + const componentName = createComponentName(formatPath(relative(this.pageDir, bundlePath))); + const name = `rsc_${componentName}`; const clientComponentEntryDep = webpack.EntryPlugin.createDependency(clientLoader, { name, }); @@ -272,7 +283,7 @@ export class FlightClientEntryPlugin { if (err) return cb(err); const clientRefDeps = dependencies.map(dep => { // Use userRequest instead of request. request always end with undefined which is wrong. - const request = path.join(resolvedDirectory as string, dep.userRequest); + const request = join(resolvedDirectory as string, dep.userRequest); const clientRefDep = new ClientReferenceDependency(request); clientRefDep.userRequest = dep.userRequest; return clientRefDep; diff --git a/packages/route-manifest/src/index.ts b/packages/route-manifest/src/index.ts index af00031e2c..8175fbe6a1 100644 --- a/packages/route-manifest/src/index.ts +++ b/packages/route-manifest/src/index.ts @@ -46,11 +46,14 @@ const routeModuleExts = [ // '.mdx', ]; +export { + createComponentName, +}; + export function isRouteModuleFile(filename: string): boolean { return routeModuleExts.includes(path.extname(filename)); } - export function generateRouteManifest( rootDir: string, ignoreFiles: string[] = [], diff --git a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts index 35e1c26975..41ceb396b0 100644 --- a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts +++ b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts @@ -72,7 +72,7 @@ export default class AssetsManifestPlugin { // Dynamic import missing chunk name, but not output solid assets. const chunkName = chunk.name; if (chunkName) { - pages[chunkName.replace(/^p_/, '')] = filterAssets(compilation, chunk); + pages[chunkName.replace(/^p_/, '').replace(/^rsc_/, '')] = filterAssets(compilation, chunk); } }); } From a79ad2b68108012d060a35a0c18992b9ac271d4c Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 11:28:57 +0800 Subject: [PATCH 08/19] fix: avoid chunk information being overwritten --- .../ice/src/webpack/FlightManifestPlugin.ts | 46 ++++++++++++++----- packages/runtime/src/runRSCServerApp.tsx | 13 +++++- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/packages/ice/src/webpack/FlightManifestPlugin.ts b/packages/ice/src/webpack/FlightManifestPlugin.ts index e689838daa..02dd706eb5 100644 --- a/packages/ice/src/webpack/FlightManifestPlugin.ts +++ b/packages/ice/src/webpack/FlightManifestPlugin.ts @@ -14,6 +14,18 @@ interface SSRExports { [chunkName: string]: { specifier: string; name: string }; } +interface ClientManifest { + [key: string]: { + chunks: (string | number)[]; + id: string | number; + name: string; +}; +} + +interface SsrManifest { + [key: string]: SSRExports; +} + export class FlightManifestPlugin { clientManifestFilename?: string; ssrManifestFilename?: string; @@ -33,23 +45,28 @@ export class FlightManifestPlugin { name: PLUGIN_NAME, stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT, }, () => { - const clientManifest: { [key: string]: { - chunks: (string | number)[]; - id: string | number; - name: string; - };} = {}; - - const ssrManifest: { - [key: string]: SSRExports; + const clientManifestMapping: { + [key: string]: ClientManifest; + } = {}; + const ssrManifestSetMapping: { + [key: string]: SsrManifest; } = {}; compilation.chunkGroups.forEach((chunkGroup) => { - const chunkIds = chunkGroup.chunks.map((chunk) => chunk.id); + const chunkGroupName = chunkGroup.name; + + const clientManifest: ClientManifest = {}; + + const ssrManifest: SsrManifest = {}; + + let hasRecord = false; const recordModule = (id: string | number, module: any) => { // const modId = path.relative(compiler.context, module.resource); const modId = module.resource; if (modId !== undefined) { + hasRecord = true; + clientManifest[modId] = { id, chunks: chunkIds, @@ -69,6 +86,7 @@ export class FlightManifestPlugin { } }; + const chunkIds = chunkGroup.chunks.map((chunk) => chunk.id); chunkGroup.chunks.forEach((chunk) => { const chunkModules = compilation.chunkGraph.getChunkModulesIterable(chunk); [...chunkModules].forEach((module) => { @@ -110,16 +128,22 @@ export class FlightManifestPlugin { } } }); + + // One client component may bundle into serveral chunks, so we need to create manifest for each page. + if (hasRecord) { + clientManifestMapping[chunkGroupName] = clientManifest; + ssrManifestSetMapping[chunkGroupName] = ssrManifest; + } }); }); - const clientOutput = JSON.stringify(clientManifest, null, 2); + const clientOutput = JSON.stringify(clientManifestMapping, null, 2); compilation.emitAsset( _this.clientManifestFilename, new webpack.sources.RawSource(clientOutput, false), ); - const ssrOutput = JSON.stringify(ssrManifest, null, 2); + const ssrOutput = JSON.stringify(ssrManifestSetMapping, null, 2); compilation.emitAsset( _this.ssrManifestFilename, new webpack.sources.RawSource(ssrOutput, false), diff --git a/packages/runtime/src/runRSCServerApp.tsx b/packages/runtime/src/runRSCServerApp.tsx index f0e969721c..f08ac3f169 100644 --- a/packages/runtime/src/runRSCServerApp.tsx +++ b/packages/runtime/src/runRSCServerApp.tsx @@ -1,3 +1,4 @@ +import { match } from 'assert'; import * as React from 'react'; import * as ReactDOMServer from 'react-dom/server'; import { renderToPipeableStream } from 'react-server-dom-webpack/server.node'; @@ -26,7 +27,7 @@ export async function runRSCServerApp(serverContext: ServerContext, renderOption renderMode, basename, serverOnlyBasename, - clientManifest, + clientManifest: clientManifestMapping, assetsManifest, } = renderOptions; @@ -61,6 +62,16 @@ export async function runRSCServerApp(serverContext: ServerContext, renderOption ); + // Merge client manifest for match route. + const clientManifest = {}; + matches.forEach(match => { + const { componentName } = match.route; + const manifest = clientManifestMapping[`rsc_${componentName}`]; + if (manifest) { + Object.assign(clientManifest, manifest); + } + }); + const { pipe } = renderToPipeableStream( element, clientManifest, From 45d38dcee3376139492f8603329391b6a1e2a1b1 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 14:06:15 +0800 Subject: [PATCH 09/19] revert: example --- examples/with-rsc/src/components/Counter.client.tsx | 2 +- .../src/components/{index.module.css => counter.module.css} | 0 examples/with-rsc/src/pages/about.tsx | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename examples/with-rsc/src/components/{index.module.css => counter.module.css} (100%) diff --git a/examples/with-rsc/src/components/Counter.client.tsx b/examples/with-rsc/src/components/Counter.client.tsx index c61fbaa994..a9ed6568d3 100644 --- a/examples/with-rsc/src/components/Counter.client.tsx +++ b/examples/with-rsc/src/components/Counter.client.tsx @@ -1,7 +1,7 @@ 'use client'; import { useState } from 'react'; import { useAppContext } from 'ice'; -import styles from './index.module.css'; +import styles from './counter.module.css'; export default function Counter() { const [count, setCount] = useState(0); diff --git a/examples/with-rsc/src/components/index.module.css b/examples/with-rsc/src/components/counter.module.css similarity index 100% rename from examples/with-rsc/src/components/index.module.css rename to examples/with-rsc/src/components/counter.module.css diff --git a/examples/with-rsc/src/pages/about.tsx b/examples/with-rsc/src/pages/about.tsx index b627f1edf3..916a34a9ed 100644 --- a/examples/with-rsc/src/pages/about.tsx +++ b/examples/with-rsc/src/pages/about.tsx @@ -1,6 +1,6 @@ import { useAppContext } from 'ice'; import styles from './about.module.css'; -// import RefreshButton from '@/components/RefreshButton.client'; +import RefreshButton from '@/components/RefreshButton.client'; import Counter from '@/components/Counter.client'; if (!global.requestCount) { @@ -18,9 +18,9 @@ export default function Home() {

About Page

server request count: { global.requestCount++ }
- {/* + Refresh Button - */} +
); } From dc1d6bdce1c2837756184cae85024642f2c6c940 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 14:09:28 +0800 Subject: [PATCH 10/19] fix: entry --- packages/ice/src/plugins/web/index.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/ice/src/plugins/web/index.ts b/packages/ice/src/plugins/web/index.ts index ae1b19e3b1..7cd7eff5ec 100644 --- a/packages/ice/src/plugins/web/index.ts +++ b/packages/ice/src/plugins/web/index.ts @@ -51,15 +51,8 @@ const plugin: Plugin = () => ({ // TODO: temporary solution for rsc. entry: { main: [path.join(rootDir, RUNTIME_TMP_DIR, 'rsc.client.tsx')], - // 'pages/index': [path.join(rootDir, 'src', 'pages/index.tsx')], - // 'aaa': { - // // @ts-ignore - // dependOn: ['main'], - // import: 'flight-client-entry-loader?modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FCounter.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FRefreshButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fcomponents%2FEditButton.client.tsx&modules=%2FUsers%2Fshuilan%2FDocuments%2Fwork%2Fbugfix%2Fice%2Fexamples%2Fwith-rsc%2Fsrc%2Fpages%2Fabout.module.css!' - // } route: [path.join(rootDir, RUNTIME_TMP_DIR, 'routes.tsx')], - }, - } : {}), + } } : {}), }); onHook('after.start.compile', async ({ isSuccessful, isFirstCompile, urls, devUrlInfo }) => { From 96b65621cfa5588bb19fe81d1bb0f4dc19b10a52 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 14:13:05 +0800 Subject: [PATCH 11/19] fix: lint --- packages/ice/src/webpack/FlightClientEntryPlugin.ts | 2 +- packages/ice/src/webpack/FlightManifestPlugin.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index af11866098..b2bbcbc7ca 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,4 +1,4 @@ -import { join, isAbsolute, relative, sep } from 'path'; +import { join, relative, sep } from 'path'; import { stringify } from 'querystring'; import { asyncLib, acorn } from '@ice/bundles'; import webpack from '@ice/bundles/compiled/webpack/index.js'; diff --git a/packages/ice/src/webpack/FlightManifestPlugin.ts b/packages/ice/src/webpack/FlightManifestPlugin.ts index 02dd706eb5..f8bda22836 100644 --- a/packages/ice/src/webpack/FlightManifestPlugin.ts +++ b/packages/ice/src/webpack/FlightManifestPlugin.ts @@ -113,13 +113,11 @@ export class FlightManifestPlugin { | number | null; - if (modId !== null) { + if (modId) { recordModule(modId, clientEntryMod); } else { // If this is a concatenation, register each child to the parent ID. - if ( - connection.module?.constructor.name === 'ConcatenatedModule' - ) { + if (connection.module?.constructor.name === 'ConcatenatedModule') { const concatenatedMod = connection.module; const concatenatedModId = compilation.chunkGraph.getModuleId(concatenatedMod); From 1478bbab851f121a4c39a31bc35b728d467da1ad Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 14:41:40 +0800 Subject: [PATCH 12/19] fix: lint --- packages/runtime/src/runRSCServerApp.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/runtime/src/runRSCServerApp.tsx b/packages/runtime/src/runRSCServerApp.tsx index f08ac3f169..5b13d747ba 100644 --- a/packages/runtime/src/runRSCServerApp.tsx +++ b/packages/runtime/src/runRSCServerApp.tsx @@ -1,4 +1,3 @@ -import { match } from 'assert'; import * as React from 'react'; import * as ReactDOMServer from 'react-dom/server'; import { renderToPipeableStream } from 'react-server-dom-webpack/server.node'; From 1e2e263a8cad2b9839d6f65fc5642d591dd277f5 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Fri, 20 Oct 2023 15:28:36 +0800 Subject: [PATCH 13/19] fix: append manifest --- .../webpackPlugins/AssetsManifestPlugin.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts index 41ceb396b0..e3e8ad98d2 100644 --- a/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts +++ b/packages/webpack-config/src/webpackPlugins/AssetsManifestPlugin.ts @@ -50,23 +50,27 @@ export default class AssetsManifestPlugin { for (const entrypoint of entrypoints) { const entryName = entrypoint.name; - // Keep only main chunk as entry files. const entryChunk = entrypoint.getEntrypointChunk(); - const entryFile = entryChunk.files[0]; - if (entryChunk.runtime === entryChunk.name && compilation.assets[entryFile]) { - entryFiles.push(entryFile); - } else { + + // Keep only main chunk as entry files. + if (entryChunk.runtime !== entryChunk.name) { continue; } - const mainFiles = filterAssets(compilation, entrypoint); + const entryFile = [...entryChunk.files].filter((file) => file.endsWith('.js'))?.[0]; // Temp files may have been deleted. - if (mainFiles.length) { - entries[entryName] = mainFiles; - } else { + if (!compilation.assets[entryFile]) { continue; } + const mainFiles = filterAssets(compilation, entrypoint); + if (!mainFiles.length) { + continue; + } + + entryFiles.push(entryFile); + entries[entryName] = mainFiles; + const childChunks = entrypoint?.getChildren(); childChunks.forEach((chunk) => { // Dynamic import missing chunk name, but not output solid assets. From 5e94a800f61958df21becff0d2e28978c20ceb02 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Mon, 23 Oct 2023 14:20:40 +0800 Subject: [PATCH 14/19] chore: lock react plugin version --- packages/runtime/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/package.json b/packages/runtime/package.json index f2e73e43e2..af3ec4cf30 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -41,7 +41,7 @@ "@types/react-dom": "^18.0.3", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-server-dom-webpack": "canary", + "react-server-dom-webpack": "18.3.0-canary-dd480ef92-20230822", "regenerator-runtime": "^0.13.9", "@remix-run/web-fetch": "^4.3.3" }, From 7544affdf2fd1a1dad274a63bd55ef1549c963a7 Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Mon, 23 Oct 2023 14:40:02 +0800 Subject: [PATCH 15/19] chore: update lock --- pnpm-lock.yaml | 1543 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 1312 insertions(+), 231 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e466e300c..74464457fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1313,8 +1313,8 @@ importers: '@types/react-dom': ^18.0.0 regenerator-runtime: ^0.13.9 devDependencies: - '@ice/app': link:../ice - '@ice/runtime': link:../runtime + '@ice/app': 3.3.5 + '@ice/runtime': 1.3.1 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 regenerator-runtime: 0.13.11 @@ -1328,8 +1328,8 @@ importers: dependencies: '@ice/cache-canvas': link:../cache-canvas devDependencies: - '@ice/app': link:../ice - '@ice/runtime': link:../runtime + '@ice/app': 3.3.5_webpack@5.88.2 + '@ice/runtime': 1.3.1 webpack: 5.88.2 packages/plugin-css-assets-local: @@ -1341,7 +1341,7 @@ importers: consola: 2.15.3 extract-css-assets-webpack-plugin: 0.2.10 devDependencies: - '@ice/app': link:../ice + '@ice/app': 3.3.5 packages/plugin-fusion: specifiers: @@ -1350,7 +1350,7 @@ importers: dependencies: '@ice/style-import': link:../style-import devDependencies: - '@ice/app': link:../ice + '@ice/app': 3.3.5 packages/plugin-i18n: specifiers: @@ -1458,15 +1458,15 @@ importers: regenerator-runtime: 0.11.1 sax: 1.2.4 devDependencies: - '@ice/app': link:../ice - '@ice/runtime': link:../runtime + '@ice/app': 3.3.5_webpack@5.88.2 + '@ice/runtime': 1.3.1 webpack: 5.88.2 packages/plugin-moment-locales: specifiers: '@ice/app': ^3.3.2 devDependencies: - '@ice/app': link:../ice + '@ice/app': 3.3.5 packages/plugin-pha: specifiers: @@ -1489,7 +1489,7 @@ importers: humps: 2.0.1 lodash.clonedeep: 4.5.0 devDependencies: - '@ice/app': link:../ice + '@ice/app': 3.3.5_ls5vlc7kphql6b6gtepk5p7cmu build-scripts: 2.1.2-0 esbuild: 0.17.16 webpack: 5.88.2_esbuild@0.17.16 @@ -1522,7 +1522,7 @@ importers: style-unit: 3.0.5 stylesheet-loader: 0.9.1 devDependencies: - '@ice/app': link:../ice + '@ice/app': 3.3.5_webpack@5.88.2 '@types/lodash-es': 4.17.7 webpack: 5.88.2 @@ -1539,8 +1539,8 @@ importers: ahooks: 3.7.5 axios: 0.27.2 devDependencies: - '@ice/app': link:../ice - '@ice/runtime': link:../runtime + '@ice/app': 3.3.5 + '@ice/runtime': 1.3.1 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 regenerator-runtime: 0.13.11 @@ -1632,7 +1632,7 @@ importers: react: ^18.2.0 react-dom: ^18.2.0 react-router-dom: 6.14.2 - react-server-dom-webpack: canary + react-server-dom-webpack: 18.3.0-canary-dd480ef92-20230822 regenerator-runtime: ^0.13.9 semver: ^7.4.0 source-map: ^0.7.4 @@ -1654,7 +1654,7 @@ importers: '@types/react-dom': 18.0.11 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-server-dom-webpack: 18.3.0-canary-2807d781a-20230918_biqbaboplfbrettd7655fr4n2y + react-server-dom-webpack: 18.3.0-canary-dd480ef92-20230822_biqbaboplfbrettd7655fr4n2y regenerator-runtime: 0.13.11 packages/shared: @@ -1719,7 +1719,7 @@ importers: dependencies: consola: 2.15.3 devDependencies: - '@ice/webpack-config': link:../webpack-config + '@ice/webpack-config': 1.1.4_webpack@5.88.2 webpack: 5.88.2 website: @@ -5481,191 +5481,885 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@ice/css-modules-hash-darwin-arm64/0.0.6: - resolution: {integrity: sha512-5QWZl3+biY5U/kRhymH+6X/kAk3Imvkqu9QpV+LTDxhoXEkdhzZd2sCO5ZNfrsODFuHy78iKzh6gEweADPwYkQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-darwin-universal/0.0.6: - resolution: {integrity: sha512-PLmDCFZHvpNysvMhUa363QWvgCMIwr6vYwEkHkC/AF9NZvl25r2R9mfdExHw8sZHu9fMHVINwWEBcMiYbZd/cg==} - engines: {node: '>= 10'} - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-darwin-x64/0.0.6: - resolution: {integrity: sha512-HOmh+Yiw6rH9VJD2XBN7sZmigo+jwi7qAD/J12pbxVrMJ//aIsv3BwpgFhfGO8eqKeyVqNXac3S/vC2hq8t8jw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-linux-x64-gnu/0.0.6: - resolution: {integrity: sha512-PS7lTINETFqzbU0nbgLgxXJOp+BU51VvNeNEF1h6Xz6soR23yqFht6d8xuNC1auBnPHZM+RDiQYzwi9MCBTvgA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-linux-x64-musl/0.0.6: - resolution: {integrity: sha512-UiDg8KpoDGmQrBt9z5lqjr+OAG2S2xQi00Unt2yali1dvhS1tpcN16isiBA2yO3JOy2b0Y0VtlmpJKxpMDsFcg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-win32-arm64-msvc/0.0.6: - resolution: {integrity: sha512-7rF1gX9QyhhGUo4JKZUQ6DSJs/xJiJlrKC9D91dkTHs81e0G6IQLv9EnIaX2OPF3/SPnqp7CAGxr7TOtDYsyAw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash-win32-x64-msvc/0.0.6: - resolution: {integrity: sha512-on3tYfhvBW6XQ6tkE0KKZvFK0JB/iwBrvUiRo/Di3ceJPPwD619PJNNQnn78kqcrZIVdQZ41HMdyuEnz8UHVpQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@ice/css-modules-hash/0.0.6: - resolution: {integrity: sha512-UbYq2Ldw+hamc9HoIfKTZORmmYCaGnP6f361XdB/7PQZHZ5hAak6TePdcVQekLHGEg/+zIccN33mflJqucC1Aw==} - engines: {node: '>= 10'} - optionalDependencies: - '@ice/css-modules-hash-darwin-arm64': 0.0.6 - '@ice/css-modules-hash-darwin-universal': 0.0.6 - '@ice/css-modules-hash-darwin-x64': 0.0.6 - '@ice/css-modules-hash-linux-x64-gnu': 0.0.6 - '@ice/css-modules-hash-linux-x64-musl': 0.0.6 - '@ice/css-modules-hash-win32-arm64-msvc': 0.0.6 - '@ice/css-modules-hash-win32-x64-msvc': 0.0.6 - dev: false - - /@ice/pkg/1.5.5: - resolution: {integrity: sha512-0BIfv6Uzs2wpHv7RmFwz+kWfoJLfx0yJrQyh3yqy+F6TZWxTwrqQmX+5yRmgqK5f7lGGhYfMMVNWjRSCw5MHPQ==} - engines: {node: '>=16.14.0'} + /@ice/app/3.3.5: + resolution: {integrity: sha512-loVbr/CqH5suvWchw/mvbLS/yfO/qsxOx/KvcmdQYA8Unr0J1fYHrBFlYbKmpJe0aEDnSfSzDKebJsbyDTKGJQ==} + engines: {node: '>=14.19.0', npm: '>=3.0.0'} hasBin: true + requiresBuild: true + peerDependencies: + react: '>=18.0.0' + react-dom: '>=18.0.0' dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/core': 7.21.0 - '@babel/parser': 7.21.2 - '@babel/preset-react': 7.18.6_@babel+core@7.21.0 - '@babel/preset-typescript': 7.21.0_@babel+core@7.21.0 - '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 - '@rollup/plugin-image': 3.0.2_rollup@2.79.1 - '@rollup/plugin-json': 4.1.0_rollup@2.79.1 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 - '@rollup/plugin-replace': 5.0.2_rollup@2.79.1 - '@rollup/pluginutils': 4.2.1 - '@swc/core': 1.3.32 - acorn: 8.8.2 - autoprefixer: 10.4.13_postcss@8.4.25 - build-scripts: 2.1.0 - cac: 6.7.14 - chokidar: 3.5.3 + '@ice/bundles': 0.1.16_oikrtulvecolg3hvcan4tch6ku + '@ice/route-manifest': 1.2.2 + '@ice/rspack-config': 1.0.5_oikrtulvecolg3hvcan4tch6ku + '@ice/runtime': 1.3.1 + '@ice/shared-config': 1.1.0_oikrtulvecolg3hvcan4tch6ku + '@ice/webpack-config': 1.1.4_oikrtulvecolg3hvcan4tch6ku + '@swc/helpers': 0.5.1 + '@types/express': 4.17.17 + address: 1.2.2 + build-scripts: 2.1.2-0 + chalk: 4.1.2 + commander: 9.5.0 consola: 2.15.3 - debug: 4.3.4 - deepmerge: 4.3.0 - escape-string-regexp: 5.0.0 + cross-spawn: 7.0.3 + detect-port: 1.5.1 + dotenv: 16.0.3 + dotenv-expand: 8.0.3 + ejs: 3.1.8 + fast-glob: 3.3.0 + find-up: 5.0.0 fs-extra: 10.1.0 - globby: 11.1.0 - gzip-size: 7.0.0 - lodash.merge: 4.6.2 - magic-string: 0.25.9 - picocolors: 1.0.0 - postcss: 8.4.25 - rollup: 2.79.1 - rollup-plugin-styles: 4.0.0_rollup@2.79.1 - rollup-plugin-visualizer: 5.9.0_rollup@2.79.1 - tsc-alias: 1.8.5 - typescript: 4.9.5 + micromatch: 4.0.5 + mlly: 1.1.1 + mrmime: 1.0.1 + open: 8.4.2 + path-to-regexp: 6.2.1 + regenerator-runtime: 0.13.11 + resolve.exports: 1.1.1 + semver: 7.4.0 + source-map-support: 0.5.21 + temp: 0.9.4 + yargs-parser: 21.1.1 transitivePeerDependencies: + - '@types/webpack' + - bufferutil + - debug + - sockjs-client - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve dev: true - /@ice/sandbox/1.1.4: - resolution: {integrity: sha512-MEVF0Ze3McKDutnFiUAhUoc+WwOFxITVBgSSHmbGpKtWbXJX9kUVlx3VsEVJvdqU3O1kiBNx6zE1sFMjKPRTIQ==} - dev: false - - /@ice/stark-app/1.5.0: - resolution: {integrity: sha512-9fuCri48eZj6TnfPkCju4vVLhGurz+mt6lFx4JQFHhnRBQ5MuiBqRZg5F/3vdnJ7dAYQJlCXmHlQtBHok82z+g==} - dev: false - - /@ice/stark/2.7.5: - resolution: {integrity: sha512-HyV3/6PtTfNiKBkncztunpjsWMBw/SyQ24TvrYLnpkuSmrlZ9t0/jkJWuaM6nGpAufyZ62YfQ2Tn032So9OeIg==} - peerDependencies: - react: '>=15.0.0' - dependencies: - '@ice/sandbox': 1.1.4 - lodash.isempty: 4.4.0 - lodash.isequal: 4.5.0 - path-to-regexp: 1.8.0 - url-parse: 1.5.10 - dev: false - - /@ice/store/2.0.3_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-U1YcY380bejqc3+WtkEqIwE6HnjBjSKd4IWFyq8gakPeAvA6fEJ58Qx9hzscYxlogWbiCb0Wm9kqkcDU+njx7g==} + /@ice/app/3.3.5_ls5vlc7kphql6b6gtepk5p7cmu: + resolution: {integrity: sha512-loVbr/CqH5suvWchw/mvbLS/yfO/qsxOx/KvcmdQYA8Unr0J1fYHrBFlYbKmpJe0aEDnSfSzDKebJsbyDTKGJQ==} + engines: {node: '>=14.19.0', npm: '>=3.0.0'} + hasBin: true + requiresBuild: true peerDependencies: - react: ^16.8 || ^17 || ^18 - dependencies: - immer: 9.0.19 - lodash.isfunction: 3.0.9 - react: 18.2.0 - react-redux: 7.2.9_biqbaboplfbrettd7655fr4n2y - redux: 4.2.1 - redux-thunk: 2.4.2_redux@4.2.1 - transitivePeerDependencies: - - react-dom - - react-native - dev: false - - /@ice/swc-plugin-keep-export/0.2.0: - resolution: {integrity: sha512-N3tg4BOV78jZSR/9CypJf5YzHxrNi40dNlUAwFjf7nr9pzMvVlo9bZM0I/A9l6J9vMff/5mgtkW5+JiMYdyjig==} - dev: false - - /@ice/swc-plugin-node-transform/0.2.0: - resolution: {integrity: sha512-06NtOUGVAUKP1eQXGMkaIZpNl9d5RK6SB6xQJsMY/DIso8WnwymyN7hmoFXPzX0eFkhmQEc7jzJ7NDBXaXRqWQ==} - dev: false - - /@ice/swc-plugin-react-server-component/0.1.1: - resolution: {integrity: sha512-3FdXOZ7HTBHY+DKQXDpzqV10ngfl0ifffc7HFV0P4YPLfvEJjT0RxIZJW1QwRZ3QeB2ph4zvXfdBG1lYTzT58Q==} - dev: false - - /@ice/swc-plugin-remove-export/0.2.0: - resolution: {integrity: sha512-kmyrCMtuEsS7J3rpENT5qUhhbuu3eldsN1WpJjtXX4rgogJ1+QmnAPjnhB0SWzr0/b5ArGfz83O6M+5NNGRd+A==} - dev: false - - /@iceworks/generate-project/2.0.2: - resolution: {integrity: sha512-t7/uHl5kM71o+xyR+FnaPsgyFqhFQm89TdqPahM4Kv/ubdKDknFVUYLio1khMDGY8Ops0ahn/+KM+gFnHEKSQw==} - engines: {node: '>=12.20.0'} + react: '>=18.0.0' + react-dom: '>=18.0.0' dependencies: - '@appworks/constant': 0.1.4 + '@ice/bundles': 0.1.16_4mgkpocji6i4c7t543qhprlmp4 + '@ice/route-manifest': 1.2.2 + '@ice/rspack-config': 1.0.5_4mgkpocji6i4c7t543qhprlmp4 + '@ice/runtime': 1.3.1 + '@ice/shared-config': 1.1.0_4mgkpocji6i4c7t543qhprlmp4 + '@ice/webpack-config': 1.1.4_4mgkpocji6i4c7t543qhprlmp4 + '@swc/helpers': 0.5.1 + '@types/express': 4.17.17 + address: 1.2.2 + build-scripts: 2.1.2-0 + chalk: 4.1.2 + commander: 9.5.0 + consola: 2.15.3 + cross-spawn: 7.0.3 + detect-port: 1.5.1 + dotenv: 16.0.3 + dotenv-expand: 8.0.3 ejs: 3.1.8 - fs-extra: 8.1.0 - glob: 7.2.3 - ice-npm-utils: 3.0.2 - ora: 5.4.1 - prettier: 2.8.4 + fast-glob: 3.3.0 + find-up: 5.0.0 + fs-extra: 10.1.0 + micromatch: 4.0.5 + mlly: 1.1.1 + mrmime: 1.0.1 + open: 8.4.2 + path-to-regexp: 6.2.1 + regenerator-runtime: 0.13.11 + resolve.exports: 1.1.1 + semver: 7.4.0 + source-map-support: 0.5.21 + temp: 0.9.4 + yargs-parser: 21.1.1 transitivePeerDependencies: + - '@types/webpack' + - bufferutil - debug - dev: false - - /@istanbuljs/load-nyc-config/1.1.0: + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/app/3.3.5_webpack@5.88.2: + resolution: {integrity: sha512-loVbr/CqH5suvWchw/mvbLS/yfO/qsxOx/KvcmdQYA8Unr0J1fYHrBFlYbKmpJe0aEDnSfSzDKebJsbyDTKGJQ==} + engines: {node: '>=14.19.0', npm: '>=3.0.0'} + hasBin: true + requiresBuild: true + peerDependencies: + react: '>=18.0.0' + react-dom: '>=18.0.0' + dependencies: + '@ice/bundles': 0.1.16_nybtr22olkopkms5hv7r5oud4i + '@ice/route-manifest': 1.2.2 + '@ice/rspack-config': 1.0.5_nybtr22olkopkms5hv7r5oud4i + '@ice/runtime': 1.3.1 + '@ice/shared-config': 1.1.0_nybtr22olkopkms5hv7r5oud4i + '@ice/webpack-config': 1.1.4_nybtr22olkopkms5hv7r5oud4i + '@swc/helpers': 0.5.1 + '@types/express': 4.17.17 + address: 1.2.2 + build-scripts: 2.1.2-0 + chalk: 4.1.2 + commander: 9.5.0 + consola: 2.15.3 + cross-spawn: 7.0.3 + detect-port: 1.5.1 + dotenv: 16.0.3 + dotenv-expand: 8.0.3 + ejs: 3.1.8 + fast-glob: 3.3.0 + find-up: 5.0.0 + fs-extra: 10.1.0 + micromatch: 4.0.5 + mlly: 1.1.1 + mrmime: 1.0.1 + open: 8.4.2 + path-to-regexp: 6.2.1 + regenerator-runtime: 0.13.11 + resolve.exports: 1.1.1 + semver: 7.4.0 + source-map-support: 0.5.21 + temp: 0.9.4 + yargs-parser: 21.1.1 + transitivePeerDependencies: + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/bundles/0.1.16_4mgkpocji6i4c7t543qhprlmp4: + resolution: {integrity: sha512-1wpmStho4gUplggwERopzmIz2NkEaRwnzta7ZpoNBzCM/KaTI9FvbTGuty087kQq81uu4mFfozYS+Bw6kk6bVA==} + dependencies: + '@ice/css-modules-hash': 0.0.6 + '@ice/swc-plugin-keep-export': 0.2.0 + '@ice/swc-plugin-node-transform': 0.2.0 + '@ice/swc-plugin-remove-export': 0.2.0 + '@rspack/core': 0.3.0_ls5vlc7kphql6b6gtepk5p7cmu + '@rspack/dev-server': 0.3.0_xwlm2ukmbpiz7ykxwfclqtcmji + '@swc/core': 1.3.80_@swc+helpers@0.5.1 + ansi-html-community: 0.0.8 + caniuse-lite: 1.0.30001462 + chokidar: 3.5.3 + core-js: 3.32.0 + core-js-pure: 3.29.0 + error-stack-parser: 2.1.4 + esbuild: 0.17.16 + events: 3.3.0 + html-entities: 2.3.3 + jest-worker: 27.5.1 + less: 4.1.2 + postcss: 8.4.12 + react-refresh: 0.14.0 + sass: 1.50.0 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/bundles/0.1.16_nybtr22olkopkms5hv7r5oud4i: + resolution: {integrity: sha512-1wpmStho4gUplggwERopzmIz2NkEaRwnzta7ZpoNBzCM/KaTI9FvbTGuty087kQq81uu4mFfozYS+Bw6kk6bVA==} + dependencies: + '@ice/css-modules-hash': 0.0.6 + '@ice/swc-plugin-keep-export': 0.2.0 + '@ice/swc-plugin-node-transform': 0.2.0 + '@ice/swc-plugin-remove-export': 0.2.0 + '@rspack/core': 0.3.0_webpack@5.88.2 + '@rspack/dev-server': 0.3.0_xwlm2ukmbpiz7ykxwfclqtcmji + '@swc/core': 1.3.80_@swc+helpers@0.5.1 + ansi-html-community: 0.0.8 + caniuse-lite: 1.0.30001462 + chokidar: 3.5.3 + core-js: 3.32.0 + core-js-pure: 3.29.0 + error-stack-parser: 2.1.4 + esbuild: 0.17.16 + events: 3.3.0 + html-entities: 2.3.3 + jest-worker: 27.5.1 + less: 4.1.2 + postcss: 8.4.12 + react-refresh: 0.14.0 + sass: 1.50.0 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/bundles/0.1.16_oikrtulvecolg3hvcan4tch6ku: + resolution: {integrity: sha512-1wpmStho4gUplggwERopzmIz2NkEaRwnzta7ZpoNBzCM/KaTI9FvbTGuty087kQq81uu4mFfozYS+Bw6kk6bVA==} + dependencies: + '@ice/css-modules-hash': 0.0.6 + '@ice/swc-plugin-keep-export': 0.2.0 + '@ice/swc-plugin-node-transform': 0.2.0 + '@ice/swc-plugin-remove-export': 0.2.0 + '@rspack/core': 0.3.0 + '@rspack/dev-server': 0.3.0_xwlm2ukmbpiz7ykxwfclqtcmji + '@swc/core': 1.3.80_@swc+helpers@0.5.1 + ansi-html-community: 0.0.8 + caniuse-lite: 1.0.30001462 + chokidar: 3.5.3 + core-js: 3.32.0 + core-js-pure: 3.29.0 + error-stack-parser: 2.1.4 + esbuild: 0.17.16 + events: 3.3.0 + html-entities: 2.3.3 + jest-worker: 27.5.1 + less: 4.1.2 + postcss: 8.4.12 + react-refresh: 0.14.0 + sass: 1.50.0 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/bundles/0.1.16_webpack@5.88.2: + resolution: {integrity: sha512-1wpmStho4gUplggwERopzmIz2NkEaRwnzta7ZpoNBzCM/KaTI9FvbTGuty087kQq81uu4mFfozYS+Bw6kk6bVA==} + dependencies: + '@ice/css-modules-hash': 0.0.6 + '@ice/swc-plugin-keep-export': 0.2.0 + '@ice/swc-plugin-node-transform': 0.2.0 + '@ice/swc-plugin-remove-export': 0.2.0 + '@rspack/core': 0.3.0_webpack@5.88.2 + '@rspack/dev-server': 0.3.0_bioma5hrmjqlc63rjodddzwoma + '@swc/core': 1.3.80 + ansi-html-community: 0.0.8 + caniuse-lite: 1.0.30001462 + chokidar: 3.5.3 + core-js: 3.32.0 + core-js-pure: 3.29.0 + error-stack-parser: 2.1.4 + esbuild: 0.17.16 + events: 3.3.0 + html-entities: 2.3.3 + jest-worker: 27.5.1 + less: 4.1.2 + postcss: 8.4.12 + react-refresh: 0.14.0 + sass: 1.50.0 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/css-modules-hash-darwin-arm64/0.0.6: + resolution: {integrity: sha512-5QWZl3+biY5U/kRhymH+6X/kAk3Imvkqu9QpV+LTDxhoXEkdhzZd2sCO5ZNfrsODFuHy78iKzh6gEweADPwYkQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-darwin-universal/0.0.6: + resolution: {integrity: sha512-PLmDCFZHvpNysvMhUa363QWvgCMIwr6vYwEkHkC/AF9NZvl25r2R9mfdExHw8sZHu9fMHVINwWEBcMiYbZd/cg==} + engines: {node: '>= 10'} + os: [darwin] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-darwin-x64/0.0.6: + resolution: {integrity: sha512-HOmh+Yiw6rH9VJD2XBN7sZmigo+jwi7qAD/J12pbxVrMJ//aIsv3BwpgFhfGO8eqKeyVqNXac3S/vC2hq8t8jw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-linux-x64-gnu/0.0.6: + resolution: {integrity: sha512-PS7lTINETFqzbU0nbgLgxXJOp+BU51VvNeNEF1h6Xz6soR23yqFht6d8xuNC1auBnPHZM+RDiQYzwi9MCBTvgA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-linux-x64-musl/0.0.6: + resolution: {integrity: sha512-UiDg8KpoDGmQrBt9z5lqjr+OAG2S2xQi00Unt2yali1dvhS1tpcN16isiBA2yO3JOy2b0Y0VtlmpJKxpMDsFcg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-win32-arm64-msvc/0.0.6: + resolution: {integrity: sha512-7rF1gX9QyhhGUo4JKZUQ6DSJs/xJiJlrKC9D91dkTHs81e0G6IQLv9EnIaX2OPF3/SPnqp7CAGxr7TOtDYsyAw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + + /@ice/css-modules-hash-win32-x64-msvc/0.0.6: + resolution: {integrity: sha512-on3tYfhvBW6XQ6tkE0KKZvFK0JB/iwBrvUiRo/Di3ceJPPwD619PJNNQnn78kqcrZIVdQZ41HMdyuEnz8UHVpQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + + /@ice/css-modules-hash/0.0.6: + resolution: {integrity: sha512-UbYq2Ldw+hamc9HoIfKTZORmmYCaGnP6f361XdB/7PQZHZ5hAak6TePdcVQekLHGEg/+zIccN33mflJqucC1Aw==} + engines: {node: '>= 10'} + optionalDependencies: + '@ice/css-modules-hash-darwin-arm64': 0.0.6 + '@ice/css-modules-hash-darwin-universal': 0.0.6 + '@ice/css-modules-hash-darwin-x64': 0.0.6 + '@ice/css-modules-hash-linux-x64-gnu': 0.0.6 + '@ice/css-modules-hash-linux-x64-musl': 0.0.6 + '@ice/css-modules-hash-win32-arm64-msvc': 0.0.6 + '@ice/css-modules-hash-win32-x64-msvc': 0.0.6 + + /@ice/jsx-runtime/0.2.2: + resolution: {integrity: sha512-RKwn3QgqualrWz+HxGZh7gS5lmCHIwvF6oVRsZbUI6Ekll98RrgGGvUvkn1SdSF7fYqWOG4ZA4neplBCJqf4NA==} + peerDependencies: + react: ^16 || ^17 || ^18 + dependencies: + style-unit: 3.0.5 + dev: true + + /@ice/jsx-runtime/0.2.2_react@18.2.0: + resolution: {integrity: sha512-RKwn3QgqualrWz+HxGZh7gS5lmCHIwvF6oVRsZbUI6Ekll98RrgGGvUvkn1SdSF7fYqWOG4ZA4neplBCJqf4NA==} + peerDependencies: + react: ^16 || ^17 || ^18 + dependencies: + react: 18.2.0 + style-unit: 3.0.5 + dev: false + + /@ice/pkg/1.5.5: + resolution: {integrity: sha512-0BIfv6Uzs2wpHv7RmFwz+kWfoJLfx0yJrQyh3yqy+F6TZWxTwrqQmX+5yRmgqK5f7lGGhYfMMVNWjRSCw5MHPQ==} + engines: {node: '>=16.14.0'} + hasBin: true + dependencies: + '@ampproject/remapping': 2.2.0 + '@babel/core': 7.21.0 + '@babel/parser': 7.21.2 + '@babel/preset-react': 7.18.6_@babel+core@7.21.0 + '@babel/preset-typescript': 7.21.0_@babel+core@7.21.0 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-image': 3.0.2_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@rollup/plugin-replace': 5.0.2_rollup@2.79.1 + '@rollup/pluginutils': 4.2.1 + '@swc/core': 1.3.32 + acorn: 8.8.2 + autoprefixer: 10.4.13_postcss@8.4.25 + build-scripts: 2.1.0 + cac: 6.7.14 + chokidar: 3.5.3 + consola: 2.15.3 + debug: 4.3.4 + deepmerge: 4.3.0 + escape-string-regexp: 5.0.0 + fs-extra: 10.1.0 + globby: 11.1.0 + gzip-size: 7.0.0 + lodash.merge: 4.6.2 + magic-string: 0.25.9 + picocolors: 1.0.0 + postcss: 8.4.25 + rollup: 2.79.1 + rollup-plugin-styles: 4.0.0_rollup@2.79.1 + rollup-plugin-visualizer: 5.9.0_rollup@2.79.1 + tsc-alias: 1.8.5 + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@ice/route-manifest/1.2.2: + resolution: {integrity: sha512-wu8qg/3MKnUkldOIq8fJYwnMoc2YmtQ/ry2OeQdnrHK8S+H4gbwR3uRseioKfoUhpMw0Ds7bjVDLX3ucGY078Q==} + dependencies: + minimatch: 5.1.6 + dev: true + + /@ice/rspack-config/1.0.5_4mgkpocji6i4c7t543qhprlmp4: + resolution: {integrity: sha512-dMvsK36Q3IzQGyT32b6fGpg7Rwla57jvo/gaQoQ8N5Zg+hnnTgSbfSj23/QaN82CxxnnSKCjsFlXeBA4tcDeBA==} + dependencies: + '@ice/bundles': 0.1.16_4mgkpocji6i4c7t543qhprlmp4 + '@ice/shared-config': 1.1.0_4mgkpocji6i4c7t543qhprlmp4 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/rspack-config/1.0.5_nybtr22olkopkms5hv7r5oud4i: + resolution: {integrity: sha512-dMvsK36Q3IzQGyT32b6fGpg7Rwla57jvo/gaQoQ8N5Zg+hnnTgSbfSj23/QaN82CxxnnSKCjsFlXeBA4tcDeBA==} + dependencies: + '@ice/bundles': 0.1.16_nybtr22olkopkms5hv7r5oud4i + '@ice/shared-config': 1.1.0_nybtr22olkopkms5hv7r5oud4i + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/rspack-config/1.0.5_oikrtulvecolg3hvcan4tch6ku: + resolution: {integrity: sha512-dMvsK36Q3IzQGyT32b6fGpg7Rwla57jvo/gaQoQ8N5Zg+hnnTgSbfSj23/QaN82CxxnnSKCjsFlXeBA4tcDeBA==} + dependencies: + '@ice/bundles': 0.1.16_oikrtulvecolg3hvcan4tch6ku + '@ice/shared-config': 1.1.0_oikrtulvecolg3hvcan4tch6ku + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/runtime/1.3.1: + resolution: {integrity: sha512-Bil7i9KQF1Mu8BaT9eHvSEDk36/eYvhKQ16L6QEfiEu/rKB7AjcV38RK5q1RH8SYRQP6rdqH9z7OLsVxZjqOVA==} + requiresBuild: true + peerDependencies: + react: ^18.1.0 + react-dom: ^18.1.0 + dependencies: + '@ice/jsx-runtime': 0.2.2 + '@ice/shared': 1.0.2 + '@remix-run/router': 1.7.2 + abortcontroller-polyfill: 1.7.5 + ejs: 3.1.8 + fs-extra: 10.1.0 + history: 5.3.0 + htmlparser2: 8.0.1 + react-router-dom: 6.14.2 + semver: 7.4.0 + source-map: 0.7.4 + dev: true + + /@ice/runtime/1.3.1_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-Bil7i9KQF1Mu8BaT9eHvSEDk36/eYvhKQ16L6QEfiEu/rKB7AjcV38RK5q1RH8SYRQP6rdqH9z7OLsVxZjqOVA==} + requiresBuild: true + peerDependencies: + react: ^18.1.0 + react-dom: ^18.1.0 + dependencies: + '@ice/jsx-runtime': 0.2.2_react@18.2.0 + '@ice/shared': 1.0.2 + '@remix-run/router': 1.7.2 + abortcontroller-polyfill: 1.7.5 + ejs: 3.1.8 + fs-extra: 10.1.0 + history: 5.3.0 + htmlparser2: 8.0.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-router-dom: 6.14.2_biqbaboplfbrettd7655fr4n2y + semver: 7.4.0 + source-map: 0.7.4 + dev: false + + /@ice/runtime/1.3.1_react@18.2.0: + resolution: {integrity: sha512-Bil7i9KQF1Mu8BaT9eHvSEDk36/eYvhKQ16L6QEfiEu/rKB7AjcV38RK5q1RH8SYRQP6rdqH9z7OLsVxZjqOVA==} + requiresBuild: true + peerDependencies: + react: ^18.1.0 + react-dom: ^18.1.0 + dependencies: + '@ice/jsx-runtime': 0.2.2_react@18.2.0 + '@ice/shared': 1.0.2 + '@remix-run/router': 1.7.2 + abortcontroller-polyfill: 1.7.5 + ejs: 3.1.8 + fs-extra: 10.1.0 + history: 5.3.0 + htmlparser2: 8.0.1 + react: 18.2.0 + react-router-dom: 6.14.2_react@18.2.0 + semver: 7.4.0 + source-map: 0.7.4 + dev: false + + /@ice/sandbox/1.1.4: + resolution: {integrity: sha512-MEVF0Ze3McKDutnFiUAhUoc+WwOFxITVBgSSHmbGpKtWbXJX9kUVlx3VsEVJvdqU3O1kiBNx6zE1sFMjKPRTIQ==} + dev: false + + /@ice/shared-config/1.1.0_4mgkpocji6i4c7t543qhprlmp4: + resolution: {integrity: sha512-5llovTXzFFPyCZNVV+i1LcC6M8FLjNK3v8Y9DmeL2jtOyB+jBMlkCWRALPE6qsSoeJG1T41MfrDyaeIs8CY2kA==} + dependencies: + '@ice/bundles': 0.1.16_4mgkpocji6i4c7t543qhprlmp4 + '@rollup/pluginutils': 4.2.1 + browserslist: 4.21.5 + consola: 2.15.3 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/shared-config/1.1.0_nybtr22olkopkms5hv7r5oud4i: + resolution: {integrity: sha512-5llovTXzFFPyCZNVV+i1LcC6M8FLjNK3v8Y9DmeL2jtOyB+jBMlkCWRALPE6qsSoeJG1T41MfrDyaeIs8CY2kA==} + dependencies: + '@ice/bundles': 0.1.16_nybtr22olkopkms5hv7r5oud4i + '@rollup/pluginutils': 4.2.1 + browserslist: 4.21.5 + consola: 2.15.3 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/shared-config/1.1.0_oikrtulvecolg3hvcan4tch6ku: + resolution: {integrity: sha512-5llovTXzFFPyCZNVV+i1LcC6M8FLjNK3v8Y9DmeL2jtOyB+jBMlkCWRALPE6qsSoeJG1T41MfrDyaeIs8CY2kA==} + dependencies: + '@ice/bundles': 0.1.16_oikrtulvecolg3hvcan4tch6ku + '@rollup/pluginutils': 4.2.1 + browserslist: 4.21.5 + consola: 2.15.3 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/shared-config/1.1.0_webpack@5.88.2: + resolution: {integrity: sha512-5llovTXzFFPyCZNVV+i1LcC6M8FLjNK3v8Y9DmeL2jtOyB+jBMlkCWRALPE6qsSoeJG1T41MfrDyaeIs8CY2kA==} + dependencies: + '@ice/bundles': 0.1.16_webpack@5.88.2 + '@rollup/pluginutils': 4.2.1 + browserslist: 4.21.5 + consola: 2.15.3 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/shared/1.0.2: + resolution: {integrity: sha512-fSSTUzQEqodKsnvIFShJujp8qljCd88QjfEDJ9JIGgeHQfanMjZeL8s+jwI4o6L0oYl6Xg0hh/3UTIJ1Xar7KQ==} + + /@ice/stark-app/1.5.0: + resolution: {integrity: sha512-9fuCri48eZj6TnfPkCju4vVLhGurz+mt6lFx4JQFHhnRBQ5MuiBqRZg5F/3vdnJ7dAYQJlCXmHlQtBHok82z+g==} + dev: false + + /@ice/stark/2.7.5: + resolution: {integrity: sha512-HyV3/6PtTfNiKBkncztunpjsWMBw/SyQ24TvrYLnpkuSmrlZ9t0/jkJWuaM6nGpAufyZ62YfQ2Tn032So9OeIg==} + peerDependencies: + react: '>=15.0.0' + dependencies: + '@ice/sandbox': 1.1.4 + lodash.isempty: 4.4.0 + lodash.isequal: 4.5.0 + path-to-regexp: 1.8.0 + url-parse: 1.5.10 + dev: false + + /@ice/store/2.0.3_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-U1YcY380bejqc3+WtkEqIwE6HnjBjSKd4IWFyq8gakPeAvA6fEJ58Qx9hzscYxlogWbiCb0Wm9kqkcDU+njx7g==} + peerDependencies: + react: ^16.8 || ^17 || ^18 + dependencies: + immer: 9.0.19 + lodash.isfunction: 3.0.9 + react: 18.2.0 + react-redux: 7.2.9_biqbaboplfbrettd7655fr4n2y + redux: 4.2.1 + redux-thunk: 2.4.2_redux@4.2.1 + transitivePeerDependencies: + - react-dom + - react-native + dev: false + + /@ice/swc-plugin-keep-export/0.2.0: + resolution: {integrity: sha512-N3tg4BOV78jZSR/9CypJf5YzHxrNi40dNlUAwFjf7nr9pzMvVlo9bZM0I/A9l6J9vMff/5mgtkW5+JiMYdyjig==} + + /@ice/swc-plugin-node-transform/0.2.0: + resolution: {integrity: sha512-06NtOUGVAUKP1eQXGMkaIZpNl9d5RK6SB6xQJsMY/DIso8WnwymyN7hmoFXPzX0eFkhmQEc7jzJ7NDBXaXRqWQ==} + + /@ice/swc-plugin-react-server-component/0.1.1: + resolution: {integrity: sha512-3FdXOZ7HTBHY+DKQXDpzqV10ngfl0ifffc7HFV0P4YPLfvEJjT0RxIZJW1QwRZ3QeB2ph4zvXfdBG1lYTzT58Q==} + dev: false + + /@ice/swc-plugin-remove-export/0.2.0: + resolution: {integrity: sha512-kmyrCMtuEsS7J3rpENT5qUhhbuu3eldsN1WpJjtXX4rgogJ1+QmnAPjnhB0SWzr0/b5ArGfz83O6M+5NNGRd+A==} + + /@ice/webpack-config/1.1.4_4mgkpocji6i4c7t543qhprlmp4: + resolution: {integrity: sha512-h+ckjRPEPVydvFyca7Mkc6I+mexR+A+1p+QBYK3CfJ2MBEpbZx2t8E6XfaOBes8BZ3ag7yBQDeGrpu9J7Ad+oQ==} + dependencies: + '@ice/bundles': 0.1.16_4mgkpocji6i4c7t543qhprlmp4 + '@ice/shared-config': 1.1.0_4mgkpocji6i4c7t543qhprlmp4 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/webpack-config/1.1.4_nybtr22olkopkms5hv7r5oud4i: + resolution: {integrity: sha512-h+ckjRPEPVydvFyca7Mkc6I+mexR+A+1p+QBYK3CfJ2MBEpbZx2t8E6XfaOBes8BZ3ag7yBQDeGrpu9J7Ad+oQ==} + dependencies: + '@ice/bundles': 0.1.16_nybtr22olkopkms5hv7r5oud4i + '@ice/shared-config': 1.1.0_nybtr22olkopkms5hv7r5oud4i + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/webpack-config/1.1.4_oikrtulvecolg3hvcan4tch6ku: + resolution: {integrity: sha512-h+ckjRPEPVydvFyca7Mkc6I+mexR+A+1p+QBYK3CfJ2MBEpbZx2t8E6XfaOBes8BZ3ag7yBQDeGrpu9J7Ad+oQ==} + dependencies: + '@ice/bundles': 0.1.16_oikrtulvecolg3hvcan4tch6ku + '@ice/shared-config': 1.1.0_oikrtulvecolg3hvcan4tch6ku + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@ice/webpack-config/1.1.4_webpack@5.88.2: + resolution: {integrity: sha512-h+ckjRPEPVydvFyca7Mkc6I+mexR+A+1p+QBYK3CfJ2MBEpbZx2t8E6XfaOBes8BZ3ag7yBQDeGrpu9J7Ad+oQ==} + dependencies: + '@ice/bundles': 0.1.16_webpack@5.88.2 + '@ice/shared-config': 1.1.0_webpack@5.88.2 + fast-glob: 3.3.0 + process: 0.11.10 + transitivePeerDependencies: + - '@swc/helpers' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + + /@iceworks/generate-project/2.0.2: + resolution: {integrity: sha512-t7/uHl5kM71o+xyR+FnaPsgyFqhFQm89TdqPahM4Kv/ubdKDknFVUYLio1khMDGY8Ops0ahn/+KM+gFnHEKSQw==} + engines: {node: '>=12.20.0'} + dependencies: + '@appworks/constant': 0.1.4 + ejs: 3.1.8 + fs-extra: 8.1.0 + glob: 7.2.3 + ice-npm-utils: 3.0.2 + ora: 5.4.1 + prettier: 2.8.4 + transitivePeerDependencies: + - debug + dev: false + + /@istanbuljs/load-nyc-config/1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} dependencies: @@ -6415,7 +7109,6 @@ packages: source-map: 0.7.4 webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u webpack-dev-server: 4.13.1_webpack@5.76.0 - dev: false /@pmmmwh/react-refresh-webpack-plugin/0.5.10_p44l2xjftguod6ctnkuod3jp7e: resolution: {integrity: sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA==} @@ -6534,6 +7227,45 @@ packages: webpack-dev-server: 4.11.1_webpack@5.88.2 dev: true + /@pmmmwh/react-refresh-webpack-plugin/0.5.10_wrxi7ct7dz7g7lwv6srrq7wgqy: + resolution: {integrity: sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA==} + engines: {node: '>= 10.13'} + peerDependencies: + '@types/webpack': 4.x || 5.x + react-refresh: '>=0.10.0 <1.0.0' + sockjs-client: ^1.4.0 + type-fest: '>=0.17.0 <4.0.0' + webpack: '>=4.43.0 <6.0.0' + webpack-dev-server: 3.x || 4.x + webpack-hot-middleware: 2.x + webpack-plugin-serve: 0.x || 1.x + peerDependenciesMeta: + '@types/webpack': + optional: true + sockjs-client: + optional: true + type-fest: + optional: true + webpack-dev-server: + optional: true + webpack-hot-middleware: + optional: true + webpack-plugin-serve: + optional: true + dependencies: + ansi-html-community: 0.0.8 + common-path-prefix: 3.0.0 + core-js-pure: 3.29.0 + error-stack-parser: 2.1.4 + find-up: 5.0.0 + html-entities: 2.3.3 + loader-utils: 2.0.4 + react-refresh: 0.14.0 + schema-utils: 3.1.1 + source-map: 0.7.4 + webpack: 5.88.2 + dev: true + /@pmmmwh/react-refresh-webpack-plugin/0.5.10_ynqbgb5bmgbvx2am6mt2h3lxsq: resolution: {integrity: sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA==} engines: {node: '>= 10.13'} @@ -6987,6 +7719,35 @@ packages: - webpack-plugin-serve dev: true + /@rspack/core/0.3.0_webpack@5.88.2: + resolution: {integrity: sha512-YltE0AQimUMOSTIFuDP+BW2GoJsabrig/GmgCR1eDWlVeKlmGJ6wd2GdYjmW5TWdH6FBQPQ3YfU8GOB4XWsvgQ==} + dependencies: + '@rspack/binding': 0.3.0 + '@rspack/dev-client': 0.3.0_wrxi7ct7dz7g7lwv6srrq7wgqy + '@swc/helpers': 0.5.1 + browserslist: 4.21.5 + compare-versions: 6.0.0-rc.1 + enhanced-resolve: 5.12.0 + graceful-fs: 4.2.10 + neo-async: 2.6.2 + react-refresh: 0.14.0 + schema-utils: 4.0.0 + tapable: 2.2.1 + util: 0.12.5 + watchpack: 2.4.0 + webpack-sources: 3.2.3 + zod: 3.21.4 + zod-validation-error: 1.2.0_zod@3.21.4 + transitivePeerDependencies: + - '@types/webpack' + - sockjs-client + - type-fest + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /@rspack/core/0.3.0_zur76qpjdwubwowmoyfe2ntqhe: resolution: {integrity: sha512-YltE0AQimUMOSTIFuDP+BW2GoJsabrig/GmgCR1eDWlVeKlmGJ6wd2GdYjmW5TWdH6FBQPQ3YfU8GOB4XWsvgQ==} dependencies: @@ -7034,7 +7795,6 @@ packages: - webpack-dev-server - webpack-hot-middleware - webpack-plugin-serve - dev: false /@rspack/dev-client/0.3.0_p44l2xjftguod6ctnkuod3jp7e: resolution: {integrity: sha512-nttTUBVctbh9auvPq91ThmjNDcBLj3kfLDjM/O1jBYA3xTz9MNsTN3rInLOb4S2fWEsSBLz7CVsNLP7LWtUecA==} @@ -7095,6 +7855,26 @@ packages: - webpack-plugin-serve dev: true + /@rspack/dev-client/0.3.0_wrxi7ct7dz7g7lwv6srrq7wgqy: + resolution: {integrity: sha512-nttTUBVctbh9auvPq91ThmjNDcBLj3kfLDjM/O1jBYA3xTz9MNsTN3rInLOb4S2fWEsSBLz7CVsNLP7LWtUecA==} + peerDependencies: + react-refresh: '>=0.10.0 <1.0.0' + peerDependenciesMeta: + react-refresh: + optional: true + dependencies: + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10_wrxi7ct7dz7g7lwv6srrq7wgqy + react-refresh: 0.14.0 + transitivePeerDependencies: + - '@types/webpack' + - sockjs-client + - type-fest + - webpack + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /@rspack/dev-client/0.3.0_ynqbgb5bmgbvx2am6mt2h3lxsq: resolution: {integrity: sha512-nttTUBVctbh9auvPq91ThmjNDcBLj3kfLDjM/O1jBYA3xTz9MNsTN3rInLOb4S2fWEsSBLz7CVsNLP7LWtUecA==} peerDependencies: @@ -7115,6 +7895,40 @@ packages: - webpack-plugin-serve dev: false + /@rspack/dev-server/0.3.0_bioma5hrmjqlc63rjodddzwoma: + resolution: {integrity: sha512-aKY1mUP1PdOWXDvxpUA14mEE7p+IFYnU67i7cAUh361z2/v5KbCTngt521ly8H1LqJv3SJIoEXqSqNc8c62Dsg==} + peerDependencies: + '@rspack/core': '*' + dependencies: + '@rspack/core': 0.3.0_webpack@5.88.2 + '@rspack/dev-client': 0.3.0_4p7fys4vpjth4wnvvzaxfza3hm + chokidar: 3.5.3 + connect-history-api-fallback: 2.0.0 + express: 4.18.1 + http-proxy-middleware: 2.0.6 + mime-types: 2.1.35 + webpack: 5.76.0_yt3h3qjhcnsf3663codtuni62a + webpack-dev-middleware: 6.0.2_webpack@5.76.0 + webpack-dev-server: 4.13.1_webpack@5.76.0 + ws: 8.8.1 + transitivePeerDependencies: + - '@swc/core' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - esbuild + - react-refresh + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack-cli + - webpack-hot-middleware + - webpack-plugin-serve + dev: true + /@rspack/dev-server/0.3.0_j26wtsbar5zhggjrhbiiftx5au: resolution: {integrity: sha512-aKY1mUP1PdOWXDvxpUA14mEE7p+IFYnU67i7cAUh361z2/v5KbCTngt521ly8H1LqJv3SJIoEXqSqNc8c62Dsg==} peerDependencies: @@ -7125,9 +7939,43 @@ packages: chokidar: 3.5.3 connect-history-api-fallback: 2.0.0 express: 4.18.1 - http-proxy-middleware: 2.0.6 + http-proxy-middleware: 2.0.6 + mime-types: 2.1.35 + webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + webpack-dev-middleware: 6.0.2_webpack@5.76.0 + webpack-dev-server: 4.13.1_webpack@5.76.0 + ws: 8.8.1 + transitivePeerDependencies: + - '@swc/core' + - '@types/express' + - '@types/webpack' + - bufferutil + - debug + - esbuild + - react-refresh + - sockjs-client + - supports-color + - type-fest + - uglify-js + - utf-8-validate + - webpack-cli + - webpack-hot-middleware + - webpack-plugin-serve + dev: false + + /@rspack/dev-server/0.3.0_saarlyqjwgcwik7cbeuxgtrvdm: + resolution: {integrity: sha512-aKY1mUP1PdOWXDvxpUA14mEE7p+IFYnU67i7cAUh361z2/v5KbCTngt521ly8H1LqJv3SJIoEXqSqNc8c62Dsg==} + peerDependencies: + '@rspack/core': '*' + dependencies: + '@rspack/core': 0.3.0_ls5vlc7kphql6b6gtepk5p7cmu + '@rspack/dev-client': 0.3.0_p44l2xjftguod6ctnkuod3jp7e + chokidar: 3.5.3 + connect-history-api-fallback: 2.0.0 + express: 4.18.1 + http-proxy-middleware: 2.0.6_@types+express@4.17.17 mime-types: 2.1.35 - webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.76.0_esbuild@0.17.16 webpack-dev-middleware: 6.0.2_webpack@5.76.0 webpack-dev-server: 4.13.1_webpack@5.76.0 ws: 8.8.1 @@ -7147,21 +7995,21 @@ packages: - webpack-cli - webpack-hot-middleware - webpack-plugin-serve - dev: false + dev: true - /@rspack/dev-server/0.3.0_saarlyqjwgcwik7cbeuxgtrvdm: + /@rspack/dev-server/0.3.0_xwlm2ukmbpiz7ykxwfclqtcmji: resolution: {integrity: sha512-aKY1mUP1PdOWXDvxpUA14mEE7p+IFYnU67i7cAUh361z2/v5KbCTngt521ly8H1LqJv3SJIoEXqSqNc8c62Dsg==} peerDependencies: '@rspack/core': '*' dependencies: - '@rspack/core': 0.3.0_ls5vlc7kphql6b6gtepk5p7cmu - '@rspack/dev-client': 0.3.0_p44l2xjftguod6ctnkuod3jp7e + '@rspack/core': 0.3.0 + '@rspack/dev-client': 0.3.0_4p7fys4vpjth4wnvvzaxfza3hm chokidar: 3.5.3 connect-history-api-fallback: 2.0.0 express: 4.18.1 http-proxy-middleware: 2.0.6_@types+express@4.17.17 mime-types: 2.1.35 - webpack: 5.76.0_esbuild@0.17.16 + webpack: 5.76.0_yt3h3qjhcnsf3663codtuni62a webpack-dev-middleware: 6.0.2_webpack@5.76.0 webpack-dev-server: 4.13.1_webpack@5.76.0 ws: 8.8.1 @@ -7494,12 +8342,22 @@ packages: dev: true optional: true + /@swc/core-darwin-arm64/1.3.80: + resolution: {integrity: sha512-rhoFTcQMUGfO7IkfOnopPSF6O0/aVJ58B7KueIKbvrMe6YvSfFj9QfObELFjYCcrJZTvUWBhig0QrsfPIiUphA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@swc/core-darwin-arm64/1.3.85: resolution: {integrity: sha512-jTikp+i4nO4Ofe6qGm4I3sFeebD1OvueBCHITux5tQKD6umN1c2z4CRGv6K49NIz/qEpUcdr6Qny6K+3yibVFQ==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@swc/core-darwin-x64/1.3.32: @@ -7511,12 +8369,22 @@ packages: dev: true optional: true + /@swc/core-darwin-x64/1.3.80: + resolution: {integrity: sha512-0dOLedFpVXe+ugkKHXsqSxMKqvQYfFtibWbrZ7j8wOaErzSGPr0VpyWvepNVb9s046725kPXSw+fsGhqZR8wrw==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@swc/core-darwin-x64/1.3.85: resolution: {integrity: sha512-3uHYkjVU+2F+YbVYtq5rH0uCJIztFTALaS3mQEfQUZKXZ5/8jD5titTCRqFKtSlQg0CzaFZgsYsuqwYBmgN0mA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm-gnueabihf/1.3.32: @@ -7528,12 +8396,22 @@ packages: dev: true optional: true + /@swc/core-linux-arm-gnueabihf/1.3.80: + resolution: {integrity: sha512-QIjwP3PtDeHBDkwF6+ZZqdUsqAhORbMpxrw2jq3mHe4lQrxBttSFTq018vlMRo2mFEorOvXdadzaD9m+NymPrw==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-arm-gnueabihf/1.3.85: resolution: {integrity: sha512-ouHzAHsFaEOkRuoTAOI/8n2m8BQAAnb4vr/xbMhhDOmix0lp5eNsW5Iac/EcJ2uG6B3n7P2K8oycj9SWkj+pfw==} engines: {node: '>=10'} cpu: [arm] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm64-gnu/1.3.32: @@ -7545,12 +8423,22 @@ packages: dev: true optional: true + /@swc/core-linux-arm64-gnu/1.3.80: + resolution: {integrity: sha512-cg8WriIueab58ZwkzXmIACnjSzFLzOBwxlC9k65gPXMNgCjab2YbqEYvAbjBqneuqaao02gW6tad2uhjgYaExw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-arm64-gnu/1.3.85: resolution: {integrity: sha512-/Z1CZOWiO+NqJEh1J20PIxQFHMH43upQJ1l7FJ5Z7+MyuYF8WkeJ7OSovau729pBR+38vvvccEJrMZIztfv7hQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm64-musl/1.3.32: @@ -7562,12 +8450,22 @@ packages: dev: true optional: true + /@swc/core-linux-arm64-musl/1.3.80: + resolution: {integrity: sha512-AhdCQ7QKx5mWrtpaOA1mFRiWWvuiiUtspvo0QSpspDetRKTND1rlf/3UB5+gp0kCeCNUTsVmJWU7fIA9ICZtXA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-arm64-musl/1.3.85: resolution: {integrity: sha512-gfh7CfKavi076dbMBTzfdawSGcYfZ4+1Q+8aRkSesqepKHcIWIJti8Cf3zB4a6CHNhJe+VN0Gb7DEfumydAm1w==} engines: {node: '>=10'} cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-linux-x64-gnu/1.3.32: @@ -7579,12 +8477,22 @@ packages: dev: true optional: true + /@swc/core-linux-x64-gnu/1.3.80: + resolution: {integrity: sha512-+2e5oni1vOrLIjM5Q2/GIzK/uS2YEtuJqnjPvCK8SciRJsSl8OgVsRvyCDbmKeZNtJ2Q+o/O2AQ2w1qpAJG6jg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-x64-gnu/1.3.85: resolution: {integrity: sha512-lWVqjHKzofb9q1qrBM4dLqO7CIisp08/xMS5Hz9DWex1gTc5F2b6yJO6Ceqwa256GMweJcdP6A5EvEFQAiZ5dg==} engines: {node: '>=10'} cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-linux-x64-musl/1.3.32: @@ -7596,12 +8504,22 @@ packages: dev: true optional: true + /@swc/core-linux-x64-musl/1.3.80: + resolution: {integrity: sha512-8OK9IlI1zpWOm7vIp1iXmZSEzLAwFpqhsGSEhxPavpOx2m54kLFdPcw/Uv3n461f6TCtszIxkGq1kSqBUdfUBA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@swc/core-linux-x64-musl/1.3.85: resolution: {integrity: sha512-EPJmlfqC05TUetnlErxNRyIp7Nc3B2w9abET6oQ/EgldeAeQnZ3M6svMViET/c2QSomgrU3rdP+Qcozkt62/4A==} engines: {node: '>=10'} cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-win32-arm64-msvc/1.3.32: @@ -7613,12 +8531,22 @@ packages: dev: true optional: true + /@swc/core-win32-arm64-msvc/1.3.80: + resolution: {integrity: sha512-RKhatwiAGlffnF6z2Mm3Ddid0v3KB+uf5m/Gc7N9zO/EUAV0PnHRuYuZSGyqodHmGFC+mK8YrCooFCEmHL9n+w==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-arm64-msvc/1.3.85: resolution: {integrity: sha512-ibckJDZw8kNosciMexwk0z75ZyUhwtiFMV9rSBpup0opa7NNCUCoERCJ1e9LRyMdhsVUoLpZg/KZiHCdTw96hQ==} engines: {node: '>=10'} cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core-win32-ia32-msvc/1.3.32: @@ -7630,12 +8558,22 @@ packages: dev: true optional: true + /@swc/core-win32-ia32-msvc/1.3.80: + resolution: {integrity: sha512-3jiiZzU/kaw7k4zUp1yMq1QiUe4wJVtCEXIhf+fKuBsIwm7rdvyK/+PIx5KHnZy4TGQnYczKBRhJA5nuBcrUCQ==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-ia32-msvc/1.3.85: resolution: {integrity: sha512-hY4MpHGUVQHL1T2kgRXOigDho4DTIpVPYzJ4uyy8VQRbS7GzN5XtvdGP/fA4zp8+2BQjcig+6J7Y92SY15ouNQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core-win32-x64-msvc/1.3.32: @@ -7647,12 +8585,22 @@ packages: dev: true optional: true + /@swc/core-win32-x64-msvc/1.3.80: + resolution: {integrity: sha512-2eZtIoIWQBWqykfms92Zd37lveYOBWQTZjdooBGlsLHtcoQLkNpf1NXmR6TKY0yy8q6Yl3OhPvY+izjmO08MSg==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@swc/core-win32-x64-msvc/1.3.85: resolution: {integrity: sha512-ktxWOMFJ0iqKn6WUHtXqi4CS7xkyHmrRtjllGRuGqxmLmDX/HSOfuQ55Tm1KXKk5oHLacJkUbOSF2kBrpZ8dpg==} engines: {node: '>=10'} cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core/1.3.32: @@ -7672,6 +8620,55 @@ packages: '@swc/core-win32-x64-msvc': 1.3.32 dev: true + /@swc/core/1.3.80: + resolution: {integrity: sha512-yX2xV5I/lYswHHR+44TPvzBgq3/Y8N1YWpTQADYuvSiX3Jxyvemk5Jpx3rRtigYb8WBkWAAf2i5d5ZJ2M7hhgw==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/types': 0.1.4 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.80 + '@swc/core-darwin-x64': 1.3.80 + '@swc/core-linux-arm-gnueabihf': 1.3.80 + '@swc/core-linux-arm64-gnu': 1.3.80 + '@swc/core-linux-arm64-musl': 1.3.80 + '@swc/core-linux-x64-gnu': 1.3.80 + '@swc/core-linux-x64-musl': 1.3.80 + '@swc/core-win32-arm64-msvc': 1.3.80 + '@swc/core-win32-ia32-msvc': 1.3.80 + '@swc/core-win32-x64-msvc': 1.3.80 + dev: true + + /@swc/core/1.3.80_@swc+helpers@0.5.1: + resolution: {integrity: sha512-yX2xV5I/lYswHHR+44TPvzBgq3/Y8N1YWpTQADYuvSiX3Jxyvemk5Jpx3rRtigYb8WBkWAAf2i5d5ZJ2M7hhgw==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/helpers': 0.5.1 + '@swc/types': 0.1.4 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.80 + '@swc/core-darwin-x64': 1.3.80 + '@swc/core-linux-arm-gnueabihf': 1.3.80 + '@swc/core-linux-arm64-gnu': 1.3.80 + '@swc/core-linux-arm64-musl': 1.3.80 + '@swc/core-linux-x64-gnu': 1.3.80 + '@swc/core-linux-x64-musl': 1.3.80 + '@swc/core-win32-arm64-msvc': 1.3.80 + '@swc/core-win32-ia32-msvc': 1.3.80 + '@swc/core-win32-x64-msvc': 1.3.80 + dev: true + /@swc/core/1.3.85: resolution: {integrity: sha512-qnoxp+2O0GtvRdYnXgR1v8J7iymGGYpx6f6yCK9KxipOZOjrlKILFANYlghQxZyPUfXwK++TFxfSlX4r9wK+kg==} engines: {node: '>=10'} @@ -7694,6 +8691,7 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.85 '@swc/core-win32-ia32-msvc': 1.3.85 '@swc/core-win32-x64-msvc': 1.3.85 + dev: false /@swc/helpers/0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} @@ -8168,6 +9166,7 @@ packages: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 csstype: 3.1.1 + dev: true /@types/react/18.0.28: resolution: {integrity: sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==} @@ -8426,7 +9425,6 @@ packages: /@uni/env/1.1.0: resolution: {integrity: sha512-2GVgUzxIaO2vGElXEuc45+I7L6Jbw8inLDDFuC0K4htjKtPmYywKSE6oDhvmdAXb4GCOH8hmxECYtAh1rjsgoQ==} - dev: false /@use-gesture/core/10.2.20: resolution: {integrity: sha512-4lFhHc8so4yIHkBEs641DnEsBxPyhJ5GEjB4PURFDH4p/FcZriH6w99knZgI63zN/MBFfylMyb8+PDuj6RIXKQ==} @@ -8700,7 +9698,6 @@ packages: /abortcontroller-polyfill/1.7.5: resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} - dev: false /accept-language-parser/1.5.0: resolution: {integrity: sha512-QhyTbMLYo0BBGg1aWbeMG4ekWtds/31BrEU+DONOg/7ax23vxpL03Pb7/zBmha2v7vdD3AyzZVWBVGEZxKOXWw==} @@ -9269,7 +10266,6 @@ packages: /async/3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} - dev: false /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -11553,12 +12549,10 @@ packages: /dotenv-expand/8.0.3: resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==} engines: {node: '>=12'} - dev: false /dotenv/16.0.3: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} - dev: false /dts-bundle/0.7.3: resolution: {integrity: sha512-EEAEuPRk8QyKhoN90NHTh+spSQujkkvOnKWUfuzpmC/fgryiWopL1SegSktx0UsoPfNidIGVDN7/AXpBDBv0WQ==} @@ -11600,7 +12594,6 @@ packages: hasBin: true dependencies: jake: 10.8.5 - dev: false /electron-to-chromium/1.4.322: resolution: {integrity: sha512-KovjizNC9XB7dno/2GjxX8VS0SlfPpCjtyoKft+bCO+UfD8bFy16hY4Sh9s0h9BDxbRH2U0zX5VBjpM1LTcNlg==} @@ -12975,7 +13968,6 @@ packages: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: minimatch: 5.1.6 - dev: false /filesize/8.0.7: resolution: {integrity: sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==} @@ -14662,7 +15654,6 @@ packages: chalk: 4.1.2 filelist: 1.0.4 minimatch: 3.1.2 - dev: false /jest-changed-files/28.1.3: resolution: {integrity: sha512-esaOfUWJXk2nfZt9SPyC8gA1kNfdKLkQWyzsMlqq8msYSlNKfmZxfRgZn4Cd4MGVUF+7v6dBs0d5TOAKa7iIiA==} @@ -15717,7 +16708,6 @@ packages: /jsonc-parser/3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: false /jsonfile/4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -16482,7 +17472,6 @@ packages: pathe: 1.1.0 pkg-types: 1.0.2 ufo: 1.1.1 - dev: false /moment/2.29.4: resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} @@ -17064,7 +18053,6 @@ packages: /path-to-regexp/6.2.1: resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} - dev: false /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} @@ -17072,7 +18060,6 @@ packages: /pathe/1.1.0: resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==} - dev: false /pathval/1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} @@ -17129,7 +18116,6 @@ packages: jsonc-parser: 3.2.0 mlly: 1.1.1 pathe: 1.1.0 - dev: false /pkg-up/3.1.0: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} @@ -18740,7 +19726,6 @@ packages: /process/0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - dev: false /progress/2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} @@ -19934,12 +20919,6 @@ packages: /react-dev-utils/12.0.1_rggdtlzfqxxwxudp3onsqdyocm: resolution: {integrity: sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==} engines: {node: '>=14'} - peerDependencies: - typescript: '>=2.7' - webpack: '>=4' - peerDependenciesMeta: - typescript: - optional: true dependencies: '@babel/code-frame': 7.18.6 address: 1.2.2 @@ -19970,7 +20949,9 @@ packages: transitivePeerDependencies: - eslint - supports-color + - typescript - vue-template-compiler + - webpack /react-dom/17.0.2_react@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} @@ -19981,6 +20962,7 @@ packages: object-assign: 4.1.1 react: 17.0.2 scheduler: 0.20.2 + dev: false /react-dom/18.2.0_react@18.2.0: resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} @@ -20150,6 +21132,17 @@ packages: tiny-invariant: 1.3.1 tiny-warning: 1.0.3 + /react-router-dom/6.14.2: + resolution: {integrity: sha512-5pWX0jdKR48XFZBuJqHosX3AAHjRAzygouMTyimnBPOLdY3WjzUSKhus2FVMihUFWzeLebDgr4r8UeQFAct7Bg==} + engines: {node: '>=14'} + peerDependencies: + react: '>=16.8' + react-dom: '>=16.8' + dependencies: + '@remix-run/router': 1.7.2 + react-router: 6.14.2 + dev: true + /react-router-dom/6.14.2_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-5pWX0jdKR48XFZBuJqHosX3AAHjRAzygouMTyimnBPOLdY3WjzUSKhus2FVMihUFWzeLebDgr4r8UeQFAct7Bg==} engines: {node: '>=14'} @@ -20163,6 +21156,18 @@ packages: react-router: 6.14.2_react@18.2.0 dev: false + /react-router-dom/6.14.2_react@18.2.0: + resolution: {integrity: sha512-5pWX0jdKR48XFZBuJqHosX3AAHjRAzygouMTyimnBPOLdY3WjzUSKhus2FVMihUFWzeLebDgr4r8UeQFAct7Bg==} + engines: {node: '>=14'} + peerDependencies: + react: '>=16.8' + react-dom: '>=16.8' + dependencies: + '@remix-run/router': 1.7.2 + react: 18.2.0 + react-router: 6.14.2_react@18.2.0 + dev: false + /react-router/5.3.4_react@17.0.2: resolution: {integrity: sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==} peerDependencies: @@ -20179,6 +21184,15 @@ packages: tiny-invariant: 1.3.1 tiny-warning: 1.0.3 + /react-router/6.14.2: + resolution: {integrity: sha512-09Zss2dE2z+T1D03IheqAFtK4UzQyX8nFPWx6jkwdYzGLXd5ie06A6ezS2fO6zJfEb/SpG6UocN2O1hfD+2urQ==} + engines: {node: '>=14'} + peerDependencies: + react: '>=16.8' + dependencies: + '@remix-run/router': 1.7.2 + dev: true + /react-router/6.14.2_react@18.2.0: resolution: {integrity: sha512-09Zss2dE2z+T1D03IheqAFtK4UzQyX8nFPWx6jkwdYzGLXd5ie06A6ezS2fO6zJfEb/SpG6UocN2O1hfD+2urQ==} engines: {node: '>=14'} @@ -20188,12 +21202,12 @@ packages: '@remix-run/router': 1.7.2 react: 18.2.0 - /react-server-dom-webpack/18.3.0-canary-2807d781a-20230918_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-xyamMF0z/mYSc/AAUSvzQviE2a5dCubrH47O+F74grcOePONmaEgWZROwVpNOpK3cvmTJZ/SPzZkeM8uoZmXeQ==} + /react-server-dom-webpack/18.3.0-canary-dd480ef92-20230822_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-vBIBAkrOMrqZZGKgjSY9ly82YgZrmQgK4OOMBfMD5ZpAl58eifQFF18ZtVYNX9sLdPPi4MrizYfGjMaS9fP2VQ==} engines: {node: '>=0.10.0'} peerDependencies: - react: 18.3.0-canary-2807d781a-20230918 - react-dom: 18.3.0-canary-2807d781a-20230918 + react: 18.3.0-canary-dd480ef92-20230822 + react-dom: 18.3.0-canary-dd480ef92-20230822 webpack: ^5.59.0 dependencies: acorn-loose: 8.3.0 @@ -20251,6 +21265,7 @@ packages: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 + dev: false /react/18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} @@ -20710,7 +21725,6 @@ packages: hasBin: true dependencies: glob: 7.2.3 - dev: false /rimraf/3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} @@ -20882,6 +21896,7 @@ packages: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 + dev: false /scheduler/0.21.0: resolution: {integrity: sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==} @@ -21638,7 +22653,6 @@ packages: dependencies: '@babel/runtime': 7.21.0 universal-env: 3.3.3 - dev: false /stylehacks/5.1.1_postcss@8.4.12: resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} @@ -21923,7 +22937,6 @@ packages: dependencies: mkdirp: 0.5.6 rimraf: 2.6.3 - dev: false /term-size/2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} @@ -21938,6 +22951,32 @@ packages: supports-hyperlinks: 2.3.0 dev: true + /terser-webpack-plugin/5.3.5_c2jhsnh755mj2bl6newvfwu7wy: + resolution: {integrity: sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + '@jridgewell/trace-mapping': 0.3.17 + '@swc/core': 1.3.80_@swc+helpers@0.5.1 + esbuild: 0.17.16 + jest-worker: 27.5.1 + schema-utils: 3.1.1 + serialize-javascript: 6.0.1 + terser: 5.14.2 + webpack: 5.76.0_yt3h3qjhcnsf3663codtuni62a + dev: true + /terser-webpack-plugin/5.3.5_ghmre4bibzh3hfhoafsn4shpjy: resolution: {integrity: sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==} engines: {node: '>= 10.13.0'} @@ -21988,6 +23027,7 @@ packages: serialize-javascript: 6.0.1 terser: 5.14.2 webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + dev: false /terser-webpack-plugin/5.3.5_sozpi7ywd3sv63uu2kzspstlze: resolution: {integrity: sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==} @@ -22111,6 +23151,7 @@ packages: serialize-javascript: 6.0.1 terser: 5.16.5 webpack: 5.88.2_pur5qe7dhbhqwjtj2daaog4n7u + dev: true /terser-webpack-plugin/5.3.7_webpack@5.88.2: resolution: {integrity: sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==} @@ -22557,7 +23598,6 @@ packages: /ufo/1.1.1: resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} - dev: false /uglify-js/3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} @@ -22704,7 +23744,6 @@ packages: engines: {npm: '>=3.0.0'} dependencies: '@uni/env': 1.1.0 - dev: false /universalify/0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} @@ -22743,7 +23782,7 @@ packages: acorn: 8.8.2 chokidar: 3.5.3 esbuild: 0.17.16 - webpack: 5.88.2_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.88.2_esbuild@0.17.16 webpack-sources: 3.2.3 webpack-virtual-modules: 0.4.6 dev: true @@ -23315,7 +24354,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.0 - webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.76.0_esbuild@0.17.16 /webpack-dev-middleware/5.3.3_webpack@5.86.0: resolution: {integrity: sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==} @@ -23342,7 +24381,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.0 - webpack: 5.88.2_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.88.2_esbuild@0.17.16 /webpack-dev-middleware/6.0.2_webpack@5.76.0: resolution: {integrity: sha512-iOddiJzPcQC6lwOIu60vscbGWth8PCRcWRCwoQcTQf9RMoOWBHg5EyzpGdtSmGMrSPd5vHEfFXmVErQEmkRngQ==} @@ -23358,7 +24397,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.0 - webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.76.0_esbuild@0.17.16 /webpack-dev-server/4.11.1_webpack@5.88.2: resolution: {integrity: sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==} @@ -23449,7 +24488,7 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.76.0_pur5qe7dhbhqwjtj2daaog4n7u + webpack: 5.76.0_esbuild@0.17.16 webpack-dev-middleware: 5.3.3_webpack@5.76.0 ws: 8.13.0 transitivePeerDependencies: @@ -23761,6 +24800,47 @@ packages: - '@swc/core' - esbuild - uglify-js + dev: false + + /webpack/5.76.0_yt3h3qjhcnsf3663codtuni62a: + resolution: {integrity: sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + '@types/eslint-scope': 3.7.4 + '@types/estree': 0.0.51 + '@webassemblyjs/ast': 1.11.1 + '@webassemblyjs/wasm-edit': 1.11.1 + '@webassemblyjs/wasm-parser': 1.11.1 + acorn: 8.8.2 + acorn-import-assertions: 1.9.0_acorn@8.8.2 + browserslist: 4.21.5 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.15.0 + 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-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.5_c2jhsnh755mj2bl6newvfwu7wy + watchpack: 2.4.0 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: true /webpack/5.86.0_esbuild@0.17.16: resolution: {integrity: sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==} @@ -23919,6 +24999,7 @@ packages: - '@swc/core' - esbuild - uglify-js + dev: true /webpackbar/5.0.2_webpack@5.88.2: resolution: {integrity: sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==} From 21bb44bfc950330bb18235e01e33ba16e65c65fc Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Tue, 24 Oct 2023 15:42:32 +0800 Subject: [PATCH 16/19] refactor: use utils --- packages/ice/src/webpack/FlightClientEntryPlugin.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index b2bbcbc7ca..69f449529e 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -6,10 +6,7 @@ import NullDependency from '@ice/bundles/compiled/webpack/NullDependency.js'; import ModuleDependency from '@ice/bundles/compiled/webpack/ModuleDependency.js'; import type { Compiler, Compilation } from 'webpack'; import { createComponentName } from '@ice/route-manifest'; - -export function formatPath(pathStr) { - return process.platform === 'win32' ? pathStr.split(sep).join('/') : pathStr; -} +import formatPath from '../utils/formatPath.js'; const PLUGIN_NAME = 'FlightClientEntryPlugin'; From 20accb4329a3a625ddcb50b50dcae5e4a8d1025b Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Tue, 24 Oct 2023 16:10:56 +0800 Subject: [PATCH 17/19] chore: get routes file --- .../ice/src/bundler/webpack/getWebpackConfig.ts | 1 + .../ice/src/webpack/FlightClientEntryPlugin.ts | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/ice/src/bundler/webpack/getWebpackConfig.ts b/packages/ice/src/bundler/webpack/getWebpackConfig.ts index 45c230c0d9..b256536fe4 100644 --- a/packages/ice/src/bundler/webpack/getWebpackConfig.ts +++ b/packages/ice/src/bundler/webpack/getWebpackConfig.ts @@ -131,6 +131,7 @@ const getWebpackConfig: GetWebpackConfig = async (context, options) => { webpackConfig.plugins.push(new FlightClientEntryPlugin({ rootDir, + getRoutesFile, })); webpackConfig.plugins.push(new FlightManifestPlugin()); } diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 69f449529e..53f0e007ba 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -20,6 +20,7 @@ interface ClientReferenceSearchPath { interface Options { rootDir: string; clientReferences?: ClientReferenceSearchPath[]; + getRoutesFile: () => string[]; } class ClientReferenceDependency extends ModuleDependency { @@ -39,10 +40,15 @@ export class FlightClientEntryPlugin { clientReferences: ClientReferenceSearchPath[]; clientFiles = new Set(); pageDir: string; + rootDir: string; + getRoutesFile: () => string[]; constructor(options: Options) { + this.rootDir = options.rootDir; this.pageDir = join(options.rootDir, 'src', 'pages'); + this.getRoutesFile = options.getRoutesFile; + if (options.clientReferences) { this.clientReferences = options.clientReferences; } else { @@ -112,6 +118,7 @@ export class FlightClientEntryPlugin { } async createClientEntries(compiler: Compiler, compilation: Compilation) { + const routes = this.getRoutesFile().map(file => join(this.rootDir, file)); const addClientEntryList = []; for (const [name, entry] of compilation.entries.entries()) { @@ -126,9 +133,10 @@ export class FlightClientEntryPlugin { const entryModule = compilation.moduleGraph.getResolvedModule(entryDependency); for (const connection of compilation.moduleGraph.getOutgoingConnections(entryModule)) { - const entryRequest = (connection.dependency as any).request; + // @ts-ignore + const entryRequest = connection.resolvedModule?.resource; - if (entryRequest.indexOf('@/pages/') === -1) continue; + if (routes.indexOf(entryRequest) === -1) continue; const { clientComponentImports, CSSImports } = this.collectComponentInfoFromDependency({ compilation, @@ -139,8 +147,7 @@ export class FlightClientEntryPlugin { const injected = this.injectClientEntry({ compiler, compilation, - // @ts-ignore - bundlePath: connection.resolvedModule?.resource, + bundlePath: entryRequest, clientImports: [ ...clientComponentImports, ...CSSImports, From 3d12c94692cb3a66f6acd34c899a67e060150c0f Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Thu, 26 Oct 2023 10:01:02 +0800 Subject: [PATCH 18/19] fix: lint --- packages/ice/src/webpack/FlightClientEntryPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ice/src/webpack/FlightClientEntryPlugin.ts b/packages/ice/src/webpack/FlightClientEntryPlugin.ts index 53f0e007ba..32900200e3 100644 --- a/packages/ice/src/webpack/FlightClientEntryPlugin.ts +++ b/packages/ice/src/webpack/FlightClientEntryPlugin.ts @@ -1,4 +1,4 @@ -import { join, relative, sep } from 'path'; +import { join, relative } from 'path'; import { stringify } from 'querystring'; import { asyncLib, acorn } from '@ice/bundles'; import webpack from '@ice/bundles/compiled/webpack/index.js'; From 4170f9a2fa357afe6d25526d762b3e7a7bbf3e1b Mon Sep 17 00:00:00 2001 From: "shuilan.cj" Date: Thu, 26 Oct 2023 10:07:37 +0800 Subject: [PATCH 19/19] fix: rsc url --- packages/runtime/src/runRSCClientApp.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/src/runRSCClientApp.tsx b/packages/runtime/src/runRSCClientApp.tsx index c07392a5cb..213b32eaee 100644 --- a/packages/runtime/src/runRSCClientApp.tsx +++ b/packages/runtime/src/runRSCClientApp.tsx @@ -61,5 +61,5 @@ export function useRefresh() { } function getReactTree(location) { - return fetch(location + location.indexOf('?') ? '?rsc' : '&rsc'); + return fetch(location + (location.indexOf('?') > -1 ? '&rsc' : '?rsc')); } \ No newline at end of file