fix(plugins): check and update installed plugins with provenance guards
This commit is contained in:
1 parent
d715b16ba5
commit
cab674299a
26 files changed
+1180
-44
No files matched your search
@@ -71,6 +71,16 @@ const CASES: { name: string; message: string; key: string; params?: Record<strin
|
||||
message: "Plugin update blocked by active operations. Please wait for them to finish.",
|
||||
key: "pluginPlatform.updateBlockedByOperations",
|
||||
},
|
||||
{
|
||||
name: "plugin update from a changed source needs confirmation",
|
||||
message: "Plugin update source change requires confirmation: the offering repository, publisher, or signing key differs from the recorded install",
|
||||
key: "pluginPlatform.updateSourceChangeRequired",
|
||||
},
|
||||
{
|
||||
name: "plugin downgrade is rejected",
|
||||
message: "Plugin downgrade to version 1.0.5 is not allowed (installed 1.1.0)",
|
||||
key: "pluginPlatform.updateDowngradeRejected",
|
||||
},
|
||||
{
|
||||
name: "connection admission waits for plugin update",
|
||||
message: "Plugin update is in progress. Please try again after it finishes.",
|
||||
@@ -611,6 +621,8 @@ describe("backend error wording is pinned to the Rust sources", () => {
|
||||
["crates/dbx-drivers/src/agent_service.rs", "is in use by drivers: "],
|
||||
["crates/dbx-drivers/src/agent_service.rs", "agent-registry.json not found in the ZIP; not a valid offline driver package."],
|
||||
["crates/dbx-core/src/admin/mq/adapters/kafka.rs", "Kafka does not support unloading topics"],
|
||||
["crates/dbx-plugin-runtime/src/plugins/installer.rs", "Plugin update source change requires confirmation:"],
|
||||
["crates/dbx-plugin-runtime/src/plugins/installer.rs", "Plugin downgrade to version "],
|
||||
["crates/dbx-web/src/auth.rs", "Please try again in {remaining}s"],
|
||||
["crates/dbx-web/src/routes/agents.rs", "Close these database connections before updating drivers: "],
|
||||
["src-tauri/src/commands/agents.rs", "Close these database connections before updating drivers: "],
|
||||
|
||||
@@ -90,6 +90,9 @@ const exactMessageKeys: Record<string, string> = {
|
||||
|
||||
const patterns: [RegExp, string][] = [
|
||||
[/^Plugin update blocked by active connections: ([\s\S]+)$/, "pluginPlatform.updateBlockedByConnections"],
|
||||
// crates/dbx-plugin-runtime provenance guard (installer.rs / marketplace.rs)
|
||||
[/^Plugin update source change requires confirmation:/, "pluginPlatform.updateSourceChangeRequired"],
|
||||
[/^Plugin downgrade to version .+ is not allowed/, "pluginPlatform.updateDowngradeRejected"],
|
||||
[/^(.+?) driver is not installed\. Please install it from the Driver Manager\.$/, "connection.driverNotInstalled"],
|
||||
[/^JRE (.+?) runtime is not installed\. Please install it from the Driver Manager\.$/, "connection.jreNotInstalled"],
|
||||
[/^System Java runtime was not found:/, "connection.systemJavaNotFound"],
|
||||
|
||||
@@ -195,6 +195,30 @@ export default {
|
||||
unsupported: "Unsupported",
|
||||
},
|
||||
updateSuccess: "Updated {name} to {version}",
|
||||
installedUpdatesAvailableTitle: "Plugin updates available ({count})",
|
||||
installedUpdatesAvailableDescription: "Updates verify signatures and checksums, and keep the previous version for one-click rollback.",
|
||||
updateAll: "Update all",
|
||||
updatingProgress: "Updating ({current}/{total})",
|
||||
updateToVersion: "Update to v{version}",
|
||||
checkingForUpdates: "Checking for plugin updates…",
|
||||
allPluginsUpToDate: "All installed plugins are up to date.",
|
||||
updateCheckUnavailable: "Plugin updates cannot be checked",
|
||||
updateCheckUnavailableDescription: "The plugin catalog could not be loaded, so update status may be outdated.",
|
||||
updateCheckPartialFailure: "Some plugin repositories failed to check; update status may be incomplete.",
|
||||
noRepositoriesEnabled: "No plugin repositories are enabled",
|
||||
notInRepositories: "Not in repositories",
|
||||
notInRepositoriesHint: "Installed outside the configured repositories (local .dbxp or repository disabled); update status unknown.",
|
||||
updateSourceChangeTitle: "Confirm changing the plugin update source?",
|
||||
updateSourceChangeBody: "The candidate update comes from a different repository, publisher, or signing key than the recorded install. Updating replaces the plugin and records the new source.",
|
||||
updateSourceChangeConfirm: "Update anyway (record new source)",
|
||||
provenanceCurrentInstall: "Current install",
|
||||
provenanceCandidate: "Candidate update",
|
||||
provenanceRepository: "Repository",
|
||||
provenancePublisher: "Publisher",
|
||||
provenanceSigningKey: "Signing key",
|
||||
batchSourceChangeSkipped: "These plugins changed update source and need per-plugin confirmation: {names}",
|
||||
updateSourceChangeRequired: "The update source has changed. Confirm the change in the Plugin Center first.",
|
||||
updateDowngradeRejected: "Downgrading to an older plugin version is not allowed.",
|
||||
updateBlockedByConnections: "Close these connections before updating or rolling back the plugin: {labels}",
|
||||
updateBlockedByOperations: "Wait for this plugin's active operations to finish before updating or rolling back.",
|
||||
updateInProgress: "This plugin is being updated. Try again after the update finishes.",
|
||||
|
||||
@@ -193,6 +193,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "Página principal",
|
||||
marketplaceStatus: { install: "Instalar", installed: "Instalado", update: "Actualizar", unsupported: "No compatible" },
|
||||
updateSuccess: "Se actualizó {name} a {version}",
|
||||
installedUpdatesAvailableTitle: "Actualizaciones de plugins disponibles ({count})",
|
||||
installedUpdatesAvailableDescription: "Las actualizaciones verifican firmas y sumas de comprobación, y conservan la versión anterior para revertir con un clic.",
|
||||
updateAll: "Actualizar todo",
|
||||
updatingProgress: "Actualizando ({current}/{total})",
|
||||
updateToVersion: "Actualizar a la v{version}",
|
||||
checkingForUpdates: "Buscando actualizaciones de plugins…",
|
||||
allPluginsUpToDate: "Todos los plugins instalados están actualizados.",
|
||||
updateCheckUnavailable: "No se pueden comprobar las actualizaciones de plugins",
|
||||
updateCheckUnavailableDescription: "No se pudo cargar el catálogo de plugins; el estado de actualización puede ser inexacto.",
|
||||
updateCheckPartialFailure: "Algunos repositorios de plugins no se pudieron comprobar; el estado de actualización puede estar incompleto.",
|
||||
noRepositoriesEnabled: "No hay repositorios de plugins habilitados",
|
||||
notInRepositories: "Fuera de repositorios",
|
||||
notInRepositoriesHint: "Instalado fuera de los repositorios configurados (archivo .dbxp local o repositorio deshabilitado); estado de actualización desconocido.",
|
||||
updateSourceChangeTitle: "¿Confirmar el cambio de origen de actualización del plugin?",
|
||||
updateSourceChangeBody: "La actualización candidata procede de un repositorio, editor o clave de firma distintos de la instalación registrada. Al actualizar se reemplaza el plugin y se registra el nuevo origen.",
|
||||
updateSourceChangeConfirm: "Actualizar igualmente (registrar nuevo origen)",
|
||||
provenanceCurrentInstall: "Instalación actual",
|
||||
provenanceCandidate: "Actualización candidata",
|
||||
provenanceRepository: "Repositorio",
|
||||
provenancePublisher: "Editor",
|
||||
provenanceSigningKey: "Clave de firma",
|
||||
batchSourceChangeSkipped: "Estos plugins cambiaron de origen de actualización y requieren confirmación individual: {names}",
|
||||
updateSourceChangeRequired: "El origen de actualización ha cambiado. Confirma el cambio en el Centro de plugins antes de actualizar.",
|
||||
updateDowngradeRejected: "No se permite volver a una versión anterior del plugin.",
|
||||
pinPlugin: "Fijar plugin",
|
||||
unpinPlugin: "Quitar fijación",
|
||||
noInstalledPlugins: "No hay plugins instalados",
|
||||
|
||||
@@ -192,6 +192,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "Sito web",
|
||||
marketplaceStatus: { install: "Installa", installed: "Installato", update: "Aggiorna", unsupported: "Non supportato" },
|
||||
updateSuccess: "{name} aggiornato alla versione {version}",
|
||||
installedUpdatesAvailableTitle: "Aggiornamenti plugin disponibili ({count})",
|
||||
installedUpdatesAvailableDescription: "Gli aggiornamenti verificano firme e checksum e conservano la versione precedente per il rollback con un clic.",
|
||||
updateAll: "Aggiorna tutto",
|
||||
updatingProgress: "Aggiornamento ({current}/{total})",
|
||||
updateToVersion: "Aggiorna alla v{version}",
|
||||
checkingForUpdates: "Verifica degli aggiornamenti dei plugin…",
|
||||
allPluginsUpToDate: "Tutti i plugin installati sono aggiornati.",
|
||||
updateCheckUnavailable: "Impossibile verificare gli aggiornamenti dei plugin",
|
||||
updateCheckUnavailableDescription: "Impossibile caricare il catalogo dei plugin; lo stato degli aggiornamenti potrebbe non essere accurato.",
|
||||
updateCheckPartialFailure: "Alcuni repository di plugin non sono stati controllati; lo stato degli aggiornamenti potrebbe essere incompleto.",
|
||||
noRepositoriesEnabled: "Nessun repository di plugin abilitato",
|
||||
notInRepositories: "Non nei repository",
|
||||
notInRepositoriesHint: "Installato al di fuori dei repository configurati (.dbxp locale o repository disabilitato); stato di aggiornamento sconosciuto.",
|
||||
updateSourceChangeTitle: "Confermare la modifica dell'origine di aggiornamento del plugin?",
|
||||
updateSourceChangeBody: "L'aggiornamento candidato proviene da un repository, un publisher o una chiave di firma diversi da quelli registrati. L'aggiornamento sostituisce il plugin e registra la nuova origine.",
|
||||
updateSourceChangeConfirm: "Aggiorna comunque (registra nuova origine)",
|
||||
provenanceCurrentInstall: "Installazione attuale",
|
||||
provenanceCandidate: "Aggiornamento candidato",
|
||||
provenanceRepository: "Repository",
|
||||
provenancePublisher: "Publisher",
|
||||
provenanceSigningKey: "Chiave di firma",
|
||||
batchSourceChangeSkipped: "Questi plugin hanno cambiato origine di aggiornamento e richiedono conferma individuale: {names}",
|
||||
updateSourceChangeRequired: "L'origine di aggiornamento è cambiata. Conferma la modifica nel Centro plugin prima di aggiornare.",
|
||||
updateDowngradeRejected: "Non è possibile tornare a una versione precedente del plugin.",
|
||||
pinPlugin: "Fissa il plugin",
|
||||
unpinPlugin: "Togli fissaggio",
|
||||
noInstalledPlugins: "Nessun plugin installato",
|
||||
|
||||
@@ -193,6 +193,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "ホームページ",
|
||||
marketplaceStatus: { install: "インストール", installed: "インストール済み", update: "更新", unsupported: "非対応" },
|
||||
updateSuccess: "{name} を {version} に更新しました",
|
||||
installedUpdatesAvailableTitle: "プラグインの更新があります ({count})",
|
||||
installedUpdatesAvailableDescription: "更新前には署名とチェックサムを検証し、旧バージョンを保持してワンクリックでロールバックできます。",
|
||||
updateAll: "すべて更新",
|
||||
updatingProgress: "更新中 ({current}/{total})",
|
||||
updateToVersion: "v{version} に更新",
|
||||
checkingForUpdates: "プラグインの更新を確認中…",
|
||||
allPluginsUpToDate: "すべてのプラグインは最新です。",
|
||||
updateCheckUnavailable: "プラグインの更新を確認できません",
|
||||
updateCheckUnavailableDescription: "プラグインカタログの読み込みに失敗したため、更新状態が不正確な可能性があります。",
|
||||
updateCheckPartialFailure: "一部のプラグインリポジトリの確認に失敗したため、更新状態が不完全な可能性があります。",
|
||||
noRepositoriesEnabled: "有効なプラグインリポジトリがありません",
|
||||
notInRepositories: "リポジトリ外",
|
||||
notInRepositoriesHint: "ローカルインストールまたはリポジトリが無効のため、更新を確認できません。",
|
||||
updateSourceChangeTitle: "プラグインの更新元の変更を確認しますか?",
|
||||
updateSourceChangeBody: "候補の更新は、記録されたインストール元と異なるリポジトリ・公開者・署名鍵から提供されています。更新すると置き換わり、新しい更新元が記録されます。",
|
||||
updateSourceChangeConfirm: "更新する(新しい更新元を記録)",
|
||||
provenanceCurrentInstall: "現在のインストール",
|
||||
provenanceCandidate: "候補の更新",
|
||||
provenanceRepository: "リポジトリ",
|
||||
provenancePublisher: "公開者",
|
||||
provenanceSigningKey: "署名鍵",
|
||||
batchSourceChangeSkipped: "次のプラグインは更新元が変更されたため、個別に確認が必要です:{names}",
|
||||
updateSourceChangeRequired: "更新元が変更されています。プラグインセンターで確認してから更新してください。",
|
||||
updateDowngradeRejected: "古いプラグインバージョンへのダウングレードはできません。",
|
||||
pinPlugin: "プラグインをピン留め",
|
||||
unpinPlugin: "ピン留めを解除",
|
||||
noInstalledPlugins: "プラグインはまだありません",
|
||||
|
||||
@@ -197,6 +197,30 @@ export default withEnglishFallback({
|
||||
unsupported: "지원되지 않음",
|
||||
},
|
||||
updateSuccess: "{name} 업데이트 완료: {version}",
|
||||
installedUpdatesAvailableTitle: "플러그인 업데이트 있음 ({count})",
|
||||
installedUpdatesAvailableDescription: "업데이트 전 서명과 체크섬을 검증하고, 이전 버전을 보관하여 한 번에 롤백할 수 있습니다.",
|
||||
updateAll: "모두 업데이트",
|
||||
updatingProgress: "업데이트 중 ({current}/{total})",
|
||||
updateToVersion: "v{version}(으)로 업데이트",
|
||||
checkingForUpdates: "플러그인 업데이트 확인 중…",
|
||||
allPluginsUpToDate: "모든 플러그인이 최신 버전입니다.",
|
||||
updateCheckUnavailable: "플러그인 업데이트를 확인할 수 없음",
|
||||
updateCheckUnavailableDescription: "플러그인 카탈로그를 불러오지 못해 업데이트 상태가 부정확할 수 있습니다.",
|
||||
updateCheckPartialFailure: "일부 플러그인 저장소 확인에 실패하여 업데이트 상태가 불완전할 수 있습니다.",
|
||||
noRepositoriesEnabled: "활성화된 플러그인 저장소가 없습니다",
|
||||
notInRepositories: "저장소에 없음",
|
||||
notInRepositoriesHint: "로컬 설치이거나 저장소가 비활성화되어 업데이트를 확인할 수 없습니다.",
|
||||
updateSourceChangeTitle: "플러그인 업데이트 출처 변경을 확인하시겠습니까?",
|
||||
updateSourceChangeBody: "후보 업데이트는 기록된 설치 출처와 다른 저장소·게시자·서명 키에서 제공됩니다. 업데이트하면 교체되며 새 출처가 기록됩니다.",
|
||||
updateSourceChangeConfirm: "업데이트(새 출처 기록)",
|
||||
provenanceCurrentInstall: "현재 설치",
|
||||
provenanceCandidate: "후보 업데이트",
|
||||
provenanceRepository: "저장소",
|
||||
provenancePublisher: "게시자",
|
||||
provenanceSigningKey: "서명 키",
|
||||
batchSourceChangeSkipped: "다음 플러그인은 업데이트 출처가 변경되어 개별 확인이 필요합니다: {names}",
|
||||
updateSourceChangeRequired: "업데이트 출처가 변경되었습니다. 플러그인 센터에서 확인 후 업데이트하세요.",
|
||||
updateDowngradeRejected: "이전 플러그인 버전으로 다운그레이드할 수 없습니다.",
|
||||
pinPlugin: "플러그인 고정",
|
||||
unpinPlugin: "고정 해제",
|
||||
noInstalledPlugins: "설치된 플러그인이 없습니다",
|
||||
|
||||
@@ -193,6 +193,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "Página inicial",
|
||||
marketplaceStatus: { install: "Instalar", installed: "Instalado", update: "Atualizar", unsupported: "Não compatível" },
|
||||
updateSuccess: "{name} atualizado para {version}",
|
||||
installedUpdatesAvailableTitle: "Atualizações de plugins disponíveis ({count})",
|
||||
installedUpdatesAvailableDescription: "As atualizações verificam assinaturas e checksums e mantêm a versão anterior para reversão com um clique.",
|
||||
updateAll: "Atualizar tudo",
|
||||
updatingProgress: "Atualizando ({current}/{total})",
|
||||
updateToVersion: "Atualizar para v{version}",
|
||||
checkingForUpdates: "Verificando atualizações de plugins…",
|
||||
allPluginsUpToDate: "Todos os plugins instalados estão atualizados.",
|
||||
updateCheckUnavailable: "Não é possível verificar atualizações de plugins",
|
||||
updateCheckUnavailableDescription: "O catálogo de plugins não pôde ser carregado; o status de atualização pode estar impreciso.",
|
||||
updateCheckPartialFailure: "Alguns repositórios de plugins falharam na verificação; o status de atualização pode estar incompleto.",
|
||||
noRepositoriesEnabled: "Nenhum repositório de plugins habilitado",
|
||||
notInRepositories: "Fora dos repositórios",
|
||||
notInRepositoriesHint: "Instalado fora dos repositórios configurados (.dbxp local ou repositório desabilitado); status de atualização desconhecido.",
|
||||
updateSourceChangeTitle: "Confirmar a alteração da origem de atualização do plugin?",
|
||||
updateSourceChangeBody: "A atualização candidata vem de um repositório, editor ou chave de assinatura diferentes da instalação registrada. Atualizar substitui o plugin e registra a nova origem.",
|
||||
updateSourceChangeConfirm: "Atualizar mesmo assim (registrar nova origem)",
|
||||
provenanceCurrentInstall: "Instalação atual",
|
||||
provenanceCandidate: "Atualização candidata",
|
||||
provenanceRepository: "Repositório",
|
||||
provenancePublisher: "Editor",
|
||||
provenanceSigningKey: "Chave de assinatura",
|
||||
batchSourceChangeSkipped: "Esses plugins mudaram de origem de atualização e exigem confirmação individual: {names}",
|
||||
updateSourceChangeRequired: "A origem de atualização mudou. Confirme a alteração no Central de Plugins antes de atualizar.",
|
||||
updateDowngradeRejected: "Não é permitido voltar a uma versão anterior do plugin.",
|
||||
pinPlugin: "Fixar plugin",
|
||||
unpinPlugin: "Desafixar",
|
||||
noInstalledPlugins: "Nenhum plugin instalado",
|
||||
|
||||
@@ -115,6 +115,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "主页",
|
||||
marketplaceStatus: { install: "安装", installed: "已安装", update: "更新", unsupported: "不支持" },
|
||||
updateSuccess: "已将 {name} 更新到 {version}",
|
||||
installedUpdatesAvailableTitle: "插件更新可用 ({count})",
|
||||
installedUpdatesAvailableDescription: "更新前将校验包签名与校验和;自动保留上一版本,支持一键回滚。",
|
||||
updateAll: "全部更新",
|
||||
updatingProgress: "更新中 ({current}/{total})",
|
||||
updateToVersion: "更新至 v{version}",
|
||||
checkingForUpdates: "正在检查插件更新…",
|
||||
allPluginsUpToDate: "所有插件均已是最新版本。",
|
||||
updateCheckUnavailable: "无法检查插件更新",
|
||||
updateCheckUnavailableDescription: "插件目录加载失败,更新状态可能不准确。",
|
||||
updateCheckPartialFailure: "部分插件仓库检查失败,更新状态可能不完整。",
|
||||
noRepositoriesEnabled: "未启用任何插件仓库",
|
||||
notInRepositories: "不在仓库",
|
||||
notInRepositoriesHint: "本地安装或所在仓库已停用,无法检查更新。",
|
||||
updateSourceChangeTitle: "确认更换插件的更新来源?",
|
||||
updateSourceChangeBody: "候选更新的仓库、发布者或签名密钥与已记录的安装来源不一致;更新将替换当前插件并记录新来源。",
|
||||
updateSourceChangeConfirm: "仍要更新(记录新来源)",
|
||||
provenanceCurrentInstall: "当前安装",
|
||||
provenanceCandidate: "候选更新",
|
||||
provenanceRepository: "仓库",
|
||||
provenancePublisher: "发布者",
|
||||
provenanceSigningKey: "签名密钥",
|
||||
batchSourceChangeSkipped: "以下插件的更新来源有变更,请逐个确认更新:{names}",
|
||||
updateSourceChangeRequired: "更新来源有变更,请先在插件中心确认。",
|
||||
updateDowngradeRejected: "不能降级到更旧的插件版本。",
|
||||
updateBlockedByConnections: "请先关闭以下连接后再更新或回滚插件:{labels}",
|
||||
updateBlockedByOperations: "该插件仍有操作正在执行,请等待完成后再更新或回滚。",
|
||||
updateInProgress: "该插件正在更新,请等待完成后重试。",
|
||||
|
||||
@@ -193,6 +193,30 @@ export default withEnglishFallback({
|
||||
pluginHomepage: "主頁",
|
||||
marketplaceStatus: { install: "安裝", installed: "已安裝", update: "更新", unsupported: "不支援" },
|
||||
updateSuccess: "已將 {name} 更新至 {version}",
|
||||
installedUpdatesAvailableTitle: "外掛更新可用 ({count})",
|
||||
installedUpdatesAvailableDescription: "更新前會校驗套件簽章與校驗和;自動保留上一版本,支援一鍵回復。",
|
||||
updateAll: "全部更新",
|
||||
updatingProgress: "更新中 ({current}/{total})",
|
||||
updateToVersion: "更新至 v{version}",
|
||||
checkingForUpdates: "正在檢查外掛更新…",
|
||||
allPluginsUpToDate: "所有外掛均已是最新版本。",
|
||||
updateCheckUnavailable: "無法檢查外掛更新",
|
||||
updateCheckUnavailableDescription: "外掛目錄載入失敗,更新狀態可能不準確。",
|
||||
updateCheckPartialFailure: "部分外掛倉庫檢查失敗,更新狀態可能不完整。",
|
||||
noRepositoriesEnabled: "未啟用任何外掛倉庫",
|
||||
notInRepositories: "不在倉庫",
|
||||
notInRepositoriesHint: "本機安裝或所在倉庫已停用,無法檢查更新。",
|
||||
updateSourceChangeTitle: "確認更換外掛的更新來源?",
|
||||
updateSourceChangeBody: "候選更新的倉庫、發布者或簽署金鑰與已記錄的安裝來源不一致;更新將替換目前外掛並記錄新來源。",
|
||||
updateSourceChangeConfirm: "仍要更新(記錄新來源)",
|
||||
provenanceCurrentInstall: "目前安裝",
|
||||
provenanceCandidate: "候選更新",
|
||||
provenanceRepository: "倉庫",
|
||||
provenancePublisher: "發布者",
|
||||
provenanceSigningKey: "簽署金鑰",
|
||||
batchSourceChangeSkipped: "以下外掛的更新來源有變更,請逐個確認更新:{names}",
|
||||
updateSourceChangeRequired: "更新來源有變更,請先在外掛中心確認。",
|
||||
updateDowngradeRejected: "無法降級至較舊的外掛版本。",
|
||||
updateBlockedByConnections: "請先關閉以下連線後再更新或回復外掛:{labels}",
|
||||
updateBlockedByOperations: "此外掛仍有操作正在執行,請等待完成後再更新或回復。",
|
||||
updateInProgress: "此外掛正在更新,請等待完成後重試。",
|
||||
|
||||
Reference in new issue
Block a user