@apify/utilities 2.30.0 → 2.31.1
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 +1084 -1059
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.ts +11 -5
- package/esm/index.d.mts +11 -5
- package/esm/index.mjs +1078 -1053
- package/esm/index.mjs.map +1 -1
- package/package.json +2 -2
package/cjs/index.d.ts
CHANGED
|
@@ -83,11 +83,6 @@ declare function leftpad(str: string, len: number, ch?: string | number): string
|
|
|
83
83
|
* Computes weighted average of 2 values.
|
|
84
84
|
*/
|
|
85
85
|
declare function weightedAverage(val1: number, weight1: number, val2: number, weight2: number): number;
|
|
86
|
-
/**
|
|
87
|
-
* Checks whether username is listed in FORBIDDEN_USERNAMES
|
|
88
|
-
* or matches any root route path.
|
|
89
|
-
*/
|
|
90
|
-
declare function isForbiddenUsername(username: string): boolean;
|
|
91
86
|
/**
|
|
92
87
|
* Executes array of promises in sequence and then returns array where Nth item is result of Nth promise.
|
|
93
88
|
*/
|
|
@@ -244,6 +239,17 @@ declare function splitFullName(fullName: string): (string | null)[];
|
|
|
244
239
|
*/
|
|
245
240
|
declare function isUrlRelative(url: string): boolean;
|
|
246
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Checks whether username is listed in the forbidden username list
|
|
244
|
+
* or looks like an Apify ID.
|
|
245
|
+
*
|
|
246
|
+
* NOTE: The forbidden list may expand over time, so a username that was
|
|
247
|
+
* previously permitted may later become forbidden. Use this function only
|
|
248
|
+
* when validating a username change, not as part of normal authentication
|
|
249
|
+
* or authorization flow.
|
|
250
|
+
*/
|
|
251
|
+
declare function isForbiddenUsername(username: string): boolean;
|
|
252
|
+
|
|
247
253
|
declare class RetryableError extends Error {
|
|
248
254
|
readonly error: Error;
|
|
249
255
|
constructor(error: Error, ...args: unknown[]);
|
package/esm/index.d.mts
CHANGED
|
@@ -83,11 +83,6 @@ declare function leftpad(str: string, len: number, ch?: string | number): string
|
|
|
83
83
|
* Computes weighted average of 2 values.
|
|
84
84
|
*/
|
|
85
85
|
declare function weightedAverage(val1: number, weight1: number, val2: number, weight2: number): number;
|
|
86
|
-
/**
|
|
87
|
-
* Checks whether username is listed in FORBIDDEN_USERNAMES
|
|
88
|
-
* or matches any root route path.
|
|
89
|
-
*/
|
|
90
|
-
declare function isForbiddenUsername(username: string): boolean;
|
|
91
86
|
/**
|
|
92
87
|
* Executes array of promises in sequence and then returns array where Nth item is result of Nth promise.
|
|
93
88
|
*/
|
|
@@ -244,6 +239,17 @@ declare function splitFullName(fullName: string): (string | null)[];
|
|
|
244
239
|
*/
|
|
245
240
|
declare function isUrlRelative(url: string): boolean;
|
|
246
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Checks whether username is listed in the forbidden username list
|
|
244
|
+
* or looks like an Apify ID.
|
|
245
|
+
*
|
|
246
|
+
* NOTE: The forbidden list may expand over time, so a username that was
|
|
247
|
+
* previously permitted may later become forbidden. Use this function only
|
|
248
|
+
* when validating a username change, not as part of normal authentication
|
|
249
|
+
* or authorization flow.
|
|
250
|
+
*/
|
|
251
|
+
declare function isForbiddenUsername(username: string): boolean;
|
|
252
|
+
|
|
247
253
|
declare class RetryableError extends Error {
|
|
248
254
|
readonly error: Error;
|
|
249
255
|
constructor(error: Error, ...args: unknown[]);
|