projax 1.3.4 → 1.3.5
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/index.js +0 -55
- package/package.json +2 -4
package/dist/index.js
CHANGED
|
@@ -876,61 +876,6 @@ program
|
|
|
876
876
|
// Ensure NODE_ENV is not set to development when using bundled files
|
|
877
877
|
process.env.NODE_ENV = 'production';
|
|
878
878
|
}
|
|
879
|
-
// Automatically rebuild better-sqlite3 for Desktop/Electron if needed
|
|
880
|
-
// This ensures it's compiled for Electron's Node.js version
|
|
881
|
-
if (hasBundledDesktop) {
|
|
882
|
-
try {
|
|
883
|
-
const electronPkg = require('electron/package.json');
|
|
884
|
-
let rebuild;
|
|
885
|
-
try {
|
|
886
|
-
rebuild = require('@electron/rebuild').rebuild;
|
|
887
|
-
}
|
|
888
|
-
catch {
|
|
889
|
-
// @electron/rebuild not available, skip auto-rebuild
|
|
890
|
-
}
|
|
891
|
-
if (rebuild) {
|
|
892
|
-
const sqlitePath = require.resolve('better-sqlite3');
|
|
893
|
-
// Find the package root - better-sqlite3 is in projax/node_modules/better-sqlite3
|
|
894
|
-
// Path structure: projax/node_modules/better-sqlite3/lib/index.js
|
|
895
|
-
// So we need to go: sqlitePath -> lib -> better-sqlite3 -> node_modules -> projax (package root)
|
|
896
|
-
const sqliteDir = path.dirname(sqlitePath); // .../better-sqlite3/lib
|
|
897
|
-
const betterSqlite3Dir = path.dirname(sqliteDir); // .../better-sqlite3
|
|
898
|
-
const nodeModulesDir = path.dirname(betterSqlite3Dir); // .../node_modules
|
|
899
|
-
// The package root is the directory containing node_modules (i.e., projax package root)
|
|
900
|
-
const packageRoot = path.dirname(nodeModulesDir); // .../projax
|
|
901
|
-
console.log('Ensuring better-sqlite3 is built for Desktop/Electron...');
|
|
902
|
-
try {
|
|
903
|
-
await new Promise((resolve, reject) => {
|
|
904
|
-
rebuild({
|
|
905
|
-
buildPath: packageRoot,
|
|
906
|
-
electronVersion: electronPkg.version,
|
|
907
|
-
onlyModules: ['better-sqlite3'],
|
|
908
|
-
force: true,
|
|
909
|
-
})
|
|
910
|
-
.then(() => {
|
|
911
|
-
console.log('✓ better-sqlite3 ready for Desktop/Electron');
|
|
912
|
-
resolve();
|
|
913
|
-
})
|
|
914
|
-
.catch((err) => {
|
|
915
|
-
// Don't fail if rebuild has issues, just warn
|
|
916
|
-
console.warn('⚠️ Could not rebuild better-sqlite3 automatically:', err.message);
|
|
917
|
-
console.warn(' The app may still work, but if you see errors, run:');
|
|
918
|
-
console.warn(` cd ${packageRoot}`);
|
|
919
|
-
console.warn(' npm rebuild better-sqlite3 --build-from-source');
|
|
920
|
-
resolve(); // Continue anyway
|
|
921
|
-
});
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
catch (rebuildError) {
|
|
925
|
-
// Continue even if rebuild fails
|
|
926
|
-
console.warn('⚠️ Rebuild check failed, continuing anyway...');
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
catch (checkError) {
|
|
931
|
-
// If we can't check, just continue - the error will show when Desktop app tries to use it
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
879
|
console.log('Starting Desktop app...');
|
|
935
880
|
const { spawn } = require('child_process');
|
|
936
881
|
const electron = require('electron');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projax",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "CLI tool for managing local development projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"electron": "^28.0.0",
|
|
22
22
|
"inquirer": "^9.2.12",
|
|
23
23
|
"express": "^4.18.2",
|
|
24
|
-
"cors": "^2.8.5"
|
|
25
|
-
"better-sqlite3": "^11.10.0",
|
|
26
|
-
"@electron/rebuild": "^3.6.0"
|
|
24
|
+
"cors": "^2.8.5"
|
|
27
25
|
},
|
|
28
26
|
"devDependencies": {
|
|
29
27
|
"@types/inquirer": "^9.0.7",
|