zenrows 1.3.0 → 1.3.2

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/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.3.0";
1
+ export declare const VERSION = "1.3.2";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.3.0';
4
+ exports.VERSION = '1.3.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenrows",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "ZenRows Node SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist/queue.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare const queue: (concurrency: number) => {
2
- enqueue: Function;
3
- };
4
- export { queue };
package/dist/queue.js DELETED
@@ -1,37 +0,0 @@
1
- "use strict";
2
- // TODO review disabled!!!!
3
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
- return new (P || (P = Promise))(function (resolve, reject) {
6
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
- step((generator = generator.apply(thisArg, _arguments || [])).next());
10
- });
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.queue = void 0;
14
- /* eslint-disable @typescript-eslint/ban-types */
15
- const queue = (concurrency) => {
16
- let running = 0;
17
- const tasks = [];
18
- return {
19
- enqueue: (givenTask, ...givenParams) => __awaiter(void 0, void 0, void 0, function* () {
20
- tasks.push({ task: givenTask, params: givenParams });
21
- if (running >= concurrency) {
22
- return;
23
- }
24
- running += 1;
25
- while (tasks.length > 0) {
26
- const nextTask = tasks.shift();
27
- if (nextTask) {
28
- const { task, params } = nextTask;
29
- // eslint-disable-next-line no-await-in-loop
30
- yield task(...params);
31
- }
32
- }
33
- running -= 1;
34
- }),
35
- };
36
- };
37
- exports.queue = queue;