elit 3.1.5 → 3.1.7
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/build.d.mts +3 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +10 -4
- package/dist/build.mjs +10 -4
- package/dist/cli.js +396 -224
- package/dist/database.d.mts +31 -0
- package/dist/database.d.ts +30 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +1197 -0
- package/dist/database.mjs +1170 -0
- package/dist/hmr.d.ts.map +1 -1
- package/dist/hmr.js +4 -5
- package/dist/hmr.mjs +4 -5
- package/dist/index.js +4 -5
- package/dist/index.mjs +4 -5
- package/dist/{server-jAa9yJM4.d.mts → server-CRNme9Bc.d.mts} +21 -1
- package/dist/{server-9dH1l8MG.d.ts → server-R_AfcxRw.d.ts} +21 -1
- package/dist/server.d.mts +3 -1
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +367 -209
- package/dist/server.mjs +365 -209
- package/dist/types.d.mts +23 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/build.ts +12 -3
- package/src/cli.ts +18 -4
- package/src/database.ts +177 -0
- package/src/hmr.ts +7 -6
- package/src/server.ts +65 -25
- package/src/types.ts +16 -0
package/src/types.ts
CHANGED
|
@@ -72,6 +72,7 @@ export type ElementFactory = {
|
|
|
72
72
|
|
|
73
73
|
import type { Server } from 'http';
|
|
74
74
|
import type { WebSocketServer } from 'ws';
|
|
75
|
+
import { DatabaseConfig } from './database';
|
|
75
76
|
|
|
76
77
|
// Forward declarations to avoid circular dependency
|
|
77
78
|
export type Router = import('./server').ServerRouter;
|
|
@@ -129,6 +130,8 @@ export interface DevServerOptions {
|
|
|
129
130
|
port?: number;
|
|
130
131
|
/** Host to bind to (default: 'localhost') */
|
|
131
132
|
host?: string;
|
|
133
|
+
/** Domain to map (e.g., 'idevcoder.com') - redirects domain traffic to this server's port */
|
|
134
|
+
domain?: string;
|
|
132
135
|
/** Root directory to serve files from */
|
|
133
136
|
root?: string;
|
|
134
137
|
/** Base path for the client application (e.g., '/app1', '/app2') */
|
|
@@ -157,6 +160,10 @@ export interface DevServerOptions {
|
|
|
157
160
|
proxy?: ProxyConfig[];
|
|
158
161
|
/** Server mode: 'dev' uses source files, 'preview' uses built files (default: 'dev') */
|
|
159
162
|
mode?: 'dev' | 'preview';
|
|
163
|
+
/** Environment variables to inject (prefix with VITE_ for client access) */
|
|
164
|
+
env?: Record<string, string>;
|
|
165
|
+
/** List of database directories to load */
|
|
166
|
+
database?: DatabaseConfig;
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
export interface DevServer {
|
|
@@ -204,6 +211,11 @@ export interface BuildOptions {
|
|
|
204
211
|
basePath?: string;
|
|
205
212
|
/** External dependencies (not bundled) */
|
|
206
213
|
external?: string[];
|
|
214
|
+
/** Module resolution options */
|
|
215
|
+
resolve?: {
|
|
216
|
+
/** Alias imports to other paths or modules */
|
|
217
|
+
alias?: Record<string, string>;
|
|
218
|
+
};
|
|
207
219
|
/** Enable tree shaking */
|
|
208
220
|
treeshake?: boolean;
|
|
209
221
|
/** Enable logging */
|
|
@@ -232,6 +244,8 @@ export interface PreviewOptions {
|
|
|
232
244
|
port?: number;
|
|
233
245
|
/** Host to bind to (default: 'localhost') */
|
|
234
246
|
host?: string;
|
|
247
|
+
/** Domain to map (e.g., 'idevcoder.com') - redirects domain traffic to this server's port */
|
|
248
|
+
domain?: string;
|
|
235
249
|
/** Root directory to serve files from (default: dist or build.outDir) */
|
|
236
250
|
root?: string;
|
|
237
251
|
/** Base path for the application (e.g., '/app') */
|
|
@@ -254,4 +268,6 @@ export interface PreviewOptions {
|
|
|
254
268
|
proxy?: ProxyConfig[];
|
|
255
269
|
/** Global worker scripts (applies to all clients) */
|
|
256
270
|
worker?: WorkerConfig[];
|
|
271
|
+
/** Environment variables to inject (prefix with VITE_ for client access) */
|
|
272
|
+
env?: Record<string, string>;
|
|
257
273
|
}
|