@macss/modular-api 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ async execute() {
|
|
|
83
83
|
errorCode: 'USER_NOT_FOUND',
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
return new GetUserOutput(user);
|
|
87
87
|
}
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -156,8 +156,8 @@ For integration tests against real infrastructure, use `UseCase.fromJson()` dire
|
|
|
156
156
|
```ts
|
|
157
157
|
it('integration — end to end with real DB', async () => {
|
|
158
158
|
const usecase = SayHello.fromJson({ name: 'World' });
|
|
159
|
-
await usecase.execute();
|
|
160
|
-
expect(
|
|
159
|
+
const output = await usecase.execute();
|
|
160
|
+
expect(output.message).toBe('Hello, World!');
|
|
161
161
|
});
|
|
162
162
|
```
|
|
163
163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macss/modular-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "Use-case-centric toolkit for building modular APIs with Express. Define UseCase classes (input → validate → execute → output), connect them to HTTP routes, and expose Swagger/OpenAPI documentation automatically.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|