@8ms/helpers 1.42.7 → 1.42.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 (165) hide show
  1. package/dist/aws/athenaExpress/initClient.cjs +3 -3
  2. package/dist/aws/athenaExpress/initClient.mjs +3 -4
  3. package/dist/aws/ec2/initClient.cjs +2 -2
  4. package/dist/aws/ec2/initClient.d.cts +1 -1
  5. package/dist/aws/ec2/initClient.d.mts +1 -1
  6. package/dist/aws/ec2/initClient.mjs +2 -3
  7. package/dist/aws/ec2/startInstances.cjs +1 -1
  8. package/dist/aws/ec2/startInstances.mjs +1 -2
  9. package/dist/aws/ec2/stopInstances.cjs +1 -1
  10. package/dist/aws/ec2/stopInstances.mjs +1 -2
  11. package/dist/aws/ecs/getClusters.cjs +1 -1
  12. package/dist/aws/ecs/getClusters.mjs +1 -2
  13. package/dist/aws/ecs/getTaskDefinitions.cjs +1 -1
  14. package/dist/aws/ecs/getTaskDefinitions.mjs +1 -2
  15. package/dist/aws/ecs/getTasks.cjs +1 -1
  16. package/dist/aws/ecs/getTasks.mjs +1 -2
  17. package/dist/aws/ecs/initClient.cjs +2 -2
  18. package/dist/aws/ecs/initClient.d.cts +1 -1
  19. package/dist/aws/ecs/initClient.d.mts +1 -1
  20. package/dist/aws/ecs/initClient.mjs +2 -3
  21. package/dist/aws/ecs/runTask.cjs +1 -1
  22. package/dist/aws/ecs/runTask.mjs +1 -2
  23. package/dist/aws/glue/initClient.cjs +2 -2
  24. package/dist/aws/glue/initClient.d.cts +1 -1
  25. package/dist/aws/glue/initClient.d.mts +1 -1
  26. package/dist/aws/glue/initClient.mjs +2 -3
  27. package/dist/aws/glue/invoke.cjs +1 -1
  28. package/dist/aws/glue/invoke.mjs +1 -2
  29. package/dist/aws/lambda/initClient.cjs +2 -2
  30. package/dist/aws/lambda/initClient.d.cts +1 -1
  31. package/dist/aws/lambda/initClient.d.mts +1 -1
  32. package/dist/aws/lambda/initClient.mjs +2 -3
  33. package/dist/aws/lambda/invoke.cjs +1 -1
  34. package/dist/aws/lambda/invoke.mjs +1 -2
  35. package/dist/aws/s3/copyFile.cjs +1 -1
  36. package/dist/aws/s3/copyFile.mjs +1 -2
  37. package/dist/aws/s3/deleteFile.cjs +1 -1
  38. package/dist/aws/s3/deleteFile.mjs +1 -2
  39. package/dist/aws/s3/deleteFiles.cjs +1 -1
  40. package/dist/aws/s3/deleteFiles.mjs +1 -2
  41. package/dist/aws/s3/deleteFolder.cjs +1 -1
  42. package/dist/aws/s3/deleteFolder.mjs +1 -2
  43. package/dist/aws/s3/getPresignedPost.cjs +1 -1
  44. package/dist/aws/s3/getPresignedPost.mjs +1 -2
  45. package/dist/aws/s3/getSignedUrl.cjs +2 -2
  46. package/dist/aws/s3/getSignedUrl.d.cts +1 -3
  47. package/dist/aws/s3/getSignedUrl.d.mts +1 -3
  48. package/dist/aws/s3/getSignedUrl.mjs +2 -3
  49. package/dist/aws/s3/initClient.cjs +2 -2
  50. package/dist/aws/s3/initClient.d.cts +1 -1
  51. package/dist/aws/s3/initClient.d.mts +1 -1
  52. package/dist/aws/s3/initClient.mjs +2 -3
  53. package/dist/aws/s3/isFileExists.cjs +1 -1
  54. package/dist/aws/s3/isFileExists.mjs +1 -2
  55. package/dist/aws/s3/listFiles.cjs +1 -1
  56. package/dist/aws/s3/listFiles.mjs +1 -2
  57. package/dist/aws/s3/listFolders.cjs +1 -1
  58. package/dist/aws/s3/listFolders.mjs +1 -2
  59. package/dist/aws/s3/moveFile.cjs +1 -1
  60. package/dist/aws/s3/moveFile.mjs +1 -1
  61. package/dist/aws/s3/readBuffer.cjs +1 -1
  62. package/dist/aws/s3/readBuffer.mjs +1 -2
  63. package/dist/aws/s3/readFile.cjs +1 -1
  64. package/dist/aws/s3/readFile.mjs +1 -2
  65. package/dist/aws/s3/writeFile.cjs +1 -1
  66. package/dist/aws/s3/writeFile.mjs +1 -2
  67. package/dist/aws/s3cache/getCache.cjs +1 -1
  68. package/dist/aws/s3cache/getCache.mjs +1 -1
  69. package/dist/aws/s3cache/updateCache.cjs +1 -1
  70. package/dist/aws/s3cache/updateCache.mjs +1 -1
  71. package/dist/aws/ses/SimpleEmail.cjs +1 -1
  72. package/dist/aws/ses/SimpleEmail.mjs +1 -2
  73. package/dist/aws/ses/initClient.cjs +2 -2
  74. package/dist/aws/ses/initClient.d.cts +1 -1
  75. package/dist/aws/ses/initClient.d.mts +1 -1
  76. package/dist/aws/ses/initClient.mjs +2 -3
  77. package/dist/aws/sqs/addToQueue.cjs +1 -1
  78. package/dist/aws/sqs/addToQueue.mjs +1 -2
  79. package/dist/aws/sqs/deleteFromQueue.cjs +1 -1
  80. package/dist/aws/sqs/deleteFromQueue.mjs +1 -2
  81. package/dist/aws/sqs/initClient.cjs +2 -2
  82. package/dist/aws/sqs/initClient.d.cts +1 -1
  83. package/dist/aws/sqs/initClient.d.mts +1 -1
  84. package/dist/aws/sqs/initClient.mjs +2 -3
  85. package/dist/aws/ssm/getParameter.cjs +1 -1
  86. package/dist/aws/ssm/getParameter.mjs +1 -2
  87. package/dist/aws/ssm/initClient.cjs +2 -2
  88. package/dist/aws/ssm/initClient.d.cts +1 -1
  89. package/dist/aws/ssm/initClient.d.mts +1 -1
  90. package/dist/aws/ssm/initClient.mjs +2 -3
  91. package/dist/crypto/getDecrypt.cjs +2 -2
  92. package/dist/crypto/getDecrypt.d.cts +1 -1
  93. package/dist/crypto/getDecrypt.d.mts +1 -1
  94. package/dist/crypto/getDecrypt.mjs +2 -3
  95. package/dist/crypto/getEncrypt.cjs +2 -2
  96. package/dist/crypto/getEncrypt.d.cts +1 -1
  97. package/dist/crypto/getEncrypt.d.mts +1 -1
  98. package/dist/crypto/getEncrypt.mjs +2 -3
  99. package/dist/crypto/getSha256.cjs +2 -2
  100. package/dist/crypto/getSha256.d.cts +1 -1
  101. package/dist/crypto/getSha256.d.mts +1 -1
  102. package/dist/crypto/getSha256.mjs +2 -3
  103. package/dist/file/createDirectory.cjs +2 -2
  104. package/dist/file/createDirectory.mjs +2 -3
  105. package/dist/google/bigQuery/IsTableExists.cjs +1 -1
  106. package/dist/google/bigQuery/IsTableExists.mjs +1 -1
  107. package/dist/google/bigQuery/createDataset.cjs +1 -1
  108. package/dist/google/bigQuery/createDataset.mjs +1 -1
  109. package/dist/google/bigQuery/createTable.cjs +1 -1
  110. package/dist/google/bigQuery/createTable.mjs +1 -1
  111. package/dist/google/bigQuery/getClient.cjs +2 -2
  112. package/dist/google/bigQuery/getClient.d.cts +1 -1
  113. package/dist/google/bigQuery/getClient.d.mts +1 -1
  114. package/dist/google/bigQuery/getClient.mjs +2 -3
  115. package/dist/google/bigQuery/getDatasets.cjs +1 -1
  116. package/dist/google/bigQuery/getDatasets.mjs +1 -1
  117. package/dist/google/bigQuery/getTables.cjs +1 -1
  118. package/dist/google/bigQuery/getTables.mjs +1 -1
  119. package/dist/google/bigQuery/initClient.cjs +2 -2
  120. package/dist/google/bigQuery/initClient.d.cts +1 -1
  121. package/dist/google/bigQuery/initClient.d.mts +1 -1
  122. package/dist/google/bigQuery/initClient.mjs +2 -3
  123. package/dist/google/bigQuery/isDatasetExists.cjs +1 -1
  124. package/dist/google/bigQuery/isDatasetExists.mjs +1 -1
  125. package/dist/google/bigQuery/query.cjs +1 -1
  126. package/dist/google/bigQuery/query.mjs +1 -1
  127. package/dist/google/sheets/getBatchData.cjs +1 -1
  128. package/dist/google/sheets/getBatchData.mjs +1 -2
  129. package/dist/google/sheets/initClient.cjs +2 -2
  130. package/dist/google/sheets/initClient.d.cts +1 -1
  131. package/dist/google/sheets/initClient.d.mts +1 -1
  132. package/dist/google/sheets/initClient.mjs +2 -3
  133. package/dist/google/storage/copyToCloud.cjs +1 -1
  134. package/dist/google/storage/copyToCloud.mjs +1 -1
  135. package/dist/google/storage/getClient.cjs +2 -3
  136. package/dist/google/storage/getClient.d.cts +1 -1
  137. package/dist/google/storage/getClient.d.mts +1 -1
  138. package/dist/google/storage/getClient.mjs +2 -4
  139. package/dist/google/storage/initClient.cjs +2 -2
  140. package/dist/google/storage/initClient.d.cts +1 -1
  141. package/dist/google/storage/initClient.d.mts +1 -1
  142. package/dist/google/storage/initClient.mjs +2 -3
  143. package/dist/google/storage/isFileExists.cjs +1 -1
  144. package/dist/google/storage/isFileExists.mjs +1 -1
  145. package/dist/google/storage/writeFile.cjs +2 -2
  146. package/dist/google/storage/writeFile.mjs +2 -3
  147. package/dist/googleAds/initClient.cjs +1 -1
  148. package/dist/googleAds/initClient.mjs +1 -2
  149. package/dist/initClients.cjs +16 -16
  150. package/dist/initClients.d.cts +1 -1
  151. package/dist/initClients.d.mts +1 -1
  152. package/dist/initClients.mjs +16 -16
  153. package/dist/prisma/initClient.cjs +4 -4
  154. package/dist/prisma/initClient.d.cts +1 -1
  155. package/dist/prisma/initClient.d.mts +1 -1
  156. package/dist/prisma/initClient.mjs +4 -5
  157. package/dist/util/getBrotliCompressed.cjs +2 -2
  158. package/dist/util/getBrotliCompressed.mjs +2 -3
  159. package/dist/util/getBrotliDecompressed.cjs +2 -2
  160. package/dist/util/getBrotliDecompressed.mjs +2 -3
  161. package/dist/util/getGzipCompressed.cjs +2 -2
  162. package/dist/util/getGzipCompressed.mjs +2 -3
  163. package/dist/util/getGzipDecompressed.cjs +2 -2
  164. package/dist/util/getGzipDecompressed.mjs +2 -3
  165. package/package.json +6 -1
@@ -10,6 +10,6 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  //#endregion
15
15
  export { initClient as default };
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getConfig from "../getConfig.mjs";
3
2
  //#region src/aws/s3/initClient.ts
4
3
  global.awsS3Client = null;
@@ -6,9 +5,9 @@ global.awsS3Client = null;
6
5
  * Shorthand function to get the Lambda Client.
7
6
  * Library: @aws-sdk/client-s3
8
7
  */
9
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
10
9
  if (!global.awsS3Client) {
11
- const { S3Client } = __require("@aws-sdk/client-s3");
10
+ const { S3Client } = await import("@aws-sdk/client-s3");
12
11
  const formattedConfig = getConfig({ config });
13
12
  global.awsS3Client = new S3Client(formattedConfig);
14
13
  }
@@ -6,7 +6,7 @@ const require_aws_isResponse200 = require("../isResponse200.cjs");
6
6
  const isFileExists = async (props) => {
7
7
  let response = false;
8
8
  try {
9
- const { HeadObjectCommand } = require("@aws-sdk/client-s3");
9
+ const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
10
10
  response = require_aws_isResponse200({ apiResponse: await global.awsS3Client.send(new HeadObjectCommand({
11
11
  Bucket: props.bucket,
12
12
  Key: props.key
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import isResponse200 from "../isResponse200.mjs";
3
2
  //#region src/aws/s3/isFileExists.ts
4
3
  /**
@@ -7,7 +6,7 @@ import isResponse200 from "../isResponse200.mjs";
7
6
  const isFileExists = async (props) => {
8
7
  let response = false;
9
8
  try {
10
- const { HeadObjectCommand } = __require("@aws-sdk/client-s3");
9
+ const { HeadObjectCommand } = await import("@aws-sdk/client-s3");
11
10
  response = isResponse200({ apiResponse: await global.awsS3Client.send(new HeadObjectCommand({
12
11
  Bucket: props.bucket,
13
12
  Key: props.key
@@ -7,7 +7,7 @@ const listFiles = async ({ bucket, folder = "" }) => {
7
7
  const cleanFolder = require_string_getFolder({ input: folder });
8
8
  let response = [];
9
9
  let valid = [];
10
- const { ListObjectsV2Command } = require("@aws-sdk/client-s3");
10
+ const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
11
11
  const apiResponse = await global.awsS3Client.send(new ListObjectsV2Command({
12
12
  Bucket: bucket,
13
13
  Delimiter: "/",
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getFolder from "../../string/getFolder.mjs";
3
2
  //#region src/aws/s3/listFiles.ts
4
3
  /**
@@ -8,7 +7,7 @@ const listFiles = async ({ bucket, folder = "" }) => {
8
7
  const cleanFolder = getFolder({ input: folder });
9
8
  let response = [];
10
9
  let valid = [];
11
- const { ListObjectsV2Command } = __require("@aws-sdk/client-s3");
10
+ const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
12
11
  const apiResponse = await global.awsS3Client.send(new ListObjectsV2Command({
13
12
  Bucket: bucket,
14
13
  Delimiter: "/",
@@ -6,7 +6,7 @@ const require_string_getFolder = require("../../string/getFolder.cjs");
6
6
  const listFolders = async ({ bucket, folder }) => {
7
7
  const cleanFolder = require_string_getFolder({ input: folder });
8
8
  let response = [];
9
- const { ListObjectsV2Command } = require("@aws-sdk/client-s3");
9
+ const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
10
10
  const apiResponse = await global.awsS3Client.send(new ListObjectsV2Command({
11
11
  Bucket: bucket,
12
12
  Delimiter: "/",
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getFolder from "../../string/getFolder.mjs";
3
2
  //#region src/aws/s3/listFolders.ts
4
3
  /**
@@ -7,7 +6,7 @@ import getFolder from "../../string/getFolder.mjs";
7
6
  const listFolders = async ({ bucket, folder }) => {
8
7
  const cleanFolder = getFolder({ input: folder });
9
8
  let response = [];
10
- const { ListObjectsV2Command } = __require("@aws-sdk/client-s3");
9
+ const { ListObjectsV2Command } = await import("@aws-sdk/client-s3");
11
10
  const apiResponse = await global.awsS3Client.send(new ListObjectsV2Command({
12
11
  Bucket: bucket,
13
12
  Delimiter: "/",
@@ -1,5 +1,5 @@
1
- const require_aws_s3_copyFile = require("./copyFile.cjs");
2
1
  const require_aws_s3_deleteFile = require("./deleteFile.cjs");
2
+ const require_aws_s3_copyFile = require("./copyFile.cjs");
3
3
  //#region src/aws/s3/moveFile.ts
4
4
  /**
5
5
  * It's not possible to just move or rename a file, you must copy then delete the old file.
@@ -1,5 +1,5 @@
1
- import copyFile from "./copyFile.mjs";
2
1
  import deleteFile from "./deleteFile.mjs";
2
+ import copyFile from "./copyFile.mjs";
3
3
  //#region src/aws/s3/moveFile.ts
4
4
  /**
5
5
  * It's not possible to just move or rename a file, you must copy then delete the old file.
@@ -9,7 +9,7 @@ const readBuffer = async ({ bucket, key }) => {
9
9
  ...require_aws_s3_readFile.readFileDefault,
10
10
  buffer: void 0
11
11
  };
12
- const { GetObjectCommand } = require("@aws-sdk/client-s3");
12
+ const { GetObjectCommand } = await import("@aws-sdk/client-s3");
13
13
  const apiResponse = await global.awsS3Client.send(new GetObjectCommand({
14
14
  Bucket: bucket,
15
15
  Key: key
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import isResponse200 from "../isResponse200.mjs";
3
2
  import { readFileDefault } from "./readFile.mjs";
4
3
  //#region src/aws/s3/readBuffer.ts
@@ -10,7 +9,7 @@ const readBuffer = async ({ bucket, key }) => {
10
9
  ...readFileDefault,
11
10
  buffer: void 0
12
11
  };
13
- const { GetObjectCommand } = __require("@aws-sdk/client-s3");
12
+ const { GetObjectCommand } = await import("@aws-sdk/client-s3");
14
13
  const apiResponse = await global.awsS3Client.send(new GetObjectCommand({
15
14
  Bucket: bucket,
16
15
  Key: key
@@ -41,7 +41,7 @@ const readFile = async ({ bucket, key, isJson }) => {
41
41
  bucket,
42
42
  key
43
43
  })) {
44
- const { GetObjectCommand } = require("@aws-sdk/client-s3");
44
+ const { GetObjectCommand } = await import("@aws-sdk/client-s3");
45
45
  const apiResponse = await global.awsS3Client.send(new GetObjectCommand({
46
46
  Bucket: bucket,
47
47
  Key: key
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import isResponse200 from "../isResponse200.mjs";
3
2
  import getDate from "../../date/getDate.mjs";
4
3
  import getToday from "../../date/getToday.mjs";
@@ -36,7 +35,7 @@ const readFile = async ({ bucket, key, isJson }) => {
36
35
  bucket,
37
36
  key
38
37
  })) {
39
- const { GetObjectCommand } = __require("@aws-sdk/client-s3");
38
+ const { GetObjectCommand } = await import("@aws-sdk/client-s3");
40
39
  const apiResponse = await global.awsS3Client.send(new GetObjectCommand({
41
40
  Bucket: bucket,
42
41
  Key: key
@@ -3,7 +3,7 @@
3
3
  * Write a file to S3.
4
4
  */
5
5
  const writeFile = async ({ bucket, data, key, ...options }) => {
6
- const { PutObjectCommand } = require("@aws-sdk/client-s3");
6
+ const { PutObjectCommand } = await import("@aws-sdk/client-s3");
7
7
  return await global.awsS3Client.send(new PutObjectCommand({
8
8
  Bucket: bucket,
9
9
  Body: data,
@@ -1,10 +1,9 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/aws/s3/writeFile.ts
3
2
  /**
4
3
  * Write a file to S3.
5
4
  */
6
5
  const writeFile = async ({ bucket, data, key, ...options }) => {
7
- const { PutObjectCommand } = __require("@aws-sdk/client-s3");
6
+ const { PutObjectCommand } = await import("@aws-sdk/client-s3");
8
7
  return await global.awsS3Client.send(new PutObjectCommand({
9
8
  Bucket: bucket,
10
9
  Body: data,
@@ -1,6 +1,6 @@
1
1
  const require_date_index = require("../../date/index.cjs");
2
- const require_aws_s3_readGzip = require("../s3/readGzip.cjs");
3
2
  const require_aws_s3cache_getKey = require("./getKey.cjs");
3
+ const require_aws_s3_readGzip = require("../s3/readGzip.cjs");
4
4
  //#region src/aws/s3cache/getCache.ts
5
5
  /**
6
6
  * Get the stored cache if it exists.
@@ -1,6 +1,6 @@
1
1
  import { Interval } from "../../date/index.mjs";
2
- import readGzip from "../s3/readGzip.mjs";
3
2
  import getKey from "./getKey.mjs";
3
+ import readGzip from "../s3/readGzip.mjs";
4
4
  //#region src/aws/s3cache/getCache.ts
5
5
  /**
6
6
  * Get the stored cache if it exists.
@@ -1,6 +1,6 @@
1
- const require_aws_s3_deleteFile = require("../s3/deleteFile.cjs");
2
1
  const require_aws_s3cache_getKey = require("./getKey.cjs");
3
2
  const require_aws_s3cache_saveCache = require("./saveCache.cjs");
3
+ const require_aws_s3_deleteFile = require("../s3/deleteFile.cjs");
4
4
  //#region src/aws/s3cache/updateCache.ts
5
5
  /**
6
6
  * Delete other caches if present, then save the new file.
@@ -1,6 +1,6 @@
1
- import deleteFile from "../s3/deleteFile.mjs";
2
1
  import getKey from "./getKey.mjs";
3
2
  import saveCache from "./saveCache.mjs";
3
+ import deleteFile from "../s3/deleteFile.mjs";
4
4
  //#region src/aws/s3cache/updateCache.ts
5
5
  /**
6
6
  * Delete other caches if present, then save the new file.
@@ -75,7 +75,7 @@ var SimpleEmail = class extends require_class_BaseClass {
75
75
  });
76
76
  }
77
77
  async send() {
78
- const { SendEmailCommand } = require("@aws-sdk/client-ses");
78
+ const { SendEmailCommand } = await import("@aws-sdk/client-ses");
79
79
  let response;
80
80
  const command = new SendEmailCommand({
81
81
  Destination: {
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import BaseClass from "../../class/BaseClass.mjs";
3
2
  import uniq from "lodash/uniq.js";
4
3
  //#region src/aws/ses/SimpleEmail.ts
@@ -74,7 +73,7 @@ var SimpleEmail = class extends BaseClass {
74
73
  });
75
74
  }
76
75
  async send() {
77
- const { SendEmailCommand } = __require("@aws-sdk/client-ses");
76
+ const { SendEmailCommand } = await import("@aws-sdk/client-ses");
78
77
  let response;
79
78
  const command = new SendEmailCommand({
80
79
  Destination: {
@@ -5,9 +5,9 @@ global.awsSesClient = null;
5
5
  * Shorthand function to get the Lambda Client.
6
6
  * Library: @aws-sdk/client-ses
7
7
  */
8
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
9
9
  if (!global.awsSesClient) {
10
- const { SESClient } = require("@aws-sdk/client-ses");
10
+ const { SESClient } = await import("@aws-sdk/client-ses");
11
11
  const formattedConfig = require_aws_getConfig({ config });
12
12
  global.awsSesClient = new SESClient(formattedConfig);
13
13
  }
@@ -10,5 +10,5 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  export = initClient;
@@ -10,6 +10,6 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  //#endregion
15
15
  export { initClient as default };
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getConfig from "../getConfig.mjs";
3
2
  //#region src/aws/ses/initClient.ts
4
3
  global.awsSesClient = null;
@@ -6,9 +5,9 @@ global.awsSesClient = null;
6
5
  * Shorthand function to get the Lambda Client.
7
6
  * Library: @aws-sdk/client-ses
8
7
  */
9
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
10
9
  if (!global.awsSesClient) {
11
- const { SESClient } = __require("@aws-sdk/client-ses");
10
+ const { SESClient } = await import("@aws-sdk/client-ses");
12
11
  const formattedConfig = getConfig({ config });
13
12
  global.awsSesClient = new SESClient(formattedConfig);
14
13
  }
@@ -3,7 +3,7 @@
3
3
  * https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sqs-examples-send-receive-messages.html
4
4
  */
5
5
  const addToQueue = async ({ data, dedupeId, groupId, queueId, queueUrl }) => {
6
- const { SendMessageCommand } = require("@aws-sdk/client-sqs");
6
+ const { SendMessageCommand } = await import("@aws-sdk/client-sqs");
7
7
  let params = {
8
8
  MessageBody: JSON.stringify({
9
9
  queueId,
@@ -1,10 +1,9 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/aws/sqs/addToQueue.ts
3
2
  /**
4
3
  * https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sqs-examples-send-receive-messages.html
5
4
  */
6
5
  const addToQueue = async ({ data, dedupeId, groupId, queueId, queueUrl }) => {
7
- const { SendMessageCommand } = __require("@aws-sdk/client-sqs");
6
+ const { SendMessageCommand } = await import("@aws-sdk/client-sqs");
8
7
  let params = {
9
8
  MessageBody: JSON.stringify({
10
9
  queueId,
@@ -3,7 +3,7 @@
3
3
  * Delete a message from a queue.
4
4
  */
5
5
  const deleteFromQueue = async ({ queueUrl, recipientHandle }) => {
6
- const { DeleteMessageCommand } = require("@aws-sdk/client-sqs");
6
+ const { DeleteMessageCommand } = await import("@aws-sdk/client-sqs");
7
7
  const params = {
8
8
  QueueUrl: queueUrl,
9
9
  ReceiptHandle: recipientHandle
@@ -1,10 +1,9 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/aws/sqs/deleteFromQueue.ts
3
2
  /**
4
3
  * Delete a message from a queue.
5
4
  */
6
5
  const deleteFromQueue = async ({ queueUrl, recipientHandle }) => {
7
- const { DeleteMessageCommand } = __require("@aws-sdk/client-sqs");
6
+ const { DeleteMessageCommand } = await import("@aws-sdk/client-sqs");
8
7
  const params = {
9
8
  QueueUrl: queueUrl,
10
9
  ReceiptHandle: recipientHandle
@@ -5,9 +5,9 @@ global.awsSqsClient = null;
5
5
  * Shorthand function to get the Lambda Client.
6
6
  * Library: @aws-sdk/client-lambda
7
7
  */
8
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
9
9
  if (!global.awsLambdaClient) {
10
- const { SQSClient } = require("@aws-sdk/client-sqs");
10
+ const { SQSClient } = await import("@aws-sdk/client-sqs");
11
11
  const formattedConfig = require_aws_getConfig({ config });
12
12
  global.awsSqsClient = new SQSClient(formattedConfig);
13
13
  }
@@ -10,5 +10,5 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  export = initClient;
@@ -10,6 +10,6 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  //#endregion
15
15
  export { initClient as default };
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getConfig from "../getConfig.mjs";
3
2
  //#region src/aws/sqs/initClient.ts
4
3
  global.awsSqsClient = null;
@@ -6,9 +5,9 @@ global.awsSqsClient = null;
6
5
  * Shorthand function to get the Lambda Client.
7
6
  * Library: @aws-sdk/client-lambda
8
7
  */
9
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
10
9
  if (!global.awsLambdaClient) {
11
- const { SQSClient } = __require("@aws-sdk/client-sqs");
10
+ const { SQSClient } = await import("@aws-sdk/client-sqs");
12
11
  const formattedConfig = getConfig({ config });
13
12
  global.awsSqsClient = new SQSClient(formattedConfig);
14
13
  }
@@ -5,7 +5,7 @@ global["awsSsmParameters"] = {};
5
5
  */
6
6
  const getParameter = async ({ name, withDecryption, isJson }) => {
7
7
  if (void 0 === global["awsSsmParameters"][name]) {
8
- const { GetParameterCommand } = require("@aws-sdk/client-ssm");
8
+ const { GetParameterCommand } = await import("@aws-sdk/client-ssm");
9
9
  const apiResponse = await global.awsSsmClient.send(new GetParameterCommand({
10
10
  Name: name,
11
11
  WithDecryption: void 0 === withDecryption ? true : withDecryption
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/aws/ssm/getParameter.ts
3
2
  global["awsSsmParameters"] = {};
4
3
  /**
@@ -6,7 +5,7 @@ global["awsSsmParameters"] = {};
6
5
  */
7
6
  const getParameter = async ({ name, withDecryption, isJson }) => {
8
7
  if (void 0 === global["awsSsmParameters"][name]) {
9
- const { GetParameterCommand } = __require("@aws-sdk/client-ssm");
8
+ const { GetParameterCommand } = await import("@aws-sdk/client-ssm");
10
9
  const apiResponse = await global.awsSsmClient.send(new GetParameterCommand({
11
10
  Name: name,
12
11
  WithDecryption: void 0 === withDecryption ? true : withDecryption
@@ -5,9 +5,9 @@ global.awsSsmClient = null;
5
5
  * Shorthand function to get the Lambda Client.
6
6
  * Library: @aws-sdk/client-ssm
7
7
  */
8
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
9
9
  if (!global.awsSsmClient) {
10
- const { SSMClient } = require("@aws-sdk/client-ssm");
10
+ const { SSMClient } = await import("@aws-sdk/client-ssm");
11
11
  const formattedConfig = require_aws_getConfig({ config });
12
12
  global.awsSsmClient = new SSMClient(formattedConfig);
13
13
  }
@@ -10,5 +10,5 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  export = initClient;
@@ -10,6 +10,6 @@ type InitClient = {
10
10
  */
11
11
  declare const initClient: ({
12
12
  config
13
- }: InitClient) => void;
13
+ }: InitClient) => Promise<void>;
14
14
  //#endregion
15
15
  export { initClient as default };
@@ -1,4 +1,3 @@
1
- import { __require } from "../../_virtual/_rolldown/runtime.mjs";
2
1
  import getConfig from "../getConfig.mjs";
3
2
  //#region src/aws/ssm/initClient.ts
4
3
  global.awsSsmClient = null;
@@ -6,9 +5,9 @@ global.awsSsmClient = null;
6
5
  * Shorthand function to get the Lambda Client.
7
6
  * Library: @aws-sdk/client-ssm
8
7
  */
9
- const initClient = ({ config }) => {
8
+ const initClient = async ({ config }) => {
10
9
  if (!global.awsSsmClient) {
11
- const { SSMClient } = __require("@aws-sdk/client-ssm");
10
+ const { SSMClient } = await import("@aws-sdk/client-ssm");
12
11
  const formattedConfig = getConfig({ config });
13
12
  global.awsSsmClient = new SSMClient(formattedConfig);
14
13
  }
@@ -3,8 +3,8 @@
3
3
  * Decrypt an encoding string using a salt
4
4
  * Library: crypto-js
5
5
  */
6
- const getDecrypt = ({ appSalt, input, salt }) => {
7
- const { AES, enc } = require("crypto-js");
6
+ const getDecrypt = async ({ appSalt, input, salt }) => {
7
+ const { AES, enc } = await import("crypto-js");
8
8
  const customSalt = `${appSalt}-${salt}`;
9
9
  return AES.decrypt(input, customSalt).toString(enc.Utf8);
10
10
  };
@@ -11,5 +11,5 @@ declare const getDecrypt: ({
11
11
  appSalt: string;
12
12
  input: string;
13
13
  salt: string;
14
- }) => string;
14
+ }) => Promise<string>;
15
15
  export = getDecrypt;
@@ -11,6 +11,6 @@ declare const getDecrypt: ({
11
11
  appSalt: string;
12
12
  input: string;
13
13
  salt: string;
14
- }) => string;
14
+ }) => Promise<string>;
15
15
  //#endregion
16
16
  export { getDecrypt as default };
@@ -1,11 +1,10 @@
1
- import { __require } from "../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/crypto/getDecrypt.ts
3
2
  /**
4
3
  * Decrypt an encoding string using a salt
5
4
  * Library: crypto-js
6
5
  */
7
- const getDecrypt = ({ appSalt, input, salt }) => {
8
- const { AES, enc } = __require("crypto-js");
6
+ const getDecrypt = async ({ appSalt, input, salt }) => {
7
+ const { AES, enc } = await import("crypto-js");
9
8
  const customSalt = `${appSalt}-${salt}`;
10
9
  return AES.decrypt(input, customSalt).toString(enc.Utf8);
11
10
  };
@@ -3,8 +3,8 @@
3
3
  * Encrypt an encoding string using a salt
4
4
  * Library: crypto-js
5
5
  */
6
- const getEncrypt = ({ appSalt, input, salt }) => {
7
- const { AES } = require("crypto-js");
6
+ const getEncrypt = async ({ appSalt, input, salt }) => {
7
+ const { AES } = await import("crypto-js");
8
8
  const customSalt = `${appSalt}-${salt}`;
9
9
  return AES.encrypt(input, customSalt).toString();
10
10
  };
@@ -11,5 +11,5 @@ declare const getEncrypt: ({
11
11
  appSalt: string;
12
12
  input: string;
13
13
  salt: string;
14
- }) => string;
14
+ }) => Promise<string>;
15
15
  export = getEncrypt;
@@ -11,6 +11,6 @@ declare const getEncrypt: ({
11
11
  appSalt: string;
12
12
  input: string;
13
13
  salt: string;
14
- }) => string;
14
+ }) => Promise<string>;
15
15
  //#endregion
16
16
  export { getEncrypt as default };
@@ -1,11 +1,10 @@
1
- import { __require } from "../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/crypto/getEncrypt.ts
3
2
  /**
4
3
  * Encrypt an encoding string using a salt
5
4
  * Library: crypto-js
6
5
  */
7
- const getEncrypt = ({ appSalt, input, salt }) => {
8
- const { AES } = __require("crypto-js");
6
+ const getEncrypt = async ({ appSalt, input, salt }) => {
7
+ const { AES } = await import("crypto-js");
9
8
  const customSalt = `${appSalt}-${salt}`;
10
9
  return AES.encrypt(input, customSalt).toString();
11
10
  };
@@ -4,8 +4,8 @@ const require_string_getString = require("../string/getString.cjs");
4
4
  * Encrypt a string using sha256
5
5
  * Library: crypto-js
6
6
  */
7
- const getSha256 = ({ input }) => {
8
- const { SHA256 } = require("crypto-js");
7
+ const getSha256 = async ({ input }) => {
8
+ const { SHA256 } = await import("crypto-js");
9
9
  return SHA256(require_string_getString({ input })).toString();
10
10
  };
11
11
  //#endregion
@@ -7,5 +7,5 @@ declare const getSha256: ({
7
7
  input
8
8
  }: {
9
9
  input: any;
10
- }) => string;
10
+ }) => Promise<string>;
11
11
  export = getSha256;
@@ -7,6 +7,6 @@ declare const getSha256: ({
7
7
  input
8
8
  }: {
9
9
  input: any;
10
- }) => string;
10
+ }) => Promise<string>;
11
11
  //#endregion
12
12
  export { getSha256 as default };
@@ -1,12 +1,11 @@
1
- import { __require } from "../_virtual/_rolldown/runtime.mjs";
2
1
  import getString from "../string/getString.mjs";
3
2
  //#region src/crypto/getSha256.ts
4
3
  /**
5
4
  * Encrypt a string using sha256
6
5
  * Library: crypto-js
7
6
  */
8
- const getSha256 = ({ input }) => {
9
- const { SHA256 } = __require("crypto-js");
7
+ const getSha256 = async ({ input }) => {
8
+ const { SHA256 } = await import("crypto-js");
10
9
  return SHA256(getString({ input })).toString();
11
10
  };
12
11
  //#endregion
@@ -5,8 +5,8 @@
5
5
  */
6
6
  const createDirectory = ({ filePath }) => {
7
7
  return new Promise(async (resolve, reject) => {
8
- const fs = require("fs-extra");
9
- const fileDir = require("path").parse(filePath).dir;
8
+ const fs = await import("fs-extra");
9
+ const fileDir = (await import("path")).parse(filePath).dir;
10
10
  fs.ensureDirSync(fileDir);
11
11
  resolve(true);
12
12
  });
@@ -1,4 +1,3 @@
1
- import { __require } from "../_virtual/_rolldown/runtime.mjs";
2
1
  //#region src/file/createDirectory.ts
3
2
  /**
4
3
  * Create a directory recursively.
@@ -6,8 +5,8 @@ import { __require } from "../_virtual/_rolldown/runtime.mjs";
6
5
  */
7
6
  const createDirectory = ({ filePath }) => {
8
7
  return new Promise(async (resolve, reject) => {
9
- const fs = __require("fs-extra");
10
- const fileDir = __require("path").parse(filePath).dir;
8
+ const fs = await import("fs-extra");
9
+ const fileDir = (await import("path")).parse(filePath).dir;
11
10
  fs.ensureDirSync(fileDir);
12
11
  resolve(true);
13
12
  });