@travetto/email-compiler 6.0.0-rc.1 → 6.0.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/README.md CHANGED
@@ -19,6 +19,7 @@ This is primarily a set of command line tools for compiling and developing templ
19
19
  The templating process involves loading various assets (html, css, images), and so there is provision for asset management and loading. The templating config allows for specifying asset paths, with the following paths (in order of precedence):
20
20
  1. `%ROOT%/resources/email`
21
21
  1. `@travetto/email-{engine}/resources/email`
22
+
22
23
  When looking up a resources, every asset folder is consulted, in order, and the first to resolve an asset wins. This allows for overriding of default templating resources, as needed. The compilation process will convert `.email.html` files into `.compiled.html`, `.compiled.text` and `.compiled.subject` suffixes to generate the outputs respectively.
23
24
 
24
25
  ## Template Extension
package/__index__.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './src/compiler';
2
- export * from './src/util';
1
+ export * from './src/compiler.ts';
2
+ export * from './src/util.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/email-compiler",
3
- "version": "6.0.0-rc.1",
3
+ "version": "6.0.0",
4
4
  "description": "Email compiling module",
5
5
  "keywords": [
6
6
  "email",
@@ -26,20 +26,20 @@
26
26
  "directory": "module/email-compiler"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^6.0.0-rc.1",
30
- "@travetto/di": "^6.0.0-rc.1",
31
- "@travetto/email": "^6.0.0-rc.1",
32
- "@travetto/image": "^6.0.0-rc.1",
33
- "@travetto/runtime": "^6.0.0-rc.1",
34
- "@travetto/worker": "^6.0.0-rc.1",
29
+ "@travetto/config": "^6.0.0",
30
+ "@travetto/di": "^6.0.0",
31
+ "@travetto/email": "^6.0.0",
32
+ "@travetto/image": "^6.0.0",
33
+ "@travetto/runtime": "^6.0.0",
34
+ "@travetto/worker": "^6.0.0",
35
35
  "@types/inline-css": "^3.0.3",
36
- "html-entities": "^2.5.2",
36
+ "html-entities": "^2.6.0",
37
37
  "inline-css": "^4.0.3",
38
38
  "purgecss": "^7.0.2",
39
- "sass": "^1.83.4"
39
+ "sass": "^1.87.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@travetto/cli": "^6.0.0-rc.1"
42
+ "@travetto/cli": "^6.0.0"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@travetto/cli": {
package/src/compiler.ts CHANGED
@@ -4,7 +4,7 @@ import path from 'node:path';
4
4
  import { TypedObject, RuntimeIndex, watchCompiler, Runtime, BinaryUtil } from '@travetto/runtime';
5
5
  import { EmailCompiled, MailUtil, EmailTemplateImport, EmailTemplateModule } from '@travetto/email';
6
6
 
7
- import { EmailCompileUtil } from './util';
7
+ import { EmailCompileUtil } from './util.ts';
8
8
 
9
9
  /**
10
10
  * Email compilation support
@@ -3,7 +3,7 @@ import { parse, stringify } from 'yaml';
3
3
 
4
4
  import { Runtime, BinaryUtil } from '@travetto/runtime';
5
5
 
6
- import { EditorConfigType } from './types';
6
+ import { EditorConfigType } from './types.ts';
7
7
 
8
8
  export const CONFIG_FILE = 'resources/email/local.yml';
9
9
 
@@ -2,11 +2,11 @@ import { Inject, Injectable } from '@travetto/di';
2
2
  import { MailUtil, EmailCompiled, MailInterpolator } from '@travetto/email';
3
3
  import { AppError, TypedObject } from '@travetto/runtime';
4
4
 
5
- import { EditorSendService } from './send';
6
- import { EditorConfig } from './config';
7
- import { EditorRequest, EditorResponse } from './types';
5
+ import { EditorSendService } from './send.ts';
6
+ import { EditorConfig } from './config.ts';
7
+ import { EditorRequest, EditorResponse } from './types.ts';
8
8
 
9
- import { EmailCompiler } from '../../src/compiler';
9
+ import { EmailCompiler } from '../../src/compiler.ts';
10
10
 
11
11
  /**
12
12
  * Utils for interacting with editors
@@ -1,8 +1,8 @@
1
- import { MailService, EmailOptions } from '@travetto/email';
2
- import { MailTransportTarget } from '@travetto/email/src/internal/types';
1
+ import { MailService, EmailOptions, MailTransport } from '@travetto/email';
3
2
  import { DependencyRegistry, Injectable } from '@travetto/di';
3
+ import { toConcrete } from '@travetto/runtime';
4
4
 
5
- import { EditorConfig } from './config';
5
+ import { EditorConfig } from './config.ts';
6
6
 
7
7
  /**
8
8
  * Editor mail sender
@@ -13,6 +13,8 @@ export class EditorSendService {
13
13
  ethereal = false;
14
14
 
15
15
  async service(): Promise<MailService> {
16
+ const MailTransportTarget = toConcrete<MailTransport>();
17
+
16
18
  const transports = DependencyRegistry.getCandidateTypes(MailTransportTarget);
17
19
 
18
20
  if (!transports.length) {
@@ -2,7 +2,7 @@ import { RootRegistry } from '@travetto/registry';
2
2
  import { CliCommandShape, CliCommand, cliTpl } from '@travetto/cli';
3
3
  import { Env, Runtime } from '@travetto/runtime';
4
4
 
5
- import { EmailCompiler } from '../src/compiler';
5
+ import { EmailCompiler } from '../src/compiler.ts';
6
6
 
7
7
  /**
8
8
  * CLI Entry point for running the email server
@@ -3,7 +3,7 @@ import { CliCommand, CliUtil } from '@travetto/cli';
3
3
  import { RootRegistry } from '@travetto/registry';
4
4
  import { DependencyRegistry } from '@travetto/di';
5
5
 
6
- import { EditorService } from './bin/editor';
6
+ import { EditorService } from './bin/editor.ts';
7
7
 
8
8
  /** The email editor compilation service and output serving */
9
9
  @CliCommand({ with: { env: true } })
@@ -5,7 +5,7 @@ import { CliCommandShape, CliCommand } from '@travetto/cli';
5
5
  import { DependencyRegistry } from '@travetto/di';
6
6
  import { Env } from '@travetto/runtime';
7
7
 
8
- import { EditorService } from './bin/editor';
8
+ import { EditorService } from './bin/editor.ts';
9
9
 
10
10
  /**
11
11
  * CLI Entry point for running the email server