@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.
Files changed (91) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/dist/_class/index.d.mts +1 -1
  3. package/dist/_class/index.mjs +3 -4
  4. package/dist/adverity/index.d.mts +1 -1
  5. package/dist/adverity/server/index.d.mts +2 -2
  6. package/dist/adverity/server/index.mjs +1 -1
  7. package/dist/api/index.d.mts +1 -1
  8. package/dist/api/index.mjs +1 -1
  9. package/dist/array/index.mjs +1 -3
  10. package/dist/aws/ec2/server/index.d.mts +2 -2
  11. package/dist/aws/ec2/server/index.mjs +1 -1
  12. package/dist/aws/ecs/server/index.d.mts +2 -2
  13. package/dist/aws/ecs/server/index.mjs +1 -1
  14. package/dist/aws/glue/server/index.d.mts +2 -2
  15. package/dist/aws/glue/server/index.mjs +1 -1
  16. package/dist/aws/lambda/server/index.d.mts +2 -2
  17. package/dist/aws/lambda/server/index.mjs +2 -2
  18. package/dist/aws/s3/server/index.d.mts +2 -2
  19. package/dist/aws/s3/server/index.mjs +4 -5
  20. package/dist/aws/server/index.d.mts +1 -1
  21. package/dist/aws/server/index.mjs +1 -1
  22. package/dist/aws/ses/server/index.d.mts +2 -2
  23. package/dist/aws/ses/server/index.mjs +4 -5
  24. package/dist/aws/sqs/server/index.d.mts +2 -2
  25. package/dist/aws/sqs/server/index.mjs +1 -1
  26. package/dist/aws/ssm/server/index.d.mts +2 -2
  27. package/dist/aws/ssm/server/index.mjs +1 -1
  28. package/dist/axios/index.d.mts +1 -1
  29. package/dist/axios/index.mjs +5 -5
  30. package/dist/boolean/index.mjs +1 -3
  31. package/dist/brightData/serpApi/server/index.d.mts +2 -2
  32. package/dist/brightData/serpApi/server/index.mjs +1 -1
  33. package/dist/brightData/server/index.d.mts +1 -1
  34. package/dist/brightData/webScraperIde/server/index.d.mts +1 -1
  35. package/dist/brightData/webScraperIde/server/index.mjs +1 -1
  36. package/dist/date/index.d.mts +1 -1
  37. package/dist/eskimi/server/index.mjs +1 -1
  38. package/dist/googleAds/server/index.d.mts +1 -1
  39. package/dist/googleCloud/bigquery/server/index.d.mts +2 -2
  40. package/dist/googleCloud/server/index.d.mts +1 -1
  41. package/dist/googleCloud/sheets/server/index.d.mts +2 -2
  42. package/dist/googleCloud/storage/server/index.d.mts +2 -2
  43. package/dist/googlePageSpeed/server/index.d.mts +1 -1
  44. package/dist/googlePageSpeed/server/index.mjs +1 -1
  45. package/dist/googleSearchIncidents/server/index.mjs +1 -1
  46. package/dist/greenDomain/server/index.mjs +1 -1
  47. package/dist/littleWarden/server/index.d.mts +1 -1
  48. package/dist/littleWarden/server/index.mjs +1 -1
  49. package/dist/lodash/index.d.mts +19 -0
  50. package/dist/lodash/index.mjs +73 -0
  51. package/dist/lumar/api/server/index.d.mts +1 -1
  52. package/dist/lumar/api/server/index.mjs +1 -1
  53. package/dist/lumar/graphql/server/index.d.mts +1 -1
  54. package/dist/lumar/graphql/server/index.mjs +1 -1
  55. package/dist/myTarget/server/index.d.mts +1 -1
  56. package/dist/myTarget/server/index.mjs +1 -1
  57. package/dist/number/index.mjs +1 -1
  58. package/dist/object/index.mjs +1 -1
  59. package/dist/onePassword/server/index.d.mts +1 -1
  60. package/dist/openAi/server/index.d.mts +1 -1
  61. package/dist/openAi/server/index.mjs +1 -1
  62. package/dist/prisma/index.mjs +2 -3
  63. package/dist/prisma/server/index.d.mts +1 -1
  64. package/dist/snapchat/server/index.d.mts +1 -1
  65. package/dist/snapchat/server/index.mjs +1 -1
  66. package/dist/stream/server/index.mjs +5 -1
  67. package/dist/string/index.mjs +3 -7
  68. package/dist/swr/client/index.d.mts +1 -1
  69. package/dist/upTimeRobot/server/index.d.mts +1 -1
  70. package/dist/upTimeRobot/server/index.mjs +4 -5
  71. package/dist/url/index.mjs +1 -1
  72. package/dist/url/server/index.mjs +2 -2
  73. package/dist/util/index.d.mts +1 -1
  74. package/dist/util/index.mjs +1 -1
  75. package/dist/xml/server/index.mjs +1 -1
  76. package/package.json +2 -3
  77. package/tsdown.config.ts +1 -0
  78. package/dist/chunk-CgI6uo-e.mjs +0 -32
  79. package/dist/from-9s4TjsYv.mjs +0 -3878
  80. package/dist/multipart-parser-BC14QSvI.mjs +0 -290
  81. package/dist/src-BeXFXTgz.mjs +0 -1272
  82. /package/dist/{api-DGKJDAfb.mjs → api-BlYy5Efh.mjs} +0 -0
  83. /package/dist/{getDecimal-CafxtLhH.mjs → getDecimal-DRv1J8WD.mjs} +0 -0
  84. /package/dist/{index-CFaAdPAh.d.mts → index-1SE8er2n.d.mts} +0 -0
  85. /package/dist/{index-DEm1Wodf.d.mts → index-BOvAlQeY.d.mts} +0 -0
  86. /package/dist/{index-CMfxuwL1.d.mts → index-Bfls0t50.d.mts} +0 -0
  87. /package/dist/{index-sfVt7tI_.d.mts → index-CN31pmsW.d.mts} +0 -0
  88. /package/dist/{index-B20FTOvk.d.mts → index-D1tpqoPU.d.mts} +0 -0
  89. /package/dist/{index-CIG08fpw.d.mts → index-Yx2783su.d.mts} +0 -0
  90. /package/dist/{index-B4K9Z1U-.d.mts → index-ndHDK8xQ.d.mts} +0 -0
  91. /package/dist/{server-Bwy4JI8Z.mjs → server-Dbl5Ic6I.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { s as ApiResponse } from "../../index-B20FTOvk.mjs";
1
+ import { s as ApiResponse } from "../../index-D1tpqoPU.mjs";
2
2
 
3
3
  //#region src/myTarget/server/myTarget.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import "../../api-DGKJDAfb.mjs";
1
+ import "../../api-BlYy5Efh.mjs";
2
2
  import { post } from "../../axios/index.mjs";
3
3
 
4
4
  //#region src/myTarget/server/myTarget.ts
@@ -1,4 +1,4 @@
1
- import { n as getNumber, t as getDecimal } from "../getDecimal-CafxtLhH.mjs";
1
+ import { n as getNumber, t as getDecimal } from "../getDecimal-DRv1J8WD.mjs";
2
2
 
3
3
  //#region src/number/format.ts
4
4
  /**
@@ -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) {
@@ -1,4 +1,4 @@
1
- import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
1
+ import { t as BaseNamespace } from "../../index-1SE8er2n.mjs";
2
2
  import * as _1password_sdk0 from "@1password/sdk";
3
3
  import { Client } from "@1password/sdk";
4
4
 
@@ -1,4 +1,4 @@
1
- import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
1
+ import { t as BaseNamespace } from "../../index-1SE8er2n.mjs";
2
2
 
3
3
  //#region src/openAi/server/OpenAiNamespace.d.ts
4
4
  declare class OpenAiNamespace extends BaseNamespace {
@@ -1,5 +1,5 @@
1
1
  import { BaseNamespace } from "../../_class/index.mjs";
2
- import "../../api-DGKJDAfb.mjs";
2
+ import "../../api-BlYy5Efh.mjs";
3
3
  import { post } from "../../axios/index.mjs";
4
4
  import { onePasswordClient } from "../../onePassword/server/index.mjs";
5
5
 
@@ -1,5 +1,4 @@
1
- import { t as getDecimal$1 } from "../getDecimal-CafxtLhH.mjs";
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,4 +1,4 @@
1
- import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
1
+ import { t as BaseNamespace } from "../../index-1SE8er2n.mjs";
2
2
 
3
3
  //#region src/prisma/server/PrismaNamespace.d.ts
4
4
  declare class PrismaNamespace extends BaseNamespace {
@@ -1,4 +1,4 @@
1
- import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
1
+ import { t as BaseNamespace } from "../../index-1SE8er2n.mjs";
2
2
 
3
3
  //#region src/snapchat/server/SnapchatNamespace.d.ts
4
4
  type Client = {
@@ -1,5 +1,5 @@
1
1
  import { BaseNamespace } from "../../_class/index.mjs";
2
- import "../../api-DGKJDAfb.mjs";
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 { n as __require } from "../../chunk-CgI6uo-e.mjs";
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;
@@ -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 = _unescape(response);
138
+ } else response = unescape(response);
143
139
  return response;
144
140
  };
145
141
 
@@ -1,4 +1,4 @@
1
- import { c as ApiState } from "../../index-B20FTOvk.mjs";
1
+ import { c as ApiState } from "../../index-D1tpqoPU.mjs";
2
2
 
3
3
  //#region src/swr/client/swr.d.ts
4
4
  type Swr = {
@@ -1,4 +1,4 @@
1
- import { t as BaseNamespace } from "../../index-CFaAdPAh.mjs";
1
+ import { t as BaseNamespace } from "../../index-1SE8er2n.mjs";
2
2
 
3
3
  //#region src/upTimeRobot/server/UpTimeRobotNamespace.d.ts
4
4
  type GetReportProps = {
@@ -1,8 +1,7 @@
1
1
  import { BaseNamespace } from "../../_class/index.mjs";
2
- import "../../api-DGKJDAfb.mjs";
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();
@@ -1,5 +1,5 @@
1
+ import { merge } from "../lodash/index.mjs";
1
2
  import { isDevelopment, isLocalhost, isProduction, isStaging } from "../environment/index.mjs";
2
- import merge from "lodash/merge";
3
3
 
4
4
  //#region src/url/url.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { createDirectory } from "../../file/server/index.mjs";
2
- import get from "axios";
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 get({
14
+ await axios({
15
15
  method: "get",
16
16
  url,
17
17
  responseType: "stream"
@@ -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>;
@@ -1,5 +1,5 @@
1
+ import { isObject } from "../lodash/index.mjs";
1
2
  import { getArray } from "../array/index.mjs";
2
- import isObject from "lodash/isObject";
3
3
  import { chunk, flatten } from "lodash";
4
4
 
5
5
  //#region src/util/defaultTo.ts
@@ -1,4 +1,4 @@
1
- import "../../api-DGKJDAfb.mjs";
1
+ import "../../api-BlYy5Efh.mjs";
2
2
  import { get } from "../../axios/index.mjs";
3
3
 
4
4
  //#region src/xml/server/getXml.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.3.7",
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
@@ -7,4 +7,5 @@ export default defineConfig({
7
7
  dts : true,
8
8
  clean : true,
9
9
  exports: true, // auto-generates the exports map in package.json
10
+ skipNodeModulesBundle: true, // don't inline dependencies, let the consumer resolve them
10
11
  });
@@ -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 };