17db59e27a
This is insane but the problem was caused by the old apollo-client dependency which is 3 years old. The error was coming from ts-invariant code here https://github.com/apollographql/invariant-packages/blob/master/packages/ts-invariant/src/invariant.ts#L64 By this change I updated our app to use new @apollo/client dependency but there is one pretty big concern. This lib has react as a peer dependency (what?!) so to avoid adding react to our vue project I had to import needed functionality from @apollo/client/core instead of just @apollo/client. There is a discussion here https://github.com/apollographql/apollo-client/issues/7318 According to this ^ apollo team are going to remove react from their peer dependecies list when apollo V4 will be launched. See https://github.com/apollographql/apollo-client/issues/8190 That's another point why we should move away from using graphql entirely or at least stop using apollo. Issue: https://github.com/storj/storj/issues/5371 Change-Id: Ifd484efbcd9e99d8c2e21d0dab93670c9358e25c |
||
---|---|---|
.. | ||
scripts | ||
src | ||
static | ||
tests/unit | ||
.env | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.stylelintignore | ||
.stylelintrc.js | ||
build-if-changed.sh | ||
build.sh | ||
index.html | ||
jest.config.js | ||
jest.setup.ts | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
vue.config.js |
storj-dev-panel
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Run your unit tests
npm run test:unit
Build docker container
From root of the repository, run:
make satellite-ui-image
Run docker container
docker run -p 8080:8080 storjlabs/satellite-ui:latest
1. Project structure:
- src folder: contains main project components such as api, store, router, etc.
- static folder: contains all project static resources such as images, fonts, pages.
- tests folder: - contains project unit tests.
- configuration files.
src
- api folder: contains API for project modules such as auth, project, etc. We are using both GraphQL and HTTP implementations.
- components folder: contains hierarchy of vue single file components sorted thematically.
- router folder: contains project browser locations structure file.
- store folder: contains global state management file broken into modules.
- types folder: contains project classes and types.
- utils folder: contains constants, plugins and utility files for formatting, validation, data transferring, etc.
- views folder: same as components, but for root ones.
- App.vue root project component.
- main.ts Vue instance initialization file. Here filters and declarations are placed. Also plugins, store and router are connecting to Vue instance.
static
- activation folder: contains page template that appears after account verification via email.
- emails folder: contains all emails templates.
- errors folder: contains 50x and 40x error pages templates.
- fonts folder: contains Inter font sets in ttf format.
- images folder: contains illustrations.
- reports folder: contains usage report table template.
tests
- unit folder: contains project unit tests.
Configuration files
- .env: file for environment level variables.
- .gitignore: folders, files and extensions which are ignored for git.
- babel.config.js: babel configuration for javascript transcompilation.
- index.html: DOM entry point.
- jestSetup.ts: jest configuration for unit testing.
- package.json: file holds various metadata relevant to the project such as version, dependencies, scripts and configurations.
- tsconfig.json: holds TypeScript configurations.
- tslint.json: holds TypeScript linter configurations.
- vue.config.js: holds Vue configurations.