@zodic/shared 0.0.227 → 0.0.229

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.
@@ -436,13 +436,12 @@ export class ConceptService {
436
436
  );
437
437
  }
438
438
 
439
- if (
440
- !override &&
441
- conceptEN?.content!.length > 0 &&
442
- conceptPT?.content!.length > 0
443
- ) {
439
+ const contentEN = conceptEN?.content ? JSON.parse(conceptEN.content) : [];
440
+ const contentPT = conceptPT?.content ? JSON.parse(conceptPT.content) : [];
441
+
442
+ if (!override && contentEN.length > 0 && contentPT.length > 0) {
444
443
  console.log(`⚡ Content already exists for ${conceptSlug}, skipping.`);
445
- return; // ✅ Skip regeneration
444
+ return;
446
445
  }
447
446
 
448
447
  let attempts = 0;
@@ -482,30 +481,28 @@ export class ConceptService {
482
481
  console.log(
483
482
  `💾 Storing structured content for ${conceptSlug}:${combinationString} in D1...`
484
483
  );
485
-
486
- await db.transaction(async (tx) => {
487
- await tx
488
- .update(conceptsData)
489
- .set({ content: JSON.stringify(structuredContentEN) })
490
- .where(
491
- and(
492
- eq(conceptsData.id, conceptEN.id),
493
- eq(conceptsData.language, 'en-us')
494
- )
495
- )
496
- .execute();
497
-
498
- await tx
499
- .update(conceptsData)
500
- .set({ content: JSON.stringify(structuredContentPT) })
501
- .where(
502
- and(
503
- eq(conceptsData.id, conceptPT.id),
504
- eq(conceptsData.language, 'pt-br')
505
- )
506
- )
507
- .execute();
508
- });
484
+ await db
485
+ .batch([
486
+ db
487
+ .update(conceptsData)
488
+ .set({ content: JSON.stringify(structuredContentEN) })
489
+ .where(
490
+ and(
491
+ eq(conceptsData.id, conceptEN.id),
492
+ eq(conceptsData.language, 'en-us')
493
+ )
494
+ ),
495
+
496
+ db
497
+ .update(conceptsData)
498
+ .set({ content: JSON.stringify(structuredContentPT) })
499
+ .where(
500
+ and(
501
+ eq(conceptsData.id, conceptPT.id),
502
+ eq(conceptsData.language, 'pt-br')
503
+ )
504
+ ),
505
+ ]);
509
506
 
510
507
  console.log(
511
508
  `✅ Structured content stored successfully for ${conceptSlug}:${combinationString}.`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.227",
3
+ "version": "0.0.229",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -362,6 +362,9 @@ Rules & Formatting:
362
362
  • Avoid mentioning zodiac signs or planets explicitly in the text.
363
363
  • Ensure the content is symbolic, empowering, and deeply aligned with the Crown’s themes.
364
364
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
365
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
366
+ • Balance the description of the concept itself and of the bearer's traits.
367
+
365
368
 
366
369
  Response Format:
367
370
 
@@ -393,7 +396,8 @@ Rules & Formatting:
393
396
  • Avoid mentioning zodiac signs or planets explicitly in the text.
394
397
  • Ensure the content is symbolic, insightful, and deeply aligned with the Scepter’s themes.
395
398
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
396
-
399
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
400
+ • Balance the description of the concept itself and of the bearer's traits.
397
401
 
398
402
  Response Format:
399
403
 
@@ -426,6 +430,8 @@ Rules & Formatting:
426
430
  • Avoid mentioning zodiac signs or planets explicitly in the text.
427
431
  • Ensure the content is symbolic, poetic, and deeply aligned with the Ring’s themes.
428
432
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
433
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
434
+ • Balance the description of the concept itself and of the bearer's traits.
429
435
 
430
436
  Response Format:
431
437
 
@@ -457,6 +463,8 @@ Rules & Formatting:
457
463
  • Avoid mentioning zodiac signs or planets explicitly in the text.
458
464
  • Ensure the content is symbolic, inspiring, and deeply aligned with the Amulet’s themes.
459
465
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
466
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
467
+ • Balance the description of the concept itself and of the bearer's traits.
460
468
 
461
469
  Response Format:
462
470
 
@@ -489,6 +497,8 @@ Rules & Formatting:
489
497
  • Avoid mentioning zodiac signs or planets explicitly in the text.
490
498
  • Ensure the content is symbolic, introspective, and deeply aligned with the Lantern’s themes.
491
499
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
500
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
501
+ • Balance the description of the concept itself and of the bearer's traits.
492
502
 
493
503
  Response Format:
494
504
 
@@ -521,6 +531,8 @@ Rules & Formatting:
521
531
  • Avoid mentioning zodiac signs or planets explicitly in the text.
522
532
  • Ensure the content is symbolic, expansive, and deeply aligned with the Orb’s themes.
523
533
  • Keep the Portuguese version faithful in tone and depth to the English version, adapting naturally rather than translating literally.
534
+ • Avoid repeating the full name of the concept (e.g., The Crown of Fiery Focus, The Amulet of Eternal Harmony). Instead, refer to it using general and unnespecific forms, without unnecessary repetition.
535
+ • Balance the description of the concept itself and of the bearer's traits.
524
536
 
525
537
  Response Format:
526
538