From 3484545c314ba7fc510caa3bc9bd23ff9d76d995 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 9 Mar 2026 13:11:16 +0000 Subject: [PATCH] warn about missing in nuget config and make description optional (#8281) Co-authored-by: Claude Opus 4.6 --- backend/windmill-types/src/scripts.rs | 19 ++++++++++--------- .../lib/components/InstanceSettings.svelte | 6 +++++- .../src/lib/components/instanceSettings.ts | 3 ++- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/backend/windmill-types/src/scripts.rs b/backend/windmill-types/src/scripts.rs index bcbe0ede33..28d3a1e449 100644 --- a/backend/windmill-types/src/scripts.rs +++ b/backend/windmill-types/src/scripts.rs @@ -105,15 +105,15 @@ impl ScriptLang { pub fn is_native(&self) -> bool { matches!( self, - ScriptLang::Bunnative | - ScriptLang::Nativets | - ScriptLang::Postgresql | - ScriptLang::Mysql | - ScriptLang::Graphql | - ScriptLang::Snowflake | - ScriptLang::Mssql | - ScriptLang::Bigquery | - ScriptLang::OracleDB + ScriptLang::Bunnative + | ScriptLang::Nativets + | ScriptLang::Postgresql + | ScriptLang::Mysql + | ScriptLang::Graphql + | ScriptLang::Snowflake + | ScriptLang::Mssql + | ScriptLang::Bigquery + | ScriptLang::OracleDB ) } @@ -459,6 +459,7 @@ pub struct NewScript { pub path: String, pub parent_hash: Option, pub summary: String, + #[serde(default)] pub description: String, pub content: String, pub schema: Option, diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte index 152b58dc96..64fdfad16d 100644 --- a/frontend/src/lib/components/InstanceSettings.svelte +++ b/frontend/src/lib/components/InstanceSettings.svelte @@ -1038,7 +1038,11 @@ {oauths} warning={setting.key === 'base_url' && baseUrlIsFallback ? 'Auto-detected from browser — not yet saved' - : undefined} + : setting.key === 'nuget_config' && + $values['nuget_config'] && + !//.test($values['nuget_config']) + ? 'Missing in . Without it, default sources (like nuget.org) are merged with your custom sources, which is likely not what you want.' + : undefined} /> {/if} {#if quickSetup && category === 'Core' && setting.key === 'base_url'} diff --git a/frontend/src/lib/components/instanceSettings.ts b/frontend/src/lib/components/instanceSettings.ts index 80017582f5..29c730b736 100644 --- a/frontend/src/lib/components/instanceSettings.ts +++ b/frontend/src/lib/components/instanceSettings.ts @@ -464,7 +464,8 @@ export const settings: Record = { }, { label: 'Nuget Config', - description: 'Write a nuget.config file to set custom package sources and credentials', + description: + 'Write a nuget.config file to set custom package sources and credentials. Use inside to remove default sources and only use your custom ones', key: 'nuget_config', fieldType: 'codearea', codeAreaLang: 'xml',