@hg-ts/domain 0.1.54 → 0.1.56

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": "@hg-ts/domain",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -16,9 +16,9 @@
16
16
  "test:dev": "yarn build:dev --onSuccess \"yarn test\""
17
17
  },
18
18
  "devDependencies": {
19
- "@hg-ts-config/typescript": "0.1.54",
20
- "@hg-ts/linter": "0.1.54",
21
- "@hg-ts/types": "0.1.54",
19
+ "@hg-ts-config/typescript": "0.1.56",
20
+ "@hg-ts/linter": "0.1.56",
21
+ "@hg-ts/types": "0.1.56",
22
22
  "@types/node": "22.10.6",
23
23
  "eslint": "9.18.0",
24
24
  "reflect-metadata": "0.2.2",
package/.eslintcache DELETED
@@ -1 +0,0 @@
1
- [{"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/base.aggregate.js":"1","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/base.entity.js":"2","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/identifiable.js":"3","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/index.js":"4","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/eslint.config.mjs":"5","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/base.aggregate.ts":"6","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/base.entity.ts":"7","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/identifiable.ts":"8","/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/index.ts":"9"},{"size":617,"mtime":1746294768583,"results":"10","hashOfConfig":"11"},{"size":434,"mtime":1746294768581,"results":"12","hashOfConfig":"11"},{"size":117,"mtime":1746294768577,"results":"13","hashOfConfig":"11"},{"size":344,"mtime":1746294768585,"results":"14","hashOfConfig":"11"},{"size":59,"mtime":1736896000125,"results":"15","hashOfConfig":"11"},{"size":502,"mtime":1740592968043,"results":"16","hashOfConfig":"17"},{"size":447,"mtime":1736876770670,"results":"18","hashOfConfig":"17"},{"size":65,"mtime":1736876770670,"results":"19","hashOfConfig":"17"},{"size":121,"mtime":1736876770670,"results":"20","hashOfConfig":"17"},{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gtnk1i",{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i5df87",{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","suppressedMessages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","suppressedMessages":"47","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/base.aggregate.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/base.entity.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/identifiable.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/dist/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/eslint.config.mjs",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/base.aggregate.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/base.entity.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/identifiable.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/domain/src/index.ts",[],[]]
@@ -1,2 +0,0 @@
1
-
2
- 
@@ -1,2 +0,0 @@
1
-
2
- 
@@ -1,9 +0,0 @@
1
-
2
- ℹ tests 0
3
- ℹ suites 0
4
- ℹ pass 0
5
- ℹ fail 0
6
- ℹ cancelled 0
7
- ℹ skipped 0
8
- ℹ todo 0
9
- ℹ duration_ms 6.505708
package/eslint.config.mjs DELETED
@@ -1,3 +0,0 @@
1
- import config from '@hg-ts/linter';
2
-
3
- export default config;
@@ -1,19 +0,0 @@
1
- import { BaseEntity } from './base.entity';
2
- import type { Identifiable } from './identifiable';
3
-
4
- const AGGREGATE_SYMBOL = Symbol('AGGREGATE_SYMBOL');
5
-
6
- export abstract class BaseAggregate<IdType = string> extends BaseEntity<IdType> {
7
- protected readonly [AGGREGATE_SYMBOL]: IdType;
8
-
9
- protected constructor(params: Identifiable<IdType>) {
10
- super(params);
11
-
12
- Object.defineProperty(this, AGGREGATE_SYMBOL, {
13
- value: params.id,
14
- configurable: false,
15
- enumerable: false,
16
- writable: true,
17
- });
18
- }
19
- }
@@ -1,14 +0,0 @@
1
- import type { Identifiable } from './identifiable';
2
-
3
- export abstract class BaseEntity<IdType = string> implements Identifiable<IdType> {
4
- public readonly id: IdType;
5
-
6
- protected constructor(params: Identifiable<IdType>) {
7
- this.id = params.id;
8
- }
9
-
10
- public equals<T extends BaseEntity<IdType>>(entity: T): boolean {
11
- return Object.getPrototypeOf(this)!.constructor === Object.getPrototypeOf(entity)!.constructor
12
- && this.id === entity.id;
13
- }
14
- }
@@ -1,3 +0,0 @@
1
- export type Identifiable<IdType = string> = {
2
- id: IdType;
3
- };
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- import '@hg-ts/types';
2
-
3
- export * from './identifiable';
4
- export * from './base.aggregate';
5
- export * from './base.entity';