@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[level](logMessage, context);
35
- const db = this.context.drizzle();
36
- try {
37
- await db
38
- .insert(schema.logs)
39
- .values({
40
- id: logId,
41
- level,
42
- message,
43
- context: JSON.stringify(context),
44
- createdAt: new Date().getTime(),
45
- })
46
- .execute();
47
- } catch (error) {
48
- console.error('[ERROR] Failed to persist log to database:', {
49
- error,
50
- logId,
51
- message,
52
- context,
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[level](logMessage, context);
29
- const db = this.context.drizzle();
30
- try {
31
- await db
32
- .insert(schema.logs)
33
- .values({
34
- id: logId,
35
- level,
36
- message,
37
- context: JSON.stringify(context),
38
- createdAt: new Date().getTime(),
39
- })
40
- .execute();
41
- } catch (error) {
42
- console.error('[ERROR] Failed to persist log to database:', {
43
- error,
44
- logId,
45
- message,
46
- rawContext: context,
47
- stringifiedContext: JSON.stringify(context),
48
- createdAt: new Date().getTime(),
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(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.367",
3
+ "version": "0.0.368",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {