@ripple-ts/vite-plugin 0.3.42 → 0.3.44

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @ripple-ts/vite-plugin
2
2
 
3
+ ## 0.3.44
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ [[`f5a3c1b`](https://github.com/Ripple-TS/ripple/commit/f5a3c1b9e915c250c8cd1a7dcf4e80c44abe720f)]:
9
+ - @tsrx/ripple@0.0.26
10
+ - @ripple-ts/adapter@0.3.44
11
+
12
+ ## 0.3.43
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+ [[`5c6ee71`](https://github.com/Ripple-TS/ripple/commit/5c6ee71bfd4f5dc443c43eb34e631bb032606faf),
18
+ [`83b19fd`](https://github.com/Ripple-TS/ripple/commit/83b19fd67aa27eb10e93205dd88c61b13ffbc523)]:
19
+ - @tsrx/ripple@0.0.25
20
+ - @ripple-ts/adapter@0.3.43
21
+
3
22
  ## 0.3.42
4
23
 
5
24
  ### 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.42",
6
+ "version": "0.3.44",
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.42",
36
- "@tsrx/ripple": "0.0.24"
35
+ "@ripple-ts/adapter": "0.3.44",
36
+ "@tsrx/ripple": "0.0.26"
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"
42
+ "ripple": "0.3.44"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
package/src/index.js CHANGED
@@ -398,8 +398,8 @@ export function ripple(inlineOptions = {}) {
398
398
  let renderRouteEntries = [];
399
399
  /** @type {ResolvedRippleConfig | null} Cached config from buildStart (reused in closeBundle) */
400
400
  let loadedRippleConfig = null;
401
- /** @type {Set<string>} File paths (relative to root) of .tsrx modules with #server blocks */
402
- const serverBlockModules = new Set();
401
+ /** @type {Set<string>} File paths (relative to root) of .tsrx modules with `module server` declarations */
402
+ const serverModuleModules = new Set();
403
403
 
404
404
  /**
405
405
  * @returns {Promise<ResolvedRippleConfig | null>}
@@ -708,7 +708,7 @@ export function ripple(inlineOptions = {}) {
708
708
  const url = new URL(req.url || '/', `http://${req.headers.host || 'localhost'}`);
709
709
  const method = req.method || 'GET';
710
710
 
711
- // Handle RPC requests for #server blocks
711
+ // Handle RPC requests for `module server` declarations
712
712
  if (is_rpc_request(url.pathname)) {
713
713
  await handleRpcRequest(req, res, vite, rippleConfig.server.trustProxy, rippleConfig);
714
714
  return;
@@ -1006,7 +1006,7 @@ export function ripple(inlineOptions = {}) {
1006
1006
  routes: loadedRippleConfig.router.routes,
1007
1007
  rippleConfigPath: getRippleConfigPath(root),
1008
1008
  htmlTemplatePath: './index.html',
1009
- rpcModulePaths: [...serverBlockModules],
1009
+ rpcModulePaths: [...serverModuleModules],
1010
1010
  clientAssetMap,
1011
1011
  });
1012
1012
 
@@ -1265,9 +1265,9 @@ import { hydrate, mount } from 'ripple';
1265
1265
  : Object.keys(current_ripple_config.compat),
1266
1266
  });
1267
1267
 
1268
- // Track modules with #server blocks for RPC (client build only)
1268
+ // Track modules with `module server` declarations for RPC (client build only)
1269
1269
  if (isBuild && !ssr && js.code.includes('_$_.rpc(')) {
1270
- serverBlockModules.add(filename);
1270
+ serverModuleModules.add(filename);
1271
1271
  }
1272
1272
 
1273
1273
  if (css !== '') {
@@ -1361,7 +1361,7 @@ async function sendWebResponse(nodeResponse, webResponse) {
1361
1361
  }
1362
1362
 
1363
1363
  /**
1364
- * Handle RPC requests for #server blocks in dev mode.
1364
+ * Handle RPC requests for `module server` declarations in dev mode.
1365
1365
  *
1366
1366
  * Delegates to the shared `handle_rpc_request` from `@ripple-ts/adapter/rpc`,
1367
1367
  * providing a dev-specific `resolveFunction` that uses Vite's `ssrLoadModule`
@@ -62,7 +62,7 @@ export function createHandler(manifest, options) {
62
62
  ? build_rpc_lookup(manifest.rpcModules, runtime.hash)
63
63
  : new Map();
64
64
 
65
- // Create async context and patch fetch for relative URL resolution in #server blocks
65
+ // Create async context and patch fetch for relative URL resolution in `module server` declarations
66
66
  const asyncContext = runtime.createAsyncContext();
67
67
  const fetchHandle = patch_global_fetch(asyncContext);
68
68
 
@@ -70,7 +70,7 @@ export function createHandler(manifest, options) {
70
70
  const url = new URL(request.url);
71
71
  const method = request.method;
72
72
 
73
- // Handle RPC requests for #server blocks
73
+ // Handle RPC requests for `module server` declarations
74
74
  if (is_rpc_request(url.pathname)) {
75
75
  return handle_rpc_request(request, {
76
76
  resolveFunction(hash) {
@@ -27,7 +27,7 @@ import { createLayoutWrapper, createPropsWrapper } from './component-wrappers.js
27
27
  export async function handleRenderRoute(route, context, vite) {
28
28
  try {
29
29
  // Initialize so the server can register
30
- // RPC functions from #server blocks during SSR module loading
30
+ // RPC functions from `module server` declarations during SSR module loading
31
31
  if (!globalThis.rpc_modules) {
32
32
  globalThis.rpc_modules = new Map();
33
33
  }
@@ -21,7 +21,7 @@
21
21
  * @property {Route[]} routes - Route definitions from ripple.config.ts
22
22
  * @property {string} rippleConfigPath - Absolute path to ripple.config.ts (for importing middlewares/adapter)
23
23
  * @property {string} htmlTemplatePath - Path to the processed index.html template
24
- * @property {string[]} [rpcModulePaths] - Paths (relative to root) of .tsrx modules with #server blocks
24
+ * @property {string[]} [rpcModulePaths] - Paths (relative to root) of .tsrx modules with `module server` declarations
25
25
  * @property {Record<string, ClientAssetEntry>} [clientAssetMap] - Map of route entry paths to built JS/CSS asset paths
26
26
  */
27
27
 
@@ -72,7 +72,7 @@ export function generateServerEntry(options) {
72
72
  }
73
73
  }
74
74
 
75
- // Collect RPC modules (sub-components with #server blocks, not already in page entries)
75
+ // Collect RPC modules (sub-components with `module server` declarations, not already in page entries)
76
76
  for (const rpcPath of rpcModulePaths) {
77
77
  if (!component_imports.has(rpcPath) && !rpc_imports.has(rpcPath)) {
78
78
  rpc_imports.set(rpcPath, `_rpc_${rpc_index++}`);
@@ -103,8 +103,8 @@ export function generateServerEntry(options) {
103
103
  .map(([layout, varName]) => ` ${JSON.stringify(layout)}: getDefaultExport(${varName}),`)
104
104
  .join('\n');
105
105
 
106
- // Only check _$_server_$_ on modules known to have #server blocks.
107
- // Checking modules without #server blocks causes rollup warnings since
106
+ // Only check _$_server_$_ on modules known to have `module server` declarations.
107
+ // Checking modules without `module server` declarations causes rollup warnings since
108
108
  // they don't export _$_server_$_.
109
109
  const rpcPathSet = new Set(rpcModulePaths);
110
110
  const rpc_entries = [];