@h3ravel/view 0.1.9 → 0.1.11
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 +13 -11
- package/dist/index.d.mts +0 -102
- /package/dist/{index.d.cts → index.d.ts} +0 -0
- /package/dist/{index.mjs → index.js} +0 -0
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/view",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "View rendering system for H3ravel framework",
|
|
5
5
|
"h3ravel": {
|
|
6
6
|
"providers": [
|
|
7
7
|
"ViewServiceProvider"
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
12
13
|
"types": "./dist/index.d.ts",
|
|
13
14
|
"publishConfig": {
|
|
14
15
|
"access": "public"
|
|
@@ -18,10 +19,10 @@
|
|
|
18
19
|
],
|
|
19
20
|
"exports": {
|
|
20
21
|
".": {
|
|
21
|
-
"import": "./dist/index.
|
|
22
|
-
"require": "./dist/index.
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./*": "./*"
|
|
25
26
|
},
|
|
26
27
|
"keywords": [
|
|
27
28
|
"h3ravel",
|
|
@@ -42,21 +43,22 @@
|
|
|
42
43
|
},
|
|
43
44
|
"homepage": "https://h3ravel.toneflix.net",
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@h3ravel/musket": "^0.3.
|
|
46
|
+
"@h3ravel/musket": "^0.3.9",
|
|
46
47
|
"edge.js": "^6.3.0",
|
|
47
|
-
"@h3ravel/http": "11.
|
|
48
|
-
"@h3ravel/core": "1.
|
|
48
|
+
"@h3ravel/http": "11.6.1",
|
|
49
|
+
"@h3ravel/core": "1.20.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"typescript": "^5.0.0",
|
|
52
53
|
"vitest": "^2.0.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
|
-
"@h3ravel/shared": "0.27.
|
|
56
|
+
"@h3ravel/shared": "0.27.5"
|
|
56
57
|
},
|
|
57
58
|
"scripts": {
|
|
58
59
|
"dev": "tsx watch src/index.ts",
|
|
59
60
|
"typecheck": "tsc --noEmit",
|
|
61
|
+
"barrel": "barrelsby --directory src --delete --singleQuotes",
|
|
60
62
|
"build": "tsdown --config-loader unconfig",
|
|
61
63
|
"start": "node dist/index.js",
|
|
62
64
|
"lint": "eslint . --ext .ts",
|
package/dist/index.d.mts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/// <reference path="./app.globals.d.ts" />
|
|
2
|
-
import { Command } from "@h3ravel/musket";
|
|
3
|
-
import { Edge } from "edge.js";
|
|
4
|
-
import { ServiceProvider } from "@h3ravel/core";
|
|
5
|
-
|
|
6
|
-
//#region src/Commands/MakeViewCommand.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Command to create new view files
|
|
9
|
-
*/
|
|
10
|
-
declare class MakeViewCommand extends Command {
|
|
11
|
-
/**
|
|
12
|
-
* Create a new view file
|
|
13
|
-
*
|
|
14
|
-
* @param name - View name (can include directories like 'auth/login')
|
|
15
|
-
* @param options - Command options
|
|
16
|
-
*/
|
|
17
|
-
static make(name: string, options?: {
|
|
18
|
-
force?: boolean;
|
|
19
|
-
basePath?: string;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/Contracts/ViewContract.d.ts
|
|
24
|
-
/**
|
|
25
|
-
* Contract for view rendering engines
|
|
26
|
-
*/
|
|
27
|
-
interface ViewContract {
|
|
28
|
-
/**
|
|
29
|
-
* Render a template with the given data
|
|
30
|
-
*
|
|
31
|
-
* @param template - Template name/path
|
|
32
|
-
* @param data - Data to pass to the template
|
|
33
|
-
* @returns Promise resolving to rendered HTML string
|
|
34
|
-
*/
|
|
35
|
-
render(template: string, data?: Record<string, any>): Promise<string>;
|
|
36
|
-
/**
|
|
37
|
-
* Check if a template exists
|
|
38
|
-
*
|
|
39
|
-
* @param template - Template name/path
|
|
40
|
-
* @returns True if template exists
|
|
41
|
-
*/
|
|
42
|
-
exists(template: string): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Mount a directory for template lookup
|
|
45
|
-
*
|
|
46
|
-
* @param path - Path to mount
|
|
47
|
-
*/
|
|
48
|
-
mount(path: string): void;
|
|
49
|
-
/**
|
|
50
|
-
* Register a global variable/helper
|
|
51
|
-
*
|
|
52
|
-
* @param key - Global variable name
|
|
53
|
-
* @param value - Value or function
|
|
54
|
-
*/
|
|
55
|
-
global(key: string, value: any): void;
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/EdgeViewEngine.d.ts
|
|
59
|
-
/**
|
|
60
|
-
* Edge.js implementation of the ViewContract
|
|
61
|
-
*/
|
|
62
|
-
declare class EdgeViewEngine implements ViewContract {
|
|
63
|
-
private edge;
|
|
64
|
-
constructor(options?: {
|
|
65
|
-
viewsPath?: string;
|
|
66
|
-
cache?: boolean;
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* Render a template with the given data
|
|
70
|
-
*/
|
|
71
|
-
render(template: string, data?: Record<string, any>): Promise<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Check if a template exists
|
|
74
|
-
*/
|
|
75
|
-
exists(_template: string): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Mount a directory for template lookup
|
|
78
|
-
*/
|
|
79
|
-
mount(path: string): void;
|
|
80
|
-
/**
|
|
81
|
-
* Register a global variable/helper
|
|
82
|
-
*/
|
|
83
|
-
global(key: string, value: any): void;
|
|
84
|
-
/**
|
|
85
|
-
* Get the underlying Edge instance
|
|
86
|
-
*/
|
|
87
|
-
getEdge(): Edge;
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/Providers/ViewServiceProvider.d.ts
|
|
91
|
-
/**
|
|
92
|
-
* View Service Provider
|
|
93
|
-
*
|
|
94
|
-
* Registers the view engine with the application container
|
|
95
|
-
*/
|
|
96
|
-
declare class ViewServiceProvider extends ServiceProvider {
|
|
97
|
-
static priority: number;
|
|
98
|
-
register(): Promise<void>;
|
|
99
|
-
boot(): Promise<void>;
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { EdgeViewEngine, EdgeViewEngine as ViewManager, MakeViewCommand, type ViewContract, ViewServiceProvider };
|
|
File without changes
|
|
File without changes
|