apify 4.0.0-beta.93 → 4.0.0-beta.94
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.
- package/dist/charging.js +9 -0
- package/package.json +1 -1
package/dist/charging.js
CHANGED
|
@@ -182,6 +182,15 @@ export class ChargingManager {
|
|
|
182
182
|
chargeableWithinLimit: this.calculateChargeableWithinLimit(),
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
+
// Match the Python SDK: a non-positive count never reaches the platform and never
|
|
186
|
+
// mutates local charge state (a negative count would otherwise decrement the budget).
|
|
187
|
+
if (count <= 0) {
|
|
188
|
+
return {
|
|
189
|
+
eventChargeLimitReached: false,
|
|
190
|
+
chargedCount: 0,
|
|
191
|
+
chargeableWithinLimit: this.calculateChargeableWithinLimit(),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
185
194
|
const chargingState = this.#chargingState;
|
|
186
195
|
if (chargingState === undefined) {
|
|
187
196
|
throw new Error('ChargingManager is not initialized');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.94",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13.0"
|