返回顶部
c

configure-telerik-nuget

Helps setup, configure and manage Telerik NuGet feeds in your repo's nuget.config file.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
75
下载量
0
收藏
概述
安装方式
版本历史

configure-telerik-nuget

Use these helper functions to manage Telerik NuGet source configuration. Get a new api key at https://www.telerik.com/account/downloads/api-keys ## Function: configure Sets a global user environment variable for the Telerik API key and updates/creates `nuget.config` so credentials use the environment variable instead of a hardcoded secret. ```powershell function Configure-TelerikNuGetSource { param( [Parameter(Mandatory = $true)] [string]$ApiKey, [string]$ApiKeyEnvVarName = "TELERIK_NUGET_API_KEY", [string]$SourceName = "Telerik_NuGet_Server", [string]$SourceUrl = "https://nuget.telerik.com/v3/index.json", [string]$NuGetConfigPath = "./nuget.config" ) # Store API key as a user-level environment variable so it is available globally [Environment]::SetEnvironmentVariable($ApiKeyEnvVarName, $ApiKey, "User") $env:$ApiKeyEnvVarName = $ApiKey if (-not (Test-Path $NuGetConfigPath)) { @" <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources /> <packageSourceCredentials /> </configuration> "@ | Set-Content -Path $NuGetConfigPath -Encoding UTF8 } [xml]$nugetConfig = Get-Content -Path $NuGetConfigPath if (-not $nugetConfig.configuration.packageSources) { $packageSourcesNode = $nugetConfig.CreateElement("packageSources") $nugetConfig.configuration.AppendChild($packageSourcesNode) | Out-Null } if (-not $nugetConfig.configuration.packageSourceCredentials) { $credentialsNode = $nugetConfig.CreateElement("packageSourceCredentials") $nugetConfig.configuration.AppendChild($credentialsNode) | Out-Null } $existingSource = $nugetConfig.configuration.packageSources.add | Where-Object { $_.key -eq $SourceName } if ($existingSource) { $existingSource.value = $SourceUrl } else { $sourceNode = $nugetConfig.CreateElement("add") $sourceNode.SetAttribute("key", $SourceName) $sourceNode.SetAttribute("value", $SourceUrl) $nugetConfig.configuration.packageSources.AppendChild($sourceNode) | Out-Null } $existingCredentialNode = $nugetConfig.configuration.packageSourceCredentials.$SourceName if (-not $existingCredentialNode) { $existingCredentialNode = $nugetConfig.CreateElement($SourceName) $nugetConfig.configuration.packageSourceCredentials.AppendChild($existingCredentialNode) | Out-Null } $existingCredentialNode.RemoveAll() $usernameNode = $nugetConfig.CreateElement("add") $usernameNode.SetAttribute("key", "Username") $usernameNode.SetAttribute("value", "api-key") $existingCredentialNode.AppendChild($usernameNode) | Out-Null $passwordNode = $nugetConfig.CreateElement("add") $passwordNode.SetAttribute("key", "ClearTextPassword") $passwordNode.SetAttribute("value", "%$ApiKeyEnvVarName%") $existingCredentialNode.AppendChild($passwordNode) | Out-Null $nugetConfig.Save((Resolve-Path $NuGetConfigPath)) Write-Host "Configured Telerik feed '$SourceName' in '$NuGetConfigPath'." Write-Host "Saved API key in user environment variable '$ApiKeyEnvVarName'." Write-Host "Restart your terminal/IDE so new processes can read the updated environment variable." } ``` Example usage: ```powershell Configure-TelerikNuGetSource -ApiKey "<telerik-api-key>" ``` ## Changelog ### 1.1.0 - 2026-03-20 - Added skill package metadata: `required_binaries`, `author`, `homepage`, and `source`. - Updated configure function to save API key as a user-level environment variable. - Updated `nuget.config` credential handling to use environment variable expansion instead of hardcoded API key values. - Added `version` field to frontmatter.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 configure-telerik-nuget-1776122178 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 configure-telerik-nuget-1776122178 技能

通过命令行安装

skillhub install configure-telerik-nuget-1776122178

下载 Zip 包

⬇ 下载 configure-telerik-nuget v1.1.0

文件大小: 2.03 KB | 发布时间: 2026-4-14 11:44

v1.1.0 最新 2026-4-14 11:44
**configure-telerik-nuget 1.1.0**

- Added skill metadata: required binaries, author, homepage, and source.
- Store Telerik API key as a user-level environment variable for improved security.
- Updated nuget.config credentials to reference the environment variable instead of a hardcoded key.
- Added version field to the skill metadata frontmatter.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部