MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / isInstalled

Method isInstalled

src/app/service/service_worker/script.ts:1272–1283  ·  view source on GitHub ↗
({ name, namespace }: { name: string; namespace: string })

Source from the content-addressed store, hash-verified

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 // 获取数据并排序

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected