vite-plugin-react-server 0.3.4 → 0.3.6
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 +113 -222
- package/bin/patch.mjs +84 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/node_modules/magic-string/dist/magic-string.es.js +1283 -0
- package/dist/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
- package/dist/package.json +130 -0
- package/dist/plugin/assertServerCondition.d.ts.map +1 -0
- package/dist/plugin/assertServerCondition.js +15 -0
- package/dist/plugin/build/createClientBuildConfig.d.ts +3 -0
- package/dist/plugin/build/createClientBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createClientBuildConfig.js +14 -0
- package/dist/plugin/build/createServerBuildConfig.d.ts +12 -0
- package/dist/plugin/build/createServerBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createServerBuildConfig.js +40 -0
- package/dist/plugin/build/createSharedBuildConfig.d.ts +5 -0
- package/dist/plugin/build/createSharedBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createSharedBuildConfig.js +28 -0
- package/dist/plugin/build/mergeInputs.d.ts +9 -0
- package/dist/plugin/build/mergeInputs.d.ts.map +1 -0
- package/dist/plugin/build/mergeInputs.js +56 -0
- package/dist/plugin/checkFilesExist.d.ts +3 -0
- package/dist/plugin/checkFilesExist.d.ts.map +1 -0
- package/dist/plugin/checkFilesExist.js +78 -0
- package/dist/plugin/checkFilesExist.js.map +1 -0
- package/dist/{collect-css-manifest.d.ts → plugin/collect-css-manifest.d.ts} +2 -2
- package/dist/plugin/collect-css-manifest.d.ts.map +1 -0
- package/dist/{src → plugin}/collect-css-manifest.js +8 -5
- package/dist/plugin/collect-css-manifest.js.map +1 -0
- package/dist/plugin/components.d.ts.map +1 -0
- package/dist/{src → plugin}/components.js +9 -4
- package/dist/plugin/components.js.map +1 -0
- package/dist/plugin/config/defaults.d.ts +51 -0
- package/dist/plugin/config/defaults.d.ts.map +1 -0
- package/dist/plugin/config/defaults.js +52 -0
- package/dist/plugin/config/defaults.js.map +1 -0
- package/dist/plugin/config/getCondition.d.ts +2 -0
- package/dist/plugin/config/getCondition.d.ts.map +1 -0
- package/dist/plugin/config/getCondition.js +11 -0
- package/dist/plugin/config/getCondition.js.map +1 -0
- package/dist/plugin/config/getPaths.d.ts +5 -0
- package/dist/plugin/config/getPaths.d.ts.map +1 -0
- package/dist/plugin/config/getPaths.js +21 -0
- package/dist/plugin/config/getPaths.js.map +1 -0
- package/dist/plugin/config/getWorkerPath.d.ts +2 -0
- package/dist/plugin/config/getWorkerPath.d.ts.map +1 -0
- package/dist/plugin/config/getWorkerPath.js +4 -0
- package/dist/plugin/config/index.d.ts +8 -0
- package/dist/plugin/config/index.d.ts.map +1 -0
- package/dist/plugin/config/index.js +7 -0
- package/dist/plugin/config/moduleIdDefault.d.ts +8 -0
- package/dist/plugin/config/moduleIdDefault.d.ts.map +1 -0
- package/dist/plugin/config/moduleIdDefault.js +23 -0
- package/dist/plugin/config/moduleIdDefault.js.map +1 -0
- package/dist/plugin/config/resolveOptions.d.ts +9 -0
- package/dist/plugin/config/resolveOptions.d.ts.map +1 -0
- package/dist/plugin/config/resolveOptions.js +56 -0
- package/dist/plugin/config/resolveOptions.js.map +1 -0
- package/dist/plugin/config/resolvePages.d.ts +9 -0
- package/dist/plugin/config/resolvePages.d.ts.map +1 -0
- package/dist/plugin/config/resolvePages.js +38 -0
- package/dist/plugin/config/resolvePages.js.map +1 -0
- package/dist/plugin/config/resolveUserConfig.d.ts +18 -0
- package/dist/plugin/config/resolveUserConfig.d.ts.map +1 -0
- package/dist/plugin/config/resolveUserConfig.js +84 -0
- package/dist/plugin/config/resolveUserConfig.js.map +1 -0
- package/dist/plugin/copy-dir.d.ts.map +1 -0
- package/dist/plugin/copy-dir.js +20 -0
- package/dist/plugin/getCondition.d.ts +2 -0
- package/dist/plugin/getCondition.d.ts.map +1 -0
- package/dist/plugin/getCondition.js +1 -0
- package/dist/plugin/getEnv.d.ts.map +1 -0
- package/dist/plugin/getEnv.js +107 -0
- package/dist/plugin/helpers/createClientInputNormalizer.d.ts +8 -0
- package/dist/plugin/helpers/createClientInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createClientInputNormalizer.js +35 -0
- package/dist/plugin/helpers/createServerInputNormalizer.d.ts +9 -0
- package/dist/plugin/helpers/createServerInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createServerInputNormalizer.js +37 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.d.ts +7 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.js +18 -0
- package/dist/plugin/helpers/getModuleManifest.d.ts +12 -0
- package/dist/plugin/helpers/getModuleManifest.d.ts.map +1 -0
- package/dist/plugin/helpers/getModuleManifest.js +24 -0
- package/dist/plugin/helpers/getModuleManifest.js.map +1 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts +3 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/inputNormalizer.js +35 -0
- package/dist/plugin/helpers/inputNormalizer.js.map +1 -0
- package/dist/plugin/helpers/inputNormalizerWorker.d.ts +11 -0
- package/dist/plugin/helpers/inputNormalizerWorker.d.ts.map +1 -0
- package/dist/plugin/helpers/inputNormalizerWorker.js +30 -0
- package/dist/plugin/helpers/normalizedRelativePath.d.ts.map +1 -0
- package/dist/plugin/helpers/normalizedRelativePath.js +36 -0
- package/dist/plugin/helpers/resolveFilePath.d.ts +13 -0
- package/dist/plugin/helpers/resolveFilePath.d.ts.map +1 -0
- package/dist/plugin/helpers/resolveFilePath.js +74 -0
- package/dist/plugin/helpers/resolveWorkerModule.d.ts +6 -0
- package/dist/plugin/helpers/resolveWorkerModule.d.ts.map +1 -0
- package/dist/plugin/helpers/resolveWorkerModule.js +24 -0
- package/dist/plugin/helpers/tryManifest.d.ts.map +1 -0
- package/dist/{src → plugin}/helpers/tryManifest.js +11 -6
- package/dist/plugin/helpers/tryManifest.js.map +1 -0
- package/dist/plugin/helpers/validateModuleBase.d.ts +3 -0
- package/dist/plugin/helpers/validateModuleBase.d.ts.map +1 -0
- package/dist/plugin/helpers/validateModuleBase.js +16 -0
- package/dist/plugin/helpers/validateResolvedConfig.d.ts +3 -0
- package/dist/plugin/helpers/validateResolvedConfig.d.ts.map +1 -0
- package/dist/plugin/helpers/validateResolvedConfig.js +17 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +1 -0
- package/dist/plugin/loader/createBuildLoader.d.ts +9 -0
- package/dist/plugin/loader/createBuildLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createBuildLoader.js +38 -0
- package/dist/plugin/loader/createBuildLoader.js.map +1 -0
- package/dist/plugin/loader/createCssLoader.d.ts +30 -0
- package/dist/plugin/loader/createCssLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createCssLoader.js +35 -0
- package/dist/{html → plugin/loader}/createPageLoader.d.ts +2 -4
- package/dist/plugin/loader/createPageLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createPageLoader.js +57 -0
- package/dist/plugin/manifest.d.ts.map +1 -0
- package/dist/plugin/manifest.js +13 -0
- package/dist/plugin/module-graph.d.ts.map +1 -0
- package/dist/plugin/module-graph.js +35 -0
- package/dist/plugin/plugin.d.ts +7 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +8 -0
- package/dist/plugin/preserver/index.d.ts +2 -0
- package/dist/plugin/preserver/index.d.ts.map +1 -0
- package/dist/plugin/preserver/index.js +1 -0
- package/dist/plugin/preserver/plugin.d.ts +3 -0
- package/dist/plugin/preserver/plugin.d.ts.map +1 -0
- package/dist/plugin/preserver/plugin.js +90 -0
- package/dist/plugin/preserver/plugin.js.map +1 -0
- package/dist/plugin/react-client/index.d.ts +2 -0
- package/dist/plugin/react-client/index.d.ts.map +1 -0
- package/dist/plugin/react-client/index.js +1 -0
- package/dist/plugin/react-client/plugin.d.ts +4 -0
- package/dist/plugin/react-client/plugin.d.ts.map +1 -0
- package/dist/plugin/react-client/plugin.js +34 -0
- package/dist/plugin/react-client/plugin.js.map +1 -0
- package/dist/plugin/react-server/createDevMiddleware.d.ts.map +1 -0
- package/dist/plugin/react-server/createDevMiddleware.js +68 -0
- package/dist/plugin/react-server/createDevServer.d.ts.map +1 -0
- package/dist/plugin/react-server/createDevServer.js +4 -0
- package/dist/plugin/react-server/createHandler.d.ts +17 -0
- package/dist/plugin/react-server/createHandler.d.ts.map +1 -0
- package/dist/{src → plugin}/react-server/createHandler.js +28 -17
- package/dist/plugin/react-server/createHandler.js.map +1 -0
- package/dist/plugin/react-server/createReactNodeStreamer.d.ts.map +1 -0
- package/dist/plugin/react-server/createReactNodeStreamer.js +7 -0
- package/dist/{react-server → plugin/react-server}/createRscStream.d.ts +1 -1
- package/dist/plugin/react-server/createRscStream.d.ts.map +1 -0
- package/dist/{src → plugin}/react-server/createRscStream.js +14 -13
- package/dist/plugin/react-server/createRscStream.js.map +1 -0
- package/dist/{react-server → plugin/react-server}/createSsrHandler.d.ts +1 -1
- package/dist/plugin/react-server/createSsrHandler.d.ts.map +1 -0
- package/dist/plugin/react-server/createSsrHandler.js +102 -0
- package/dist/plugin/react-server/index.d.ts +3 -0
- package/dist/plugin/react-server/index.d.ts.map +1 -0
- package/dist/plugin/react-server/index.js +10 -0
- package/dist/plugin/react-server/plugin.d.ts +7 -0
- package/dist/plugin/react-server/plugin.d.ts.map +1 -0
- package/dist/plugin/react-server/plugin.js +377 -0
- package/dist/plugin/react-server/plugin.js.map +1 -0
- package/dist/plugin/resolvePage.d.ts.map +1 -0
- package/dist/{src → plugin}/resolvePage.js +8 -4
- package/dist/plugin/resolvePage.js.map +1 -0
- package/dist/plugin/resolveProps.d.ts.map +1 -0
- package/dist/{src → plugin}/resolveProps.js +21 -8
- package/dist/plugin/resolveProps.js.map +1 -0
- package/dist/plugin/server.d.ts +2 -0
- package/dist/plugin/server.d.ts.map +1 -0
- package/dist/plugin/server.js +1 -0
- package/dist/plugin/transformer/index.d.ts +2 -0
- package/dist/plugin/transformer/index.d.ts.map +1 -0
- package/dist/plugin/transformer/index.js +1 -0
- package/dist/{transformer/index.d.ts → plugin/transformer/plugin.d.ts} +3 -4
- package/dist/plugin/transformer/plugin.d.ts.map +1 -0
- package/dist/plugin/transformer/plugin.js +94 -0
- package/dist/plugin/transformer/plugin.js.map +1 -0
- package/dist/plugin/transformer/transformer-client-components.d.ts +21 -0
- package/dist/plugin/transformer/transformer-client-components.d.ts.map +1 -0
- package/dist/plugin/transformer/transformer-client-components.js +61 -0
- package/dist/plugin/transformer/transformer-client-components.js.map +1 -0
- package/dist/{transformer/transformer.d.ts → plugin/transformer/transformer-server-actions.d.ts} +3 -4
- package/dist/plugin/transformer/transformer-server-actions.d.ts.map +1 -0
- package/dist/plugin/transformer/transformer-server-actions.js +76 -0
- package/dist/plugin/transformer/transformer-server-actions.js.map +1 -0
- package/dist/plugin/transformer/types.d.ts.map +1 -0
- package/dist/plugin/transformer/types.js +1 -0
- package/dist/plugin/types.d.ts +225 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/plugin/types.js +1 -0
- package/dist/plugin/worker/createWorker.d.ts +15 -0
- package/dist/plugin/worker/createWorker.d.ts.map +1 -0
- package/dist/plugin/worker/createWorker.js +71 -0
- package/dist/plugin/worker/createWorker.js.map +1 -0
- package/dist/plugin/worker/html/html-worker.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.development.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.development.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.development.js +12 -0
- package/dist/plugin/worker/html/html-worker.development.js.map +1 -0
- package/dist/plugin/worker/html/html-worker.js +4 -0
- package/dist/plugin/worker/html/html-worker.production.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.production.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.production.js +12 -0
- package/dist/plugin/worker/html/html-worker.production.js.map +1 -0
- package/dist/plugin/worker/html/index.d.ts +2 -0
- package/dist/plugin/worker/html/index.d.ts.map +1 -0
- package/dist/plugin/worker/html/index.js +7 -0
- package/dist/plugin/worker/html/index.js.map +1 -0
- package/dist/plugin/worker/html/messageHandler.d.ts +3 -0
- package/dist/plugin/worker/html/messageHandler.d.ts.map +1 -0
- package/dist/plugin/worker/html/messageHandler.js +98 -0
- package/dist/plugin/worker/html/messageHandler.js.map +1 -0
- package/dist/plugin/worker/html/plugin.d.ts +4 -0
- package/dist/plugin/worker/html/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/html/plugin.js +89 -0
- package/dist/plugin/worker/html/renderPages.d.ts +38 -0
- package/dist/plugin/worker/html/renderPages.d.ts.map +1 -0
- package/dist/plugin/worker/html/renderPages.js +123 -0
- package/dist/plugin/worker/html/renderPages.js.map +1 -0
- package/dist/plugin/worker/loader.d.ts.map +1 -0
- package/dist/plugin/worker/loader.js +11 -0
- package/dist/plugin/worker/loader.js.map +1 -0
- package/dist/plugin/worker/plugin.d.ts +10 -0
- package/dist/plugin/worker/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/plugin.js +14 -0
- package/dist/plugin/worker/rsc/createRscStream.d.ts +5 -0
- package/dist/plugin/worker/rsc/createRscStream.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/createRscStream.js +39 -0
- package/dist/plugin/worker/rsc/createRscStream.js.map +1 -0
- package/dist/plugin/worker/rsc/development.d.ts +5 -0
- package/dist/plugin/worker/rsc/development.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/development.js +13 -0
- package/dist/plugin/worker/rsc/development.js.map +1 -0
- package/dist/plugin/worker/rsc/index.d.ts +4 -0
- package/dist/plugin/worker/rsc/index.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/index.js +15 -0
- package/dist/plugin/worker/rsc/index.js.map +1 -0
- package/dist/plugin/worker/rsc/plugin.d.ts +4 -0
- package/dist/plugin/worker/rsc/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/plugin.js +82 -0
- package/dist/plugin/worker/rsc/plugin.js.map +1 -0
- package/dist/plugin/worker/rsc/production.d.ts +5 -0
- package/dist/plugin/worker/rsc/production.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/production.js +13 -0
- package/dist/plugin/worker/rsc/production.js.map +1 -0
- package/dist/plugin/worker/rsc/rsc-worker.d.ts +2 -0
- package/dist/plugin/worker/rsc/rsc-worker.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/rsc-worker.js +106 -0
- package/dist/plugin/worker/types.d.ts +99 -0
- package/dist/plugin/worker/types.d.ts.map +1 -0
- package/dist/plugin/worker/types.js +1 -0
- package/dist/server.d.ts +4 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +9 -0
- package/dist/server.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +1 -201
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/package.json +42 -25
- package/plugin/build/createClientBuildConfig.ts +21 -0
- package/plugin/build/createServerBuildConfig.ts +66 -0
- package/plugin/build/createSharedBuildConfig.ts +35 -0
- package/plugin/build/mergeInputs.ts +58 -0
- package/plugin/checkFilesExist.ts +82 -0
- package/{src → plugin}/collect-css-manifest.ts +4 -2
- package/plugin/config/defaults.ts +44 -0
- package/plugin/config/getCondition.ts +3 -0
- package/plugin/config/getPaths.ts +25 -0
- package/plugin/config/getWorkerPath.ts +5 -0
- package/plugin/config/index.ts +8 -0
- package/plugin/config/moduleIdDefault.ts +23 -0
- package/plugin/config/resolveOptions.ts +53 -0
- package/plugin/config/resolvePages.ts +43 -0
- package/plugin/config/resolveUserConfig.ts +97 -0
- package/{src → plugin}/getEnv.ts +1 -1
- package/plugin/helpers/createClientInputNormalizer.ts +48 -0
- package/plugin/helpers/createServerInputNormalizer.ts +52 -0
- package/plugin/helpers/createStaticInputNormalizer.ts +26 -0
- package/plugin/helpers/getModuleManifest.ts +31 -0
- package/plugin/helpers/inputNormalizer.ts +39 -0
- package/plugin/helpers/inputNormalizerWorker.ts +47 -0
- package/plugin/helpers/resolveFilePath.ts +108 -0
- package/plugin/helpers/resolveWorkerModule.ts +41 -0
- package/plugin/helpers/validateModuleBase.ts +30 -0
- package/plugin/helpers/validateResolvedConfig.ts +21 -0
- package/plugin/index.ts +2 -0
- package/plugin/loader/createBuildLoader.ts +44 -0
- package/plugin/loader/createCssLoader.ts +73 -0
- package/{src/html → plugin/loader}/createPageLoader.ts +35 -27
- package/plugin/plugin.ts +8 -0
- package/plugin/preserver/index.ts +1 -0
- package/plugin/preserver/plugin.ts +109 -0
- package/plugin/react-client/index.ts +1 -0
- package/plugin/react-client/plugin.ts +33 -0
- package/{src → plugin}/react-server/createDevMiddleware.ts +17 -1
- package/{src → plugin}/react-server/createDevServer.ts +0 -1
- package/{src → plugin}/react-server/createHandler.ts +31 -10
- package/{src → plugin}/react-server/createReactNodeStreamer.ts +1 -0
- package/{src → plugin}/react-server/createRscStream.ts +8 -12
- package/{src → plugin}/react-server/createSsrHandler.ts +16 -19
- package/plugin/react-server/index.ts +12 -0
- package/plugin/react-server/plugin.ts +464 -0
- package/{src → plugin}/resolvePage.ts +1 -1
- package/{src → plugin}/resolveProps.ts +15 -6
- package/plugin/server.tsx +0 -0
- package/plugin/transformer/index.ts +1 -0
- package/plugin/transformer/plugin.ts +141 -0
- package/plugin/transformer/transformer-client-components.ts +94 -0
- package/{src/transformer/transformer.ts → plugin/transformer/transformer-server-actions.ts} +14 -27
- package/{src → plugin}/types.ts +97 -55
- package/plugin/worker/createWorker.ts +84 -0
- package/plugin/worker/html/html-worker.development.tsx +8 -0
- package/plugin/worker/html/html-worker.production.tsx +8 -0
- package/plugin/worker/html/html-worker.ts +5 -0
- package/plugin/worker/html/index.ts +5 -0
- package/plugin/worker/html/messageHandler.ts +116 -0
- package/plugin/worker/html/plugin.ts +97 -0
- package/plugin/worker/html/renderPages.ts +188 -0
- package/plugin/worker/plugin.ts +17 -0
- package/plugin/worker/rsc/createRscStream.ts +42 -0
- package/plugin/worker/rsc/development.ts +6 -0
- package/plugin/worker/rsc/index.ts +14 -0
- package/plugin/worker/rsc/plugin.ts +83 -0
- package/plugin/worker/rsc/production.ts +6 -0
- package/plugin/worker/rsc/rsc-worker.tsx +128 -0
- package/plugin/worker/types.ts +124 -0
- package/scripts/check-react-version.mjs +48 -30
- package/scripts/react+0.0.0-experimental-b3a95caf-20250113.patch +4291 -0
- package/scripts/react-dom+0.0.0-experimental-b3a95caf-20250113.patch +108798 -0
- package/scripts/react-server-dom-esm+0.0.0-experimental-b3a95caf-20250113.patch +24775 -0
- package/{patches → scripts}/react-server-dom-esm+0.0.1.patch +11354 -3
- package/tsconfig.json +15 -13
- package/dist/assertServerCondition.d.ts.map +0 -1
- package/dist/bin/patch.js +0 -51
- package/dist/bin/patch.js.map +0 -1
- package/dist/build/createBuildConfig.d.ts +0 -13
- package/dist/build/createBuildConfig.d.ts.map +0 -1
- package/dist/build/mergeInputs.d.ts +0 -5
- package/dist/build/mergeInputs.d.ts.map +0 -1
- package/dist/checkFilesExist.d.ts +0 -8
- package/dist/checkFilesExist.d.ts.map +0 -1
- package/dist/collect-css-manifest.d.ts.map +0 -1
- package/dist/components.d.ts.map +0 -1
- package/dist/copy-dir.d.ts.map +0 -1
- package/dist/getEnv.d.ts.map +0 -1
- package/dist/helpers/inputNormalizer.d.ts +0 -6
- package/dist/helpers/inputNormalizer.d.ts.map +0 -1
- package/dist/helpers/normalizedRelativePath.d.ts.map +0 -1
- package/dist/helpers/tryManifest.d.ts.map +0 -1
- package/dist/html/createPageLoader.d.ts.map +0 -1
- package/dist/manifest.d.ts.map +0 -1
- package/dist/module-graph.d.ts.map +0 -1
- package/dist/options.d.ts +0 -91
- package/dist/options.d.ts.map +0 -1
- package/dist/plugin.d.ts +0 -3
- package/dist/plugin.d.ts.map +0 -1
- package/dist/react-client/plugin.d.ts +0 -4
- package/dist/react-client/plugin.d.ts.map +0 -1
- package/dist/react-client/plugin.js +0 -28
- package/dist/react-client/plugin.js.map +0 -1
- package/dist/react-server/createDevMiddleware.d.ts.map +0 -1
- package/dist/react-server/createDevServer.d.ts.map +0 -1
- package/dist/react-server/createHandler.d.ts +0 -23
- package/dist/react-server/createHandler.d.ts.map +0 -1
- package/dist/react-server/createReactNodeStreamer.d.ts.map +0 -1
- package/dist/react-server/createRscStream.d.ts.map +0 -1
- package/dist/react-server/createSsrHandler.d.ts.map +0 -1
- package/dist/react-server/plugin.d.ts +0 -8
- package/dist/react-server/plugin.d.ts.map +0 -1
- package/dist/react-server/plugin.js +0 -345
- package/dist/react-server/plugin.js.map +0 -1
- package/dist/resolvePage.d.ts.map +0 -1
- package/dist/resolveProps.d.ts.map +0 -1
- package/dist/scripts/check-react-version.js +0 -34
- package/dist/scripts/check-react-version.js.map +0 -1
- package/dist/src/build/createBuildConfig.js +0 -44
- package/dist/src/build/createBuildConfig.js.map +0 -1
- package/dist/src/build/mergeInputs.js +0 -16
- package/dist/src/build/mergeInputs.js.map +0 -1
- package/dist/src/checkFilesExist.js +0 -61
- package/dist/src/checkFilesExist.js.map +0 -1
- package/dist/src/collect-css-manifest.js.map +0 -1
- package/dist/src/components.js.map +0 -1
- package/dist/src/getEnv.js +0 -76
- package/dist/src/getEnv.js.map +0 -1
- package/dist/src/helpers/inputNormalizer.js +0 -11
- package/dist/src/helpers/inputNormalizer.js.map +0 -1
- package/dist/src/helpers/normalizedRelativePath.js +0 -34
- package/dist/src/helpers/normalizedRelativePath.js.map +0 -1
- package/dist/src/helpers/tryManifest.js.map +0 -1
- package/dist/src/html/createPageLoader.js +0 -72
- package/dist/src/html/createPageLoader.js.map +0 -1
- package/dist/src/options.js +0 -307
- package/dist/src/options.js.map +0 -1
- package/dist/src/react-server/createHandler.js.map +0 -1
- package/dist/src/react-server/createRscStream.js.map +0 -1
- package/dist/src/resolvePage.js.map +0 -1
- package/dist/src/resolveProps.js.map +0 -1
- package/dist/src/worker/createHtmlStream.js +0 -62
- package/dist/src/worker/createHtmlStream.js.map +0 -1
- package/dist/src/worker/createWorker.js +0 -34
- package/dist/src/worker/createWorker.js.map +0 -1
- package/dist/src/worker/renderPages.js +0 -99
- package/dist/src/worker/renderPages.js.map +0 -1
- package/dist/transformer/index.d.ts.map +0 -1
- package/dist/transformer/preserveDirectives.d.ts +0 -4
- package/dist/transformer/preserveDirectives.d.ts.map +0 -1
- package/dist/transformer/preserver.d.ts +0 -2
- package/dist/transformer/preserver.d.ts.map +0 -1
- package/dist/transformer/transformer.d.ts.map +0 -1
- package/dist/transformer/types.d.ts.map +0 -1
- package/dist/worker/createHtmlStream.d.ts +0 -7
- package/dist/worker/createHtmlStream.d.ts.map +0 -1
- package/dist/worker/createWorker.d.ts +0 -10
- package/dist/worker/createWorker.d.ts.map +0 -1
- package/dist/worker/loader.d.ts.map +0 -1
- package/dist/worker/loader.js +0 -7
- package/dist/worker/loader.js.map +0 -1
- package/dist/worker/renderPages.d.ts +0 -18
- package/dist/worker/renderPages.d.ts.map +0 -1
- package/dist/worker/types.d.ts +0 -31
- package/dist/worker/types.d.ts.map +0 -1
- package/dist/worker/worker.d.ts +0 -7
- package/dist/worker/worker.d.ts.map +0 -1
- package/dist/worker/worker.js +0 -112
- package/dist/worker/worker.js.map +0 -1
- package/src/build/createBuildConfig.ts +0 -57
- package/src/build/mergeInputs.ts +0 -42
- package/src/checkFilesExist.ts +0 -67
- package/src/helpers/inputNormalizer.ts +0 -22
- package/src/index.ts +0 -4
- package/src/options.ts +0 -423
- package/src/plugin.ts +0 -5
- package/src/react-client/plugin.ts +0 -34
- package/src/react-server/plugin.ts +0 -409
- package/src/transformer/index.ts +0 -112
- package/src/transformer/preserveDirectives.ts +0 -100
- package/src/transformer/preserver.ts +0 -47
- package/src/worker/createHtmlStream.ts +0 -76
- package/src/worker/createWorker.ts +0 -44
- package/src/worker/renderPages.ts +0 -144
- package/src/worker/types.ts +0 -38
- package/src/worker/worker.tsx +0 -136
- /package/dist/{assertServerCondition.d.ts → plugin/assertServerCondition.d.ts} +0 -0
- /package/dist/{components.d.ts → plugin/components.d.ts} +0 -0
- /package/dist/{copy-dir.d.ts → plugin/copy-dir.d.ts} +0 -0
- /package/dist/{getEnv.d.ts → plugin/getEnv.d.ts} +0 -0
- /package/dist/{helpers → plugin/helpers}/normalizedRelativePath.d.ts +0 -0
- /package/dist/{helpers → plugin/helpers}/tryManifest.d.ts +0 -0
- /package/dist/{manifest.d.ts → plugin/manifest.d.ts} +0 -0
- /package/dist/{module-graph.d.ts → plugin/module-graph.d.ts} +0 -0
- /package/dist/{react-server → plugin/react-server}/createDevMiddleware.d.ts +0 -0
- /package/dist/{react-server → plugin/react-server}/createDevServer.d.ts +0 -0
- /package/dist/{react-server → plugin/react-server}/createReactNodeStreamer.d.ts +0 -0
- /package/dist/{resolvePage.d.ts → plugin/resolvePage.d.ts} +0 -0
- /package/dist/{resolveProps.d.ts → plugin/resolveProps.d.ts} +0 -0
- /package/dist/{transformer → plugin/transformer}/types.d.ts +0 -0
- /package/dist/{worker → plugin/worker}/loader.d.ts +0 -0
- /package/{src → plugin}/assertServerCondition.ts +0 -0
- /package/{src → plugin}/components.tsx +0 -0
- /package/{src → plugin}/copy-dir.ts +0 -0
- /package/{src/server.tsx → plugin/getCondition.ts} +0 -0
- /package/{src → plugin}/helpers/normalizedRelativePath.ts +0 -0
- /package/{src → plugin}/helpers/tryManifest.ts +0 -0
- /package/{src → plugin}/manifest.ts +0 -0
- /package/{src → plugin}/module-graph.ts +0 -0
- /package/{src → plugin}/transformer/README.md +0 -0
- /package/{src → plugin}/transformer/types.ts +0 -0
- /package/{src → plugin}/worker/loader.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magic-string.es.js","sources":["../../../../node_modules/magic-string/dist/magic-string.es.mjs"],"sourcesContent":["import { encode } from '@jridgewell/sourcemap-codec';\n\nclass BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n\nclass Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t{\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nclass SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n\nfunction guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n\nfunction getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n\nconst toString = Object.prototype.toString;\n\nfunction isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n\nfunction getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n\nconst wordRegex = /\\w/;\n\nclass Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nclass MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tif (previous !== replacement) this.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nclass Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n\nexport { Bundle, SourceMap, MagicString as default };\n//# sourceMappingURL=magic-string.es.mjs.map\n"],"names":[],"mappings":";;;;;;;AAEA,MAAM,MAAM,CAAC;AACb,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;AAC3D;;AAEA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AACpC;;AAEA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAChD;AACA;;AAEA,MAAM,KAAK,CAAC;AACZ,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK;AACpB,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG;AAChB,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO;;AAEzB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE;AACjB,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE;;AAEjB,EAAE,IAAI,CAAC,OAAO,GAAG,OAAO;AACxB,EAAE,IAAI,CAAC,SAAS,GAAG,KAAK;AACxB,EAAE,IAAI,CAAC,MAAM,GAAG,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
|
+
"description": "Vite plugin for React Server Components (RSC)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/plugin/index.js",
|
|
7
|
+
"module": "./dist/plugin/index.js",
|
|
8
|
+
"types": "./dist/plugin/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"plugin",
|
|
12
|
+
"bin",
|
|
13
|
+
"scripts",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"tsconfig.json"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./dist/plugin/index.js",
|
|
20
|
+
"./client": "./dist/client.js",
|
|
21
|
+
"./server": "./dist/server.js",
|
|
22
|
+
"./html-worker": "./dist/plugin/worker/html-worker.js",
|
|
23
|
+
"./rsc-worker": "./dist/plugin/worker/rsc-worker.js",
|
|
24
|
+
"./loader": "./dist/plugin/worker/loader.js",
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
"./patch": "./scripts/patch.mjs",
|
|
27
|
+
"./check-react-version": "./scripts/check-react-version.mjs"
|
|
28
|
+
},
|
|
29
|
+
"typesVersions": {
|
|
30
|
+
"*": {
|
|
31
|
+
".": [
|
|
32
|
+
"./dist/plugin/index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"client": [
|
|
35
|
+
"./dist/plugin/react-client/plugin.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"server": [
|
|
38
|
+
"./dist/plugin/react-server/plugin.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"worker": [
|
|
41
|
+
"./dist/plugin/worker/worker.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"loader": [
|
|
44
|
+
"./dist/plugin/worker/loader.d.ts"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"scripts": {
|
|
50
|
+
"version:major": "node scripts/bump-version.mjs major",
|
|
51
|
+
"version:minor": "node scripts/bump-version.mjs minor",
|
|
52
|
+
"version:patch": "node scripts/bump-version.mjs patch",
|
|
53
|
+
"build": "npm run clean && npm run build:types && npm run build:vite",
|
|
54
|
+
"build:types": "tsc --build --force",
|
|
55
|
+
"build:vite": "vite build && chmod +x bin/patch.mjs",
|
|
56
|
+
"clean": "rm -rf dist",
|
|
57
|
+
"prepublishOnly": "npm run build",
|
|
58
|
+
"lint": "eslint ./src --fix",
|
|
59
|
+
"test:server": "NODE_OPTIONS='--conditions react-server' vitest run",
|
|
60
|
+
"test:client": "vitest run",
|
|
61
|
+
"test": "npm run build && npm run test:client && NODE_ENV=development npm run test:server",
|
|
62
|
+
"test:coverage": "vitest run --coverage",
|
|
63
|
+
"test:ui": "vitest --ui",
|
|
64
|
+
"experimental:copy": "cp -r ./oss-experimental/* ./node_modules/",
|
|
65
|
+
"experimental:patch": "npx patch-package react-server-dom-esm --exclude 'nothing' && npx patch-package react react-dom",
|
|
66
|
+
"experimental:move-patches": "mv patches/* ./scripts/",
|
|
67
|
+
"experimental:setup": "rm -rf patches/* && npm install react-server-dom-esm react@canary react-dom@canary && npm run experimental:copy && npm run experimental:patch && npm run experimental:move-patches && node scripts/check-react-version.mjs",
|
|
68
|
+
"experimental:check": "node scripts/check-react-version.mjs",
|
|
69
|
+
"postinstall": "npm install react-server-dom-esm && node scripts/check-react-version.mjs && patch-package",
|
|
70
|
+
"start": "cd template; NODE_OPTIONS='--conditions react-server' npx vite",
|
|
71
|
+
"template:build": "cd template && NODE_OPTIONS='--conditions react-server' npx vite build"
|
|
72
|
+
},
|
|
73
|
+
"keywords": [
|
|
74
|
+
"vite",
|
|
75
|
+
"vite-plugin",
|
|
76
|
+
"react",
|
|
77
|
+
"rsc",
|
|
78
|
+
"server-components"
|
|
79
|
+
],
|
|
80
|
+
"author": "Nico Brinkkemper",
|
|
81
|
+
"license": "MIT",
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": "^23.6.0"
|
|
84
|
+
},
|
|
85
|
+
"repository": {
|
|
86
|
+
"type": "git",
|
|
87
|
+
"url": "git+https://github.com/nicobrinkkemper/vite-plugin-react-server.git"
|
|
88
|
+
},
|
|
89
|
+
"bugs": {
|
|
90
|
+
"url": "https://github.com/nicobrinkkemper/vite-plugin-react-server/issues"
|
|
91
|
+
},
|
|
92
|
+
"homepage": "https://github.com/nicobrinkkemper/vite-plugin-react-server#readme",
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"react": "*",
|
|
95
|
+
"react-dom": "*",
|
|
96
|
+
"vite": "*"
|
|
97
|
+
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"react": {
|
|
100
|
+
"optional": false
|
|
101
|
+
},
|
|
102
|
+
"react-dom": {
|
|
103
|
+
"optional": false
|
|
104
|
+
},
|
|
105
|
+
"vite": {
|
|
106
|
+
"optional": false
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"@types/node": "^20.17.16",
|
|
111
|
+
"@types/react": "^19.0.8",
|
|
112
|
+
"@types/react-dom": "^19.0.3",
|
|
113
|
+
"acorn-loose": "^8.3.0",
|
|
114
|
+
"patch-package": "^8.0.0",
|
|
115
|
+
"react": "^19.1.0-canary-8759c5c8-20250207",
|
|
116
|
+
"react-dom": "^19.1.0-canary-8759c5c8-20250207",
|
|
117
|
+
"react-server-dom-esm": "^0.0.1",
|
|
118
|
+
"rollup": "^4.34.0",
|
|
119
|
+
"source-map": "^0.7.4",
|
|
120
|
+
"ts-node": "^10.9.2",
|
|
121
|
+
"tslib": "^2.8.1",
|
|
122
|
+
"typescript": "^5.7.3",
|
|
123
|
+
"vite": "^6.0.11",
|
|
124
|
+
"vitest": "^3.0.4",
|
|
125
|
+
"webpack-sources": "^3.2.0"
|
|
126
|
+
},
|
|
127
|
+
"bin": {
|
|
128
|
+
"vite-plugin-react-server-patch": "./dist/scripts/check-react-version.mjs"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertServerCondition.d.ts","sourceRoot":"","sources":["../../plugin/assertServerCondition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function assertServerCondition(p) {
|
|
2
|
+
const nodeOptions = p.env['NODE_OPTIONS'];
|
|
3
|
+
if (!nodeOptions?.match(/--conditions[= ]react-server/)) {
|
|
4
|
+
if (!nodeOptions?.match(/--conditions/)) {
|
|
5
|
+
console.warn(`process.env['NODE_OPTIONS'] is missing \`--conditions\` flag, it should be like \`--conditions=react-server\` or \`--conditions react-server\`, but was ${JSON.stringify(process.env['NODE_OPTIONS'])}`);
|
|
6
|
+
}
|
|
7
|
+
if (!nodeOptions?.match(/react-server/)) {
|
|
8
|
+
throw new Error(`process.env['NODE_OPTIONS'] is missing \`react-server\` flag, it should be like \`--conditions=react-server\` or \`--conditions react-server\`, but was ${JSON.stringify(process.env['NODE_OPTIONS'])}`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
;
|
|
14
|
+
assertServerCondition(process);
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createClientBuildConfig.d.ts","sourceRoot":"","sources":["../../../plugin/build/createClientBuildConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,CAAC,cAAc,CAgBvE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mergeInputsAsync } from "./mergeInputs.js";
|
|
2
|
+
export const createClientBuildConfig = async ({ userConfig, inputNormalizer }) => {
|
|
3
|
+
const { input: inputConfig, ...restRollupOptions } = userConfig.build.rollupOptions ?? {};
|
|
4
|
+
return {
|
|
5
|
+
...userConfig,
|
|
6
|
+
build: {
|
|
7
|
+
...userConfig.build,
|
|
8
|
+
rollupOptions: {
|
|
9
|
+
...restRollupOptions,
|
|
10
|
+
input: await mergeInputsAsync({}, inputConfig, inputNormalizer),
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ResolvedUserConfig, ResolvedUserOptions } from "../types.js";
|
|
2
|
+
import type { UserConfig } from "vite";
|
|
3
|
+
interface CreateServerBuildConfigProps {
|
|
4
|
+
condition: string;
|
|
5
|
+
userConfig: ResolvedUserConfig;
|
|
6
|
+
userOptions: ResolvedUserOptions;
|
|
7
|
+
mode: string;
|
|
8
|
+
inputNormalizer: any;
|
|
9
|
+
}
|
|
10
|
+
export declare function createServerBuildConfig({ userConfig, userOptions, mode, }: CreateServerBuildConfigProps): Promise<UserConfig>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=createServerBuildConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createServerBuildConfig.d.ts","sourceRoot":"","sources":["../../../plugin/build/createServerBuildConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,UAAU,4BAA4B;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,WAAW,EAAE,mBAAmB,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,GAAG,CAAC;CACtB;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,UAAU,EACV,WAAW,EACX,IAAI,GACL,EAAE,4BAA4B,GAAG,OAAO,CAAC,UAAU,CAAC,CAiDpD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
export async function createServerBuildConfig({ userConfig, userOptions, mode, }) {
|
|
3
|
+
const { build, appType, mode: configMode, ...restUserConfig } = userConfig;
|
|
4
|
+
const { outDir, ssr, target, assetsDir, manifest, ssrManifest, ssrEmitAssets, rollupOptions, ...restBuildOptions } = build ?? {};
|
|
5
|
+
const { input, output, ...restRollupOptions } = rollupOptions ?? {};
|
|
6
|
+
const { format, preserveModules, hoistTransitiveImports, esModule, entryFileNames, chunkFileNames, assetFileNames, ...restOutputOptions } = output && !Array.isArray(output) ? output : {};
|
|
7
|
+
const resolvedBuildConfig = {
|
|
8
|
+
build: {
|
|
9
|
+
ssr: ssr ?? true,
|
|
10
|
+
target: target ?? 'es2020',
|
|
11
|
+
outDir: outDir ?? userOptions.build.server,
|
|
12
|
+
assetsDir: assetsDir ?? '',
|
|
13
|
+
manifest: manifest ?? true,
|
|
14
|
+
ssrManifest: ssrManifest ?? true,
|
|
15
|
+
ssrEmitAssets: ssrEmitAssets ?? true,
|
|
16
|
+
rollupOptions: {
|
|
17
|
+
input: {
|
|
18
|
+
'client': join(userOptions.projectRoot, userOptions.clientEntry)
|
|
19
|
+
},
|
|
20
|
+
output: {
|
|
21
|
+
format: format ?? 'esm',
|
|
22
|
+
preserveModules: preserveModules ?? true,
|
|
23
|
+
hoistTransitiveImports: hoistTransitiveImports ?? false,
|
|
24
|
+
esModule: esModule ?? true,
|
|
25
|
+
entryFileNames: entryFileNames ?? '[name].js',
|
|
26
|
+
chunkFileNames: chunkFileNames ?? '[name].js',
|
|
27
|
+
assetFileNames: assetFileNames ?? '[name][extname]',
|
|
28
|
+
...restOutputOptions
|
|
29
|
+
},
|
|
30
|
+
...restRollupOptions
|
|
31
|
+
},
|
|
32
|
+
...restBuildOptions
|
|
33
|
+
},
|
|
34
|
+
appType: appType ?? 'mpa',
|
|
35
|
+
mode: mode ?? 'production',
|
|
36
|
+
...restUserConfig
|
|
37
|
+
};
|
|
38
|
+
console.log('resolvedBuildConfig', resolvedBuildConfig);
|
|
39
|
+
return resolvedBuildConfig;
|
|
40
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InputOption } from "rollup";
|
|
2
|
+
import type { UserConfig } from "vite";
|
|
3
|
+
export declare function validateModuleBase(input: InputOption, moduleBase: string, moduleBaseExceptions: string[]): void;
|
|
4
|
+
export declare function createSharedBuildConfig(config: UserConfig, rollupOptions: any): UserConfig;
|
|
5
|
+
//# sourceMappingURL=createSharedBuildConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSharedBuildConfig.d.ts","sourceRoot":"","sources":["../../../plugin/build/createSharedBuildConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,MAAM,EAAE,QAe/B;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,GAAG,UAAU,CAW1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function validateModuleBase(input, moduleBase, moduleBaseExceptions) {
|
|
2
|
+
for (const [key, value] of Object.entries(input)) {
|
|
3
|
+
const isException = moduleBaseExceptions.includes(key) || ["/index", "index"].includes(key);
|
|
4
|
+
if (!key.includes("/"))
|
|
5
|
+
return;
|
|
6
|
+
if (value.startsWith("//")) {
|
|
7
|
+
throw new Error(`Path shouldn't start with //`);
|
|
8
|
+
}
|
|
9
|
+
if (!key.startsWith(moduleBase) && !isException) {
|
|
10
|
+
throw new Error(`Invalid input: ${key} does not start with ${moduleBase}`);
|
|
11
|
+
}
|
|
12
|
+
if (!value.startsWith("/" + moduleBase) && !isException) {
|
|
13
|
+
throw new Error(`Invalid value: ${value} does not start with ${moduleBase}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function createSharedBuildConfig(config, rollupOptions) {
|
|
18
|
+
return {
|
|
19
|
+
...config,
|
|
20
|
+
build: {
|
|
21
|
+
...config.build,
|
|
22
|
+
rollupOptions: {
|
|
23
|
+
...config.build?.rollupOptions,
|
|
24
|
+
...rollupOptions
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputOption } from "rollup";
|
|
2
|
+
import type { InputNormalizer, InputNormalizerWorker } from "../types.js";
|
|
3
|
+
export declare const mergeInputsAsync: (input: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}, input2: InputOption | undefined, inputNormalizer: InputNormalizerWorker) => Promise<Record<string, string>>;
|
|
6
|
+
export declare const mergeInputs: (input: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
}, input2: InputOption | undefined, inputNormalizer: InputNormalizer) => Record<string, string>;
|
|
9
|
+
//# sourceMappingURL=mergeInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeInputs.d.ts","sourceRoot":"","sources":["../../../plugin/build/mergeInputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE1E,eAAO,MAAM,gBAAgB,UACpB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,UACxB,WAAW,GAAG,SAAS,mBACd,qBAAqB,KACrC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBhC,CAAA;AAED,eAAO,MAAM,WAAW,UACf;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,UACxB,WAAW,GAAG,SAAS,mBACd,eAAe,KAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBvB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const mergeInputsAsync = async (input, input2, inputNormalizer) => {
|
|
2
|
+
if (typeof input === "undefined") {
|
|
3
|
+
throw new Error("The first input can not be undefined");
|
|
4
|
+
}
|
|
5
|
+
else if (typeof input2 === "undefined") {
|
|
6
|
+
return input;
|
|
7
|
+
}
|
|
8
|
+
else if (Array.isArray(input2)) {
|
|
9
|
+
const inputsFromArray = Object.fromEntries(await Promise.all(input2.map(async (input) => inputNormalizer(input))));
|
|
10
|
+
return {
|
|
11
|
+
...input,
|
|
12
|
+
...inputsFromArray,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
else if (typeof input2 === "object" && input2 != null) {
|
|
16
|
+
return { ...input, ...input2 };
|
|
17
|
+
}
|
|
18
|
+
else if (typeof input2 === "string") {
|
|
19
|
+
const [key, value] = await inputNormalizer(input2);
|
|
20
|
+
return {
|
|
21
|
+
...input,
|
|
22
|
+
[key]: value,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error(`Invalid input: ${input2}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const mergeInputs = (input, input2, inputNormalizer) => {
|
|
30
|
+
if (typeof input === "undefined") {
|
|
31
|
+
throw new Error("The first input can not be undefined");
|
|
32
|
+
}
|
|
33
|
+
else if (typeof input2 === "undefined") {
|
|
34
|
+
return input;
|
|
35
|
+
}
|
|
36
|
+
else if (Array.isArray(input2)) {
|
|
37
|
+
const inputsFromArray = Object.fromEntries(input2.map(inputNormalizer));
|
|
38
|
+
return {
|
|
39
|
+
...input,
|
|
40
|
+
...inputsFromArray,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
else if (typeof input2 === "object" && input2 != null) {
|
|
44
|
+
return { ...input, ...input2 };
|
|
45
|
+
}
|
|
46
|
+
else if (typeof input2 === "string") {
|
|
47
|
+
const [key, value] = inputNormalizer(input2);
|
|
48
|
+
return {
|
|
49
|
+
...input,
|
|
50
|
+
[key]: value,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
throw new Error(`Invalid input: ${input2}`);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CheckFilesExistReturn, StreamPluginOptions } from "./types.js";
|
|
2
|
+
export declare function checkFilesExist(pages: string[], options: Pick<StreamPluginOptions, "Page" | "props">, root: string): Promise<CheckFilesExistReturn>;
|
|
3
|
+
//# sourceMappingURL=checkFilesExist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkFilesExist.d.ts","sourceRoot":"","sources":["../../plugin/checkFilesExist.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG7E,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,EACpD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,qBAAqB,CAAC,CAwEhC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { resolve, relative } from 'node:path';
|
|
8
|
+
import { DEFAULT_CONFIG } from './config/defaults.js';
|
|
9
|
+
|
|
10
|
+
async function checkFilesExist(pages, options, root) {
|
|
11
|
+
const errors = [];
|
|
12
|
+
const pageSet = /* @__PURE__ */ new Set();
|
|
13
|
+
const pageMap = /* @__PURE__ */ new Map();
|
|
14
|
+
const toKey = (path) => {
|
|
15
|
+
return relative(root, resolve(root, path)).replace(/\\/g, "/").replace(DEFAULT_CONFIG.FILE_REGEX, "").replace(/^\.\//, "");
|
|
16
|
+
};
|
|
17
|
+
if (typeof options.Page === "string") {
|
|
18
|
+
const pagePath = options.Page;
|
|
19
|
+
const fullPagePath = resolve(root, pagePath);
|
|
20
|
+
const key = toKey(pagePath);
|
|
21
|
+
pageMap.set(key, pagePath);
|
|
22
|
+
if (!pageSet.has(key)) {
|
|
23
|
+
if (!existsSync(fullPagePath)) {
|
|
24
|
+
errors.push(`Page file not found: ${pagePath}, ${fullPagePath}`);
|
|
25
|
+
}
|
|
26
|
+
pageSet.add(pagePath.replace(/^\//, ""));
|
|
27
|
+
}
|
|
28
|
+
} else if (typeof options.Page === "function" && pages) {
|
|
29
|
+
for (const page of pages) {
|
|
30
|
+
const pagePath = options.Page(page);
|
|
31
|
+
const fullPagePath = resolve(root, pagePath);
|
|
32
|
+
const key = toKey(pagePath);
|
|
33
|
+
pageMap.set(key, pagePath);
|
|
34
|
+
if (pageSet.has(key)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (!existsSync(fullPagePath)) {
|
|
38
|
+
errors.push(`Page file not found: ${pagePath}, ${fullPagePath}`);
|
|
39
|
+
}
|
|
40
|
+
pageSet.add(pagePath);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const propsSet = /* @__PURE__ */ new Set();
|
|
44
|
+
const propsMap = /* @__PURE__ */ new Map();
|
|
45
|
+
if (typeof options.props === "string") {
|
|
46
|
+
const propsPath = options.props;
|
|
47
|
+
const fullPropsPath = resolve(root, propsPath);
|
|
48
|
+
const key = toKey(propsPath);
|
|
49
|
+
propsMap.set(key, propsPath);
|
|
50
|
+
if (!propsSet.has(key)) {
|
|
51
|
+
if (!existsSync(fullPropsPath)) {
|
|
52
|
+
errors.push(`Props file not found: ${propsPath}, ${fullPropsPath}`);
|
|
53
|
+
}
|
|
54
|
+
propsSet.add(propsPath);
|
|
55
|
+
}
|
|
56
|
+
} else if (typeof options.props === "function" && pages) {
|
|
57
|
+
for (const page of pages) {
|
|
58
|
+
const propsPath = options.props(page);
|
|
59
|
+
const fullPropsPath = resolve(root, propsPath);
|
|
60
|
+
const key = toKey(propsPath);
|
|
61
|
+
propsMap.set(key, propsPath);
|
|
62
|
+
if (propsSet.has(key)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (!existsSync(fullPropsPath)) {
|
|
66
|
+
errors.push(`Props file not found: ${propsPath}, ${fullPropsPath}`);
|
|
67
|
+
}
|
|
68
|
+
propsSet.add(propsPath);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (errors.length) {
|
|
72
|
+
console.warn("React Stream Plugin Validation:\n" + errors.join("\n"));
|
|
73
|
+
}
|
|
74
|
+
return { pageMap, pageSet, propsMap, propsSet };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { checkFilesExist };
|
|
78
|
+
//# sourceMappingURL=checkFilesExist.js.map
|