@apify/utilities 1.2.2 → 1.2.6
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/README.md +1 -0
- package/package.json +4 -4
- package/utilities.d.ts +5 -6
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ package | version
|
|
|
14
14
|
`@apify/markdown` | [](https://www.npmjs.com/package/@apify/markdown)
|
|
15
15
|
`@apify/salesforce_client` | [](https://www.npmjs.com/package/@apify/salesforce_client)
|
|
16
16
|
`@apify/utilities` | [](https://www.npmjs.com/package/@apify/utilities)
|
|
17
|
+
`@apify/timeout` | [](https://www.npmjs.com/package/@apify/timeout)
|
|
17
18
|
|
|
18
19
|
Internal utilities and constants shared across <a href="https://www.apify.com">Apify</a> projects.
|
|
19
20
|
Unless you work at Apify ([interested?](https://apify.com/jobs)), you shouldn't use this package directly,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/utilities",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Tools and constants shared across Apify projects.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@apify/consts": "^1.
|
|
39
|
-
"@apify/log": "^1.1.
|
|
38
|
+
"@apify/consts": "^1.6.0",
|
|
39
|
+
"@apify/log": "^1.1.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/create-hmac": "^1.1.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "9c37b8347e2eb7714e439ef2c1b09ba472b0a4c0"
|
|
45
45
|
}
|
package/utilities.d.ts
CHANGED
|
@@ -53,6 +53,9 @@ export declare function http404Route(req: RequestLike, res: ResponseLike): void;
|
|
|
53
53
|
* Default error handler of Express API endpoints.
|
|
54
54
|
*/
|
|
55
55
|
export declare function expressErrorHandler(err: Error, req: RequestLike, res: ResponseLike, next: (...a: unknown[]) => unknown): unknown;
|
|
56
|
+
export declare type BetterIntervalID = {
|
|
57
|
+
_betterClearInterval: () => void;
|
|
58
|
+
};
|
|
56
59
|
/**
|
|
57
60
|
* Similar to setInterval() but with two important differences:
|
|
58
61
|
* First, it assumes the function is asynchronous and only schedules its next invocation AFTER the asynchronous function finished.
|
|
@@ -62,12 +65,8 @@ export declare function expressErrorHandler(err: Error, req: RequestLike, res: R
|
|
|
62
65
|
* @param delay The number of milliseconds to wait to next invocation of the function.
|
|
63
66
|
* @returns Object that can be passed to betterClearInterval()
|
|
64
67
|
*/
|
|
65
|
-
export declare function betterSetInterval(func: (
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
export declare function betterClearInterval(intervalID: {
|
|
69
|
-
_betterClearInterval: () => void;
|
|
70
|
-
}): void;
|
|
68
|
+
export declare function betterSetInterval(func: (a: (...args: unknown[]) => unknown) => void, delay: number): BetterIntervalID;
|
|
69
|
+
export declare function betterClearInterval(intervalID: BetterIntervalID): void;
|
|
71
70
|
/**
|
|
72
71
|
* Escapes a string so that it can be used in regular expression (e.g. converts "myfile.*" to "myfile\\.\\*").
|
|
73
72
|
*/
|