debug setup
This commit is contained in:
Generated
+34
@@ -1928,6 +1928,7 @@
|
||||
"bitcoinjs-lib": "^5.0.4",
|
||||
"bsock": "^0.1.9",
|
||||
"express": "^4.16.4",
|
||||
"frontblock-generic": "^0.28.4",
|
||||
"hdkey": "^1.1.1",
|
||||
"key-file-storage": "^2.2.1",
|
||||
"log4js": "^4.3.1",
|
||||
@@ -1937,6 +1938,34 @@
|
||||
"rxjs": "^6.5.2",
|
||||
"rxjs-compat": "^6.5.2",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"frontblock-generic": {
|
||||
"version": "0.28.4",
|
||||
"resolved": "https://registry.npmjs.org/frontblock-generic/-/frontblock-generic-0.28.4.tgz",
|
||||
"integrity": "sha512-ttkGf0936GWULDbCO+yZzBSfxEvfjIlmynnDyAF/xnKv8fWlSkG7nLB3jm85yduven3kxsPq24avRJjmbu5G+g==",
|
||||
"requires": {
|
||||
"@types/lowdb": "^1.0.9",
|
||||
"@types/node": "^12.7.1",
|
||||
"bsock": "^0.1.9",
|
||||
"fs": "0.0.1-security",
|
||||
"http": "0.0.0",
|
||||
"key-file-storage": "^2.2.4",
|
||||
"knex": "^0.19.2",
|
||||
"log4js": "^4.2.0",
|
||||
"lowdb": "^1.0.0",
|
||||
"minimist": "^1.2.0",
|
||||
"path": "^0.12.7",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "12.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.2.tgz",
|
||||
"integrity": "sha512-dyYO+f6ihZEtNPDcWNR1fkoTDf3zAK3lAABDze3mz6POyIercH0lEUawUFXlG8xaQZmm1yEBON/4TsYv/laDYg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontblock-generic": {
|
||||
@@ -4596,6 +4625,11 @@
|
||||
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
|
||||
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
|
||||
},
|
||||
"spawn-sync": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-2.0.0.tgz",
|
||||
"integrity": "sha512-AGXIhH/XZVinFewojYTsG8uapHX2e7MjtFbmibvK9qqG4qGd9b6jelU1sTkCA0RVGHvN9exJYTBVbF1Ls2f69g=="
|
||||
},
|
||||
"split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"path": "^0.12.7",
|
||||
"rimraf": "^3.0.0",
|
||||
"simple-git": "^1.124.0",
|
||||
"spawn-sync": "^2.0.0",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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