projax 3.3.22 → 3.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.
Files changed (2) hide show
  1. package/package.json +1 -2
  2. package/rebuild-sqlite.js +0 -82
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projax",
3
- "version": "3.3.22",
3
+ "version": "3.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": {
@@ -21,7 +21,6 @@
21
21
  "prepublishOnly": "npm run build:all"
22
22
  },
23
23
  "dependencies": {
24
- "better-sqlite3": "^9.2.2",
25
24
  "chokidar": "^3.6.0",
26
25
  "commander": "^11.1.0",
27
26
  "cors": "^2.8.5",
package/rebuild-sqlite.js DELETED
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const path = require('path');
4
- const fs = require('fs');
5
-
6
- // Check if @electron/rebuild is available
7
- let rebuild;
8
- try {
9
- // Try to require @electron/rebuild - it should be in node_modules
10
- const rebuildModule = require.resolve('@electron/rebuild');
11
- rebuild = require(rebuildModule).rebuild;
12
- } catch (error) {
13
- // If not found, try to find it in parent node_modules (workspace scenario)
14
- try {
15
- const parentRebuild = require.resolve('@electron/rebuild', { paths: [path.join(__dirname, '..', '..', 'node_modules')] });
16
- rebuild = require(parentRebuild).rebuild;
17
- } catch (err) {
18
- console.log('⚠️ @electron/rebuild not found, skipping better-sqlite3 rebuild for Electron');
19
- console.log(' To rebuild manually, run: npm rebuild better-sqlite3');
20
- console.log(' Or install @electron/rebuild: npm install -g @electron/rebuild');
21
- process.exit(0);
22
- }
23
- }
24
-
25
- // Check if electron is installed (it should be as a dependency)
26
- let electronPkg;
27
- try {
28
- electronPkg = require('electron/package.json');
29
- } catch (error) {
30
- console.log('Electron not found, skipping better-sqlite3 rebuild for Electron');
31
- process.exit(0);
32
- }
33
-
34
- console.log('Rebuilding better-sqlite3 for Electron', electronPkg.version);
35
-
36
- // Find better-sqlite3 - could be in this package's node_modules or hoisted to parent
37
- let sqlitePath = null;
38
- const possiblePaths = [
39
- path.join(__dirname, 'node_modules', 'better-sqlite3'),
40
- path.join(__dirname, '..', '..', 'node_modules', 'better-sqlite3'),
41
- ];
42
-
43
- for (const possiblePath of possiblePaths) {
44
- if (fs.existsSync(possiblePath)) {
45
- sqlitePath = possiblePath;
46
- console.log('Found better-sqlite3 at:', sqlitePath);
47
- break;
48
- }
49
- }
50
-
51
- if (!sqlitePath) {
52
- console.log('⚠️ Could not find better-sqlite3 module, skipping rebuild');
53
- console.log(' This is normal if better-sqlite3 is not installed yet.');
54
- process.exit(0);
55
- }
56
-
57
- // Rebuild for Electron - find the package root (where package.json exists)
58
- // Path structure: projax/node_modules/better-sqlite3/lib/index.js
59
- // So we need to go: sqlitePath -> lib -> better-sqlite3 -> node_modules -> projax (package root)
60
- const sqliteDir = require('path').dirname(sqlitePath); // .../better-sqlite3/lib
61
- const betterSqlite3Dir = require('path').dirname(sqliteDir); // .../better-sqlite3
62
- const nodeModulesDir = require('path').dirname(betterSqlite3Dir); // .../node_modules
63
- const packageRoot = require('path').dirname(nodeModulesDir); // .../projax
64
-
65
- console.log('Package root:', packageRoot);
66
- console.log('Rebuilding from:', packageRoot);
67
-
68
- rebuild({
69
- buildPath: packageRoot,
70
- electronVersion: electronPkg.version,
71
- onlyModules: ['better-sqlite3'],
72
- force: true,
73
- })
74
- .then(() => {
75
- console.log('✓ Rebuild complete');
76
- process.exit(0);
77
- })
78
- .catch((err) => {
79
- console.error('✗ Rebuild failed:', err);
80
- process.exit(1);
81
- });
82
-