Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend build with Node.js 18 and Vite (WIP) #397

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0a1a0da
Docker build local
loleg Sep 21, 2023
cb58476
Update dependabot.yml
loleg Oct 10, 2023
68be6f3
Merge branch 'loleg-patch-1' of github.com:ProxeusApp/proxeus-core in…
loleg Oct 11, 2023
f19927d
Merge branch 'preprod' of github.com:ProxeusApp/proxeus-core into pre…
loleg Oct 20, 2023
e384edd
Update to Node 18 in CI, minimum Node 16
loleg Oct 20, 2023
880fe5e
Updated Yarn
loleg Oct 20, 2023
4674eb1
Replace Vue CLI with Vite
loleg Oct 20, 2023
0d70991
Migrated to Vite
loleg Oct 20, 2023
25e0c5f
Merged main
loleg Nov 3, 2023
153e6ac
Merged and docs
loleg Nov 6, 2023
85a7eae
Merge branch 'preprod' of github.com:ProxeusApp/proxeus-core into pre…
loleg Nov 6, 2023
58ecc04
Merged, web3 v4
loleg Nov 18, 2023
5ec9997
Yarn upgrade
loleg Nov 18, 2023
8712c06
Merged with upstream
loleg Nov 18, 2023
a1d87bd
Yarn merged
loleg Nov 18, 2023
ffb142b
Updated to Axios 1.6.0
loleg Nov 18, 2023
2902484
Merge branch 'main' of github.com:ProxeusApp/proxeus-core
loleg Nov 18, 2023
ff17021
Merged
loleg Nov 18, 2023
c868f97
Merged with upstream
loleg Dec 2, 2023
6bd47e2
Merge branch 'preprod' of github.com:ProxeusApp/proxeus-core into pre…
loleg Dec 12, 2023
3b76ab4
Merged yarn
loleg Dec 18, 2023
eb908b1
Updated Vue/Vite imports
loleg Dec 18, 2023
df1704e
Use ReconnectingWebsocket lib
loleg Dec 18, 2023
9076e91
CircleCI Node 18.19 tag
loleg Dec 18, 2023
fef3bf1
CircleCI Node 18.19 tag
loleg Dec 18, 2023
6f344a7
Major semver dev deps
loleg Dec 18, 2023
d30f3c7
Merge branch 'main' of github.com:ProxeusApp/proxeus-core
loleg Dec 21, 2023
02ae9d2
Merged with main
loleg Dec 21, 2023
5c2f46c
Merged
loleg Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
---
version: 2.1

parameters:
golang-tag:
type: string
default: "1.20"
nodejs-ver:
type: integer
default: 18
nodejs-tag:
type: string
default: "18.19"

executors:
docker-image-golang:
environment:
PROJECT_ROOT_FOLDER: ~/project
docker:
- image: cimg/go:1.20
- image: cimg/go:<< pipeline.parameters.golang-tag >>
docker-image-golang-dependencies:
environment:
PROJECT_ROOT_FOLDER: ~/project
docker:
- image: cimg/go:1.20
- image: cimg/go:<< pipeline.parameters.golang-tag >>
- image: proxeus/node-crypto-forex-rates
- image: proxeus/document-service
- image: proxeus/mongo-dev-cluster
Expand All @@ -25,7 +36,7 @@ executors:
jobs:
build-ui:
docker:
- image: cimg/node:16.20
- image: cimg/node:<< pipeline.parameters.nodejs-tag >>
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -153,7 +164,7 @@ jobs:
- go-mod-v2-{{ checksum "go.sum" }}
- run:
name: Node.js
command: curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
command: curl -fsSL https://deb.nodesource.com/setup_<< pipeline.parameters.nodejs-ver >>.x | sudo -E bash -
- run:
name: Yarn
command: curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![CircleCI](https://circleci.com/gh/ProxeusApp/proxeus-core.svg?style=shield)](https://circleci.com/gh/ProxeusApp/proxeus-core.svg)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ProxeusApp/proxeus-core/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ProxeusApp/proxeus-core/tree/main)

# Proxeus Core
--------------
Expand Down
22 changes: 0 additions & 22 deletions docker-compose-cnode.override.yml

This file was deleted.

28 changes: 9 additions & 19 deletions docs/build_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ Here is the list of dependencies:
+ go (1.10+, 64bit for Windows)
+ GOBIN added to your PATH (to check your GOBIN: `echo $(go env GOPATH)/bin`)
+ curl
+ yarn (1.12+)
+ node (14)
+ vue-cli
+ git
+ docker-compose (18.06.0+)
+ yarn (1.12+)
+ node (16+)
+ docker-compose (18+)
+ wget (for godoc generation)
+ (OSX) Brew Package Manager
+ (OSX) Command Line Tools (Xcode)
Expand All @@ -29,12 +28,11 @@ sudo apt-get install make golang curl npm git
```

#### OSX

If you currently do not have the OSX `Command Line Tools` installed run
```
xcode-select --install
```

```
xcode-select --install
brew install make golang curl npm git
```

Expand All @@ -44,6 +42,7 @@ PATH=$PATH:$(go env GOPATH)/bin
```

### Clone repository

The project uses go modules.

Clone the repository outside your GOPATH:
Expand All @@ -54,21 +53,12 @@ cd proxeus-core
```

### Build

All the build projects are stated in `./Makefile`.

Before building Proxeus, make sure to set all [required environment variables](../README.md#quick-start-with-docker).
```
export PROXEUS_DATA_DIR=./data
export PROXEUS_INFURA_API_KEY=<Your Infura project ID>
export PROXEUS_SPARKPOST_API_KEY=<Your SparkPost API Key>
export PROXEUS_ENCRYPTION_SECRET_KEY=<A 32-character random string>
export PROXEUS_BLOCKCHAIN_CONTRACT_ADDRESS=0x1d3e5c81bf4bc60d41a8fbbb3d1bae6f03a75f71
export PROXEUS_ALLOW_HTTP=true
export PROXEUS_PLATFORM_DOMAIN=localhost
export PROXEUS_EMAIL_FROM=youremail@example.com
Before building Proxeus, make sure to set all [required environment variables](build_docker.md) (i.e. with an `.env` file).

```
Make sure that the email domain for `PROXEUS_EMAIL_FROM` is a configured sending domain in sparkpost
Make sure that the email domain for `PROXEUS_EMAIL_FROM` is a configured sending domain in Sparkpost.

To initialize dependencies run:
```
Expand Down
1 change: 0 additions & 1 deletion docs/build_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ You may also want to include custom nodes. There is a sample configuration which

```
docker-compose -f docker-compose.yml -f docker-compose-example.override.yml up

```

See `docker-compose-extra.override.yml` for examples with several other nodes.
6 changes: 4 additions & 2 deletions docs/frontend.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Frontend Development

### Prerequisites

+ yarn (1.12+)
+ node (14+)
+ vue-cli
+ node (16+)

> **Important**
>
Expand All @@ -14,8 +14,10 @@
> /core/central/ui/node_modules instead of the package subfolders (./core, etc.).

#### Typescript

Use typescript wherever you find it appropriate. Use it especially for critical
modules and components where static type checking is helpful.

Check https://vuejs.org/v2/guide/typescript.html for more information in regards to TypeScript in a Vue context.

#### Frontend Dev Server
Expand Down
1 change: 0 additions & 1 deletion docs/test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Tests


The following command runs all the tests without test coverage:

```
Expand Down
1 change: 0 additions & 1 deletion ui/core/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
14 changes: 14 additions & 0 deletions ui/core/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Proxeus</title>
<link rel="icon" href="/favicon.ico">
<script type="module" src="/src/main.js"></script>
</head>
<body>
<strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</body>
</html>
59 changes: 30 additions & 29 deletions ui/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@
"description": "Proxeus UI",
"author": "info@proxeus.com",
"scripts": {
"serve": "node --max_old_space_size=4096 node_modules/.bin/vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"dev": "vite",
"serve": "node --max_old_space_size=4096 node_modules/.bin/vite preview",
"build": "vite build",
"test:unit": "vite test:unit",
"test:e2e": "vite test:e2e",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"check-node-version": "check-node-version --package"
},
"dependencies": {
"@johmun/vue-tags-input": "^2.0.1",
"@mdi/font": "^2.6.95",
"@proxeus/wallet": "1.0.0",
"@vitejs/plugin-vue": "^1",
"ajv": "^6.5.2",
"async": "^3.2.5",
"axios": "^1.6.2",
"babel-runtime": "^6.26.0",
"bootstrap": "^4.1.2",
"bootstrap-vue": "2.0.0-rc.12",
"bootstrap-vue": "^2.23.1",
"brace": "^0.11.1",
"codemirror": "^5.39.2",
"core-js": "^3.34.0",
Expand All @@ -38,13 +40,16 @@
"js-sha3": "^0.9.3",
"moment": "^2.29.4",
"popper.js": "^1.14.4",
"reconnecting-websocket": "^4.4.0",
"sass": "^1.69.5",
"sortablejs": "^1.7.0",
"tippy.js": "^6.3.7",
"underscore": "^1.8.3",
"v-tooltip": "^2.0.0-rc.33",
"velocity-animate": "^1.5.1",
"vis": "^4.21.0",
"vite": "^2.5.10",
"vite-plugin-vue2": "^2.0.3",
"vreme": "^3.0.2",
"vue": "^2.5.17",
"vue-append": "^2.2.0",
Expand Down Expand Up @@ -74,31 +79,27 @@
"vuex": "^3.0.1",
"vuex-i18n": "^1.10.5",
"vuex-persist": "^1.2.2",
"web3": "^1.3.5",
"web3": "^4",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^4.1.5",
"@vue/cli-plugin-babel": "^4",
"@vue/cli-plugin-e2e-cypress": "^4",
"@vue/cli-plugin-eslint": "^4",
"@vue/cli-service": "^4",
"@vue/eslint-config-standard": "^5.1.2",
"autoprefixer": "^9.0.1",
"babel-eslint": "^10.1.0",
"check-node-version": "^3.2.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^9.18.1",
"file-loader": "^3.0.1",
"less": "^3.8.1",
"less-loader": "^4.1.0",
"postcss-loader": "^3.0.0",
"sass-loader": "^10.1.1",
"vue-template-compiler": "^2.5.17",
"@cypress/webpack-preprocessor": "^4",
"@vue/eslint-config-standard": "^8",
"autoprefixer": "^9",
"babel-eslint": "^10",
"check-node-version": "^3",
"eslint": "^6",
"eslint-plugin-import": "^2",
"eslint-plugin-node": "^11",
"eslint-plugin-promise": "^4",
"eslint-plugin-standard": "^5",
"eslint-plugin-vue": "^9",
"file-loader": "^3",
"less": "^3",
"less-loader": "^4",
"postcss-loader": "^3",
"sass": "^1",
"vue-template-compiler": "^2",
"webpack": "^4",
"worker-loader": "^3"
},
Expand All @@ -108,7 +109,7 @@
"last 2 Firefox versions"
],
"engines": {
"node": ">= 14.15.0",
"node": ">= 16.16.0",
"yarn": ">= 1.22.0"
}
}
2 changes: 1 addition & 1 deletion ui/core/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<script>
import baseApp from './baseApp'
import Blocker from './components/Blocker'
import Blocker from './components/Blocker.vue'

export default {
components: { Blocker },
Expand Down
1 change: 0 additions & 1 deletion ui/core/src/DocumentApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
</template>

<script>
// import SidebarUser from '@/views/appDependentComponents/SidebarUser'
import baseApp from './baseApp'
import Blocker from './components/Blocker'

Expand Down
4 changes: 2 additions & 2 deletions ui/core/src/FrontendApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
</template>

<script>
import FrontendNavbar from '@/components/frontend/FrontendNavbar'
import FrontendNavbar from '@/components/frontend/FrontendNavbar.vue'
import _ from 'lodash'
import baseApp from './baseApp'
import Blocker from './components/Blocker'
import Blocker from './components/Blocker.vue'

export default {
mixins: [baseApp],
Expand Down
4 changes: 2 additions & 2 deletions ui/core/src/assets/styles/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/_functions.scss";
@import "variables.scss";
@import "~bootstrap/scss/bootstrap";
@import "~bootstrap/scss/bootstrap.scss";
@import "fonts.scss";
@import "buttons.scss";
@import "nav-tabs";
Expand Down
4 changes: 2 additions & 2 deletions ui/core/src/assets/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/mixins";
@import "~bootstrap/scss/_functions.scss";
@import "~bootstrap/scss/_mixins.scss";

// Variables
//
Expand Down
2 changes: 1 addition & 1 deletion ui/core/src/components/ChangeProfilePhoto.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<script>
import VueCropper from 'vue-cropperjs'
import FileDropBox from './template/FileDropBox'
import FileDropBox from './template/FileDropBox.vue'
import mafdc from '@/mixinApp'

export default {
Expand Down
6 changes: 3 additions & 3 deletions ui/core/src/components/ChangeProfilePhotoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</template>

<script>
import bModal from 'bootstrap-vue/es/components/modal/modal'
import bModalDirective from 'bootstrap-vue/es/directives/modal/modal'
// import bModal from 'bootstrap-vue/es/components/modal/modal'
// import bModalDirective from 'bootstrap-vue/es/directives/modal/modal'
import mafdc from '@/mixinApp'
import ChangeProfilePhoto from './ChangeProfilePhoto'
import ChangeProfilePhoto from './ChangeProfilePhoto.vue'

export default {
mixins: [mafdc],
Expand Down
10 changes: 5 additions & 5 deletions ui/core/src/components/ImportExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@

<script>
import mafdc from '@/mixinApp'
import ImexResults from '../components/ImexResults'
import Checkbox from '../components/Checkbox'
import ImportOnly from './ImportOnly'
import NavTabs from '@/components/nav-tabs/NavTabs'
import Tab from '@/components/nav-tabs/Tab'
import ImexResults from '@/components/ImexResults.vue'
import Checkbox from '@/components/Checkbox.vue'
import ImportOnly from './ImportOnly.vue'
import NavTabs from '@/components/nav-tabs/NavTabs.vue'
import Tab from '@/components/nav-tabs/Tab.vue'

export default {
mixins: [mafdc],
Expand Down
Loading