@travetto/email 7.0.3 → 7.0.5

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": "@travetto/email",
3
- "version": "7.0.3",
3
+ "version": "7.0.5",
4
4
  "description": "Email transmission module.",
5
5
  "keywords": [
6
6
  "email",
@@ -23,9 +23,9 @@
23
23
  "directory": "module/email"
24
24
  },
25
25
  "dependencies": {
26
- "@travetto/config": "^7.0.3",
27
- "@travetto/di": "^7.0.3",
28
- "@travetto/runtime": "^7.0.3",
26
+ "@travetto/config": "^7.0.5",
27
+ "@travetto/di": "^7.0.5",
28
+ "@travetto/runtime": "^7.0.4",
29
29
  "@types/mustache": "^4.2.6",
30
30
  "mustache": "^4.2.0"
31
31
  },
package/src/resource.ts CHANGED
@@ -3,14 +3,14 @@ import { AppError, Env, FileLoader, Runtime, RuntimeIndex } from '@travetto/runt
3
3
  /** Build a resource loader that looks into a module and it's dependencies */
4
4
  export class EmailResourceLoader extends FileLoader {
5
5
  constructor(module: string, globalResources?: string[]) {
6
- const mod = RuntimeIndex.getModule(module);
7
- if (!mod) {
6
+ const found = RuntimeIndex.getModule(module);
7
+ if (!found) {
8
8
  throw new AppError(`Unknown module - ${module}`, { category: 'notfound', details: { module } });
9
9
  }
10
10
  super([
11
11
  ...Env.TRV_RESOURCES.list ?? [],
12
12
  `${module}#resources`,
13
- ...RuntimeIndex.getDependentModules(mod, 'children').map(indexedMod => `${indexedMod.name}#resources`),
13
+ ...RuntimeIndex.getDependentModules(found, 'children').map(indexedMod => `${indexedMod.name}#resources`),
14
14
  '@@#resources',
15
15
  ...globalResources ?? []
16
16
  ].map(name => Runtime.modulePath(name)));
package/src/service.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { RuntimeResources } from '@travetto/runtime';
2
2
  import { Injectable } from '@travetto/di';
3
3
 
4
- import { EmailCompiled, EmailOptions, SentEmail } from './types.ts';
5
- import { MailTransport } from './transport.ts';
6
- import { MailInterpolator } from './template.ts';
4
+ import type { EmailCompiled, EmailOptions, SentEmail } from './types.ts';
5
+ import type { MailTransport } from './transport.ts';
6
+ import type { MailInterpolator } from './template.ts';
7
7
  import { MailUtil } from './util.ts';
8
8
 
9
9
  type MessageWithoutBody = Omit<EmailOptions, keyof EmailCompiled>;
package/src/transport.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { castTo } from '@travetto/runtime';
2
- import { EmailOptions, SentEmail } from './types.ts';
2
+ import type { EmailOptions, SentEmail } from './types.ts';
3
3
 
4
4
  /**
5
5
  * Default mail transport
package/src/types.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Readable } from 'node:stream';
2
- import { Url } from 'node:url';
1
+ import type { Readable } from 'node:stream';
2
+ import type { Url } from 'node:url';
3
3
 
4
- import { FileLoader } from '@travetto/runtime';
4
+ import type { FileLoader } from '@travetto/runtime';
5
5
 
6
6
  /**
7
7
  * An address
package/src/util.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Runtime, BinaryUtil } from '@travetto/runtime';
2
2
 
3
- import { EmailAttachment, EmailIdentity, EmailIdentityList, EmailOptions } from './types.ts';
3
+ import type { EmailAttachment, EmailIdentity, EmailIdentityList, EmailOptions } from './types.ts';
4
4
 
5
5
  /**
6
6
  * Utilities for email