({ name, namespace }: { name: string; namespace: string })
| 1270 | } |
| 1271 | |
| 1272 | isInstalled({ name, namespace }: { name: string; namespace: string }): Promise<App.IsInstalledResponse> { |
| 1273 | // 用于 window.external |
| 1274 | return this.scriptDAO.findByNameAndNamespace(name, namespace).then((script) => { |
| 1275 | if (script) { |
| 1276 | return { |
| 1277 | installed: true, |
| 1278 | version: script.metadata.version?.[0] || "0.0", |
| 1279 | } as App.IsInstalledResponse; |
| 1280 | } |
| 1281 | return { installed: false } as App.IsInstalledResponse; |
| 1282 | }); |
| 1283 | } |
| 1284 | |
| 1285 | async getAllScripts() { |
| 1286 | // 获取数据并排序 |
nothing calls this directly
no test coverage detected