@8ms/helpers 2.4.10 → 2.4.12

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 (78) hide show
  1. package/dist/_class/BaseClass.cjs +31 -21
  2. package/dist/_class/BaseClass.mjs +31 -21
  3. package/dist/_class/BaseNamespace.cjs +10 -9
  4. package/dist/_class/BaseNamespace.mjs +10 -9
  5. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  6. package/dist/_virtual/_rolldown/runtime.mjs +1 -1
  7. package/dist/api/ApiResponseClass.cjs +96 -96
  8. package/dist/api/ApiResponseClass.mjs +96 -96
  9. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.cjs +70 -60
  10. package/dist/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.mjs +70 -60
  11. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.cjs +30 -28
  12. package/dist/aws/cloudWatchMetric/server/AwsCloudWatchMetricNamespace.mjs +30 -28
  13. package/dist/aws/ec2/server/AwsEc2Namespace.cjs +29 -32
  14. package/dist/aws/ec2/server/AwsEc2Namespace.mjs +29 -32
  15. package/dist/aws/ecs/server/AwsEcsNamespace.cjs +92 -78
  16. package/dist/aws/ecs/server/AwsEcsNamespace.mjs +92 -78
  17. package/dist/aws/glue/server/AwsGlueNamespace.cjs +17 -17
  18. package/dist/aws/glue/server/AwsGlueNamespace.mjs +17 -17
  19. package/dist/aws/lambda/server/AwsLambdaNamespace.cjs +33 -31
  20. package/dist/aws/lambda/server/AwsLambdaNamespace.mjs +33 -31
  21. package/dist/aws/s3/server/AwsS3Namespace.cjs +280 -265
  22. package/dist/aws/s3/server/AwsS3Namespace.mjs +280 -265
  23. package/dist/aws/ses/server/AwsSesNamespace.cjs +27 -30
  24. package/dist/aws/ses/server/AwsSesNamespace.mjs +27 -30
  25. package/dist/aws/ses/server/SimpleEmail.cjs +202 -199
  26. package/dist/aws/ses/server/SimpleEmail.mjs +202 -199
  27. package/dist/aws/sqs/server/AwsSqsNamespace.cjs +35 -38
  28. package/dist/aws/sqs/server/AwsSqsNamespace.mjs +35 -38
  29. package/dist/aws/ssm/server/AwsSsmNamespace.cjs +24 -23
  30. package/dist/aws/ssm/server/AwsSsmNamespace.mjs +24 -23
  31. package/dist/date/index.cjs +1 -1
  32. package/dist/date/index.mjs +1 -1
  33. package/dist/drizzle/server/DrizzleNamespace.cjs +39 -42
  34. package/dist/drizzle/server/DrizzleNamespace.d.cts +1 -0
  35. package/dist/drizzle/server/DrizzleNamespace.mjs +39 -42
  36. package/dist/googleAds/server/GoogleAdsNamespace.cjs +21 -24
  37. package/dist/googleAds/server/GoogleAdsNamespace.mjs +21 -24
  38. package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.cjs +87 -70
  39. package/dist/googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.mjs +87 -70
  40. package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.cjs +22 -25
  41. package/dist/googleCloud/sheets/server/GoogleCloudSheetsNamespace.mjs +22 -25
  42. package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.cjs +45 -38
  43. package/dist/googleCloud/storage/server/GoogleCloudStorageNamespace.mjs +45 -38
  44. package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.cjs +12 -15
  45. package/dist/googlePageSpeed/server/GooglePageSpeedNamespace.mjs +12 -15
  46. package/dist/littleWarden/server/LittleWardenNamespace.cjs +12 -15
  47. package/dist/littleWarden/server/LittleWardenNamespace.mjs +12 -15
  48. package/dist/nextJs/client/index.cjs +2 -0
  49. package/dist/nextJs/client/index.d.cts +2 -1
  50. package/dist/nextJs/client/index.d.mts +2 -1
  51. package/dist/nextJs/client/index.mjs +2 -1
  52. package/dist/nextJs/client/useAsyncEffect.cjs +23 -0
  53. package/dist/nextJs/client/useAsyncEffect.d.cts +4 -0
  54. package/dist/nextJs/client/useAsyncEffect.d.mts +4 -0
  55. package/dist/nextJs/client/useAsyncEffect.mjs +21 -0
  56. package/dist/onePassword/server/OnePasswordNamespace.cjs +30 -33
  57. package/dist/onePassword/server/OnePasswordNamespace.mjs +30 -33
  58. package/dist/openAi/server/OpenAiNamespace.cjs +20 -20
  59. package/dist/openAi/server/OpenAiNamespace.mjs +20 -20
  60. package/dist/prisma/server/PrismaNamespace.cjs +35 -38
  61. package/dist/prisma/server/PrismaNamespace.mjs +35 -38
  62. package/dist/snapchat/server/SnapchatNamespace.cjs +12 -12
  63. package/dist/snapchat/server/SnapchatNamespace.mjs +12 -12
  64. package/dist/upTimeRobot/server/UpTimeRobotNamespace.cjs +19 -19
  65. package/dist/upTimeRobot/server/UpTimeRobotNamespace.mjs +19 -19
  66. package/package.json +4 -12
  67. package/dist/nextJs/index.cjs +0 -4
  68. package/dist/nextJs/index.d.cts +0 -2
  69. package/dist/nextJs/index.d.mts +0 -2
  70. package/dist/nextJs/index.mjs +0 -2
  71. package/dist/nextJs/nextJs.cjs +0 -13
  72. package/dist/nextJs/nextJs.d.cts +0 -19
  73. package/dist/nextJs/nextJs.d.mts +0 -19
  74. package/dist/nextJs/nextJs.mjs +0 -11
  75. package/dist/nextJs/tests/getIp.cjs +0 -9
  76. package/dist/nextJs/tests/getIp.d.cts +0 -1
  77. package/dist/nextJs/tests/getIp.d.mts +0 -1
  78. package/dist/nextJs/tests/getIp.mjs +0 -10
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.4.10",
4
+ "version": "2.4.12",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
@@ -876,21 +876,13 @@
876
876
  "import": "./dist/nextAuth/nextAuth.mjs",
877
877
  "require": "./dist/nextAuth/nextAuth.cjs"
878
878
  },
879
- "./nextJs": {
880
- "import": "./dist/nextJs/index.mjs",
881
- "require": "./dist/nextJs/index.cjs"
882
- },
883
879
  "./nextJs/client": {
884
880
  "import": "./dist/nextJs/client/index.mjs",
885
881
  "require": "./dist/nextJs/client/index.cjs"
886
882
  },
887
- "./nextJs/nextJs": {
888
- "import": "./dist/nextJs/nextJs.mjs",
889
- "require": "./dist/nextJs/nextJs.cjs"
890
- },
891
- "./nextJs/tests/getIp": {
892
- "import": "./dist/nextJs/tests/getIp.mjs",
893
- "require": "./dist/nextJs/tests/getIp.cjs"
883
+ "./nextJs/client/useAsyncEffect": {
884
+ "import": "./dist/nextJs/client/useAsyncEffect.mjs",
885
+ "require": "./dist/nextJs/client/useAsyncEffect.cjs"
894
886
  },
895
887
  "./number": {
896
888
  "import": "./dist/number/index.mjs",
@@ -1,4 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_nextJs_nextJs = require("./nextJs.cjs");
3
- exports.getIp = require_nextJs_nextJs.getIp;
4
- exports.getUserAgent = require_nextJs_nextJs.getUserAgent;
@@ -1,2 +0,0 @@
1
- import { getIp, getUserAgent } from "./nextJs.cjs";
2
- export { getIp, getUserAgent };
@@ -1,2 +0,0 @@
1
- import { getIp, getUserAgent } from "./nextJs.mjs";
2
- export { getIp, getUserAgent };
@@ -1,2 +0,0 @@
1
- import { getIp, getUserAgent } from "./nextJs.mjs";
2
- export { getIp, getUserAgent };
@@ -1,13 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/nextJs/nextJs.ts
3
- /**
4
- * Get the user's remote IP Address
5
- */
6
- const getIp = ({ req }) => String(req.headers?.["x-real-ip"] || "unset");
7
- /**
8
- * Get the user's User Agent
9
- */
10
- const getUserAgent = ({ req }) => String(req.headers["user-agent"] || "unset");
11
- //#endregion
12
- exports.getIp = getIp;
13
- exports.getUserAgent = getUserAgent;
@@ -1,19 +0,0 @@
1
- //#region src/nextJs/nextJs.d.ts
2
- /**
3
- * Get the user's remote IP Address
4
- */
5
- declare const getIp: ({
6
- req
7
- }: {
8
- req: any;
9
- }) => string;
10
- /**
11
- * Get the user's User Agent
12
- */
13
- declare const getUserAgent: ({
14
- req
15
- }: {
16
- req: any;
17
- }) => string;
18
- //#endregion
19
- export { getIp, getUserAgent };
@@ -1,19 +0,0 @@
1
- //#region src/nextJs/nextJs.d.ts
2
- /**
3
- * Get the user's remote IP Address
4
- */
5
- declare const getIp: ({
6
- req
7
- }: {
8
- req: any;
9
- }) => string;
10
- /**
11
- * Get the user's User Agent
12
- */
13
- declare const getUserAgent: ({
14
- req
15
- }: {
16
- req: any;
17
- }) => string;
18
- //#endregion
19
- export { getIp, getUserAgent };
@@ -1,11 +0,0 @@
1
- //#region src/nextJs/nextJs.ts
2
- /**
3
- * Get the user's remote IP Address
4
- */
5
- const getIp = ({ req }) => String(req.headers?.["x-real-ip"] || "unset");
6
- /**
7
- * Get the user's User Agent
8
- */
9
- const getUserAgent = ({ req }) => String(req.headers["user-agent"] || "unset");
10
- //#endregion
11
- export { getIp, getUserAgent };
@@ -1,9 +0,0 @@
1
- const require_nextJs_nextJs = require("../nextJs.cjs");
2
- //#region src/nextJs/tests/getIp.ts
3
- test("getIp - Exists", () => {
4
- expect(require_nextJs_nextJs.getIp({ req: { headers: { "x-real-ip": "value" } } })).toBe("value");
5
- });
6
- test("getIp - Undefined", () => {
7
- expect(require_nextJs_nextJs.getIp({ req: { headers: {} } })).toBe("unset");
8
- });
9
- //#endregion
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,10 +0,0 @@
1
- import { getIp } from "../nextJs.mjs";
2
- //#region src/nextJs/tests/getIp.ts
3
- test("getIp - Exists", () => {
4
- expect(getIp({ req: { headers: { "x-real-ip": "value" } } })).toBe("value");
5
- });
6
- test("getIp - Undefined", () => {
7
- expect(getIp({ req: { headers: {} } })).toBe("unset");
8
- });
9
- //#endregion
10
- export {};