@zodic/shared 0.0.171 → 0.0.172

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.
@@ -68,19 +68,37 @@ export class ConceptService {
68
68
  // 🔥 If names already exist in KV but not in DO, add them
69
69
  if (existingEN.name && !allNamesEN.includes(existingEN.name)) {
70
70
  console.log(`⚡ Backfilling existing name to DO: ${existingEN.name}`);
71
- await fetch(`${doUrl}/add`, {
72
- method: 'POST',
73
- body: JSON.stringify({ language: 'en-us', name: existingEN.name }),
74
- headers: { 'Content-Type': 'application/json' },
75
- });
71
+ try {
72
+ await fetch(`${doUrl}/add`, {
73
+ method: 'POST',
74
+ body: JSON.stringify({
75
+ language: 'en-us',
76
+ name: existingEN.name,
77
+ }),
78
+ headers: { 'Content-Type': 'application/json' },
79
+ });
80
+ } catch (e) {
81
+ console.error(
82
+ `!-- Error on fetch ConceptNames ${(e as Error).message}`
83
+ );
84
+ }
76
85
  }
77
86
  if (existingPT.name && !allNamesPT.includes(existingPT.name)) {
78
87
  console.log(`⚡ Backfilling existing name to DO: ${existingPT.name}`);
79
- await fetch(`${doUrl}/add`, {
80
- method: 'POST',
81
- body: JSON.stringify({ language: 'pt-br', name: existingPT.name }),
82
- headers: { 'Content-Type': 'application/json' },
83
- });
88
+ try {
89
+ await fetch(`${doUrl}/add`, {
90
+ method: 'POST',
91
+ body: JSON.stringify({
92
+ language: 'pt-br',
93
+ name: existingPT.name,
94
+ }),
95
+ headers: { 'Content-Type': 'application/json' },
96
+ });
97
+ } catch (e) {
98
+ console.error(
99
+ `!-- Error on fetch ConceptNames ${(e as Error).message}`
100
+ );
101
+ }
84
102
  }
85
103
 
86
104
  // ✅ Skip generation if basic info already exists and override is false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.171",
3
+ "version": "0.0.172",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {