plum-e2e 2.5.4 → 2.5.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/bin/plum.js +18 -4
- package/package.json +1 -1
package/bin/plum.js
CHANGED
|
@@ -479,14 +479,19 @@ async function serverUpdate() {
|
|
|
479
479
|
isAlive(registry[String(nodeCfg.id)].pid)
|
|
480
480
|
);
|
|
481
481
|
|
|
482
|
+
// Re-exec `plum` as a fresh process for the restart steps rather than
|
|
483
|
+
// calling serverRestart()/nodeRestart() directly — this same process
|
|
484
|
+
// already loaded the OLD code into memory before npm install ran above,
|
|
485
|
+
// so calling them in-process would rebuild using stale logic no matter
|
|
486
|
+
// how new the just-installed files on disk actually are.
|
|
482
487
|
if (hasServerCfg) {
|
|
483
|
-
clack.log.step('Rebuilding server with
|
|
484
|
-
|
|
488
|
+
clack.log.step('Rebuilding server with the newly installed version…');
|
|
489
|
+
execSync('plum server restart', { stdio: 'inherit' });
|
|
485
490
|
}
|
|
486
491
|
|
|
487
492
|
if (nodeRunning) {
|
|
488
|
-
clack.log.step('Restarting node runner with
|
|
489
|
-
|
|
493
|
+
clack.log.step('Restarting node runner with the newly installed version…');
|
|
494
|
+
execSync('plum node restart', { stdio: 'inherit' });
|
|
490
495
|
}
|
|
491
496
|
|
|
492
497
|
if (!hasServerCfg && !nodeRunning) {
|
|
@@ -726,6 +731,14 @@ async function openManageRunnersMenu(primaryUrl) {
|
|
|
726
731
|
* "plum <command>" to run the desired command.
|
|
727
732
|
* ------------------------------------------------------ */
|
|
728
733
|
switch (command) {
|
|
734
|
+
case '--version':
|
|
735
|
+
case '-v':
|
|
736
|
+
case 'version': {
|
|
737
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(plumRoot, 'package.json'), 'utf8'));
|
|
738
|
+
console.log(pkg.version);
|
|
739
|
+
break;
|
|
740
|
+
}
|
|
741
|
+
|
|
729
742
|
case 'init': {
|
|
730
743
|
clack.intro(pc.bgMagenta(pc.white(' 🟣 Plum — Init ')));
|
|
731
744
|
|
|
@@ -1185,6 +1198,7 @@ switch (command) {
|
|
|
1185
1198
|
default:
|
|
1186
1199
|
console.log('--------------------------------------\n');
|
|
1187
1200
|
console.log('Usage: plum <command>\n');
|
|
1201
|
+
console.log(' --version, -v Print the installed Plum version');
|
|
1188
1202
|
console.log(' init Set up a new Plum project');
|
|
1189
1203
|
console.log(' server start Start the full UI stack (interactive)');
|
|
1190
1204
|
console.log(' --headless <bool> Run browsers headless (true/false)');
|