debug setup
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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>{
|
||||
|
||||
Reference in New Issue
Block a user