Commit Graph

20 Commits

Author SHA1 Message Date
5c03cdfb03 docs(gitea): add release automation guide and scripts
- Document automated release process with versioning and changelog generation
- Add scripts for retrieving release IDs and uploading assets to releases
- Provide best practices and debugging tips for maintaining consistency
2025-05-08 19:02:14 +02:00
661f83d1fd chore(config): add default git-cliff configuration
- Introduces a default configuration file for git-cliff
- Enables changelog generation with templates and commit parsing
- Configures commit grouping, tag patterns, and remote repository details
2025-05-08 19:01:55 +02:00
7b6eb2b574 feat(workflows): add upload assets template for releases
- Introduces a workflow to automate uploading release assets
- Triggers on published releases and uses custom scripts
- Enhances release management by linking artifacts to releases
2025-05-08 19:01:37 +02:00
f0838567b4 chore(gitignore): add .gitea/COMMIT_GPT.md to ignored files
- Adds .gitea/COMMIT_GPT.md to the .gitignore file to exclude it from version control.
2025-05-08 19:01:27 +02:00
b009b5763d feat(config): add project metadata and test watch task
- Introduce name and description fields for project metadata
- Add a test:watch task for running tests in watch mode
- Improve configuration clarity by adjusting formatting
2025-05-08 19:01:03 +02:00
b0c6901d7d fix(params): enforce non-undefined route parameter values
- Update `Params` type to disallow `undefined` values for clarity.
- Default route parameter values to empty strings if `null` or `undefined`.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 19:40:08 +02:00
6c4420d32f docs(httpkernel): enhance class and interface documentation
- Improve JSDoc comments for `HttpKernel` and `IHttpKernel` to clarify
  purpose, usage, and type parameters.
- Add detailed descriptions for methods, parameters, and generics.
- Refine explanations of middleware pipeline, error handling, and
  contextual typing.
- Enhance readability and consistency in public API documentation.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 16:45:37 +02:00
b7410b44dd refactor(core): enhance HttpKernel pipeline and matcher system with full context and error handling
BREAKING CHANGE: `parseQuery` utility removed; `IRouteMatcher` now includes query parsing; `RouteBuilder.middleware` and `handle` are now strictly typed per builder instance.

- Add `isHandler` and `isMiddleware` runtime type guards for validation in `HttpKernel`.
- Introduce `createEmptyContext` for constructing default context objects.
- Support custom HTTP error handlers (`404`, `500`) via `IHttpKernelConfig.httpErrorHandlers`.
- Default error handlers return meaningful HTTP status text (e.g., "Not Found").
- Replace legacy `parseQuery` logic with integrated query extraction via `createRouteMatcher`.

- Strongly type `RouteBuilder.middleware()` and `.handle()` methods without generic overrides.
- Simplify `HttpKernel.handle()` and `executePipeline()` through precise control flow and validation.
- Remove deprecated `registerRoute.ts` and `HttpKernelConfig.ts` in favor of colocated type exports.

- Add tests for integrated query parsing in `createRouteMatcher`.
- Improve error handling tests: middleware/handler validation, double `next()` call, thrown exceptions.
- Replace `assertRejects` with plain response code checks (via updated error handling).

- Removed `parseQuery.ts` and all related tests — query parsing is now built into route matching.
- `IRouteMatcher` signature changed to return `{ params, query }` instead of only `params`.
- `HttpKernelConfig` now uses `DeepPartial` and includes `httpErrorHandlers`.
- `RouteBuilder`'s generics are simplified for better DX and improved type safety.

This refactor improves clarity, test coverage, and runtime safety of the request lifecycle while reducing boilerplate and eliminating duplicated query handling logic.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 16:45:10 +02:00
9059bdda62 refactor(httpkernel): introduce configuration object for flexibility
- Replace individual constructor arguments with a configuration object.
- Add IHttpKernelConfig interface to standardize configuration structure.
- Refactor route builder and response decorator usage to use config.
- Simplify code and improve extensibility by consolidating parameters.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 13:56:56 +02:00
0990cacb22 chore(settings): add exportall configuration for barrel name and message
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 13:56:39 +02:00
fd1c7f4170 chore(.gitignore): add git_log_diff.txt to ignore list
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:42:16 +02:00
ba7aa79f56 feat(http): add error handling for invalid HTTP methods
- Introduce `InvalidHttpMethodError` for unrecognized HTTP methods.
- Enhance type safety in `HttpKernel` by using generic contexts.
- Update `ResponseDecorator` to accept context for enriched responses.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:35:41 +02:00
a236fa7c97 feat(http): enhance type safety and extend route context
- Refactor HttpKernel and related interfaces to support generic contexts.
- Add typed query parameters, route params, and state to IContext.
- Introduce HttpMethod type for stricter HTTP method validation.
- Update RouteBuilder and middleware to handle generic contexts.
- Improve test cases to verify compatibility with new types.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:29:49 +02:00
82a6877485 test(utils): rename and update import paths in test file
- Rename test file for better alignment with its purpose.
- Update relative import paths to reflect the new file location.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:29:10 +02:00
94525fce52 test(utils): add unit tests for parseQuery function
- Introduce comprehensive tests for the parseQuery utility.
- Validate handling of single and multi-value query parameters.
- Ensure empty query strings return an empty object.
- Confirm repeated keys are grouped into arrays.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:28:51 +02:00
cc734fa7b1 Update settings.json to include folderListener configuration for exportall
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:28:09 +02:00
af0a09e744 Update .gitignore to include out.py and output.txt
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:28:01 +02:00
ca4a560223 Add deno.lock file with version and redirects for dependencies
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:27:56 +02:00
bd881127ec Update deno.jsonc: add "deno.ns" to lib and comment out importMap
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:27:40 +02:00
1d2e89feca First commit
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 10:53:56 +02:00