@pocket-architect/core 0.1.10 → 0.1.11
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/build/EntityId.d.ts +0 -1
- package/build/EntityId.js +1 -2
- package/build/EntityId.js.map +1 -1
- package/package.json +1 -1
- package/src/EntityId.ts +1 -2
package/build/EntityId.d.ts
CHANGED
package/build/EntityId.js
CHANGED
|
@@ -10,14 +10,13 @@ var EntityId = /** @class */ (function () {
|
|
|
10
10
|
if (uuid === void 0) { uuid = null; }
|
|
11
11
|
this._recordId = null;
|
|
12
12
|
this._uuid = null;
|
|
13
|
-
this._hasValue = false;
|
|
14
13
|
this._recordId = recordId ? recordId : null;
|
|
15
14
|
if (!uuid) {
|
|
16
15
|
this._uuid = (0, uuid_by_string_1.default)(recordId ? recordId.toString() : (0, cuid2_1.createId)(), (0, uuid_by_string_1.default)(this.constructor.name));
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
EntityId.prototype.toPrimitive = function () {
|
|
20
|
-
return this.
|
|
19
|
+
return this._recordId;
|
|
21
20
|
};
|
|
22
21
|
EntityId.prototype.toString = function () {
|
|
23
22
|
return this._uuid;
|
package/build/EntityId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityId.js","sourceRoot":"","sources":["../src/EntityId.ts"],"names":[],"mappings":";;;;AAAA,0EAAuC;AACvC,8CAA+C;AAE/C;
|
|
1
|
+
{"version":3,"file":"EntityId.js","sourceRoot":"","sources":["../src/EntityId.ts"],"names":[],"mappings":";;;;AAAA,0EAAuC;AACvC,8CAA+C;AAE/C;IAIE,kBAAY,QAAkB,EAAE,IAAmB;QAAvC,yBAAA,EAAA,eAAkB;QAAE,qBAAA,EAAA,WAAmB;QAHzC,cAAS,GAAW,IAAI,CAAC;QACzB,UAAK,GAAW,IAAI,CAAC;QAG7B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAA,gBAAQ,GAAE,EAAE,IAAA,wBAAU,EAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1G,CAAC;IACH,CAAC;IAED,8BAAW,GAAX;QACE,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,2BAAQ,GAAR;QACE,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,yBAAM,GAAN,UAAO,EAAe;QACpB,OAAO,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK,CAAC;IACjC,CAAC;IACH,eAAC;AAAD,CAAC,AAtBD,IAsBC;AAtBY,4BAAQ"}
|
package/package.json
CHANGED
package/src/EntityId.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { createId } from '@paralleldrive/cuid2'
|
|
|
4
4
|
export class EntityId<T> {
|
|
5
5
|
protected _recordId: T|null = null;
|
|
6
6
|
protected _uuid: string = null;
|
|
7
|
-
protected _hasValue: boolean = false;
|
|
8
7
|
|
|
9
8
|
constructor(recordId: T = null, uuid: string = null) {
|
|
10
9
|
this._recordId = recordId ? recordId : null;
|
|
@@ -14,7 +13,7 @@ export class EntityId<T> {
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
toPrimitive(): T {
|
|
17
|
-
return this.
|
|
16
|
+
return this._recordId;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
toString(): string {
|