vite-plugin-react-server 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +208 -27
- package/dist/index.js.map +1 -1
- package/dist/package.json +34 -14
- package/dist/plugin/{css-collector-elements.d.ts → components/css-collector-elements.d.ts} +1 -1
- package/dist/plugin/components/css-collector-elements.d.ts.map +1 -0
- package/dist/plugin/components/css-collector-elements.js.map +1 -0
- package/dist/plugin/{css-collector.d.ts → components/css-collector.d.ts} +1 -1
- package/dist/plugin/components/css-collector.d.ts.map +1 -0
- package/dist/plugin/components/css-collector.js.map +1 -0
- package/dist/plugin/components/html.d.ts +4 -0
- package/dist/plugin/components/html.d.ts.map +1 -0
- package/dist/plugin/components/html.js +17 -0
- package/dist/plugin/components/html.js.map +1 -0
- package/dist/plugin/components/index.d.ts +5 -0
- package/dist/plugin/components/index.d.ts.map +1 -0
- package/dist/plugin/components.js +9 -3
- package/dist/plugin/components.js.map +1 -0
- package/dist/plugin/config/autoDiscover/index.d.ts +6 -0
- package/dist/plugin/config/autoDiscover/index.d.ts.map +1 -0
- package/dist/plugin/config/autoDiscover/index.js +8 -0
- package/dist/plugin/config/{resolveAutoDiscover.d.ts → autoDiscover/resolveAutoDiscover.d.ts} +1 -1
- package/dist/plugin/config/autoDiscover/resolveAutoDiscover.d.ts.map +1 -0
- package/dist/plugin/config/{resolveAutoDiscover.js → autoDiscover/resolveAutoDiscover.js} +10 -9
- package/dist/plugin/config/autoDiscover/resolveAutoDiscover.js.map +1 -0
- package/dist/plugin/config/autoDiscover/resolveBuildPages.d.ts.map +1 -1
- package/dist/plugin/config/autoDiscover/resolveBuildPages.js +10 -10
- package/dist/plugin/config/autoDiscover/resolveBuildPages.js.map +1 -1
- package/dist/plugin/config/defaults.d.ts +6 -4
- package/dist/plugin/config/defaults.d.ts.map +1 -1
- package/dist/plugin/config/defaults.js +8 -4
- package/dist/plugin/config/defaults.js.map +1 -1
- package/dist/plugin/config/index.d.ts +1 -0
- package/dist/plugin/config/index.d.ts.map +1 -1
- package/dist/plugin/config/index.js +1 -0
- package/dist/plugin/config/resolveDevServerConfig.d.ts +2 -0
- package/dist/plugin/config/resolveDevServerConfig.d.ts.map +1 -0
- package/dist/plugin/config/resolveEnv.d.ts +13 -0
- package/dist/plugin/config/resolveEnv.d.ts.map +1 -0
- package/dist/plugin/config/resolveEnv.js +120 -0
- package/dist/plugin/config/resolveEnv.js.map +1 -0
- package/dist/plugin/config/resolveOptions.d.ts.map +1 -1
- package/dist/plugin/config/resolveOptions.js +34 -11
- package/dist/plugin/config/resolveOptions.js.map +1 -1
- package/dist/plugin/config/resolveUrlOption.d.ts +1 -1
- package/dist/plugin/config/resolveUrlOption.d.ts.map +1 -1
- package/dist/plugin/config/resolveUrlOption.js +1 -2
- package/dist/plugin/config/resolveUrlOption.js.map +1 -1
- package/dist/plugin/config/resolveUserConfig.d.ts.map +1 -1
- package/dist/plugin/config/resolveUserConfig.js +80 -69
- package/dist/plugin/config/resolveUserConfig.js.map +1 -1
- package/dist/plugin/config.js +17 -0
- package/dist/plugin/config.js.map +1 -0
- package/dist/plugin/env/index.d.ts +2 -0
- package/dist/plugin/env/index.d.ts.map +1 -0
- package/dist/plugin/env/index.js +1 -0
- package/dist/plugin/env/plugin.d.ts +30 -0
- package/dist/plugin/env/plugin.d.ts.map +1 -0
- package/dist/plugin/env/plugin.js +64 -0
- package/dist/plugin/env.js +45 -0
- package/dist/plugin/env.js.map +1 -0
- package/dist/plugin/error/toError.d.ts +6 -0
- package/dist/plugin/error/toError.d.ts.map +1 -0
- package/dist/plugin/error/toError.js +19 -0
- package/dist/plugin/error/toError.js.map +1 -0
- package/dist/plugin/file-preserver/plugin.d.ts +19 -0
- package/dist/plugin/file-preserver/plugin.d.ts.map +1 -0
- package/dist/plugin/file-preserver/plugin.js +108 -0
- package/dist/plugin/file-preserver.js +96 -0
- package/dist/plugin/file-preserver.js.map +1 -0
- package/dist/plugin/helpers/collectManifestCss.js.map +1 -1
- package/dist/plugin/helpers/createCssProps.d.ts.map +1 -1
- package/dist/plugin/helpers/createCssProps.js +10 -2
- package/dist/plugin/helpers/createCssProps.js.map +1 -1
- package/dist/plugin/helpers/createEventHandler.d.ts +1 -1
- package/dist/plugin/helpers/createRscStream.js +1 -1
- package/dist/plugin/helpers/createRscStream.js.map +1 -1
- package/dist/plugin/helpers/formatMetrics.d.ts +3 -1
- package/dist/plugin/helpers/formatMetrics.d.ts.map +1 -1
- package/dist/plugin/helpers/formatMetrics.js +22 -7
- package/dist/plugin/helpers/formatMetrics.js.map +1 -0
- package/dist/plugin/helpers/getRouteFiles.d.ts +1 -1
- package/dist/plugin/helpers/getRouteFiles.d.ts.map +1 -1
- package/dist/plugin/helpers/getRouteFiles.js +2 -0
- package/dist/plugin/helpers/getRouteFiles.js.map +1 -1
- package/dist/plugin/helpers/index.d.ts +24 -0
- package/dist/plugin/helpers/index.d.ts.map +1 -0
- package/dist/plugin/helpers/index.js +31 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts +2 -1
- package/dist/plugin/helpers/inputNormalizer.d.ts.map +1 -1
- package/dist/plugin/helpers/inputNormalizer.js +34 -9
- package/dist/plugin/helpers/inputNormalizer.js.map +1 -1
- package/dist/plugin/helpers/metrics.js +26 -2
- package/dist/plugin/helpers/metrics.js.map +1 -1
- package/dist/plugin/helpers/moduleRefs.d.ts.map +1 -0
- package/dist/plugin/helpers/moduleRefs.js.map +1 -0
- package/dist/plugin/helpers/requestInfo.d.ts +26 -0
- package/dist/plugin/helpers/requestInfo.d.ts.map +1 -0
- package/dist/plugin/helpers/requestInfo.js +66 -0
- package/dist/plugin/helpers/requestInfo.js.map +1 -0
- package/dist/plugin/helpers/requestToRoute.js.map +1 -1
- package/dist/plugin/helpers/resolvePage.d.ts.map +1 -0
- package/dist/plugin/{resolvePage.js → helpers/resolvePage.js} +19 -3
- package/dist/plugin/helpers/resolvePage.js.map +1 -0
- package/dist/plugin/helpers/resolvePageAndProps.d.ts.map +1 -1
- package/dist/plugin/helpers/resolvePageAndProps.js +7 -4
- package/dist/plugin/helpers/resolvePageAndProps.js.map +1 -1
- package/dist/plugin/helpers/resolveProps.d.ts.map +1 -0
- package/dist/plugin/{resolveProps.js → helpers/resolveProps.js} +9 -6
- package/dist/plugin/helpers/resolveProps.js.map +1 -0
- package/dist/plugin/helpers/serializeUserOptions.js +1 -1
- package/dist/plugin/helpers/serializeUserOptions.js.map +1 -1
- package/dist/plugin/helpers/stashReturnValue.js +19 -13
- package/dist/plugin/helpers/stashReturnValue.js.map +1 -0
- package/dist/plugin/helpers/tryManifest.d.ts.map +1 -1
- package/dist/plugin/helpers/tryManifest.js +0 -1
- package/dist/plugin/helpers/tryManifest.js.map +1 -1
- package/dist/plugin/helpers.js +27 -0
- package/dist/plugin/helpers.js.map +1 -0
- package/dist/plugin/loader/createBuildLoader.js +1 -1
- package/dist/plugin/loader/createBuildLoader.js.map +1 -1
- package/dist/plugin/loader/css-loader.development.d.ts.map +1 -1
- package/dist/plugin/loader/css-loader.development.js +1 -7
- package/dist/plugin/loader/css-loader.development.js.map +1 -1
- package/dist/plugin/loader/css-loader.production.js.map +1 -1
- package/dist/plugin/loader/env-loader.development.d.ts +12 -0
- package/dist/plugin/loader/env-loader.development.d.ts.map +1 -0
- package/dist/plugin/loader/env-loader.development.js +60 -0
- package/dist/plugin/loader/react-loader.d.ts.map +1 -1
- package/dist/plugin/loader/react-loader.js +1 -8
- package/dist/plugin/loader/react-loader.js.map +1 -1
- package/dist/plugin/metrics/formatMetrics.d.ts +6 -1
- package/dist/plugin/metrics/formatMetrics.d.ts.map +1 -1
- package/dist/plugin/metrics/formatMetrics.js +21 -3
- package/dist/plugin/metrics/formatMetrics.js.map +1 -1
- package/dist/plugin/metrics.js +1 -1
- package/dist/plugin/plugin.client.d.ts.map +1 -1
- package/dist/plugin/plugin.client.js +2 -0
- package/dist/plugin/plugin.client.js.map +1 -1
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +1 -2
- package/dist/plugin/plugin.server.d.ts.map +1 -1
- package/dist/plugin/plugin.server.js +3 -0
- package/dist/plugin/plugin.server.js.map +1 -1
- package/dist/plugin/preserver/plugin.js.map +1 -1
- package/dist/plugin/process-env.d.ts +14 -0
- package/dist/plugin/process-env.d.ts.map +1 -0
- package/dist/plugin/process-env.js +1 -0
- package/dist/plugin/react-client/createMessageHandlers.d.ts +11 -0
- package/dist/plugin/react-client/createMessageHandlers.d.ts.map +1 -0
- package/dist/plugin/react-client/createMessageHandlers.js +47 -0
- package/dist/plugin/react-client/createMessageHandlers.js.map +1 -0
- package/dist/plugin/react-client/createWorkerStream.d.ts +9 -3
- package/dist/plugin/react-client/createWorkerStream.d.ts.map +1 -1
- package/dist/plugin/react-client/createWorkerStream.js +102 -70
- package/dist/plugin/react-client/createWorkerStream.js.map +1 -1
- package/dist/plugin/react-client/handleWorkerRscStream.d.ts +19 -0
- package/dist/plugin/react-client/handleWorkerRscStream.d.ts.map +1 -0
- package/dist/plugin/react-client/handleWorkerRscStream.js +47 -0
- package/dist/plugin/react-client/handleWorkerRscStream.js.map +1 -0
- package/dist/plugin/react-client/plugin.d.ts.map +1 -1
- package/dist/plugin/react-client/plugin.js +19 -5
- package/dist/plugin/react-client/plugin.js.map +1 -1
- package/dist/plugin/react-client/restartWorker.d.ts +6 -1
- package/dist/plugin/react-client/restartWorker.d.ts.map +1 -1
- package/dist/plugin/react-client/restartWorker.js +13 -5
- package/dist/plugin/react-client/restartWorker.js.map +1 -1
- package/dist/plugin/react-client/server.d.ts +2 -13
- package/dist/plugin/react-client/server.d.ts.map +1 -1
- package/dist/plugin/react-client/server.js +123 -121
- package/dist/plugin/react-client/server.js.map +1 -1
- package/dist/plugin/react-server/plugin.d.ts.map +1 -1
- package/dist/plugin/react-server/plugin.js +18 -8
- package/dist/plugin/react-server/plugin.js.map +1 -1
- package/dist/plugin/react-server/server.d.ts.map +1 -1
- package/dist/plugin/react-server/server.js +37 -23
- package/dist/plugin/react-server/server.js.map +1 -1
- package/dist/plugin/react-static/collectHtmlWorkerContent.d.ts.map +1 -1
- package/dist/plugin/react-static/collectHtmlWorkerContent.js +9 -0
- package/dist/plugin/react-static/collectHtmlWorkerContent.js.map +1 -1
- package/dist/plugin/react-static/collectRscContent.js.map +1 -1
- package/dist/plugin/react-static/configurePreviewServer.d.ts.map +1 -1
- package/dist/plugin/react-static/configurePreviewServer.js +58 -54
- package/dist/plugin/react-static/configurePreviewServer.js.map +1 -1
- package/dist/plugin/react-static/fileWriter.d.ts +1 -1
- package/dist/plugin/react-static/fileWriter.d.ts.map +1 -1
- package/dist/plugin/react-static/fileWriter.js.map +1 -1
- package/dist/plugin/react-static/plugin.d.ts.map +1 -1
- package/dist/plugin/react-static/plugin.js +21 -23
- package/dist/plugin/react-static/plugin.js.map +1 -1
- package/dist/plugin/react-static/renderPages.js.map +1 -1
- package/dist/plugin/root.d.ts +1 -0
- package/dist/plugin/root.d.ts.map +1 -1
- package/dist/plugin/root.js +3 -2
- package/dist/plugin/root.js.map +1 -1
- package/dist/plugin/transformer/plugin.client.d.ts.map +1 -1
- package/dist/plugin/transformer/plugin.client.js +3 -12
- package/dist/plugin/transformer/plugin.client.js.map +1 -1
- package/dist/plugin/transformer/plugin.js.map +1 -1
- package/dist/plugin/transformer/plugin.server.d.ts.map +1 -1
- package/dist/plugin/transformer/plugin.server.js +17 -24
- package/dist/plugin/transformer/plugin.server.js.map +1 -1
- package/dist/plugin/transformer/upgradeCssModuleCode.d.ts +1 -10
- package/dist/plugin/transformer/upgradeCssModuleCode.d.ts.map +1 -1
- package/dist/plugin/transformer/upgradeCssModuleCode.js +40 -38
- package/dist/plugin/types.d.ts +60 -15
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/plugin/types.js +1 -1
- package/dist/plugin/utils/callServer.d.ts +1 -1
- package/dist/plugin/utils/callServer.d.ts.map +1 -1
- package/dist/plugin/utils/callServer.js +3 -17
- package/dist/plugin/utils/callServer.js.map +1 -1
- package/dist/plugin/utils/createCallServer.d.ts +2 -0
- package/dist/plugin/utils/createCallServer.d.ts.map +1 -0
- package/dist/plugin/utils/createCallServer.js +28 -0
- package/dist/plugin/utils/createCallServer.js.map +1 -0
- package/dist/plugin/utils/createReactFetcher.d.ts +3 -1
- package/dist/plugin/utils/createReactFetcher.d.ts.map +1 -1
- package/dist/plugin/utils/createReactFetcher.js +11 -11
- package/dist/plugin/utils/createReactFetcher.js.map +1 -1
- package/dist/plugin/utils/env.d.ts +2 -0
- package/dist/plugin/utils/env.d.ts.map +1 -0
- package/dist/plugin/utils/env.js +9 -0
- package/dist/plugin/utils/env.js.map +1 -0
- package/dist/plugin/utils/envUrls.d.ts +9 -0
- package/dist/plugin/utils/envUrls.d.ts.map +1 -0
- package/dist/plugin/utils/envUrls.js +7 -0
- package/dist/plugin/utils/envUrls.node.d.ts +7 -0
- package/dist/plugin/utils/envUrls.node.d.ts.map +1 -0
- package/dist/plugin/utils/envUrls.node.js +11 -0
- package/dist/plugin/utils/envUrls.node.js.map +1 -0
- package/dist/plugin/utils/index.d.ts +2 -1
- package/dist/plugin/utils/index.d.ts.map +1 -1
- package/dist/plugin/utils/index.js +2 -1
- package/dist/plugin/utils/moduleBaseURL.d.ts +3 -0
- package/dist/plugin/utils/moduleBaseURL.d.ts.map +1 -0
- package/dist/plugin/utils/moduleBaseURL.js +4 -0
- package/dist/plugin/utils/urls.d.ts +130 -0
- package/dist/plugin/utils/urls.d.ts.map +1 -0
- package/dist/plugin/utils/urls.js +87 -0
- package/dist/plugin/utils/urls.js.map +1 -0
- package/dist/plugin/utils.js +2 -1
- package/dist/plugin/utils.js.map +1 -1
- package/dist/plugin/vendor/index.d.ts +2 -0
- package/dist/plugin/vendor/index.d.ts.map +1 -0
- package/dist/plugin/vendor/index.js +1 -0
- package/dist/plugin/vendor/vendor.client.d.ts.map +1 -0
- package/dist/plugin/vendor/vendor.client.js.map +1 -0
- package/dist/plugin/vendor/vendor.d.ts +2 -0
- package/dist/plugin/vendor/vendor.d.ts.map +1 -0
- package/dist/plugin/vendor/vendor.js +15 -0
- package/dist/plugin/vendor/vendor.js.map +1 -0
- package/dist/plugin/vendor/vendor.server.d.ts.map +1 -0
- package/dist/plugin/vendor/vendor.server.js.map +1 -0
- package/dist/plugin/vendor.js +7 -0
- package/dist/plugin/vendor.js.map +1 -0
- package/dist/plugin/worker/createWorker.d.ts +3 -0
- package/dist/plugin/worker/createWorker.d.ts.map +1 -1
- package/dist/plugin/worker/createWorker.js +37 -23
- package/dist/plugin/worker/createWorker.js.map +1 -1
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.d.ts.map +1 -1
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.js +4 -1
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.js.map +1 -1
- package/dist/plugin/worker/html/html-worker.development.js.map +1 -1
- package/dist/plugin/worker/html/html-worker.production.js.map +1 -1
- package/dist/plugin/worker/rsc/handleRender.d.ts +2 -7
- package/dist/plugin/worker/rsc/handleRender.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/handleRender.js +4 -4
- package/dist/plugin/worker/rsc/handleRender.js.map +1 -1
- package/dist/plugin/worker/rsc/messageHandler.d.ts +2 -1
- package/dist/plugin/worker/rsc/messageHandler.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/messageHandler.js +42 -16
- package/dist/plugin/worker/rsc/messageHandler.js.map +1 -1
- package/dist/plugin/worker/rsc/rsc-worker.development.js +16 -5
- package/dist/plugin/worker/rsc/rsc-worker.development.js.map +1 -1
- package/dist/plugin/worker/rsc/rsc-worker.production.js +16 -5
- package/dist/plugin/worker/rsc/rsc-worker.production.js.map +1 -1
- package/dist/plugin/worker/rsc/state.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/state.js.map +1 -1
- package/dist/plugin/worker/sendMessage.js +45 -43
- package/dist/plugin/worker/sendMessage.js.map +1 -0
- package/dist/plugin/worker/types.d.ts +32 -4
- package/dist/plugin/worker/types.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -14
- package/plugin/{css-collector-elements.tsx → components/css-collector-elements.tsx} +1 -1
- package/plugin/{css-collector.tsx → components/css-collector.tsx} +1 -1
- package/plugin/{html.tsx → components/html.tsx} +1 -3
- package/{dist/plugin/components.d.ts → plugin/components/index.ts} +1 -1
- package/plugin/config/autoDiscover/index.ts +10 -0
- package/plugin/config/{resolveAutoDiscover.ts → autoDiscover/resolveAutoDiscover.ts} +16 -12
- package/plugin/config/autoDiscover/resolveBuildPages.ts +10 -11
- package/plugin/config/defaults.tsx +6 -4
- package/plugin/config/index.ts +1 -1
- package/plugin/config/resolveEnv.ts +187 -0
- package/plugin/config/resolveOptions.ts +60 -27
- package/plugin/config/resolveUrlOption.ts +2 -7
- package/plugin/config/resolveUserConfig.ts +145 -98
- package/plugin/env/index.ts +1 -0
- package/plugin/env/plugin.ts +78 -0
- package/plugin/error/toError.ts +19 -0
- package/plugin/file-preserver/plugin.ts +117 -0
- package/plugin/helpers/createCssProps.tsx +14 -6
- package/plugin/helpers/createRscStream.tsx +1 -1
- package/plugin/helpers/formatMetrics.ts +2 -2
- package/plugin/helpers/getRouteFiles.ts +3 -1
- package/plugin/helpers/index.ts +38 -0
- package/plugin/helpers/inputNormalizer.ts +66 -17
- package/plugin/helpers/requestInfo.ts +91 -0
- package/plugin/{resolvePage.ts → helpers/resolvePage.ts} +19 -4
- package/plugin/helpers/resolvePageAndProps.ts +7 -4
- package/plugin/{resolveProps.ts → helpers/resolveProps.ts} +8 -6
- package/plugin/helpers/serializeUserOptions.ts +1 -1
- package/plugin/helpers/tryManifest.ts +0 -1
- package/plugin/loader/createBuildLoader.ts +1 -1
- package/plugin/loader/css-loader.development.ts +2 -8
- package/plugin/loader/env-loader.development.ts +84 -0
- package/plugin/loader/react-loader.ts +1 -10
- package/plugin/metrics/formatMetrics.ts +29 -4
- package/plugin/plugin.client.ts +2 -0
- package/plugin/plugin.server.ts +3 -0
- package/plugin/plugin.ts +1 -3
- package/plugin/preserver/plugin.ts +1 -0
- package/plugin/process-env.ts +13 -0
- package/plugin/react-client/createMessageHandlers.ts +49 -0
- package/plugin/react-client/createWorkerStream.ts +130 -83
- package/plugin/react-client/handleWorkerRscStream.ts +57 -0
- package/plugin/react-client/plugin.ts +30 -17
- package/plugin/react-client/restartWorker.ts +15 -7
- package/plugin/react-client/server.ts +129 -164
- package/plugin/react-server/plugin.ts +26 -13
- package/plugin/react-server/server.ts +40 -35
- package/plugin/react-static/collectHtmlWorkerContent.ts +13 -1
- package/plugin/react-static/configurePreviewServer.ts +75 -62
- package/plugin/react-static/fileWriter.ts +1 -1
- package/plugin/react-static/plugin.ts +23 -30
- package/plugin/root.ts +7 -1
- package/plugin/transformer/plugin.client.ts +4 -12
- package/plugin/transformer/plugin.server.ts +18 -25
- package/plugin/transformer/upgradeCssModuleCode.ts +39 -39
- package/plugin/types/env.d.ts +7 -0
- package/plugin/types.ts +80 -29
- package/plugin/utils/callServer.ts +3 -24
- package/plugin/utils/createCallServer.ts +26 -0
- package/plugin/utils/createReactFetcher.ts +14 -12
- package/plugin/utils/env.ts +1 -0
- package/plugin/utils/envUrls.node.ts +19 -0
- package/plugin/utils/envUrls.ts +8 -0
- package/plugin/utils/index.ts +2 -1
- package/plugin/utils/moduleBaseURL.ts +7 -0
- package/plugin/utils/urls.ts +217 -0
- package/plugin/vendor/index.ts +1 -0
- package/plugin/vendor/vendor.ts +6 -0
- package/plugin/worker/createWorker.ts +41 -30
- package/plugin/worker/html/createHtmlWorkerRenderState.tsx +4 -1
- package/plugin/worker/html/html-worker.development.tsx +2 -1
- package/plugin/worker/html/html-worker.production.tsx +2 -1
- package/plugin/worker/rsc/handleRender.ts +6 -12
- package/plugin/worker/rsc/messageHandler.tsx +53 -20
- package/plugin/worker/rsc/rsc-worker.development.ts +23 -9
- package/plugin/worker/rsc/rsc-worker.production.ts +23 -7
- package/plugin/worker/types.ts +35 -4
- package/dist/plugin/components.d.ts.map +0 -1
- package/dist/plugin/config/resolveAutoDiscover.d.ts.map +0 -1
- package/dist/plugin/config/resolveAutoDiscover.js.map +0 -1
- package/dist/plugin/copy.d.ts +0 -7
- package/dist/plugin/copy.d.ts.map +0 -1
- package/dist/plugin/copy.js +0 -30
- package/dist/plugin/css-collector-elements.d.ts.map +0 -1
- package/dist/plugin/css-collector-elements.js.map +0 -1
- package/dist/plugin/css-collector.d.ts.map +0 -1
- package/dist/plugin/css-collector.js.map +0 -1
- package/dist/plugin/getCondition.d.ts +0 -2
- package/dist/plugin/getCondition.d.ts.map +0 -1
- package/dist/plugin/html.d.ts +0 -4
- package/dist/plugin/html.d.ts.map +0 -1
- package/dist/plugin/html.js +0 -18
- package/dist/plugin/html.js.map +0 -1
- package/dist/plugin/manifest.d.ts +0 -6
- package/dist/plugin/manifest.d.ts.map +0 -1
- package/dist/plugin/manifest.js +0 -13
- package/dist/plugin/moduleRefs.d.ts.map +0 -1
- package/dist/plugin/moduleRefs.js.map +0 -1
- package/dist/plugin/resolvePage.d.ts.map +0 -1
- package/dist/plugin/resolvePage.js.map +0 -1
- package/dist/plugin/resolveProps.d.ts.map +0 -1
- package/dist/plugin/resolveProps.js.map +0 -1
- package/dist/plugin/utils/pageURL.d.ts +0 -2
- package/dist/plugin/utils/pageURL.d.ts.map +0 -1
- package/dist/plugin/utils/pageURL.js +0 -21
- package/dist/plugin/utils/pageURL.js.map +0 -1
- package/dist/plugin/vendor.client.d.ts.map +0 -1
- package/dist/plugin/vendor.client.js.map +0 -1
- package/dist/plugin/vendor.server.d.ts.map +0 -1
- package/dist/plugin/vendor.server.js.map +0 -1
- package/plugin/copy.ts +0 -39
- package/plugin/manifest.ts +0 -24
- package/plugin/utils/pageURL.ts +0 -28
- /package/dist/plugin/{css-collector-elements.js → components/css-collector-elements.js} +0 -0
- /package/dist/plugin/{css-collector.js → components/css-collector.js} +0 -0
- /package/{plugin/components.ts → dist/plugin/components/index.js} +0 -0
- /package/dist/plugin/{getCondition.js → config/resolveDevServerConfig.js} +0 -0
- /package/dist/plugin/{moduleRefs.d.ts → helpers/moduleRefs.d.ts} +0 -0
- /package/dist/plugin/{moduleRefs.js → helpers/moduleRefs.js} +0 -0
- /package/dist/plugin/{resolvePage.d.ts → helpers/resolvePage.d.ts} +0 -0
- /package/dist/plugin/{resolveProps.d.ts → helpers/resolveProps.d.ts} +0 -0
- /package/dist/plugin/{vendor.client.d.ts → vendor/vendor.client.d.ts} +0 -0
- /package/dist/plugin/{vendor.client.js → vendor/vendor.client.js} +0 -0
- /package/dist/plugin/{vendor.server.d.ts → vendor/vendor.server.d.ts} +0 -0
- /package/dist/plugin/{vendor.server.js → vendor/vendor.server.js} +0 -0
- /package/plugin/{getCondition.ts → config/resolveDevServerConfig.tsx} +0 -0
- /package/plugin/{moduleRefs.ts → helpers/moduleRefs.ts} +0 -0
- /package/plugin/{vendor.client.ts → vendor/vendor.client.ts} +0 -0
- /package/plugin/{vendor.server.ts → vendor/vendor.server.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sources":["../../../../plugin/worker/rsc/state.ts"],"sourcesContent":["import { workerData } from \"node:worker_threads\";\nimport { createCssProps } from \"../../helpers/createCssProps.js\";\nimport type { CssContent, ResolvedUserOptions, HmrState } from \"../../types.js\";\nimport type { PassThrough } from \"node:stream\";\nimport { relative } from \"node:path\";\n\n\n// Track active RSC streams\nexport const activeStreams = new Map<string, PassThrough>();\n\n// Track CSS files\nexport const cssFiles = new Map<string, CssContent>();\n\n\nexport const hmrState = new Map<string, HmrState>();\n\nif(workerData) {\n if(workerData.hmrPort) {\n workerData.hmrPort.on('message', (msg: { type: string; path: string; routes?: string[] }) => {\n if(msg.type === 'HMR_UPDATE') {\n // Normalize the path relative to project root\n const normalizedPath = relative(workerData.userOptions.projectRoot, msg.path);\n hmrState.set(normalizedPath, { \n timestamp: Date.now(), \n invalidated: true,\n routes: msg.routes || []\n });\n } else if(msg.type === 'HMR_ACCEPT') {\n // Normalize the path relative to project root\n const normalizedPath = relative(workerData.userOptions.projectRoot, msg.path);\n hmrState.delete(normalizedPath);\n }\n });\n }\n} else {\n throw new Error(\"This module must be run with workerData\");\n}\n\n// Create shared CSS registry\nexport const clientFiles = new Set<string>();\nexport const serverActionFiles = new Set<string>();\n\n// Helper functions\nexport function clearCssFiles() {\n cssFiles.clear();\n}\n\nexport function getCssFiles() {\n return cssFiles.entries();\n}\n\nexport function clearClientFiles() {\n clientFiles.clear();\n}\n\nexport function clearServerActionFiles() {\n serverActionFiles.clear();\n}\n\nexport function addCssFile(id: string, cssFile: CssContent) {\n cssFiles.set(id, cssFile);\n}\n\n\nexport function addCssFileContent(id: string, code: string, userOptions: Pick<ResolvedUserOptions, \"projectRoot\" | \"moduleBaseURL\" | \"moduleBasePath\" | \"moduleRootPath\" | \"css\">) {\n if(typeof code !== \"string\"){\n throw new Error(`Expected css to be loaded as a string, but got ${typeof code}`);\n }\n const normalizeId = id.startsWith(userOptions.moduleRootPath) ? id.slice(userOptions.moduleRootPath.length) : id;\n cssFiles.set(normalizeId, createCssProps({\n id,\n code,\n userOptions\n }));\n} \n\nexport function addClientFile(url: string) {\n clientFiles.add(url);\n}\n\nexport function addServerActionFile(url: string) {\n serverActionFiles.add(url);\n}\n\nexport function clearAllFiles() {\n clearCssFiles();\n clearClientFiles();\n clearServerActionFiles();\n}\n\n// Helper to check if a module is invalidated\nexport function isModuleInvalidated(path: string): boolean {\n const state = hmrState.get(path);\n return state?.invalidated || false;\n}\n\n// Helper to clear HMR state for a module\nexport function clearHmrState(path: string): void {\n hmrState.delete(path);\n}\n\n// Helper to get all invalidated modules\nexport function getInvalidatedModules(): string[] {\n return Array.from(hmrState.entries())\n .filter(([_, state]) => state.invalidated)\n .map(([path]) => path);\n} "],"names":[],"mappings":";;;;;;;;;AAQa,MAAA,aAAA,uBAAoB,GAAyB;AAG7C,MAAA,QAAA,uBAAe,GAAwB;AAGvC,MAAA,QAAA,uBAAe,GAAsB;AAElD,IAAG,UAAY,EAAA;AACb,EAAA,IAAG,WAAW,OAAS,EAAA;AACrB,IAAA,UAAA,CAAW,OAAQ,CAAA,EAAA,CAAG,SAAW,EAAA,CAAC,GAA2D,KAAA;AAC3F,MAAG,IAAA,GAAA,CAAI,SAAS,YAAc,EAAA;AAE5B,QAAA,MAAM,iBAAiB,QAAS,CAAA,UAAA,CAAW,WAAY,CAAA,WAAA,EAAa,IAAI,IAAI,CAAA;AAC5E,QAAA,QAAA,CAAS,IAAI,cAAgB,EAAA;AAAA,UAC3B,SAAA,EAAW,KAAK,GAAI,EAAA;AAAA,UACpB,WAAa,EAAA,IAAA;AAAA,UACb,MAAA,EAAQ,GAAI,CAAA,MAAA,IAAU;AAAC,SACxB,CAAA;AAAA,OACH,MAAA,IAAU,GAAI,CAAA,IAAA,KAAS,YAAc,EAAA;AAEnC,QAAA,MAAM,iBAAiB,QAAS,CAAA,UAAA,CAAW,WAAY,CAAA,WAAA,EAAa,IAAI,IAAI,CAAA;AAC5E,QAAA,QAAA,CAAS,OAAO,cAAc,CAAA;AAAA;AAChC,KACD,CAAA;AAAA;AAEL,CAAO,MAAA;AACL,EAAM,MAAA,IAAI,MAAM,yCAAyC,CAAA;AAC3D;
|
|
1
|
+
{"version":3,"file":"state.js","sources":["../../../../plugin/worker/rsc/state.ts"],"sourcesContent":["import { workerData } from \"node:worker_threads\";\nimport { createCssProps } from \"../../helpers/createCssProps.js\";\nimport type { CssContent, ResolvedUserOptions, HmrState } from \"../../types.js\";\nimport type { PassThrough } from \"node:stream\";\nimport { relative } from \"node:path\";\n\n\n// Track active RSC streams\nexport const activeStreams = new Map<string, PassThrough>();\n\n// Track CSS files\nexport const cssFiles = new Map<string, CssContent>();\n\n\nexport const hmrState = new Map<string, HmrState>();\n\nif(workerData) {\n if(workerData.hmrPort) {\n workerData.hmrPort.on('message', (msg: { type: string; path: string; routes?: string[] }) => {\n if(msg.type === 'HMR_UPDATE') {\n // Normalize the path relative to project root\n const normalizedPath = relative(workerData.userOptions.projectRoot, msg.path);\n hmrState.set(normalizedPath, { \n timestamp: Date.now(), \n invalidated: true,\n routes: msg.routes || []\n });\n } else if(msg.type === 'HMR_ACCEPT') {\n // Normalize the path relative to project root\n const normalizedPath = relative(workerData.userOptions.projectRoot, msg.path);\n hmrState.delete(normalizedPath);\n }\n });\n }\n} else {\n throw new Error(\"This module must be run with workerData\");\n}\n\n// Create shared CSS registry\nexport const clientFiles = new Set<string>();\nexport const serverActionFiles = new Set<string>();\n\n// Helper functions\nexport function clearCssFiles() {\n cssFiles.clear();\n}\n\nexport function getCssFiles() {\n return cssFiles.entries();\n}\n\nexport function clearClientFiles() {\n clientFiles.clear();\n}\n\nexport function clearServerActionFiles() {\n serverActionFiles.clear();\n}\n\nexport function addCssFile(id: string, cssFile: CssContent) {\n cssFiles.set(id, cssFile);\n}\n\n\nexport function addCssFileContent(id: string, code: string, userOptions: Pick<ResolvedUserOptions, \"projectRoot\" | \"moduleBaseURL\" | \"moduleBasePath\" | \"moduleRootPath\" | \"css\">) {\n if(typeof code !== \"string\"){\n throw new Error(`Expected css to be loaded as a string, but got ${typeof code}`);\n }\n const normalizeId = id.startsWith(userOptions.moduleRootPath) ? id.slice(userOptions.moduleRootPath.length) : id;\n cssFiles.set(normalizeId, createCssProps({\n id,\n code,\n userOptions\n }));\n} \n\nexport function addClientFile(url: string) {\n clientFiles.add(url);\n}\n\nexport function addServerActionFile(url: string) {\n serverActionFiles.add(url);\n}\n\nexport function clearAllFiles() {\n clearCssFiles();\n clearClientFiles();\n clearServerActionFiles();\n}\n\n// Helper to check if a module is invalidated\nexport function isModuleInvalidated(path: string): boolean {\n const state = hmrState.get(path);\n return state?.invalidated || false;\n}\n\n// Helper to clear HMR state for a module\nexport function clearHmrState(path: string): void {\n hmrState.delete(path);\n}\n\n// Helper to get all invalidated modules\nexport function getInvalidatedModules(): string[] {\n return Array.from(hmrState.entries())\n .filter(([_, state]) => state.invalidated)\n .map(([path]) => path);\n} "],"names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A,EAAA;AAC9G,EAAS,QAAA,CAAA,GAAA,CAAI,aAAa,cAAe,CAAA;AAAA,IACvC,EAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACD,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { cleanObject } from '../helpers/cleanObject.js';
|
|
7
|
+
import { parentPort } from 'node:worker_threads';
|
|
8
|
+
|
|
9
|
+
function sendMessage(msg, port = parentPort) {
|
|
10
|
+
if (!port) {
|
|
11
|
+
console.error("[Worker] No port available to send message");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
if ("error" in msg) {
|
|
16
|
+
const error = msg.error;
|
|
17
|
+
const serializedError = error instanceof Error ? {
|
|
18
|
+
message: error.message,
|
|
19
|
+
stack: error.stack,
|
|
20
|
+
name: error.name,
|
|
21
|
+
cause: error.cause
|
|
22
|
+
} : {
|
|
23
|
+
message: String(error),
|
|
24
|
+
name: "Error"
|
|
25
|
+
};
|
|
26
|
+
port.postMessage({
|
|
27
|
+
...cleanObject(msg),
|
|
28
|
+
error: serializedError
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
port.postMessage(cleanObject(msg));
|
|
7
32
|
}
|
|
33
|
+
} catch (err) {
|
|
34
|
+
console.error("[Worker] Failed to send message:", err);
|
|
8
35
|
try {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
stack: error.stack,
|
|
15
|
-
name: error.name,
|
|
16
|
-
cause: error.cause,
|
|
17
|
-
} : {
|
|
18
|
-
message: String(error),
|
|
19
|
-
name: 'Error',
|
|
20
|
-
};
|
|
21
|
-
port.postMessage({
|
|
22
|
-
...cleanObject(msg),
|
|
23
|
-
error: serializedError,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
// Handle non-error messages
|
|
28
|
-
port.postMessage(cleanObject(msg));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
console.error("[Worker] Failed to send message:", err);
|
|
33
|
-
// Try to send a basic error message
|
|
34
|
-
try {
|
|
35
|
-
port.postMessage({
|
|
36
|
-
type: "ERROR",
|
|
37
|
-
error: {
|
|
38
|
-
message: err instanceof Error ? err.message : String(err),
|
|
39
|
-
name: err instanceof Error ? err.name : 'Error',
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
// If we can't even send an error message, just log it
|
|
45
|
-
console.error("[Worker] Critical error - could not send error message");
|
|
36
|
+
port.postMessage({
|
|
37
|
+
type: "ERROR",
|
|
38
|
+
error: {
|
|
39
|
+
message: err instanceof Error ? err.message : String(err),
|
|
40
|
+
name: err instanceof Error ? err.name : "Error"
|
|
46
41
|
}
|
|
42
|
+
});
|
|
43
|
+
} catch {
|
|
44
|
+
console.error("[Worker] Critical error - could not send error message");
|
|
47
45
|
}
|
|
46
|
+
}
|
|
48
47
|
}
|
|
48
|
+
|
|
49
|
+
export { sendMessage };
|
|
50
|
+
//# sourceMappingURL=sendMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendMessage.js","sources":["../../../plugin/worker/sendMessage.ts"],"sourcesContent":["import { cleanObject } from \"../helpers/cleanObject.js\";\nimport type { HtmlWorkerOutputMessage, RscWorkerOutputMessage } from \"./types.js\";\nimport { parentPort } from \"node:worker_threads\";\n\nexport function sendMessage(msg: HtmlWorkerOutputMessage | RscWorkerOutputMessage, port = parentPort) {\n if (!port) {\n console.error(\"[Worker] No port available to send message\");\n return;\n }\n\n try {\n // Handle error messages\n if ('error' in msg) {\n const error = msg.error;\n const serializedError = error instanceof Error ? {\n message: error.message,\n stack: error.stack,\n name: error.name,\n cause: error.cause,\n } : {\n message: String(error),\n name: 'Error',\n };\n\n port.postMessage({\n ...cleanObject(msg),\n error: serializedError,\n });\n } else {\n // Handle non-error messages\n port.postMessage(cleanObject(msg));\n }\n } catch (err) {\n console.error(\"[Worker] Failed to send message:\", err);\n // Try to send a basic error message\n try {\n port.postMessage({\n type: \"ERROR\",\n error: {\n message: err instanceof Error ? err.message : String(err),\n name: err instanceof Error ? err.name : 'Error',\n },\n });\n } catch {\n // If we can't even send an error message, just log it\n console.error(\"[Worker] Critical error - could not send error message\");\n }\n }\n}"],"names":[],"mappings":";;;;;;;;AAIO,SAAS,WAAA,CAAY,GAAuD,EAAA,IAAA,GAAO,UAAY,EAAA;AACpG,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAA,OAAA,CAAQ,MAAM,4CAA4C,CAAA;AAC1D,IAAA;AAAA;AAGF,EAAI,IAAA;AAEF,IAAA,IAAI,WAAW,GAAK,EAAA;AAClB,MAAA,MAAM,QAAQ,GAAI,CAAA,KAAA;AAClB,MAAM,MAAA,eAAA,GAAkB,iBAAiB,KAAQ,GAAA;AAAA,QAC/C,SAAS,KAAM,CAAA,OAAA;AAAA,QACf,OAAO,KAAM,CAAA,KAAA;AAAA,QACb,MAAM,KAAM,CAAA,IAAA;AAAA,QACZ,OAAO,KAAM,CAAA;AAAA,OACX,GAAA;AAAA,QACF,OAAA,EAAS,OAAO,KAAK,CAAA;AAAA,QACrB,IAAM,EAAA;AAAA,OACR;AAEA,MAAA,IAAA,CAAK,WAAY,CAAA;AAAA,QACf,GAAG,YAAY,GAAG,CAAA;AAAA,QAClB,KAAO,EAAA;AAAA,OACR,CAAA;AAAA,KACI,MAAA;AAEL,MAAK,IAAA,CAAA,WAAA,CAAY,WAAY,CAAA,GAAG,CAAC,CAAA;AAAA;AACnC,WACO,GAAK,EAAA;AACZ,IAAQ,OAAA,CAAA,KAAA,CAAM,oCAAoC,GAAG,CAAA;AAErD,IAAI,IAAA;AACF,MAAA,IAAA,CAAK,WAAY,CAAA;AAAA,QACf,IAAM,EAAA,OAAA;AAAA,QACN,KAAO,EAAA;AAAA,UACL,SAAS,GAAe,YAAA,KAAA,GAAQ,GAAI,CAAA,OAAA,GAAU,OAAO,GAAG,CAAA;AAAA,UACxD,IAAM,EAAA,GAAA,YAAe,KAAQ,GAAA,GAAA,CAAI,IAAO,GAAA;AAAA;AAC1C,OACD,CAAA;AAAA,KACK,CAAA,MAAA;AAEN,MAAA,OAAA,CAAQ,MAAM,wDAAwD,CAAA;AAAA;AACxE;AAEJ;;;;"}
|
|
@@ -55,6 +55,14 @@ export interface ChunkErrorMessage extends WorkerMessage {
|
|
|
55
55
|
error: string;
|
|
56
56
|
sequence?: number;
|
|
57
57
|
}
|
|
58
|
+
export type StreamHandlers = {
|
|
59
|
+
onError: (error: any, errorInfo?: any) => void;
|
|
60
|
+
onData: (data: any) => void;
|
|
61
|
+
onEnd: () => void;
|
|
62
|
+
onMetrics: (metrics: any) => void;
|
|
63
|
+
onHmrAccept: (routes: string[]) => void;
|
|
64
|
+
onHmrUpdate: (routes: string[]) => void;
|
|
65
|
+
};
|
|
58
66
|
export type RscRenderMessage = WorkerMessage & {
|
|
59
67
|
type: "RSC_RENDER";
|
|
60
68
|
} & Omit<CreateHandlerOptions, "onEvent" | "onMetrics" | "loader" | "Html" | "CssCollector" | "logger" | "build" | "autoDiscover"> & {
|
|
@@ -158,7 +166,7 @@ export type HtmlWorkerOutputMessage = {
|
|
|
158
166
|
} | {
|
|
159
167
|
type: "SHUTDOWN_COMPLETE";
|
|
160
168
|
id: string;
|
|
161
|
-
} | HmrAcceptMessage;
|
|
169
|
+
} | HmrAcceptMessage | ReadyMessage;
|
|
162
170
|
export type InitializedReactLoaderMessage = {
|
|
163
171
|
type: "INITIALIZED_REACT_LOADER";
|
|
164
172
|
id: string;
|
|
@@ -173,21 +181,33 @@ export type InitializedRscWorkerLoaderMessage = {
|
|
|
173
181
|
type: "INITIALIZED_RSC_WORKER_LOADER";
|
|
174
182
|
id: string;
|
|
175
183
|
};
|
|
184
|
+
export type InitializedEnvLoaderMessage = {
|
|
185
|
+
type: "INITIALIZED_ENV_LOADER";
|
|
186
|
+
id: string;
|
|
187
|
+
env: Record<string, string>;
|
|
188
|
+
};
|
|
176
189
|
export type HmrMessage = {
|
|
177
|
-
|
|
190
|
+
id: string;
|
|
178
191
|
};
|
|
179
192
|
export type HmrUpdateMessage = HmrMessage & {
|
|
180
193
|
type: "HMR_UPDATE";
|
|
181
194
|
routes?: string[];
|
|
195
|
+
timestamp?: number;
|
|
182
196
|
};
|
|
183
197
|
export type HmrCleanupMessage = HmrMessage & {
|
|
184
198
|
type: "HMR_CLEANUP";
|
|
199
|
+
routes?: string[];
|
|
200
|
+
timestamp?: number;
|
|
185
201
|
};
|
|
186
202
|
export type HmrAcceptMessage = HmrMessage & {
|
|
187
203
|
type: "HMR_ACCEPT";
|
|
188
204
|
routes?: string[];
|
|
189
205
|
};
|
|
190
|
-
export type RscWorkerInputMessage = RscRenderMessage | CssFileMessage | ShutdownMessage | ChunkProcessedMessage | ClientComponentMessage | InitializedReactLoaderMessage | InitializedCssLoaderMessage | ModuleRequestMessage | InitializedRscWorkerLoaderMessage | HmrUpdateMessage | HmrAcceptMessage
|
|
206
|
+
export type RscWorkerInputMessage = RscRenderMessage | CssFileMessage | ShutdownMessage | ChunkProcessedMessage | ClientComponentMessage | InitializedReactLoaderMessage | InitializedCssLoaderMessage | ModuleRequestMessage | InitializedRscWorkerLoaderMessage | InitializedEnvLoaderMessage | HmrUpdateMessage | HmrAcceptMessage | {
|
|
207
|
+
type: "HMR_CLEANUP";
|
|
208
|
+
id: string;
|
|
209
|
+
routes?: string[];
|
|
210
|
+
};
|
|
191
211
|
export interface CssFileRequestMessage extends WorkerMessage {
|
|
192
212
|
type: "CSS_FILE_REQUEST";
|
|
193
213
|
id: string;
|
|
@@ -212,7 +232,15 @@ export interface CssProcessedMessage extends WorkerMessage {
|
|
|
212
232
|
type: "CSS_PROCESSED";
|
|
213
233
|
id: string;
|
|
214
234
|
}
|
|
215
|
-
export type
|
|
235
|
+
export type ReadyMessage = {
|
|
236
|
+
type: "READY";
|
|
237
|
+
env: string | undefined;
|
|
238
|
+
pid: number;
|
|
239
|
+
};
|
|
240
|
+
export type RscWorkerOutputMessage = RscChunkOutputMessage | RscEndMessage | ShellReadyMessage | AllReadyMessage | ErrorMessage | CssFileMessage | CssFileRequestMessage | ClientComponentMessage | ModuleRequestMessage | ModuleResponseMessage | CssProcessedMessage | RscMetricsMessage | HmrAcceptMessage | HmrUpdateMessage | ReadyMessage | {
|
|
241
|
+
type: "SHUTDOWN_COMPLETE";
|
|
242
|
+
id: string;
|
|
243
|
+
};
|
|
216
244
|
export interface ClientReferenceMessage extends WorkerMessage {
|
|
217
245
|
type: "CLIENT_REFERENCE";
|
|
218
246
|
location: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../plugin/worker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,aAAa,EACd,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAGD,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mB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
7
|
|
|
8
8
|
const condition = process.env["NODE_OPTIONS"]?.match(/--conditions[= ]react-server/) ? "server" : "client";
|
|
9
9
|
if (condition !== "server") {
|
|
10
|
-
throw new Error("Condition mismatch, should be react-server but got " +
|
|
10
|
+
throw new Error("Condition mismatch, should be react-server but got " + condition);
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sources":["../server.ts"],"sourcesContent":["\"use strict\";\n\nconst condition = process.env['NODE_OPTIONS']?.match(/--conditions[= ]react-server/) ? 'server' : 'client'\n\nif(condition !== 'server'){\n throw new Error('Condition mismatch, should be react-server but got ' +
|
|
1
|
+
{"version":3,"file":"server.js","sources":["../server.ts"],"sourcesContent":["\"use strict\";\n\nconst condition = process.env['NODE_OPTIONS']?.match(/--conditions[= ]react-server/) ? 'server' : 'client'\n\nif(condition !== 'server'){\n throw new Error('Condition mismatch, should be react-server but got ' + condition);\n}\n\nexport { vitePluginReactServer } from './plugin/plugin.server.js'\n\n// types\nexport type * from './plugin/types.js'"],"names":[],"mappings":";;;;;;;AAEA,MAAM,SAAA,GAAY,QAAQ,GAAI,CAAA,cAAc,GAAG,KAAM,CAAA,8BAA8B,IAAI,QAAW,GAAA,QAAA;AAElG,IAAG,cAAc,QAAS,EAAA;AACxB,EAAM,MAAA,IAAI,KAAM,CAAA,qDAAA,GAAwD,SAAS,CAAA;AACnF"}
|