debug setup

This commit is contained in:
peter
2019-08-26 01:17:11 +02:00
parent 9b96db41f7
commit 3daf3233a1
5 changed files with 40 additions and 6 deletions
-1
View File
@@ -108,7 +108,6 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf> implements Plugin<A
*/
this.express.get('/plugins/:id'+".js", async (request, response) => {
const pth = path.resolve("plugins/"+request.params.id, "FrontendPlugin.js");
logger.info("Loading frontend plugin from fs", pth)
const file = await fs.readFile(pth)
const frontend = file.toString()
+4 -3
View File
@@ -91,17 +91,18 @@ export class FrontblockConfigLib{
window['fb'] = new FrontblockConfigLib()
declare const fb:{UpdateManager:any}
window['setup'] = async() => {
await Promise.all([
const i = await Promise.all([
fb.UpdateManager.installPlugin("ApiClient"),
fb.UpdateManager.installPlugin("HtmlSupplier"),
fb.UpdateManager.installPlugin("PaymentManager"),
fb.UpdateManager.installPlugin("Wallet"),
])
await Promise.all([
console.log(i)
const s = await Promise.all([
fb.UpdateManager.startPlugin("ApiClient"),
fb.UpdateManager.startPlugin("HtmlSupplier"),
fb.UpdateManager.startPlugin("PaymentManager"),
fb.UpdateManager.startPlugin("Wallet"),
])
location.reload();
console.log(s)
}
+1 -2
View File
@@ -102,8 +102,7 @@ export class UpdateManager implements Plugin{
async installPlugin(name: string, force:boolean = false):Promise<RepoFolderStatus>{
logger.warn("Cloning fb-dist/"+name+".git into ./plugins/"+name+" ..."+(force?" USING FORCE!":""))
this.pluginUpdaters[name] = new GitUpdater("./plugins/"+name)
const status = await this.pluginUpdaters[name].cloneRepo("https://gitea.frontblock.me/fb-dist/"+name.toLowerCase()+".git", force)
return status
return await this.pluginUpdaters[name].cloneRepo("https://gitea.frontblock.me/fb-dist/"+name.toLowerCase()+".git", force)
}
async startPlugin(name:string):Promise<boolean>{