plutin 1.3.0 → 1.3.1
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/index.d.cts +286 -28
- package/dist/index.d.ts +286 -28
- package/dist/{index.js → index.mjs} +1 -1
- package/package.json +5 -4
- package/dist/base-controller-68008870.d.ts +0 -46
- package/dist/core/decorators/controller-http-decorator.cjs +0 -310
- package/dist/core/decorators/controller-http-decorator.cjs.map +0 -1
- package/dist/core/decorators/controller-http-decorator.d.cts +0 -13
- package/dist/core/decorators/controller-http-decorator.d.ts +0 -13
- package/dist/core/decorators/controller-http-decorator.js +0 -285
- package/dist/core/decorators/controller-http-decorator.js.map +0 -1
- package/dist/core/decorators/dependency-container.cjs +0 -95
- package/dist/core/decorators/dependency-container.cjs.map +0 -1
- package/dist/core/decorators/dependency-container.d.cts +0 -22
- package/dist/core/decorators/dependency-container.d.ts +0 -22
- package/dist/core/decorators/dependency-container.js +0 -71
- package/dist/core/decorators/dependency-container.js.map +0 -1
- package/dist/core/entities/aggregate-root.cjs +0 -99
- package/dist/core/entities/aggregate-root.cjs.map +0 -1
- package/dist/core/entities/aggregate-root.d.cts +0 -8
- package/dist/core/entities/aggregate-root.d.ts +0 -8
- package/dist/core/entities/aggregate-root.js +0 -74
- package/dist/core/entities/aggregate-root.js.map +0 -1
- package/dist/core/entities/common-dto.cjs +0 -19
- package/dist/core/entities/common-dto.cjs.map +0 -1
- package/dist/core/entities/common-dto.d.cts +0 -10
- package/dist/core/entities/common-dto.d.ts +0 -10
- package/dist/core/entities/common-dto.js +0 -1
- package/dist/core/entities/common-dto.js.map +0 -1
- package/dist/core/entities/domain-event.cjs +0 -19
- package/dist/core/entities/domain-event.cjs.map +0 -1
- package/dist/core/entities/domain-event.d.cts +0 -6
- package/dist/core/entities/domain-event.d.ts +0 -6
- package/dist/core/entities/domain-event.js +0 -1
- package/dist/core/entities/domain-event.js.map +0 -1
- package/dist/core/entities/entity.cjs +0 -92
- package/dist/core/entities/entity.cjs.map +0 -1
- package/dist/core/entities/entity.d.cts +0 -18
- package/dist/core/entities/entity.d.ts +0 -18
- package/dist/core/entities/entity.js +0 -67
- package/dist/core/entities/entity.js.map +0 -1
- package/dist/core/entities/optional.cjs +0 -19
- package/dist/core/entities/optional.cjs.map +0 -1
- package/dist/core/entities/optional.d.cts +0 -3
- package/dist/core/entities/optional.d.ts +0 -3
- package/dist/core/entities/optional.js +0 -1
- package/dist/core/entities/optional.js.map +0 -1
- package/dist/core/entities/replace.cjs +0 -19
- package/dist/core/entities/replace.cjs.map +0 -1
- package/dist/core/entities/replace.d.cts +0 -5
- package/dist/core/entities/replace.d.ts +0 -5
- package/dist/core/entities/replace.js +0 -1
- package/dist/core/entities/replace.js.map +0 -1
- package/dist/core/entities/unique-entity-id.cjs +0 -50
- package/dist/core/entities/unique-entity-id.cjs.map +0 -1
- package/dist/core/entities/unique-entity-id.d.cts +0 -9
- package/dist/core/entities/unique-entity-id.d.ts +0 -9
- package/dist/core/entities/unique-entity-id.js +0 -27
- package/dist/core/entities/unique-entity-id.js.map +0 -1
- package/dist/core/entities/value-object.cjs +0 -40
- package/dist/core/entities/value-object.cjs.map +0 -1
- package/dist/core/entities/value-object.d.cts +0 -6
- package/dist/core/entities/value-object.d.ts +0 -6
- package/dist/core/entities/value-object.js +0 -17
- package/dist/core/entities/value-object.js.map +0 -1
- package/dist/core/entities/watched-list.cjs +0 -121
- package/dist/core/entities/watched-list.cjs.map +0 -1
- package/dist/core/entities/watched-list.d.cts +0 -27
- package/dist/core/entities/watched-list.d.ts +0 -27
- package/dist/core/entities/watched-list.js +0 -98
- package/dist/core/entities/watched-list.js.map +0 -1
- package/dist/core/entities/watched-list.test.cjs +0 -186
- package/dist/core/entities/watched-list.test.cjs.map +0 -1
- package/dist/core/entities/watched-list.test.d.cts +0 -2
- package/dist/core/entities/watched-list.test.d.ts +0 -2
- package/dist/core/entities/watched-list.test.js +0 -185
- package/dist/core/entities/watched-list.test.js.map +0 -1
- package/dist/core/errors/api-common-error.cjs +0 -38
- package/dist/core/errors/api-common-error.cjs.map +0 -1
- package/dist/core/errors/api-common-error.d.cts +0 -28
- package/dist/core/errors/api-common-error.d.ts +0 -28
- package/dist/core/errors/api-common-error.js +0 -13
- package/dist/core/errors/api-common-error.js.map +0 -1
- package/dist/core/errors/application-error.cjs +0 -54
- package/dist/core/errors/application-error.cjs.map +0 -1
- package/dist/core/errors/application-error.d.cts +0 -8
- package/dist/core/errors/application-error.d.ts +0 -8
- package/dist/core/errors/application-error.js +0 -33
- package/dist/core/errors/application-error.js.map +0 -1
- package/dist/core/errors/conflict-error.cjs +0 -56
- package/dist/core/errors/conflict-error.cjs.map +0 -1
- package/dist/core/errors/conflict-error.d.cts +0 -13
- package/dist/core/errors/conflict-error.d.ts +0 -13
- package/dist/core/errors/conflict-error.js +0 -35
- package/dist/core/errors/conflict-error.js.map +0 -1
- package/dist/core/errors/domain-error.cjs +0 -54
- package/dist/core/errors/domain-error.cjs.map +0 -1
- package/dist/core/errors/domain-error.d.cts +0 -8
- package/dist/core/errors/domain-error.d.ts +0 -8
- package/dist/core/errors/domain-error.js +0 -33
- package/dist/core/errors/domain-error.js.map +0 -1
- package/dist/core/errors/http-client-error.cjs +0 -54
- package/dist/core/errors/http-client-error.cjs.map +0 -1
- package/dist/core/errors/http-client-error.d.cts +0 -8
- package/dist/core/errors/http-client-error.d.ts +0 -8
- package/dist/core/errors/http-client-error.js +0 -33
- package/dist/core/errors/http-client-error.js.map +0 -1
- package/dist/core/errors/infra-error.cjs +0 -54
- package/dist/core/errors/infra-error.cjs.map +0 -1
- package/dist/core/errors/infra-error.d.cts +0 -8
- package/dist/core/errors/infra-error.d.ts +0 -8
- package/dist/core/errors/infra-error.js +0 -33
- package/dist/core/errors/infra-error.js.map +0 -1
- package/dist/core/errors/validation-error.cjs +0 -55
- package/dist/core/errors/validation-error.cjs.map +0 -1
- package/dist/core/errors/validation-error.d.cts +0 -8
- package/dist/core/errors/validation-error.d.ts +0 -8
- package/dist/core/errors/validation-error.js +0 -34
- package/dist/core/errors/validation-error.js.map +0 -1
- package/dist/core/http/base-controller.cjs +0 -295
- package/dist/core/http/base-controller.cjs.map +0 -1
- package/dist/core/http/base-controller.d.cts +0 -1
- package/dist/core/http/base-controller.d.ts +0 -1
- package/dist/core/http/base-controller.js +0 -270
- package/dist/core/http/base-controller.js.map +0 -1
- package/dist/core/http/dto-response.cjs +0 -19
- package/dist/core/http/dto-response.cjs.map +0 -1
- package/dist/core/http/dto-response.d.cts +0 -10
- package/dist/core/http/dto-response.d.ts +0 -10
- package/dist/core/http/dto-response.js +0 -1
- package/dist/core/http/dto-response.js.map +0 -1
- package/dist/core/http/error-notifier.cjs +0 -19
- package/dist/core/http/error-notifier.cjs.map +0 -1
- package/dist/core/http/error-notifier.d.cts +0 -1
- package/dist/core/http/error-notifier.d.ts +0 -1
- package/dist/core/http/error-notifier.js +0 -1
- package/dist/core/http/error-notifier.js.map +0 -1
- package/dist/core/http/get-take-and-skip.cjs +0 -40
- package/dist/core/http/get-take-and-skip.cjs.map +0 -1
- package/dist/core/http/get-take-and-skip.d.cts +0 -6
- package/dist/core/http/get-take-and-skip.d.ts +0 -6
- package/dist/core/http/get-take-and-skip.js +0 -17
- package/dist/core/http/get-take-and-skip.js.map +0 -1
- package/dist/core/http/health-connections.cjs +0 -42
- package/dist/core/http/health-connections.cjs.map +0 -1
- package/dist/core/http/health-connections.d.cts +0 -16
- package/dist/core/http/health-connections.d.ts +0 -16
- package/dist/core/http/health-connections.js +0 -23
- package/dist/core/http/health-connections.js.map +0 -1
- package/dist/core/http/http.cjs +0 -19
- package/dist/core/http/http.cjs.map +0 -1
- package/dist/core/http/http.d.cts +0 -10
- package/dist/core/http/http.d.ts +0 -10
- package/dist/core/http/http.js +0 -1
- package/dist/core/http/http.js.map +0 -1
- package/dist/core/http/pagination.cjs +0 -19
- package/dist/core/http/pagination.cjs.map +0 -1
- package/dist/core/http/pagination.d.cts +0 -9
- package/dist/core/http/pagination.d.ts +0 -9
- package/dist/core/http/pagination.js +0 -1
- package/dist/core/http/pagination.js.map +0 -1
- package/dist/core/http/validator.cjs +0 -19
- package/dist/core/http/validator.cjs.map +0 -1
- package/dist/core/http/validator.d.cts +0 -11
- package/dist/core/http/validator.d.ts +0 -11
- package/dist/core/http/validator.js +0 -1
- package/dist/core/http/validator.js.map +0 -1
- package/dist/infra/adapters/http/express-adapter.cjs +0 -139
- package/dist/infra/adapters/http/express-adapter.cjs.map +0 -1
- package/dist/infra/adapters/http/express-adapter.d.cts +0 -15
- package/dist/infra/adapters/http/express-adapter.d.ts +0 -15
- package/dist/infra/adapters/http/express-adapter.js +0 -106
- package/dist/infra/adapters/http/express-adapter.js.map +0 -1
- package/dist/infra/adapters/http/fastify-adapter.cjs +0 -124
- package/dist/infra/adapters/http/fastify-adapter.cjs.map +0 -1
- package/dist/infra/adapters/http/fastify-adapter.d.cts +0 -14
- package/dist/infra/adapters/http/fastify-adapter.d.ts +0 -14
- package/dist/infra/adapters/http/fastify-adapter.js +0 -91
- package/dist/infra/adapters/http/fastify-adapter.js.map +0 -1
- package/dist/infra/adapters/http/response-error-code.cjs +0 -35
- package/dist/infra/adapters/http/response-error-code.cjs.map +0 -1
- package/dist/infra/adapters/http/response-error-code.d.cts +0 -6
- package/dist/infra/adapters/http/response-error-code.d.ts +0 -6
- package/dist/infra/adapters/http/response-error-code.js +0 -10
- package/dist/infra/adapters/http/response-error-code.js.map +0 -1
- package/dist/infra/adapters/http/validate-controller-metadata.cjs +0 -42
- package/dist/infra/adapters/http/validate-controller-metadata.cjs.map +0 -1
- package/dist/infra/adapters/http/validate-controller-metadata.d.cts +0 -11
- package/dist/infra/adapters/http/validate-controller-metadata.d.ts +0 -11
- package/dist/infra/adapters/http/validate-controller-metadata.js +0 -19
- package/dist/infra/adapters/http/validate-controller-metadata.js.map +0 -1
- package/dist/infra/adapters/notifications/discord.cjs +0 -90
- package/dist/infra/adapters/notifications/discord.cjs.map +0 -1
- package/dist/infra/adapters/notifications/discord.d.cts +0 -14
- package/dist/infra/adapters/notifications/discord.d.ts +0 -14
- package/dist/infra/adapters/notifications/discord.js +0 -65
- package/dist/infra/adapters/notifications/discord.js.map +0 -1
- package/dist/infra/adapters/notifications/in-memory.cjs +0 -44
- package/dist/infra/adapters/notifications/in-memory.cjs.map +0 -1
- package/dist/infra/adapters/notifications/in-memory.d.cts +0 -8
- package/dist/infra/adapters/notifications/in-memory.d.ts +0 -8
- package/dist/infra/adapters/notifications/in-memory.js +0 -21
- package/dist/infra/adapters/notifications/in-memory.js.map +0 -1
- package/dist/infra/adapters/notifications/notification-factory.cjs +0 -219
- package/dist/infra/adapters/notifications/notification-factory.cjs.map +0 -1
- package/dist/infra/adapters/notifications/notification-factory.d.cts +0 -18
- package/dist/infra/adapters/notifications/notification-factory.d.ts +0 -18
- package/dist/infra/adapters/notifications/notification-factory.js +0 -184
- package/dist/infra/adapters/notifications/notification-factory.js.map +0 -1
- package/dist/infra/adapters/notifications/sentry.cjs +0 -129
- package/dist/infra/adapters/notifications/sentry.cjs.map +0 -1
- package/dist/infra/adapters/notifications/sentry.d.cts +0 -13
- package/dist/infra/adapters/notifications/sentry.d.ts +0 -13
- package/dist/infra/adapters/notifications/sentry.js +0 -96
- package/dist/infra/adapters/notifications/sentry.js.map +0 -1
- package/dist/infra/adapters/validators/zod/index.cjs +0 -179
- package/dist/infra/adapters/validators/zod/index.cjs.map +0 -1
- package/dist/infra/adapters/validators/zod/index.d.cts +0 -19
- package/dist/infra/adapters/validators/zod/index.d.ts +0 -19
- package/dist/infra/adapters/validators/zod/index.js +0 -154
- package/dist/infra/adapters/validators/zod/index.js.map +0 -1
- package/dist/infra/adapters/validators/zod/zod-map-error.cjs +0 -79
- package/dist/infra/adapters/validators/zod/zod-map-error.cjs.map +0 -1
- package/dist/infra/adapters/validators/zod/zod-map-error.d.cts +0 -15
- package/dist/infra/adapters/validators/zod/zod-map-error.d.ts +0 -15
- package/dist/infra/adapters/validators/zod/zod-map-error.js +0 -60
- package/dist/infra/adapters/validators/zod/zod-map-error.js.map +0 -1
- package/dist/infra/adapters/validators/zod/zod-validator.cjs +0 -178
- package/dist/infra/adapters/validators/zod/zod-validator.cjs.map +0 -1
- package/dist/infra/adapters/validators/zod/zod-validator.d.cts +0 -13
- package/dist/infra/adapters/validators/zod/zod-validator.d.ts +0 -13
- package/dist/infra/adapters/validators/zod/zod-validator.js +0 -153
- package/dist/infra/adapters/validators/zod/zod-validator.js.map +0 -1
- package/dist/infra/env/index.cjs +0 -467
- package/dist/infra/env/index.cjs.map +0 -1
- package/dist/infra/env/index.d.cts +0 -26
- package/dist/infra/env/index.d.ts +0 -26
- package/dist/infra/env/index.js +0 -452
- package/dist/infra/env/index.js.map +0 -1
- /package/dist/{index.js.map → index.mjs.map} +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/core/entities/unique-entity-id.ts
|
|
5
|
-
import { randomUUID } from "crypto";
|
|
6
|
-
var UniqueEntityId = class {
|
|
7
|
-
static {
|
|
8
|
-
__name(this, "UniqueEntityId");
|
|
9
|
-
}
|
|
10
|
-
value;
|
|
11
|
-
constructor(value) {
|
|
12
|
-
this.value = value ?? randomUUID();
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return this.value;
|
|
16
|
-
}
|
|
17
|
-
toValue() {
|
|
18
|
-
return this.value;
|
|
19
|
-
}
|
|
20
|
-
equals(id) {
|
|
21
|
-
return id.toValue() === this.toValue();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/core/entities/entity.ts
|
|
26
|
-
var Entity = class {
|
|
27
|
-
static {
|
|
28
|
-
__name(this, "Entity");
|
|
29
|
-
}
|
|
30
|
-
_id;
|
|
31
|
-
props;
|
|
32
|
-
get id() {
|
|
33
|
-
return this._id;
|
|
34
|
-
}
|
|
35
|
-
set id(id) {
|
|
36
|
-
this._id = id;
|
|
37
|
-
}
|
|
38
|
-
get createdAt() {
|
|
39
|
-
return this.props.createdAt;
|
|
40
|
-
}
|
|
41
|
-
set createdAt(date) {
|
|
42
|
-
this.props.createdAt = date;
|
|
43
|
-
}
|
|
44
|
-
get updatedAt() {
|
|
45
|
-
return this.props.updatedAt;
|
|
46
|
-
}
|
|
47
|
-
touch() {
|
|
48
|
-
this.props.updatedAt = /* @__PURE__ */ new Date();
|
|
49
|
-
}
|
|
50
|
-
constructor(props, id) {
|
|
51
|
-
this._id = id ?? new UniqueEntityId(id);
|
|
52
|
-
this.props = props;
|
|
53
|
-
}
|
|
54
|
-
equals(entity) {
|
|
55
|
-
if (entity === this) {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
if (entity.id === this._id) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// src/core/entities/aggregate-root.ts
|
|
66
|
-
var AggregateRoot = class extends Entity {
|
|
67
|
-
static {
|
|
68
|
-
__name(this, "AggregateRoot");
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
AggregateRoot
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=aggregate-root.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/unique-entity-id.ts","../../../src/core/entities/entity.ts","../../../src/core/entities/aggregate-root.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto'\n\nexport class UniqueEntityId {\n private value: string\n\n constructor(value?: string) {\n this.value = value ?? randomUUID()\n }\n\n toString() {\n return this.value\n }\n\n toValue() {\n return this.value\n }\n\n public equals(id: UniqueEntityId) {\n return id.toValue() === this.toValue()\n }\n}\n","import { CommonDTO } from './common-dto'\nimport { UniqueEntityId } from './unique-entity-id'\n\ntype PropsWithCommonDTO<Props> = Props & CommonDTO\n\nexport abstract class Entity<Props> {\n private _id: UniqueEntityId\n protected props: PropsWithCommonDTO<Props>\n\n get id() {\n return this._id\n }\n\n set id(id: UniqueEntityId) {\n this._id = id\n }\n\n get createdAt() {\n return this.props.createdAt\n }\n\n set createdAt(date: Date) {\n this.props.createdAt = date\n }\n\n get updatedAt(): Date | undefined | null {\n return this.props.updatedAt\n }\n\n public touch() {\n this.props.updatedAt = new Date()\n }\n\n protected constructor(props: PropsWithCommonDTO<Props>, id?: UniqueEntityId) {\n this._id = id ?? new UniqueEntityId(id)\n this.props = props\n }\n\n public equals(entity: Entity<any>) {\n if (entity === this) {\n return true\n }\n\n if (entity.id === this._id) {\n return true\n }\n\n return false\n }\n}\n","import { Entity } from './entity'\n\nexport abstract class AggregateRoot<Props> extends Entity<Props> {}\n"],"mappings":";;;;AAAA,SAASA,kBAAkB;AAEpB,IAAMC,iBAAN,MAAMA;EAFb,OAEaA;;;EACHC;EAERC,YAAYD,OAAgB;AAC1B,SAAKA,QAAQA,SAASE,WAAAA;EACxB;EAEAC,WAAW;AACT,WAAO,KAAKH;EACd;EAEAI,UAAU;AACR,WAAO,KAAKJ;EACd;EAEOK,OAAOC,IAAoB;AAChC,WAAOA,GAAGF,QAAO,MAAO,KAAKA,QAAO;EACtC;AACF;;;ACfO,IAAeG,SAAf,MAAeA;EAJtB,OAIsBA;;;EACZC;EACEC;EAEV,IAAIC,KAAK;AACP,WAAO,KAAKF;EACd;EAEA,IAAIE,GAAGA,IAAoB;AACzB,SAAKF,MAAME;EACb;EAEA,IAAIC,YAAY;AACd,WAAO,KAAKF,MAAME;EACpB;EAEA,IAAIA,UAAUC,MAAY;AACxB,SAAKH,MAAME,YAAYC;EACzB;EAEA,IAAIC,YAAqC;AACvC,WAAO,KAAKJ,MAAMI;EACpB;EAEOC,QAAQ;AACb,SAAKL,MAAMI,YAAY,oBAAIE,KAAAA;EAC7B;EAEA,YAAsBN,OAAkCC,IAAqB;AAC3E,SAAKF,MAAME,MAAM,IAAIM,eAAeN,EAAAA;AACpC,SAAKD,QAAQA;EACf;EAEOQ,OAAOC,QAAqB;AACjC,QAAIA,WAAW,MAAM;AACnB,aAAO;IACT;AAEA,QAAIA,OAAOR,OAAO,KAAKF,KAAK;AAC1B,aAAO;IACT;AAEA,WAAO;EACT;AACF;;;AC/CO,IAAeW,gBAAf,cAA4CC,OAAAA;EAFnD,OAEmDA;;;AAAe;","names":["randomUUID","UniqueEntityId","value","constructor","randomUUID","toString","toValue","equals","id","Entity","_id","props","id","createdAt","date","updatedAt","touch","Date","UniqueEntityId","equals","entity","AggregateRoot","Entity"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/core/entities/common-dto.ts
|
|
17
|
-
var common_dto_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(common_dto_exports);
|
|
19
|
-
//# sourceMappingURL=common-dto.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/common-dto.ts"],"sourcesContent":["export type CommonDTO = {\n createdAt: Date\n updatedAt: Date | null\n}\n\nexport type CreateCommonDTO = {\n createdAt?: Date\n updatedAt?: Date | null\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAKA;;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=common-dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/core/entities/domain-event.ts
|
|
17
|
-
var domain_event_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(domain_event_exports);
|
|
19
|
-
//# sourceMappingURL=domain-event.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/domain-event.ts"],"sourcesContent":["export default interface IDomainEvent {\n name: string\n occurredAt: Date\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=domain-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/core/entities/entity.ts
|
|
22
|
-
var entity_exports = {};
|
|
23
|
-
__export(entity_exports, {
|
|
24
|
-
Entity: () => Entity
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(entity_exports);
|
|
27
|
-
|
|
28
|
-
// src/core/entities/unique-entity-id.ts
|
|
29
|
-
var import_node_crypto = require("crypto");
|
|
30
|
-
var UniqueEntityId = class {
|
|
31
|
-
static {
|
|
32
|
-
__name(this, "UniqueEntityId");
|
|
33
|
-
}
|
|
34
|
-
value;
|
|
35
|
-
constructor(value) {
|
|
36
|
-
this.value = value ?? (0, import_node_crypto.randomUUID)();
|
|
37
|
-
}
|
|
38
|
-
toString() {
|
|
39
|
-
return this.value;
|
|
40
|
-
}
|
|
41
|
-
toValue() {
|
|
42
|
-
return this.value;
|
|
43
|
-
}
|
|
44
|
-
equals(id) {
|
|
45
|
-
return id.toValue() === this.toValue();
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// src/core/entities/entity.ts
|
|
50
|
-
var Entity = class {
|
|
51
|
-
static {
|
|
52
|
-
__name(this, "Entity");
|
|
53
|
-
}
|
|
54
|
-
_id;
|
|
55
|
-
props;
|
|
56
|
-
get id() {
|
|
57
|
-
return this._id;
|
|
58
|
-
}
|
|
59
|
-
set id(id) {
|
|
60
|
-
this._id = id;
|
|
61
|
-
}
|
|
62
|
-
get createdAt() {
|
|
63
|
-
return this.props.createdAt;
|
|
64
|
-
}
|
|
65
|
-
set createdAt(date) {
|
|
66
|
-
this.props.createdAt = date;
|
|
67
|
-
}
|
|
68
|
-
get updatedAt() {
|
|
69
|
-
return this.props.updatedAt;
|
|
70
|
-
}
|
|
71
|
-
touch() {
|
|
72
|
-
this.props.updatedAt = /* @__PURE__ */ new Date();
|
|
73
|
-
}
|
|
74
|
-
constructor(props, id) {
|
|
75
|
-
this._id = id ?? new UniqueEntityId(id);
|
|
76
|
-
this.props = props;
|
|
77
|
-
}
|
|
78
|
-
equals(entity) {
|
|
79
|
-
if (entity === this) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
if (entity.id === this._id) {
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
-
0 && (module.exports = {
|
|
90
|
-
Entity
|
|
91
|
-
});
|
|
92
|
-
//# sourceMappingURL=entity.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/entity.ts","../../../src/core/entities/unique-entity-id.ts"],"sourcesContent":["import { CommonDTO } from './common-dto'\nimport { UniqueEntityId } from './unique-entity-id'\n\ntype PropsWithCommonDTO<Props> = Props & CommonDTO\n\nexport abstract class Entity<Props> {\n private _id: UniqueEntityId\n protected props: PropsWithCommonDTO<Props>\n\n get id() {\n return this._id\n }\n\n set id(id: UniqueEntityId) {\n this._id = id\n }\n\n get createdAt() {\n return this.props.createdAt\n }\n\n set createdAt(date: Date) {\n this.props.createdAt = date\n }\n\n get updatedAt(): Date | undefined | null {\n return this.props.updatedAt\n }\n\n public touch() {\n this.props.updatedAt = new Date()\n }\n\n protected constructor(props: PropsWithCommonDTO<Props>, id?: UniqueEntityId) {\n this._id = id ?? new UniqueEntityId(id)\n this.props = props\n }\n\n public equals(entity: Entity<any>) {\n if (entity === this) {\n return true\n }\n\n if (entity.id === this._id) {\n return true\n }\n\n return false\n }\n}\n","import { randomUUID } from 'node:crypto'\n\nexport class UniqueEntityId {\n private value: string\n\n constructor(value?: string) {\n this.value = value ?? randomUUID()\n }\n\n toString() {\n return this.value\n }\n\n toValue() {\n return this.value\n }\n\n public equals(id: UniqueEntityId) {\n return id.toValue() === this.toValue()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;;;;;;ACDA,yBAA2B;AAEpB,IAAMA,iBAAN,MAAMA;EAFb,OAEaA;;;EACHC;EAERC,YAAYD,OAAgB;AAC1B,SAAKA,QAAQA,aAASE,+BAAAA;EACxB;EAEAC,WAAW;AACT,WAAO,KAAKH;EACd;EAEAI,UAAU;AACR,WAAO,KAAKJ;EACd;EAEOK,OAAOC,IAAoB;AAChC,WAAOA,GAAGF,QAAO,MAAO,KAAKA,QAAO;EACtC;AACF;;;ADfO,IAAeG,SAAf,MAAeA;EAJtB,OAIsBA;;;EACZC;EACEC;EAEV,IAAIC,KAAK;AACP,WAAO,KAAKF;EACd;EAEA,IAAIE,GAAGA,IAAoB;AACzB,SAAKF,MAAME;EACb;EAEA,IAAIC,YAAY;AACd,WAAO,KAAKF,MAAME;EACpB;EAEA,IAAIA,UAAUC,MAAY;AACxB,SAAKH,MAAME,YAAYC;EACzB;EAEA,IAAIC,YAAqC;AACvC,WAAO,KAAKJ,MAAMI;EACpB;EAEOC,QAAQ;AACb,SAAKL,MAAMI,YAAY,oBAAIE,KAAAA;EAC7B;EAEA,YAAsBN,OAAkCC,IAAqB;AAC3E,SAAKF,MAAME,MAAM,IAAIM,eAAeN,EAAAA;AACpC,SAAKD,QAAQA;EACf;EAEOQ,OAAOC,QAAqB;AACjC,QAAIA,WAAW,MAAM;AACnB,aAAO;IACT;AAEA,QAAIA,OAAOR,OAAO,KAAKF,KAAK;AAC1B,aAAO;IACT;AAEA,WAAO;EACT;AACF;","names":["UniqueEntityId","value","constructor","randomUUID","toString","toValue","equals","id","Entity","_id","props","id","createdAt","date","updatedAt","touch","Date","UniqueEntityId","equals","entity"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommonDTO } from './common-dto.cjs';
|
|
2
|
-
import { UniqueEntityId } from './unique-entity-id.cjs';
|
|
3
|
-
|
|
4
|
-
type PropsWithCommonDTO<Props> = Props & CommonDTO;
|
|
5
|
-
declare abstract class Entity<Props> {
|
|
6
|
-
private _id;
|
|
7
|
-
protected props: PropsWithCommonDTO<Props>;
|
|
8
|
-
get id(): UniqueEntityId;
|
|
9
|
-
set id(id: UniqueEntityId);
|
|
10
|
-
get createdAt(): Date;
|
|
11
|
-
set createdAt(date: Date);
|
|
12
|
-
get updatedAt(): Date | undefined | null;
|
|
13
|
-
touch(): void;
|
|
14
|
-
protected constructor(props: PropsWithCommonDTO<Props>, id?: UniqueEntityId);
|
|
15
|
-
equals(entity: Entity<any>): boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Entity };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommonDTO } from './common-dto.js';
|
|
2
|
-
import { UniqueEntityId } from './unique-entity-id.js';
|
|
3
|
-
|
|
4
|
-
type PropsWithCommonDTO<Props> = Props & CommonDTO;
|
|
5
|
-
declare abstract class Entity<Props> {
|
|
6
|
-
private _id;
|
|
7
|
-
protected props: PropsWithCommonDTO<Props>;
|
|
8
|
-
get id(): UniqueEntityId;
|
|
9
|
-
set id(id: UniqueEntityId);
|
|
10
|
-
get createdAt(): Date;
|
|
11
|
-
set createdAt(date: Date);
|
|
12
|
-
get updatedAt(): Date | undefined | null;
|
|
13
|
-
touch(): void;
|
|
14
|
-
protected constructor(props: PropsWithCommonDTO<Props>, id?: UniqueEntityId);
|
|
15
|
-
equals(entity: Entity<any>): boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { Entity };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/core/entities/unique-entity-id.ts
|
|
5
|
-
import { randomUUID } from "crypto";
|
|
6
|
-
var UniqueEntityId = class {
|
|
7
|
-
static {
|
|
8
|
-
__name(this, "UniqueEntityId");
|
|
9
|
-
}
|
|
10
|
-
value;
|
|
11
|
-
constructor(value) {
|
|
12
|
-
this.value = value ?? randomUUID();
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return this.value;
|
|
16
|
-
}
|
|
17
|
-
toValue() {
|
|
18
|
-
return this.value;
|
|
19
|
-
}
|
|
20
|
-
equals(id) {
|
|
21
|
-
return id.toValue() === this.toValue();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/core/entities/entity.ts
|
|
26
|
-
var Entity = class {
|
|
27
|
-
static {
|
|
28
|
-
__name(this, "Entity");
|
|
29
|
-
}
|
|
30
|
-
_id;
|
|
31
|
-
props;
|
|
32
|
-
get id() {
|
|
33
|
-
return this._id;
|
|
34
|
-
}
|
|
35
|
-
set id(id) {
|
|
36
|
-
this._id = id;
|
|
37
|
-
}
|
|
38
|
-
get createdAt() {
|
|
39
|
-
return this.props.createdAt;
|
|
40
|
-
}
|
|
41
|
-
set createdAt(date) {
|
|
42
|
-
this.props.createdAt = date;
|
|
43
|
-
}
|
|
44
|
-
get updatedAt() {
|
|
45
|
-
return this.props.updatedAt;
|
|
46
|
-
}
|
|
47
|
-
touch() {
|
|
48
|
-
this.props.updatedAt = /* @__PURE__ */ new Date();
|
|
49
|
-
}
|
|
50
|
-
constructor(props, id) {
|
|
51
|
-
this._id = id ?? new UniqueEntityId(id);
|
|
52
|
-
this.props = props;
|
|
53
|
-
}
|
|
54
|
-
equals(entity) {
|
|
55
|
-
if (entity === this) {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
if (entity.id === this._id) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
Entity
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/unique-entity-id.ts","../../../src/core/entities/entity.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto'\n\nexport class UniqueEntityId {\n private value: string\n\n constructor(value?: string) {\n this.value = value ?? randomUUID()\n }\n\n toString() {\n return this.value\n }\n\n toValue() {\n return this.value\n }\n\n public equals(id: UniqueEntityId) {\n return id.toValue() === this.toValue()\n }\n}\n","import { CommonDTO } from './common-dto'\nimport { UniqueEntityId } from './unique-entity-id'\n\ntype PropsWithCommonDTO<Props> = Props & CommonDTO\n\nexport abstract class Entity<Props> {\n private _id: UniqueEntityId\n protected props: PropsWithCommonDTO<Props>\n\n get id() {\n return this._id\n }\n\n set id(id: UniqueEntityId) {\n this._id = id\n }\n\n get createdAt() {\n return this.props.createdAt\n }\n\n set createdAt(date: Date) {\n this.props.createdAt = date\n }\n\n get updatedAt(): Date | undefined | null {\n return this.props.updatedAt\n }\n\n public touch() {\n this.props.updatedAt = new Date()\n }\n\n protected constructor(props: PropsWithCommonDTO<Props>, id?: UniqueEntityId) {\n this._id = id ?? new UniqueEntityId(id)\n this.props = props\n }\n\n public equals(entity: Entity<any>) {\n if (entity === this) {\n return true\n }\n\n if (entity.id === this._id) {\n return true\n }\n\n return false\n }\n}\n"],"mappings":";;;;AAAA,SAASA,kBAAkB;AAEpB,IAAMC,iBAAN,MAAMA;EAFb,OAEaA;;;EACHC;EAERC,YAAYD,OAAgB;AAC1B,SAAKA,QAAQA,SAASE,WAAAA;EACxB;EAEAC,WAAW;AACT,WAAO,KAAKH;EACd;EAEAI,UAAU;AACR,WAAO,KAAKJ;EACd;EAEOK,OAAOC,IAAoB;AAChC,WAAOA,GAAGF,QAAO,MAAO,KAAKA,QAAO;EACtC;AACF;;;ACfO,IAAeG,SAAf,MAAeA;EAJtB,OAIsBA;;;EACZC;EACEC;EAEV,IAAIC,KAAK;AACP,WAAO,KAAKF;EACd;EAEA,IAAIE,GAAGA,IAAoB;AACzB,SAAKF,MAAME;EACb;EAEA,IAAIC,YAAY;AACd,WAAO,KAAKF,MAAME;EACpB;EAEA,IAAIA,UAAUC,MAAY;AACxB,SAAKH,MAAME,YAAYC;EACzB;EAEA,IAAIC,YAAqC;AACvC,WAAO,KAAKJ,MAAMI;EACpB;EAEOC,QAAQ;AACb,SAAKL,MAAMI,YAAY,oBAAIE,KAAAA;EAC7B;EAEA,YAAsBN,OAAkCC,IAAqB;AAC3E,SAAKF,MAAME,MAAM,IAAIM,eAAeN,EAAAA;AACpC,SAAKD,QAAQA;EACf;EAEOQ,OAAOC,QAAqB;AACjC,QAAIA,WAAW,MAAM;AACnB,aAAO;IACT;AAEA,QAAIA,OAAOR,OAAO,KAAKF,KAAK;AAC1B,aAAO;IACT;AAEA,WAAO;EACT;AACF;","names":["randomUUID","UniqueEntityId","value","constructor","randomUUID","toString","toValue","equals","id","Entity","_id","props","id","createdAt","date","updatedAt","touch","Date","UniqueEntityId","equals","entity"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/core/entities/optional.ts
|
|
17
|
-
var optional_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(optional_exports);
|
|
19
|
-
//# sourceMappingURL=optional.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/optional.ts"],"sourcesContent":["export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=optional.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/core/entities/replace.ts
|
|
17
|
-
var replace_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(replace_exports);
|
|
19
|
-
//# sourceMappingURL=replace.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/replace.ts"],"sourcesContent":["export type Replace<T, K extends { [P in keyof T]?: any }> = Omit<T, keyof K> &\n K\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=replace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/core/entities/unique-entity-id.ts
|
|
22
|
-
var unique_entity_id_exports = {};
|
|
23
|
-
__export(unique_entity_id_exports, {
|
|
24
|
-
UniqueEntityId: () => UniqueEntityId
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(unique_entity_id_exports);
|
|
27
|
-
var import_node_crypto = require("crypto");
|
|
28
|
-
var UniqueEntityId = class {
|
|
29
|
-
static {
|
|
30
|
-
__name(this, "UniqueEntityId");
|
|
31
|
-
}
|
|
32
|
-
value;
|
|
33
|
-
constructor(value) {
|
|
34
|
-
this.value = value ?? (0, import_node_crypto.randomUUID)();
|
|
35
|
-
}
|
|
36
|
-
toString() {
|
|
37
|
-
return this.value;
|
|
38
|
-
}
|
|
39
|
-
toValue() {
|
|
40
|
-
return this.value;
|
|
41
|
-
}
|
|
42
|
-
equals(id) {
|
|
43
|
-
return id.toValue() === this.toValue();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
UniqueEntityId
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=unique-entity-id.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/unique-entity-id.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto'\n\nexport class UniqueEntityId {\n private value: string\n\n constructor(value?: string) {\n this.value = value ?? randomUUID()\n }\n\n toString() {\n return this.value\n }\n\n toValue() {\n return this.value\n }\n\n public equals(id: UniqueEntityId) {\n return id.toValue() === this.toValue()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;yBAA2B;AAEpB,IAAMA,iBAAN,MAAMA;EAFb,OAEaA;;;EACHC;EAERC,YAAYD,OAAgB;AAC1B,SAAKA,QAAQA,aAASE,+BAAAA;EACxB;EAEAC,WAAW;AACT,WAAO,KAAKH;EACd;EAEAI,UAAU;AACR,WAAO,KAAKJ;EACd;EAEOK,OAAOC,IAAoB;AAChC,WAAOA,GAAGF,QAAO,MAAO,KAAKA,QAAO;EACtC;AACF;","names":["UniqueEntityId","value","constructor","randomUUID","toString","toValue","equals","id"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/core/entities/unique-entity-id.ts
|
|
5
|
-
import { randomUUID } from "crypto";
|
|
6
|
-
var UniqueEntityId = class {
|
|
7
|
-
static {
|
|
8
|
-
__name(this, "UniqueEntityId");
|
|
9
|
-
}
|
|
10
|
-
value;
|
|
11
|
-
constructor(value) {
|
|
12
|
-
this.value = value ?? randomUUID();
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return this.value;
|
|
16
|
-
}
|
|
17
|
-
toValue() {
|
|
18
|
-
return this.value;
|
|
19
|
-
}
|
|
20
|
-
equals(id) {
|
|
21
|
-
return id.toValue() === this.toValue();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
UniqueEntityId
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=unique-entity-id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/unique-entity-id.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto'\n\nexport class UniqueEntityId {\n private value: string\n\n constructor(value?: string) {\n this.value = value ?? randomUUID()\n }\n\n toString() {\n return this.value\n }\n\n toValue() {\n return this.value\n }\n\n public equals(id: UniqueEntityId) {\n return id.toValue() === this.toValue()\n }\n}\n"],"mappings":";;;;AAAA,SAASA,kBAAkB;AAEpB,IAAMC,iBAAN,MAAMA;EAFb,OAEaA;;;EACHC;EAERC,YAAYD,OAAgB;AAC1B,SAAKA,QAAQA,SAASE,WAAAA;EACxB;EAEAC,WAAW;AACT,WAAO,KAAKH;EACd;EAEAI,UAAU;AACR,WAAO,KAAKJ;EACd;EAEOK,OAAOC,IAAoB;AAChC,WAAOA,GAAGF,QAAO,MAAO,KAAKA,QAAO;EACtC;AACF;","names":["randomUUID","UniqueEntityId","value","constructor","randomUUID","toString","toValue","equals","id"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/core/entities/value-object.ts
|
|
22
|
-
var value_object_exports = {};
|
|
23
|
-
__export(value_object_exports, {
|
|
24
|
-
ValueObject: () => ValueObject
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(value_object_exports);
|
|
27
|
-
var ValueObject = class {
|
|
28
|
-
static {
|
|
29
|
-
__name(this, "ValueObject");
|
|
30
|
-
}
|
|
31
|
-
props;
|
|
32
|
-
constructor(props) {
|
|
33
|
-
this.props = props;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
ValueObject
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=value-object.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/value-object.ts"],"sourcesContent":["export abstract class ValueObject<Props> {\n protected props: Props\n\n protected constructor(props: Props) {\n this.props = props\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAO,IAAeA,cAAf,MAAeA;EAAtB,OAAsBA;;;EACVC;EAEV,YAAsBA,OAAc;AAClC,SAAKA,QAAQA;EACf;AACF;","names":["ValueObject","props"]}
|