drimion 0.1.5 → 0.1.7
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/dist/cli/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BaseRepository } from "
|
|
1
|
+
import { BaseRepository, type ID, type IResult } from "@pokepulse/kernel";
|
|
2
2
|
// import { {{className}} } from "./path-to-your-{{lowerName}}";
|
|
3
3
|
|
|
4
4
|
export class {{className}}Repository extends BaseRepository<{{className}}> {
|
|
5
|
-
async findById(id:
|
|
5
|
+
async findById(id: ID): Promise<IResult<{{className}}, string>> {
|
|
6
6
|
// implement fetch logic
|
|
7
7
|
throw new Error("Method not implemented")
|
|
8
8
|
}
|
|
@@ -12,12 +12,12 @@ export class {{className}}Repository extends BaseRepository<{{className}}> {
|
|
|
12
12
|
throw new Error("Method not implemented")
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async delete(id:
|
|
15
|
+
async delete(id: ID): Promise<IResult<void, string>> {
|
|
16
16
|
// implement delete
|
|
17
17
|
throw new Error("Method not implemented")
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async exists(id:
|
|
20
|
+
async exists(id: ID): Promise<boolean> {
|
|
21
21
|
// implement existence check
|
|
22
22
|
throw new Error("Method not implemented")
|
|
23
23
|
}
|
|
@@ -20,7 +20,7 @@ export type {{className}}Metadata = {
|
|
|
20
20
|
* Decide wether you want to use `IQuery` or `ICommand` then change the `IUseCase` usage into one of them.
|
|
21
21
|
*/
|
|
22
22
|
export class {{className}} implements IUseCase<{{className}}Input, {{className}}Output> {
|
|
23
|
-
async execute(input: {{className}}Input): Promise<IResult<{{className}}Output, {{className}}Metadata>> {
|
|
23
|
+
async execute(input: {{className}}Input): Promise<IResult<{{className}}Output, string, {{className}}Metadata>> {
|
|
24
24
|
// implement use case
|
|
25
25
|
throw new Error("Method not implemented")
|
|
26
26
|
}
|