@apify/utilities 2.29.0 → 2.29.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/cjs/index.cjs +17 -14
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.ts +0 -2
- package/esm/index.d.mts +0 -2
- package/esm/index.mjs +17 -14
- package/esm/index.mjs.map +1 -1
- package/package.json +5 -5
package/esm/index.d.mts
CHANGED
|
@@ -248,8 +248,6 @@ declare class RetryableError extends Error {
|
|
|
248
248
|
readonly error: Error;
|
|
249
249
|
constructor(error: Error, ...args: unknown[]);
|
|
250
250
|
}
|
|
251
|
-
interface RetryableError extends Error {
|
|
252
|
-
}
|
|
253
251
|
declare function retryWithExpBackoff<T>(params?: {
|
|
254
252
|
func?: (...args: unknown[]) => T | Promise<T>;
|
|
255
253
|
expBackoffMillis?: number;
|
package/esm/index.mjs
CHANGED
|
@@ -1057,18 +1057,21 @@ __name(checkParamPrototypeOrThrow, "checkParamPrototypeOrThrow");
|
|
|
1057
1057
|
function promisifyServerListen(server) {
|
|
1058
1058
|
return async (port) => {
|
|
1059
1059
|
return new Promise((resolve, reject) => {
|
|
1060
|
-
|
|
1060
|
+
function removeListeners() {
|
|
1061
|
+
server.removeListener("error", onError);
|
|
1062
|
+
server.removeListener("listening", onListening);
|
|
1063
|
+
}
|
|
1064
|
+
__name(removeListeners, "removeListeners");
|
|
1065
|
+
function onError(err) {
|
|
1061
1066
|
removeListeners();
|
|
1062
1067
|
reject(err);
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1068
|
+
}
|
|
1069
|
+
__name(onError, "onError");
|
|
1070
|
+
function onListening() {
|
|
1065
1071
|
removeListeners();
|
|
1066
1072
|
resolve();
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
server.removeListener("error", onError);
|
|
1070
|
-
server.removeListener("listening", onListening);
|
|
1071
|
-
}, "removeListeners");
|
|
1073
|
+
}
|
|
1074
|
+
__name(onListening, "onListening");
|
|
1072
1075
|
server.on("error", onError);
|
|
1073
1076
|
server.on("listening", onListening);
|
|
1074
1077
|
server.listen(port);
|
|
@@ -1349,7 +1352,7 @@ function isBadForMongo(obj) {
|
|
|
1349
1352
|
__name(isBadForMongo, "isBadForMongo");
|
|
1350
1353
|
var _JsonVariable = class _JsonVariable {
|
|
1351
1354
|
constructor(name) {
|
|
1352
|
-
this
|
|
1355
|
+
__publicField(this, "name", name);
|
|
1353
1356
|
}
|
|
1354
1357
|
getToken() {
|
|
1355
1358
|
return `{{${this.name}}}`;
|
|
@@ -1456,7 +1459,7 @@ var CHECK_TYPES = /* @__PURE__ */ ((CHECK_TYPES2) => {
|
|
|
1456
1459
|
})(CHECK_TYPES || {});
|
|
1457
1460
|
var _HealthChecker = class _HealthChecker {
|
|
1458
1461
|
constructor(options) {
|
|
1459
|
-
this
|
|
1462
|
+
__publicField(this, "options", options);
|
|
1460
1463
|
__publicField(this, "checks");
|
|
1461
1464
|
__publicField(this, "redisPrefix");
|
|
1462
1465
|
__publicField(this, "redisTtlSecs");
|
|
@@ -1657,9 +1660,9 @@ __name(_InvalidVariableError, "InvalidVariableError");
|
|
|
1657
1660
|
var InvalidVariableError = _InvalidVariableError;
|
|
1658
1661
|
var _WebhookPayloadTemplate = class _WebhookPayloadTemplate {
|
|
1659
1662
|
constructor(template, allowedVariables = null, context = {}) {
|
|
1660
|
-
this
|
|
1661
|
-
this
|
|
1662
|
-
this
|
|
1663
|
+
__publicField(this, "template", template);
|
|
1664
|
+
__publicField(this, "allowedVariables", allowedVariables);
|
|
1665
|
+
__publicField(this, "context", context);
|
|
1663
1666
|
__publicField(this, "payload");
|
|
1664
1667
|
__publicField(this, "replacedVariables", []);
|
|
1665
1668
|
this.payload = template;
|
|
@@ -1886,7 +1889,7 @@ var CodeHashMetaKey = /* @__PURE__ */ ((CodeHashMetaKey2) => {
|
|
|
1886
1889
|
})(CodeHashMetaKey || {});
|
|
1887
1890
|
var _CodeHashManager = class _CodeHashManager {
|
|
1888
1891
|
constructor(secret) {
|
|
1889
|
-
this
|
|
1892
|
+
__publicField(this, "secret", secret);
|
|
1890
1893
|
}
|
|
1891
1894
|
/**
|
|
1892
1895
|
* Encodes object (e.g. input for actor) to a string hash and uses the `secret` to sign the hash.
|