@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
@@ -4,86 +4,100 @@ const require_aws_server_isResponse200 = require("../../server/isResponse200.cjs
4
4
  require("../../server/index.cjs");
5
5
  //#region src/aws/ecs/server/AwsEcsNamespace.ts
6
6
  var AwsEcsNamespace = class extends require__class_BaseNamespace.BaseNamespace {
7
- constructor(..._args) {
8
- super(..._args);
9
- this.ensureInit = async () => {
10
- if (!this.client) try {
11
- const { ECSClient } = await import("@aws-sdk/client-ecs");
12
- this.client = new ECSClient(this.config);
13
- } catch (e) {
14
- throw new Error("AWS ECS Client not installed");
15
- }
16
- };
17
- this.getClusters = async (maxResults) => {
18
- await this.ensureInit();
19
- const { ListClustersCommand } = await import("@aws-sdk/client-ecs");
20
- let response = [];
21
- let apiResponse = null;
22
- while (null === apiResponse || apiResponse?.nextToken) {
23
- const listClustersCommand = new ListClustersCommand({
24
- maxResults,
25
- nextToken: apiResponse?.nextToken
26
- });
27
- apiResponse = await this.client.send(listClustersCommand);
28
- if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.clusterArns];
29
- }
30
- return response;
31
- };
32
- this.getTaskDefinitions = async (props) => {
33
- await this.ensureInit();
34
- const { ListTaskDefinitionsCommand } = await import("@aws-sdk/client-ecs");
35
- let response = [];
36
- let apiResponse = null;
37
- while (null === apiResponse || apiResponse?.nextToken) {
38
- const listTaskDefinitionsCommand = new ListTaskDefinitionsCommand({
39
- maxResults: props?.maxResults,
40
- familyPrefix: props?.familyPrefix,
41
- sort: props?.sort,
42
- status: props?.status,
43
- nextToken: apiResponse?.nextToken
44
- });
45
- apiResponse = await this.client.send(listTaskDefinitionsCommand);
46
- if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.taskDefinitionArns];
47
- }
48
- return response;
49
- };
50
- this.getTasks = async (props) => {
51
- await this.ensureInit();
52
- const { ListTasksCommand } = await import("@aws-sdk/client-ecs");
53
- let response = [];
54
- let apiResponse = null;
55
- while (null === apiResponse || apiResponse?.nextToken) {
56
- const listTasksCommand = new ListTasksCommand({
57
- cluster: props?.cluster,
58
- containerInstance: props?.containerInstance,
59
- desiredStatus: props?.desiredStatus,
60
- family: props?.family,
61
- maxResults: props?.maxResults,
62
- nextToken: apiResponse?.nextToken,
63
- serviceName: props?.serviceName,
64
- startedBy: props?.startedBy
65
- });
66
- apiResponse = await this.client.send(listTasksCommand);
67
- if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.taskArns];
68
- }
69
- return response;
70
- };
71
- this.runTask = async (props) => {
72
- await this.ensureInit();
73
- const { RunTaskCommand } = await import("@aws-sdk/client-ecs");
74
- let response = false;
75
- const runtTaskCommand = new RunTaskCommand({
7
+ ensureInit = async () => {
8
+ if (!this.client) try {
9
+ const { ECSClient } = await import("@aws-sdk/client-ecs");
10
+ this.client = new ECSClient(this.config);
11
+ } catch (e) {
12
+ throw new Error("AWS ECS Client not installed");
13
+ }
14
+ };
15
+ /**
16
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListClustersCommand/
17
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListClustersCommandInput/
18
+ */
19
+ getClusters = async (maxResults) => {
20
+ await this.ensureInit();
21
+ const { ListClustersCommand } = await import("@aws-sdk/client-ecs");
22
+ let response = [];
23
+ let apiResponse = null;
24
+ while (null === apiResponse || apiResponse?.nextToken) {
25
+ const listClustersCommand = new ListClustersCommand({
26
+ maxResults,
27
+ nextToken: apiResponse?.nextToken
28
+ });
29
+ apiResponse = await this.client.send(listClustersCommand);
30
+ if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.clusterArns];
31
+ }
32
+ return response;
33
+ };
34
+ /**
35
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListTaskDefinitionsCommand/
36
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListTaskDefinitionsCommandInput/
37
+ */
38
+ getTaskDefinitions = async (props) => {
39
+ await this.ensureInit();
40
+ const { ListTaskDefinitionsCommand } = await import("@aws-sdk/client-ecs");
41
+ let response = [];
42
+ let apiResponse = null;
43
+ while (null === apiResponse || apiResponse?.nextToken) {
44
+ const listTaskDefinitionsCommand = new ListTaskDefinitionsCommand({
45
+ maxResults: props?.maxResults,
46
+ familyPrefix: props?.familyPrefix,
47
+ sort: props?.sort,
48
+ status: props?.status,
49
+ nextToken: apiResponse?.nextToken
50
+ });
51
+ apiResponse = await this.client.send(listTaskDefinitionsCommand);
52
+ if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.taskDefinitionArns];
53
+ }
54
+ return response;
55
+ };
56
+ /**
57
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListTasksCommand/
58
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListTasksCommandInput/
59
+ */
60
+ getTasks = async (props) => {
61
+ await this.ensureInit();
62
+ const { ListTasksCommand } = await import("@aws-sdk/client-ecs");
63
+ let response = [];
64
+ let apiResponse = null;
65
+ while (null === apiResponse || apiResponse?.nextToken) {
66
+ const listTasksCommand = new ListTasksCommand({
76
67
  cluster: props?.cluster,
77
- launchType: props?.launchType,
78
- networkConfiguration: props?.networkConfiguration,
79
- overrides: props?.overrides,
80
- taskDefinition: props?.taskDefinition
68
+ containerInstance: props?.containerInstance,
69
+ desiredStatus: props?.desiredStatus,
70
+ family: props?.family,
71
+ maxResults: props?.maxResults,
72
+ nextToken: apiResponse?.nextToken,
73
+ serviceName: props?.serviceName,
74
+ startedBy: props?.startedBy
81
75
  });
82
- const apiResponse = await this.client.send(runtTaskCommand);
83
- if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = apiResponse;
84
- return response;
85
- };
86
- }
76
+ apiResponse = await this.client.send(listTasksCommand);
77
+ if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = [...response, ...apiResponse.taskArns];
78
+ }
79
+ return response;
80
+ };
81
+ /**
82
+ * Initialise and run a task
83
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/RunTaskCommand/
84
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/RunTaskCommandInput/
85
+ */
86
+ runTask = async (props) => {
87
+ await this.ensureInit();
88
+ const { RunTaskCommand } = await import("@aws-sdk/client-ecs");
89
+ let response = false;
90
+ const runtTaskCommand = new RunTaskCommand({
91
+ cluster: props?.cluster,
92
+ launchType: props?.launchType,
93
+ networkConfiguration: props?.networkConfiguration,
94
+ overrides: props?.overrides,
95
+ taskDefinition: props?.taskDefinition
96
+ });
97
+ const apiResponse = await this.client.send(runtTaskCommand);
98
+ if (require_aws_server_isResponse200.isResponse200(apiResponse)) response = apiResponse;
99
+ return response;
100
+ };
87
101
  };
88
102
  //#endregion
89
103
  exports.AwsEcsNamespace = AwsEcsNamespace;
@@ -3,86 +3,100 @@ import { isResponse200 } from "../../server/isResponse200.mjs";
3
3
  import "../../server/index.mjs";
4
4
  //#region src/aws/ecs/server/AwsEcsNamespace.ts
5
5
  var AwsEcsNamespace = class extends BaseNamespace {
6
- constructor(..._args) {
7
- super(..._args);
8
- this.ensureInit = async () => {
9
- if (!this.client) try {
10
- const { ECSClient } = await import("@aws-sdk/client-ecs");
11
- this.client = new ECSClient(this.config);
12
- } catch (e) {
13
- throw new Error("AWS ECS Client not installed");
14
- }
15
- };
16
- this.getClusters = async (maxResults) => {
17
- await this.ensureInit();
18
- const { ListClustersCommand } = await import("@aws-sdk/client-ecs");
19
- let response = [];
20
- let apiResponse = null;
21
- while (null === apiResponse || apiResponse?.nextToken) {
22
- const listClustersCommand = new ListClustersCommand({
23
- maxResults,
24
- nextToken: apiResponse?.nextToken
25
- });
26
- apiResponse = await this.client.send(listClustersCommand);
27
- if (isResponse200(apiResponse)) response = [...response, ...apiResponse.clusterArns];
28
- }
29
- return response;
30
- };
31
- this.getTaskDefinitions = async (props) => {
32
- await this.ensureInit();
33
- const { ListTaskDefinitionsCommand } = await import("@aws-sdk/client-ecs");
34
- let response = [];
35
- let apiResponse = null;
36
- while (null === apiResponse || apiResponse?.nextToken) {
37
- const listTaskDefinitionsCommand = new ListTaskDefinitionsCommand({
38
- maxResults: props?.maxResults,
39
- familyPrefix: props?.familyPrefix,
40
- sort: props?.sort,
41
- status: props?.status,
42
- nextToken: apiResponse?.nextToken
43
- });
44
- apiResponse = await this.client.send(listTaskDefinitionsCommand);
45
- if (isResponse200(apiResponse)) response = [...response, ...apiResponse.taskDefinitionArns];
46
- }
47
- return response;
48
- };
49
- this.getTasks = async (props) => {
50
- await this.ensureInit();
51
- const { ListTasksCommand } = await import("@aws-sdk/client-ecs");
52
- let response = [];
53
- let apiResponse = null;
54
- while (null === apiResponse || apiResponse?.nextToken) {
55
- const listTasksCommand = new ListTasksCommand({
56
- cluster: props?.cluster,
57
- containerInstance: props?.containerInstance,
58
- desiredStatus: props?.desiredStatus,
59
- family: props?.family,
60
- maxResults: props?.maxResults,
61
- nextToken: apiResponse?.nextToken,
62
- serviceName: props?.serviceName,
63
- startedBy: props?.startedBy
64
- });
65
- apiResponse = await this.client.send(listTasksCommand);
66
- if (isResponse200(apiResponse)) response = [...response, ...apiResponse.taskArns];
67
- }
68
- return response;
69
- };
70
- this.runTask = async (props) => {
71
- await this.ensureInit();
72
- const { RunTaskCommand } = await import("@aws-sdk/client-ecs");
73
- let response = false;
74
- const runtTaskCommand = new RunTaskCommand({
6
+ ensureInit = async () => {
7
+ if (!this.client) try {
8
+ const { ECSClient } = await import("@aws-sdk/client-ecs");
9
+ this.client = new ECSClient(this.config);
10
+ } catch (e) {
11
+ throw new Error("AWS ECS Client not installed");
12
+ }
13
+ };
14
+ /**
15
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListClustersCommand/
16
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListClustersCommandInput/
17
+ */
18
+ getClusters = async (maxResults) => {
19
+ await this.ensureInit();
20
+ const { ListClustersCommand } = await import("@aws-sdk/client-ecs");
21
+ let response = [];
22
+ let apiResponse = null;
23
+ while (null === apiResponse || apiResponse?.nextToken) {
24
+ const listClustersCommand = new ListClustersCommand({
25
+ maxResults,
26
+ nextToken: apiResponse?.nextToken
27
+ });
28
+ apiResponse = await this.client.send(listClustersCommand);
29
+ if (isResponse200(apiResponse)) response = [...response, ...apiResponse.clusterArns];
30
+ }
31
+ return response;
32
+ };
33
+ /**
34
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListTaskDefinitionsCommand/
35
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListTaskDefinitionsCommandInput/
36
+ */
37
+ getTaskDefinitions = async (props) => {
38
+ await this.ensureInit();
39
+ const { ListTaskDefinitionsCommand } = await import("@aws-sdk/client-ecs");
40
+ let response = [];
41
+ let apiResponse = null;
42
+ while (null === apiResponse || apiResponse?.nextToken) {
43
+ const listTaskDefinitionsCommand = new ListTaskDefinitionsCommand({
44
+ maxResults: props?.maxResults,
45
+ familyPrefix: props?.familyPrefix,
46
+ sort: props?.sort,
47
+ status: props?.status,
48
+ nextToken: apiResponse?.nextToken
49
+ });
50
+ apiResponse = await this.client.send(listTaskDefinitionsCommand);
51
+ if (isResponse200(apiResponse)) response = [...response, ...apiResponse.taskDefinitionArns];
52
+ }
53
+ return response;
54
+ };
55
+ /**
56
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/ListTasksCommand/
57
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/ListTasksCommandInput/
58
+ */
59
+ getTasks = async (props) => {
60
+ await this.ensureInit();
61
+ const { ListTasksCommand } = await import("@aws-sdk/client-ecs");
62
+ let response = [];
63
+ let apiResponse = null;
64
+ while (null === apiResponse || apiResponse?.nextToken) {
65
+ const listTasksCommand = new ListTasksCommand({
75
66
  cluster: props?.cluster,
76
- launchType: props?.launchType,
77
- networkConfiguration: props?.networkConfiguration,
78
- overrides: props?.overrides,
79
- taskDefinition: props?.taskDefinition
67
+ containerInstance: props?.containerInstance,
68
+ desiredStatus: props?.desiredStatus,
69
+ family: props?.family,
70
+ maxResults: props?.maxResults,
71
+ nextToken: apiResponse?.nextToken,
72
+ serviceName: props?.serviceName,
73
+ startedBy: props?.startedBy
80
74
  });
81
- const apiResponse = await this.client.send(runtTaskCommand);
82
- if (isResponse200(apiResponse)) response = apiResponse;
83
- return response;
84
- };
85
- }
75
+ apiResponse = await this.client.send(listTasksCommand);
76
+ if (isResponse200(apiResponse)) response = [...response, ...apiResponse.taskArns];
77
+ }
78
+ return response;
79
+ };
80
+ /**
81
+ * Initialise and run a task
82
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/RunTaskCommand/
83
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ecs/Interface/RunTaskCommandInput/
84
+ */
85
+ runTask = async (props) => {
86
+ await this.ensureInit();
87
+ const { RunTaskCommand } = await import("@aws-sdk/client-ecs");
88
+ let response = false;
89
+ const runtTaskCommand = new RunTaskCommand({
90
+ cluster: props?.cluster,
91
+ launchType: props?.launchType,
92
+ networkConfiguration: props?.networkConfiguration,
93
+ overrides: props?.overrides,
94
+ taskDefinition: props?.taskDefinition
95
+ });
96
+ const apiResponse = await this.client.send(runtTaskCommand);
97
+ if (isResponse200(apiResponse)) response = apiResponse;
98
+ return response;
99
+ };
86
100
  };
87
101
  //#endregion
88
102
  export { AwsEcsNamespace };
@@ -4,23 +4,23 @@ const require_aws_server_isResponse200 = require("../../server/isResponse200.cjs
4
4
  require("../../server/index.cjs");
5
5
  //#region src/aws/glue/server/AwsGlueNamespace.ts
6
6
  var AwsGlueNamespace = class extends require__class_BaseNamespace.BaseNamespace {
7
- constructor(..._args) {
8
- super(..._args);
9
- this.ensureInit = async () => {
10
- if (!this.client) try {
11
- const { GlueClient } = await import("@aws-sdk/client-glue");
12
- this.client = new GlueClient(this.config);
13
- } catch (e) {
14
- throw new Error("AWS Glue Client not installed");
15
- }
16
- };
17
- this.invoke = async (crawler) => {
18
- await this.ensureInit();
19
- const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
20
- const command = new StartCrawlerCommand({ Name: crawler });
21
- return require_aws_server_isResponse200.isResponse200(await this.client.send(command));
22
- };
23
- }
7
+ ensureInit = async () => {
8
+ if (!this.client) try {
9
+ const { GlueClient } = await import("@aws-sdk/client-glue");
10
+ this.client = new GlueClient(this.config);
11
+ } catch (e) {
12
+ throw new Error("AWS Glue Client not installed");
13
+ }
14
+ };
15
+ /**
16
+ * Invoke an AWS Glue Crawler by passing in the name of the Crawler.
17
+ */
18
+ invoke = async (crawler) => {
19
+ await this.ensureInit();
20
+ const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
21
+ const command = new StartCrawlerCommand({ Name: crawler });
22
+ return require_aws_server_isResponse200.isResponse200(await this.client.send(command));
23
+ };
24
24
  };
25
25
  //#endregion
26
26
  exports.AwsGlueNamespace = AwsGlueNamespace;
@@ -3,23 +3,23 @@ import { isResponse200 } from "../../server/isResponse200.mjs";
3
3
  import "../../server/index.mjs";
4
4
  //#region src/aws/glue/server/AwsGlueNamespace.ts
5
5
  var AwsGlueNamespace = class extends BaseNamespace {
6
- constructor(..._args) {
7
- super(..._args);
8
- this.ensureInit = async () => {
9
- if (!this.client) try {
10
- const { GlueClient } = await import("@aws-sdk/client-glue");
11
- this.client = new GlueClient(this.config);
12
- } catch (e) {
13
- throw new Error("AWS Glue Client not installed");
14
- }
15
- };
16
- this.invoke = async (crawler) => {
17
- await this.ensureInit();
18
- const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
19
- const command = new StartCrawlerCommand({ Name: crawler });
20
- return isResponse200(await this.client.send(command));
21
- };
22
- }
6
+ ensureInit = async () => {
7
+ if (!this.client) try {
8
+ const { GlueClient } = await import("@aws-sdk/client-glue");
9
+ this.client = new GlueClient(this.config);
10
+ } catch (e) {
11
+ throw new Error("AWS Glue Client not installed");
12
+ }
13
+ };
14
+ /**
15
+ * Invoke an AWS Glue Crawler by passing in the name of the Crawler.
16
+ */
17
+ invoke = async (crawler) => {
18
+ await this.ensureInit();
19
+ const { StartCrawlerCommand } = await import("@aws-sdk/client-glue");
20
+ const command = new StartCrawlerCommand({ Name: crawler });
21
+ return isResponse200(await this.client.send(command));
22
+ };
23
23
  };
24
24
  //#endregion
25
25
  export { AwsGlueNamespace };
@@ -6,38 +6,40 @@ const require_aws_server_isResponse200 = require("../../server/isResponse200.cjs
6
6
  require("../../server/index.cjs");
7
7
  //#region src/aws/lambda/server/AwsLambdaNamespace.ts
8
8
  var AwsLambdaNamespace = class extends require__class_BaseNamespace.BaseNamespace {
9
- constructor(..._args) {
10
- super(..._args);
11
- this.ensureInit = async () => {
12
- if (!this.client) try {
13
- const { LambdaClient } = await import("@aws-sdk/client-lambda");
14
- this.client = new LambdaClient(this.config);
15
- } catch (e) {
16
- throw new Error("AWS Lambda Client not installed");
17
- }
18
- };
19
- this.invoke = async (props) => {
20
- await this.ensureInit();
21
- const { InvokeCommand } = await import("@aws-sdk/client-lambda");
22
- let response = false;
23
- const params = {
24
- FunctionName: props.functionName,
25
- InvocationType: true === props.awaitResponse ? "RequestResponse" : "Event"
26
- };
27
- if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
28
- const command = new InvokeCommand(params);
29
- const apiResponse = await this.client.send(command);
30
- if (require_aws_server_isResponse200.isResponse200(apiResponse)) if (props.awaitResponse && void 0 !== apiResponse.Payload) {
31
- response = new TextDecoder("ascii").decode(apiResponse.Payload);
32
- if (true === props.isJson) {
33
- response = JSON.parse(response);
34
- if ("string" === typeof response) response = JSON.parse(response);
35
- if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new require_api_ApiResponseClass.ApiResponseClass().fromJson(response);
36
- }
37
- } else response = true;
38
- return response;
9
+ ensureInit = async () => {
10
+ if (!this.client) try {
11
+ const { LambdaClient } = await import("@aws-sdk/client-lambda");
12
+ this.client = new LambdaClient(this.config);
13
+ } catch (e) {
14
+ throw new Error("AWS Lambda Client not installed");
15
+ }
16
+ };
17
+ /**
18
+ * Invoke a AWS Lambda function by passing in the Function name and optional Payload data.
19
+ * Runs asynchronously, doesn't wait for function to fully end.
20
+ * Library: @aws-sdk/client-lambda
21
+ */
22
+ invoke = async (props) => {
23
+ await this.ensureInit();
24
+ const { InvokeCommand } = await import("@aws-sdk/client-lambda");
25
+ let response = false;
26
+ const params = {
27
+ FunctionName: props.functionName,
28
+ InvocationType: true === props.awaitResponse ? "RequestResponse" : "Event"
39
29
  };
40
- }
30
+ if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
31
+ const command = new InvokeCommand(params);
32
+ const apiResponse = await this.client.send(command);
33
+ if (require_aws_server_isResponse200.isResponse200(apiResponse)) if (props.awaitResponse && void 0 !== apiResponse.Payload) {
34
+ response = new TextDecoder("ascii").decode(apiResponse.Payload);
35
+ if (true === props.isJson) {
36
+ response = JSON.parse(response);
37
+ if ("string" === typeof response) response = JSON.parse(response);
38
+ if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new require_api_ApiResponseClass.ApiResponseClass().fromJson(response);
39
+ }
40
+ } else response = true;
41
+ return response;
42
+ };
41
43
  };
42
44
  //#endregion
43
45
  exports.AwsLambdaNamespace = AwsLambdaNamespace;
@@ -5,38 +5,40 @@ import { isResponse200 } from "../../server/isResponse200.mjs";
5
5
  import "../../server/index.mjs";
6
6
  //#region src/aws/lambda/server/AwsLambdaNamespace.ts
7
7
  var AwsLambdaNamespace = class extends BaseNamespace {
8
- constructor(..._args) {
9
- super(..._args);
10
- this.ensureInit = async () => {
11
- if (!this.client) try {
12
- const { LambdaClient } = await import("@aws-sdk/client-lambda");
13
- this.client = new LambdaClient(this.config);
14
- } catch (e) {
15
- throw new Error("AWS Lambda Client not installed");
16
- }
17
- };
18
- this.invoke = async (props) => {
19
- await this.ensureInit();
20
- const { InvokeCommand } = await import("@aws-sdk/client-lambda");
21
- let response = false;
22
- const params = {
23
- FunctionName: props.functionName,
24
- InvocationType: true === props.awaitResponse ? "RequestResponse" : "Event"
25
- };
26
- if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
27
- const command = new InvokeCommand(params);
28
- const apiResponse = await this.client.send(command);
29
- if (isResponse200(apiResponse)) if (props.awaitResponse && void 0 !== apiResponse.Payload) {
30
- response = new TextDecoder("ascii").decode(apiResponse.Payload);
31
- if (true === props.isJson) {
32
- response = JSON.parse(response);
33
- if ("string" === typeof response) response = JSON.parse(response);
34
- if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new ApiResponseClass().fromJson(response);
35
- }
36
- } else response = true;
37
- return response;
8
+ ensureInit = async () => {
9
+ if (!this.client) try {
10
+ const { LambdaClient } = await import("@aws-sdk/client-lambda");
11
+ this.client = new LambdaClient(this.config);
12
+ } catch (e) {
13
+ throw new Error("AWS Lambda Client not installed");
14
+ }
15
+ };
16
+ /**
17
+ * Invoke a AWS Lambda function by passing in the Function name and optional Payload data.
18
+ * Runs asynchronously, doesn't wait for function to fully end.
19
+ * Library: @aws-sdk/client-lambda
20
+ */
21
+ invoke = async (props) => {
22
+ await this.ensureInit();
23
+ const { InvokeCommand } = await import("@aws-sdk/client-lambda");
24
+ let response = false;
25
+ const params = {
26
+ FunctionName: props.functionName,
27
+ InvocationType: true === props.awaitResponse ? "RequestResponse" : "Event"
38
28
  };
39
- }
29
+ if (void 0 !== props.payload) params["Payload"] = new Uint8Array(Buffer.from(JSON.stringify(props.payload)));
30
+ const command = new InvokeCommand(params);
31
+ const apiResponse = await this.client.send(command);
32
+ if (isResponse200(apiResponse)) if (props.awaitResponse && void 0 !== apiResponse.Payload) {
33
+ response = new TextDecoder("ascii").decode(apiResponse.Payload);
34
+ if (true === props.isJson) {
35
+ response = JSON.parse(response);
36
+ if ("string" === typeof response) response = JSON.parse(response);
37
+ if (void 0 !== response && void 0 !== response?.error && void 0 !== response?.state) response = new ApiResponseClass().fromJson(response);
38
+ }
39
+ } else response = true;
40
+ return response;
41
+ };
40
42
  };
41
43
  //#endregion
42
44
  export { AwsLambdaNamespace };