@odg/command 1.14.0 → 1.15.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odg/command",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "ODGCommander used to create files based in stubs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,23 +41,23 @@
41
41
  "author": "Dragons Gamers <https://www.linkedin.com/in/victor-alves-odgodinho>",
42
42
  "license": "MIT",
43
43
  "devDependencies": {
44
- "@odg/eslint-config": "^3.5.0",
45
- "@odg/tsconfig": "^1.3.0",
44
+ "@odg/eslint-config": "^3.6.0",
45
+ "@odg/tsconfig": "^1.4.0",
46
46
  "@types/node": ">=24",
47
47
  "@vitest/coverage-istanbul": "^4.1.5",
48
48
  "concurrently": "^9.2.1",
49
49
  "reflect-metadata": "^0.2.2",
50
50
  "rimraf": "^6.1.3",
51
- "tsc-alias": "^1.8.16",
51
+ "tsc-alias": "^1.8.17",
52
52
  "tsx": "^4.21.0",
53
53
  "typescript": "^5.9.3",
54
- "vite": "^8.0.9",
54
+ "vite": "^8.0.10",
55
55
  "vitest": "^4.1.5"
56
56
  },
57
57
  "dependencies": {
58
- "@odg/chemical-x": "^2.5.0",
59
- "@odg/exception": "^1.11.0",
60
- "@odg/log": "^1.9.0",
58
+ "@odg/chemical-x": "^2.6.0",
59
+ "@odg/exception": "^1.12.0",
60
+ "@odg/log": "^1.10.0",
61
61
  "commander": "^14.0.3",
62
62
  "ts-morph": "^28.0.0"
63
63
  }
@@ -29,14 +29,14 @@ export class {{ HandlerClassName }} extends BaseHandler implements HandlerInterf
29
29
  }
30
30
 
31
31
  public override async retrying(exception: Exception, attempt: number): Promise<RetryAction> {
32
- await this.log.debug(`Step {{ HandlerClassName }}: Failed Attempt ${attempt}.`);
33
- await this.log.warning(exception.message);
32
+ await this.logger.debug(`Step {{ HandlerClassName }}: Failed Attempt ${attempt}.`);
33
+ await this.logger.warning(exception.message);
34
34
 
35
35
  return RetryAction.Default;
36
36
  }
37
37
 
38
38
  public override async success(): Promise<void> {
39
- await this.log.debug("Step {{ HandlerClassName }} finish with success.");
39
+ await this.logger.debug("Step {{ HandlerClassName }} finish with success.");
40
40
  }
41
41
 
42
42
  /**
@@ -0,0 +1,26 @@
1
+ import { ODGDecorators } from "@odg/chemical-x";
2
+ import type { EventListenerInterface } from "@odg/events";
3
+ import type { LoggerInterface } from "@odg/log";
4
+
5
+ import type { EventBrowserParameters, EventTypes } from "#types/EventsInterface";
6
+ import { ContainerName, EventName } from "@enums";
7
+ import { {{ EventBinding:UCFirst }}Page } from "@pages";
8
+ import { $inject } from "~/ContainerInject";
9
+
10
+ @ODGDecorators.injectable(ContainerName.{{ ListenerName:UCFirst }}EventListener, "Singleton")
11
+ @ODGDecorators.registerListener(EventName.{{ EventBinding:UCFirst }}Event, ContainerName.{{ ListenerName:UCFirst }}EventListener, {})
12
+ export class {{ ListenerName:UCFirst }}EventListener implements EventListenerInterface<EventTypes, EventName.{{ EventBinding:UCFirst }}Event> {
13
+
14
+ public constructor(
15
+ @$inject(ContainerName.Logger) public readonly logger: LoggerInterface,
16
+ @$inject(ContainerName.{{ EventBinding:UCFirst }}Page) public readonly {{ EventBinding:LCFirst }}Page: {{ EventBinding:UCFirst }}Page,
17
+ ) {
18
+ }
19
+
20
+ public async handler({ page }: EventBrowserParameters): Promise<void> {
21
+ await this.logger.debug("{{ ListenerName:UCFirst }}EventListener is sended");
22
+
23
+ await this.{{ EventBinding:LCFirst }}Page.setPage(page).execute();
24
+ }
25
+
26
+ }
package/stubs/event.stub DELETED
@@ -1,26 +0,0 @@
1
- import { ODGDecorators } from "@odg/chemical-x";
2
- import type { EventListenerInterface } from "@odg/events";
3
- import type { LoggerInterface } from "@odg/log";
4
-
5
- import type { EventBrowserParameters, EventTypes } from "#types/EventsInterface";
6
- import { ContainerName, EventName } from "@enums";
7
- import { {{ EventName:UCFirst }}Page } from "@pages";
8
- import { $inject } from "~/ContainerInject";
9
-
10
- @ODGDecorators.injectable(ContainerName.{{ EventName:UCFirst }}EventListener, "Singleton")
11
- @ODGDecorators.registerListener(EventName.{{ EventName:UCFirst }}Event, ContainerName.{{ EventName:UCFirst }}EventListener, {})
12
- export class {{ EventName:UCFirst }}EventListener implements EventListenerInterface<EventTypes, EventName.{{ EventName:UCFirst }}Event> {
13
-
14
- public constructor(
15
- @$inject(ContainerName.Logger) public readonly log: LoggerInterface,
16
- @$inject(ContainerName.{{ EventName:UCFirst }}Page) public readonly {{ EventName:LCFirst }}Page: {{ EventName:UCFirst }}Page,
17
- ) {
18
- }
19
-
20
- public async handler({ page }: EventBrowserParameters): Promise<void> {
21
- await this.log.debug("{{ EventName:UCFirst }}EventListener is sended");
22
-
23
- await this.{{ EventName:LCFirst }}Page.setPage(page).execute();
24
- }
25
-
26
- }