@onivoro/server-aws-sns 24.17.0 → 24.20.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onivoro/server-aws-sns",
3
- "version": "24.17.0",
3
+ "version": "24.20.0",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -9,8 +9,8 @@
9
9
  "url": "https://github.com/onivoro/monorepo.git"
10
10
  },
11
11
  "dependencies": {
12
- "@onivoro/server-aws-credential-providers": "24.17.0",
13
- "@onivoro/server-common": "24.17.0",
12
+ "@onivoro/server-aws-credential-providers": "24.20.0",
13
+ "@onivoro/server-common": "24.20.0",
14
14
  "tslib": "^2.3.0"
15
15
  },
16
16
  "peerDependencies": {
@@ -23,4 +23,4 @@
23
23
  "**/*.js.map",
24
24
  "README.md"
25
25
  ]
26
- }
26
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/classes/server-aws-sns-config.class';
2
+ export * from './lib/server-aws-sns.module';
3
+ //# sourceMappingURL=index.d.ts.map
package/src/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/classes/server-aws-sns-config.class"), exports);
5
+ tslib_1.__exportStar(require("./lib/server-aws-sns.module"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/server/aws-sns/src/index.ts"],"names":[],"mappings":";;;AAAA,oFAA0D;AAE1D,sEAA4C"}
@@ -0,0 +1,5 @@
1
+ export declare class ServerAwsSnsConfig {
2
+ AWS_PROFILE?: string;
3
+ AWS_REGION: string;
4
+ }
5
+ //# sourceMappingURL=server-aws-sns-config.class.d.ts.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServerAwsSnsConfig = void 0;
4
+ class ServerAwsSnsConfig {
5
+ AWS_PROFILE;
6
+ AWS_REGION;
7
+ }
8
+ exports.ServerAwsSnsConfig = ServerAwsSnsConfig;
9
+ //# sourceMappingURL=server-aws-sns-config.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-aws-sns-config.class.js","sourceRoot":"","sources":["../../../../../../../libs/server/aws-sns/src/lib/classes/server-aws-sns-config.class.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IAC3B,WAAW,CAAU;IACrB,UAAU,CAAS;CACtB;AAHD,gDAGC"}
@@ -0,0 +1,5 @@
1
+ import { ServerAwsSnsConfig } from './classes/server-aws-sns-config.class';
2
+ export declare class ServerAwsSnsModule {
3
+ static configure(config: ServerAwsSnsConfig): any;
4
+ }
5
+ //# sourceMappingURL=server-aws-sns.module.d.ts.map
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var ServerAwsSnsModule_1;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ServerAwsSnsModule = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const common_1 = require("@nestjs/common");
7
+ const server_common_1 = require("@onivoro/server-common");
8
+ const client_sns_1 = require("@aws-sdk/client-sns");
9
+ const server_aws_sns_config_class_1 = require("./classes/server-aws-sns-config.class");
10
+ const server_aws_credential_providers_1 = require("@onivoro/server-aws-credential-providers");
11
+ let snsClient = null;
12
+ let ServerAwsSnsModule = ServerAwsSnsModule_1 = class ServerAwsSnsModule {
13
+ static configure(config) {
14
+ return (0, server_common_1.moduleFactory)({
15
+ module: ServerAwsSnsModule_1,
16
+ imports: [server_aws_credential_providers_1.ServerAwsCredentialProvidersModule.configure(config)],
17
+ providers: [
18
+ {
19
+ provide: client_sns_1.SNSClient,
20
+ useFactory: (credentials) => snsClient
21
+ ? snsClient
22
+ : snsClient = new client_sns_1.SNSClient({
23
+ region: config.AWS_REGION,
24
+ logger: console,
25
+ credentials
26
+ }),
27
+ inject: [server_aws_credential_providers_1.AwsCredentials]
28
+ },
29
+ { provide: server_aws_sns_config_class_1.ServerAwsSnsConfig, useValue: config },
30
+ ],
31
+ });
32
+ }
33
+ };
34
+ exports.ServerAwsSnsModule = ServerAwsSnsModule;
35
+ exports.ServerAwsSnsModule = ServerAwsSnsModule = ServerAwsSnsModule_1 = tslib_1.__decorate([
36
+ (0, common_1.Module)({})
37
+ ], ServerAwsSnsModule);
38
+ //# sourceMappingURL=server-aws-sns.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-aws-sns.module.js","sourceRoot":"","sources":["../../../../../../libs/server/aws-sns/src/lib/server-aws-sns.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAwC;AACxC,0DAAuD;AACvD,oDAAgD;AAChD,uFAA2E;AAC3E,8FAA8G;AAE9G,IAAI,SAAS,GAAqB,IAAI,CAAC;AAIhC,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAC7B,MAAM,CAAC,SAAS,CAAC,MAA0B;QACzC,OAAO,IAAA,6BAAa,EAAC;YACnB,MAAM,EAAE,oBAAkB;YAC1B,OAAO,EAAE,CAAC,oEAAkC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/D,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,sBAAS;oBAClB,UAAU,EAAE,CAAC,WAA2B,EAAE,EAAE,CAAC,SAAS;wBACpD,CAAC,CAAC,SAAS;wBACX,CAAC,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC;4BAC1B,MAAM,EAAE,MAAM,CAAC,UAAU;4BACzB,MAAM,EAAE,OAAO;4BACf,WAAW;yBACZ,CAAC;oBACF,MAAM,EAAE,CAAC,gDAAc,CAAC;iBAC3B;gBACD,EAAE,OAAO,EAAE,gDAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE;aAClD;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AArBY,gDAAkB;6BAAlB,kBAAkB;IAF9B,IAAA,eAAM,EAAC,EACP,CAAC;GACW,kBAAkB,CAqB9B"}