vite-plugin-react-server 1.1.10 → 1.1.12
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/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 +4 -3
- package/dist/plugin/config/defaults.d.ts.map +1 -1
- package/dist/plugin/config/defaults.js +5 -3
- 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/resolveEnv.d.ts +11 -1
- package/dist/plugin/config/resolveEnv.d.ts.map +1 -1
- package/dist/plugin/config/resolveEnv.js +104 -5
- package/dist/plugin/config/resolveEnv.js.map +1 -1
- package/dist/plugin/config/resolveOptions.d.ts.map +1 -1
- package/dist/plugin/config/resolveOptions.js +11 -4
- 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 +43 -18
- 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/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 +37 -18
- package/dist/plugin/helpers/getRouteFiles.js.map +1 -0
- 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/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 +10 -0
- package/dist/plugin/helpers/requestInfo.d.ts.map +1 -1
- package/dist/plugin/helpers/requestInfo.js.map +1 -1
- package/dist/plugin/helpers/requestToRoute.js +22 -14
- package/dist/plugin/helpers/requestToRoute.js.map +1 -0
- 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/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/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/process-env.d.ts +14 -0
- package/dist/plugin/process-env.d.ts.map +1 -0
- package/dist/plugin/react-client/createMessageHandlers.d.ts +2 -1
- package/dist/plugin/react-client/createMessageHandlers.d.ts.map +1 -1
- package/dist/plugin/react-client/createMessageHandlers.js +13 -2
- package/dist/plugin/react-client/createMessageHandlers.js.map +1 -1
- package/dist/plugin/react-client/createWorkerStream.d.ts +8 -2
- package/dist/plugin/react-client/createWorkerStream.d.ts.map +1 -1
- package/dist/plugin/react-client/createWorkerStream.js +49 -8
- 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 +18 -2
- 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 +112 -99
- 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 +28 -12
- 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/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 +19 -27
- package/dist/plugin/react-static/plugin.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/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 +57 -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 +2 -16
- 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 +7 -5
- package/dist/plugin/utils/createReactFetcher.js.map +1 -1
- package/dist/plugin/utils/env.js.map +1 -1
- 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 +1 -1
- package/dist/plugin/utils/index.d.ts.map +1 -1
- package/dist/plugin/utils/index.js +1 -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 +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 +33 -20
- package/dist/plugin/worker/createWorker.js.map +1 -1
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.js +1 -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.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 +41 -15
- 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/sendMessage.js +45 -43
- package/dist/plugin/worker/sendMessage.js.map +1 -0
- package/dist/plugin/worker/types.d.ts +26 -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 +4 -3
- package/plugin/config/index.ts +1 -1
- package/plugin/config/resolveEnv.ts +156 -6
- package/plugin/config/resolveOptions.ts +13 -5
- package/plugin/config/resolveUrlOption.ts +2 -7
- package/plugin/config/resolveUserConfig.ts +87 -36
- 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/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/requestInfo.ts +10 -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/env-loader.development.ts +84 -0
- package/plugin/plugin.client.ts +2 -0
- package/plugin/plugin.server.ts +3 -0
- package/plugin/plugin.ts +1 -3
- package/plugin/process-env.ts +13 -0
- package/plugin/react-client/createMessageHandlers.ts +13 -1
- package/plugin/react-client/createWorkerStream.ts +69 -15
- package/plugin/react-client/handleWorkerRscStream.ts +57 -0
- package/plugin/react-client/plugin.ts +29 -13
- package/plugin/react-client/restartWorker.ts +15 -7
- package/plugin/react-client/server.ts +115 -124
- package/plugin/react-server/plugin.ts +26 -13
- package/plugin/react-server/server.ts +33 -15
- package/plugin/react-static/collectHtmlWorkerContent.ts +13 -1
- package/plugin/react-static/fileWriter.ts +1 -1
- package/plugin/react-static/plugin.ts +21 -34
- package/plugin/root.ts +7 -1
- package/plugin/transformer/upgradeCssModuleCode.ts +39 -39
- package/plugin/types/env.d.ts +7 -0
- package/plugin/types.ts +68 -20
- package/plugin/utils/callServer.ts +2 -24
- package/plugin/utils/createCallServer.ts +26 -0
- package/plugin/utils/createReactFetcher.ts +10 -6
- package/plugin/utils/envUrls.node.ts +19 -0
- package/plugin/utils/envUrls.ts +8 -0
- package/plugin/utils/index.ts +1 -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 +38 -22
- package/plugin/worker/html/createHtmlWorkerRenderState.tsx +1 -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 +4 -5
- package/plugin/worker/rsc/messageHandler.tsx +53 -17
- package/plugin/worker/rsc/rsc-worker.development.ts +22 -8
- package/plugin/worker/rsc/rsc-worker.production.ts +23 -7
- package/plugin/worker/types.ts +28 -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 -5
- package/dist/plugin/utils/pageURL.d.ts.map +0 -1
- package/dist/plugin/utils/pageURL.js +0 -33
- 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/getCondition.ts +0 -0
- package/plugin/manifest.ts +0 -24
- package/plugin/utils/pageURL.ts +0 -33
- /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/{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/{getCondition.js → process-env.js} +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/{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":"rsc-worker.production.js","sources":["../../../../plugin/worker/rsc/rsc-worker.production.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"rsc-worker.production.js","sources":["../../../../plugin/worker/rsc/rsc-worker.production.ts"],"sourcesContent":["import { parentPort, MessageChannel } from \"node:worker_threads\";\nimport { messageHandler } from \"./messageHandler.js\";\nimport { register } from \"node:module\";\nimport { join } from \"node:path\";\nimport { pluginRoot } from \"../../root.js\";\nimport type { ReadyMessage } from \"../types.js\";\n\nif (!parentPort) {\n throw new Error(\"This module must be run as a worker\");\n}\n\n// Create channels for each loader\nconst reactLoaderChannel = new MessageChannel();\nconst cssLoaderChannel = new MessageChannel();\nconst envLoaderChannel = new MessageChannel();\n\n// Register loaders\nregister(join(pluginRoot, \"worker/env-loader.js\"), {\n parentURL: import.meta.url,\n data: { port: envLoaderChannel.port2 },\n transferList: [envLoaderChannel.port2],\n});\n\n// Listen for messages from loaders\nreactLoaderChannel.port2.on(\"message\", messageHandler);\ncssLoaderChannel.port2.on(\"message\", messageHandler);\nenvLoaderChannel.port2.on(\"message\", messageHandler);\n\n// Handle incoming messages\nparentPort.on(\"message\", messageHandler);\n\n// Signal ready\nparentPort.postMessage({ type: \"READY\", env: process.env[\"NODE_ENV\"], pid: process.pid } satisfies ReadyMessage);\n"],"names":[],"mappings":";;;;;;;;;;;AAOA,IAAI,CAAC,UAAY,EAAA;AACf,EAAM,MAAA,IAAI,MAAM,qCAAqC,CAAA;AACvD;AAGA,MAAM,kBAAA,GAAqB,IAAI,cAAe,EAAA;AAC9C,MAAM,gBAAA,GAAmB,IAAI,cAAe,EAAA;AAC5C,MAAM,gBAAA,GAAmB,IAAI,cAAe,EAAA;AAG5C,QAAS,CAAA,IAAA,CAAK,UAAY,EAAA,sBAAsB,CAAG,EAAA;AAAA,EACjD,WAAW,MAAY,CAAA,IAAA,CAAA,GAAA;AAAA,EACvB,IAAM,EAAA,EAAE,IAAM,EAAA,gBAAA,CAAiB,KAAM,EAAA;AAAA,EACrC,YAAA,EAAc,CAAC,gBAAA,CAAiB,KAAK;AACvC,CAAC,CAAA;AAGD,kBAAmB,CAAA,KAAA,CAAM,EAAG,CAAA,SAAA,EAAW,cAAc,CAAA;AACrD,gBAAiB,CAAA,KAAA,CAAM,EAAG,CAAA,SAAA,EAAW,cAAc,CAAA;AACnD,gBAAiB,CAAA,KAAA,CAAM,EAAG,CAAA,SAAA,EAAW,cAAc,CAAA;AAGnD,UAAW,CAAA,EAAA,CAAG,WAAW,cAAc,CAAA;AAGvC,UAAA,CAAW,WAAY,CAAA,EAAE,IAAM,EAAA,OAAA,EAAS,GAAK,EAAA,OAAA,CAAQ,GAAI,CAAA,UAAU,CAAG,EAAA,GAAA,EAAK,OAAQ,CAAA,GAAA,EAA4B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,eAAO,MAAM,aAAa,0BAAiC,CAAC;AAG5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;mBA+
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,eAAO,MAAM,aAAa,0BAAiC,CAAC;AAG5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;mBA+Fglc,MAAO,SAAS;;;;8BAArM,MAAO,SAAS;;;;;;;;;;;eAAqK,MAAO,SAAS;;;;GA/Fhkc,CAAC;AAGtD,eAAO,MAAM,QAAQ,uBAA8B,CAAC;AAyBpD,eAAO,MAAM,WAAW,aAAoB,CAAC;AAC7C,eAAO,MAAM,iBAAiB,aAAoB,CAAC;AAGnD,wBAAgB,aAAa,SAE5B;AAED,wBAAgB,WAAW;;;;;;;;;;;;mBA2D0kc,MAAO,SAAS;;;;8BAArM,MAAO,SAAS;;;;;;;;;;;eAAqK,MAAO,SAAS;;;;KAzDpnc;AAED,wBAAgB,gBAAgB,SAE/B;AAED,wBAAgB,sBAAsB,SAErC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,QAEzD;AAGD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,KAAK,CAAC,QAUhL;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,QAExC;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,wBAAgB,aAAa,SAI5B;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGzD;AAGD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEhD;AAGD,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAIhD"}
|
|
@@ -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,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
|
|
60
60
|
onData: (data: any) => void;
|
|
61
61
|
onEnd: () => void;
|
|
62
62
|
onMetrics: (metrics: any) => void;
|
|
63
|
+
onHmrAccept: (routes: string[]) => void;
|
|
64
|
+
onHmrUpdate: (routes: string[]) => void;
|
|
63
65
|
};
|
|
64
66
|
export type RscRenderMessage = WorkerMessage & {
|
|
65
67
|
type: "RSC_RENDER";
|
|
@@ -164,7 +166,7 @@ export type HtmlWorkerOutputMessage = {
|
|
|
164
166
|
} | {
|
|
165
167
|
type: "SHUTDOWN_COMPLETE";
|
|
166
168
|
id: string;
|
|
167
|
-
} | HmrAcceptMessage;
|
|
169
|
+
} | HmrAcceptMessage | ReadyMessage;
|
|
168
170
|
export type InitializedReactLoaderMessage = {
|
|
169
171
|
type: "INITIALIZED_REACT_LOADER";
|
|
170
172
|
id: string;
|
|
@@ -179,21 +181,33 @@ export type InitializedRscWorkerLoaderMessage = {
|
|
|
179
181
|
type: "INITIALIZED_RSC_WORKER_LOADER";
|
|
180
182
|
id: string;
|
|
181
183
|
};
|
|
184
|
+
export type InitializedEnvLoaderMessage = {
|
|
185
|
+
type: "INITIALIZED_ENV_LOADER";
|
|
186
|
+
id: string;
|
|
187
|
+
env: Record<string, string>;
|
|
188
|
+
};
|
|
182
189
|
export type HmrMessage = {
|
|
183
|
-
|
|
190
|
+
id: string;
|
|
184
191
|
};
|
|
185
192
|
export type HmrUpdateMessage = HmrMessage & {
|
|
186
193
|
type: "HMR_UPDATE";
|
|
187
194
|
routes?: string[];
|
|
195
|
+
timestamp?: number;
|
|
188
196
|
};
|
|
189
197
|
export type HmrCleanupMessage = HmrMessage & {
|
|
190
198
|
type: "HMR_CLEANUP";
|
|
199
|
+
routes?: string[];
|
|
200
|
+
timestamp?: number;
|
|
191
201
|
};
|
|
192
202
|
export type HmrAcceptMessage = HmrMessage & {
|
|
193
203
|
type: "HMR_ACCEPT";
|
|
194
204
|
routes?: string[];
|
|
195
205
|
};
|
|
196
|
-
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
|
+
};
|
|
197
211
|
export interface CssFileRequestMessage extends WorkerMessage {
|
|
198
212
|
type: "CSS_FILE_REQUEST";
|
|
199
213
|
id: string;
|
|
@@ -218,7 +232,15 @@ export interface CssProcessedMessage extends WorkerMessage {
|
|
|
218
232
|
type: "CSS_PROCESSED";
|
|
219
233
|
id: string;
|
|
220
234
|
}
|
|
221
|
-
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
|
+
};
|
|
222
244
|
export interface ClientReferenceMessage extends WorkerMessage {
|
|
223
245
|
type: "CLIENT_REFERENCE";
|
|
224
246
|
location: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../plugin/worker/types.ts"],"names":[],"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AM,CAAC;IACtB,qBAAqB,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,GAAG,YAAY,CAAC,CAAC;CACjF;AAED,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,cAAc,GAAG,cAAc,CAAC;KAC5C,CAAC;CACH,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EACF;QACE,IAAI,EAAE,SAAS,CAAC;QAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;KAC9B,GACD;QACE,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EAAE,KAAK,CAAC;KACd,CAAC;CACP,CAAC;AAEN,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,cAAc,GAAG,iBAAiB,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -7,6 +7,6 @@ export { vitePluginReactServer } from './plugin/plugin.server.js';
|
|
|
7
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"}
|