@futdevpro/nts-dynamo 1.2.97 → 1.2.98
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.
|
@@ -27,7 +27,7 @@ class DynamoBEEmailService {
|
|
|
27
27
|
/* this.constructionFinishedCallback = set.constructionFinishedCallback; */
|
|
28
28
|
if (set.templatePaths) {
|
|
29
29
|
for (let key in set.templatePaths) {
|
|
30
|
-
this.loadTemplate(key, set.templatePaths[key]);
|
|
30
|
+
this.loadTemplate(key, set.rootPath, set.templatePaths[key]);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
@@ -87,12 +87,12 @@ class DynamoBEEmailService {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
loadTemplate(templateName, templatePath) {
|
|
90
|
+
loadTemplate(templateName, rootPath, templatePath) {
|
|
91
91
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
92
92
|
try {
|
|
93
93
|
this.templateLoadingInProgressCounter++;
|
|
94
94
|
return new Promise((resolve, reject) => {
|
|
95
|
-
templatePath = Path.join(
|
|
95
|
+
templatePath = Path.join(rootPath, templatePath);
|
|
96
96
|
FileSystem.readFile(templatePath, 'utf8', (err, template) => {
|
|
97
97
|
if (err) {
|
|
98
98
|
console.log(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
|
package/lib/tsconfig.tsbuildinfo
CHANGED
|
@@ -622,8 +622,8 @@
|
|
|
622
622
|
"affectsGlobalScope": false
|
|
623
623
|
},
|
|
624
624
|
"../src/_services/dynamobe-email.service.ts": {
|
|
625
|
-
"version": "
|
|
626
|
-
"signature": "
|
|
625
|
+
"version": "e6362a16a988f1447cb4f9703f8aae9a5d213e9eb654cf5ef9d86c47ed793b80",
|
|
626
|
+
"signature": "f36eaabc0c174cfe8f05ff13bd87b835ad3b682a8827abfbc271f4f297c5c81a",
|
|
627
627
|
"affectsGlobalScope": false
|
|
628
628
|
},
|
|
629
629
|
"../src/_services/dynamobe-email-service-collection.service.ts": {
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export class DynamoBEEmailService {
|
|
|
26
26
|
pass: string,
|
|
27
27
|
senderName: string,
|
|
28
28
|
/* constructionFinishedCallback: () => void, */
|
|
29
|
+
rootPath: string,
|
|
29
30
|
templatePaths: {
|
|
30
31
|
[templateName: string]: string
|
|
31
32
|
},
|
|
@@ -46,7 +47,7 @@ export class DynamoBEEmailService {
|
|
|
46
47
|
/* this.constructionFinishedCallback = set.constructionFinishedCallback; */
|
|
47
48
|
if (set.templatePaths) {
|
|
48
49
|
for(let key in set.templatePaths) {
|
|
49
|
-
this.loadTemplate(key, set.templatePaths[key]);
|
|
50
|
+
this.loadTemplate(key, set.rootPath, set.templatePaths[key]);
|
|
50
51
|
}
|
|
51
52
|
} else {
|
|
52
53
|
this.constructionFinished();
|
|
@@ -116,11 +117,11 @@ export class DynamoBEEmailService {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
private async loadTemplate(templateName: string, templatePath: string): Promise<void> {
|
|
120
|
+
private async loadTemplate(templateName: string, rootPath: string, templatePath: string): Promise<void> {
|
|
120
121
|
try {
|
|
121
122
|
this.templateLoadingInProgressCounter++;
|
|
122
123
|
return new Promise<void>((resolve, reject) => {
|
|
123
|
-
templatePath = Path.join(
|
|
124
|
+
templatePath = Path.join(rootPath, templatePath);
|
|
124
125
|
FileSystem.readFile(templatePath, 'utf8' , (err, template) => {
|
|
125
126
|
if (err) {
|
|
126
127
|
console.log(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
|