@mimik/configuration 5.0.7 → 5.0.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 (3) hide show
  1. package/README.md +2 -0
  2. package/index.js +5 -0
  3. package/package.json +9 -9
package/README.md CHANGED
@@ -91,6 +91,8 @@ The following environement variables are being used for the configuration:
91
91
  | REQUEST_TIMEOUT | timeout for intra cluster http request | 10000 | cluster.timeout | in milliseconds
92
92
  | CACHE_SET | switch to enable use of cache | off | cache.set | can be `on`, `off`
93
93
  | TOPIC_SET | switch to enable use of event topic | off | topic.set | can be `on`, `off`, `mock`
94
+ | SET_SNS_TOPIC_FIFO | set to yes if fifo topic | no | topic.isFifoTopic | can be `yes`, `no`
95
+ | SET_SNS_CONTENT_DEDUPLICATION | set to yes, to use content based deduplication | no | contentBasedDeduplication | when fifo topic is used and set to no, MessageDeduplicationId must be provided in message.
94
96
  | ENCRYPTION_SET | switch to enable use of mongodb encryption | off | encryption.set | can be `on`, or `off`
95
97
  | MIT_URL | url for reaching mIT | | dependencies.mIT.url |
96
98
  | MIT_AUDIENCE | audience of mIT | | dependencies.mIT.audience | [2]
package/index.js CHANGED
@@ -298,8 +298,11 @@ const setupTopic = (topicOpts) => {
298
298
  const topicConfig = {
299
299
  region: process.env.SNS_AWS_REGION || DEFAULT_AWS_REGION,
300
300
  name: topicOpts.name,
301
+ isFifoTopic: process.env.SET_SNS_TOPIC_FIFO === 'yes',
302
+ contentBasedDeduplication: false,
301
303
  };
302
304
 
305
+ if (topicConfig.isFifoTopic) topicConfig.contentBasedDeduplication = process.env.SET_SNS_CONTENT_DEDUPLICATION === 'yes';
303
306
  if (!_.isNil(process.env.SNS_AWS_ACCESS_KEY_ID)) topicConfig.accessKeyId = process.env.SNS_AWS_ACCESS_KEY_ID;
304
307
  if (!_.isNil(process.env.SNS_AWS_SECRET_ACCESS_KEY)) topicConfig.secretAccessKey = process.env.SNS_AWS_SECRET_ACCESS_KEY;
305
308
 
@@ -545,6 +548,8 @@ configuration.locationProvider = setupLocationProvider();
545
548
  * | REQUEST_TIMEOUT | timeout for intra cluster http request | 10000 | cluster.timeout | in milliseconds
546
549
  * | CACHE_SET | switch to enable use of cache | off | cache.set | can be `on`, `off`
547
550
  * | TOPIC_SET | switch to enable use of event topic | off | topic.set | can be `on`, `off`, `mock`
551
+ * | SET_SNS_TOPIC_FIFO | set to yes if fifo topic | no | topic.isFifoTopic | can be `yes`, `no`
552
+ * | SET_SNS_CONTENT_DEDUPLICATION | set to yes, to use content based deduplication | no | contentBasedDeduplication | when fifo topic is used and set to no, MessageDeduplicationId must be provided in message.
548
553
  * | ENCRYPTION_SET | switch to enable use of mongodb encryption | off | encryption.set | can be `on`, or `off`
549
554
  * | MIT_URL | url for reaching mIT | | dependencies.mIT.url |
550
555
  * | MIT_AUDIENCE | audience of mIT | | dependencies.mIT.audience | [2]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/configuration",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "description": "Common configuration for mimik services",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,20 +30,20 @@
30
30
  "url": "https://bitbucket.org/mimiktech/configuration"
31
31
  },
32
32
  "dependencies": {
33
- "@mimik/request-helper": "^1.7.9",
34
- "@mimik/sumologic-winston-logger": "^1.6.19",
35
- "@mimik/user-filters": "1.3.6",
33
+ "@mimik/request-helper": "^1.7.10",
34
+ "@mimik/sumologic-winston-logger": "^1.6.20",
35
+ "@mimik/user-filters": "^1.3.7",
36
36
  "ip": "2.0.0",
37
37
  "lodash": "4.17.21",
38
38
  "uuid": "9.0.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@mimik/eslint-plugin-dependencies": "^2.4.5",
42
- "@mimik/eslint-plugin-document-env": "^1.0.5",
43
- "eslint": "8.50.0",
41
+ "@mimik/eslint-plugin-dependencies": "^2.4.6",
42
+ "@mimik/eslint-plugin-document-env": "^1.0.6",
43
+ "eslint": "8.55.0",
44
44
  "eslint-config-airbnb": "19.0.4",
45
- "eslint-plugin-import": "2.28.1",
46
- "eslint-plugin-jsx-a11y": "6.7.1",
45
+ "eslint-plugin-import": "2.29.0",
46
+ "eslint-plugin-jsx-a11y": "6.8.0",
47
47
  "eslint-plugin-react": "7.33.2",
48
48
  "eslint-plugin-react-hooks": "4.6.0",
49
49
  "husky": "8.0.3",