projax 1.3.22 → 2.0.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projax-api",
3
- "version": "1.3.22",
3
+ "version": "1.3.23",
4
4
  "description": "REST API server for projax project dashboard (internal use)",
5
5
  "private": true,
6
6
  "main": "dist/index.js",
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 - check multiple locations
214
+ // Find the prxi source file - use CLI's embedded prxi.tsx
215
215
  const prxiPaths = [
216
- path.join(__dirname, 'prxi', 'src', 'index.tsx'), // When running from built/published CLI
217
- path.join(__dirname, '..', '..', 'prxi', 'src', 'index.tsx'), // When running from workspace
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,26 +233,36 @@ program
234
233
  console.error('Error: tsx not found. Please install dependencies: npm install');
235
234
  process.exit(1);
236
235
  }
237
- // Run prxi using npm run dev
236
+ // Run prxi using node with tsx/esm loader for proper ESM support
238
237
  const { spawn } = require('child_process');
239
238
  // Get the prxi package directory (prxi/src/index.tsx -> prxi)
240
239
  const prxiPackageDir = path.dirname(path.dirname(prxiPath));
241
- const prxiPackageJson = path.join(prxiPackageDir, 'package.json');
242
- // If in workspace (package.json exists), use npm run dev for proper module resolution
243
- if (fs.existsSync(prxiPackageJson)) {
244
- const child = spawn('npm', ['run', 'dev'], {
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], {
245
250
  stdio: 'inherit',
246
251
  cwd: prxiPackageDir,
252
+ env: {
253
+ ...process.env,
254
+ NODE_NO_WARNINGS: '1', // Suppress experimental loader warning
255
+ },
247
256
  });
248
257
  child.on('exit', (code) => {
249
258
  process.exit(code || 0);
250
259
  });
251
260
  }
252
261
  else {
253
- // Fallback to tsx for bundled/published version
262
+ // Fallback to tsx binary
254
263
  const child = spawn(tsxBin, [prxiPath], {
255
264
  stdio: 'inherit',
256
- cwd: path.dirname(prxiPath),
265
+ cwd: prxiPackageDir,
257
266
  });
258
267
  child.on('exit', (code) => {
259
268
  process.exit(code || 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projax",
3
- "version": "1.3.22",
3
+ "version": "2.0.0",
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": "mkdir -p dist/prxi && cp -r ../prxi/src dist/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": "^4.4.1",
25
+ "ink": "^3.2.0",
26
26
  "inquirer": "^9.2.12",
27
- "react": "^18.2.0",
28
- "react-devtools-core": "^4.28.0",
27
+ "react": "^17.0.2",
29
28
  "tsx": "^4.20.6"
30
29
  },
31
30
  "devDependencies": {