@quatrain/messaging 1.0.14 → 1.1.2
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/MessageFormatter.js +1 -1
- package/dist/index.d.ts +9 -7
- package/package.json +5 -2
- package/src/MessageFormatter.ts +1 -1
- package/src/index.ts +12 -8
package/dist/MessageFormatter.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.MessageFormatter = void 0;
|
|
|
7
7
|
const mustache_1 = __importDefault(require("mustache"));
|
|
8
8
|
class MessageFormatter {
|
|
9
9
|
static formatTitle(title) {
|
|
10
|
-
return title.replace(
|
|
10
|
+
return title.replace(/<[^>]*>/gi, '');
|
|
11
11
|
}
|
|
12
12
|
static formatBody(body, data) {
|
|
13
13
|
return mustache_1.default.render(body, data);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Messaging
|
|
1
|
+
import { Messaging } from './Messaging';
|
|
2
|
+
import type { MessagingParameters } from './Messaging';
|
|
2
3
|
import { AbstractMessagingAdapter } from './AbstractMessagingAdapter';
|
|
3
|
-
import { MessagingRecipient } from './types/MessagingRecipient';
|
|
4
|
-
import { NotificationMessage } from './types/NotificationMessage';
|
|
5
|
-
import { MessageType } from './types/MessageType';
|
|
6
|
-
import { EmailCapableAdapter } from './types/EmailCapableAdapter';
|
|
7
|
-
import { NotificationCapableAdapter } from './types/NotificationCapableAdapter';
|
|
4
|
+
import type { MessagingRecipient } from './types/MessagingRecipient';
|
|
5
|
+
import type { NotificationMessage } from './types/NotificationMessage';
|
|
6
|
+
import type { MessageType } from './types/MessageType';
|
|
7
|
+
import type { EmailCapableAdapter } from './types/EmailCapableAdapter';
|
|
8
|
+
import type { NotificationCapableAdapter } from './types/NotificationCapableAdapter';
|
|
8
9
|
import { MessageFormatter } from './MessageFormatter';
|
|
9
|
-
export { Messaging,
|
|
10
|
+
export { Messaging, AbstractMessagingAdapter, MessageFormatter, };
|
|
11
|
+
export type { MessagingParameters, MessagingRecipient, NotificationMessage, MessageType, EmailCapableAdapter, NotificationCapableAdapter, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/messaging",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"description": "Messaging adapters commons",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"author": "Quatrain Développement SAS <developers@quatrain.com>",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@quatrain/core": "^1.
|
|
23
|
+
"@quatrain/core": "^1.2.5",
|
|
24
24
|
"mustache": "^4.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -41,5 +41,8 @@
|
|
|
41
41
|
"build": "tsc",
|
|
42
42
|
"wbuild": "tsc --watch",
|
|
43
43
|
"bump-to": "yarn version"
|
|
44
|
+
},
|
|
45
|
+
"typedoc": {
|
|
46
|
+
"entryPoint": "src/index.ts"
|
|
44
47
|
}
|
|
45
48
|
}
|
package/src/MessageFormatter.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { Messaging
|
|
1
|
+
import { Messaging } from './Messaging'
|
|
2
|
+
import type { MessagingParameters } from './Messaging'
|
|
2
3
|
import { AbstractMessagingAdapter } from './AbstractMessagingAdapter'
|
|
3
|
-
import { MessagingRecipient } from './types/MessagingRecipient'
|
|
4
|
-
import { NotificationMessage } from './types/NotificationMessage'
|
|
5
|
-
import { MessageType } from './types/MessageType'
|
|
6
|
-
import { EmailCapableAdapter } from './types/EmailCapableAdapter'
|
|
7
|
-
import { NotificationCapableAdapter } from './types/NotificationCapableAdapter'
|
|
4
|
+
import type { MessagingRecipient } from './types/MessagingRecipient'
|
|
5
|
+
import type { NotificationMessage } from './types/NotificationMessage'
|
|
6
|
+
import type { MessageType } from './types/MessageType'
|
|
7
|
+
import type { EmailCapableAdapter } from './types/EmailCapableAdapter'
|
|
8
|
+
import type { NotificationCapableAdapter } from './types/NotificationCapableAdapter'
|
|
8
9
|
import { MessageFormatter } from './MessageFormatter'
|
|
9
10
|
|
|
10
11
|
export {
|
|
11
12
|
Messaging,
|
|
12
|
-
MessagingParameters,
|
|
13
13
|
AbstractMessagingAdapter,
|
|
14
|
+
MessageFormatter,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type {
|
|
18
|
+
MessagingParameters,
|
|
14
19
|
MessagingRecipient,
|
|
15
20
|
NotificationMessage,
|
|
16
21
|
MessageType,
|
|
17
22
|
EmailCapableAdapter,
|
|
18
23
|
NotificationCapableAdapter,
|
|
19
|
-
MessageFormatter,
|
|
20
24
|
}
|