@appweaver/handlebars 2.0.2 → 2.1.1
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.
|
@@ -10,6 +10,7 @@ const handlebars_1 = __importDefault(require("handlebars"));
|
|
|
10
10
|
const common_1 = require("@appweaver/common");
|
|
11
11
|
const core_1 = require("@appweaver/core");
|
|
12
12
|
const handlebars_helpers_1 = require("./handlebars-helpers");
|
|
13
|
+
const logger = (0, common_1.createLogger)('template');
|
|
13
14
|
const TEMPLATE_EXTENSIONS = ['.hbs', '.handlebars'];
|
|
14
15
|
class HandlebarsTemplateEngine extends common_1.TemplateEngine {
|
|
15
16
|
/** @internal */
|
|
@@ -101,6 +102,7 @@ class HandlebarsTemplateEngine extends common_1.TemplateEngine {
|
|
|
101
102
|
}
|
|
102
103
|
this._files = files;
|
|
103
104
|
this.clearPartials();
|
|
105
|
+
logger.debug({ templates: files.size }, 'Templates loaded');
|
|
104
106
|
}
|
|
105
107
|
/** @internal */
|
|
106
108
|
findTemplate(name, locales) {
|
|
@@ -228,7 +230,7 @@ async function readTemplateFiles(dir, files) {
|
|
|
228
230
|
fileNames = await promises_1.default.readdir(dir, { recursive: true });
|
|
229
231
|
}
|
|
230
232
|
catch {
|
|
231
|
-
|
|
233
|
+
logger.debug({ dir }, 'Template directory not found');
|
|
232
234
|
fileNames = [];
|
|
233
235
|
}
|
|
234
236
|
for (const fileName of fileNames) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appweaver/handlebars",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Appweaver - the backend framework for AI-first development (@handlebars)",
|
|
5
5
|
"author": "Luka Matosevic",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"handlebars": "4.7.10"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@appweaver/common": "^2.
|
|
46
|
-
"@appweaver/core": "^2.
|
|
45
|
+
"@appweaver/common": "^2.1.1",
|
|
46
|
+
"@appweaver/core": "^2.1.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@appweaver/common": "^1.12.2",
|