@acmekit/notification-local 2.13.1
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/README.md +0 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/services/local.d.ts +16 -0
- package/dist/services/local.d.ts.map +1 -0
- package/dist/services/local.js +24 -0
- package/dist/services/local.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -0
package/README.md
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,wBAEE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@acmekit/framework/utils");
|
|
4
|
+
const local_1 = require("./services/local");
|
|
5
|
+
const services = [local_1.LocalNotificationService];
|
|
6
|
+
exports.default = (0, utils_1.ModuleProvider)(utils_1.Modules.NOTIFICATION, {
|
|
7
|
+
services,
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,oDAAkE;AAClE,4CAA2D;AAE3D,MAAM,QAAQ,GAAG,CAAC,gCAAwB,CAAC,CAAA;AAE3C,kBAAe,IAAA,sBAAc,EAAC,eAAO,CAAC,YAAY,EAAE;IAClD,QAAQ;CACT,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocalNotificationServiceOptions, Logger, NotificationTypes } from "@acmekit/framework/types";
|
|
2
|
+
import { AbstractNotificationProviderService } from "@acmekit/framework/utils";
|
|
3
|
+
type InjectedDependencies = {
|
|
4
|
+
logger: Logger;
|
|
5
|
+
};
|
|
6
|
+
interface LocalServiceConfig {
|
|
7
|
+
}
|
|
8
|
+
export declare class LocalNotificationService extends AbstractNotificationProviderService {
|
|
9
|
+
static identifier: string;
|
|
10
|
+
protected config_: LocalServiceConfig;
|
|
11
|
+
protected logger_: Logger;
|
|
12
|
+
constructor({ logger }: InjectedDependencies, options: LocalNotificationServiceOptions);
|
|
13
|
+
send(notification: NotificationTypes.ProviderSendNotificationDTO): Promise<NotificationTypes.ProviderSendNotificationResultsDTO>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/services/local.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,MAAM,EACN,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,mCAAmC,EAEpC,MAAM,0BAA0B,CAAA;AAEjC,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,UAAU,kBAAkB;CAAG;AAE/B,qBAAa,wBAAyB,SAAQ,mCAAmC;IAC/E,MAAM,CAAC,UAAU,SAAuB;IACxC,SAAS,CAAC,OAAO,EAAE,kBAAkB,CAAA;IACrC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAA;gBAGvB,EAAE,MAAM,EAAE,EAAE,oBAAoB,EAChC,OAAO,EAAE,+BAA+B;IAOpC,IAAI,CACR,YAAY,EAAE,iBAAiB,CAAC,2BAA2B,GAC1D,OAAO,CAAC,iBAAiB,CAAC,kCAAkC,CAAC;CAgBjE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalNotificationService = void 0;
|
|
4
|
+
const utils_1 = require("@acmekit/framework/utils");
|
|
5
|
+
class LocalNotificationService extends utils_1.AbstractNotificationProviderService {
|
|
6
|
+
constructor({ logger }, options) {
|
|
7
|
+
super();
|
|
8
|
+
this.config_ = options;
|
|
9
|
+
this.logger_ = logger;
|
|
10
|
+
}
|
|
11
|
+
async send(notification) {
|
|
12
|
+
if (!notification) {
|
|
13
|
+
throw new utils_1.AcmeKitError(utils_1.AcmeKitError.Types.INVALID_DATA, `No notification information provided`);
|
|
14
|
+
}
|
|
15
|
+
const message = `Attempting to send a notification to: '${notification.to}'` +
|
|
16
|
+
` on the channel: '${notification.channel}' with template: '${notification.template}'` +
|
|
17
|
+
` and data: '${JSON.stringify(notification.data)}'`;
|
|
18
|
+
this.logger_.info(message);
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.LocalNotificationService = LocalNotificationService;
|
|
23
|
+
LocalNotificationService.identifier = "notification-local";
|
|
24
|
+
//# sourceMappingURL=local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/services/local.ts"],"names":[],"mappings":";;;AAKA,oDAGiC;AAQjC,MAAa,wBAAyB,SAAQ,2CAAmC;IAK/E,YACE,EAAE,MAAM,EAAwB,EAChC,OAAwC;QAExC,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,YAA2D;QAE3D,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,oBAAY,CACpB,oBAAY,CAAC,KAAK,CAAC,YAAY,EAC/B,sCAAsC,CACvC,CAAA;QACH,CAAC;QAED,MAAM,OAAO,GACX,0CAA0C,YAAY,CAAC,EAAE,GAAG;YAC5D,qBAAqB,YAAY,CAAC,OAAO,qBAAqB,YAAY,CAAC,QAAQ,GAAG;YACtF,eAAe,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAA;QAErD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC1B,OAAO,EAAE,CAAA;IACX,CAAC;;AA/BH,4DAgCC;AA/BQ,mCAAU,GAAG,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/services/local.ts"],"version":"5.9.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acmekit/notification-local",
|
|
3
|
+
"version": "2.13.1",
|
|
4
|
+
"description": "Local (logging) notification provider for AcmeKit, useful for testing purposes and log audits",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/acmekit/acmekit",
|
|
9
|
+
"directory": "packages/modules/providers/notification-local"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"!dist/**/__tests__",
|
|
14
|
+
"!dist/**/__mocks__",
|
|
15
|
+
"!dist/**/__fixtures__"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"author": "AcmeKit",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "../../../../node_modules/.bin/jest --passWithNoTests src",
|
|
24
|
+
"test:integration": "../../../../node_modules/.bin/jest --passWithNoTests --forceExit --testPathPattern=\"integration-tests/__tests__/.*\\.spec\\.ts\"",
|
|
25
|
+
"build": "yarn run -T rimraf dist && yarn run -T tsc --build ./tsconfig.json",
|
|
26
|
+
"watch": "yarn run -T tsc --watch"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@acmekit/framework": "2.13.1"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@acmekit/framework": "2.13.1"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"acmekit-provider",
|
|
36
|
+
"acmekit-provider-local"
|
|
37
|
+
]
|
|
38
|
+
}
|