diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml
new file mode 100644
index 0000000..ceceaba
--- /dev/null
+++ b/.github/workflows/build-web.yml
@@ -0,0 +1,119 @@
+name: Build & Publish Web App
+
+on:
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+env:
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
+
+jobs:
+ check-branch:
+ name: Validate Branch
+ runs-on: ubuntu-latest
+ steps:
+ - name: Assert development branch
+ run: |
+ echo "Triggered branch: ${{ github.ref_name }}"
+ if [ "${{ github.ref_name }}" != "development" ]; then
+ echo "Error: This workflow can only be manually run on the 'development' branch."
+ exit 1
+ fi
+
+ build-web:
+ name: Build Web App
+ needs: check-branch
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+ with:
+ token: ${{ secrets.PA_TOKEN }}
+ fetch-depth: 0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 20
+
+ - name: Enable Corepack
+ run: corepack enable
+
+ - name: Install Dependencies
+ run: yarn install --immutable
+
+ - name: Build Web App
+ run: yarn build
+ env:
+ REACT_APP_GOOGLE_CLIENT_ID: ${{ secrets.REACT_APP_GOOGLE_CLIENT_ID }}
+
+ - name: Upload Web Build Artifacts
+ uses: actions/upload-artifact@v7
+ with:
+ name: web-build-frontend
+ path: build/
+ retention-days: 1
+
+ release-web:
+ name: Release Web App
+ needs: build-web
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+ with:
+ token: ${{ secrets.PA_TOKEN }}
+ fetch-depth: 0
+
+ - name: Conventional Changelog Action
+ id: changelog
+ uses: TriPSs/conventional-changelog-action@latest
+ with:
+ github-token: ${{ secrets.PA_TOKEN }}
+ git-user-name: 'GrowBoard Bot'
+ output-file: false
+ version-file: 'package.json'
+ git-path: '.'
+ tag-prefix: 'v'
+ skip-on-empty: 'false'
+
+ - name: Download Web Build Artifacts
+ if: ${{ steps.changelog.outputs.skipped == 'false' }}
+ uses: actions/download-artifact@v7
+ with:
+ name: web-build-frontend
+ path: build/
+
+ - name: Zip Build Artifacts
+ if: ${{ steps.changelog.outputs.skipped == 'false' }}
+ run: |
+ cd build
+ zip -r ../web-build.zip .
+ cd ..
+
+ - name: Create GitHub Release
+ uses: softprops/action-gh-release@v4
+ if: ${{ steps.changelog.outputs.skipped == 'false' }}
+ with:
+ tag_name: ${{ steps.changelog.outputs.tag }}
+ name: ${{ steps.changelog.outputs.tag }}
+ body: ${{ steps.changelog.outputs.clean_changelog }}
+ files: web-build.zip
+ draft: false
+ prerelease: false
+ env:
+ GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
+
+ - name: 📂 Sync files
+ if: ${{ steps.changelog.outputs.skipped == 'false' }}
+ uses: SamKirkland/FTP-Deploy-Action@v4.3.5
+ with:
+ server: ${{ secrets.MAC_AMITRAIKWAR_FTP_SERVER }}
+ username: ${{ secrets.MAC_AMITRAIKWAR_FTP_ACCOUNT }}
+ password: ${{ secrets.MAC_AMITRAIKWAR_FTP_PASSWORD }}
+ local-dir: build/
+ server-dir: ./
diff --git a/.github/workflows/ci-web.yml b/.github/workflows/ci-web.yml
new file mode 100644
index 0000000..ce68202
--- /dev/null
+++ b/.github/workflows/ci-web.yml
@@ -0,0 +1,52 @@
+name: Web CI
+
+on:
+ push:
+ branches:
+ - development
+ paths:
+ - 'src/**'
+ - 'public/**'
+ - 'package.json'
+ - 'yarn.lock'
+ - '.github/workflows/ci-web.yml'
+ pull_request:
+ branches:
+ - development
+ paths:
+ - 'src/**'
+ - 'public/**'
+ - 'package.json'
+ - 'yarn.lock'
+ - '.github/workflows/ci-web.yml'
+
+env:
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
+
+jobs:
+ web-ci:
+ name: Lint, Build and Test Web
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 20
+
+ - name: Enable Corepack
+ run: corepack enable
+
+ - name: Install Dependencies
+ run: yarn install --immutable
+
+ - name: Lint
+ run: yarn lint
+
+ - name: Build
+ run: yarn build
+
+ - name: Test
+ run: yarn test --watchAll=false --passWithNoTests
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
deleted file mode 100644
index 7127a41..0000000
--- a/.github/workflows/deploy.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Deploy job
-
-on:
- release:
- types: [published]
-
-jobs:
- setup_and_deploy:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [20.x]
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- - name: Install Dependencies
- run: yarn install
- - name: Build
- run: yarn build --if-present
- - name: 📂 Sync files
- uses: SamKirkland/FTP-Deploy-Action@v4.3.5
- with:
- server: ${{ secrets.MAC_AMITRAIKWAR_FTP_SERVER }}
- username: ${{ secrets.MAC_AMITRAIKWAR_FTP_ACCOUNT }}
- password: ${{ secrets.MAC_AMITRAIKWAR_FTP_PASSWORD }}
- local-dir: ./build/
- server-dir: ./
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 43c09d8..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Build
-
-on:
- push:
- branches: ['development']
- pull_request:
- branches: ['development', 'production']
-
-jobs:
- build_test_lint:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [20.x]
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- - name: Install Dependencies
- run: yarn install
- - name: Build
- run: yarn build --if-present
- - name: Linting
- run: yarn lint
- - name: Test
- run: yarn test:cov
- - name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v4.0.1
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 51199c1..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Releases
-on:
- push:
- branches:
- - production
-
-permissions:
- contents: write
-
-jobs:
- release:
- runs-on: ubuntu-latest
- steps:
- - name: checkout
- uses: actions/checkout@v4
- with:
- token: ${{ secrets.PA_TOKEN }}
- - name: conventional changelog action
- id: changelog
- # https://github.com/TriPSs/conventional-changelog-action
- uses: TriPSs/conventional-changelog-action@latest
- with:
- # you can also create separate token to trace action
- github-token: '${{ secrets.PA_TOKEN }}'
- git-user-name: 'AR mac Bot'
- output-file: false
- - name: create release
- # https://github.com/actions/create-release
- uses: softprops/action-gh-release@v1
- if: ${{steps.changelog.outputs.skipped == 'false'}}
- env:
- # This token is provided by Actions, you do not need to create your own token
- GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
- with:
- tag_name: ${{ steps.changelog.outputs.tag }}
- name: ${{ steps.changelog.outputs.tag }}
- body: ${{steps.changelog.outputs.clean_changelog}}
- draft: false
- prerelease: false
diff --git a/.yarnrc.yml b/.yarnrc.yml
index 063ed60..9336184 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -1,8 +1,18 @@
approvedGitRepositories:
- - "**"
+ - '**'
+
+cacheFolder: ./node_modules/.yarn/cache
enableScripts: true
+installStatePath: ./node_modules/.yarn/install-state.gz
+
nodeLinker: node-modules
npmMinimalAgeGate: 0
+
+patchFolder: ./node_modules/.yarn/patches
+
+pnpUnpluggedFolder: ./node_modules/.yarn/unplugged
+
+virtualFolder: ./node_modules/.yarn/__virtual__
diff --git a/jest.config.js b/jest.config.js
index 2fc9b16..53ad8f6 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -24,8 +24,8 @@ module.exports = {
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
moduleDirectories: ['node_modules'],
moduleNameMapper: {
- '@assets': '
- x
-
+
+
- x
-
+
+
- x
-
+
+
+ View
+
- Selection
-
- Run -
- -- Terminal -
- -- Help -
- -+ Help +
+ ++ View +
+ +- Selection -
- -+ Go +
+ +- View -
- -+ Window +
+ +- Go -
- -- Run -
- -- Terminal -
- -- Help -
- -+ Help +
+ ++ View +
+ +- View -
- -+ Window +
+ ++ Amit Raikwar +
+ ++ Focus +
+
-
-
- Help
-
+ Pune ↗ +
++ 23° +
++ Mostly Cloudy +
++ H:29° L:22° +
++ Cupertino +
++ Yesterday +
++ -12:30 +
++ Tokyo +
++ Today +
++ +3:30 +
++ Sydney +
++ Today +
++ +4:30 +
++ Paris +
++ Yesterday +
++ -3:30 +
+- Amit Raikwar -
- - ++ View +
+ +- Selection -
- -+ Amit Raikwar +
+ +- Dark mode -
-- Off -
-+ Focus +
+- Night Shift + Display
+ +- Off + Sound
+- True Tone -
-- Off -
- Amit Raikwar -
- + Thu May 14 11:01 AM ++ Cupertino +
++ Yesterday +
++ -12:30 +
+ ++ Tokyo +
++ Today +
++ +3:30 +
++ Sydney +
++ Today +
++ +4:30 +
++ Paris +
++ Yesterday +
++ -3:30 +
+