feat(monorepo): migrated to turbo repo + pnpm
@ -1,56 +0,0 @@
|
||||
name: Test and deploy Client
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- packages/client/**
|
||||
- .github/workflows/deploy-client.yml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test client
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "16.x"
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install NPM dependencies
|
||||
working-directory: ./packages/client
|
||||
run: yarn install
|
||||
|
||||
- name: Lint source
|
||||
working-directory: ./packages/client
|
||||
run: yarn lint
|
||||
|
||||
- name: Build client
|
||||
working-directory: ./packages/client
|
||||
run: yarn run build
|
||||
|
||||
- name: Check size
|
||||
working-directory: ./packages/client
|
||||
run: yarn run size
|
||||
|
||||
docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build and push to Docker hub
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-client
|
||||
context: packages/client
|
||||
platforms: linux/amd64,linux/arm64
|
@ -0,0 +1,84 @@
|
||||
name: Test and deploy Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- apps/server/**
|
||||
- .github/workflows/deploy-commit.yml
|
||||
- Dockerfile
|
||||
- entrypoint.sh
|
||||
- nginx/**
|
||||
- .dockerignore
|
||||
- apps/**
|
||||
- packages/**
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test server
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "12.x"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Run full suite
|
||||
run: pnpm run deploy
|
||||
|
||||
docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build base image
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: dust-mail/base
|
||||
push: false
|
||||
context: .
|
||||
file: Dockerfile.base
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Build server image
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-server
|
||||
context: .
|
||||
file: apps/server/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Build client image
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-client
|
||||
context: .
|
||||
file: apps/client/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
- name: Build standalone image
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-standalone
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
@ -1,58 +0,0 @@
|
||||
name: Test and deploy Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- packages/server/**
|
||||
- .github/workflows/deploy-server.yml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test server
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "12.x"
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install NPM dependencies
|
||||
working-directory: ./packages/server
|
||||
run: yarn install
|
||||
|
||||
- name: Lint source
|
||||
working-directory: ./packages/server
|
||||
run: yarn run lint
|
||||
|
||||
- name: Build server
|
||||
working-directory: ./packages/server
|
||||
run: yarn run build
|
||||
|
||||
# - name: Run normal tests
|
||||
# run: yarn --cwd packages/server run test
|
||||
|
||||
# - name: Run end-to-end tests
|
||||
# run: yarn --cwd packages/server run test:e2e
|
||||
|
||||
docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build and push to Docker hub
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-server
|
||||
context: packages/server
|
||||
platforms: linux/amd64,linux/arm64
|
@ -1,30 +0,0 @@
|
||||
name: Deploy Standalone
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/deploy-standalone.yml
|
||||
- Dockerfile
|
||||
- entrypoint.sh
|
||||
- nginx/**
|
||||
- .dockerignore
|
||||
- packages/server/**
|
||||
- packages/client/**
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build and push to Docker hub
|
||||
uses: guusvanmeerveld/actions/docker@main
|
||||
with:
|
||||
username: guusvanmeerveld
|
||||
token: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
tags: guusvanmeerveld/dust-mail:git-standalone
|
||||
platforms: linux/amd64,linux/arm64
|
@ -1,34 +0,0 @@
|
||||
name: Publish Mail-Discover package to NPM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/release-discover.yml
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup NodeJS v12
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn --cwd packages/mail-discover install
|
||||
|
||||
- name: Build package
|
||||
run: yarn --cwd packages/mail-discover build
|
||||
|
||||
- name: Publish package
|
||||
run: yarn --cwd packages/mail-discover publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
@ -1,32 +0,0 @@
|
||||
name: Mail-Discover Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- packages/mail-discover/**
|
||||
- .github/workflows/test-discover.yml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run tests
|
||||
steps:
|
||||
- name: Setup Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup NodeJS v12
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn --cwd packages/mail-discover install
|
||||
|
||||
- name: Build package
|
||||
run: yarn --cwd packages/mail-discover run build
|
||||
|
||||
- name: Run tests
|
||||
run: yarn --cwd packages/mail-discover run test
|
@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
dist
|
||||
.turbo
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
yarn --cwd packages/client run lint
|
||||
yarn --cwd packages/server run lint
|
||||
pnpm run lint
|
@ -0,0 +1,23 @@
|
||||
ARG BASE_IMAGE=node:16-alpine
|
||||
|
||||
# Builder
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
RUN apk add --no-cache curl git
|
||||
|
||||
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
|
||||
|
||||
WORKDIR /repo
|
||||
|
||||
COPY pnpm-lock.yaml ./
|
||||
|
||||
RUN pnpm fetch
|
||||
|
||||
COPY apps ./apps
|
||||
COPY packages ./packages
|
||||
|
||||
COPY package.json pnpm-workspace.yaml .npmrc turbo.json ./
|
||||
|
||||
RUN pnpm install -r --offline --ignore-scripts
|
||||
|
||||
RUN pnpm run build
|
@ -0,0 +1,11 @@
|
||||
FROM dust-mail/base as deployer
|
||||
|
||||
WORKDIR /repo
|
||||
|
||||
RUN pnpm --filter @dust-mail/client --prod deploy /app
|
||||
|
||||
FROM nginx:alpine AS runner
|
||||
|
||||
COPY --from=deployer /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 1019 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -1,8 +1,8 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"build": {
|
||||
"beforeBuildCommand": "yarn build",
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"devPath": "http://localhost:3000/",
|
||||
"distDir": "../dist",
|
||||
"withGlobalTauri": true
|
@ -1,12 +1,10 @@
|
||||
import useLocalStorageState from "use-local-storage-state";
|
||||
|
||||
import { FunctionalComponent } from "preact";
|
||||
|
||||
import { ChangeEvent } from "preact/compat";
|
||||
import { ChangeEvent, FC } from "react";
|
||||
|
||||
import Switch from "@mui/material/Switch";
|
||||
|
||||
const DarkModeSwitch: FunctionalComponent = () => {
|
||||
const DarkModeSwitch: FC = () => {
|
||||
const [darkMode, setDarkMode] = useLocalStorageState<boolean>("darkMode");
|
||||
|
||||
const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {
|
@ -1,13 +1,13 @@
|
||||
import Loading from "./Loading";
|
||||
|
||||
import { FunctionComponent } from "preact";
|
||||
import { FC, ReactNode } from "react";
|
||||
|
||||
import About from "@components/About";
|
||||
import MessageComposer from "@components/Message/Composer";
|
||||
import Navbar from "@components/Navbar";
|
||||
import Settings from "@components/Settings";
|
||||
|
||||
const Layout: FunctionComponent<{ withNavbar?: boolean }> = ({
|
||||
const Layout: FC<{ withNavbar?: boolean; children?: ReactNode }> = ({
|
||||
children,
|
||||
withNavbar
|
||||
}) => {
|
@ -1,11 +1,11 @@
|
||||
import { FunctionalComponent } from "preact";
|
||||
import { FC } from "react";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
|
||||
import useStore from "@utils/hooks/useStore";
|
||||
|
||||
const Loading: FunctionalComponent = () => {
|
||||
const Loading: FC = () => {
|
||||
const fetching = useStore((state) => state.fetching);
|
||||
|
||||
if (fetching)
|
@ -1,9 +1,7 @@
|
||||
import { useInfiniteQuery } from "react-query";
|
||||
|
||||
import { FunctionalComponent } from "preact";
|
||||
import useLocalStorageState from "use-local-storage-state";
|
||||
|
||||
import { memo } from "preact/compat";
|
||||
import { useEffect, useRef, useState } from "preact/hooks";
|
||||
import { useEffect, useRef, useState, memo, FC } from "react";
|
||||
import { useInfiniteQuery } from "react-query";
|
||||
|
||||
import { AxiosError } from "axios";
|
||||