fleetbo-cockpit-cli 1.0.168 → 1.0.170
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/cli.js +12 -14
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -626,6 +626,10 @@ if (command === 'alex') {
|
|
|
626
626
|
console.log('\x1b[33m›\x1b[0m \x1b[90m"\x1b[33mforge\x1b[90m a camera module to scan receipts for my expense tracker"\x1b[0m');
|
|
627
627
|
console.log('\x1b[33m›\x1b[0m \x1b[90m"\x1b[33mcreate\x1b[90m a form module to add products with photos to my catalog"\x1b[0m');
|
|
628
628
|
console.log('\x1b[33m›\x1b[0m \x1b[90m"\x1b[33mupdate\x1b[90m the CloudCamera module to save in the collection orders"\x1b[0m');
|
|
629
|
+
console.log('\x1b[33m›\x1b[0m \x1b[90m"\x1b[33mupdate\x1b[90m the CloudCamera module to save in the collection orders"\x1b[0m');
|
|
630
|
+
|
|
631
|
+
console.log('\x1b[90mTo completely eradicate a module:\x1b[0m');
|
|
632
|
+
console.log('\x1b[33m›\x1b[0m \x1b[31mnpm run fleetbo rm\x1b[0m \x1b[36m<ModuleName>\x1b[0m');
|
|
629
633
|
|
|
630
634
|
// READY
|
|
631
635
|
console.log('');
|
|
@@ -996,11 +1000,9 @@ else {
|
|
|
996
1000
|
if (uplinkProcess) {
|
|
997
1001
|
try {
|
|
998
1002
|
if (process.platform === 'win32') {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
execSync(`taskkill /pid ${uplinkProcess.pid} /T /F`, { stdio: 'ignore' });
|
|
1003
|
-
} catch (e) {}
|
|
1003
|
+
spawn('taskkill', ['/pid', String(uplinkProcess.pid), '/T', '/F'], {
|
|
1004
|
+
stdio: 'ignore', detached: true, shell: false
|
|
1005
|
+
}).unref();
|
|
1004
1006
|
} else {
|
|
1005
1007
|
uplinkProcess.kill('SIGINT');
|
|
1006
1008
|
}
|
|
@@ -1012,7 +1014,7 @@ else {
|
|
|
1012
1014
|
};
|
|
1013
1015
|
|
|
1014
1016
|
let isExiting = false;
|
|
1015
|
-
|
|
1017
|
+
|
|
1016
1018
|
async function cleanupAndExit(code = 0) {
|
|
1017
1019
|
if (isExiting) return;
|
|
1018
1020
|
isExiting = true;
|
|
@@ -1028,15 +1030,11 @@ else {
|
|
|
1028
1030
|
console.log('[Fleetbo] Bye.');
|
|
1029
1031
|
process.exit(code);
|
|
1030
1032
|
}
|
|
1031
|
-
|
|
1032
|
-
// 🪟 WINDOWS FIX : Ctrl+C
|
|
1033
|
-
// On capture le signal au niveau stdin pour éviter l'invite "O/N"
|
|
1033
|
+
|
|
1034
|
+
// 🪟 WINDOWS FIX : capture Ctrl+C via readline pour éviter l'invite "O/N"
|
|
1034
1035
|
if (process.platform === 'win32') {
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1037
|
-
output: process.stdout
|
|
1038
|
-
});
|
|
1039
|
-
rl.on('SIGINT', () => cleanupAndExit(0));
|
|
1036
|
+
const rlWin = require('readline').createInterface({ input: process.stdin, output: process.stdout });
|
|
1037
|
+
rlWin.on('SIGINT', () => cleanupAndExit(0));
|
|
1040
1038
|
}
|
|
1041
1039
|
|
|
1042
1040
|
process.on('SIGINT', () => cleanupAndExit(0));
|