@zodic/shared 0.0.188 → 0.0.189

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.
@@ -85,10 +85,22 @@ export class ConceptNameDO {
85
85
  ratePerMinute: number;
86
86
  estimatedTimeMinutes: number | 'N/A';
87
87
  }> {
88
+ console.log(`📡 Fetching progress...`);
89
+
90
+ // 🔥 Fetch latest names directly from storage
91
+ const storedNames = await this.state.storage.get<{ 'en-us': string[]; 'pt-br': string[] }>('names');
92
+ if (storedNames) {
93
+ this.names = storedNames;
94
+ } else {
95
+ this.names = { 'en-us': [], 'pt-br': [] };
96
+ }
97
+
88
98
  await this.loadCount();
89
99
  await this.loadTimestamps();
90
100
  await this.loadLastIndex(); // ✅ Ensure latest lastIndex is fetched
91
101
 
102
+ console.log(`🔍 Current stored names (DO): ${JSON.stringify(this.names)}`);
103
+
92
104
  const now = Date.now();
93
105
  const oneMinuteAgo = now - 60 * 1000;
94
106
 
@@ -96,7 +108,11 @@ export class ConceptNameDO {
96
108
  const ratePerMinute = recentTimestamps.length;
97
109
 
98
110
  // 🔥 Only count the `en-us` names to reflect progress properly
99
- const enUsCount = this.names['en-us'].length;
111
+ const enUsCount = Array.isArray(this.names['en-us']) ? this.names['en-us'].length : 0;
112
+
113
+ console.log(
114
+ `🛠️ Debugging Progress: count=${this.count}, en-us=${enUsCount}, lastIndex=${this.lastIndex}`
115
+ );
100
116
 
101
117
  const remainingNames = ConceptNameDO.TOTAL_NAMES - enUsCount;
102
118
  const estimatedTimeMinutes =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.188",
3
+ "version": "0.0.189",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {