diff --git a/.vscode/launch.json b/.vscode/launch.json index d1c20a2f56..55a228a5a5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -39,7 +39,8 @@ "skipFiles": ["/**"], "env": { "MAIN_ARGS": "--inspect=5858 --remote-debugging-port=9223", - "IN_VSCODE": "true" + "IN_VSCODE": "true", + "DEV_NOISY": "false" } }, { diff --git a/c-sharp/Program.cs b/c-sharp/Program.cs index 053a48f7a9..58ff779f4e 100644 --- a/c-sharp/Program.cs +++ b/c-sharp/Program.cs @@ -23,22 +23,27 @@ public static async Task Main() return; } - var tdp = new TimeDataProvider(papi); var sdp = new UsfmDataProvider(papi, "assets", "WEB"); var paratextProjects = new LocalParatextProjects(); var paratextFactory = new ParatextProjectDataProviderFactory(papi, paratextProjects); - - // Higher priority tasks await Task.WhenAll(sdp.RegisterDataProvider(), paratextFactory.Initialize()); - // Lower priority tasks - await Task.WhenAll( - tdp.RegisterDataProvider(), - //TODO: Delete this once we stop including test objects in the builds - papi.RegisterRequestHandler("command:test.addOne", RequestAddOne) - ); + // Things that only run in our "noisy dev mode" go here + var noisyDevModeEnvVar = Environment.GetEnvironmentVariable("DEV_NOISY"); + var isNoisyDevMode = noisyDevModeEnvVar != null && noisyDevModeEnvVar == "true"; + if (isNoisyDevMode) + { + var tdp = new TimeDataProvider(papi); + await Task.WhenAll( + tdp.RegisterDataProvider(), + //TODO: Delete this once we stop including test objects in the builds + papi.RegisterRequestHandler("command:test.addOne", RequestAddOne) + ); + } - Console.WriteLine("Paranext data provider ready!"); + Console.WriteLine( + $"Paranext data provider ready! {(isNoisyDevMode ? " (noisy dev mode)" : "")}" + ); await papi.MessageHandlingCompleteTask; Console.WriteLine("Paranext data provider message handling complete"); } diff --git a/extensions/src/hello-someone/manifest.json b/extensions/src/hello-someone/manifest.json index c2506b3ac2..27e1fb7198 100644 --- a/extensions/src/hello-someone/manifest.json +++ b/extensions/src/hello-someone/manifest.json @@ -1,5 +1,5 @@ { - "name": "hello-someone", + "name": "helloSomeone", "version": "0.0.1", "description": "Simple hello someone extension for Platform.Bible", "author": "Paranext", @@ -10,8 +10,5 @@ "settings": "contributions/settings.json", "projectSettings": "contributions/projectSettings.json", "localizedStrings": "contributions/localizedStrings.json", - "activationEvents": [ - "onCommand:helloSomeone.helloSomeone", - "onCommand:helloSomeone.echoSomeoneRenderer" - ] + "activationEvents": ["onCommand:helloSomeone.helloSomeone"] } diff --git a/extensions/src/hello-someone/src/main.ts b/extensions/src/hello-someone/src/main.ts index b22987dace..d8c3958662 100644 --- a/extensions/src/hello-someone/src/main.ts +++ b/extensions/src/hello-someone/src/main.ts @@ -303,18 +303,6 @@ export async function activate(context: ExecutionActivationContext): Promise { - return `echoSomeoneRenderer: ${await papi.commands.sendCommand( - 'test.addThree', - 2, - 4, - 6, - )}! ${message}`; - }, - ); - // Create a webview or get the existing webview if ours already exists // Note: here, we are storing a created webview's id when we create it, and using that id on // `existingId` to look specifically for the webview that we previously created if we have ever @@ -355,7 +343,6 @@ export async function activate(context: ExecutionActivationContext): Promise { if (addWebViewEvent.webView.webViewType === peopleWebViewType) logger.info( diff --git a/extensions/src/hello-someone/src/types/hello-someone.d.ts b/extensions/src/hello-someone/src/types/hello-someone.d.ts index 124b07e91e..e96fb9a93e 100644 --- a/extensions/src/hello-someone/src/types/hello-someone.d.ts +++ b/extensions/src/hello-someone/src/types/hello-someone.d.ts @@ -29,7 +29,6 @@ declare module 'papi-shared-types' { export interface CommandHandlers { 'helloSomeone.helloSomeone': (name: string) => string; - 'helloSomeone.echoSomeoneRenderer': (message: string) => Promise; } export interface DataProviders { diff --git a/extensions/src/hello-world/contributions/settings.json b/extensions/src/hello-world/contributions/settings.json index 6d1a95e888..650f08338f 100644 --- a/extensions/src/hello-world/contributions/settings.json +++ b/extensions/src/hello-world/contributions/settings.json @@ -2,7 +2,7 @@ { "label": "%settings_hello_world_group1_label%", "properties": { - "hello-world.personName": { + "helloWorld.personName": { "label": "%settings_hello_world_personName_label%", "default": "Bill" } diff --git a/extensions/src/hello-world/src/main.ts b/extensions/src/hello-world/src/main.ts index 9d79937dcb..47b8bd887e 100644 --- a/extensions/src/hello-world/src/main.ts +++ b/extensions/src/hello-world/src/main.ts @@ -52,7 +52,7 @@ const reactWebViewProvider: IWebViewProviderWithType = { `${this.webViewType} provider received request to provide a ${savedWebView.webViewType} web view`, ); return { - iconUrl: 'papi-extension://hello-world/assets/offline.svg', + iconUrl: 'papi-extension://helloWorld/assets/offline.svg', title: 'Hello World React', ...savedWebView, content: helloWorldReactWebView, @@ -191,7 +191,7 @@ export async function activate(context: ExecutionActivationContext): Promise typeof newValue === 'string', ); diff --git a/extensions/src/hello-world/src/types/hello-world.d.ts b/extensions/src/hello-world/src/types/hello-world.d.ts index d97d569eb0..b7d0cd5042 100644 --- a/extensions/src/hello-world/src/types/hello-world.d.ts +++ b/extensions/src/hello-world/src/types/hello-world.d.ts @@ -60,6 +60,6 @@ declare module 'papi-shared-types' { export interface SettingTypes { /** Selected Person's Name on Hello World Web View */ - 'hello-world.personName': string; + 'helloWorld.personName': string; } } diff --git a/extensions/src/hello-world/src/web-views/hello-world.web-view.html b/extensions/src/hello-world/src/web-views/hello-world.web-view.html index e2d1d8a3a4..4b475b06c6 100644 --- a/extensions/src/hello-world/src/web-views/hello-world.web-view.html +++ b/extensions/src/hello-world/src/web-views/hello-world.web-view.html @@ -1,4 +1,4 @@ - +