diff --git a/.gitignore b/.gitignore index 89c6a55d5..b9e557edd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env .idea .vscode .DS_Store diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..f1ad715f1 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,3 @@ +tasks: + - init: make init all + command: make run diff --git a/docs/docker.md b/docs/docker.md index ec0146caa..eeb79086d 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -19,6 +19,8 @@ used to deploy the platform in different context: This is the simplest method to experiment with Proxeus. This will start a local Proxeus platform using images from Docker Hub. +Please note that with SELinux enabled: a `:z` should be added to the end of volume declarations in docker-compose.yml. + ### docker-compose.yml file ``` @@ -94,6 +96,7 @@ Environment: |PROXEUS_ALLOW_HTTP:|`false`|Allow the use of HTTP instead of HTTPS =NOT FOR PRODUCTION=| ## Development Docker Compose + This file will start the document service available from Docker Hub but will start the local Platform built from your local files. This method is preferred during development. This is the default configuration when using `docker-compose up` from the project root directory. diff --git a/go.mod b/go.mod index 44c66efaf..5cda32d8c 100644 --- a/go.mod +++ b/go.mod @@ -41,8 +41,8 @@ require ( go.etcd.io/bbolt v1.3.5 // indirect go.mongodb.org/mongo-driver v1.7.3 golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a - golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 - golang.org/x/sys v0.0.0-20211103235746-7861aae1554b // indirect + golang.org/x/net v0.0.0-20211209124913-491a49abca63 + golang.org/x/sys v0.0.0-20211209171907-798191bca915 // indirect gopkg.in/gavv/httpexpect.v2 v2.2.0 gopkg.in/sourcemap.v1 v1.0.5 // indirect ) @@ -75,14 +75,14 @@ require ( github.com/valyala/fasttemplate v1.2.1 // indirect github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect - github.com/yuin/goldmark v1.4.2 // indirect + github.com/yuin/goldmark v1.4.4 // indirect golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/mod v0.5.1 // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - golang.org/x/tools v0.1.7 // indirect + golang.org/x/tools v0.1.8 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/urfave/cli.v1 v1.22.5 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/go.sum b/go.sum index 37a58f234..631687995 100644 --- a/go.sum +++ b/go.sum @@ -614,8 +614,13 @@ github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.2 h1:5qVKCqCRBaGz8EepBTi7pbIw8gGCFnB1Mi6kXU4dYv8= github.com/yuin/goldmark v1.4.2/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= +github.com/yuin/goldmark v1.4.3 h1:eTEYYWtQLjK7+WK45Tk81OTkp/0UvAyqUj8flU0nTO4= +github.com/yuin/goldmark v1.4.3/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= +github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs= +github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= go.etcd.io/bbolt v1.3.0/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= @@ -703,8 +708,13 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 h1:VrJZAjbekhoRn7n5FBujY31gboH+iB3pdLxn3gE9FjU= golang.org/x/net v0.0.0-20211101193420-4a448f8816b3/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -756,8 +766,15 @@ golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b h1:1VkfZQv42XQlA/jchYumAnv1UPo6RgF9rJFkTgZIxO4= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02 h1:7NCfEGl0sfUojmX78nK9pBJuUlSZWEJA/TwASvfiPLo= +golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c h1:DHcbWVXeY+0Y8HHKR+rbLwnoh2F4tNCY7rTiHJ30RmA= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211209171907-798191bca915 h1:P+8mCzuEpyszAT6T42q0sxU+eveBAF/cJ2Kp0x6/8+0= +golang.org/x/sys v0.0.0-20211209171907-798191bca915/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -798,6 +815,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/storage/database/settings.go b/storage/database/settings.go index a64b2c9e7..b3b24db50 100644 --- a/storage/database/settings.go +++ b/storage/database/settings.go @@ -60,17 +60,18 @@ func (se *SettingsDB) Put(s *model.Settings) error { if err != nil { return err } + st := *s secret := os.Getenv("PROXEUS_ENCRYPTION_SECRET_KEY") - s.InfuraApiKey, err = EncryptWithAES(secret, s.InfuraApiKey) + st.InfuraApiKey, err = EncryptWithAES(secret, s.InfuraApiKey) if err != nil { return err } - s.SparkpostApiKey, err = EncryptWithAES(secret, s.SparkpostApiKey) + st.SparkpostApiKey, err = EncryptWithAES(secret, s.SparkpostApiKey) if err != nil { return err } - return se.jf.Put(s) + return se.jf.Put(st) } // Get retrieves all settings from the database / file diff --git a/ui/core/.eslintignore b/ui/core/.eslintignore index f6f0c19c4..d62f3d12d 100644 --- a/ui/core/.eslintignore +++ b/ui/core/.eslintignore @@ -2,3 +2,4 @@ /config/ /dist/ /src/libs/legacy/ +/src/libs/ diff --git a/ui/core/babel.config.js b/ui/core/babel.config.js index ba179669a..e9558405f 100644 --- a/ui/core/babel.config.js +++ b/ui/core/babel.config.js @@ -1,5 +1,5 @@ module.exports = { presets: [ - '@vue/app' + '@vue/cli-plugin-babel/preset' ] } diff --git a/ui/core/package.json b/ui/core/package.json index d4065bcdf..5d32f7d77 100644 --- a/ui/core/package.json +++ b/ui/core/package.json @@ -1,16 +1,16 @@ { "name": "@proxeus/core", "version": "1.0.0", + "private": true, "description": "Proxeus UI", "author": "info@proxeus.com", - "private": true, "scripts": { - "check-node-version": "check-node-version --package", "serve": "node --max_old_space_size=4096 node_modules/.bin/vue-cli-service serve", "build": "vue-cli-service build", - "lint": "vue-cli-service lint", "test:unit": "vue-cli-service test:unit", - "test:e2e": "vue-cli-service test:e2e" + "test:e2e": "vue-cli-service test:e2e", + "lint": "vue-cli-service lint", + "check-node-version": "check-node-version --package" }, "dependencies": { "@johmun/vue-tags-input": "^2.0.1", @@ -24,7 +24,7 @@ "bootstrap-vue": "2.0.0-rc.12", "brace": "^0.11.1", "codemirror": "^5.39.2", - "eth-lightwallet": "^3.0.1", + "core-js": "^3.19.3", "ethereumjs-util": "^5.2.0", "flatpickr": "^4.5.1", "font-awesome": "^4.7.0", @@ -33,14 +33,13 @@ "html-svg-connect": "^2.0.0", "human-standard-token-abi": "^1.0.2", "interactjs": "1.2.9", - "is-svg": "^4.2.2", "jquery": "^3.5.0", "jquery-ui": "^1.13.0", "js-sha3": "^0.7.0", "moment": "^2.20.1", "popper.js": "^1.14.4", + "sass": "^1.44.0", "sortablejs": "^1.7.0", - "ssri": "^8.0.1", "tippy.js": "^2.5.4", "underscore": "^1.8.3", "v-tooltip": "^2.0.0-rc.33", @@ -48,7 +47,7 @@ "vis": "^4.21.0", "vreme": "^3.0.2", "vue": "^2.5.17", - "vue-append": "^1.1.2", + "vue-append": "^2.2.0", "vue-class-component": "^6.0.0", "vue-clipboard2": "^0.2.1", "vue-codemirror": "^4.0.5", @@ -63,7 +62,7 @@ "vue-multiselect": "^2.1.0", "vue-notification": "^1.3.12", "vue-password-strength-meter": "^1.3.2", - "vue-pdf": "github:davematter/vue-pdf#master", + "vue-pdf": "^4.3.0", "vue-property-decorator": "^7.0.0", "vue-range-slider": "^0.6.0", "vue-router": "^3.0.1", @@ -75,37 +74,41 @@ "vuex": "^3.0.1", "vuex-i18n": "^1.10.5", "vuex-persist": "^1.2.2", - "web3": "^1.3.4", + "web3": "^1.3.5", "zxcvbn": "^4.4.2" }, "devDependencies": { "@cypress/webpack-preprocessor": "^3.0.0", - "@vue/cli-plugin-babel": "^3.1.1", - "@vue/cli-plugin-e2e-cypress": "^3.1.1", - "@vue/cli-plugin-eslint": "^3.1.1", - "@vue/cli-service": "^3.1.1", - "@vue/eslint-config-standard": "^4.0.0", + "@vue/cli-plugin-babel": "^4.5.15", + "@vue/cli-plugin-e2e-cypress": "^4.5.15", + "@vue/cli-plugin-eslint": "^4.5.15", + "@vue/cli-service": "^4.5.15", + "@vue/eslint-config-standard": "^5.1.2", "autoprefixer": "^9.0.1", - "babel-eslint": "^10.0.1", + "babel-eslint": "^10.1.0", "check-node-version": "^3.2.0", - "eslint": "^5.8.0", - "eslint-plugin-vue": "^5.0.0-0", + "eslint": "^6.7.2", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-vue": "^6.2.2", "file-loader": "^3.0.1", "less": "^3.8.1", "less-loader": "^4.1.0", - "node-sass": "^4.9.0", "postcss-loader": "^3.0.0", - "sass-loader": "^7.0.1", + "sass-loader": "^10.1.1", "vue-template-compiler": "^2.5.17", - "webpack": "^4.25.1" - }, - "engines": { - "node": ">= 14.15.0", - "yarn": ">= 1.22.0" + "webpack": "^4", + "worker-loader": "^3" }, "browserslist": [ "last 2 Chrome versions", "last 2 Safari versions", "last 2 Firefox versions" - ] + ], + "engines": { + "node": ">= 14.15.0", + "yarn": ">= 1.22.0" + } } diff --git a/ui/core/src/DocumentApp.vue b/ui/core/src/DocumentApp.vue index c919fc399..9eb4c6dde 100644 --- a/ui/core/src/DocumentApp.vue +++ b/ui/core/src/DocumentApp.vue @@ -10,7 +10,7 @@ diff --git a/ui/core/src/components/nav-tabs/NavTabsRoutes.vue b/ui/core/src/components/nav-tabs/NavTabsRoutes.vue index 9300ff73e..23918905b 100644 --- a/ui/core/src/components/nav-tabs/NavTabsRoutes.vue +++ b/ui/core/src/components/nav-tabs/NavTabsRoutes.vue @@ -18,7 +18,7 @@ export default { props: { tabs: { type: Array, - required: true, + required: true } } } diff --git a/ui/core/src/components/nav-tabs/index.js b/ui/core/src/components/nav-tabs/index.js index ca675d990..b15bb2544 100644 --- a/ui/core/src/components/nav-tabs/index.js +++ b/ui/core/src/components/nav-tabs/index.js @@ -3,5 +3,5 @@ import Tab from './Tab' export default { Tab, - Tabs, + Tabs } diff --git a/ui/core/src/components/template/DocumentTemplateChooser.vue b/ui/core/src/components/template/DocumentTemplateChooser.vue index 831cc019d..edc197fe2 100644 --- a/ui/core/src/components/template/DocumentTemplateChooser.vue +++ b/ui/core/src/components/template/DocumentTemplateChooser.vue @@ -71,7 +71,7 @@