projax 1.3.21 → 1.3.23
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/dist/api/package.json +1 -1
- package/dist/index.js +37 -12
- package/package.json +4 -5
package/dist/api/package.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -211,11 +211,10 @@ program
|
|
|
211
211
|
.action(async () => {
|
|
212
212
|
try {
|
|
213
213
|
await ensureAPIServerRunning(true);
|
|
214
|
-
// Find the prxi source file -
|
|
214
|
+
// Find the prxi source file - use CLI's embedded prxi.tsx
|
|
215
215
|
const prxiPaths = [
|
|
216
|
-
path.join(__dirname, '
|
|
217
|
-
path.join(__dirname, '
|
|
218
|
-
path.join(__dirname, '..', 'src', 'prxi.tsx'), // Legacy location
|
|
216
|
+
path.join(__dirname, '..', 'src', 'prxi.tsx'), // Development (packages/cli/src/prxi.tsx)
|
|
217
|
+
path.join(__dirname, 'prxi.tsx'), // When running from dist
|
|
219
218
|
];
|
|
220
219
|
const prxiPath = prxiPaths.find(p => fs.existsSync(p));
|
|
221
220
|
if (!prxiPath) {
|
|
@@ -234,15 +233,41 @@ program
|
|
|
234
233
|
console.error('Error: tsx not found. Please install dependencies: npm install');
|
|
235
234
|
process.exit(1);
|
|
236
235
|
}
|
|
237
|
-
// Run prxi
|
|
236
|
+
// Run prxi using node with tsx/esm loader for proper ESM support
|
|
238
237
|
const { spawn } = require('child_process');
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
// Get the prxi package directory (prxi/src/index.tsx -> prxi)
|
|
239
|
+
const prxiPackageDir = path.dirname(path.dirname(prxiPath));
|
|
240
|
+
// Try to find tsx loader module paths
|
|
241
|
+
const tsxLoaderPaths = [
|
|
242
|
+
path.join(__dirname, '..', 'node_modules', 'tsx', 'dist', 'loader.mjs'),
|
|
243
|
+
path.join(prxiPackageDir, 'node_modules', 'tsx', 'dist', 'loader.mjs'),
|
|
244
|
+
path.join(__dirname, '..', '..', '..', 'node_modules', 'tsx', 'dist', 'loader.mjs'),
|
|
245
|
+
];
|
|
246
|
+
const tsxLoader = tsxLoaderPaths.find(p => fs.existsSync(p));
|
|
247
|
+
if (tsxLoader) {
|
|
248
|
+
// Use node --import for proper ESM support with TypeScript (Node 18.19+)
|
|
249
|
+
const child = spawn(process.execPath, ['--import', tsxLoader, prxiPath], {
|
|
250
|
+
stdio: 'inherit',
|
|
251
|
+
cwd: prxiPackageDir,
|
|
252
|
+
env: {
|
|
253
|
+
...process.env,
|
|
254
|
+
NODE_NO_WARNINGS: '1', // Suppress experimental loader warning
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
child.on('exit', (code) => {
|
|
258
|
+
process.exit(code || 0);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
// Fallback to tsx binary
|
|
263
|
+
const child = spawn(tsxBin, [prxiPath], {
|
|
264
|
+
stdio: 'inherit',
|
|
265
|
+
cwd: prxiPackageDir,
|
|
266
|
+
});
|
|
267
|
+
child.on('exit', (code) => {
|
|
268
|
+
process.exit(code || 0);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
246
271
|
}
|
|
247
272
|
catch (error) {
|
|
248
273
|
console.error('Error launching prxi:', error instanceof Error ? error.message : error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projax",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.23",
|
|
4
4
|
"description": "Cross-platform project management dashboard for tracking local development projects. Features CLI, Terminal UI, Desktop app, REST API, and built-in tools for test detection, port management, and script execution.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"copy:electron": "mkdir -p dist/electron && cp -r ../desktop/dist/* dist/electron/ && cp dist/script-runner.* dist/electron/ && cp dist/port-*.* dist/electron/ && cp -R dist/core dist/electron/",
|
|
13
13
|
"copy:api": "mkdir -p dist/api && cp -r ../api/dist/* dist/api/ && cp ../api/package.json dist/api/",
|
|
14
14
|
"copy:core": "mkdir -p dist/core && cp -r ../core/dist/* dist/core/",
|
|
15
|
-
"copy:prxi": "
|
|
15
|
+
"copy:prxi": "echo 'Prxi is embedded in CLI source - no separate copy needed'",
|
|
16
16
|
"build:all": "npm run build && npm run copy:core && npm run build:electron && npm run copy:electron && npm run copy:api && npm run copy:prxi",
|
|
17
17
|
"clean": "rm -rf dist",
|
|
18
18
|
"prepublishOnly": "npm run build:all"
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
"cors": "^2.8.5",
|
|
23
23
|
"electron": "^28.0.0",
|
|
24
24
|
"express": "^4.18.2",
|
|
25
|
-
"ink": "^
|
|
25
|
+
"ink": "^3.2.0",
|
|
26
26
|
"inquirer": "^9.2.12",
|
|
27
|
-
"react": "^
|
|
28
|
-
"react-devtools-core": "^4.28.0",
|
|
27
|
+
"react": "^17.0.2",
|
|
29
28
|
"tsx": "^4.20.6"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|