@8ms/helpers 2.3.7 → 2.3.9
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/.yarn/install-state.gz +0 -0
- package/dist/_class/index.d.mts +1 -1
- package/dist/_class/index.mjs +3 -4
- package/dist/adverity/index.d.mts +1 -1
- package/dist/adverity/server/index.d.mts +2 -2
- package/dist/adverity/server/index.mjs +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/array/index.mjs +1 -3
- package/dist/aws/ec2/server/index.d.mts +2 -2
- package/dist/aws/ec2/server/index.mjs +1 -1
- package/dist/aws/ecs/server/index.d.mts +2 -2
- package/dist/aws/ecs/server/index.mjs +1 -1
- package/dist/aws/glue/server/index.d.mts +2 -2
- package/dist/aws/glue/server/index.mjs +1 -1
- package/dist/aws/lambda/server/index.d.mts +2 -2
- package/dist/aws/lambda/server/index.mjs +2 -2
- package/dist/aws/s3/server/index.d.mts +2 -2
- package/dist/aws/s3/server/index.mjs +4 -5
- package/dist/aws/server/index.d.mts +1 -1
- package/dist/aws/server/index.mjs +1 -1
- package/dist/aws/ses/server/index.d.mts +2 -2
- package/dist/aws/ses/server/index.mjs +4 -5
- package/dist/aws/sqs/server/index.d.mts +2 -2
- package/dist/aws/sqs/server/index.mjs +1 -1
- package/dist/aws/ssm/server/index.d.mts +2 -2
- package/dist/aws/ssm/server/index.mjs +1 -1
- package/dist/axios/index.d.mts +1 -1
- package/dist/axios/index.mjs +5 -5
- package/dist/boolean/index.mjs +1 -3
- package/dist/brightData/serpApi/server/index.d.mts +2 -2
- package/dist/brightData/serpApi/server/index.mjs +1 -1
- package/dist/brightData/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.d.mts +1 -1
- package/dist/brightData/webScraperIde/server/index.mjs +1 -1
- package/dist/date/index.d.mts +1 -1
- package/dist/eskimi/server/index.mjs +1 -1
- package/dist/googleAds/server/index.d.mts +1 -1
- package/dist/googleCloud/bigquery/server/index.d.mts +2 -2
- package/dist/googleCloud/server/index.d.mts +1 -1
- package/dist/googleCloud/sheets/server/index.d.mts +2 -2
- package/dist/googleCloud/storage/server/index.d.mts +2 -2
- package/dist/googlePageSpeed/server/index.d.mts +1 -1
- package/dist/googlePageSpeed/server/index.mjs +1 -1
- package/dist/googleSearchIncidents/server/index.mjs +1 -1
- package/dist/greenDomain/server/index.mjs +1 -1
- package/dist/littleWarden/server/index.d.mts +1 -1
- package/dist/littleWarden/server/index.mjs +1 -1
- package/dist/lodash/index.d.mts +19 -0
- package/dist/lodash/index.mjs +73 -0
- package/dist/lumar/api/server/index.d.mts +1 -1
- package/dist/lumar/api/server/index.mjs +1 -1
- package/dist/lumar/graphql/server/index.d.mts +1 -1
- package/dist/lumar/graphql/server/index.mjs +1 -1
- package/dist/myTarget/server/index.d.mts +1 -1
- package/dist/myTarget/server/index.mjs +1 -1
- package/dist/number/index.mjs +1 -1
- package/dist/object/index.mjs +1 -1
- package/dist/onePassword/server/index.d.mts +1 -1
- package/dist/openAi/server/index.d.mts +1 -1
- package/dist/openAi/server/index.mjs +1 -1
- package/dist/prisma/index.mjs +2 -3
- package/dist/prisma/server/index.d.mts +1 -1
- package/dist/snapchat/server/index.d.mts +1 -1
- package/dist/snapchat/server/index.mjs +1 -1
- package/dist/stream/server/index.mjs +5 -1
- package/dist/string/index.mjs +3 -7
- package/dist/swr/client/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.d.mts +1 -1
- package/dist/upTimeRobot/server/index.mjs +4 -5
- package/dist/url/index.mjs +1 -1
- package/dist/url/server/index.mjs +2 -2
- package/dist/util/index.d.mts +1 -1
- package/dist/util/index.mjs +1 -1
- package/dist/xml/server/index.mjs +1 -1
- package/package.json +2 -3
- package/tsdown.config.ts +1 -0
- package/dist/chunk-CgI6uo-e.mjs +0 -32
- package/dist/from-9s4TjsYv.mjs +0 -3878
- package/dist/multipart-parser-BC14QSvI.mjs +0 -290
- package/dist/src-BeXFXTgz.mjs +0 -1272
- /package/dist/{api-DGKJDAfb.mjs → api-BlYy5Efh.mjs} +0 -0
- /package/dist/{getDecimal-CafxtLhH.mjs → getDecimal-DRv1J8WD.mjs} +0 -0
- /package/dist/{index-CFaAdPAh.d.mts → index-1SE8er2n.d.mts} +0 -0
- /package/dist/{index-DEm1Wodf.d.mts → index-BOvAlQeY.d.mts} +0 -0
- /package/dist/{index-CMfxuwL1.d.mts → index-Bfls0t50.d.mts} +0 -0
- /package/dist/{index-sfVt7tI_.d.mts → index-CN31pmsW.d.mts} +0 -0
- /package/dist/{index-B20FTOvk.d.mts → index-D1tpqoPU.d.mts} +0 -0
- /package/dist/{index-CIG08fpw.d.mts → index-Yx2783su.d.mts} +0 -0
- /package/dist/{index-B4K9Z1U-.d.mts → index-ndHDK8xQ.d.mts} +0 -0
- /package/dist/{server-Bwy4JI8Z.mjs → server-Dbl5Ic6I.mjs} +0 -0
package/dist/number/index.mjs
CHANGED
package/dist/object/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const replaceKeys = (instance, getNewKey) => {
|
|
7
7
|
let response = instance;
|
|
8
|
-
if (Array.isArray(instance)) {
|
|
8
|
+
if (Array.Array.isArray(instance)) {
|
|
9
9
|
response = [];
|
|
10
10
|
for (let i = 0; i < instance.length; i++) response[i] = replaceKeys(instance[i], getNewKey);
|
|
11
11
|
} else if ("object" === typeof instance) {
|
package/dist/prisma/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as getDecimal$1 } from "../getDecimal-
|
|
2
|
-
import isArray from "lodash/isArray";
|
|
1
|
+
import { t as getDecimal$1 } from "../getDecimal-DRv1J8WD.mjs";
|
|
3
2
|
|
|
4
3
|
//#region src/prisma/getDecimal.ts
|
|
5
4
|
/**
|
|
@@ -7,7 +6,7 @@ import isArray from "lodash/isArray";
|
|
|
7
6
|
*/
|
|
8
7
|
const getDecimal = (input, dp = 2) => {
|
|
9
8
|
let numberString = "";
|
|
10
|
-
if (isArray(input?.d)) numberString = input.absoluteValue();
|
|
9
|
+
if (Array.isArray(input?.d)) numberString = input.absoluteValue();
|
|
11
10
|
else numberString = input.toString();
|
|
12
11
|
return getDecimal$1(numberString, dp);
|
|
13
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
2
|
-
import "../../api-
|
|
2
|
+
import "../../api-BlYy5Efh.mjs";
|
|
3
3
|
import { post } from "../../axios/index.mjs";
|
|
4
4
|
import { onePasswordClient } from "../../onePassword/server/index.mjs";
|
|
5
5
|
import { DateTime } from "luxon";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
2
|
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
3
7
|
//#region src/stream/server/sort.ts
|
|
4
8
|
const Transform = __require("stream").Transform;
|
|
5
9
|
const batch = 15e3;
|
package/dist/string/index.mjs
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { isDate, isObject, trim, unescape } from "../lodash/index.mjs";
|
|
1
2
|
import { getYmdString } from "../date/index.mjs";
|
|
2
|
-
import isArray from "lodash/isArray";
|
|
3
|
-
import isObject from "lodash/isObject";
|
|
4
|
-
import isDate from "lodash/isDate";
|
|
5
|
-
import _unescape from "lodash/unescape";
|
|
6
|
-
import trim from "lodash/trim";
|
|
7
3
|
|
|
8
4
|
//#region src/string/reservedWords.ts
|
|
9
5
|
const reservedWords = [
|
|
@@ -51,7 +47,7 @@ const getString = (input) => {
|
|
|
51
47
|
let string = "";
|
|
52
48
|
if ("string" === typeof input) string = input;
|
|
53
49
|
else if ("number" === typeof input) string = input.toString();
|
|
54
|
-
else if (isObject(input) || isArray(input)) string = JSON.stringify(input);
|
|
50
|
+
else if (isObject(input) || Array.isArray(input)) string = JSON.stringify(input);
|
|
55
51
|
else if (isDate(input)) string = getYmdString(input);
|
|
56
52
|
return string;
|
|
57
53
|
};
|
|
@@ -139,7 +135,7 @@ const getUnescaped = (input) => {
|
|
|
139
135
|
let el = document.createElement("textarea");
|
|
140
136
|
el.innerHTML = response;
|
|
141
137
|
response = el.value;
|
|
142
|
-
} else response =
|
|
138
|
+
} else response = unescape(response);
|
|
143
139
|
return response;
|
|
144
140
|
};
|
|
145
141
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../_class/index.mjs";
|
|
2
|
-
import "../../api-
|
|
2
|
+
import "../../api-BlYy5Efh.mjs";
|
|
3
3
|
import { post } from "../../axios/index.mjs";
|
|
4
4
|
import { onePasswordClient } from "../../onePassword/server/index.mjs";
|
|
5
|
-
import isArray from "lodash/isArray";
|
|
6
5
|
|
|
7
6
|
//#region src/upTimeRobot/server/UpTimeRobotNamespace.ts
|
|
8
7
|
/**
|
|
@@ -21,9 +20,9 @@ var UpTimeRobotNamespace = class extends BaseNamespace {
|
|
|
21
20
|
let finalParams = {};
|
|
22
21
|
if (void 0 !== props) {
|
|
23
22
|
finalParams = { ...props };
|
|
24
|
-
if (void 0 !== props.monitors && isArray(props.monitors)) finalParams["monitors"] = props.monitors.join("-");
|
|
25
|
-
if (void 0 !== props.statuses && isArray(props.statuses)) finalParams["statuses"] = props.statuses.join("-");
|
|
26
|
-
if (void 0 !== props.types && isArray(props.types)) finalParams["types"] = props.types.join("-");
|
|
23
|
+
if (void 0 !== props.monitors && Array.isArray(props.monitors)) finalParams["monitors"] = props.monitors.join("-");
|
|
24
|
+
if (void 0 !== props.statuses && Array.isArray(props.statuses)) finalParams["statuses"] = props.statuses.join("-");
|
|
25
|
+
if (void 0 !== props.types && Array.isArray(props.types)) finalParams["types"] = props.types.join("-");
|
|
27
26
|
}
|
|
28
27
|
const apiResponse = await post(`https://api.uptimerobot.com/v2/getMonitors?api_key=${this.config.apiKey}`, finalParams);
|
|
29
28
|
if (apiResponse.isSuccess()) response = apiResponse.getBody();
|
package/dist/url/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDirectory } from "../../file/server/index.mjs";
|
|
2
|
-
import
|
|
2
|
+
import axios from "axios";
|
|
3
3
|
|
|
4
4
|
//#region src/url/server/writeUrlContents.ts
|
|
5
5
|
/**
|
|
@@ -11,7 +11,7 @@ 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
|
|
14
|
+
await axios({
|
|
15
15
|
method: "get",
|
|
16
16
|
url,
|
|
17
17
|
responseType: "stream"
|
package/dist/util/index.d.mts
CHANGED
|
@@ -39,7 +39,7 @@ declare const isUndefined: (instance: any, keys: any | any[]) => boolean;
|
|
|
39
39
|
* Chunk a queue of promises into controlled chunks to prevent overloading.
|
|
40
40
|
* https://stackoverflow.com/a/53964407
|
|
41
41
|
*/
|
|
42
|
-
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<any
|
|
42
|
+
declare const promiseChunks: (promises: Promise<any>[], size: number, sleepSeconds?: number, callbackFunction?: Function) => Promise<any>;
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/util/sleep.d.ts
|
|
45
45
|
declare const sleep: (seconds: number) => Promise<void>;
|
package/dist/util/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8ms/helpers",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.9",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"axios": "^1.13.5",
|
|
20
|
-
"lodash": "^4.17.23",
|
|
21
20
|
"luxon": "^3.7.2",
|
|
22
21
|
"zod": "^4.3.6"
|
|
23
22
|
},
|
|
@@ -171,7 +170,6 @@
|
|
|
171
170
|
"@types/crypto-js": "^4.2.2",
|
|
172
171
|
"@types/fs-extra": "11.0.4",
|
|
173
172
|
"@types/jest": "30.0.0",
|
|
174
|
-
"@types/lodash": "^4.17.23",
|
|
175
173
|
"@types/luxon": "3.7.1",
|
|
176
174
|
"@types/node": "^24.10.13",
|
|
177
175
|
"@types/react": "^19.2.14",
|
|
@@ -237,6 +235,7 @@
|
|
|
237
235
|
"./inngest": "./dist/inngest/index.mjs",
|
|
238
236
|
"./json": "./dist/json/index.mjs",
|
|
239
237
|
"./littleWarden/server": "./dist/littleWarden/server/index.mjs",
|
|
238
|
+
"./lodash": "./dist/lodash/index.mjs",
|
|
240
239
|
"./lumar/api/server": "./dist/lumar/api/server/index.mjs",
|
|
241
240
|
"./lumar/graphql/server": "./dist/lumar/graphql/server/index.mjs",
|
|
242
241
|
"./myTarget/server": "./dist/myTarget/server/index.mjs",
|
package/tsdown.config.ts
CHANGED
package/dist/chunk-CgI6uo-e.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
//#region \0rolldown/runtime.js
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
16
|
-
__defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: true
|
|
28
|
-
}) : target, mod));
|
|
29
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { __require as n, __toESM as r, __commonJSMin as t };
|