feat: 新增公告接口

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-10-25 15:54:38 +08:00
parent b3fa8790e3
commit cf9153c134
7 changed files with 35 additions and 4 deletions

View File

@ -105,7 +105,7 @@ export class MiaoScriptConsole implements Console {
let sourceMappingURL = lastLine.split('sourceMappingURL=', 2)[1]
if (sourceMappingURL.startsWith('data:application/json;base64,')) {
sourceContent = String.fromCharCode(...Array.from(base64.toByteArray(sourceMappingURL.split(',', 2)[1])))
} else if (sourceMappingURL.startsWith('http')) {
} else if (sourceMappingURL.startsWith('http://') || sourceMappingURL.startsWith('https://')) {
// TODO
} else {
let file = Paths.get(Paths.get(fileName, '..', sourceMappingURL).toFile().getCanonicalPath()).toFile()

View File

@ -73,6 +73,12 @@ export namespace server {
getService(service: string): any {
throw new Error("Method not implemented.")
}
broadcast(message: string, permission: string) {
throw new Error("Method not implemented.")
}
broadcastMessage(message: string) {
throw new Error("Method not implemented.")
}
dispatchCommand(sender: string | any, command: string): boolean {
throw new Error("Method not implemented.")
}

View File

@ -17,7 +17,7 @@ export namespace task {
this.cacheTasks.delete(taskId)
let ownerName = task.getOwner()?.description.name
if (ownerName && this.pluginCacheTasks.has(ownerName)) {
this.pluginCacheTasks.get(ownerName).delete(taskId)
this.pluginCacheTasks.get(ownerName)?.delete(taskId)
}
})
}