@zodic/shared 0.0.367 → 0.0.368
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.
|
@@ -28,30 +28,28 @@ export class ArchetypeService {
|
|
|
28
28
|
message: string,
|
|
29
29
|
context: Record<string, any> = {}
|
|
30
30
|
) {
|
|
31
|
-
const logId = `archetype-service:${Date.now()}`;
|
|
32
31
|
const logMessage = `[${level.toUpperCase()}] ${message}`;
|
|
33
32
|
|
|
34
|
-
console
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
33
|
+
console.log(logMessage, context);
|
|
34
|
+
// try {
|
|
35
|
+
// await db
|
|
36
|
+
// .insert(schema.logs)
|
|
37
|
+
// .values({
|
|
38
|
+
// id: logId,
|
|
39
|
+
// level,
|
|
40
|
+
// message,
|
|
41
|
+
// context: JSON.stringify(context),
|
|
42
|
+
// createdAt: new Date().getTime(),
|
|
43
|
+
// })
|
|
44
|
+
// .execute();
|
|
45
|
+
// } catch (error) {
|
|
46
|
+
// console.error('[ERROR] Failed to persist log to database:', {
|
|
47
|
+
// error,
|
|
48
|
+
// logId,
|
|
49
|
+
// message,
|
|
50
|
+
// context,
|
|
51
|
+
// });
|
|
52
|
+
// }
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
// Replace generateArchetypeNames and generateArchetypeNamesBatch
|
|
@@ -877,7 +875,7 @@ export class ArchetypeService {
|
|
|
877
875
|
|
|
878
876
|
const db = this.context.drizzle();
|
|
879
877
|
|
|
880
|
-
type Binary = 'male' | 'female'
|
|
878
|
+
type Binary = 'male' | 'female';
|
|
881
879
|
|
|
882
880
|
// Fetch archetypes for male and female with language = 'en-us'
|
|
883
881
|
const allGenders: Binary[] = ['male', 'female'];
|
|
@@ -22,32 +22,30 @@ export class ArtifactService {
|
|
|
22
22
|
message: string,
|
|
23
23
|
context: Record<string, any> = {}
|
|
24
24
|
) {
|
|
25
|
-
const logId = `artifact-service:${Date.now()}`;
|
|
26
25
|
const logMessage = `[${level.toUpperCase()}] ${message}`;
|
|
27
26
|
|
|
28
|
-
console
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
27
|
+
console.log(logMessage, context);
|
|
28
|
+
// try {
|
|
29
|
+
// await db
|
|
30
|
+
// .insert(schema.logs)
|
|
31
|
+
// .values({
|
|
32
|
+
// id: logId,
|
|
33
|
+
// level,
|
|
34
|
+
// message,
|
|
35
|
+
// context: JSON.stringify(context),
|
|
36
|
+
// createdAt: new Date().getTime(),
|
|
37
|
+
// })
|
|
38
|
+
// .execute();
|
|
39
|
+
// } catch (error) {
|
|
40
|
+
// console.error('[ERROR] Failed to persist log to database:', {
|
|
41
|
+
// error,
|
|
42
|
+
// logId,
|
|
43
|
+
// message,
|
|
44
|
+
// rawContext: context,
|
|
45
|
+
// stringifiedContext: JSON.stringify(context),
|
|
46
|
+
// createdAt: new Date().getTime(),
|
|
47
|
+
// });
|
|
48
|
+
// }
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
async generateCosmicMirror(
|