@odg/chemical-x 1.5.3 → 1.6.0
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/Enums/RetryAction.d.ts +32 -0
- package/dist/Enums/RetryAction.js +37 -0
- package/dist/Enums/RetryAction.js.map +1 -0
- package/dist/Enums/index.d.ts +1 -0
- package/dist/Enums/index.js +18 -0
- package/dist/Enums/index.js.map +1 -0
- package/dist/Exceptions/index.d.ts +1 -0
- package/dist/Exceptions/index.js +1 -0
- package/dist/Exceptions/index.js.map +1 -1
- package/dist/Helpers/retry.d.ts +3 -81
- package/dist/Helpers/retry.js +9 -50
- package/dist/Helpers/retry.js.map +1 -1
- package/dist/Interfaces/CloneableInterface.js +3 -0
- package/dist/Interfaces/CloneableInterface.js.map +1 -0
- package/dist/Interfaces/{Cloneable.js → NativeInterface.js} +1 -1
- package/dist/Interfaces/NativeInterface.js.map +1 -0
- package/dist/Interfaces/RetryInterface.d.ts +39 -0
- package/dist/Interfaces/{Native.js → RetryInterface.js} +1 -1
- package/dist/Interfaces/RetryInterface.js.map +1 -0
- package/dist/Interfaces/index.d.ts +4 -2
- package/dist/Interfaces/index.js +4 -2
- package/dist/Interfaces/index.js.map +1 -1
- package/dist/Support/Arr.d.ts +3 -3
- package/dist/Support/Arr.js +4 -3
- package/dist/Support/Arr.js.map +1 -1
- package/dist/Support/Num.js +1 -0
- package/dist/Support/Num.js.map +1 -1
- package/dist/Support/Str.d.ts +2 -2
- package/dist/Support/Str.js +9 -10
- package/dist/Support/Str.js.map +1 -1
- package/dist/crawler/Browser.js +11 -4
- package/dist/crawler/Browser.js.map +1 -1
- package/dist/crawler/Context.js +7 -2
- package/dist/crawler/Context.js.map +1 -1
- package/dist/crawler/Handlers/BaseHandler.d.ts +11 -15
- package/dist/crawler/Handlers/BaseHandler.js +17 -19
- package/dist/crawler/Handlers/BaseHandler.js.map +1 -1
- package/dist/crawler/Interfaces/HandlerInterface.d.ts +1 -2
- package/dist/crawler/Interfaces/HandlerInterface.js +1 -1
- package/dist/crawler/Interfaces/HandlerInterface.js.map +1 -1
- package/dist/crawler/Interfaces/PageInterface.d.ts +1 -7
- package/dist/crawler/Page.js +4 -0
- package/dist/crawler/Page.js.map +1 -1
- package/dist/crawler/Pages/BasePage.d.ts +2 -3
- package/dist/crawler/Pages/BasePage.js +12 -13
- package/dist/crawler/Pages/BasePage.js.map +1 -1
- package/dist/crawler/index.d.ts +0 -2
- package/dist/crawler/index.js +0 -2
- package/dist/crawler/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/FunctionType.d.ts +0 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +22 -15
- package/dist/Interfaces/Cloneable.js.map +0 -1
- package/dist/Interfaces/Native.js.map +0 -1
- package/dist/Interfaces/{Cloneable.d.ts → CloneableInterface.d.ts} +0 -0
- package/dist/Interfaces/{Native.d.ts → NativeInterface.d.ts} +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retry Enum return type
|
|
3
|
+
*
|
|
4
|
+
* @enum {string}
|
|
5
|
+
*/
|
|
6
|
+
export declare enum RetryAction {
|
|
7
|
+
/**
|
|
8
|
+
* Use this force retry.
|
|
9
|
+
*
|
|
10
|
+
* @memberof RetryAction
|
|
11
|
+
*/
|
|
12
|
+
Retry = "Retry",
|
|
13
|
+
/**
|
|
14
|
+
* Use this force retry error.
|
|
15
|
+
*
|
|
16
|
+
* @memberof RetryAction
|
|
17
|
+
*/
|
|
18
|
+
Throw = "Throw",
|
|
19
|
+
/**
|
|
20
|
+
* Use this to complete Retry with undefined return
|
|
21
|
+
*
|
|
22
|
+
* @memberof RetryAction
|
|
23
|
+
*/
|
|
24
|
+
Resolve = "Resolve",
|
|
25
|
+
/**
|
|
26
|
+
* To follow default behavior
|
|
27
|
+
* `times` is considered
|
|
28
|
+
*
|
|
29
|
+
* @memberof RetryAction
|
|
30
|
+
*/
|
|
31
|
+
Default = "Default"
|
|
32
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryAction = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Retry Enum return type
|
|
6
|
+
*
|
|
7
|
+
* @enum {string}
|
|
8
|
+
*/
|
|
9
|
+
var RetryAction;
|
|
10
|
+
(function (RetryAction) {
|
|
11
|
+
/**
|
|
12
|
+
* Use this force retry.
|
|
13
|
+
*
|
|
14
|
+
* @memberof RetryAction
|
|
15
|
+
*/
|
|
16
|
+
RetryAction["Retry"] = "Retry";
|
|
17
|
+
/**
|
|
18
|
+
* Use this force retry error.
|
|
19
|
+
*
|
|
20
|
+
* @memberof RetryAction
|
|
21
|
+
*/
|
|
22
|
+
RetryAction["Throw"] = "Throw";
|
|
23
|
+
/**
|
|
24
|
+
* Use this to complete Retry with undefined return
|
|
25
|
+
*
|
|
26
|
+
* @memberof RetryAction
|
|
27
|
+
*/
|
|
28
|
+
RetryAction["Resolve"] = "Resolve";
|
|
29
|
+
/**
|
|
30
|
+
* To follow default behavior
|
|
31
|
+
* `times` is considered
|
|
32
|
+
*
|
|
33
|
+
* @memberof RetryAction
|
|
34
|
+
*/
|
|
35
|
+
RetryAction["Default"] = "Default";
|
|
36
|
+
})(RetryAction || (exports.RetryAction = RetryAction = {}));
|
|
37
|
+
//# sourceMappingURL=RetryAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RetryAction.js","sourceRoot":"","sources":["../../src/Enums/RetryAction.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,WA8BX;AA9BD,WAAY,WAAW;IAEnB;;;;OAIG;IACH,8BAAe,CAAA;IAEf;;;;OAIG;IACH,8BAAe,CAAA;IAEf;;;;OAIG;IACH,kCAAmB,CAAA;IAEnB;;;;;OAKG;IACH,kCAAmB,CAAA;AACvB,CAAC,EA9BW,WAAW,2BAAX,WAAW,QA8BtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RetryAction";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./RetryAction"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
package/dist/Exceptions/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./MoneyNotFoundException"), exports);
|
|
18
18
|
__exportStar(require("./MoneyMultipleResultException"), exports);
|
|
19
19
|
__exportStar(require("./InvalidArgumentException"), exports);
|
|
20
|
+
__exportStar(require("../crawler/Exceptions"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,iEAA+C;AAC/C,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,iEAA+C;AAC/C,6DAA2C;AAC3C,wDAAsC"}
|
package/dist/Helpers/retry.d.ts
CHANGED
|
@@ -1,81 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Retry options
|
|
6
|
-
*
|
|
7
|
-
* @template {any} ReturnType Function callback return
|
|
8
|
-
* @interface RetryOptionsInterface
|
|
9
|
-
* @template ReturnType
|
|
10
|
-
*/
|
|
11
|
-
interface RetryOptionsInterface<ReturnType = RetryAction> {
|
|
12
|
-
/**
|
|
13
|
-
* Number of times to retry
|
|
14
|
-
* 0 = No retry
|
|
15
|
-
*
|
|
16
|
-
* @type {number}
|
|
17
|
-
* @memberof RetryOptionsInterface
|
|
18
|
-
*/
|
|
19
|
-
times: number;
|
|
20
|
-
/**
|
|
21
|
-
* Sleep Time in milliseconds before retry
|
|
22
|
-
*
|
|
23
|
-
* @type {number}
|
|
24
|
-
* @memberof RetryOptionsInterface
|
|
25
|
-
*/
|
|
26
|
-
sleep?: number;
|
|
27
|
-
/**
|
|
28
|
-
* Function to retry
|
|
29
|
-
*
|
|
30
|
-
* @type {FunctionParameterType<PromiseOrSyncType<ReturnType>, number>}
|
|
31
|
-
* @memberof RetryOptionsInterface
|
|
32
|
-
*/
|
|
33
|
-
callback: FunctionParameterType<PromiseOrSyncType<ReturnType>, number>;
|
|
34
|
-
/**
|
|
35
|
-
* Validate what must be done before trying again
|
|
36
|
-
*
|
|
37
|
-
* @memberof RetryOptionsInterface
|
|
38
|
-
*/
|
|
39
|
-
when?(exception: Exception, times: number): Promise<RetryAction> | RetryAction;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Retry Enum return type
|
|
43
|
-
*
|
|
44
|
-
* @enum {string}
|
|
45
|
-
*/
|
|
46
|
-
export declare enum RetryAction {
|
|
47
|
-
/**
|
|
48
|
-
* Use this force retry.
|
|
49
|
-
*
|
|
50
|
-
* @memberof RetryAction
|
|
51
|
-
*/
|
|
52
|
-
Retry = "Retry",
|
|
53
|
-
/**
|
|
54
|
-
* Use this force retry error.
|
|
55
|
-
*
|
|
56
|
-
* @memberof RetryAction
|
|
57
|
-
*/
|
|
58
|
-
Throw = "Throw",
|
|
59
|
-
/**
|
|
60
|
-
* Use this to complete Retry with undefined return
|
|
61
|
-
*
|
|
62
|
-
* @memberof RetryAction
|
|
63
|
-
*/
|
|
64
|
-
Resolve = "Resolve",
|
|
65
|
-
/**
|
|
66
|
-
* To follow default behavior
|
|
67
|
-
* `times` is considered
|
|
68
|
-
*
|
|
69
|
-
* @memberof RetryAction
|
|
70
|
-
*/
|
|
71
|
-
Default = "Default"
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Retry Function recursive
|
|
75
|
-
*
|
|
76
|
-
* @template {any} ReturnType
|
|
77
|
-
* @param {RetryOptionsInterface} options Options Retry
|
|
78
|
-
* @returns {Promise<ReturnType>}
|
|
79
|
-
*/
|
|
80
|
-
export declare function retry<ReturnType>(options: RetryOptionsInterface<ReturnType>): Promise<ReturnType | undefined>;
|
|
81
|
-
export {};
|
|
1
|
+
import { type RetryOptionsInterface, type RetryWhenDefaultInterface, type RetryWhenResolveInterface } from "../Interfaces";
|
|
2
|
+
export declare function retry<ReturnType>(options: RetryOptionsInterface<ReturnType> & RetryWhenDefaultInterface): Promise<ReturnType>;
|
|
3
|
+
export declare function retry<ReturnType>(options: RetryOptionsInterface<ReturnType> & RetryWhenResolveInterface): Promise<ReturnType | undefined>;
|
package/dist/Helpers/retry.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retry =
|
|
3
|
+
exports.retry = void 0;
|
|
4
4
|
const exception_1 = require("@odg/exception");
|
|
5
|
+
const _enums_1 = require("../Enums");
|
|
5
6
|
const _1 = require(".");
|
|
6
7
|
async function getWhen(exception, options) {
|
|
7
|
-
var _a;
|
|
8
8
|
const exceptionParse = exception_1.UnknownException.parseOrDefault(exception, "Retry unknown Exception");
|
|
9
|
-
const when = await
|
|
10
|
-
const ignore = [RetryAction.Retry, RetryAction.Resolve];
|
|
11
|
-
if (when === RetryAction.Throw)
|
|
9
|
+
const when = await options.when?.(exceptionParse, options.attempt);
|
|
10
|
+
const ignore = [_enums_1.RetryAction.Retry, _enums_1.RetryAction.Resolve];
|
|
11
|
+
if (when === _enums_1.RetryAction.Throw)
|
|
12
12
|
throw exceptionParse;
|
|
13
13
|
if (options.times <= 1 && !ignore.includes(when)) {
|
|
14
14
|
throw exceptionParse;
|
|
@@ -19,20 +19,19 @@ async function getWhen(exception, options) {
|
|
|
19
19
|
* Retry Function recursive
|
|
20
20
|
*
|
|
21
21
|
* @template {any} ReturnType
|
|
22
|
-
* @param {RetryOptionsInterface & { attempt: number }} options Options Retry
|
|
23
|
-
* @returns {Promise<ReturnType>}
|
|
22
|
+
* @param {RetryOptionsInterface<ReturnType> & { attempt: number }} options Options Retry
|
|
23
|
+
* @returns {Promise<ReturnType | undefined>}
|
|
24
24
|
*/
|
|
25
25
|
async function retryHelper(options) {
|
|
26
|
-
var _a;
|
|
27
26
|
try {
|
|
28
27
|
return await options.callback.call(options.callback, options.attempt);
|
|
29
28
|
}
|
|
30
29
|
catch (exception) {
|
|
31
30
|
const when = await getWhen(exception, options);
|
|
32
|
-
if (when === RetryAction.Resolve) {
|
|
31
|
+
if (when === _enums_1.RetryAction.Resolve) {
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
|
-
await (0, _1.sleep)(
|
|
34
|
+
await (0, _1.sleep)(options.sleep ?? 0);
|
|
36
35
|
return retryHelper({
|
|
37
36
|
...options,
|
|
38
37
|
times: options.times - 1,
|
|
@@ -40,46 +39,6 @@ async function retryHelper(options) {
|
|
|
40
39
|
});
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Retry Enum return type
|
|
45
|
-
*
|
|
46
|
-
* @enum {string}
|
|
47
|
-
*/
|
|
48
|
-
var RetryAction;
|
|
49
|
-
(function (RetryAction) {
|
|
50
|
-
/**
|
|
51
|
-
* Use this force retry.
|
|
52
|
-
*
|
|
53
|
-
* @memberof RetryAction
|
|
54
|
-
*/
|
|
55
|
-
RetryAction["Retry"] = "Retry";
|
|
56
|
-
/**
|
|
57
|
-
* Use this force retry error.
|
|
58
|
-
*
|
|
59
|
-
* @memberof RetryAction
|
|
60
|
-
*/
|
|
61
|
-
RetryAction["Throw"] = "Throw";
|
|
62
|
-
/**
|
|
63
|
-
* Use this to complete Retry with undefined return
|
|
64
|
-
*
|
|
65
|
-
* @memberof RetryAction
|
|
66
|
-
*/
|
|
67
|
-
RetryAction["Resolve"] = "Resolve";
|
|
68
|
-
/**
|
|
69
|
-
* To follow default behavior
|
|
70
|
-
* `times` is considered
|
|
71
|
-
*
|
|
72
|
-
* @memberof RetryAction
|
|
73
|
-
*/
|
|
74
|
-
RetryAction["Default"] = "Default";
|
|
75
|
-
})(RetryAction = exports.RetryAction || (exports.RetryAction = {}));
|
|
76
|
-
/**
|
|
77
|
-
* Retry Function recursive
|
|
78
|
-
*
|
|
79
|
-
* @template {any} ReturnType
|
|
80
|
-
* @param {RetryOptionsInterface} options Options Retry
|
|
81
|
-
* @returns {Promise<ReturnType>}
|
|
82
|
-
*/
|
|
83
42
|
async function retry(options) {
|
|
84
43
|
return retryHelper({
|
|
85
44
|
...options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/Helpers/retry.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/Helpers/retry.ts"],"names":[],"mappings":";;;AAAA,8CAAkD;AAElD,mCAAqC;AAOrC,wBAA0B;AAE1B,KAAK,UAAU,OAAO,CAClB,SAAkB,EAClB,OAAyF;IAEzF,MAAM,cAAc,GAAG,4BAAgB,CAAC,cAAc,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;IAC7F,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,CAAE,oBAAW,CAAC,KAAK,EAAE,oBAAW,CAAC,OAAO,CAAE,CAAC;IAC1D,IAAI,IAAI,KAAK,oBAAW,CAAC,KAAK;QAAE,MAAM,cAAc,CAAC;IAErD,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAK,CAAC,EAAE;QAC/C,MAAM,cAAc,CAAC;KACxB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,WAAW,CACtB,OAAgE;IAEhE,IAAI;QACA,OAAO,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;KACzE;IAAC,OAAO,SAAkB,EAAE;QACzB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC/C,IAAI,IAAI,KAAK,oBAAW,CAAC,OAAO,EAAE;YAC9B,OAAO;SACV;QAED,MAAM,IAAA,QAAK,EAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;QAEhC,OAAO,WAAW,CAAC;YACf,GAAG,OAAO;YACV,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC;YACxB,OAAO,EAAE,OAAO,CAAC,OAAO,GAAG,CAAC;SAC/B,CAAC,CAAC;KACN;AACL,CAAC;AAUM,KAAK,UAAU,KAAK,CACvB,OAA0C;IAE1C,OAAO,WAAW,CAAC;QACf,GAAG,OAAO;QACV,OAAO,EAAE,CAAC;KACb,CAAC,CAAC;AACP,CAAC;AAPD,sBAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloneableInterface.js","sourceRoot":"","sources":["../../src/Interfaces/CloneableInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeInterface.js","sourceRoot":"","sources":["../../src/Interfaces/NativeInterface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type Exception } from "@odg/exception";
|
|
2
|
+
import { type PromiseOrSyncType } from "../types/PromiseSyncType";
|
|
3
|
+
import { type RetryAction } from "../Enums";
|
|
4
|
+
/**
|
|
5
|
+
* Retry options
|
|
6
|
+
*
|
|
7
|
+
* @interface RetryOptionsInterface
|
|
8
|
+
* @template {any} ReturnType Function callback return
|
|
9
|
+
* @template ReturnType
|
|
10
|
+
*/
|
|
11
|
+
export interface RetryOptionsInterface<ReturnType = undefined> {
|
|
12
|
+
/**
|
|
13
|
+
* Number of times to retry
|
|
14
|
+
* 0 = No retry
|
|
15
|
+
*
|
|
16
|
+
* @type {number}
|
|
17
|
+
* @memberof RetryOptionsInterface
|
|
18
|
+
*/
|
|
19
|
+
times: number;
|
|
20
|
+
/**
|
|
21
|
+
* Sleep Time in milliseconds before retry
|
|
22
|
+
*
|
|
23
|
+
* @type {number}
|
|
24
|
+
* @memberof RetryOptionsInterface
|
|
25
|
+
*/
|
|
26
|
+
sleep?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Function to retry
|
|
29
|
+
*
|
|
30
|
+
* @memberof RetryOptionsInterface
|
|
31
|
+
*/
|
|
32
|
+
callback(attempt: number): PromiseOrSyncType<ReturnType>;
|
|
33
|
+
}
|
|
34
|
+
export interface RetryWhenDefaultInterface {
|
|
35
|
+
when?(exception: Exception, times: number): PromiseOrSyncType<RetryAction.Default | RetryAction.Retry | RetryAction.Throw>;
|
|
36
|
+
}
|
|
37
|
+
export interface RetryWhenResolveInterface {
|
|
38
|
+
when?(exception: Exception, times: number): PromiseOrSyncType<RetryAction.Default | RetryAction.Resolve | RetryAction.Retry | RetryAction.Throw>;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RetryInterface.js","sourceRoot":"","sources":["../../src/Interfaces/RetryInterface.ts"],"names":[],"mappings":""}
|
package/dist/Interfaces/index.js
CHANGED
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./CloneableInterface"), exports);
|
|
18
|
+
__exportStar(require("./NativeInterface"), exports);
|
|
19
|
+
__exportStar(require("./RetryInterface"), exports);
|
|
20
|
+
__exportStar(require("../crawler/Interfaces"), exports);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,wDAAsC"}
|
package/dist/Support/Arr.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { type CloneableInterface } from "../Interfaces";
|
|
|
2
2
|
/**
|
|
3
3
|
* Arr Class Helper
|
|
4
4
|
*
|
|
5
|
+
* @template {any[]} Type Array Type
|
|
5
6
|
* @class Arr
|
|
6
7
|
* @implements {CloneableInterface}
|
|
7
|
-
* @template {any[]} Type Array Type
|
|
8
8
|
*/
|
|
9
9
|
export declare class Arr<Type extends unknown[]> implements CloneableInterface {
|
|
10
10
|
private readonly subject;
|
|
@@ -12,15 +12,15 @@ export declare class Arr<Type extends unknown[]> implements CloneableInterface {
|
|
|
12
12
|
/**
|
|
13
13
|
* Clone This Object
|
|
14
14
|
*
|
|
15
|
-
* @returns {Arr<Array<Type[number]>>}
|
|
16
15
|
* @memberof Arr
|
|
16
|
+
* @returns {Arr<Array<Type[number]>>}
|
|
17
17
|
*/
|
|
18
18
|
clone(): Arr<Array<Type[number]>>;
|
|
19
19
|
/**
|
|
20
20
|
* Get Array Class Properties
|
|
21
21
|
*
|
|
22
|
-
* @returns {Type}
|
|
23
22
|
* @memberof Arr
|
|
23
|
+
* @returns {Type}
|
|
24
24
|
*/
|
|
25
25
|
toArray(): Type;
|
|
26
26
|
}
|
package/dist/Support/Arr.js
CHANGED
|
@@ -4,19 +4,20 @@ exports.Arr = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Arr Class Helper
|
|
6
6
|
*
|
|
7
|
+
* @template {any[]} Type Array Type
|
|
7
8
|
* @class Arr
|
|
8
9
|
* @implements {CloneableInterface}
|
|
9
|
-
* @template {any[]} Type Array Type
|
|
10
10
|
*/
|
|
11
11
|
class Arr {
|
|
12
|
+
subject;
|
|
12
13
|
constructor(subject) {
|
|
13
14
|
this.subject = subject;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Clone This Object
|
|
17
18
|
*
|
|
18
|
-
* @returns {Arr<Array<Type[number]>>}
|
|
19
19
|
* @memberof Arr
|
|
20
|
+
* @returns {Arr<Array<Type[number]>>}
|
|
20
21
|
*/
|
|
21
22
|
clone() {
|
|
22
23
|
return new Arr([...this.subject]);
|
|
@@ -24,8 +25,8 @@ class Arr {
|
|
|
24
25
|
/**
|
|
25
26
|
* Get Array Class Properties
|
|
26
27
|
*
|
|
27
|
-
* @returns {Type}
|
|
28
28
|
* @memberof Arr
|
|
29
|
+
* @returns {Type}
|
|
29
30
|
*/
|
|
30
31
|
toArray() {
|
|
31
32
|
return this.subject;
|
package/dist/Support/Arr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Arr.js","sourceRoot":"","sources":["../../src/Support/Arr.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"Arr.js","sourceRoot":"","sources":["../../src/Support/Arr.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,GAAG;IAGS;IADrB,YACqB,OAAa;QAAb,YAAO,GAAP,OAAO,CAAM;IAC9B,CAAC;IAEL;;;;;OAKG;IACI,KAAK;QACR,OAAO,IAAI,GAAG,CAAC,CAAE,GAAG,IAAI,CAAC,OAAO,CAAE,CAAC,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACI,OAAO;QACV,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CAEJ;AA1BD,kBA0BC"}
|
package/dist/Support/Num.js
CHANGED
package/dist/Support/Num.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Num.js","sourceRoot":"","sources":["../../src/Support/Num.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"Num.js","sourceRoot":"","sources":["../../src/Support/Num.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,GAAG;IAGS;IADrB,YACqB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;IAEL;;;;OAIG;IACI,KAAK;QACR,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CAEJ;AAjCD,kBAiCC"}
|
package/dist/Support/Str.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class Str implements CloneableInterface, NativeInterface<string>
|
|
|
29
29
|
*
|
|
30
30
|
* @throws {MoneyNotFoundException} If no money value is found
|
|
31
31
|
* @throws {MoneyMultipleResultException} If multiple money values are found
|
|
32
|
-
* @returns {Num} Num Class with the money value
|
|
32
|
+
* @returns {Arr<Num[]>} Num Class with the money value
|
|
33
33
|
*/
|
|
34
34
|
moneys(): Arr<Num[]>;
|
|
35
35
|
/**
|
|
@@ -64,7 +64,7 @@ export declare class Str implements CloneableInterface, NativeInterface<string>
|
|
|
64
64
|
/**
|
|
65
65
|
* Convert To Number
|
|
66
66
|
*
|
|
67
|
-
* @returns {
|
|
67
|
+
* @returns {string}
|
|
68
68
|
*/
|
|
69
69
|
toNative(): string;
|
|
70
70
|
/**
|
package/dist/Support/Str.js
CHANGED
|
@@ -13,10 +13,11 @@ const Num_1 = require("./Num");
|
|
|
13
13
|
* @implements {NativeInterface<string>}
|
|
14
14
|
*/
|
|
15
15
|
class Str {
|
|
16
|
+
subject;
|
|
17
|
+
// eslint-disable-next-line security/detect-unsafe-regex
|
|
18
|
+
moneyRegex = /(?<value>\d+)(?:[,.]\d{3})*(?<blockCents>(?<separatorCent>[,.])(?<cents>\d{1,2}))?/;
|
|
16
19
|
constructor(subject) {
|
|
17
20
|
this.subject = subject;
|
|
18
|
-
// eslint-disable-next-line security/detect-unsafe-regex
|
|
19
|
-
this.moneyRegex = /(?<value>\d+)(?:[,.]\d{3})*(?<blockCents>(?<separatorCent>[,.])(?<cents>\d{1,2}))?/;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Get a money value from a string and return a Num class
|
|
@@ -28,13 +29,12 @@ class Str {
|
|
|
28
29
|
* @returns {Num} Num Class with the money value
|
|
29
30
|
*/
|
|
30
31
|
money() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (!(match === null || match === void 0 ? void 0 : match.groups))
|
|
32
|
+
const match = this.subject.match(this.moneyRegex) ?? undefined;
|
|
33
|
+
if (!match?.groups)
|
|
34
34
|
throw new Exceptions_1.MoneyNotFoundException("No results found");
|
|
35
35
|
if (this.moneyAllOccurrences().length > 1)
|
|
36
36
|
throw new MoneyMultipleResultException_1.MoneyMultipleResultException("Multiple results found");
|
|
37
|
-
const centLength =
|
|
37
|
+
const centLength = match.groups.cents?.length ?? 0;
|
|
38
38
|
const stringCurrent = new Str(match[0]).onlyNumbers().toString();
|
|
39
39
|
return new Num_1.Num(+(`${stringCurrent.slice(0, Math.max(0, stringCurrent.length - centLength))}`
|
|
40
40
|
+ `${match.groups.separatorCent ? "." : ""}`
|
|
@@ -47,7 +47,7 @@ class Str {
|
|
|
47
47
|
*
|
|
48
48
|
* @throws {MoneyNotFoundException} If no money value is found
|
|
49
49
|
* @throws {MoneyMultipleResultException} If multiple money values are found
|
|
50
|
-
* @returns {Num} Num Class with the money value
|
|
50
|
+
* @returns {Arr<Num[]>} Num Class with the money value
|
|
51
51
|
*/
|
|
52
52
|
moneys() {
|
|
53
53
|
return new Arr_1.Arr(this.moneyAllOccurrences()
|
|
@@ -101,7 +101,7 @@ class Str {
|
|
|
101
101
|
/**
|
|
102
102
|
* Convert To Number
|
|
103
103
|
*
|
|
104
|
-
* @returns {
|
|
104
|
+
* @returns {string}
|
|
105
105
|
*/
|
|
106
106
|
toNative() {
|
|
107
107
|
return this.subject;
|
|
@@ -128,9 +128,8 @@ class Str {
|
|
|
128
128
|
* @returns {never[] | RegExpMatchArray}
|
|
129
129
|
*/
|
|
130
130
|
moneyAllOccurrences() {
|
|
131
|
-
var _a;
|
|
132
131
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
133
|
-
return
|
|
132
|
+
return this.subject.match(new RegExp(this.moneyRegex, "g")) ?? [];
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
exports.Str = Str;
|
package/dist/Support/Str.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Str.js","sourceRoot":"","sources":["../../src/Support/Str.ts"],"names":[],"mappings":";;;AACA,8CAAuD;AACvD,6FAA0F;AAE1F,+BAA4B;AAC5B,+BAA4B;AAE5B;;;;;;GAMG;AACH,MAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"Str.js","sourceRoot":"","sources":["../../src/Support/Str.ts"],"names":[],"mappings":"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"}
|
package/dist/crawler/Browser.js
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Browser = void 0;
|
|
4
4
|
const Context_1 = require("./Context");
|
|
5
|
-
const BrowserInstanceException_1 = require("./Exceptions/BrowserInstanceException");
|
|
6
5
|
class Browser {
|
|
6
|
+
$browserEngine;
|
|
7
|
+
$browserClass;
|
|
8
|
+
$contextClass;
|
|
9
|
+
$pageClass;
|
|
10
|
+
$browserInstance;
|
|
7
11
|
constructor($browserEngine, $browserClass, $contextClass, $pageClass) {
|
|
8
12
|
this.$browserEngine = $browserEngine;
|
|
9
13
|
this.$browserClass = $browserClass;
|
|
@@ -17,9 +21,12 @@ class Browser {
|
|
|
17
21
|
if (property in target) {
|
|
18
22
|
return Reflect.get(target, property);
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
/*
|
|
25
|
+
* TODO: fix me
|
|
26
|
+
* If (!(target.$browserInstance as unknown)) {
|
|
27
|
+
* throw new BrowserInstanceException("use browser.setUp() to init browser");
|
|
28
|
+
* }
|
|
29
|
+
*/
|
|
23
30
|
const propertyClass = target.$browserInstance[property];
|
|
24
31
|
return typeof propertyClass === "function"
|
|
25
32
|
? propertyClass.bind(target.$browserInstance)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../src/crawler/Browser.ts"],"names":[],"mappings":";;;AAaA,uCAAoC;
|
|
1
|
+
{"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../src/crawler/Browser.ts"],"names":[],"mappings":";;;AAaA,uCAAoC;AAEpC,MAAsB,OAAO;IAUL;IACA;IAGA;IAGA;IAVb,gBAAgB,CAAsB;IAE7C,YACoB,cAAiC,EACjC,aAEf,EACe,aAEf,EACe,UAEf;QATe,mBAAc,GAAd,cAAc,CAAmB;QACjC,kBAAa,GAAb,aAAa,CAE5B;QACe,kBAAa,GAAb,aAAa,CAE5B;QACe,eAAU,GAAV,UAAU,CAEzB;IAEL,CAAC;IAEM,MAAM,CAAC,MAAM,CAMhB,cAAiC,EACjC,aAEC,EACD,aAEC,EACD,UAEC;QAED,MAAM,eAAe,GAAG,IAAI,aAAa,CACrC,cAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,CACb,CAAC;QAEF,OAAO,IAAI,KAAK,CAAC,eAAe,EAAE;YAC9B,GAAG,CACC,MAAyE,EACzE,QAAgB;gBAEhB,IAAI,QAAQ,IAAI,MAAM,EAAE;oBACpB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;iBACxC;gBAED;;;;;mBAKG;gBAEH,MAAM,aAAa,GAAI,MAAM,CAAC,gBAA4C,CAAC,QAAQ,CAAC,CAAC;gBAErF,OAAO,OAAO,aAAa,KAAK,UAAU;oBACtC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;oBAC7C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;YACzD,CAAC;SACJ,CAA2F,CAAC;IACjG,CAAC;IAEM,KAAK,CAAC,cAAc;QACvB,OAAO;YACH,QAAQ,EAAE,IAAI;SACjB,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,OAAwC;QAExC,OAAO,iBAAO,CAAC,MAAM,CACjB,IAAI,EACJ,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,UAAU,EACf,OAAO,CACV,CAAC;IACN,CAAC;CAIJ;AA3FD,0BA2FC"}
|
package/dist/crawler/Context.js
CHANGED
|
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Context = void 0;
|
|
4
4
|
const Page_1 = require("./Page");
|
|
5
5
|
class Context {
|
|
6
|
+
$browserInstance;
|
|
7
|
+
$contextClass;
|
|
8
|
+
$pageClass;
|
|
9
|
+
$options;
|
|
10
|
+
$contextInstance;
|
|
6
11
|
constructor($browserInstance, $contextClass, $pageClass, $options) {
|
|
7
12
|
this.$browserInstance = $browserInstance;
|
|
8
13
|
this.$contextClass = $contextClass;
|
|
@@ -10,9 +15,9 @@ class Context {
|
|
|
10
15
|
this.$options = $options;
|
|
11
16
|
}
|
|
12
17
|
static async create($browserInstance, $contextClass, $pageClass, $options) {
|
|
13
|
-
var _a;
|
|
14
18
|
const contextInstance = new $contextClass($browserInstance, $contextClass, $pageClass, $options);
|
|
15
|
-
const prepareContext = (
|
|
19
|
+
const prepareContext = ($browserInstance.$browserInstance.newContext
|
|
20
|
+
?? $browserInstance.$browserInstance.createIncognitoBrowserContext);
|
|
16
21
|
contextInstance.$contextInstance = await prepareContext.call($browserInstance.$browserInstance, {
|
|
17
22
|
...await contextInstance.contextOptions(),
|
|
18
23
|
...$options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/crawler/Context.ts"],"names":[],"mappings":";;;AAeA,iCAA8B;AAE9B,MAAsB,OAAO;
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/crawler/Context.ts"],"names":[],"mappings":";;;AAeA,iCAA8B;AAE9B,MAAsB,OAAO;IAUL;IACA;IAEA;IAEA;IARb,gBAAgB,CAAsB;IAE7C,YACoB,gBAAmF,EACnF,aAC2F,EAC3F,UACwF,EACxF,QAAyC;QALzC,qBAAgB,GAAhB,gBAAgB,CAAmE;QACnF,kBAAa,GAAb,aAAa,CAC8E;QAC3F,eAAU,GAAV,UAAU,CAC8E;QACxF,aAAQ,GAAR,QAAQ,CAAiC;IAE7D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAM,CAMtB,gBAAmF,EACnF,aAEC,EACD,UAEC,EACD,QAAyC;QAEzC,MAAM,eAAe,GAAG,IAAI,aAAa,CACrC,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,QAAQ,CACX,CAAC;QAEF,MAAM,cAAc,GAAG,CACnB,gBAAgB,CAAC,gBAAgB,CAAC,UAAU;eACzC,gBAAgB,CAAC,gBAAgB,CAAC,6BAA6B,CACkB,CAAC;QACzF,eAAe,CAAC,gBAAgB,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE;YAC5F,GAAG,MAAM,eAAe,CAAC,cAAc,EAAE;YACzC,GAAG,QAAQ;SACd,CAAC,CAAC;QAEH,OAAO,IAAI,KAAK,CAAC,eAAe,EAAE;YAC9B,GAAG,CACC,MAKC,EACD,QAAgB;gBAEhB,IAAI,QAAQ,IAAI,MAAM,EAAE;oBACpB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;iBACxC;gBAED,MAAM,aAAa,GAAI,eAAe,CAAC,gBAA4C,CAAC,QAAQ,CAAC,CAAC;gBAE9F,OAAO,OAAO,aAAa,KAAK,UAAU;oBACtC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC;oBACtD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;YAClE,CAAC;SACJ,CAAuE,CAAC;IAC7E,CAAC;IAEM,KAAK,CAAC,cAAc;QACvB,OAAO;YACH,OAAO,EAAE,KAAM;SAClB,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,OAAO;QAChB,OAAO,WAAI,CAAC,MAAM,CACd,IAAI,CAAC,gBAAgB,EACrB,IAAI,EACJ,IAAI,CAAC,UAAU,CAClB,CAAC;IACN,CAAC;CAEJ;AAvFD,0BAuFC"}
|