@wikicasa-dev/node-common 1.2.1 → 1.2.3

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.
@@ -1,5 +1,5 @@
1
1
  import throttledQueue from "throttled-queue";
2
- import Console, { COLORS } from "./Console.js";
2
+ import { Console, COLORS } from "./Console.js";
3
3
  import { EventEmitter } from "events";
4
4
  import axios from "axios";
5
5
  import { sleep } from "./common.js";
@@ -11,7 +11,7 @@ export declare enum COLORS {
11
11
  /**
12
12
  * @author Andrea Moraglia
13
13
  */
14
- export default class Console {
14
+ export declare class Console {
15
15
  private static prefix;
16
16
  private static postfix;
17
17
  private static loader;
@@ -15,7 +15,7 @@ export var COLORS;
15
15
  /**
16
16
  * @author Andrea Moraglia
17
17
  */
18
- export default class Console {
18
+ export class Console {
19
19
  static prefix = null;
20
20
  static postfix = null;
21
21
  static loader;
@@ -16,7 +16,7 @@ interface ICrawlerOptions {
16
16
  pageCallback?: (results: Array<Record<string, any>>, index: number) => void;
17
17
  callback?: (results: Array<Record<string, any>>, index: number, first: boolean) => void;
18
18
  }
19
- export default class Crawler implements ICrawler {
19
+ export declare class Crawler implements ICrawler {
20
20
  drivers: Array<ThenableWebDriver>;
21
21
  first: boolean;
22
22
  options: ICrawlerOptions;
@@ -1,8 +1,8 @@
1
1
  import { pool } from "./common.js";
2
2
  import Webdriver from "selenium-webdriver";
3
- import Console from "./Console.js";
3
+ import { Console } from "./Console.js";
4
4
  import { Options } from "selenium-webdriver/chrome.js";
5
- export default class Crawler {
5
+ export class Crawler {
6
6
  drivers = [];
7
7
  first = true;
8
8
  options = {
package/dist/src/Pool.js CHANGED
@@ -1,4 +1,4 @@
1
- import Console, { COLORS } from "./Console.js";
1
+ import { Console, COLORS } from "./Console.js";
2
2
  const BATCH_SIZE = 1000;
3
3
  export class Pool {
4
4
  name;
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
  import { PromisePool } from "@supercharge/promise-pool";
3
- import Console from "./Console.js";
3
+ import { Console } from "./Console.js";
4
4
  import { brotliCompressSync, brotliDecompressSync } from "zlib";
5
5
  import { parse } from "csv-parse/sync";
6
6
  export class CustomError extends Error {
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/node-common",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Wikicasa node common",
5
5
  "type": "module",
6
+ "types": "./dist/index.d.ts",
6
7
  "files": [
7
8
  "dist"
8
9
  ],