Skip to content

Commit 6d87825

Browse files
committed
fix pm2 app hiding
1 parent c6bf7c9 commit 6d87825

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/late-zoos-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bluecadet/launchpad-monitor": patch
3+
---
4+
5+
Fix PM2 app hiding

packages/monitor/src/core/app-manager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export class AppManager {
1919
startApp(appName: string): ResultAsync<pm2.ProcessDescription, Error> {
2020
this.#logger.info(`Starting app '${appName}'...`);
2121
return this.getAppOptions(appName)
22-
.asyncAndThen((opts) => this.#processManager.startProcess(opts.pm2))
22+
.asyncAndThen((opts) => {
23+
// @ts-expect-error - Undocumented PM2 field that can prevent your apps from actually showing on launch. Set this to false to prevent that default behavior.
24+
opts.pm2.windowsHide = opts.windows.hide;
25+
return this.#processManager.startProcess(opts.pm2)
26+
})
2327
.andThen(() => this.#processManager.getProcess(appName))
2428
.map((process) => {
2529
this.#logger.info(`...app '${appName}' was started.`);

0 commit comments

Comments
 (0)