@h3ravel/view 0.1.10 → 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 CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@h3ravel/view",
3
- "version": "0.1.10",
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
- "main": "./dist/index.mjs",
11
- "module": "./dist/index.mjs",
12
- "types": "./dist/index.d.mts",
10
+ "type": "module",
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
13
14
  "publishConfig": {
14
15
  "access": "public"
15
16
  },
@@ -18,10 +19,10 @@
18
19
  ],
19
20
  "exports": {
20
21
  ".": {
21
- "import": "./dist/index.mjs",
22
- "require": "./dist/index.cjs",
23
- "types": "./dist/index.d.mts"
24
- }
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ },
25
+ "./*": "./*"
25
26
  },
26
27
  "keywords": [
27
28
  "h3ravel",
@@ -42,23 +43,24 @@
42
43
  },
43
44
  "homepage": "https://h3ravel.toneflix.net",
44
45
  "dependencies": {
45
- "@h3ravel/musket": "^0.3.4",
46
+ "@h3ravel/musket": "^0.3.9",
46
47
  "edge.js": "^6.3.0",
47
- "@h3ravel/core": "1.21.3",
48
- "@h3ravel/http": "11.7.3"
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.3"
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
- "start": "node dist/index.mjs",
63
+ "start": "node dist/index.js",
62
64
  "lint": "eslint . --ext .ts",
63
65
  "test": "jest --passWithNoTests",
64
66
  "version-patch": "pnpm version patch"
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