@vistagenic/vista 0.2.0 → 0.2.1

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.
@@ -152,6 +152,15 @@ function setupTypeScriptRuntime(cwd) {
152
152
  esModuleInterop: true,
153
153
  },
154
154
  });
155
+ return;
156
+ }
157
+ catch {
158
+ // fallback
159
+ }
160
+ try {
161
+ require.resolve('tsx', { paths: [cwd] });
162
+ require('tsx/cjs');
163
+ return;
155
164
  }
156
165
  catch (e) {
157
166
  console.log('Failed to setup TypeScript runtime:', e);
@@ -97,9 +97,19 @@ function setupTypeScriptRuntime(cwd) {
97
97
  esModuleInterop: true,
98
98
  },
99
99
  });
100
+ return;
101
+ }
102
+ catch {
103
+ // fallback
104
+ }
105
+ try {
106
+ require.resolve('tsx', { paths: [cwd] });
107
+ // tsx/cjs registers the TypeScript loader for require()
108
+ require('tsx/cjs');
109
+ return;
100
110
  }
101
111
  catch {
102
- throw new Error('No TypeScript compiler available for RSC upstream runtime.');
112
+ throw new Error('No TypeScript compiler available for RSC upstream runtime. Install one of: @swc-node/register, ts-node, or tsx');
103
113
  }
104
114
  }
105
115
  function hasClientBoundaryDirective(source) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vistagenic/vista",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The React Framework for Visionaries - Rust-powered SSR with Server Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",