Skip to content

Commit

Permalink
Merge pull request #124 from aaronleopold/develop
Browse files Browse the repository at this point in the history
chore: update main with latest develop
  • Loading branch information
aaronleopold authored Apr 23, 2023
2 parents bb67ec2 + 8960e4f commit 62c1fd1
Show file tree
Hide file tree
Showing 525 changed files with 33,475 additions and 13,212 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.{json,yaml,yml}]
indent_style = tab
indent_size = 2
max_line_length = 100
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ node_modules/
*.snap
**/prisma/src/db.ts
**/prisma-cli/**
**/dist/**
**/dist/**
**/target/**
.moon/
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ignore markdown files, there's just gonna be so many of them lol
*.md linguist-detectable=false
# ignore json files, as languages get added there will be *way* too many
*.json linguist-detectable=false
# ignore sql files, migrations get added there will be *way* too many
*.sql linguist-detectable=false

# I don't want docs website to be included in language stats
apps/docs/** linguist-vendored
6 changes: 4 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

# FIXME: vars.SUPPORTED_PR_DOCKER_PLATFORMS and vars.SUPPORTED_DOCKER_PLATFORMS
# suddenly doesn't work anymore??? super annoying...
# On PRs, we will only load the image into docker for the quickest platform
# (i.e. linux/amd64). This is mostly a smoke test, just rather ignorant verification
# that the image can be built. On pushes, we will actually build and push for
Expand All @@ -37,9 +39,9 @@ jobs:
echo "PUSH=${{ github.event_name == 'push' }}" >> $GITHUB_ENV
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "PLATFORMS=${{ vars.SUPPORTED_PR_DOCKER_PLATFORMS }}" >> $GITHUB_ENV
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
else
echo "PLATFORMS=${{ vars.SUPPORTED_DOCKER_PLATFORMS }}" >> $GITHUB_ENV
echo "PLATFORMS=linux/arm64/v8,linux/amd64" >> $GITHUB_ENV
fi
- name: Setup and build docker image
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ tmp/
umd/
node_modules/
target/
.next
.netlify
.pnpm-store
.vercel

# Custom
*.min.js
Expand Down
11 changes: 7 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# npx lint-staged
moon run :format
moon run :lint
# TODO: fix typecheck
npx lint-staged
#! damn moon kinda annoying me lately. So I added an .editorconfig
#! file so it would stop replacing tabs with spaces, but it still formats
#! config files (e.g. tsconfig) wrong...
#* https://moonrepo.dev/docs/faq#how-to-stop-moon-formatting-json-and-yaml-files
moon run :lint && pnpm prettify

# moon run :typecheck
# cargo clippy --all-targets --workspace -- -D warnings
26 changes: 24 additions & 2 deletions .moon/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ fileGroups:
- 'public/**/*'
- 'src/**/*'
- 'types/**/*'
# TODO: stop pulling dist from cache :weary:
# - '!**/dist'
typescript:
- 'public/**/*'
- 'src/**/*'
Expand All @@ -27,6 +29,11 @@ fileGroups:
- '**/*.{scss,css}'
- '**/*.{md,mdx}'

#! FIXME: for some god forsaken reason, I cannot for the life of me get the moon
#! prettier run to align with the config file... The biggest annoyance is for .json
#! files, it seems to not use hard tabs. Drives me wild.
#* https://moonrepo.dev/docs/guides/examples/prettier

tasks:
format:
command:
Expand All @@ -42,14 +49,29 @@ tasks:
- 'tests/**/*'
- '**/*.{md,mdx,yml,yaml,json}'
- '/.prettierignore'
- '/.prettierrc'
- '/prettier.config.js'

format-check:
command:
- 'prettier'
- '--config'
- '@in(4)'
- '--ignore-path'
- '@in(3)'
- '--check'
- '.'
inputs:
- 'src/**/*'
- 'tests/**/*'
- '**/*.{md,mdx,yml,yaml,json}'
- '/.prettierignore'
- '/prettier.config.js'

lint:
command:
- 'eslint'
- '--ext'
- '.ts,.tsx,.cts,.mts,.js,.jsx,.cjs,.mjs'
- '--fix'
- '--report-unused-disable-directives'
- '--no-error-on-unmatched-pattern'
- '--exit-on-fatal-error'
Expand Down
13 changes: 9 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.svelte-kit
# Files
core.ts
*-lock.*

# Directories
node_modules
.svelte-kit
target
dist
build
core.ts
dist
.moon/cache
.next
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

85 changes: 5 additions & 80 deletions .vscode/.todo
Original file line number Diff line number Diff line change
@@ -1,80 +1,5 @@
- [x] Consolidate some GH specific files to `.github`
- [x] Change `common` to `packages`
- [ ] Create `crates` with submodules for epub-rs?
- [ ] ESLint
- [x] Add the base configuration
- [ ] Fix ESLint errors after setup (expect a lot)
- [x] Add moon
- [x] Basic moon config/setup
- [x] Clean up all the `package.json` scripts
- [ ] Note: the scripts that interact with the FS directly are iffy with moon. I'll need to revisit those, so they will remain.
- [ ] Audit dependencies, prune where needed
- [ ] Fix all the peer dependency warnings
- [x] Nix?
- https://github.com/aaronleopold/stump/pull/86
- [ ] Reorganize and consolidate some of the `client` code, its _very_ messy
- [x] Split `api` into separate package to house all the axios functions
- [ ] Rework gross hooks + callback types
- [x] Remove the `stump.service` file from GH and just add section in docs with that content
- [x] Consolidate some of the config files
- [x] Looking at you messy tsconfigs
- [x] Migrate to Axum v0.6
- Rebase `axum-upgrade` branch once above chores completed
- https://github.com/tokio-rs/axum/releases/tag/axum-v0.6.0
- [ ] Look into sqlite session store at some point to replace the in memory store.
- [x] Move `prisma-cli` out of `core`?
- [ ] Refactor all queries to use more current select/include patterns
- https://prisma.brendonovich.dev/reading-data/select-include#many-relation-options
- [x] Change HTTP endpoints to be **unpaged** by default (except opds)
- [ ] Rethink HTTP endpoints allow better range of filter options
- [x] Basic structure implemented, just a matter of prioritizing it time permitting
- [ ] Rework `integration_tests` and add unit testing throughout
- Mock client inbound -> https://github.com/Brendonovich/prisma-client-rust/issues/230
- [ ] Look into better validation via https://github.com/Keats/validator
- [ ] Refactor UI sidebar and main container to support resizing via https://github.com/bvaughn/react-resizable-panels
- [ ] Either use the `optional_struct` dependency or look into https://github.com/Nukesor/inter-struct (or maybe both?)
- [ ] Refine Stump color palette (gray colors are :barf:)
- [ ] Start building out, but don't use quite yet, custom UI components in new package `components`
- [ ] https://github.com/shadcn/ui
- [ ] Get major UI sections completed to MVP stage:
- [ ] Homepage sections
- [x] Continue Reading, Recently Added, Etc.
- [ ] Statistics
- [ ] Book overview page
- [x] Show progress (if any)
- [ ] Show more series information
- [x] Next in series (using a new `cursor` page param?)
- [ ] Series overview section (on 0th page when browsing a series)
- [ ] Settings pages
- [ ] Remove all those `Loading...` placeholders
- [ ] For listviews, add a tooltip that shows some of the additional information on hover
- [x] Add redirects for unauthed access
- I.e. if I visit `/some-page/1`, and get redirected to `/auth`, should redirect instead with query params to restore state: `/auth?redirect=/some-page/1`
- [ ] Revisit RAR support with upcoming `0.5` unrar release -> https://github.com/muja/unrar.rs/issues/26
- [ ] Move off of custom `read_bytes` implementation
- [ ] Test bug after -> https://github.com/aaronleopold/stump/issues/38
- [ ] Finish implementing EPUB support
- [ ] Queries in `client`
- [ ] Lots of parsing in `core`
- [ ] Tracking progress
- [ ] Finish implementing Stump Readers:
- [ ] ImageBased
- [ ] Make toolbar **much** more performant, loading all those images lazily is terrible...
- [ ] AnimatedImageBased
- [ ] This was a PAIN IN THE ASS
- [ ] EPUB
- [ ] Tighten logging noise
- [ ] Revisit rework of `StumpConfig`
- [ ] Setup self hosted runner using gaming computer
- [ ] Finish GH workflows/actions
- [ ] Add some automated system for versioning/releases
- [ ] Once fully migrated off Chakra UI
- [ ] Finalize custom UI components
- [ ] Consider feature freeze and migrate over to SolidJS
- [ ] Add `Stump.toml` template and/or just list all the config options somewhere
- [ ] Fix `desktop-dev` command, it spawns a new window over and over :angry:
- [ ] Make light mode look not disgusting lmao
- [ ] ~Fix poor performance of EditLibraryModal~
- [ ] Just replace the modals with dedicated pages for editing and creating libraries
- [ ] `local-ip-address` check if release yoinked comes back okay
- [ ] cargo report future-incompatibilities --id 4 --package rustc-serialize@0.3.24
- [ ] remove prelude crate and put all the structs/enums/etc in corresponding files
- [ ] things only used in `apps/server` should be moved there, rather than living in `core`
- [ ] explore https://prisma.brendonovich.dev/extra/partial-types
- [ ] start documenting code better!!
- honestly it will be much easier I think 1. to maintain and 2. to onboard new contributors if everything and every decision is documented
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rust-lang.rust-analyzer",
"bradlc.vscode-tailwindcss",
"Gruntfuggly.todo-tree",
"mike-co.import-sorter"
"mike-co.import-sorter",
"aaron-bond.better-comments"
]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]]
"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]],
"tailwindCSS.classAttributes": ["class", "className", ".*CLASSES", ".*VARIANTS"],
"typescript.tsdk": "node_modules/typescript/lib",
"vue.features.codeActions.enable": false
}
Loading

0 comments on commit 62c1fd1

Please sign in to comment.