@travetto/email-compiler 5.0.0-rc.1 → 5.0.0-rc.2
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-compiler",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.2",
|
|
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/
|
|
30
|
-
"@travetto/config": "^5.0.0-rc.
|
|
31
|
-
"@travetto/di": "^5.0.0-rc.
|
|
32
|
-
"@travetto/email": "^5.0.0-rc.
|
|
33
|
-
"@travetto/image": "^5.0.0-rc.
|
|
34
|
-
"@travetto/worker": "^5.0.0-rc.
|
|
29
|
+
"@travetto/runtime": "^5.0.0-rc.2",
|
|
30
|
+
"@travetto/config": "^5.0.0-rc.2",
|
|
31
|
+
"@travetto/di": "^5.0.0-rc.2",
|
|
32
|
+
"@travetto/email": "^5.0.0-rc.2",
|
|
33
|
+
"@travetto/image": "^5.0.0-rc.2",
|
|
34
|
+
"@travetto/worker": "^5.0.0-rc.2",
|
|
35
35
|
"@types/inline-css": "^3.0.3",
|
|
36
36
|
"html-entities": "^2.5.2",
|
|
37
37
|
"inline-css": "^4.0.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sass": "^1.77.6"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@travetto/cli": "^5.0.0-rc.
|
|
42
|
+
"@travetto/cli": "^5.0.0-rc.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@travetto/cli": {
|
package/src/compiler.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
|
-
import { TypedObject, Util, watchCompiler } from '@travetto/
|
|
4
|
+
import { TypedObject, Util, RuntimeIndex, watchCompiler } from '@travetto/runtime';
|
|
5
5
|
import { EmailCompiled, MailUtil, EmailTemplateImport, EmailTemplateModule } from '@travetto/email';
|
|
6
|
-
import { RuntimeIndex } from '@travetto/manifest';
|
|
7
6
|
|
|
8
7
|
import { EmailCompileUtil } from './util';
|
|
9
8
|
|
package/support/bin/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
|
|
3
|
-
import { Util,
|
|
3
|
+
import { Util, Runtime } from '@travetto/runtime';
|
|
4
4
|
import { parse, stringify } from 'yaml';
|
|
5
5
|
|
|
6
6
|
import { EditorConfigType } from './types';
|
|
@@ -35,7 +35,7 @@ export class EditorConfig {
|
|
|
35
35
|
static async get(): Promise<EditorConfigType>;
|
|
36
36
|
static async get<K extends keyof EditorConfigType>(key?: K): Promise<EditorConfigType | EditorConfigType[K]> {
|
|
37
37
|
try {
|
|
38
|
-
const resolved =
|
|
38
|
+
const resolved = Runtime.workspaceRelative(CONFIG_FILE);
|
|
39
39
|
const content = await fs.readFile(resolved, 'utf8');
|
|
40
40
|
const data: EditorConfigType = parse(content) ?? {};
|
|
41
41
|
return key ? data[key] : data;
|
|
@@ -50,7 +50,7 @@ export class EditorConfig {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
static async ensureConfig(): Promise<string> {
|
|
53
|
-
const resolved =
|
|
53
|
+
const resolved = Runtime.workspaceRelative(CONFIG_FILE);
|
|
54
54
|
if (!(await fs.stat(resolved).catch(() => { }))) {
|
|
55
55
|
await Util.bufferedFileWrite(resolved, this.getDefaultConfig());
|
|
56
56
|
}
|
package/support/bin/editor.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Inject, Injectable } from '@travetto/di';
|
|
2
2
|
import { MailUtil, EmailCompiled, MailInterpolator } from '@travetto/email';
|
|
3
|
-
import { AppError, TypedObject } from '@travetto/
|
|
3
|
+
import { AppError, TypedObject } from '@travetto/runtime';
|
|
4
4
|
|
|
5
5
|
import { EditorSendService } from './send';
|
|
6
6
|
import { EditorConfig } from './config';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootRegistry } from '@travetto/registry';
|
|
2
2
|
import { CliCommandShape, CliCommand, cliTpl } from '@travetto/cli';
|
|
3
|
-
import { Env,
|
|
3
|
+
import { Env, Runtime } from '@travetto/runtime';
|
|
4
4
|
|
|
5
5
|
import { EmailCompiler } from '../src/compiler';
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ export class EmailCompileCommand implements CliCommandShape {
|
|
|
26
26
|
const all = await EmailCompiler.compileAll();
|
|
27
27
|
console!.log(cliTpl`Successfully compiled ${{ param: `${all.length}` }} templates`);
|
|
28
28
|
for (const el of all) {
|
|
29
|
-
console!.log(cliTpl` * ${{ param:
|
|
29
|
+
console!.log(cliTpl` * ${{ param: Runtime.stripWorkspacePath(el) }}`);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
if (this.watch) {
|
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { RootRegistry } from '@travetto/registry';
|
|
4
4
|
import { CliCommandShape, CliCommand } from '@travetto/cli';
|
|
5
5
|
import { DependencyRegistry } from '@travetto/di';
|
|
6
|
-
import { Env } from '@travetto/
|
|
6
|
+
import { Env } from '@travetto/runtime';
|
|
7
7
|
|
|
8
8
|
import { EditorService } from './bin/editor';
|
|
9
9
|
|