ecto 5.1.0 → 5.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.
- package/dist/ecto.d.mts +12 -12
- package/dist/ecto.mjs +1 -3
- package/package.json +11 -11
package/dist/ecto.d.mts
CHANGED
|
@@ -33,14 +33,14 @@ declare class BaseEngine {
|
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/engines/ejs.d.ts
|
|
36
|
-
declare class EJS extends BaseEngine implements EngineInterface {
|
|
36
|
+
export declare class EJS extends BaseEngine implements EngineInterface {
|
|
37
37
|
constructor(options?: Record<string, unknown>);
|
|
38
38
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
39
39
|
renderSync(source: string, data?: Record<string, unknown>): string;
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/engines/handlebars.d.ts
|
|
43
|
-
declare class Handlebars extends BaseEngine implements EngineInterface {
|
|
43
|
+
export declare class Handlebars extends BaseEngine implements EngineInterface {
|
|
44
44
|
partialsPath: string[];
|
|
45
45
|
constructor(options?: Record<string, unknown>);
|
|
46
46
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
@@ -50,35 +50,35 @@ declare class Handlebars extends BaseEngine implements EngineInterface {
|
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/engines/liquid.d.ts
|
|
53
|
-
declare class Liquid extends BaseEngine implements EngineInterface {
|
|
53
|
+
export declare class Liquid extends BaseEngine implements EngineInterface {
|
|
54
54
|
constructor(options?: Record<string, unknown>);
|
|
55
55
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
56
56
|
renderSync(source: string, data?: Record<string, unknown>): string;
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/engines/markdown.d.ts
|
|
60
|
-
declare class Markdown extends BaseEngine implements EngineInterface {
|
|
60
|
+
export declare class Markdown extends BaseEngine implements EngineInterface {
|
|
61
61
|
constructor(options?: Record<string, unknown>);
|
|
62
62
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
63
63
|
renderSync(source: string, data?: Record<string, unknown>): string;
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/engines/nunjucks.d.ts
|
|
67
|
-
declare class Nunjucks extends BaseEngine implements EngineInterface {
|
|
67
|
+
export declare class Nunjucks extends BaseEngine implements EngineInterface {
|
|
68
68
|
constructor(options?: Record<string, unknown>);
|
|
69
69
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
70
70
|
renderSync(source: string, data?: Record<string, unknown>): string;
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/engines/pug.d.ts
|
|
74
|
-
declare class Pug extends BaseEngine implements EngineInterface {
|
|
74
|
+
export declare class Pug extends BaseEngine implements EngineInterface {
|
|
75
75
|
constructor(options?: Record<string, unknown>);
|
|
76
76
|
render(source: string, data?: Record<string, unknown>): Promise<string>;
|
|
77
77
|
renderSync(source: string, data?: Record<string, unknown>): string;
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
//#region src/ecto.d.ts
|
|
81
|
-
type EctoOptions = {
|
|
81
|
+
export type EctoOptions = {
|
|
82
82
|
/**
|
|
83
83
|
* The default engine to use. This can be 'ejs', 'markdown', 'pug', 'nunjucks', 'handlebars', 'liquid'
|
|
84
84
|
* @default 'ejs'
|
|
@@ -118,7 +118,7 @@ type EctoOptions = {
|
|
|
118
118
|
/**
|
|
119
119
|
* Context passed to beforeRender and beforeRenderSync hooks
|
|
120
120
|
*/
|
|
121
|
-
type RenderContext = {
|
|
121
|
+
export type RenderContext = {
|
|
122
122
|
source: string;
|
|
123
123
|
data?: Record<string, unknown>;
|
|
124
124
|
engineName: string;
|
|
@@ -129,11 +129,11 @@ type RenderContext = {
|
|
|
129
129
|
/**
|
|
130
130
|
* Result passed to afterRender and afterRenderSync hooks
|
|
131
131
|
*/
|
|
132
|
-
type RenderResult = {
|
|
132
|
+
export type RenderResult = {
|
|
133
133
|
result: string;
|
|
134
134
|
context: RenderContext;
|
|
135
135
|
};
|
|
136
|
-
declare enum EctoEvents {
|
|
136
|
+
export declare enum EctoEvents {
|
|
137
137
|
cacheHit = "cacheHit",
|
|
138
138
|
cacheMiss = "cacheMiss",
|
|
139
139
|
warn = "warn",
|
|
@@ -143,7 +143,7 @@ declare enum EctoEvents {
|
|
|
143
143
|
beforeRenderSync = "beforeRenderSync",
|
|
144
144
|
afterRenderSync = "afterRenderSync"
|
|
145
145
|
}
|
|
146
|
-
declare class Ecto extends Hookified {
|
|
146
|
+
export declare class Ecto extends Hookified {
|
|
147
147
|
private readonly _mapping;
|
|
148
148
|
private readonly _engines;
|
|
149
149
|
private _cache;
|
|
@@ -399,4 +399,4 @@ declare class Ecto extends Hookified {
|
|
|
399
399
|
private writeFileSync;
|
|
400
400
|
}
|
|
401
401
|
//#endregion
|
|
402
|
-
export {
|
|
402
|
+
export type { BaseEngine, EngineInterface };
|
package/dist/ecto.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ecto",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Modern Template Consolidation Engine for EJS, Markdown, Pug, Nunjucks, Liquid, and Handlebars",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/ecto.mjs",
|
|
@@ -42,30 +42,30 @@
|
|
|
42
42
|
"liquidjs"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@jaredwray/fumanchu": "^4.7.
|
|
45
|
+
"@jaredwray/fumanchu": "^4.7.3",
|
|
46
46
|
"cacheable": "^2.5.0",
|
|
47
47
|
"ejs": "^6.0.1",
|
|
48
|
-
"hookified": "^3.0.
|
|
48
|
+
"hookified": "^3.0.3",
|
|
49
49
|
"liquidjs": "^10.29.0",
|
|
50
50
|
"nunjucks": "^3.2.4",
|
|
51
51
|
"pug": "^3.0.4",
|
|
52
|
-
"writr": "^6.1.
|
|
52
|
+
"writr": "^6.1.6"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@biomejs/biome": "^2.5.
|
|
55
|
+
"@biomejs/biome": "^2.5.14",
|
|
56
56
|
"@faker-js/faker": "^10.6.0",
|
|
57
57
|
"@types/ejs": "^3.1.5",
|
|
58
|
-
"@types/node": "^24.13.
|
|
58
|
+
"@types/node": "^24.13.6",
|
|
59
59
|
"@types/nunjucks": "^3.2.6",
|
|
60
60
|
"@types/pug": "^2.0.10",
|
|
61
|
-
"@vitest/coverage-v8": "^
|
|
61
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
62
62
|
"docula": "^3.0.0",
|
|
63
63
|
"rimraf": "^6.1.3",
|
|
64
|
-
"tsdown": "^0.
|
|
64
|
+
"tsdown": "^0.23.0",
|
|
65
65
|
"typescript": "^7.0.2",
|
|
66
|
-
"vite": "^8.
|
|
67
|
-
"vitest": "^
|
|
68
|
-
"wrangler": "^4.
|
|
66
|
+
"vite": "^8.3.0",
|
|
67
|
+
"vitest": "^5.0.1",
|
|
68
|
+
"wrangler": "^4.135.0"
|
|
69
69
|
},
|
|
70
70
|
"files": [
|
|
71
71
|
"dist",
|