@travetto/email 7.0.5 → 7.1.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/resource.ts +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/email",
3
- "version": "7.0.5",
3
+ "version": "7.1.0",
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.5",
27
- "@travetto/di": "^7.0.5",
28
- "@travetto/runtime": "^7.0.4",
26
+ "@travetto/config": "^7.1.0",
27
+ "@travetto/di": "^7.1.0",
28
+ "@travetto/runtime": "^7.1.0",
29
29
  "@types/mustache": "^4.2.6",
30
30
  "mustache": "^4.2.0"
31
31
  },
package/src/resource.ts CHANGED
@@ -2,15 +2,15 @@ import { AppError, Env, FileLoader, Runtime, RuntimeIndex } from '@travetto/runt
2
2
 
3
3
  /** Build a resource loader that looks into a module and it's dependencies */
4
4
  export class EmailResourceLoader extends FileLoader {
5
- constructor(module: string, globalResources?: string[]) {
6
- const found = RuntimeIndex.getModule(module);
5
+ constructor(moduleName: string, globalResources?: string[]) {
6
+ const found = RuntimeIndex.getModule(moduleName);
7
7
  if (!found) {
8
- throw new AppError(`Unknown module - ${module}`, { category: 'notfound', details: { module } });
8
+ throw new AppError(`Unknown module - ${moduleName}`, { category: 'notfound', details: { module: moduleName } });
9
9
  }
10
10
  super([
11
11
  ...Env.TRV_RESOURCES.list ?? [],
12
- `${module}#resources`,
13
- ...RuntimeIndex.getDependentModules(found, 'children').map(indexedMod => `${indexedMod.name}#resources`),
12
+ `${moduleName}#resources`,
13
+ ...RuntimeIndex.getDependentModules(found, 'children').map(module => `${module.name}#resources`),
14
14
  '@@#resources',
15
15
  ...globalResources ?? []
16
16
  ].map(name => Runtime.modulePath(name)));