@ripple-ts/vite-plugin 0.2.212 → 0.2.214

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,19 @@
1
1
  # @ripple-ts/vite-plugin
2
2
 
3
+ ## 0.2.214
4
+
5
+ ### Patch Changes
6
+
7
+ - [#730](https://github.com/Ripple-TS/ripple/pull/730)
8
+ [`6efde20`](https://github.com/Ripple-TS/ripple/commit/6efde20a7fe1e29b27ac98823362cba2001340fa)
9
+ Thanks [@leonidaz](https://github.com/leonidaz)! - Force patch version bump for
10
+ vite-plugin package.
11
+
12
+ - Updated dependencies []:
13
+ - @ripple-ts/adapter@0.2.214
14
+
15
+ ## 0.2.213
16
+
3
17
  ## 0.2.212
4
18
 
5
19
  ## 0.2.211
package/package.json CHANGED
@@ -3,18 +3,26 @@
3
3
  "description": "Vite plugin for Ripple",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.212",
6
+ "version": "0.2.214",
7
7
  "type": "module",
8
8
  "module": "src/index.js",
9
9
  "main": "src/index.js",
10
+ "bin": {
11
+ "ripple-preview": "src/bin/preview.js"
12
+ },
10
13
  "exports": {
11
14
  ".": {
12
15
  "types": "./types/index.d.ts",
13
16
  "import": "./src/index.js",
14
17
  "default": "./src/index.js"
18
+ },
19
+ "./production": {
20
+ "import": "./src/server/production.js",
21
+ "default": "./src/server/production.js",
22
+ "types": "./types/index.d.ts"
15
23
  }
16
24
  },
17
- "homepage": "https://ripplejs.com",
25
+ "homepage": "https://ripple-ts.com",
18
26
  "repository": {
19
27
  "type": "git",
20
28
  "url": "git+https://github.com/Ripple-TS/ripple.git",
@@ -23,10 +31,13 @@
23
31
  "bugs": {
24
32
  "url": "https://github.com/Ripple-TS/ripple/issues"
25
33
  },
34
+ "dependencies": {
35
+ "@ripple-ts/adapter": "0.2.214"
36
+ },
26
37
  "devDependencies": {
27
38
  "type-fest": "^5.1.0",
28
39
  "vite": "^7.1.9",
29
- "ripple": "0.2.212"
40
+ "ripple": "0.2.214"
30
41
  },
31
42
  "publishConfig": {
32
43
  "access": "public"
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * ripple-preview — Start the production SSR server.
5
+ *
6
+ * Loads ripple.config.ts reads `build.outDir`,
7
+ * and spawns `node {outDir}/server/entry.js`.
8
+ */
9
+
10
+ import { spawn } from 'node:child_process';
11
+ import path from 'node:path';
12
+ import fs from 'node:fs';
13
+ import { loadRippleConfig } from '../load-config.js';
14
+ import { ENTRY_FILENAME } from '../constants.js';
15
+
16
+ const projectRoot = process.cwd();
17
+
18
+ try {
19
+ const config = await loadRippleConfig(projectRoot);
20
+ const outDir = config.build.outDir;
21
+ const entryPath = path.join(projectRoot, outDir, 'server', ENTRY_FILENAME);
22
+
23
+ if (!fs.existsSync(entryPath)) {
24
+ console.error(`[ripple-preview] Server entry not found: ${entryPath}`);
25
+ console.error('[ripple-preview] Did you run `pnpm build` first?');
26
+ process.exit(1);
27
+ }
28
+
29
+ console.log(`[ripple-preview] Starting server from ${outDir}/server/${ENTRY_FILENAME}`);
30
+
31
+ const child = spawn(process.execPath, [entryPath], {
32
+ stdio: 'inherit',
33
+ cwd: projectRoot,
34
+ });
35
+
36
+ child.on('close', (code) => {
37
+ process.exit(code ?? 0);
38
+ });
39
+ } catch (e) {
40
+ const error = /** @type {Error} */ (e);
41
+ console.error('[ripple-preview] Failed to load config:', error.message);
42
+ process.exit(1);
43
+ }
@@ -0,0 +1,2 @@
1
+ export const DEFAULT_OUTDIR = 'dist';
2
+ export const ENTRY_FILENAME = 'entry.js';