externals
This commit is contained in:
+2080
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"transform": {
|
||||
"^.+\\.(t|j)sx?$": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
|
||||
}
|
||||
Generated
+259
-6855
File diff suppressed because it is too large
Load Diff
+2
-56
@@ -21,84 +21,30 @@
|
||||
"author": "frontblock.me",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@angular/common": "^8.2.1",
|
||||
"@angular/compiler": "^8.2.1",
|
||||
"@angular/core": "^8.2.1",
|
||||
"@angular/forms": "^8.2.1",
|
||||
"@angular/platform-browser": "^8.2.1",
|
||||
"@angular/platform-browser-dynamic": "^8.2.1",
|
||||
"@angular/router": "^8.2.1",
|
||||
"@clr/ui": "^2.1.1",
|
||||
"@uirouter/angularjs": "^1.0.5",
|
||||
"adm-zip": "^0.4.13",
|
||||
"angular": "^1.7.8",
|
||||
"bip39": "^3.0.2",
|
||||
"bitcoinjs-lib": "^5.0.4",
|
||||
"bsert": "0.0.10",
|
||||
"bsock": "^0.1.9",
|
||||
"easy-unzip": "^1.1.0",
|
||||
"child-process-promise": "^2.2.1",
|
||||
"express": "^4.16.4",
|
||||
"frontblock": "^0.9.9",
|
||||
"frontblock-generic": "latest",
|
||||
"git-cherrypicker": "0.0.3",
|
||||
"git-describe": "^4.0.4",
|
||||
"hdkey": "^1.1.1",
|
||||
"http": "0.0.0",
|
||||
"key-file-storage": "^2.2.4",
|
||||
"log4js": "^4.4.0",
|
||||
"lowdb": "^1.0.0",
|
||||
"memfs": "^2.15.5",
|
||||
"minimist": "^1.2.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"path": "^0.12.7",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^0.55.1",
|
||||
"rollup-plugin-node-externals": "^2.0.0",
|
||||
"rxjs": "^6.5.2",
|
||||
"rxjs-compat": "^6.5.2",
|
||||
"simple-git": "^1.124.0",
|
||||
"socket.io": "^2.2.0",
|
||||
"stream-buffers": "^3.0.2",
|
||||
"unzip": "^0.1.11",
|
||||
"uuid": "^3.3.2",
|
||||
"zone.js": "^0.9.1"
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/angular": "^1.6.27",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/node": "^11.13.19",
|
||||
"@types/semver": "^6.0.1",
|
||||
"@types/webpack-env": "^1.14.0",
|
||||
"autoprefixer": "^9.4.7",
|
||||
"clean-webpack-plugin": "^1.0.1",
|
||||
"css-loader": "^2.1.0",
|
||||
"cssnano": "^4.1.8",
|
||||
"file-loader": "^3.0.1",
|
||||
"html-loader": "^0.5.5",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"jest": "^24.7.1",
|
||||
"less": "^3.9.0",
|
||||
"less-loader": "^4.0.5",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"prettier": "^1.18.2",
|
||||
"rollup-plugin-node-resolve": "^3.0.2",
|
||||
"rollup-plugin-typescript": "^0.8.1",
|
||||
"rollup-plugin-typescript2": "^0.10.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.4.1",
|
||||
"ts-jest": "^24.0.2",
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.18.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-loader": "^3.5.3",
|
||||
"typescript": "^3.5.3",
|
||||
"typescript-declaration-webpack-plugin": "^0.1.1",
|
||||
"uglifyjs-webpack-plugin": "^2.1.3",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.39.2",
|
||||
"webpack-cli": "^3.3.5"
|
||||
},
|
||||
|
||||
@@ -11,8 +11,7 @@ import { promises as fs } from "fs"
|
||||
import { GitUpdater, RepoFolderStatus, } from "./GitUpdater";
|
||||
import * as path from "path"
|
||||
import { UpdateManager } from './UpdateManger';
|
||||
|
||||
const kfs = require("key-file-storage").default('kfs')
|
||||
var exec = require('child-process-promise').exec;
|
||||
|
||||
Logger.configure({
|
||||
appenders:
|
||||
@@ -85,6 +84,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
|
||||
private async initialize(){
|
||||
await this.updateManager.updateAdmin()
|
||||
await this.updateManager.updatePlatformDependencies()
|
||||
await this.updateManager.updateDashboard()
|
||||
await this.updateManager.updateFrontblockLib()
|
||||
|
||||
@@ -184,7 +184,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
return
|
||||
}
|
||||
|
||||
let port:number = this.conf.httpPort
|
||||
let port:number = this.getConfig().httpPort
|
||||
this.express = express()
|
||||
this.express.use('/', express.static('static'))
|
||||
|
||||
@@ -240,7 +240,7 @@ export class FrontblockAdmin extends ConfigLoader<AdminConf>{
|
||||
|
||||
private restartWebserver(port:number){
|
||||
this.stopWebserver()
|
||||
kfs[this.name+".conf"] = <AdminConf>{ httpPort: port }
|
||||
this.setConfigKey("httpPort", port)
|
||||
this.startWebserver()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ import { Plugin, socketioRPC } from "frontblock-generic/Plugin";
|
||||
import { GitUpdater, RepoFolderStatus } from "./GitUpdater";
|
||||
import { FrontblockCherryPicker } from "git-cherrypicker";
|
||||
import * as Logger from 'log4js'
|
||||
import { mkdirSync } from "fs";
|
||||
var exec = require('child-process-promise').exec;
|
||||
|
||||
Logger.configure({
|
||||
appenders:
|
||||
{
|
||||
@@ -61,6 +64,17 @@ export class UpdateManager implements Plugin{
|
||||
}]
|
||||
}
|
||||
|
||||
async updatePlatformDependencies(){
|
||||
|
||||
logger.info("installing npm stuff")
|
||||
const res = await exec('npm install --prefix ./externals knex sqlite3')
|
||||
logger.warn(res.stderr)
|
||||
logger.info(res.stdout)
|
||||
|
||||
//mkdirSync("./test", {recursive:true})
|
||||
//await npmInstallAsync(["sqlite3"], "./test")
|
||||
}
|
||||
|
||||
async updateAdmin(force:boolean = false){
|
||||
this.adminUpdater = new GitUpdater("./dist")
|
||||
let status = await this.adminUpdater.getStatus()
|
||||
@@ -108,7 +122,7 @@ export class UpdateManager implements Plugin{
|
||||
|
||||
|
||||
let str = "../plugins/"+name+"/Plugin"
|
||||
const pluginClass = await import(str)
|
||||
const pluginClass = await eval('require')(str)
|
||||
const pluginObj = new pluginClass.default()
|
||||
await pluginObj.start()
|
||||
this.loadedPlugins[name] = pluginObj
|
||||
|
||||
@@ -1,12 +1,33 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
module.exports = [{
|
||||
mode: 'production',
|
||||
target: "web",
|
||||
|
||||
entry: path.resolve(__dirname, '../../dist/FrontblockLib.js'),
|
||||
entry: path.resolve(__dirname, '../../lib/FrontblockLib.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../dist'),
|
||||
filename: 'FrontblockLib.js',
|
||||
}
|
||||
}
|
||||
},{
|
||||
mode: 'production',
|
||||
target: "node",
|
||||
node: {
|
||||
global: true,
|
||||
process: true,
|
||||
__filename: false,
|
||||
__dirname: false,
|
||||
Buffer: true,
|
||||
},
|
||||
externals:[
|
||||
'knex'
|
||||
],
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
entry: path.resolve(__dirname, '../../lib/FrontblockAdmin.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../dist'),
|
||||
filename: 'FrontblockAdmin.js',
|
||||
}
|
||||
}]
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"target": "ESnext",
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"outDir": "./dist",
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user