fix author and authorUrl display

This commit is contained in:
Smartsheet-JB-Brown 2025-04-15 13:38:38 -07:00
parent f5b97baac4
commit b669edd82b
32 changed files with 96 additions and 6 deletions

View file

@ -2,4 +2,6 @@ name: "Data Processor"
description: "An MCP server for processing and transforming data files with support for various formats"
type: "mcp server"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["data-processing", "etl", "transformation", "data-engineering"]

View file

@ -1,4 +1,6 @@
name: "Data Engineering Tools"
description: "A collection of data engineering roles and tools"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["data-engineering", "data", "analytics"]

View file

@ -2,4 +2,6 @@ name: "Data Engineer"
description: "A mode focused on building and maintaining data pipelines, ETL processes, and data infrastructure"
type: "mode"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["data-engineering", "etl", "pipelines", "infrastructure"]

View file

@ -1,4 +1,6 @@
name: "Example MCP Server"
description: "An example MCP server for testing package manager functionality"
type: "mcp server"
version: "1.0.0"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"

View file

@ -2,5 +2,7 @@ name: "File Analyzer MCP Server"
description: "An MCP server that analyzes files for code quality, security issues, and performance optimizations"
type: "mcp server"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["file-analyzer", "code-quality", "security", "performance"]
sourceUrl: "https://github.com/roo-team/file-analyzer-server"

View file

@ -1,3 +1,5 @@
name: "Package Manager Template"
description: "A template repository for creating package manager sources"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"

View file

@ -2,5 +2,7 @@ name: "Full-Stack Developer Mode"
description: "A mode for a full-stack developer with expertise in web development, databases, and APIs"
type: "mode"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["developer", "full-stack", "web", "database", "api"]
sourceUrl: "https://github.com/roo-team/developer-resources"

View file

@ -2,5 +2,7 @@ name: "Data Validator"
description: "An MCP server for validating data quality, schema compliance, and business rules"
type: "mcp server"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["validation", "data-quality", "schema", "rules-engine", "data-platform"]
sourceUrl: "https://github.com/example/data-platform/mcp servers/data-validator"

View file

@ -2,4 +2,6 @@ name: "Data Platform Package"
description: "A complete data platform solution including roles, servers, and storage systems"
type: "package"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["data-platform", "enterprise", "data-engineering", "complete-solution"]

View file

@ -2,5 +2,7 @@ name: "Data Platform Administrator"
description: "Administrative mode responsible for managing and maintaining the data platform infrastructure"
type: "mode"
version: "1.0.0"
author: "JB Brown"
authorUrl: "https://www.linkedin.com/in/jbbrown1/"
tags: ["admin", "platform", "infrastructure", "data-platform"]
sourceUrl: "https://github.com/example/data-platform/modes/platform-admin"

View file

@ -14,6 +14,7 @@
"type_package": "Paquet",
"type_other": "Altres",
"by_author": "per {{author}}",
"authors_profile": "Perfil de l'autor",
"remove_tag_filter": "Eliminar filtre d'etiqueta: {{tag}}",
"filter_by_tag": "Filtrar per etiqueta: {{tag}}",
"component_details": "Detalls del component",

View file

@ -14,6 +14,7 @@
"type_package": "Paket",
"type_other": "Sonstiges",
"by_author": "von {{author}}",
"authors_profile": "Autorenprofil",
"remove_tag_filter": "Tag-Filter entfernen: {{tag}}",
"filter_by_tag": "Nach Tag filtern: {{tag}}",
"component_details": "Komponentendetails",

View file

@ -14,6 +14,7 @@
"type_package": "Package",
"type_other": "Other",
"by_author": "by {{author}}",
"authors_profile": "Author's Profile",
"remove_tag_filter": "Remove tag filter: {{tag}}",
"filter_by_tag": "Filter by tag: {{tag}}",
"component_details": "Component Details",

View file

@ -14,6 +14,7 @@
"type_package": "Paquete",
"type_other": "Otro",
"by_author": "por {{author}}",
"authors_profile": "Perfil del Autor",
"remove_tag_filter": "Eliminar filtro de etiqueta: {{tag}}",
"filter_by_tag": "Filtrar por etiqueta: {{tag}}",
"component_details": "Detalles del Componente",

View file

@ -14,6 +14,7 @@
"type_package": "Paquet",
"type_other": "Autre",
"by_author": "par {{author}}",
"authors_profile": "Profil de l'auteur",
"remove_tag_filter": "Supprimer le filtre de tag : {{tag}}",
"filter_by_tag": "Filtrer par tag : {{tag}}",
"component_details": "Détails du composant",

View file

@ -14,6 +14,7 @@
"type_package": "पैकेज",
"type_other": "अन्य",
"by_author": "लेखक: {{author}}",
"authors_profile": "लेखक का प्रोफ़ाइल",
"remove_tag_filter": "टैग फ़िल्टर हटाएं: {{tag}}",
"filter_by_tag": "टैग से फ़िल्टर करें: {{tag}}",
"component_details": "कंपोनेंट विवरण",

View file

@ -14,6 +14,7 @@
"type_package": "Pacchetto",
"type_other": "Altro",
"by_author": "di {{author}}",
"authors_profile": "Profilo dell'autore",
"remove_tag_filter": "Rimuovi filtro tag: {{tag}}",
"filter_by_tag": "Filtra per tag: {{tag}}",
"component_details": "Dettagli componente",

View file

@ -14,6 +14,7 @@
"type_package": "パッケージ",
"type_other": "その他",
"by_author": "作成者:{{author}}",
"authors_profile": "作成者のプロフィール",
"remove_tag_filter": "タグフィルターを削除:{{tag}}",
"filter_by_tag": "タグでフィルター:{{tag}}",
"component_details": "コンポーネントの詳細",

View file

@ -14,6 +14,7 @@
"type_package": "패키지",
"type_other": "기타",
"by_author": "작성자: {{author}}",
"authors_profile": "작성자 프로필",
"remove_tag_filter": "태그 필터 제거: {{tag}}",
"filter_by_tag": "태그로 필터링: {{tag}}",
"component_details": "컴포넌트 상세정보",

View file

@ -14,6 +14,7 @@
"type_package": "Pakiet",
"type_other": "Inne",
"by_author": "autor: {{author}}",
"authors_profile": "Profil autora",
"remove_tag_filter": "Usuń filtr tagu: {{tag}}",
"filter_by_tag": "Filtruj po tagu: {{tag}}",
"component_details": "Szczegóły komponentu",

View file

@ -14,6 +14,7 @@
"type_package": "Pacote",
"type_other": "Outro",
"by_author": "por {{author}}",
"authors_profile": "Perfil do Autor",
"remove_tag_filter": "Remover filtro de tag: {{tag}}",
"filter_by_tag": "Filtrar por tag: {{tag}}",
"component_details": "Detalhes do Componente",

View file

@ -14,6 +14,7 @@
"type_package": "Paket",
"type_other": "Diğer",
"by_author": "yazar: {{author}}",
"authors_profile": "Yazar Profili",
"remove_tag_filter": "Etiket filtresini kaldır: {{tag}}",
"filter_by_tag": "Etikete göre filtrele: {{tag}}",
"component_details": "Bileşen Detayları",

View file

@ -14,6 +14,7 @@
"type_package": "Gói",
"type_other": "Khác",
"by_author": "bởi {{author}}",
"authors_profile": "Hồ sơ tác giả",
"remove_tag_filter": "Xóa bộ lọc thẻ: {{tag}}",
"filter_by_tag": "Lọc theo thẻ: {{tag}}",
"component_details": "Chi tiết thành phần",

View file

@ -14,6 +14,7 @@
"type_package": "包",
"type_other": "其他",
"by_author": "作者:{{author}}",
"authors_profile": "作者主页",
"remove_tag_filter": "移除标签过滤器:{{tag}}",
"filter_by_tag": "按标签过滤:{{tag}}",
"component_details": "组件详情",

View file

@ -14,6 +14,7 @@
"type_package": "套件",
"type_other": "其他",
"by_author": "作者:{{author}}",
"authors_profile": "作者個人檔案",
"remove_tag_filter": "移除標籤篩選:{{tag}}",
"filter_by_tag": "依標籤篩選:{{tag}}",
"component_details": "元件詳細資訊",

View file

@ -24,7 +24,7 @@ if (!isTestEnv) {
const fs = require("fs")
const path = require("path")
const localesDir = path.join(__dirname, "i18n", "locales")
const localesDir = path.join(__dirname, "locales")
try {
// Find all language directories

View file

@ -280,6 +280,8 @@ export class MetadataScanner {
path: fullPath,
lastUpdated: await this.getLastModifiedDate(componentDir),
items: [], // Initialize empty items array for all components
author: metadata.author,
authorUrl: metadata.authorUrl,
}
}

View file

@ -9,6 +9,8 @@ export const baseMetadataSchema = z.object({
description: z.string(),
version: z.string().regex(/^\d+\.\d+\.\d+$/, "Version must be in semver format (e.g., 1.0.0)"),
tags: z.array(z.string()).optional(),
author: z.string().optional(),
authorUrl: z.string().url("Author URL must be a valid URL").optional(),
})
/**

View file

@ -25,6 +25,8 @@ export interface BaseMetadata {
description: string
version: string
tags?: string[]
author?: string
authorUrl?: string
}
/**
@ -72,6 +74,7 @@ export interface PackageManagerItem {
repoUrl: string
sourceName?: string
author?: string
authorUrl?: string
tags?: string[]
version?: string
lastUpdated?: string

View file

@ -6,7 +6,7 @@ import { groupItemsByType, GroupedItems } from "../utils/grouping"
import { ExpandableSection } from "./ExpandableSection"
import { TypeGroup } from "./TypeGroup"
import { ViewState } from "../PackageManagerViewStateManager"
import { t } from "../../../../../src/i18n"
import { t } from "@/i18n"
interface PackageManagerItemCardProps {
item: PackageManagerItem
@ -95,11 +95,39 @@ export const PackageManagerItemCard: React.FC<PackageManagerItemCardProps> = ({
<div className="flex justify-between items-start">
<div>
<h3 className="text-lg font-semibold text-vscode-foreground">{item.name}</h3>
{item.author && (
{item.authorUrl && isValidUrl(item.authorUrl) ? (
<p className="text-sm text-vscode-descriptionForeground">
{item.author ? (
<button
type="button"
className="text-vscode-textLink hover:underline bg-transparent border-0 p-0 cursor-pointer"
onClick={() => {
vscode.postMessage({
type: "openExternal",
url: item.authorUrl,
})
}}>
{t("package_manager:item_card.by_author", { author: item.author })}
</button>
) : (
<button
type="button"
className="text-vscode-textLink hover:underline bg-transparent border-0 p-0 cursor-pointer"
onClick={() => {
vscode.postMessage({
type: "openExternal",
url: item.authorUrl,
})
}}>
{t("package_manager:item_card.authors_profile")}
</button>
)}
</p>
) : item.author ? (
<p className="text-sm text-vscode-descriptionForeground">
{t("package_manager:item_card.by_author", { author: item.author })}
</p>
)}
) : null}
</div>
<span className={`px-2 py-1 text-xs text-white rounded-full ${getTypeColor(item.type)}`}>
{getTypeLabel(item.type)}

View file

@ -1,6 +1,6 @@
import React from "react"
import { cn } from "@/lib/utils"
import { t } from "../../../../../src/i18n"
import { t } from "@/i18n"
interface TypeGroupProps {
type: string

20
webview-ui/src/i18n.ts Normal file
View file

@ -0,0 +1,20 @@
import i18next from "i18next"
import { initReactI18next } from "react-i18next"
import packageManagerEn from "../../src/i18n/locales/en/package_manager.json"
// Initialize i18next
i18next.use(initReactI18next).init({
resources: {
en: {
package_manager: packageManagerEn,
},
},
lng: "en",
fallbackLng: "en",
interpolation: {
escapeValue: false,
},
})
export const t = i18next.t
export default i18next