@zodic/shared 0.0.187 → 0.0.188

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.
@@ -88,23 +88,25 @@ export class ConceptNameDO {
88
88
  await this.loadCount();
89
89
  await this.loadTimestamps();
90
90
  await this.loadLastIndex(); // ✅ Ensure latest lastIndex is fetched
91
-
91
+
92
92
  const now = Date.now();
93
93
  const oneMinuteAgo = now - 60 * 1000;
94
-
94
+
95
95
  const recentTimestamps = this.timestamps.filter((ts) => ts >= oneMinuteAgo);
96
96
  const ratePerMinute = recentTimestamps.length;
97
-
98
- const remainingNames = ConceptNameDO.TOTAL_NAMES - this.count;
97
+
98
+ // 🔥 Only count the `en-us` names to reflect progress properly
99
+ const enUsCount = this.names['en-us'].length;
100
+
101
+ const remainingNames = ConceptNameDO.TOTAL_NAMES - enUsCount;
99
102
  const estimatedTimeMinutes =
100
103
  ratePerMinute > 0 ? Math.round(remainingNames / ratePerMinute) : 'N/A';
101
-
104
+
102
105
  return {
103
- count: this.count,
104
- total: ConceptNameDO.TOTAL_NAMES,
105
- lastIndex: this.lastIndex, // ✅ Include lastIndex in response
106
- progress:
107
- ((this.count / ConceptNameDO.TOTAL_NAMES) * 100).toFixed(2) + '%',
106
+ count: this.count, // ✅ Keep full count (en-us + pt-br)
107
+ total: ConceptNameDO.TOTAL_NAMES, // ✅ Base progress on 1728
108
+ lastIndex: this.lastIndex,
109
+ progress: ((enUsCount / ConceptNameDO.TOTAL_NAMES) * 100).toFixed(2) + '%', // ✅ Use only en-us count
108
110
  ratePerMinute,
109
111
  estimatedTimeMinutes,
110
112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.187",
3
+ "version": "0.0.188",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {