From f3887bcfe2b4f1837cf491f1ed7ed2b6c39ca438 Mon Sep 17 00:00:00 2001 From: Ryan Huang Date: Mon, 18 Nov 2024 18:05:44 -0500 Subject: [PATCH] Add lms dev notification --- src/subcommands/dev.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/subcommands/dev.ts b/src/subcommands/dev.ts index 79f9136..d867fa6 100644 --- a/src/subcommands/dev.ts +++ b/src/subcommands/dev.ts @@ -35,11 +35,21 @@ class PluginProcess { private currentProcess: ChildProcessWithoutNullStreams | null = null; private status: PluginProcessStatus = "stopped"; private unregister: (() => Promise) | null = null; + private firstTime = true; private async startProcess() { this.status = "starting"; const { unregister, clientIdentifier, clientPasskey } = await this.client.plugins.registerDevelopmentPlugin(this.registerDevelopmentPluginOpts); + if (this.firstTime) { + const manifest = this.registerDevelopmentPluginOpts.manifest; + const identifier = `${manifest.owner}/${manifest.name}`; + await this.client.system.notify({ + title: `Plugin "${identifier}" started`, + description: "This plugin is run by lms CLI development server.", + }); + this.firstTime = false; + } this.unregister = unregister; this.currentProcess = this.node.spawn(this.args, { env: {