@ripple-ts/vite-plugin 0.3.19 → 0.3.21
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/CHANGELOG.md +14 -0
- package/package.json +3 -3
- package/src/index.js +6 -8
- package/src/server/render-route.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ripple-ts/vite-plugin
|
|
2
2
|
|
|
3
|
+
## 0.3.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @ripple-ts/adapter@0.3.21
|
|
9
|
+
|
|
10
|
+
## 0.3.20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies []:
|
|
15
|
+
- @ripple-ts/adapter@0.3.20
|
|
16
|
+
|
|
3
17
|
## 0.3.19
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Vite plugin for Ripple",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.21",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "src/index.js",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"url": "https://github.com/Ripple-TS/ripple/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ripple-ts/adapter": "0.3.
|
|
35
|
+
"@ripple-ts/adapter": "0.3.21",
|
|
36
36
|
"@tsrx/ripple": "0.0.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^24.3.0",
|
|
40
40
|
"type-fest": "^5.6.0",
|
|
41
41
|
"vite": "^8.0.0",
|
|
42
|
-
"ripple": "0.3.
|
|
42
|
+
"ripple": "0.3.21"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
package/src/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @import {Plugin, ResolvedConfig, ViteDevServer} from 'vite' */
|
|
3
3
|
/** @import {RipplePluginOptions, RippleConfigOptions, ResolvedRippleConfig, Route, RenderRoute} from '@ripple-ts/vite-plugin' */
|
|
4
4
|
|
|
5
|
-
/// <reference types="ripple/
|
|
5
|
+
/// <reference types="@tsrx/ripple/types/rpc" />
|
|
6
6
|
|
|
7
7
|
import { compile } from '@tsrx/ripple';
|
|
8
8
|
import fs from 'node:fs';
|
|
@@ -685,9 +685,9 @@ export function ripple(inlineOptions = {}) {
|
|
|
685
685
|
|
|
686
686
|
// Send response
|
|
687
687
|
await sendWebResponse(res, response);
|
|
688
|
-
} catch (
|
|
688
|
+
} catch (error) {
|
|
689
689
|
console.error('[@ripple-ts/vite-plugin] Request error:', error);
|
|
690
|
-
vite.ssrFixStacktrace(error);
|
|
690
|
+
vite.ssrFixStacktrace(/** @type {Error} */ (error));
|
|
691
691
|
|
|
692
692
|
res.statusCode = 500;
|
|
693
693
|
res.setHeader('Content-Type', 'text/html');
|
|
@@ -990,7 +990,7 @@ export function ripple(inlineOptions = {}) {
|
|
|
990
990
|
console.log(
|
|
991
991
|
`[@ripple-ts/vite-plugin] Start with: node ${outDir}/server/${ENTRY_FILENAME}`,
|
|
992
992
|
);
|
|
993
|
-
} catch (
|
|
993
|
+
} catch (error) {
|
|
994
994
|
console.error('[@ripple-ts/vite-plugin] Server build failed:', error);
|
|
995
995
|
throw new Error(
|
|
996
996
|
`Server build failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -1233,7 +1233,7 @@ function nodeRequestToWebRequest(nodeRequest) {
|
|
|
1233
1233
|
|
|
1234
1234
|
// Add body for non-GET/HEAD requests
|
|
1235
1235
|
if (method !== 'GET' && method !== 'HEAD') {
|
|
1236
|
-
init.body =
|
|
1236
|
+
init.body = Readable.toWeb(nodeRequest);
|
|
1237
1237
|
init.duplex = 'half';
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
@@ -1294,9 +1294,7 @@ async function handleRpcRequest(req, res, vite, trustProxy, config) {
|
|
|
1294
1294
|
|
|
1295
1295
|
const response = await handle_rpc_request(webRequest, {
|
|
1296
1296
|
async resolveFunction(hash) {
|
|
1297
|
-
const rpcModules =
|
|
1298
|
-
/** @type {any} */ (globalThis).rpc_modules
|
|
1299
|
-
);
|
|
1297
|
+
const rpcModules = globalThis.rpc_modules;
|
|
1300
1298
|
if (!rpcModules) return null;
|
|
1301
1299
|
|
|
1302
1300
|
const moduleInfo = rpcModules.get(hash);
|