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

storage refactoring #41

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
827472e
chore: init sqlite database
notmedia Dec 14, 2022
39d186b
chore: init splash screen
notmedia Dec 17, 2022
7d6376f
chore: update splash styles
notmedia Dec 17, 2022
bb90a5c
chore: update splash screen text while loading
notmedia Dec 17, 2022
0c2637f
chore: added migrations logic, run them on app strat
notmedia Dec 18, 2022
9158bfe
chore: update migration and settings entity
notmedia Dec 19, 2022
da5a484
chore: add test database bindings
notmedia Dec 19, 2022
d267759
chore: moved theme settings to new store
notmedia Dec 21, 2022
976ea75
chore: add types for store, some refactor
notmedia Dec 22, 2022
64f35c1
chore: migrate settings storage to sqlite
notmedia Dec 22, 2022
9aed6c8
chore: update settings state interface
notmedia Dec 22, 2022
c20c234
chore: migrate environments storage to sqlite
notmedia Dec 23, 2022
2cef9cf
chore: fixed typos
notmedia Dec 23, 2022
62c6ffb
chore: migrate tls-presets storage to sqlite
notmedia Dec 23, 2022
d89821c
chore: fixes
notmedia Dec 23, 2022
6762d8c
chore: update dependencies
notmedia Dec 23, 2022
986cc1d
chore: fixed tls-preset remove
notmedia Dec 23, 2022
253d151
chore: init collection and service entities
notmedia Dec 25, 2022
942c495
chore: add methods
notmedia Dec 26, 2022
d57277d
chore: update dependencies
notmedia Dec 26, 2022
a156228
feat: migrate to vite
notmedia Jan 4, 2023
a898b5e
chore: fixed icons, style loading
notmedia Jan 4, 2023
3805f22
feat: show error on startup if something went wrong
notmedia Jan 8, 2023
1c663af
chore: add DEVELOPMENT.md
notmedia Jan 8, 2023
05b5fcf
chore: fix typo in development.md
notmedia Jan 8, 2023
35a04fb
chore: codacity fixes
notmedia Jan 8, 2023
054dccb
chore: codacy fix
notmedia Jan 8, 2023
239f449
chore: update buttons
notmedia Jan 8, 2023
dca71cf
chore: update electron builder config
notmedia Jan 8, 2023
05d68fa
chore: add mapper for settings and tls-presets
notmedia Jan 11, 2023
6da71f3
chore: fix jest config
notmedia Jan 11, 2023
d3f496d
chore: add mappings for envrionments, add collection, service and method
notmedia Jan 13, 2023
bcbc23b
Merge branch 'master' into feature/storage-refactoring
notmedia Jan 16, 2023
982eae5
Merge branch 'master' into feature/storage-refactoring
notmedia Jan 17, 2023
7c6e23e
chore: init new collection classes
notmedia Jan 18, 2023
aabda2d
chore: update docs
notmedia Feb 6, 2023
95cf5bb
Merge branch 'master' into feature/storage-refactoring
notmedia Feb 6, 2023
f74e5e9
feat: add @getezy/grpc-client package
notmedia Feb 14, 2023
3b9f566
chore: some updates
notmedia Feb 17, 2023
c881de9
chore: update core entities
notmedia Feb 18, 2023
c573733
chore: update core entities
notmedia Feb 18, 2023
f9b37d7
chore: init new tabs entity
notmedia Feb 22, 2023
f6ff250
chore: init tabs
notmedia Mar 16, 2023
989de47
chore: update dependencies
notmedia Mar 16, 2023
85cfa05
chore: some fixes
notmedia Mar 27, 2023
2b68adc
chore: some tunes
notmedia Mar 28, 2023
7f9a671
chore: add boundned app storage
notmedia Mar 28, 2023
e689d41
chore: tls
notmedia Apr 7, 2023
d946e94
chore: setup vite for grpc-client
notmedia Apr 12, 2023
f53dad0
chore: update vite config
notmedia Apr 12, 2023
d301029
Some work
notmedia May 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
12 changes: 4 additions & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
.eslintrc.js
commitlint.config.js
webpack.main.config.js
webpack.plugins.js
webpack.renderer.config.js
webpack.rules.js
wallaby.js
node_modules/**/*
node_modules
dist
out
.gitignore
80 changes: 45 additions & 35 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './__tests__/simple-service/tsconfig.json', './__tests__/tls-service/tsconfig.json']
},
plugins: [
'simple-import-sort',
'prettier'
],
extends: [
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:import/electron',
'prettier',
'plugin:storybook/recommended'
],
root: true,
env: {
browser: true,
commonjs: true,
es6: true,
node: true
node: true,
},
rules: {
'prettier/prettier': ['error', {
printWidth: 100,
singleQuote: true,
trailingComma: 'es5'
}],

'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
parser: '@typescript-eslint/parser',
parserOptions: {
project: [
'tsconfig.node.json',
'tsconfig.app.json',
'tsconfig.splash-screen.json',
'./migrations/tsconfig.json',
'./tests/grpc-services/simple-service/tsconfig.json',
'./tests/grpc-services/tls-service/tsconfig.json',
],
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
ecmaVersion: 2021,
},

plugins: ['simple-import-sort', 'prettier'],
extends: ['airbnb', 'airbnb/hooks', 'airbnb-typescript', 'plugin:import/electron', 'prettier'],
rules: {
'prettier/prettier': [
'error',
{
'devDependencies': [
'**/*.stories.*',
'**/.storybook/**/*.*'
],
'peerDependencies': true
}
semi: true,
tabWidth: 2,
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
},
],

'no-plusplus': 'off',

'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'error',

'react/prop-types': 'off',
'react/function-component-definition': 'off',
'react/require-default-props': 'off',
Expand All @@ -48,9 +52,15 @@ module.exports = {

'simple-import-sort/imports': [
'error',
{ 'groups': [['^\\u0000'], ['^[^.]'], ['^@(context|hooks|layouts|components|storage|core|core/types)'], ['^\\.'], ['^.+\\.s?css$']] }
{
groups: [
['^\\u0000'],
['^[^.]'],
['^@(core|main|components|themes|hooks|new-storage|storage|context|layouts|api)'],
['^\\.'],
['^.+\\.s?css$'],
],
},
],

'no-plusplus': 'off'
}
},
};
85 changes: 49 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,83 @@ on:
pull_request:

jobs:
checks:
uses: "./.github/workflows/checks.yml"
prebuild:
uses: "./.github/workflows/prebuild.yml"
build:
needs: checks
needs: prebuild
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Build for supported platforms
# https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
# 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
os: [ macOS-latest, ubuntu-20.04, windows-latest ]
os: [ macOS-latest, ubuntu-latest, windows-latest ]
arch: [ x64, arm64 ]
include:
- os: windows-latest
arch: ia32
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
# The ubuntu-latest label is currently transitioning to the Ubuntu 22.04 runner image.
# During the transition, the label might refer to the runner image for either Ubuntu 20.04 or 22.04.
# https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/
- os: ubuntu-20.04
- os: ubuntu-latest
arch: armv7l
# Publishing artifacts for multiple Windows architectures has
# a bug which can cause the wrong architecture to be downloaded
# for an update, so until that is fixed, only build Windows x64
exclude:
- os: windows-latest
arch: arm64

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3.4.1
uses: actions/setup-node@v3.5.1
with:
node-version: 18.x
cache: npm

- name: Install dependencies
run: npm ci
env:
DEBUG: electron-builder

- name: Set MacOS signing certs
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macOS-latest' && startsWith(github.ref, 'refs/tags/')
run: chmod +x scripts/add-osx-cert.sh && ./scripts/add-osx-cert.sh
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
# - name: Set Windows signing certificate
# if: matrix.os == 'windows-latest'
# continue-on-error: true
# id: write_file
# uses: timheuer/base64-to-file@v1
# with:
# fileName: 'win-certificate.pfx'
# encodedString: ${{ secrets.WINDOWS_CODESIGN_P12 }}
- name: Install dependencies
run: npm ci

- name: Make
if: startsWith(github.ref, 'refs/tags/')
run: npm run make -- --arch=${{ matrix.arch }}
- name: Make MacOS build
if: matrix.os == 'macOS-latest'
run: npm run build:mac -- --${{ matrix.arch }}
env:
OS: macOS
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }}
# WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
DISABLE_SIGN_AND_NOTARIZE: ${{ !startsWith(github.ref, 'refs/tags/') }}

- name: Make Windows build
if: matrix.os == 'windows-latest'
run: npm run build:win -- --${{ matrix.arch }}
env:
OS: windows

- name: Make Linux build
if: matrix.os == 'ubuntu-latest'
run: npm run build:linux -- --${{ matrix.arch }}
env:
OS: linux

- name: Upload Build Artifacts
if: github.event_name == 'pull_request'
uses: actions/[email protected]
with:
name: Builds
path: |
release/**/*.dmg
release/**/*.exe
release/**/*.AppImage
release/**/*.deb
release/**/*.rpm
retention-days: 7

- name: Release
uses: softprops/action-gh-release@v1
Expand All @@ -78,10 +93,8 @@ jobs:
with:
draft: true
files: |
out/**/*.deb
out/**/*.dmg
out/**/*setup*.exe
out/**/*.nupkg
out/**/*.rpm
out/**/*.zip
out/**/RELEASES
release/**/*.dmg
release/**/*.exe
release/**/*.AppImage
release/**/*.deb
release/**/*.rpm
20 changes: 9 additions & 11 deletions .github/workflows/checks.yml → .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: Test & Lint
name: Prebuild

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_call:

jobs:
lint:
prebuild:
name: Prebuild
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -19,16 +14,19 @@ jobs:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v3.5.1
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: lint
- name: Lint
run: npm run lint

- name: test
- name: Typecheck
run: npm run typecheck

- name: Test
run: npm run test
59 changes: 8 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
node_modules
dist
out
release
coverage
*.lcov

# nyc test coverage
.nyc_output

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Webpack
.webpack/
*.log*
.DS_Store

# Electron-Forge
out/
# Application specific
ezy.db
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint && npm run test
npm run lint && npm run typecheck && npm run test
4 changes: 3 additions & 1 deletion .ncurc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
reject: [
]
// Type errors on 6.3.0
'@fortawesome/free-solid-svg-icons',
],
};
15 changes: 0 additions & 15 deletions .storybook/main.js

This file was deleted.

6 changes: 0 additions & 6 deletions .storybook/manager.js

This file was deleted.

Loading