@jmlq/auth 0.0.1-alpha.4 → 0.0.1-alpha.6
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/domain/object-values/id.js +3 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Id = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
4
5
|
const errors_1 = require("../errors");
|
|
5
6
|
class Id {
|
|
6
7
|
constructor(id) {
|
|
@@ -19,10 +20,8 @@ class Id {
|
|
|
19
20
|
return this.value;
|
|
20
21
|
}
|
|
21
22
|
static generate() {
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
const random = Math.random().toString(36).substring(2);
|
|
25
|
-
return new Id(`${timestamp}-${random}`);
|
|
23
|
+
// UUID
|
|
24
|
+
return new Id((0, node_crypto_1.randomUUID)());
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
exports.Id = Id;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -21,6 +21,8 @@ __exportStar(require("./application/factories"), exports);
|
|
|
21
21
|
__exportStar(require("./domain/ports"), exports);
|
|
22
22
|
// Entities
|
|
23
23
|
__exportStar(require("./domain/entities"), exports);
|
|
24
|
+
// VOs
|
|
25
|
+
__exportStar(require("./domain/object-values"), exports);
|
|
24
26
|
// Contratos (ports) + config
|
|
25
27
|
__exportStar(require("./domain/props"), exports);
|
|
26
28
|
// Errores públicos
|