@8ms/helpers 2.3.48 → 2.4.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/_class/index.d.mts +1 -1
- package/dist/_class/index.mjs +1 -4
- package/dist/adverity/index.d.mts +1 -1
- package/dist/adverity/index.mjs +1 -3
- package/dist/adverity/server/index.d.mts +2 -2
- package/dist/adverity/server/index.mjs +2 -5
- package/dist/api/index.d.mts +3 -2
- package/dist/api/index.mjs +44 -3
- package/dist/{api-D7uUBIq4.mjs → api-BJgcoGmU.mjs} +1 -25
- package/dist/{index-c5HdwLaY.d.mts → api-DoLMPDFM.d.mts} +1 -9
- package/dist/array/index.mjs +1 -2
- package/dist/atInternet/index.mjs +1 -3
- package/dist/aws/cloudWatchLog/server/index.d.mts +8 -8
- package/dist/aws/cloudWatchLog/server/index.mjs +2 -6
- package/dist/aws/cloudWatchMetric/server/index.d.mts +5 -5
- package/dist/aws/cloudWatchMetric/server/index.mjs +2 -5
- package/dist/aws/ec2/server/index.d.mts +5 -5
- package/dist/aws/ec2/server/index.mjs +2 -5
- package/dist/aws/ecs/server/index.d.mts +2 -2
- package/dist/aws/ecs/server/index.mjs +2 -5
- package/dist/aws/glue/server/index.d.mts +2 -2
- package/dist/aws/glue/server/index.mjs +2 -5
- package/dist/aws/lambda/server/index.d.mts +2 -2
- package/dist/aws/lambda/server/index.mjs +4 -6
- package/dist/aws/s3/server/index.d.mts +10 -10
- package/dist/aws/s3/server/index.mjs +28 -37
- package/dist/aws/server/index.d.mts +1 -1
- package/dist/aws/server/index.mjs +2 -3
- package/dist/aws/ses/server/index.d.mts +8 -8
- package/dist/aws/ses/server/index.mjs +2 -6
- package/dist/aws/sqs/server/index.d.mts +5 -5
- package/dist/aws/sqs/server/index.mjs +2 -5
- package/dist/aws/ssm/server/index.d.mts +2 -2
- package/dist/aws/ssm/server/index.mjs +2 -5
- package/dist/boolean/index.mjs +1 -2
- package/dist/brightData/serpApi/server/index.d.mts +3 -3
- package/dist/brightData/serpApi/server/index.mjs +5 -10
- package/dist/brightData/server/index.d.mts +1 -1
- package/dist/brightData/server/index.mjs +1 -2
- package/dist/brightData/webScraperIde/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.mjs +4 -6
- package/dist/cache/server/index.mjs +1 -2
- package/dist/{chunk-DDarj8oW.mjs → chunk-y_GBKt04.mjs} +1 -3
- package/dist/crud/index.mjs +1 -2
- package/dist/crypto/server/index.mjs +2 -8
- package/dist/date/index.d.mts +1 -1
- package/dist/date/index.mjs +11 -10
- package/dist/drizzle/server/index.d.mts +1 -1
- package/dist/drizzle/server/index.mjs +1 -4
- package/dist/environment/index.mjs +1 -2
- package/dist/eskimi/index.mjs +1 -3
- package/dist/eskimi/server/index.mjs +2 -8
- package/dist/file/index.mjs +1 -3
- package/dist/file/server/index.mjs +1 -2
- package/dist/geo/index.mjs +1 -3
- package/dist/get-B9XztVOu.mjs +21 -0
- package/dist/{getDecimal-CafxtLhH.mjs → getDecimal-B9S_nqSJ.mjs} +1 -4
- package/dist/googleAds/keywordPlanner/server/index.mjs +1 -3
- package/dist/googleAds/server/index.d.mts +7 -5
- package/dist/googleAds/server/index.mjs +5 -9
- package/dist/googleCloud/bigquery/server/index.d.mts +4 -4
- package/dist/googleCloud/bigquery/server/index.mjs +1 -5
- package/dist/googleCloud/server/index.d.mts +1 -1
- package/dist/googleCloud/server/index.mjs +1 -2
- package/dist/googleCloud/sheets/server/index.d.mts +4 -4
- package/dist/googleCloud/sheets/server/index.mjs +1 -3
- package/dist/googleCloud/storage/server/index.d.mts +5 -5
- package/dist/googleCloud/storage/server/index.mjs +1 -4
- package/dist/googlePageSpeed/server/index.d.mts +1 -1
- package/dist/googlePageSpeed/server/index.mjs +2 -6
- package/dist/googleSearchIncidents/server/index.mjs +2 -5
- package/dist/greenDomain/server/index.mjs +2 -5
- package/dist/{index-1fBbJGQz.d.mts → index-BAU-daxD.d.mts} +12 -12
- package/dist/index-BlUxbvhl.d.mts +30 -0
- package/dist/inngest/index.mjs +1 -2
- package/dist/json/index.mjs +1 -4
- package/dist/littleWarden/server/index.d.mts +1 -1
- package/dist/littleWarden/server/index.mjs +2 -7
- package/dist/lodash/index.mjs +1 -15
- package/dist/lumar/api/server/index.d.mts +1 -2
- package/dist/lumar/api/server/index.mjs +3 -8
- package/dist/lumar/graphql/server/index.d.mts +1 -2
- package/dist/lumar/graphql/server/index.mjs +2 -9
- package/dist/myTarget/server/index.d.mts +1 -1
- package/dist/myTarget/server/index.mjs +2 -5
- package/dist/nextAuth/index.mjs +1 -3
- package/dist/nextJs/client/index.mjs +1 -3
- package/dist/nextJs/index.mjs +1 -2
- package/dist/number/index.mjs +2 -9
- package/dist/object/index.mjs +1 -2
- package/dist/onePassword/server/index.d.mts +7 -7
- package/dist/onePassword/server/index.mjs +1 -5
- package/dist/openAi/server/index.d.mts +1 -1
- package/dist/openAi/server/index.mjs +2 -6
- package/dist/post-DiwZvONk.mjs +22 -0
- package/dist/prisma/index.mjs +2 -4
- package/dist/prisma/server/index.d.mts +1 -1
- package/dist/prisma/server/index.mjs +1 -4
- package/dist/{server-Bwy4JI8Z.mjs → server-CCX9gh5k.mjs} +1 -4
- package/dist/snapchat/server/index.d.mts +1 -1
- package/dist/snapchat/server/index.mjs +2 -6
- package/dist/sorting/index.mjs +1 -5
- package/dist/stream/server/index.mjs +2 -4
- package/dist/string/index.d.mts +1 -1
- package/dist/string/index.mjs +1 -15
- package/dist/swr/client/index.d.mts +1 -2
- package/dist/swr/client/index.mjs +1 -2
- package/dist/upTimeRobot/server/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.mjs +2 -6
- package/dist/url/index.mjs +1 -3
- package/dist/url/server/index.mjs +15 -20
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.mjs +1 -10
- package/dist/util/server/index.mjs +1 -6
- package/dist/webWorker/index.mjs +1 -2
- package/dist/xml/server/index.mjs +2 -5
- package/package.json +33 -44
- package/dist/axios/index.d.mts +0 -22
- package/dist/axios/index.mjs +0 -50
- /package/dist/{index-DwB8X1lz.d.mts → index-1SE8er2n.d.mts} +0 -0
- /package/dist/{index-BHuvb_7y.d.mts → index-CXrNMYVx.d.mts} +0 -0
- /package/dist/{index-CqTOMR8f.d.mts → index-D-8_Li4c.d.mts} +0 -0
- /package/dist/{index-DDH4qfj3.d.mts → index-DVYYb5tw.d.mts} +0 -0
- /package/dist/{index-DInsoSQm.d.mts → index-DwYd5z_c.d.mts} +0 -0
package/dist/string/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isDate, isObject, trim, unescape } from "../lodash/index.mjs";
|
|
2
2
|
import { getYmdString } from "../date/index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/string/reservedWords.ts
|
|
5
4
|
const reservedWords = [
|
|
6
5
|
"AI",
|
|
@@ -22,7 +21,6 @@ const isReservedWord = (word) => {
|
|
|
22
21
|
}
|
|
23
22
|
return response;
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
//#endregion
|
|
27
25
|
//#region src/string/getCapitalised.ts
|
|
28
26
|
/**
|
|
@@ -37,7 +35,6 @@ const getCapitalised = (input, split = "_") => {
|
|
|
37
35
|
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
|
38
36
|
});
|
|
39
37
|
};
|
|
40
|
-
|
|
41
38
|
//#endregion
|
|
42
39
|
//#region src/string/getString.ts
|
|
43
40
|
/**
|
|
@@ -51,7 +48,6 @@ const getString = (input) => {
|
|
|
51
48
|
else if (isDate(input)) string = getYmdString(input);
|
|
52
49
|
return string;
|
|
53
50
|
};
|
|
54
|
-
|
|
55
51
|
//#endregion
|
|
56
52
|
//#region src/string/getWithoutHtmlTags.ts
|
|
57
53
|
/**
|
|
@@ -61,7 +57,6 @@ const getString = (input) => {
|
|
|
61
57
|
const getWithoutHtmlTags = (input) => {
|
|
62
58
|
return input.replace(/(<([^>]+)>)/gi, "");
|
|
63
59
|
};
|
|
64
|
-
|
|
65
60
|
//#endregion
|
|
66
61
|
//#region src/string/getWithoutAccents.ts
|
|
67
62
|
/**
|
|
@@ -71,7 +66,6 @@ const getWithoutHtmlTags = (input) => {
|
|
|
71
66
|
const getWithoutAccents = (input) => {
|
|
72
67
|
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
73
68
|
};
|
|
74
|
-
|
|
75
69
|
//#endregion
|
|
76
70
|
//#region src/string/getProperCase.ts
|
|
77
71
|
/**
|
|
@@ -92,7 +86,6 @@ const getProperCase = (props) => {
|
|
|
92
86
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
93
87
|
}).join(" ");
|
|
94
88
|
};
|
|
95
|
-
|
|
96
89
|
//#endregion
|
|
97
90
|
//#region src/string/getWithoutWhitespaces.ts
|
|
98
91
|
/**
|
|
@@ -102,7 +95,6 @@ const getProperCase = (props) => {
|
|
|
102
95
|
const getWithoutWhitespaces = (input) => {
|
|
103
96
|
return input.replace(/\s+/g, " ").trim();
|
|
104
97
|
};
|
|
105
|
-
|
|
106
98
|
//#endregion
|
|
107
99
|
//#region src/string/getWithoutPunctuation.ts
|
|
108
100
|
/**
|
|
@@ -112,7 +104,6 @@ const getWithoutWhitespaces = (input) => {
|
|
|
112
104
|
const getWithoutPunctuation = (input) => {
|
|
113
105
|
return input.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g, "").replace(/\s+/g, " ");
|
|
114
106
|
};
|
|
115
|
-
|
|
116
107
|
//#endregion
|
|
117
108
|
//#region src/string/getWithoutUnderscores.ts
|
|
118
109
|
/**
|
|
@@ -121,7 +112,6 @@ const getWithoutPunctuation = (input) => {
|
|
|
121
112
|
const getWithoutUnderscores = (input) => {
|
|
122
113
|
return input.replace("_", " ");
|
|
123
114
|
};
|
|
124
|
-
|
|
125
115
|
//#endregion
|
|
126
116
|
//#region src/string/getUnescaped.ts
|
|
127
117
|
/**
|
|
@@ -138,7 +128,6 @@ const getUnescaped = (input) => {
|
|
|
138
128
|
} else response = unescape(response);
|
|
139
129
|
return response;
|
|
140
130
|
};
|
|
141
|
-
|
|
142
131
|
//#endregion
|
|
143
132
|
//#region src/string/getClean.ts
|
|
144
133
|
/**
|
|
@@ -158,7 +147,6 @@ const getClean = (props) => {
|
|
|
158
147
|
if (props.trim) response = response.trim();
|
|
159
148
|
return response;
|
|
160
149
|
};
|
|
161
|
-
|
|
162
150
|
//#endregion
|
|
163
151
|
//#region src/string/getFolder.ts
|
|
164
152
|
/**
|
|
@@ -167,7 +155,6 @@ const getClean = (props) => {
|
|
|
167
155
|
const getFolder = (input) => {
|
|
168
156
|
return trim(input, "/").trim();
|
|
169
157
|
};
|
|
170
|
-
|
|
171
158
|
//#endregion
|
|
172
159
|
//#region src/string/getStringFromStream.ts
|
|
173
160
|
/**
|
|
@@ -182,6 +169,5 @@ const getStringFromStream = (stream) => {
|
|
|
182
169
|
stream.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));
|
|
183
170
|
});
|
|
184
171
|
};
|
|
185
|
-
|
|
186
172
|
//#endregion
|
|
187
|
-
export { getCapitalised, getClean, getFolder, getProperCase, getString, getStringFromStream, getUnescaped, getWithoutAccents, getWithoutHtmlTags, getWithoutPunctuation, getWithoutUnderscores, getWithoutWhitespaces, isReservedWord, reservedWords };
|
|
173
|
+
export { getCapitalised, getClean, getFolder, getProperCase, getString, getStringFromStream, getUnescaped, getWithoutAccents, getWithoutHtmlTags, getWithoutPunctuation, getWithoutUnderscores, getWithoutWhitespaces, isReservedWord, reservedWords };
|
|
@@ -35,6 +35,5 @@ const isAllData = (swrs) => {
|
|
|
35
35
|
for (const swr in swrs) if (isData(swrs[swr])) counter++;
|
|
36
36
|
return counter === Object.keys(swrs).length;
|
|
37
37
|
};
|
|
38
|
-
|
|
39
38
|
//#endregion
|
|
40
|
-
export { isAllData, isAnyError, isAnyLoading, isData, isError, isLoading };
|
|
39
|
+
export { isAllData, isAnyError, isAnyLoading, isData, isError, isLoading };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
2
|
-
import "../../
|
|
3
|
-
import { post } from "../../axios/index.mjs";
|
|
2
|
+
import { t as post } from "../../post-DiwZvONk.mjs";
|
|
4
3
|
import { onePasswordClient } from "../../onePassword/server/index.mjs";
|
|
5
|
-
|
|
6
4
|
//#region src/upTimeRobot/server/UpTimeRobotNamespace.ts
|
|
7
5
|
/**
|
|
8
6
|
* Use the Up Time Robot API to retrieve up to 50 monitors at a time.
|
|
@@ -29,7 +27,6 @@ var UpTimeRobotNamespace = class extends BaseNamespace {
|
|
|
29
27
|
return response;
|
|
30
28
|
};
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
//#endregion
|
|
34
31
|
//#region src/upTimeRobot/server/upTimeRobot.ts
|
|
35
32
|
const upTimeRobotNamespaces = /* @__PURE__ */ new Map();
|
|
@@ -77,6 +74,5 @@ const requestStatuses = {
|
|
|
77
74
|
ERROR: "fail",
|
|
78
75
|
SUCCESS: "ok"
|
|
79
76
|
};
|
|
80
|
-
|
|
81
77
|
//#endregion
|
|
82
|
-
export { UpTimeRobotNamespace, logTypes, monitorStatuses, monitorSubTypes, monitorTypes, requestStatuses, upTimeRobotClient };
|
|
78
|
+
export { UpTimeRobotNamespace, logTypes, monitorStatuses, monitorSubTypes, monitorTypes, requestStatuses, upTimeRobotClient };
|
package/dist/url/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { merge } from "../lodash/index.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/url/url.ts
|
|
4
3
|
/**
|
|
5
4
|
* Does the URL begin with HTTP or HTTPS?
|
|
@@ -35,6 +34,5 @@ const buildParameters = (existing = {}, updated = {}) => {
|
|
|
35
34
|
const buildRelative = (router, updated = {}) => {
|
|
36
35
|
return `${router.pathname}${buildParameters(router.query, updated || {})}`;
|
|
37
36
|
};
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
|
-
export { buildParameters, buildRelative, isAbsolute, isRelative };
|
|
38
|
+
export { buildParameters, buildRelative, isAbsolute, isRelative };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createDirectory } from "../../file/server/index.mjs";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import ky from "ky";
|
|
3
|
+
import { Readable } from "stream";
|
|
4
4
|
//#region src/url/server/writeUrlContents.ts
|
|
5
5
|
/**
|
|
6
6
|
* Downloads a given URL's contents to a local file.
|
|
@@ -11,25 +11,20 @@ const writeUrlContents = async (filePath, url) => {
|
|
|
11
11
|
const fs = await import("fs-extra");
|
|
12
12
|
await createDirectory(filePath);
|
|
13
13
|
const writer = fs.createWriteStream(filePath);
|
|
14
|
-
await
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
writer.on("close", () => {
|
|
28
|
-
if (!error) resolve(true);
|
|
29
|
-
});
|
|
14
|
+
const response = await ky.get(url);
|
|
15
|
+
const stream = Readable.fromWeb(response.body);
|
|
16
|
+
await new Promise((resolve, reject) => {
|
|
17
|
+
stream.pipe(writer);
|
|
18
|
+
let error = null;
|
|
19
|
+
writer.on("error", (err) => {
|
|
20
|
+
error = err;
|
|
21
|
+
writer.close();
|
|
22
|
+
reject(err);
|
|
23
|
+
});
|
|
24
|
+
writer.on("close", () => {
|
|
25
|
+
if (!error) resolve();
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
//#endregion
|
|
35
|
-
export { writeUrlContents };
|
|
30
|
+
export { writeUrlContents };
|
package/dist/util/index.d.mts
CHANGED
|
@@ -42,7 +42,7 @@ declare const isUndefined: (instance: any, keys: any | any[]) => boolean;
|
|
|
42
42
|
* Chunk a queue of promises into controlled chunks to prevent overloading.
|
|
43
43
|
* https://stackoverflow.com/a/53964407
|
|
44
44
|
*/
|
|
45
|
-
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<
|
|
45
|
+
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<any[]>;
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/util/sleep.d.ts
|
|
48
48
|
declare const sleep: (seconds: number) => Promise<void>;
|
package/dist/util/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { chunk, flatten, isObject } from "../lodash/index.mjs";
|
|
2
2
|
import { getArray } from "../array/index.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/util/defaultTo.ts
|
|
5
4
|
/**
|
|
6
5
|
* Function to default to a value, whilst filtering through an instance
|
|
@@ -17,7 +16,6 @@ const defaultTo = (instance, keys, defaultValue = null) => {
|
|
|
17
16
|
});
|
|
18
17
|
return found ? pointer : defaultValue;
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
20
|
//#region src/util/getWithoutParameter.ts
|
|
23
21
|
/**
|
|
@@ -31,7 +29,6 @@ const getWithoutParameter = (input) => {
|
|
|
31
29
|
}
|
|
32
30
|
return response;
|
|
33
31
|
};
|
|
34
|
-
|
|
35
32
|
//#endregion
|
|
36
33
|
//#region src/util/getWithoutHash.ts
|
|
37
34
|
/**
|
|
@@ -45,7 +42,6 @@ const getWithoutHash = (input) => {
|
|
|
45
42
|
}
|
|
46
43
|
return response;
|
|
47
44
|
};
|
|
48
|
-
|
|
49
45
|
//#endregion
|
|
50
46
|
//#region src/util/getClean.ts
|
|
51
47
|
/**
|
|
@@ -58,7 +54,6 @@ const getClean = (props) => {
|
|
|
58
54
|
if (props.lowercase) response = response.toLowerCase();
|
|
59
55
|
return response;
|
|
60
56
|
};
|
|
61
|
-
|
|
62
57
|
//#endregion
|
|
63
58
|
//#region src/util/getError.ts
|
|
64
59
|
const getError = (error) => {
|
|
@@ -67,7 +62,6 @@ const getError = (error) => {
|
|
|
67
62
|
else if (error instanceof Error) response = error.message;
|
|
68
63
|
return response;
|
|
69
64
|
};
|
|
70
|
-
|
|
71
65
|
//#endregion
|
|
72
66
|
//#region src/util/isUndefined.ts
|
|
73
67
|
const undefinedValue = "__!!UNDEFINED!!__";
|
|
@@ -77,13 +71,11 @@ const undefinedValue = "__!!UNDEFINED!!__";
|
|
|
77
71
|
const isUndefined = (instance, keys) => {
|
|
78
72
|
return undefinedValue === defaultTo(instance, keys, undefinedValue);
|
|
79
73
|
};
|
|
80
|
-
|
|
81
74
|
//#endregion
|
|
82
75
|
//#region src/util/sleep.ts
|
|
83
76
|
const sleep = (seconds) => {
|
|
84
77
|
return new Promise((resolve) => setTimeout(resolve, seconds * 1e3));
|
|
85
78
|
};
|
|
86
|
-
|
|
87
79
|
//#endregion
|
|
88
80
|
//#region src/util/promiseChunks.ts
|
|
89
81
|
/**
|
|
@@ -102,6 +94,5 @@ const promiseChunks = async (promises, size, sleepSeconds = 0, callbackFunction)
|
|
|
102
94
|
}
|
|
103
95
|
return flatten(results);
|
|
104
96
|
};
|
|
105
|
-
|
|
106
97
|
//#endregion
|
|
107
|
-
export { defaultTo, getClean, getError, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
|
98
|
+
export { defaultTo, getClean, getError, getWithoutHash, getWithoutParameter, isUndefined, promiseChunks, sleep };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import zlib from "zlib";
|
|
2
|
-
|
|
3
2
|
//#region src/util/server/getBrotliCompressed.ts
|
|
4
3
|
/**
|
|
5
4
|
* Compress a given input using Brotli.
|
|
@@ -12,7 +11,6 @@ const getBrotliCompressed = async (input, options = {}) => {
|
|
|
12
11
|
});
|
|
13
12
|
});
|
|
14
13
|
};
|
|
15
|
-
|
|
16
14
|
//#endregion
|
|
17
15
|
//#region src/util/server/getBrotliDecompressed.ts
|
|
18
16
|
/**
|
|
@@ -27,7 +25,6 @@ const getBrotliDecompressed = async (input, options = {}) => {
|
|
|
27
25
|
});
|
|
28
26
|
});
|
|
29
27
|
};
|
|
30
|
-
|
|
31
28
|
//#endregion
|
|
32
29
|
//#region src/util/server/getGzipCompressed.ts
|
|
33
30
|
/**
|
|
@@ -41,7 +38,6 @@ const getGzipCompressed = async (input, options = {}) => {
|
|
|
41
38
|
});
|
|
42
39
|
});
|
|
43
40
|
};
|
|
44
|
-
|
|
45
41
|
//#endregion
|
|
46
42
|
//#region src/util/server/getGzipDecompressed.ts
|
|
47
43
|
/**
|
|
@@ -56,6 +52,5 @@ const getGzipDecompressed = async (input, options = {}) => {
|
|
|
56
52
|
});
|
|
57
53
|
});
|
|
58
54
|
};
|
|
59
|
-
|
|
60
55
|
//#endregion
|
|
61
|
-
export { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed };
|
|
56
|
+
export { getBrotliCompressed, getBrotliDecompressed, getGzipCompressed, getGzipDecompressed };
|
package/dist/webWorker/index.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import { get } from "../../axios/index.mjs";
|
|
3
|
-
|
|
1
|
+
import { t as get } from "../../get-B9XztVOu.mjs";
|
|
4
2
|
//#region src/xml/server/getXml.ts
|
|
5
3
|
const getXml = async (url) => {
|
|
6
4
|
let response = "";
|
|
@@ -12,6 +10,5 @@ const getXml = async (url) => {
|
|
|
12
10
|
}
|
|
13
11
|
return response;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
//#endregion
|
|
17
|
-
export { getXml };
|
|
14
|
+
export { getXml };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8ms/helpers",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": "24"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"
|
|
19
|
+
"ky": "^2.0.0",
|
|
20
20
|
"luxon": "^3.7.2",
|
|
21
21
|
"zod": "^4.3.6"
|
|
22
22
|
},
|
|
@@ -45,13 +45,11 @@
|
|
|
45
45
|
"@prisma/client": "^7.0.0",
|
|
46
46
|
"drizzle-orm": "*",
|
|
47
47
|
"fs-extra": "^11.0.0",
|
|
48
|
-
"google-ads-api": "^23.0.0",
|
|
49
48
|
"googleapis-common": "^8.0.0",
|
|
50
49
|
"next": "^16.0.0",
|
|
51
50
|
"react": "^19.0.0",
|
|
52
51
|
"react-intersection-observer": "^10.0.0",
|
|
53
52
|
"stream-chain": "^3.0.0",
|
|
54
|
-
"stream-json": "^1.0.0",
|
|
55
53
|
"swr": "^2.0.0"
|
|
56
54
|
},
|
|
57
55
|
"peerDependenciesMeta": {
|
|
@@ -127,9 +125,6 @@
|
|
|
127
125
|
"fs-extra": {
|
|
128
126
|
"optional": true
|
|
129
127
|
},
|
|
130
|
-
"google-ads-api": {
|
|
131
|
-
"optional": true
|
|
132
|
-
},
|
|
133
128
|
"googleapis-common": {
|
|
134
129
|
"optional": true
|
|
135
130
|
},
|
|
@@ -142,64 +137,59 @@
|
|
|
142
137
|
"stream-chain": {
|
|
143
138
|
"optional": true
|
|
144
139
|
},
|
|
145
|
-
"stream-json": {
|
|
146
|
-
"optional": true
|
|
147
|
-
},
|
|
148
140
|
"swr": {
|
|
149
141
|
"optional": true
|
|
150
142
|
}
|
|
151
143
|
},
|
|
152
144
|
"devDependencies": {
|
|
153
145
|
"@1password/sdk": "^0.4.0",
|
|
154
|
-
"@aws-sdk/client-cloudwatch": "^3.
|
|
155
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
156
|
-
"@aws-sdk/client-ec2": "^3.
|
|
157
|
-
"@aws-sdk/client-ecs": "^3.
|
|
158
|
-
"@aws-sdk/client-glue": "^3.
|
|
159
|
-
"@aws-sdk/client-lambda": "^3.
|
|
160
|
-
"@aws-sdk/client-s3": "^3.
|
|
161
|
-
"@aws-sdk/client-ses": "^3.
|
|
162
|
-
"@aws-sdk/client-sqs": "^3.
|
|
163
|
-
"@aws-sdk/client-ssm": "^3.
|
|
164
|
-
"@aws-sdk/lib-storage": "^3.
|
|
165
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
146
|
+
"@aws-sdk/client-cloudwatch": "^3.1028.0",
|
|
147
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.1028.0",
|
|
148
|
+
"@aws-sdk/client-ec2": "^3.1028.0",
|
|
149
|
+
"@aws-sdk/client-ecs": "^3.1028.0",
|
|
150
|
+
"@aws-sdk/client-glue": "^3.1028.0",
|
|
151
|
+
"@aws-sdk/client-lambda": "^3.1028.0",
|
|
152
|
+
"@aws-sdk/client-s3": "^3.1028.0",
|
|
153
|
+
"@aws-sdk/client-ses": "^3.1028.0",
|
|
154
|
+
"@aws-sdk/client-sqs": "^3.1028.0",
|
|
155
|
+
"@aws-sdk/client-ssm": "^3.1028.0",
|
|
156
|
+
"@aws-sdk/lib-storage": "^3.1028.0",
|
|
157
|
+
"@aws-sdk/s3-request-presigner": "^3.1028.0",
|
|
166
158
|
"@babel/core": "7.29.0",
|
|
167
|
-
"@babel/preset-env": "7.29.
|
|
159
|
+
"@babel/preset-env": "7.29.2",
|
|
168
160
|
"@babel/preset-flow": "7.27.1",
|
|
169
161
|
"@babel/preset-typescript": "7.28.5",
|
|
170
162
|
"@google-cloud/bigquery": "^8.1.1",
|
|
171
163
|
"@google-cloud/common": "^6.0.0",
|
|
172
164
|
"@google-cloud/storage": "^7.19.0",
|
|
173
165
|
"@googleapis/sheets": "^13.0.1",
|
|
174
|
-
"@planetscale/database": "^1.
|
|
175
|
-
"@prisma/adapter-mariadb": "^7.
|
|
176
|
-
"@prisma/adapter-pg": "^7.
|
|
177
|
-
"@prisma/adapter-planetscale": "^7.
|
|
178
|
-
"@prisma/client": "^7.
|
|
166
|
+
"@planetscale/database": "^1.20.1",
|
|
167
|
+
"@prisma/adapter-mariadb": "^7.7.0",
|
|
168
|
+
"@prisma/adapter-pg": "^7.7.0",
|
|
169
|
+
"@prisma/adapter-planetscale": "^7.7.0",
|
|
170
|
+
"@prisma/client": "^7.7.0",
|
|
179
171
|
"@types/babel__core": "^7.20.5",
|
|
180
172
|
"@types/fs-extra": "11.0.4",
|
|
181
173
|
"@types/jest": "30.0.0",
|
|
182
174
|
"@types/luxon": "3.7.1",
|
|
183
|
-
"@types/node": "^24.
|
|
175
|
+
"@types/node": "^24.12.2",
|
|
184
176
|
"@types/react": "^19.2.14",
|
|
185
|
-
"babel-jest": "30.
|
|
186
|
-
"dotenv": "^17.
|
|
177
|
+
"babel-jest": "30.3.0",
|
|
178
|
+
"dotenv": "^17.4.1",
|
|
187
179
|
"drizzle-orm": "beta",
|
|
188
|
-
"fs-extra": "11.3.
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"next": "^16.1.6",
|
|
180
|
+
"fs-extra": "11.3.4",
|
|
181
|
+
"googleapis-common": "^8.0.1",
|
|
182
|
+
"jest": "30.3.0",
|
|
183
|
+
"next": "^16.2.3",
|
|
193
184
|
"node-fetch": "3.3.2",
|
|
194
|
-
"react": "^19.2.
|
|
195
|
-
"react-intersection-observer": "^10.0.
|
|
196
|
-
"stream-chain": "^3.
|
|
197
|
-
"
|
|
198
|
-
"swr": "^2.4.0",
|
|
185
|
+
"react": "^19.2.5",
|
|
186
|
+
"react-intersection-observer": "^10.0.3",
|
|
187
|
+
"stream-chain": "^3.6.1",
|
|
188
|
+
"swr": "^2.4.1",
|
|
199
189
|
"ts-node": "10.9.2",
|
|
200
|
-
"tsdown": "^0.21.
|
|
190
|
+
"tsdown": "^0.21.7",
|
|
201
191
|
"tslib": "2.8.1",
|
|
202
|
-
"typescript": "^
|
|
192
|
+
"typescript": "^6.0.2"
|
|
203
193
|
},
|
|
204
194
|
"exports": {
|
|
205
195
|
"./_class": "./dist/_class/index.mjs",
|
|
@@ -219,7 +209,6 @@
|
|
|
219
209
|
"./aws/ses/server": "./dist/aws/ses/server/index.mjs",
|
|
220
210
|
"./aws/sqs/server": "./dist/aws/sqs/server/index.mjs",
|
|
221
211
|
"./aws/ssm/server": "./dist/aws/ssm/server/index.mjs",
|
|
222
|
-
"./axios": "./dist/axios/index.mjs",
|
|
223
212
|
"./boolean": "./dist/boolean/index.mjs",
|
|
224
213
|
"./brightData/serpApi/server": "./dist/brightData/serpApi/server/index.mjs",
|
|
225
214
|
"./brightData/server": "./dist/brightData/server/index.mjs",
|
package/dist/axios/index.d.mts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { f as ApiResponseClass } from "../index-c5HdwLaY.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/axios/deleteRequest.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Make a DELETE request.
|
|
6
|
-
* Can't use the function name delete as it's reserved
|
|
7
|
-
*/
|
|
8
|
-
declare const deleteRequest: (url: string, config?: {}) => Promise<ApiResponseClass>;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/axios/get.d.ts
|
|
11
|
-
/**
|
|
12
|
-
* Make a GET request.
|
|
13
|
-
*/
|
|
14
|
-
declare const get: (url: string, config?: {}) => Promise<ApiResponseClass>;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/axios/post.d.ts
|
|
17
|
-
/**
|
|
18
|
-
* Make a POST request.
|
|
19
|
-
*/
|
|
20
|
-
declare const post: (url: string, data?: {}, config?: {}) => Promise<ApiResponseClass>;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { deleteRequest, get, post };
|
package/dist/axios/index.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { u as ApiResponseClass } from "../api-D7uUBIq4.mjs";
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
|
|
4
|
-
//#region src/axios/deleteRequest.ts
|
|
5
|
-
/**
|
|
6
|
-
* Make a DELETE request.
|
|
7
|
-
* Can't use the function name delete as it's reserved
|
|
8
|
-
*/
|
|
9
|
-
const deleteRequest = async (url, config = {}) => {
|
|
10
|
-
return await axios.delete(url, config).then(async (response) => {
|
|
11
|
-
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
12
|
-
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
13
|
-
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
14
|
-
}).catch((error) => {
|
|
15
|
-
return new ApiResponseClass().setToError(null, error.message);
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/axios/get.ts
|
|
21
|
-
/**
|
|
22
|
-
* Make a GET request.
|
|
23
|
-
*/
|
|
24
|
-
const get = async (url, config = {}) => {
|
|
25
|
-
return await axios.get(url, config).then(async (response) => {
|
|
26
|
-
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
27
|
-
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
28
|
-
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
29
|
-
}).catch((error) => {
|
|
30
|
-
return new ApiResponseClass().setToError(null, error.message);
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/axios/post.ts
|
|
36
|
-
/**
|
|
37
|
-
* Make a POST request.
|
|
38
|
-
*/
|
|
39
|
-
const post = async (url, data = {}, config = {}) => {
|
|
40
|
-
return await axios.post(url, data, config).then(async (response) => {
|
|
41
|
-
if (void 0 !== response.data.body && void 0 !== response.data.error && void 0 !== response.data.state) return new ApiResponseClass(response.data);
|
|
42
|
-
else if (response.status >= 200 && response.status <= 299) return new ApiResponseClass().setToSuccess(response.data);
|
|
43
|
-
return new ApiResponseClass().setToError(response.data, response.statusText);
|
|
44
|
-
}).catch((error) => {
|
|
45
|
-
return new ApiResponseClass().setToError(null, error.message);
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
export { deleteRequest, get, post };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|