mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-31 14:50:28 +00:00
feat: items-editor (#5)
* format readme * update logo * format html * add logo to docs * repository for document and document tokens * add attachments type and repository * autogenerate types via scripts * use autogenerated types * attachment type updates * add insured and quantity fields for items * implement HasID interface for entities * implement label updates for items * implement service update method * WIP item update client side actions * check err on attachment * finish types for basic items editor * remove unused var * house keeping
This commit is contained in:
parent
fbc364dcd2
commit
95ab14b866
125 changed files with 15626 additions and 1791 deletions
43
Taskfile.yml
43
Taskfile.yml
|
@ -1,20 +1,27 @@
|
|||
version: "3"
|
||||
|
||||
tasks:
|
||||
generate:
|
||||
cmds:
|
||||
- |
|
||||
cd backend && ent generate ./ent/schema \
|
||||
--template=ent/schema/templates/has_id.tmpl
|
||||
- cd backend/app/api/ && swag fmt
|
||||
- cd backend/app/api/ && swag init --dir=./,../../internal,../../pkgs
|
||||
- |
|
||||
npx swagger-typescript-api \
|
||||
--no-client \
|
||||
--clean-output \
|
||||
--modular \
|
||||
--path ./backend/app/api/docs/swagger.json \
|
||||
--output ./frontend/lib/api/types
|
||||
|
||||
python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts
|
||||
api:
|
||||
cmds:
|
||||
- cd backend/app/api/ && swag fmt
|
||||
- cd backend/app/api/ && swag init --dir=./,../../internal,../../pkgs,../../ent
|
||||
# - |
|
||||
# npx swagger-typescript-api \
|
||||
# --path ./backend/app/api/docs/swagger.json \
|
||||
# --output ./client/auto-client \
|
||||
# --module-name-first-tag \
|
||||
# --modular
|
||||
- task: generate
|
||||
- cd backend && go run ./app/api/ {{.CLI_ARGS}}
|
||||
silent: false
|
||||
sources:
|
||||
- ./backend/**/*.go
|
||||
|
||||
api:build:
|
||||
cmds:
|
||||
|
@ -26,6 +33,10 @@ tasks:
|
|||
- cd backend && go test ./app/api/
|
||||
silent: true
|
||||
|
||||
api:watch:
|
||||
cmds:
|
||||
- cd backend && gotestsum --watch ./...
|
||||
|
||||
api:coverage:
|
||||
cmds:
|
||||
- cd backend && go test -race -coverprofile=coverage.out -covermode=atomic ./app/... ./internal/... ./pkgs/... -v -cover
|
||||
|
@ -39,12 +50,12 @@ tasks:
|
|||
- cd frontend && pnpm run test:ci
|
||||
silent: true
|
||||
|
||||
docker:build:
|
||||
frontend:watch:
|
||||
desc: Starts the vitest test runner in watch mode
|
||||
cmds:
|
||||
- cd backend && docker-compose up --build
|
||||
silent: true
|
||||
- cd frontend && pnpm vitest --watch
|
||||
|
||||
generate:types:
|
||||
frontend:
|
||||
desc: Run frontend development server
|
||||
cmds:
|
||||
- cd backend && go run ./app/generator
|
||||
silent: true
|
||||
- cd frontend && pnpm dev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue