@travetto/email-compiler 3.4.0-rc.5 → 3.4.0-rc.6
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 +8 -8
- package/src/compiler.ts +4 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/email-compiler",
|
|
3
|
-
"version": "3.4.0-rc.
|
|
3
|
+
"version": "3.4.0-rc.6",
|
|
4
4
|
"description": "Email compiling module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"directory": "module/email-compiler"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/base": "^3.4.0-rc.
|
|
30
|
-
"@travetto/config": "^3.4.0-rc.
|
|
31
|
-
"@travetto/di": "^3.4.0-rc.
|
|
32
|
-
"@travetto/email": "^3.4.0-rc.
|
|
33
|
-
"@travetto/image": "^3.4.0-rc.
|
|
34
|
-
"@travetto/worker": "^3.4.0-rc.
|
|
29
|
+
"@travetto/base": "^3.4.0-rc.6",
|
|
30
|
+
"@travetto/config": "^3.4.0-rc.6",
|
|
31
|
+
"@travetto/di": "^3.4.0-rc.6",
|
|
32
|
+
"@travetto/email": "^3.4.0-rc.6",
|
|
33
|
+
"@travetto/image": "^3.4.0-rc.6",
|
|
34
|
+
"@travetto/worker": "^3.4.0-rc.6",
|
|
35
35
|
"@types/inline-css": "^3.0.2",
|
|
36
36
|
"html-entities": "^2.4.0",
|
|
37
37
|
"inline-css": "^4.0.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sass": "^1.69.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@travetto/cli": "^3.4.0-rc.
|
|
42
|
+
"@travetto/cli": "^3.4.0-rc.7"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@travetto/cli": {
|
package/src/compiler.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
|
|
3
|
-
import { CompilerClient,
|
|
3
|
+
import { CompilerClient, FileResourceProvider, TypedObject } from '@travetto/base';
|
|
4
4
|
import { EmailCompileSource, EmailCompiled, EmailCompileContext, MailUtil } from '@travetto/email';
|
|
5
5
|
import { RootIndex, path } from '@travetto/manifest';
|
|
6
6
|
import { ManualAsyncIterator as Queue } from '@travetto/worker';
|
|
@@ -118,18 +118,15 @@ export class EmailCompiler {
|
|
|
118
118
|
* Watch compilation
|
|
119
119
|
*/
|
|
120
120
|
static async * watchCompile(): AsyncIterable<string> {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
[...new Set(this.findAllTemplates()
|
|
124
|
-
.map(x => RootIndex.getEntry(x)!.module)
|
|
125
|
-
)].map(x => path.resolve(RootIndex.getModule(x)!.sourcePath, 'resources'))
|
|
121
|
+
const all = FileResourceProvider.resolveSearchPaths(
|
|
122
|
+
this.findAllTemplates().map(x => `${RootIndex.getEntry(x)!.module}#resources`)
|
|
126
123
|
);
|
|
127
124
|
|
|
128
125
|
const ctrl = new AbortController();
|
|
129
126
|
const stream = new Queue<WatchEvent>([], ctrl.signal);
|
|
130
127
|
|
|
131
128
|
// watch resources
|
|
132
|
-
this.#watchFolders(all
|
|
129
|
+
this.#watchFolders(all, ev => stream.add(ev), ctrl.signal);
|
|
133
130
|
|
|
134
131
|
// Watch template files
|
|
135
132
|
new CompilerClient().onFileChange(ev => {
|