@ripple-ts/vite-plugin 0.3.3 → 0.3.4

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,21 @@
1
1
  # @ripple-ts/vite-plugin
2
2
 
3
+ ## 0.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#807](https://github.com/Ripple-TS/ripple/pull/807)
8
+ [`56cdf54`](https://github.com/Ripple-TS/ripple/commit/56cdf54afb1b96e49faa273c18e0489ad70897b2)
9
+ Thanks [@leonidaz](https://github.com/leonidaz)! - Upgrade to Vite 8
10
+
11
+ - [`2956743`](https://github.com/Ripple-TS/ripple/commit/2956743ccbf8ebad6ae9fde27fb8809634fa3a91)
12
+ Thanks [@leonidaz](https://github.com/leonidaz)! - Split the production subpath
13
+ declarations into a dedicated type file so the exported types resolve cleanly
14
+ without self-import workarounds.
15
+
16
+ - Updated dependencies []:
17
+ - @ripple-ts/adapter@0.3.4
18
+
3
19
  ## 0.3.3
4
20
 
5
21
  ### 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.3",
6
+ "version": "0.3.4",
7
7
  "type": "module",
8
8
  "module": "src/index.js",
9
9
  "main": "src/index.js",
@@ -19,7 +19,7 @@
19
19
  "./production": {
20
20
  "import": "./src/server/production.js",
21
21
  "default": "./src/server/production.js",
22
- "types": "./types/index.d.ts"
22
+ "types": "./types/production.d.ts"
23
23
  }
24
24
  },
25
25
  "homepage": "https://ripple-ts.com",
@@ -32,12 +32,13 @@
32
32
  "url": "https://github.com/Ripple-TS/ripple/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@ripple-ts/adapter": "0.3.3"
35
+ "@ripple-ts/adapter": "0.3.4"
36
36
  },
37
37
  "devDependencies": {
38
+ "@types/node": "^24.3.0",
38
39
  "type-fest": "^5.4.4",
39
- "vite": "^7.3.1",
40
- "ripple": "0.3.3"
40
+ "vite": "^8.0.0",
41
+ "ripple": "0.3.4"
41
42
  },
42
43
  "publishConfig": {
43
44
  "access": "public"
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /** @import {PackageJson} from 'type-fest' */
2
2
  /** @import {Plugin, ResolvedConfig, ViteDevServer} from 'vite' */
3
- /** @import {RipplePluginOptions, RippleConfigOptions, ResolvedRippleConfig, Route, Middleware, RenderRoute} from '@ripple-ts/vite-plugin' */
3
+ /** @import {RipplePluginOptions, RippleConfigOptions, ResolvedRippleConfig, Route, RenderRoute} from '@ripple-ts/vite-plugin' */
4
4
 
5
5
  /// <reference types="ripple/compiler/internal/rpc" />
6
6
 
package/tsconfig.json CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "module": "esnext",
4
+ "moduleResolution": "bundler",
5
+ "target": "esnext",
6
+ "lib": ["esnext"],
3
7
  "allowJs": true,
4
- "noEmit": true
8
+ "checkJs": true,
9
+ "noEmit": true,
10
+ "strict": true,
11
+ "esModuleInterop": true,
12
+ "resolveJsonModule": true,
13
+ "types": ["node"]
5
14
  },
6
15
  "include": ["./src/**/*", "./tests/**/*"],
7
16
  "exclude": ["dist", "node_modules"]
package/types/index.d.ts CHANGED
@@ -178,64 +178,3 @@ declare module '@ripple-ts/vite-plugin' {
178
178
  options?: Record<string, unknown>,
179
179
  ) => { listen: (port?: number) => unknown; close: () => void };
180
180
  }
181
-
182
- declare module '@ripple-ts/vite-plugin/production' {
183
- import type {
184
- Route,
185
- Middleware,
186
- RuntimePrimitives,
187
- ResolvedRippleConfig,
188
- RippleConfigOptions,
189
- } from '@ripple-ts/vite-plugin';
190
-
191
- export function resolveRippleConfig(
192
- raw: RippleConfigOptions,
193
- options?: { requireAdapter?: boolean },
194
- ): ResolvedRippleConfig;
195
-
196
- export interface ClientAssetEntry {
197
- /** Path to the built JS file (relative to client output dir) */
198
- js: string;
199
- /** Paths to the built CSS files (relative to client output dir) */
200
- css: string[];
201
- }
202
-
203
- export interface ServerManifest {
204
- routes: Route[];
205
- components: Record<string, Function>;
206
- layouts: Record<string, Function>;
207
- middlewares: Middleware[];
208
- /** Map of entry path → _$_server_$_ object for RPC support */
209
- rpcModules?: Record<string, Record<string, Function>>;
210
- /** Trust X-Forwarded-* headers when deriving origin for RPC fetch */
211
- trustProxy?: boolean;
212
- /** Platform-specific runtime primitives from the adapter */
213
- runtime: RuntimePrimitives;
214
- /**
215
- * Map of route entry paths to their built client asset paths.
216
- * Used to emit `<link rel="stylesheet">` and `<link rel="modulepreload">`
217
- * tags in the production HTML. Populated from Vite's client manifest
218
- * during the build. The special key `__hydrate_js` holds the hydrate
219
- * runtime entry.
220
- */
221
- clientAssets?: Record<string, ClientAssetEntry>;
222
- }
223
-
224
- export interface RenderResult {
225
- head: string;
226
- body: string;
227
- css: Set<string>;
228
- }
229
-
230
- export interface HandlerOptions {
231
- render: (component: Function) => Promise<RenderResult>;
232
- getCss: (css: Set<string>) => string;
233
- htmlTemplate: string;
234
- executeServerFunction: (fn: Function, body: string) => Promise<string>;
235
- }
236
-
237
- export function createHandler(
238
- manifest: ServerManifest,
239
- options: HandlerOptions,
240
- ): (request: Request) => Promise<Response>;
241
- }
@@ -0,0 +1,58 @@
1
+ import type { RuntimePrimitives } from '@ripple-ts/adapter';
2
+ import type {
3
+ Route,
4
+ Middleware,
5
+ ResolvedRippleConfig,
6
+ RippleConfigOptions,
7
+ } from '@ripple-ts/vite-plugin';
8
+
9
+ export function resolveRippleConfig(
10
+ raw: RippleConfigOptions,
11
+ options?: { requireAdapter?: boolean },
12
+ ): ResolvedRippleConfig;
13
+
14
+ export interface ClientAssetEntry {
15
+ /** Path to the built JS file (relative to client output dir) */
16
+ js: string;
17
+ /** Paths to the built CSS files (relative to client output dir) */
18
+ css: string[];
19
+ }
20
+
21
+ export interface ServerManifest {
22
+ routes: Route[];
23
+ components: Record<string, Function>;
24
+ layouts: Record<string, Function>;
25
+ middlewares: Middleware[];
26
+ /** Map of entry path → _$_server_$_ object for RPC support */
27
+ rpcModules?: Record<string, Record<string, Function>>;
28
+ /** Trust X-Forwarded-* headers when deriving origin for RPC fetch */
29
+ trustProxy?: boolean;
30
+ /** Platform-specific runtime primitives from the adapter */
31
+ runtime: RuntimePrimitives;
32
+ /**
33
+ * Map of route entry paths to their built client asset paths.
34
+ * Used to emit `<link rel="stylesheet">` and `<link rel="modulepreload">`
35
+ * tags in the production HTML. Populated from Vite's client manifest
36
+ * during the build. The special key `__hydrate_js` holds the hydrate
37
+ * runtime entry.
38
+ */
39
+ clientAssets?: Record<string, ClientAssetEntry>;
40
+ }
41
+
42
+ export interface RenderResult {
43
+ head: string;
44
+ body: string;
45
+ css: Set<string>;
46
+ }
47
+
48
+ export interface HandlerOptions {
49
+ render: (component: Function) => Promise<RenderResult>;
50
+ getCss: (css: Set<string>) => string;
51
+ htmlTemplate: string;
52
+ executeServerFunction: (fn: Function, body: string) => Promise<string>;
53
+ }
54
+
55
+ export function createHandler(
56
+ manifest: ServerManifest,
57
+ options: HandlerOptions,
58
+ ): (request: Request) => Promise<Response>;