@application-kit/mailer 0.0.0 → 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @application-kit/mailer
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7d0253e: `createCliDataSource({ app: { sourceDirs, buildDirs }, config, logger, packages })` во входе `@application-kit/typeorm/nest`
8
+ — DataSource для TypeORM CLI: опции `DatabaseConfig`, миграции и entities продукта глобами двух раскладок (исходники
9
+ под ts-node и скомпилированный образ) и таблицы пакетов. `PackageOrmInterface` в корне — форма набора пакета.
10
+ `@application-kit/transaction-outbox` и `@application-kit/mailer` экспортируют `orm: { entities, migrations }` — свои
11
+ entity и миграцию классами; имена классов миграций не менялись.
12
+
13
+ ## 0.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - c5c1cc0: Первый выпуск: `MailerModule.register({ subscriptions, templates })` — рендер шаблонов каталога приложения, SMTP или
18
+ дамп в лог, идемпотентность по журналу `sent_emails` (миграция `AddSentEmails1790231050588` и `SentEmailEntity`),
19
+ `EmailDispatcherService` с политиками отказа и гейтом подписок, реестр категорий `EmailCategoryRegistryInterface` для
20
+ module augmentation, pino-логгер `MailerLogger`; фейки портов — вход `/testing`. Окружение `MAIL_*` валидируется
21
+ в `register`, а не на импорте.
package/README.md CHANGED
@@ -58,13 +58,13 @@ declare module '@application-kit/mailer' {
58
58
 
59
59
  ## Миграция и сущность
60
60
 
61
- Таблицу журнала создаёт миграция пакета. Приложение подключает её и сущность классами — так один путь работает и в dev,
62
- и в собранном образе, а `migration:generate` не предлагает удалить таблицу:
61
+ Таблицу журнала создаёт миграция пакета. Приложение подключает её и сущность классами — объектом `orm` — так один путь
62
+ работает и в dev, и в собранном образе, а `migration:generate` не предлагает удалить таблицу:
63
63
 
64
64
  ```ts
65
- import { AddSentEmails1790231050588, SentEmailEntity } from '@application-kit/mailer'
65
+ import { orm as mailerOrm } from '@application-kit/mailer'
66
66
 
67
- new DataSource({ entities: [..., SentEmailEntity], migrations: [..., AddSentEmails1790231050588] })
67
+ createCliDataSource({ ..., packages: [mailerOrm] }) // @application-kit/typeorm/nest
68
68
  ```
69
69
 
70
70
  Имя класса миграции записано в таблице `migrations` уже мигрированных баз и не меняется.
@@ -1,3 +1,4 @@
1
1
  export * from './entities/index.js';
2
2
  export * from './migrations/index.js';
3
3
  export * from './repositories/index.js';
4
+ export * from './orm.js';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entities/index.js"), exports);
18
18
  __exportStar(require("./migrations/index.js"), exports);
19
19
  __exportStar(require("./repositories/index.js"), exports);
20
+ __exportStar(require("./orm.js"), exports);
@@ -0,0 +1,6 @@
1
+ import { SentEmailEntity } from './entities/sent-email.entity.js';
2
+ import { AddSentEmails1790231050588 } from './migrations/add-sent-emails.migration.js';
3
+ export declare const orm: {
4
+ entities: (typeof SentEmailEntity)[];
5
+ migrations: (typeof AddSentEmails1790231050588)[];
6
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.orm = void 0;
4
+ const sent_email_entity_js_1 = require("./entities/sent-email.entity.js");
5
+ const add_sent_emails_migration_js_1 = require("./migrations/add-sent-emails.migration.js");
6
+ exports.orm = {
7
+ entities: [sent_email_entity_js_1.SentEmailEntity],
8
+ migrations: [add_sent_emails_migration_js_1.AddSentEmails1790231050588],
9
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './entities/index.js';
2
2
  export * from './migrations/index.js';
3
3
  export * from './repositories/index.js';
4
+ export * from './orm.js';
@@ -1,3 +1,4 @@
1
1
  export * from './entities/index.js';
2
2
  export * from './migrations/index.js';
3
3
  export * from './repositories/index.js';
4
+ export * from './orm.js';
@@ -0,0 +1,6 @@
1
+ import { SentEmailEntity } from './entities/sent-email.entity.js';
2
+ import { AddSentEmails1790231050588 } from './migrations/add-sent-emails.migration.js';
3
+ export declare const orm: {
4
+ entities: (typeof SentEmailEntity)[];
5
+ migrations: (typeof AddSentEmails1790231050588)[];
6
+ };
@@ -0,0 +1,6 @@
1
+ import { SentEmailEntity } from './entities/sent-email.entity.js';
2
+ import { AddSentEmails1790231050588 } from './migrations/add-sent-emails.migration.js';
3
+ export const orm = {
4
+ entities: [SentEmailEntity],
5
+ migrations: [AddSentEmails1790231050588],
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@application-kit/mailer",
3
- "version": "0.0.0",
3
+ "version": "0.2.0",
4
4
  "description": "Отправка писем по шаблонам для NestJS: SMTP или дамп в лог, идемпотентность по журналу отправленного, гейт подписок; шаблоны и тексты приносит приложение",
5
5
  "keywords": [
6
6
  "email",