@breadstone/archipel-platform-mailing 0.0.45 → 0.0.47
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 +2 -2
- package/package.json +13 -12
- package/src/delivering/strategies/empty/EmptyDeliveryStrategy.d.ts +17 -0
- package/src/delivering/strategies/{logger/LogDeliveryStrategy.js → empty/EmptyDeliveryStrategy.js} +11 -11
- package/src/delivering/strategies/empty/index.d.ts +1 -0
- package/src/delivering/strategies/empty/index.js +6 -0
- package/src/delivering/strategies/logger/LogDeliveryStrategy.d.ts +0 -16
- package/src/delivering/strategies/logger/index.d.ts +0 -1
- package/src/delivering/strategies/logger/index.js +0 -6
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ import { Module } from '@nestjs/common';
|
|
|
56
56
|
import { MailModule } from '@breadstone/archipel-platform-mailing';
|
|
57
57
|
|
|
58
58
|
@Module({
|
|
59
|
-
|
|
59
|
+
imports: [MailModule],
|
|
60
60
|
})
|
|
61
61
|
export class AppModule {}
|
|
62
62
|
```
|
|
@@ -82,7 +82,7 @@ import { MailModule, MailService } from '@breadstone/archipel-platform-mailing';
|
|
|
82
82
|
|
|
83
83
|
// Built-in strategies
|
|
84
84
|
import { SmtpDeliveryStrategy } from '@breadstone/archipel-platform-mailing/smtp';
|
|
85
|
-
import {
|
|
85
|
+
import { EmptyDeliveryStrategy } from '@breadstone/archipel-platform-mailing/log';
|
|
86
86
|
|
|
87
87
|
// Provider-specific (tree-shakable sub-exports)
|
|
88
88
|
import { PostmarkDeliveryStrategy, POSTMARK_CONFIG_ENTRIES } from '@breadstone/archipel-platform-mailing/postmark';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/archipel-platform-mailing",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "Email delivery with strategy-based transport and template engines for NestJS applications.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"typesVersions": {
|
|
10
10
|
"*": {
|
|
11
|
-
"delivering/
|
|
12
|
-
"./src/delivering/strategies/
|
|
11
|
+
"delivering/empty": [
|
|
12
|
+
"./src/delivering/strategies/empty/index.d.ts"
|
|
13
13
|
],
|
|
14
14
|
"delivering/smtp": [
|
|
15
15
|
"./src/delivering/strategies/smtp/index.d.ts"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"types": "./src/index.d.ts",
|
|
46
46
|
"default": "./src/index.js"
|
|
47
47
|
},
|
|
48
|
-
"./delivering/
|
|
49
|
-
"types": "./src/delivering/strategies/
|
|
50
|
-
"default": "./src/delivering/strategies/
|
|
48
|
+
"./delivering/empty": {
|
|
49
|
+
"types": "./src/delivering/strategies/empty/index.d.ts",
|
|
50
|
+
"default": "./src/delivering/strategies/empty/index.js"
|
|
51
51
|
},
|
|
52
52
|
"./delivering/smtp": {
|
|
53
53
|
"types": "./src/delivering/strategies/smtp/index.d.ts",
|
|
@@ -86,8 +86,6 @@
|
|
|
86
86
|
"default": "./src/health/index.js"
|
|
87
87
|
},
|
|
88
88
|
"./package.json": "./package.json",
|
|
89
|
-
"./delivering/strategies/logger": "./src/delivering/strategies/logger/index.js",
|
|
90
|
-
"./delivering/strategies/logger/index": "./src/delivering/strategies/logger/index.js",
|
|
91
89
|
"./delivering/strategies/smtp": "./src/delivering/strategies/smtp/index.js",
|
|
92
90
|
"./delivering/strategies/smtp/index": "./src/delivering/strategies/smtp/index.js",
|
|
93
91
|
"./delivering/strategies/postmark": "./src/delivering/strategies/postmark/index.js",
|
|
@@ -134,10 +132,10 @@
|
|
|
134
132
|
"README.md"
|
|
135
133
|
],
|
|
136
134
|
"dependencies": {
|
|
137
|
-
"@breadstone/archipel-platform-blob-storage": "0.0.
|
|
138
|
-
"@breadstone/archipel-platform-configuration": "0.0.
|
|
139
|
-
"@breadstone/archipel-platform-core": "0.0.
|
|
140
|
-
"@breadstone/archipel-platform-resources": "0.0.
|
|
135
|
+
"@breadstone/archipel-platform-blob-storage": "0.0.47",
|
|
136
|
+
"@breadstone/archipel-platform-configuration": "0.0.47",
|
|
137
|
+
"@breadstone/archipel-platform-core": "0.0.47",
|
|
138
|
+
"@breadstone/archipel-platform-resources": "0.0.47",
|
|
141
139
|
"tslib": "2.8.1"
|
|
142
140
|
},
|
|
143
141
|
"peerDependencies": {
|
|
@@ -189,5 +187,8 @@
|
|
|
189
187
|
"resend": "6.12.4",
|
|
190
188
|
"rxjs": "7.8.2",
|
|
191
189
|
"vitest": "4.1.7"
|
|
190
|
+
},
|
|
191
|
+
"archipel": {
|
|
192
|
+
"category": "Infrastructure"
|
|
192
193
|
}
|
|
193
194
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMailAttachment } from '../../../models/IMailAttachment';
|
|
2
|
+
import { DeliveryStrategyBase } from '../abstracts/DeliveryStrategyBase';
|
|
3
|
+
/**
|
|
4
|
+
* The `EmptyDeliveryStrategy` class.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class EmptyDeliveryStrategy extends DeliveryStrategyBase {
|
|
9
|
+
private readonly _logger;
|
|
10
|
+
/**
|
|
11
|
+
* Constructs a new instance of the `EmptyDeliveryStrategy` class.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
constructor();
|
|
16
|
+
send(from: string, to: string, subject: string, content: string, isHtml: boolean, _attachments?: Array<IMailAttachment>): Promise<void>;
|
|
17
|
+
}
|
package/src/delivering/strategies/{logger/LogDeliveryStrategy.js → empty/EmptyDeliveryStrategy.js}
RENAMED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// #region Imports
|
|
3
|
-
var
|
|
3
|
+
var EmptyDeliveryStrategy_1;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.EmptyDeliveryStrategy = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const common_1 = require("@nestjs/common");
|
|
8
8
|
const DeliveryStrategyBase_1 = require("../abstracts/DeliveryStrategyBase");
|
|
9
9
|
// #endregion
|
|
10
10
|
/**
|
|
11
|
-
* The `
|
|
11
|
+
* The `EmptyDeliveryStrategy` class.
|
|
12
12
|
*
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
let
|
|
15
|
+
let EmptyDeliveryStrategy = EmptyDeliveryStrategy_1 = class EmptyDeliveryStrategy extends DeliveryStrategyBase_1.DeliveryStrategyBase {
|
|
16
16
|
// #endregion
|
|
17
17
|
// #region Ctor
|
|
18
18
|
/**
|
|
19
|
-
* Constructs a new instance of the `
|
|
19
|
+
* Constructs a new instance of the `EmptyDeliveryStrategy` class.
|
|
20
20
|
*
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
23
|
constructor() {
|
|
24
24
|
super();
|
|
25
25
|
// #region Fields
|
|
26
|
-
this._logger = new common_1.Logger(
|
|
26
|
+
this._logger = new common_1.Logger(EmptyDeliveryStrategy_1.name);
|
|
27
27
|
}
|
|
28
28
|
// #endregion
|
|
29
29
|
// #region Methods
|
|
30
30
|
send(from, to, subject, content, isHtml, _attachments) {
|
|
31
|
-
this._logger.log(
|
|
31
|
+
this._logger.log(`${JSON.stringify({
|
|
32
32
|
from: from,
|
|
33
33
|
to: to,
|
|
34
34
|
subject: subject,
|
|
@@ -38,9 +38,9 @@ let LogDeliveryStrategy = LogDeliveryStrategy_1 = class LogDeliveryStrategy exte
|
|
|
38
38
|
return Promise.resolve();
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
41
|
+
exports.EmptyDeliveryStrategy = EmptyDeliveryStrategy;
|
|
42
|
+
exports.EmptyDeliveryStrategy = EmptyDeliveryStrategy = EmptyDeliveryStrategy_1 = tslib_1.__decorate([
|
|
43
43
|
(0, common_1.Injectable)(),
|
|
44
44
|
tslib_1.__metadata("design:paramtypes", [])
|
|
45
|
-
],
|
|
46
|
-
//# sourceMappingURL=
|
|
45
|
+
], EmptyDeliveryStrategy);
|
|
46
|
+
//# sourceMappingURL=EmptyDeliveryStrategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmptyDeliveryStrategy } from './EmptyDeliveryStrategy';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmptyDeliveryStrategy = void 0;
|
|
4
|
+
var EmptyDeliveryStrategy_1 = require("./EmptyDeliveryStrategy");
|
|
5
|
+
Object.defineProperty(exports, "EmptyDeliveryStrategy", { enumerable: true, get: function () { return EmptyDeliveryStrategy_1.EmptyDeliveryStrategy; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DeliveryStrategyBase } from '../abstracts/DeliveryStrategyBase';
|
|
2
|
-
/**
|
|
3
|
-
* The `LogDeliveryStrategy` class.
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare class LogDeliveryStrategy extends DeliveryStrategyBase {
|
|
8
|
-
private readonly _logger;
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new instance of the `LogDelivery` class.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
constructor();
|
|
15
|
-
send(from: string, to: string, subject: string, content: string, isHtml: boolean, _attachments?: Array<import('../../../models/IMailAttachment').IMailAttachment>): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LogDeliveryStrategy } from './LogDeliveryStrategy';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogDeliveryStrategy = void 0;
|
|
4
|
-
var LogDeliveryStrategy_1 = require("./LogDeliveryStrategy");
|
|
5
|
-
Object.defineProperty(exports, "LogDeliveryStrategy", { enumerable: true, get: function () { return LogDeliveryStrategy_1.LogDeliveryStrategy; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|