@nestjslatam/ddd-lib 1.0.32 → 1.0.34
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/command.base.js +2 -2
- package/command.base.js.map +1 -1
- package/core/broken-rules/broken-rule.js +1 -1
- package/core/broken-rules/broken-rule.js.map +1 -1
- package/core/index.d.ts +2 -1
- package/core/index.js +2 -1
- package/core/index.js.map +1 -1
- package/core/interfaces/domain-repository-read.interface.d.ts +2 -2
- package/core/interfaces/domain-repository-transaction.interface.d.ts +2 -2
- package/core/interfaces/domain-repository-write.interface.d.ts +2 -2
- package/core/validators/index.d.ts +2 -0
- package/core/validators/index.js +19 -0
- package/core/validators/index.js.map +1 -0
- package/core/validators/object.validator.d.ts +3 -0
- package/core/validators/object.validator.js +15 -0
- package/core/validators/object.validator.js.map +1 -0
- package/core/validators/value-object.validator.d.ts +6 -0
- package/core/validators/value-object.validator.js +34 -0
- package/core/validators/value-object.validator.js.map +1 -0
- package/domain-entity.d.ts +2 -2
- package/helpers/domain-guard.helper.d.ts +2 -4
- package/helpers/domain-guard.helper.js +11 -43
- package/helpers/domain-guard.helper.js.map +1 -1
- package/helpers/domain-object.helper.js.map +1 -1
- package/helpers/index.d.ts +1 -1
- package/helpers/index.js +1 -1
- package/helpers/index.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/valueobjects/domain-date.valueobject.js +1 -1
- package/valueobjects/domain-date.valueobject.js.map +1 -1
- package/core/pagination.base.d.ts +0 -25
- package/core/pagination.base.js +0 -22
- package/core/pagination.base.js.map +0 -1
package/command.base.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandBase = void 0;
|
|
4
4
|
const uuid_1 = require("uuid");
|
|
5
|
-
const helpers_1 = require("./helpers");
|
|
6
5
|
const exceptions_1 = require("./exceptions");
|
|
6
|
+
const _1 = require(".");
|
|
7
7
|
class CommandBase {
|
|
8
8
|
constructor(props) {
|
|
9
|
-
if (
|
|
9
|
+
if (_1.DomainGuard.isEmpty(props)) {
|
|
10
10
|
throw new exceptions_1.DomainArgumentInvalidException('Command props should not be empty');
|
|
11
11
|
}
|
|
12
12
|
this._id = (0, uuid_1.v4)();
|
package/command.base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.base.js","sourceRoot":"","sources":["../../../libs/ddd/src/command.base.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAGpC,
|
|
1
|
+
{"version":3,"file":"command.base.js","sourceRoot":"","sources":["../../../libs/ddd/src/command.base.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAGpC,6CAA8D;AAC9D,wBAAgC;AAIhC,MAAa,WAAW;IAKtB,YAAY,KAA4B;QACtC,IAAI,cAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,2CAA8B,CACtC,mCAAmC,CACpC,CAAC;SACH;QAED,IAAI,CAAC,GAAG,GAAG,IAAA,SAAM,GAAE,CAAC;QAEpB,IAAI,CAAC,QAAQ,GAAG;YACd,EAAE,EAAE,IAAI,CAAC,GAAG;YACZ,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU;SACxC,CAAC;IACJ,CAAC;CACF;AAnBD,kCAmBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BrokenRule = void 0;
|
|
4
|
-
const helpers_1 = require("
|
|
4
|
+
const helpers_1 = require("./../../helpers");
|
|
5
5
|
class BrokenRule {
|
|
6
6
|
constructor(code, description) {
|
|
7
7
|
this.code = code;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broken-rule.js","sourceRoot":"","sources":["../../../../../libs/ddd/src/core/broken-rules/broken-rule.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"broken-rule.js","sourceRoot":"","sources":["../../../../../libs/ddd/src/core/broken-rules/broken-rule.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAE9C,MAAa,UAAU;IACrB,YACS,IAAY,EACZ,WAAmB;QADnB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QAE1B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAE9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAES,KAAK,CAAC,IAAY,EAAE,WAAmB;QAC/C,IAAI,qBAAW,CAAC,OAAO,CAAC,IAAI,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,IAAI,qBAAW,CAAC,OAAO,CAAC,WAAW,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC5D,CAAC;CACF;AAjBD,gCAiBC"}
|
package/core/index.d.ts
CHANGED
package/core/index.js
CHANGED
|
@@ -16,7 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./broken-rules"), exports);
|
|
18
18
|
__exportStar(require("./interfaces"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./validators"), exports);
|
|
20
20
|
__exportStar(require("./tracking-props"), exports);
|
|
21
21
|
__exportStar(require("./of-type"), exports);
|
|
22
|
+
__exportStar(require("./validators"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/ddd/src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+CAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/ddd/src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,4CAA0B;AAC1B,+CAA6B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface IDomainTransationRepository<
|
|
2
|
-
publishEvents(domainEntity:
|
|
1
|
+
export interface IDomainTransationRepository<TTable> {
|
|
2
|
+
publishEvents(domainEntity: TTable, handler: () => Promise<void>): Promise<void>;
|
|
3
3
|
transaction<T>(handler: () => Promise<T>): Promise<T>;
|
|
4
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface IDomainWriteRepository<TKey, TTable> {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
insert(entity: TTable): Promise<void>;
|
|
3
|
+
insertBatch(entities: TTable[]): Promise<void>;
|
|
4
4
|
update(id: TKey, entity: TTable): Promise<void>;
|
|
5
5
|
delete(id: TKey): Promise<void>;
|
|
6
6
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./value-object.validator"), exports);
|
|
18
|
+
__exportStar(require("./object.validator"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/ddd/src/core/validators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,qDAAmC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValueObjectGuard = void 0;
|
|
4
|
+
class ValueObjectGuard {
|
|
5
|
+
static isInstanceOfValueObject(obj) {
|
|
6
|
+
if (obj === null || obj === undefined)
|
|
7
|
+
return false;
|
|
8
|
+
if (typeof obj === 'string' || typeof obj === 'boolean')
|
|
9
|
+
return false;
|
|
10
|
+
const canConvert = obj;
|
|
11
|
+
return !canConvert ? false : true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ValueObjectGuard = ValueObjectGuard;
|
|
15
|
+
//# sourceMappingURL=object.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.validator.js","sourceRoot":"","sources":["../../../../../libs/ddd/src/core/validators/object.validator.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAC3B,MAAM,CAAC,uBAAuB,CAAC,GAAQ;QACrC,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAEpD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QAEtE,MAAM,UAAU,GAAG,GAAiC,CAAC;QAErD,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AAVD,4CAUC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const GUARD_ERROR_MESSAGE_LENGTH = "Cannot check length of a value. Provided value is empty";
|
|
2
|
+
export declare class ValueGuard {
|
|
3
|
+
static isEmpty(value: unknown): boolean;
|
|
4
|
+
static lengthIsBetween(value: number | string | Array<unknown>, min: number, max: number): boolean;
|
|
5
|
+
private static getValueLength;
|
|
6
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValueGuard = exports.GUARD_ERROR_MESSAGE_LENGTH = void 0;
|
|
4
|
+
exports.GUARD_ERROR_MESSAGE_LENGTH = 'Cannot check length of a value. Provided value is empty';
|
|
5
|
+
class ValueGuard {
|
|
6
|
+
static isEmpty(value) {
|
|
7
|
+
if (typeof value === 'number' ||
|
|
8
|
+
typeof value === 'boolean' ||
|
|
9
|
+
value instanceof Date)
|
|
10
|
+
return false;
|
|
11
|
+
if (typeof value === 'undefined' ||
|
|
12
|
+
value === null ||
|
|
13
|
+
(value instanceof Object && !Object.keys(value).length) ||
|
|
14
|
+
value === '')
|
|
15
|
+
return true;
|
|
16
|
+
if (Array.isArray(value)) {
|
|
17
|
+
if (value.length === 0)
|
|
18
|
+
return true;
|
|
19
|
+
if (value.every((item) => this.isEmpty(item))) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
static lengthIsBetween(value, min, max) {
|
|
26
|
+
if (this.isEmpty(value))
|
|
27
|
+
throw new Error(exports.GUARD_ERROR_MESSAGE_LENGTH);
|
|
28
|
+
const valueLength = this.getValueLength(value);
|
|
29
|
+
return valueLength >= min && valueLength <= max ? true : false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ValueGuard = ValueGuard;
|
|
33
|
+
ValueGuard.getValueLength = (value) => typeof value === 'number' ? Number(value).toString().length : value.length;
|
|
34
|
+
//# sourceMappingURL=value-object.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-object.validator.js","sourceRoot":"","sources":["../../../../../libs/ddd/src/core/validators/value-object.validator.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GACrC,yDAAyD,CAAC;AAE5D,MAAa,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,KAAc;QAC3B,IACE,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS;YAC1B,KAAK,YAAY,IAAI;YAErB,OAAO,KAAK,CAAC;QAEf,IACE,OAAO,KAAK,KAAK,WAAW;YAC5B,KAAK,KAAK,IAAI;YACd,CAAC,KAAK,YAAY,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;YACvD,KAAK,KAAK,EAAE;YAEZ,OAAO,IAAI,CAAC;QAEd,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAEpC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE;gBAC7C,OAAO,IAAI,CAAC;aACb;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,eAAe,CACpB,KAAuC,EACvC,GAAW,EACX,GAAW;QAEX,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,kCAA0B,CAAC,CAAC;QAErE,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE/C,OAAO,WAAW,IAAI,GAAG,IAAI,WAAW,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACjE,CAAC;;AAtCH,gCA0CC;AAFgB,yBAAc,GAAG,CAAC,KAAuC,EAAE,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC"}
|
package/domain-entity.d.ts
CHANGED
|
@@ -36,6 +36,6 @@ export declare abstract class DomainEntity<TProps> {
|
|
|
36
36
|
markAsDeleted(): void;
|
|
37
37
|
private guard;
|
|
38
38
|
private childGuard;
|
|
39
|
-
removeChild<TParent extends DomainEntity<any>, TChild extends DomainValueObject<any>>(parent: TParent, child: TChild, childs: Array<TChild>): Array<TChild>;
|
|
40
|
-
addChild<TParent extends DomainEntity<any>, TChild extends DomainValueObject<any>>(parent: TParent, child: TChild, childs: Array<TChild>): Array<TChild>;
|
|
39
|
+
removeChild<TParent extends DomainEntity<any>, TChild extends DomainValueObject<any> | DomainEntity<any>>(parent: TParent, child: TChild, childs: Array<TChild>): Array<TChild>;
|
|
40
|
+
addChild<TParent extends DomainEntity<any>, TChild extends DomainValueObject<any> | DomainEntity<any>>(parent: TParent, child: TChild, childs: Array<TChild>): Array<TChild>;
|
|
41
41
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { DomainValueObject } from '
|
|
1
|
+
import { DomainValueObject } from '@nestjslatam/ddd-lib';
|
|
2
2
|
export declare class DomainGuard {
|
|
3
3
|
static isValueObject(obj: unknown): obj is DomainValueObject<unknown>;
|
|
4
4
|
static isInstanceOfValueObject(obj: any): boolean;
|
|
5
5
|
static isEmpty(value: unknown): boolean;
|
|
6
6
|
static lengthIsBetween(value: number | string | Array<unknown>, min: number, max: number): boolean;
|
|
7
7
|
static lenghtIsEqual(value: number | string | Array<unknown>, length: number): boolean;
|
|
8
|
-
static isEmail(value: string): boolean;
|
|
9
8
|
static isString(value: unknown): boolean;
|
|
10
9
|
static isNumber(value: unknown): boolean;
|
|
11
|
-
static isNumberBetween(value: number, min: number, max: number): boolean;
|
|
12
10
|
static isDate(value: unknown): boolean;
|
|
13
|
-
static
|
|
11
|
+
static isNumberBetween(value: number, min: number, max: number): boolean;
|
|
14
12
|
private static getValueLength;
|
|
15
13
|
}
|
|
@@ -1,71 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DomainGuard = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const EMAIL_REGEX_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
7
|
-
const ERROR_MESSAGE_LENGTH = 'Cannot check length of a value. Provided value is empty';
|
|
4
|
+
const ddd_lib_1 = require("@nestjslatam/ddd-lib");
|
|
5
|
+
const core_1 = require("../core");
|
|
8
6
|
class DomainGuard {
|
|
9
7
|
static isValueObject(obj) {
|
|
10
|
-
return obj instanceof
|
|
8
|
+
return obj instanceof ddd_lib_1.DomainValueObject;
|
|
11
9
|
}
|
|
12
10
|
static isInstanceOfValueObject(obj) {
|
|
13
|
-
|
|
14
|
-
return false;
|
|
15
|
-
if (typeof obj === 'string' || typeof obj === 'boolean')
|
|
16
|
-
return false;
|
|
17
|
-
const canConvert = obj;
|
|
18
|
-
return !canConvert ? false : true;
|
|
11
|
+
return core_1.ValueObjectGuard.isInstanceOfValueObject(obj);
|
|
19
12
|
}
|
|
20
13
|
static isEmpty(value) {
|
|
21
|
-
|
|
22
|
-
typeof value === 'boolean' ||
|
|
23
|
-
value instanceof Date)
|
|
24
|
-
return false;
|
|
25
|
-
if (typeof value === 'undefined' ||
|
|
26
|
-
value === null ||
|
|
27
|
-
(value instanceof Object && !Object.keys(value).length) ||
|
|
28
|
-
value === '')
|
|
29
|
-
return true;
|
|
30
|
-
if (Array.isArray(value)) {
|
|
31
|
-
if (value.length === 0)
|
|
32
|
-
return true;
|
|
33
|
-
if (value.every((item) => DomainGuard.isEmpty(item))) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
14
|
+
return core_1.ValueGuard.isEmpty(value);
|
|
38
15
|
}
|
|
39
16
|
static lengthIsBetween(value, min, max) {
|
|
40
|
-
|
|
41
|
-
throw new Error(ERROR_MESSAGE_LENGTH);
|
|
42
|
-
const valueLength = this.getValueLength(value);
|
|
43
|
-
return valueLength >= min && valueLength <= max ? true : false;
|
|
17
|
+
return core_1.ValueGuard.lengthIsBetween(value, min, max);
|
|
44
18
|
}
|
|
45
19
|
static lenghtIsEqual(value, length) {
|
|
46
20
|
if (DomainGuard.isEmpty(value))
|
|
47
|
-
throw new Error(
|
|
21
|
+
throw new Error(core_1.GUARD_ERROR_MESSAGE_LENGTH);
|
|
48
22
|
return this.getValueLength(value) === length ? true : false;
|
|
49
23
|
}
|
|
50
|
-
static isEmail(value) {
|
|
51
|
-
return EMAIL_REGEX_PATTERN.test(value);
|
|
52
|
-
}
|
|
53
24
|
static isString(value) {
|
|
54
25
|
return typeof value === 'string';
|
|
55
26
|
}
|
|
56
27
|
static isNumber(value) {
|
|
57
28
|
return typeof value === 'number';
|
|
58
29
|
}
|
|
59
|
-
static isNumberBetween(value, min, max) {
|
|
60
|
-
if (DomainGuard.isEmpty(value))
|
|
61
|
-
throw new Error(ERROR_MESSAGE_LENGTH);
|
|
62
|
-
return value >= min && value <= max ? true : false;
|
|
63
|
-
}
|
|
64
30
|
static isDate(value) {
|
|
65
31
|
return value instanceof Date;
|
|
66
32
|
}
|
|
67
|
-
static
|
|
68
|
-
|
|
33
|
+
static isNumberBetween(value, min, max) {
|
|
34
|
+
if (DomainGuard.isEmpty(value))
|
|
35
|
+
throw new Error(core_1.GUARD_ERROR_MESSAGE_LENGTH);
|
|
36
|
+
return value >= min && value <= max ? true : false;
|
|
69
37
|
}
|
|
70
38
|
}
|
|
71
39
|
exports.DomainGuard = DomainGuard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-guard.helper.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/domain-guard.helper.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"domain-guard.helper.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/domain-guard.helper.ts"],"names":[],"mappings":";;;AAAA,kDAAyD;AACzD,kCAIiB;AAEjB,MAAa,WAAW;IACtB,MAAM,CAAC,aAAa,CAAC,GAAY;QAC/B,OAAO,GAAG,YAAY,2BAAiB,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,GAAQ;QACrC,OAAO,uBAAgB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,KAAc;QAC3B,OAAO,iBAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,eAAe,CACpB,KAAuC,EACvC,GAAW,EACX,GAAW;QAEX,OAAO,iBAAU,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,aAAa,CAClB,KAAuC,EACvC,MAAc;QAEd,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,iCAA0B,CAAC,CAAC;QAE5E,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAc;QAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAc;QAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,KAAc;QAC1B,OAAO,KAAK,YAAY,IAAI,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QAC5D,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,iCAA0B,CAAC,CAAC;QAE5E,OAAO,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,CAAC;;AA9CH,kCAkDC;AAFgB,0BAAc,GAAG,CAAC,KAAuC,EAAE,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-object.helper.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/domain-object.helper.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"domain-object.helper.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/domain-object.helper.ts"],"names":[],"mappings":";;;AACA,+DAAoD;AAEpD,MAAM,QAAQ,GAAG,CAAC,GAAY,EAAgC,EAAE;IAC9D,OAAO,CACL,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC;QACrD,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;QAC/C,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;QAChD,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAC5D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,IAAS,EAAO,EAAE;IAC9C,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAE/C,IAAI,iCAAW,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;QACnC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;KACtB;IACD,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QAClB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;KACxB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAO,EAAE;IACtD,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAEjD,MAAM,SAAS,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAE/B,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE;QAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE;YAClC,SAAS,CAAC,IAAI,CAAC,GAAI,SAAS,CAAC,IAAI,CAAoB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACjE,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;SACJ;QACD,SAAS,CAAC,IAAI,CAAC,GAAG,oBAAoB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;KACzD;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAfW,QAAA,oBAAoB,wBAe/B"}
|
package/helpers/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './domain-guard.helper';
|
|
2
1
|
export * from './domain-object.helper';
|
|
3
2
|
export * from './datetime.helper';
|
|
4
3
|
export * from './default-command-pubsub.helper';
|
|
5
4
|
export * from './default-get-event-id.helper';
|
|
6
5
|
export * from './default-pubsub.helper';
|
|
7
6
|
export * from './default-unhandled-exception-pubsub.helper';
|
|
7
|
+
export * from './domain-guard.helper';
|
package/helpers/index.js
CHANGED
|
@@ -14,11 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./domain-guard.helper"), exports);
|
|
18
17
|
__exportStar(require("./domain-object.helper"), exports);
|
|
19
18
|
__exportStar(require("./datetime.helper"), exports);
|
|
20
19
|
__exportStar(require("./default-command-pubsub.helper"), exports);
|
|
21
20
|
__exportStar(require("./default-get-event-id.helper"), exports);
|
|
22
21
|
__exportStar(require("./default-pubsub.helper"), exports);
|
|
23
22
|
__exportStar(require("./default-unhandled-exception-pubsub.helper"), exports);
|
|
23
|
+
__exportStar(require("./domain-guard.helper"), exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/ddd/src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,oDAAkC;AAClC,kEAAgD;AAChD,gEAA8C;AAC9C,0DAAwC;AACxC,8EAA4D;AAC5D,wDAAsC"}
|