@goldstack/template-sqs 0.1.5 → 0.1.6
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/dist/src/sqsConnect.d.ts
CHANGED
|
@@ -10,41 +10,45 @@ export declare const getMockedSQS: (onMessageSend?: MessageCallback) => SQSClien
|
|
|
10
10
|
* Connects to SQS, using a mocked client for local deployment or a real SQS client for other environments.
|
|
11
11
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
12
12
|
* @param {any} packageSchema - Package schema.
|
|
13
|
-
* @param {any}
|
|
13
|
+
* @param {any} deploymentsData - Deployment data.
|
|
14
14
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
15
15
|
* @returns {Promise<SQSClient>} The SQS client.
|
|
16
16
|
*/
|
|
17
|
-
export declare const connect: (goldstackConfig: any, packageSchema: any,
|
|
17
|
+
export declare const connect: (goldstackConfig: any, packageSchema: any, deploymentsData: any, deploymentName?: string) => Promise<SQSClient>;
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves the SQS queue name for the specified deployment or environment.
|
|
20
20
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
21
21
|
* @param {any} packageSchema - Package schema.
|
|
22
|
+
* @param {any} deploymentsData - Deployment data.
|
|
22
23
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
23
24
|
* @returns {Promise<string>} The name of the SQS queue.
|
|
24
25
|
*/
|
|
25
|
-
export declare const getSQSQueueName: (goldstackConfig: any, packageSchema: any, deploymentName?: string) => Promise<string>;
|
|
26
|
+
export declare const getSQSQueueName: (goldstackConfig: any, packageSchema: any, deploymentsData: any, deploymentName?: string) => Promise<string>;
|
|
26
27
|
/**
|
|
27
|
-
* Retrieves the SQS
|
|
28
|
+
* Retrieves the SQS queue URL for the specified deployment or environment.
|
|
28
29
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
29
30
|
* @param {any} packageSchema - Package schema.
|
|
31
|
+
* @param {any} deploymentsData - Deployment data.
|
|
30
32
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
31
|
-
* @returns {Promise<string>} The
|
|
33
|
+
* @returns {Promise<string>} The URL of the SQS queue.
|
|
32
34
|
*/
|
|
33
|
-
export declare const
|
|
35
|
+
export declare const getSQSQueueUrl: (goldstackConfig: any, packageSchema: any, deploymentsData: any, deploymentName?: string) => Promise<string>;
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* Retrieves the SQS Dead Letter Queue (DLQ) name for the specified deployment or environment.
|
|
36
38
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
37
39
|
* @param {any} packageSchema - Package schema.
|
|
40
|
+
* @param {any} deploymentsData - Deployment data.
|
|
38
41
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
39
|
-
* @returns {Promise<string>} The
|
|
42
|
+
* @returns {Promise<string>} The name of the SQS DLQ queue.
|
|
40
43
|
*/
|
|
41
|
-
export declare const
|
|
44
|
+
export declare const getSQSDLQQueueName: (goldstackConfig: any, packageSchema: any, deploymentsData: any, deploymentName?: string) => Promise<string>;
|
|
42
45
|
/**
|
|
43
46
|
* Constructs the SQS Dead Letter Queue (DLQ) URL for the given deployment.
|
|
44
47
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
45
48
|
* @param {any} packageSchema - Package schema.
|
|
49
|
+
* @param {any} deploymentsData - Deployment data.
|
|
46
50
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
47
51
|
* @returns {Promise<string>} The URL of the SQS DLQ queue.
|
|
48
52
|
*/
|
|
49
|
-
export declare const getSQSDLQQueueUrl: (goldstackConfig: any, packageSchema: any, deploymentName?: string) => Promise<string>;
|
|
53
|
+
export declare const getSQSDLQQueueUrl: (goldstackConfig: any, packageSchema: any, deploymentsData: any, deploymentName?: string) => Promise<string>;
|
|
50
54
|
//# sourceMappingURL=sqsConnect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqsConnect.d.ts","sourceRoot":"","sources":["../../src/sqsConnect.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"sqsConnect.d.ts","sourceRoot":"","sources":["../../src/sqsConnect.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAClB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAwB7B,oBAAY,eAAe,GAAG,CAC5B,KAAK,EAAE,kBAAkB,KACtB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,YAAY,mBAAoB,eAAe,KAAG,SAW9D,CAAC;AA+CF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,oBACD,GAAG,iBACL,GAAG,mBACD,GAAG,mBACH,MAAM,KACtB,QAAQ,SAAS,CAmBnB,CAAC;AAkCF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,oBACT,GAAG,iBACL,GAAG,mBACD,GAAG,mBACH,MAAM,KACtB,QAAQ,MAAM,CAShB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,oBACR,GAAG,iBACL,GAAG,mBACD,GAAG,mBACH,MAAM,KACtB,QAAQ,MAAM,CAShB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,oBACZ,GAAG,iBACL,GAAG,mBACD,GAAG,mBACH,MAAM,KACtB,QAAQ,MAAM,CAShB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,oBACX,GAAG,iBACL,GAAG,mBACD,GAAG,mBACH,MAAM,KACtB,QAAQ,MAAM,CAWhB,CAAC"}
|
package/dist/src/sqsConnect.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSQSDLQQueueUrl = exports.
|
|
3
|
+
exports.getSQSDLQQueueUrl = exports.getSQSDLQQueueName = exports.getSQSQueueUrl = exports.getSQSQueueName = exports.connect = exports.getMockedSQS = void 0;
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
5
5
|
const client_sqs_1 = require("@aws-sdk/client-sqs");
|
|
6
6
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
7
7
|
const utils_package_config_embedded_1 = require("@goldstack/utils-package-config-embedded");
|
|
8
8
|
const utils_esbuild_1 = require("@goldstack/utils-esbuild");
|
|
9
|
+
const infra_aws_1 = require("@goldstack/infra-aws");
|
|
9
10
|
let mockedSQS;
|
|
10
11
|
/**
|
|
11
12
|
* Retrieves an environment variable by key. Throws an error if the variable is not set.
|
|
@@ -19,14 +20,6 @@ const getEnvVar = (key) => {
|
|
|
19
20
|
throw new Error(`${key} environment variable is not set.`);
|
|
20
21
|
return value;
|
|
21
22
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Constructs the SQS Queue URL based on the queue name, region, and account ID.
|
|
24
|
-
* @param {string} queueName - The name of the SQS queue.
|
|
25
|
-
* @param {string} region - AWS region.
|
|
26
|
-
* @param {string} accountId - AWS account ID.
|
|
27
|
-
* @returns {string} The constructed SQS Queue URL.
|
|
28
|
-
*/
|
|
29
|
-
const constructQueueUrl = (queueName, region, accountId) => `https://sqs.${region}.amazonaws.com/${accountId}/${queueName}`;
|
|
30
23
|
/**
|
|
31
24
|
* Retrieves a mocked SQS client for local development. Initializes the client if not already created.
|
|
32
25
|
* @param {MessageCallback} [onMessageSend] - Optional callback to handle the message sent event.
|
|
@@ -44,25 +37,50 @@ const getMockedSQS = (onMessageSend) => {
|
|
|
44
37
|
};
|
|
45
38
|
exports.getMockedSQS = getMockedSQS;
|
|
46
39
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @param {any} goldstackConfig - Goldstack configuration object
|
|
49
|
-
* @param {any} packageSchema - Package schema
|
|
50
|
-
* @param {
|
|
51
|
-
* @
|
|
52
|
-
* @returns {Promise<SQSClient>} The SQS client.
|
|
40
|
+
* Gets the package configuration and deployment for SQS operations
|
|
41
|
+
* @param {any} goldstackConfig - Goldstack configuration object
|
|
42
|
+
* @param {any} packageSchema - Package schema
|
|
43
|
+
* @param {string} [deploymentName] - Optional deployment name
|
|
44
|
+
* @returns {{ packageConfig: EmbeddedPackageConfig<SqsPackage, SqsDeployment>, deployment: SqsDeployment }} Package config and deployment
|
|
53
45
|
*/
|
|
54
|
-
const
|
|
46
|
+
const getPackageConfigAndDeployment = (goldstackConfig, packageSchema, deploymentName) => {
|
|
55
47
|
const packageConfig = new utils_package_config_embedded_1.EmbeddedPackageConfig({
|
|
56
48
|
goldstackJson: goldstackConfig,
|
|
57
49
|
packageSchema,
|
|
58
50
|
});
|
|
59
51
|
deploymentName = deploymentName || getEnvVar('GOLDSTACK_DEPLOYMENT');
|
|
60
52
|
if (deploymentName === 'local') {
|
|
61
|
-
return
|
|
53
|
+
return {
|
|
54
|
+
packageConfig,
|
|
55
|
+
deployment: {
|
|
56
|
+
name: 'local',
|
|
57
|
+
awsRegion: 'us-east-1',
|
|
58
|
+
awsUser: process.env.AWS_USER || 'local',
|
|
59
|
+
configuration: {
|
|
60
|
+
sqs_queue_name: 'test-local-queue',
|
|
61
|
+
sqs_dlq_queue_name: 'test-local-dlq',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
62
65
|
}
|
|
63
66
|
const deployment = packageConfig.getDeployment(deploymentName);
|
|
64
67
|
if (!deployment) {
|
|
65
|
-
throw new Error(`Cannot
|
|
68
|
+
throw new Error(`Cannot find deployment ${deploymentName}.`);
|
|
69
|
+
}
|
|
70
|
+
return { packageConfig, deployment };
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Connects to SQS, using a mocked client for local deployment or a real SQS client for other environments.
|
|
74
|
+
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
75
|
+
* @param {any} packageSchema - Package schema.
|
|
76
|
+
* @param {any} deploymentsData - Deployment data.
|
|
77
|
+
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
78
|
+
* @returns {Promise<SQSClient>} The SQS client.
|
|
79
|
+
*/
|
|
80
|
+
const connect = async (goldstackConfig, packageSchema, deploymentsData, deploymentName) => {
|
|
81
|
+
const { deployment } = getPackageConfigAndDeployment(goldstackConfig, packageSchema, deploymentName);
|
|
82
|
+
if (deployment.name === 'local') {
|
|
83
|
+
return (0, exports.getMockedSQS)();
|
|
66
84
|
}
|
|
67
85
|
const awsUser = process.env.AWS_ACCESS_KEY_ID
|
|
68
86
|
? (0, credential_providers_1.fromEnv)()
|
|
@@ -74,105 +92,94 @@ const connect = async (goldstackConfig, packageSchema, deploymentData, deploymen
|
|
|
74
92
|
};
|
|
75
93
|
exports.connect = connect;
|
|
76
94
|
/**
|
|
77
|
-
* Retrieves the AWS user credentials based on
|
|
78
|
-
* @param {any}
|
|
95
|
+
* Retrieves the AWS user credentials based on a user name.
|
|
96
|
+
* @param {any} awsUserName - Name of the user
|
|
79
97
|
* @returns {Promise<AwsCredentialIdentityProvider>} The AWS credential provider.
|
|
80
98
|
*/
|
|
81
|
-
const getAwsUser = async (
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
const getAwsUser = async (awsUserName) => {
|
|
100
|
+
return (0, infra_aws_1.getAWSUser)(awsUserName);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Gets the deployment data for the specified deployment name
|
|
104
|
+
* @param {any} deploymentsData - The deployments data
|
|
105
|
+
* @param {string} deploymentName - The deployment name
|
|
106
|
+
* @returns {any} The deployment data
|
|
107
|
+
*/
|
|
108
|
+
const getDeploymentData = (deploymentsData, deploymentName) => {
|
|
109
|
+
const deployment = deploymentsData.find((d) => d.name === deploymentName);
|
|
110
|
+
if (!deployment) {
|
|
111
|
+
throw new Error(`Cannot find deployment ${deploymentName} in deployments data`);
|
|
112
|
+
}
|
|
113
|
+
return deployment;
|
|
84
114
|
};
|
|
85
115
|
/**
|
|
86
116
|
* Retrieves the SQS queue name for the specified deployment or environment.
|
|
87
117
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
88
118
|
* @param {any} packageSchema - Package schema.
|
|
119
|
+
* @param {any} deploymentsData - Deployment data.
|
|
89
120
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
90
121
|
* @returns {Promise<string>} The name of the SQS queue.
|
|
91
122
|
*/
|
|
92
|
-
const getSQSQueueName = async (goldstackConfig, packageSchema, deploymentName) => {
|
|
93
|
-
const packageConfig = new utils_package_config_embedded_1.EmbeddedPackageConfig({
|
|
94
|
-
goldstackJson: goldstackConfig,
|
|
95
|
-
packageSchema,
|
|
96
|
-
});
|
|
123
|
+
const getSQSQueueName = async (goldstackConfig, packageSchema, deploymentsData, deploymentName) => {
|
|
97
124
|
deploymentName = deploymentName || getEnvVar('GOLDSTACK_DEPLOYMENT');
|
|
98
|
-
if (deploymentName === 'local')
|
|
125
|
+
if (deploymentName === 'local') {
|
|
99
126
|
return 'test-local-queue';
|
|
100
|
-
|
|
101
|
-
|
|
127
|
+
}
|
|
128
|
+
const deployment = getDeploymentData(deploymentsData, deploymentName);
|
|
129
|
+
return deployment.terraform.sqs_queue_name.value;
|
|
102
130
|
};
|
|
103
131
|
exports.getSQSQueueName = getSQSQueueName;
|
|
104
132
|
/**
|
|
105
|
-
* Retrieves the SQS
|
|
133
|
+
* Retrieves the SQS queue URL for the specified deployment or environment.
|
|
106
134
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
107
135
|
* @param {any} packageSchema - Package schema.
|
|
136
|
+
* @param {any} deploymentsData - Deployment data.
|
|
108
137
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
109
|
-
* @returns {Promise<string>} The
|
|
138
|
+
* @returns {Promise<string>} The URL of the SQS queue.
|
|
110
139
|
*/
|
|
111
|
-
const
|
|
112
|
-
const packageConfig = new utils_package_config_embedded_1.EmbeddedPackageConfig({
|
|
113
|
-
goldstackJson: goldstackConfig,
|
|
114
|
-
packageSchema,
|
|
115
|
-
});
|
|
140
|
+
const getSQSQueueUrl = async (goldstackConfig, packageSchema, deploymentsData, deploymentName) => {
|
|
116
141
|
deploymentName = deploymentName || getEnvVar('GOLDSTACK_DEPLOYMENT');
|
|
117
|
-
if (deploymentName === 'local')
|
|
118
|
-
return 'test-local-
|
|
119
|
-
const deployment = packageConfig.getDeployment(deploymentName);
|
|
120
|
-
return getRequiredConfig(deployment, 'sqs_dlq_queue_name', deploymentName);
|
|
121
|
-
};
|
|
122
|
-
exports.getSQSDLQQueueName = getSQSDLQQueueName;
|
|
123
|
-
/**
|
|
124
|
-
* Retrieves the required configuration value from the deployment configuration.
|
|
125
|
-
* @param {any} deployment - Deployment configuration.
|
|
126
|
-
* @param {string} configKey - Key for the configuration value (e.g., sqs_queue_name).
|
|
127
|
-
* @param {string} deploymentName - Name of the deployment.
|
|
128
|
-
* @returns {string} The configuration value.
|
|
129
|
-
* @throws Will throw an error if the configuration value is not found.
|
|
130
|
-
*/
|
|
131
|
-
const getRequiredConfig = (deployment, configKey, deploymentName) => {
|
|
132
|
-
const value = deployment.configuration[configKey];
|
|
133
|
-
if (!value) {
|
|
134
|
-
throw new Error(`No ${configKey} for deployment ${deploymentName}. Provide it in the configuration.`);
|
|
142
|
+
if (deploymentName === 'local') {
|
|
143
|
+
return 'http://localhost:4566/000000000000/test-local-queue';
|
|
135
144
|
}
|
|
136
|
-
|
|
145
|
+
const deployment = getDeploymentData(deploymentsData, deploymentName);
|
|
146
|
+
return deployment.terraform.sqs_queue_url.value;
|
|
137
147
|
};
|
|
148
|
+
exports.getSQSQueueUrl = getSQSQueueUrl;
|
|
138
149
|
/**
|
|
139
|
-
*
|
|
150
|
+
* Retrieves the SQS Dead Letter Queue (DLQ) name for the specified deployment or environment.
|
|
140
151
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
141
152
|
* @param {any} packageSchema - Package schema.
|
|
153
|
+
* @param {any} deploymentsData - Deployment data.
|
|
142
154
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
143
|
-
* @returns {Promise<string>} The
|
|
155
|
+
* @returns {Promise<string>} The name of the SQS DLQ queue.
|
|
144
156
|
*/
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
157
|
+
const getSQSDLQQueueName = async (goldstackConfig, packageSchema, deploymentsData, deploymentName) => {
|
|
158
|
+
deploymentName = deploymentName || getEnvVar('GOLDSTACK_DEPLOYMENT');
|
|
159
|
+
if (deploymentName === 'local') {
|
|
160
|
+
return 'test-local-dlq';
|
|
161
|
+
}
|
|
162
|
+
const deployment = getDeploymentData(deploymentsData, deploymentName);
|
|
163
|
+
return deployment.terraform.sqs_dlq_queue_name.value;
|
|
149
164
|
};
|
|
150
|
-
exports.
|
|
165
|
+
exports.getSQSDLQQueueName = getSQSDLQQueueName;
|
|
151
166
|
/**
|
|
152
167
|
* Constructs the SQS Dead Letter Queue (DLQ) URL for the given deployment.
|
|
153
168
|
* @param {any} goldstackConfig - Goldstack configuration object.
|
|
154
169
|
* @param {any} packageSchema - Package schema.
|
|
170
|
+
* @param {any} deploymentsData - Deployment data.
|
|
155
171
|
* @param {string} [deploymentName] - Optional deployment name. Defaults to environment variable GOLDSTACK_DEPLOYMENT.
|
|
156
172
|
* @returns {Promise<string>} The URL of the SQS DLQ queue.
|
|
157
173
|
*/
|
|
158
|
-
const getSQSDLQQueueUrl = async (goldstackConfig, packageSchema, deploymentName) => {
|
|
159
|
-
const dlqQueueName = await (0, exports.getSQSDLQQueueName)(goldstackConfig, packageSchema, deploymentName);
|
|
160
|
-
const { region, accountId } = getAwsInfo(deploymentName);
|
|
161
|
-
return constructQueueUrl(dlqQueueName, region, accountId);
|
|
162
|
-
};
|
|
163
|
-
exports.getSQSDLQQueueUrl = getSQSDLQQueueUrl;
|
|
164
|
-
/**
|
|
165
|
-
* Helper function to retrieve the AWS region and account ID. Defaults to mock values for local deployment.
|
|
166
|
-
* @param {string} [deploymentName] - Optional deployment name.
|
|
167
|
-
* @returns {{region: string, accountId: string}} The AWS region and account ID.
|
|
168
|
-
*/
|
|
169
|
-
const getAwsInfo = (deploymentName) => {
|
|
174
|
+
const getSQSDLQQueueUrl = async (goldstackConfig, packageSchema, deploymentsData, deploymentName) => {
|
|
170
175
|
deploymentName = deploymentName || getEnvVar('GOLDSTACK_DEPLOYMENT');
|
|
171
176
|
if (deploymentName === 'local') {
|
|
172
|
-
return
|
|
177
|
+
return 'http://localhost:4566/000000000000/test-local-dlq';
|
|
173
178
|
}
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
|
|
179
|
+
const deployment = getDeploymentData(deploymentsData, deploymentName);
|
|
180
|
+
const region = deployment.terraform.sqs_queue_url.value.split('.')[1];
|
|
181
|
+
const accountId = deployment.terraform.sqs_queue_url.value.split('/')[3];
|
|
182
|
+
return `https://sqs.${region}.amazonaws.com/${accountId}/${deployment.terraform.sqs_dlq_queue_name.value}`;
|
|
177
183
|
};
|
|
184
|
+
exports.getSQSDLQQueueUrl = getSQSDLQQueueUrl;
|
|
178
185
|
//# sourceMappingURL=sqsConnect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqsConnect.js","sourceRoot":"","sources":["../../src/sqsConnect.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"sqsConnect.js","sourceRoot":"","sources":["../../src/sqsConnect.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,oDAI6B;AAE7B,wEAAwD;AAExD,4FAAiF;AACjF,4DAA2D;AAG3D,oDAAuE;AAEvE,IAAI,SAAgC,CAAC;AAErC;;;;;GAKG;AACH,MAAM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C,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC;AACvD,CAAC,CAAC;AAdW,QAAA,kBAAkB,sBAc7B;AAEF;;;;;;;GAOG;AACI,MAAM,iBAAiB,GAAG,KAAK,EACpC,eAAoB,EACpB,aAAkB,EAClB,eAAoB,EACpB,cAAuB,EACN,EAAE;IACnB,cAAc,GAAG,cAAc,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;IAErE,IAAI,cAAc,KAAK,OAAO,EAAE;QAC9B,OAAO,mDAAmD,CAAC;KAC5D;IAED,MAAM,UAAU,GAAG,iBAAiB,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACtE,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,OAAO,eAAe,MAAM,kBAAkB,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;AAC7G,CAAC,CAAC;AAhBW,QAAA,iBAAiB,qBAgB5B"}
|
package/dist/src/templateSqs.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.getSentMessageRequests = exports.createSQSClient = exports.getSQSQueueUrl = exports.getSQSQueueName = exports.getSQSDLQQueueUrl = exports.getSQSDLQQueueName = exports.getMockedSQS = exports.connect = void 0;
|
|
18
|
-
var sqsConnect_1 = require("./sqsConnect");
|
|
18
|
+
var sqsConnect_1 = require("./sqsConnect");
|
|
19
19
|
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return sqsConnect_1.connect; } });
|
|
20
20
|
Object.defineProperty(exports, "getMockedSQS", { enumerable: true, get: function () { return sqsConnect_1.getMockedSQS; } });
|
|
21
21
|
Object.defineProperty(exports, "getSQSDLQQueueName", { enumerable: true, get: function () { return sqsConnect_1.getSQSDLQQueueName; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateSqs.js","sourceRoot":"","sources":["../../src/templateSqs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAOsB
|
|
1
|
+
{"version":3,"file":"templateSqs.js","sourceRoot":"","sources":["../../src/templateSqs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAOsB;AANpB,qGAAA,OAAO,OAAA;AACP,0GAAA,YAAY,OAAA;AACZ,gHAAA,kBAAkB,OAAA;AAClB,+GAAA,iBAAiB,OAAA;AACjB,6GAAA,eAAe,OAAA;AACf,4GAAA,cAAc,OAAA;AAIhB,4DAA2D;AAK3D,qDAAmC;AAEnC,SAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,aAAa,GAId;IACC,8DAA8D;IAC9D,OAAO,OAAO,CAAC,IAAA,+BAAe,EAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC;QAC7D,SAAS;QACT,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAZD,0CAYC;AAED,+EAA+E;AACxE,MAAM,sBAAsB,GAAG,CACpC,SAAoB,EACE,EAAE;IACxB,4FAA4F;IAC5F,IAAK,SAAiB,CAAC,sBAAsB,EAAE;QAC7C,OAAQ,SAAiB,CAAC,sBAAsB,CAAC;KAClD;IAED,uDAAuD;IACvD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAVW,QAAA,sBAAsB,0BAUjC"}
|