hightjs 0.3.4 → 0.3.5

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/src/router.ts CHANGED
@@ -671,6 +671,7 @@ export function setupWebSocketUpgrade(server: any, hotReloadManager?: any) {
671
671
  // Se não há listeners, ou se o hot-reload ainda não foi configurado, adiciona o nosso
672
672
  if (existingListeners.length === 0) {
673
673
  server.on('upgrade', (request: any, socket: any, head: Buffer) => {
674
+
674
675
  handleWebSocketUpgrade(request, socket, head, hotReloadManager);
675
676
  });
676
677
  }
@@ -689,6 +690,7 @@ function handleWebSocketUpgrade(request: any, socket: any, head: Buffer, hotRelo
689
690
 
690
691
  // Prioridade 1: Hot reload (sistema interno)
691
692
  if (pathname === '/hweb-hotreload/') {
693
+
692
694
  if (hotReloadManager) {
693
695
  hotReloadManager.handleUpgrade(request, socket, head);
694
696
  } else {
package/src/types.ts CHANGED
@@ -90,6 +90,12 @@ export interface HightConfig {
90
90
  * Padrão: 2048
91
91
  */
92
92
  maxUrlLength?: number;
93
+
94
+ /**
95
+ * Habilita o log de acesso HTTP (ex: GET /api/users 200 15ms).
96
+ * Padrão: false
97
+ */
98
+ accessLogging?: boolean;
93
99
  }
94
100
 
95
101
  /**
@@ -99,11 +105,61 @@ export type HightConfigFunction = (
99
105
  phase: string,
100
106
  context: { defaultConfig: HightConfig }
101
107
  ) => HightConfig | Promise<HightConfig>;
108
+
102
109
  export interface Metadata {
110
+ // Basic metadata
103
111
  title?: string;
104
112
  description?: string;
113
+ keywords?: string | string[];
114
+ author?: string;
105
115
  favicon?: string;
116
+
117
+ // Viewport and mobile
118
+ viewport?: string;
119
+ themeColor?: string;
120
+
121
+ // SEO
122
+ canonical?: string;
123
+ robots?: string;
124
+
125
+ // Open Graph (Facebook, LinkedIn, etc.)
126
+ openGraph?: {
127
+ title?: string;
128
+ description?: string;
129
+ type?: string;
130
+ url?: string;
131
+ image?: string | {
132
+ url: string;
133
+ width?: number;
134
+ height?: number;
135
+ alt?: string;
136
+ };
137
+ siteName?: string;
138
+ locale?: string;
139
+ };
140
+
141
+ // Twitter Card
142
+ twitter?: {
143
+ card?: 'summary' | 'summary_large_image' | 'app' | 'player';
144
+ site?: string;
145
+ creator?: string;
146
+ title?: string;
147
+ description?: string;
148
+ image?: string;
149
+ imageAlt?: string;
150
+ };
151
+
152
+ // Additional metadata
153
+ language?: string;
154
+ charset?: string;
155
+ appleTouchIcon?: string;
156
+ manifest?: string;
157
+
158
+ // Custom meta tags
159
+ other?: Record<string, string>;
106
160
  }
161
+
162
+
107
163
  export interface RouteConfig {
108
164
  pattern: string;
109
165
  component: ComponentType<any>;