@travetto/email 5.0.0-rc.1 → 5.0.0-rc.3

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": "5.0.0-rc.1",
3
+ "version": "5.0.0-rc.3",
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/base": "^5.0.0-rc.1",
27
- "@travetto/config": "^5.0.0-rc.1",
28
- "@travetto/di": "^5.0.0-rc.0",
26
+ "@travetto/runtime": "^5.0.0-rc.3",
27
+ "@travetto/config": "^5.0.0-rc.3",
28
+ "@travetto/di": "^5.0.0-rc.3",
29
29
  "@types/mustache": "^4.2.5",
30
30
  "mustache": "^4.2.0"
31
31
  },
package/src/resource.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { AppError, Env, FileLoader } from '@travetto/base';
2
- import { RuntimeIndex } from '@travetto/manifest';
1
+ import { AppError, Env, FileLoader, Runtime, RuntimeIndex } from '@travetto/runtime';
3
2
 
4
3
  /** Build a resource loader that looks into a module and it's dependencies */
5
4
  export class EmailResourceLoader extends FileLoader {
@@ -14,6 +13,6 @@ export class EmailResourceLoader extends FileLoader {
14
13
  ...RuntimeIndex.getDependentModules(mod, 'children').map(x => `${x.name}#resources`),
15
14
  '@@#resources',
16
15
  ...globalResources ?? []
17
- ]);
16
+ ].map(v => Runtime.modulePath(v)));
18
17
  }
19
18
  }
package/src/service.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Env, RuntimeResources } from '@travetto/base';
1
+ import { Runtime, RuntimeResources } from '@travetto/runtime';
2
2
  import { Injectable } from '@travetto/di';
3
3
 
4
4
  import { EmailCompiled, EmailOptions, SentEmail } from './types';
@@ -30,7 +30,7 @@ export class MailService {
30
30
  * Get compiled content by key
31
31
  */
32
32
  async getCompiled(key: string): Promise<EmailCompiled> {
33
- if (Env.dynamic || !this.#compiled.has(key)) {
33
+ if (Runtime.dynamic || !this.#compiled.has(key)) {
34
34
  const [html, text, subject] = await Promise.all([
35
35
  RuntimeResources.read(`${key}.compiled.html`),
36
36
  RuntimeResources.read(`${key}.compiled.text`),
package/src/template.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import mustache from 'mustache';
2
2
 
3
3
  import { Injectable } from '@travetto/di';
4
- import { RuntimeResources } from '@travetto/base';
4
+ import { RuntimeResources } from '@travetto/runtime';
5
5
 
6
6
  /**
7
7
  * Mail interpolation engine
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FileLoader } from '@travetto/base';
1
+ import { FileLoader } from '@travetto/runtime';
2
2
  import { Readable } from 'node:stream';
3
3
  import { Url } from 'node:url';
4
4
 
package/src/util.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Util, RuntimeContext } from '@travetto/base';
1
+ import { Util, Runtime } from '@travetto/runtime';
2
2
 
3
3
  import { EmailAttachment, EmailIdentity, EmailIdentityList, EmailOptions } from './types';
4
4
 
@@ -15,7 +15,7 @@ export class MailUtil {
15
15
  static buildBrand(file: string, content: string, compile?: string): string {
16
16
  const out = [
17
17
  'WARNING: Do not modify.',
18
- `File is generated from "${file.replace(RuntimeContext.workspace.path, '.')}"`,
18
+ `File is generated from "${file.replace(Runtime.workspace.path, '.')}"`,
19
19
  compile ? `Run \`${compile.replaceAll('\n', ' ')}\` to regenerate` : ''
20
20
  ];
21
21
  return `<!-- ${out.join(' ').trim()} -->\n${content}`;