(url: string, source: InstallSource, subscribeUrl?: string)
| 378 | |
| 379 | // 直接通过url静默安装脚本 |
| 380 | async installByUrl(url: string, source: InstallSource, subscribeUrl?: string) { |
| 381 | const uuid = uuidv4(); |
| 382 | const code = await fetchScriptBody(url); |
| 383 | const { script } = await prepareScriptByCode(code, url, uuid); |
| 384 | script.subscribeUrl = subscribeUrl; |
| 385 | await this.installScript({ |
| 386 | script, |
| 387 | code, |
| 388 | upsertBy: source, |
| 389 | }); |
| 390 | return script; |
| 391 | } |
| 392 | |
| 393 | // 直接通过code静默安装脚本 |
| 394 | async installByCode(param: { uuid: string; code: string; upsertBy: InstallSource }) { |
no test coverage detected