This commit is contained in:
jay brown
2025-08-01 13:35:29 -07:00
parent 105339aa40
commit 582e5b77c0
2 changed files with 86 additions and 0 deletions
+83
View File
@@ -25,6 +25,89 @@ To find new packages: `https://search.nixos.org/packages`
For regular usage, please use `task` scripts in order run the most appropriate configuration.
## Available Task Commands
### Core Development Workflow
- **`task fullsuite:ci`** - Complete CI workflow: generate, build, lint, test with coverage
- **`task fullsuite`** - Full development suite (similar to CI but for local development)
- **`task fullsuite:graph`** - Generate dependency graph visualization
- **`task precommit`** - Pre-commit checks for CI/CD readiness
### Code Generation
- **`task generate`** - Generate all code (DB queries via SQLC, OpenAPI clients/servers, mocks, docs)
- **`task go:generate`** - Generate Go-specific code
- **`task openapi:generate`** - Generate OpenAPI clients and servers from specs
- **`task db:generate`** - Generate database queries from SQL files
- **`task docs:generate`** - Generate project documentation
- **`task docs:ai:generate`** - Generate full system docs using AI ($$)
- **`task test:mocks:generate`** - Generate test mocks
### Build Commands
- **`task build`** - Build the project
- **`task docker:build`** - Build Docker images
- **`task docker:build:debug`** - Build Docker images with debug support
### Docker Compose Management
#### Build Commands
- **`task compose:build`** - Build Docker images using local compose file
- **`task compose:build:test`** - Build Docker images using test compose file
- **`task compose:build:generate`** - Build Docker images using generate compose file
#### Start/Up Commands
- **`task compose:up`** - Full local development startup with AWS resource initialization
- **`task compose:up:test`** - Start test environment containers
- **`task compose:up:generate`** - Start containers for code generation
- **`task compose:up:aws`** - Start AWS-specific environment
#### Stop/Down Commands
- **`task compose:down`** - Stop and remove local containers
- **`task compose:down:test`** - Stop and remove test containers
- **`task compose:down:aws`** - Stop and remove AWS containers
#### Cleanup Commands
- **`task compose:clean`** - Stop containers and remove volumes (local)
- **`task compose:clean:test`** - Stop containers and remove volumes (test)
- **`task compose:clean:aws`** - Stop containers and remove volumes (AWS)
#### Other Compose Commands
- **`task compose:refresh`** - Full restart: rebuild everything and start fresh
- **`task compose:lint`** - Validate syntax of all compose files
### Testing Commands
- **`task test:functional`** - Run functional tests with 80% coverage threshold
- **`task test:functional:full`** - Run all tests and reset coverage tracking
- **`task test:unit:short`** - Quick unit tests
- **`task test:race`** - Race condition detection tests
- **`task test:perf`** - Performance analysis with slowest test reporting
- **`task test:mem`** - Memory usage profiling tests
- **`task test:bench`** - Benchmark execution
- **`task test:permitio`** - Run Permit.io integration tests (requires local PDP)
- **`task test:graph`** - Generate test dependency graphs
- **`task test:timeline`** - Show test execution timeline
- **`task test:prune`** - Clean up test artifacts
- **`task test:wait`** - Wait for test dependencies
### Linting Commands
- **`task lint`** - Run all linting (Go, YAML, JSON, Docker, OpenAPI)
- **`task go:lint`** - Run Go-specific linting
- **`task go:lint -- --fix`** - Fix automatically fixable Go linting issues
- **`task docker:lint`** - Lint Docker files
- **`task openapi:lint`** - Lint OpenAPI specifications
- **`task yaml:lint`** - Lint YAML files
- **`task json:lint`** - Lint JSON files
- **`task db:lint`** - Lint database-related files
### Database Commands
- **`task db:mig:create`** - Create new database migration
- **`task db:generate`** - Generate Go code from SQL queries
### AWS Commands
- **`task aws:login`** - Login to AWS services
- **`task aws:textract:credentials`** - Set up AWS Textract credentials
### Utility Commands
- **`task deps:tidy`** - Tidy Go module dependencies
## Environment Variables
When using environment variables, there is a hiearchy that will be respected. (First will override the next)
+3
View File
@@ -183,6 +183,9 @@ func setTokenCookies(c echo.Context, tokens *TokenResponse, accessTokenExpiresAt
// Set refresh token cookie (longer expiration - 30 days)
// Use UTC time and ensure proper expiration
// This must match the cognito side. So if you want to use a shorter
// (than the default 30 days) for this you should change it on the cognito client
// side as well as here.
refreshTokenExpires := time.Now().UTC().Add(30 * 24 * time.Hour)
refreshTokenCookie := &http.Cookie{
Name: "refresh_token",