* add vitest
* initialize lib w/ tests
* move to dev dep
* run tests in CI
* update file names
* move api folder to lib
* move api and api types to same folder
* update generator outpath
* rm husky
* i guess i _did_ need those types
* reorg types
* extract validators into testable components
* (WIP) start composable testing
* fix import type
* fix linter complaint
* simplify icon type def
* fix linter errors (maybe?)
* rename client file for sorting
This PR does too many things :(
1. Major refactoring of the dev/scripts and dev/code-generation folders.
Primarily this was removing duplicate code and cleaning up some poorly written code snippets as well as making them more idempotent so then can be re-run over and over again but still maintain the same results. This is working on my machine, but I've been having problems in CI and comparing diffs so running generators in CI will have to wait.
2. Re-Implement using the generated api routes for testing
This was a _huge_ refactor that touched damn near every test file but now we have auto-generated typed routes with inline hints and it's used for nearly every test excluding a few that use classes for better parameterization. This should greatly reduce errors when writing new tests.
3. Minor Perf improvements for the All Recipes endpoint
A. Removed redundant loops
B. Uses orjson to do the encoding directly and returns a byte response instead of relying on the default
jsonable_encoder.
4. Fix some TS type errors that cropped up for seemingly no reason half way through the PR.
See this issue https://github.com/phillipdupuis/pydantic-to-typescript/issues/28
Basically, the generated TS type is not-correct since Pydantic will automatically fill in null fields. The resulting TS type is generated with a ? to indicate it can be null even though we _know_ that i can't be.
* Add pytesseract
* Add simple ocr endpoint
replace extension argument
* feat/ocr-editor gui
* fix frontend linting issues
* Add service unit tests
* Add split text modes & single ingredient/instruction editing
* make split mode really reactive
* Remove default step and ingredient
* make the linter haappy
* Accept only image uploads
* Add automatic recipe title suggestion
* Correct regex
* fix incorrect array.map method usage
* make the linter happy again
* Swap route to use asset name
* Rearange buttons
* fix test data
* feat: Allow making image the recipe image
* Add translation
* Make the linter happy
* Restrict function setPropertyValueByPath generic
* Restrict template literal type
* Add a more friendly icon to creation page
* update poetry lock file
* Correct sloppy ocr classes
* Make MyPy happy
* Rewrite safer tests
* Add tesseract to backend test CI container dependencies
* Make canvas element a component global
* Remove unwanted spaces in selected text
* Add way to know if recipe was created with ocr
* Access to ocr-editor for ocr recipes
* Update Alembic revision
* Make the frontend build
* Fix scrolling offset bug
* Allow creation of recipes with custom settings
* Fix rebasing mistakes
* Add format_tsv_output test
* Exclude the tests data directory only
* Enforce camelCase for frontend functions
* Remove import of unused component
* Fix type and class initialization
* Add multi-language support
* Highlight words in mount
* Fix image ratio bug
* Better ocr creation page
* Revert awkward feature to scroll in Selection mode
* Rebasing alembic migrations sux
* Remove obsolete getShared function
* Add function docstring
* Move down ocr creation option
* Make toolbar icons more generic
* Show help at the bottom of the page
* move ocr types to own file
* Use template ref for the canvas
* Use i18n.tc to get strings directly
* Correct naming mistake
* Move Ocr editor to own directory
* Create Ocr Editor parts
* Safeguard recipe properties access
* Add loading frontend animation due to longer request time
* minor cleanup chores
Co-authored-by: Miroito <alban.vachette@gmail.com>
Refactor recipe page to use break up the component and make it more usable across different pages. I've left the old route in as well in case there is some functional breaks, I plan to remove it before the official release once we've tested the new editor some more in production. For now there will just have to be some duplicate components and pages around.
* add data-types required for login security
* implement user lockout checking at login
* cleanup legacy patterns
* expose passwords in test_user
* test user lockout after bad attempts
* test user service
* bump alembic version
* save increment to database
* add locked_at to datetime transformer on import
* do proper test cleanup
* implement scheduled task
* spelling
* document env variables
* implement context manager for session
* use context manager
* implement reset script
* cleanup generator
* run generator
* implement API endpoint for resetting locked users
* add button to reset all locked users
* add info when account is locked
* use ignore instead of expect-error
rewrite get_all routes to use a pagination pattern to allow for better implementations of search, filter, and sorting on the frontend or by any client without fetching all the data. Additionally we added a CI check for running the Nuxt built to confirm that no TS errors were present. Finally, I had to remove the header support for the Shopping lists as the browser caching based off last_updated header was not allowing it to read recent updates due to how we're handling the updated_at property in the database with nested fields. This will have to be looked at in the future to reimplement. I'm unsure how many other routes have a similar issue.
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fix type errors on event bus
* webhooks fields required for new implementation
* db migration
* wip: webhook query + tests and stub function
* ignore type checker error
* type and method cleanup
* datetime and time utc validator
* update testing code for utc scheduled time
* fix file cmp function call
* update version_number
* add support for translating "time" objects when restoring backup
* bump recipe-scrapers
* use specific import syntax
* generate frontend types
* utilize names exports
* use utc times
* add task to scheduler
* implement new scheduler functionality
* stub for type annotation
* implement meal-plan data getter
* add experimental banner
* add 'use-abbreviation' db column
* type generation
* add view and edit elements
* check for use_abbreviation to display
* fix: alembic version check
* test: add use_abbreviation prop tests
refactored signup flow for entire registration process. Utilized seed data option for optional seeding of Foods, Units, and Labels. Localized registration page.
* feat: import original keywords as tags
* remove cached env
* Update frontend api types
* fix: Issues with previous tag scraping implementation
* Update category handling in backend
* Update backend tests to include group_id
* Correct type check
* Update create-url interface
* Improve tag cleaner list support
* remove builtin name shadowing
* update type annotations
* test include tags scraper
* implement scaper context for optional data
* readd cache venv
* use continue instead of break
* remove test callback
Co-authored-by: Miroito <alban.vachette@gmail.com>
* add direction prop for icon position
* add support for require_all properties on cookbook
* update type annotations
* add and - or filter support
* update cookbook API
* generate types
* implement editor for additional options
* update version number
* feat: add api endpoints for volume check
* feat: add docker icon
* add size prop
* feat: add frontend UI for checking docker-volume
* update caddy to server validation file
* add more extensive documentation around setup req
* fix: wrong type on user id #1123
* spelling
* refactor: cleanup excessive function calls
* add utility type to hide Advanced items
* add default text
* fix#1115 and minor refactorings
* generate types
* hotfix: add validator to catch null vlaues
* migration: add public, tags, and tools
* generate frontend types
* add help icon
* start replacement for tool-tag-category selector
* add help icon utility
* use generator types
* add support for cookbook features
* add UI elements for cookbook features
* fix tests
* fix type error
* resolve file not found error and add constants
* add group stats and storage functionality
* generate new types
* add statistics and storage cap graphs
* fix: add loadFood query param #1103
* refactor to flex view
* fix disable button
* add backend env for restricting registration
* update state management
* add allow_signup to app info
* move allow_signup to backend only
* cleanup docker-compose
* potential darkmode fix
* fix missing variable
* add banner on login page
* use random bools for tests
* fix initial state bug
* fix state reset
* update naming
* refactor tests to use shared structure
* shorten names
* add tools test case
* refactor to support multi-tenant
* set group_id on creation
* initial refactor for multitenant tags/cats
* spelling
* additional test case for same valued resources
* fix recipe update tests
* apply indexes to foreign keys
* fix performance regressions
* handle unknown exception
* utility decorator for function debugging
* migrate recipe_id to UUID
* GUID for recipes
* remove unused import
* move image functions into package
* move utilities to packages dir
* update import
* linter
* image image and asset routes
* update assets and images to use UUIDs
* fix migration base
* image asset test coverage
* use ids for categories and tag crud functions
* refactor recipe organizer test suite to reduce duplication
* add uuid serlization utility
* organizer base router
* slug routes testing and fixes
* fix postgres error
* adopt UUIDs
* move tags, categories, and tools under "organizers" umbrella
* update composite label
* generate ts types
* fix import error
* update frontend types
* fix type errors
* fix postgres errors
* fix#978
* add null check for title validation
* add note in docs on multi-tenancy
* cleanup oversized buttons
* add get all by category function to reciep repos
* fix shopping-list can_merge logic
* use randomized data for testing
* add random getter to repository for meal-planner
* add stub route for random meals
* cleanup global namespace
* add rules database type
* fix type
* add plan rules schema
* test plan rules methods
* add mealplan rules controller
* add new repository
* update frontend types
* formatting
* fix regression
* update autogenerated types
* add api class for mealplan rules
* add tests and fix bugs
* fix data returns
* proof of concept rules editor
* add tag support
* remove old group categories
* add tag support
* implement random by rules api
* change snack to sides
* remove incorrect typing
* split repo for custom methods
* fix query and use and_ clause
* use repo function
* remove old test
* update changelog
* generate types
* use generated types
* ui updates
* init button link for common styles
* add links
* setup label views
* add delete confirmation
* reset when not saved
* link label to foods and auto set when adding to shopping list
* generate types
* use inheritence to manage exception handling
* fix schema generation and add test for open_api generation
* add header to api docs
* move list consilidation to service
* split list and list items controller
* shopping list/list item tests - PARTIAL
* enable recipe add/remove in shopping lists
* generate types
* linting
* init global utility components
* update types and add list item api
* fix import cycle and database error
* add container and border classes
* new recipe list component
* fix tests
* breakout item editor
* refactor item editor
* update bulk actions
* update input / color contrast
* type generation
* refactor controller dependencies
* include food/unit editor
* remove console.logs
* fix and update type generation
* fix incorrect type for column
* fix postgres error
* fix delete by variable
* auto remove refs
* fix typo
* fix group page
* setup group notification for backend
* update type generators
* script to auto-generate schema exports
* setup frontend CRUD interface
* remove old notifications UI
* drop old events api
* add test functionality
* update naming for fields
* add event dispatcher functionality
* bump to python 3.10
* bump python version
* purge old event code
* use-async apprise
* set mealie logo as image
* unify styles for buttons rows
* add links to banners
* Activate more linting rules from eslint and typescript
* Properly add VForm as type information
* Fix usage of native types
* Fix more linting issues
* Rename vuetify types file, add VTooltip
* Fix some more typing problems
* Use composition API for more components
* Convert RecipeRating
* Convert RecipeNutrition
* Convert more components to composition API
* Fix globals plugin for type checking
* Add missing icon types
* Fix vuetify types in Nuxt context
* Use composition API for RecipeActionMenu
* Convert error.vue to composition API
* Convert RecipeContextMenu to composition API
* Use more composition API and type checking in recipe/create
* Convert AppButtonUpload to composition API
* Fix some type checking in RecipeContextMenu
* Remove unused components BaseAutoForm and BaseColorPicker
* Convert RecipeCategoryTagDialog to composition API
* Convert RecipeCardSection to composition API
* Convert RecipeCategoryTagSelector to composition API
* Properly import vuetify type definitions
* Convert BaseButton to composition API
* Convert AutoForm to composition API
* Remove unused requests API file
* Remove static routes from recipe API
* Fix more type errors
* Convert AppHeader to composition API, fixing some search bar focus problems
* Convert RecipeDialogSearch to composition API
* Update API types from pydantic models, handle undefined values
* Improve more typing problems
* Add types to other plugins
* Properly type the CRUD API access
* Fix typing of static image routes
* Fix more typing stuff
* Fix some more typing problems
* Turn off more rules
The problem was that on smaller screens or when resizing, v-navigation-drawer would change its value on its own, but these changes were not propagated to AppSidebar.
I also added a few missing type definitions for SidebarLinks.
* docs: 📝 general documentation + add FAQ page
* fix(frontend): 🐛 readd missing upload button to backups.
* feat(backend): ✨ add support for backup sizes to be displayed on frontend
* feat(backend): ✨ add backend for administrator CRUD of users
* add admin support for user
* refactor(frontend): ♻️ rewrite admin CRUD interface for admins
* fix build errors
Co-authored-by: hay-kot <hay-kot@pm.me>
* feat(frontend): ✨ add back support for assets
* feat(backend): ✨ add back support for assets
* feat(frontend): ✨ add support for recipe tools
* feat(backend): ✨ add support for recipe tools
* feat(frontend): ✨ add onHand support for recipe toosl
* feat(backend): ✨ add onHand support for backend
* refactor(frontend): ♻️ move items to recipe folder and break apart types
* feat(frontend): ✨ add support for recipe comments
* feat(backend): ✨ Add support for recipe comments
* fix(backend): 💥 disable comments import
* fix(frontend): 🐛 fix rendering issue with titles when moving steps
* add tools to changelog
* fix type errors
Co-authored-by: hay-kot <hay-kot@pm.me>
* move api clients and rename
* organize recipes composables
* rewrite useRecipeContext
* refactor(frontend): ♻️ abstract common ingredient functionality.
* feat(frontend): ✨ add scale, and back to recipe button + hide ingredients if none
* update regex to mach 11. instead of just 1.
* minor UX improvements
Co-authored-by: Hayden K <hay-kot@pm.me>
* feat(frontend): ✨ split paragraph by 1. 1) or 1: regex matches
* feat(frontend): ✨ Update frontend to support ingredient To step refs
* feat(backend): ✨ Update backend to support ingredient to step refs
* fix title editor
* move about info to site-settings
* update change-log
Co-authored-by: Hayden K <hay-kot@pm.me>
* fix(frontend): 🐛 fix section titles carrying over on deleted items
Added a UUID generator to generate unique id's and prevent list changes from causing proper virtual dom re-renders.
* lazy load json editor
* fix ingredient rendering error
* move text to input
* update settings styling
* improve mobile view
Co-authored-by: Hayden <hay-kot@pm.me>
* refactor(frontend): ♻️ major rewrite/improvement of use-profile pages
* refactor(frontend): ♻️ split webhooks into their own page
Co-authored-by: hay-kot <hay-kot@pm.me>