elit 3.6.5 → 3.6.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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/README.md +6 -0
- package/dist/build.cjs +421 -331
- package/dist/build.d.ts +1 -16
- package/dist/build.js +420 -330
- package/dist/build.mjs +420 -330
- package/dist/chokidar.cjs +219 -182
- package/dist/chokidar.d.ts +25 -10
- package/dist/chokidar.js +217 -182
- package/dist/chokidar.mjs +218 -183
- package/dist/cli.cjs +21608 -20241
- package/dist/cli.d.ts +19 -37
- package/dist/cli.mjs +21262 -19910
- package/dist/config.cjs +357 -350
- package/dist/config.d.ts +19 -240
- package/dist/config.js +520 -515
- package/dist/config.mjs +346 -341
- package/dist/contracts-BeW9k0yZ.d.ts +54 -0
- package/dist/contracts-D7KIS-TK.d.ts +36 -0
- package/dist/coverage.cjs +448 -485
- package/dist/coverage.d.ts +13 -59
- package/dist/coverage.js +447 -484
- package/dist/coverage.mjs +447 -484
- package/dist/database.cjs +819 -828
- package/dist/database.d.ts +8 -24
- package/dist/database.js +818 -829
- package/dist/database.mjs +818 -829
- package/dist/desktop-auto-render.cjs +1700 -1522
- package/dist/desktop-auto-render.d.ts +4 -9
- package/dist/desktop-auto-render.js +1695 -1517
- package/dist/desktop-auto-render.mjs +1696 -1518
- package/dist/desktop.cjs +3 -1
- package/dist/desktop.d.ts +4 -1
- package/dist/desktop.js +1 -1
- package/dist/desktop.mjs +1 -1
- package/dist/dev-build.cjs +830 -0
- package/dist/dev-build.d.ts +53 -0
- package/dist/dev-build.js +3318 -0
- package/dist/dev-build.mjs +797 -0
- package/dist/dom.cjs +717 -590
- package/dist/dom.d.ts +2 -15
- package/dist/dom.js +714 -587
- package/dist/dom.mjs +716 -589
- package/dist/el.cjs +62 -52
- package/dist/el.d.ts +5 -10
- package/dist/el.js +60 -52
- package/dist/el.mjs +60 -52
- package/dist/fs.cjs +72 -63
- package/dist/fs.d.ts +22 -19
- package/dist/fs.js +71 -62
- package/dist/fs.mjs +71 -62
- package/dist/hmr.cjs +40 -14
- package/dist/hmr.d.ts +11 -23
- package/dist/hmr.js +38 -14
- package/dist/hmr.mjs +38 -14
- package/dist/http.cjs +251 -99
- package/dist/http.d.ts +38 -104
- package/dist/http.js +249 -99
- package/dist/http.mjs +249 -99
- package/dist/https.cjs +524 -228
- package/dist/https.d.ts +44 -36
- package/dist/https.js +520 -226
- package/dist/https.mjs +522 -228
- package/dist/index.cjs +7502 -7690
- package/dist/index.d.ts +8 -3
- package/dist/index.js +7486 -7676
- package/dist/index.mjs +7497 -7686
- package/dist/mime-types.cjs +10 -4
- package/dist/mime-types.d.ts +8 -11
- package/dist/mime-types.js +9 -3
- package/dist/mime-types.mjs +9 -3
- package/dist/native.cjs +8616 -8869
- package/dist/native.d.ts +7 -8
- package/dist/native.js +8682 -8935
- package/dist/native.mjs +8615 -8868
- package/dist/path.cjs +83 -77
- package/dist/path.d.ts +29 -29
- package/dist/path.js +82 -76
- package/dist/path.mjs +82 -76
- package/dist/pm.cjs +3300 -0
- package/dist/pm.d.ts +256 -0
- package/dist/pm.js +5638 -0
- package/dist/pm.mjs +3196 -0
- package/dist/preview-build.cjs +712 -0
- package/dist/preview-build.d.ts +59 -0
- package/dist/preview-build.js +3194 -0
- package/dist/preview-build.mjs +676 -0
- package/dist/render-context.cjs +13 -2
- package/dist/render-context.d.ts +9 -31
- package/dist/render-context.js +11 -2
- package/dist/render-context.mjs +11 -2
- package/dist/router.cjs +787 -645
- package/dist/router.d.ts +8 -12
- package/dist/router.js +786 -644
- package/dist/router.mjs +786 -644
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/server.cjs +3315 -2603
- package/dist/server.d.ts +49 -4
- package/dist/server.js +7611 -2834
- package/dist/server.mjs +3317 -2607
- package/dist/smtp-server.cjs +128 -0
- package/dist/smtp-server.d.ts +27 -0
- package/dist/smtp-server.js +4199 -0
- package/dist/smtp-server.mjs +100 -0
- package/dist/state-DvEkDehk.d.ts +195 -0
- package/dist/state.cjs +768 -658
- package/dist/state.d.ts +11 -69
- package/dist/state.js +760 -650
- package/dist/state.mjs +767 -657
- package/dist/style.cjs +1011 -968
- package/dist/style.d.ts +13 -127
- package/dist/style.js +1009 -970
- package/dist/style.mjs +1011 -971
- package/dist/test-reporter.cjs +332 -316
- package/dist/test-reporter.d.ts +28 -33
- package/dist/test-reporter.js +328 -312
- package/dist/test-reporter.mjs +328 -312
- package/dist/test-runtime.cjs +927 -968
- package/dist/test-runtime.d.ts +24 -99
- package/dist/test-runtime.js +922 -965
- package/dist/test-runtime.mjs +922 -965
- package/dist/test.cjs +4428 -4273
- package/dist/test.d.ts +2 -8
- package/dist/test.js +4307 -4154
- package/dist/test.mjs +4419 -4267
- package/dist/types-BONVzPtp.d.ts +59 -0
- package/dist/types-BR4wMiVx.d.ts +32 -0
- package/dist/types-C4gKykuG.d.ts +23 -0
- package/dist/types-CIhpN1-K.d.ts +64 -0
- package/dist/types-Ckj8md_j.d.ts +84 -0
- package/dist/types-CpjQTAkX.d.ts +24 -0
- package/dist/types-D0LjrYjS.d.ts +14 -0
- package/dist/types-DAisuVr5.d.ts +75 -0
- package/dist/types-tJn88E1N.d.ts +242 -0
- package/dist/types.d.ts +71 -226
- package/dist/universal.cjs +1 -1
- package/dist/universal.d.ts +1 -5
- package/dist/universal.js +1 -1
- package/dist/universal.mjs +1 -1
- package/dist/websocket-XfyK23zD.d.ts +119 -0
- package/dist/ws.cjs +129 -108
- package/dist/ws.d.ts +21 -131
- package/dist/ws.js +128 -109
- package/dist/ws.mjs +128 -109
- package/dist/wss.cjs +757 -479
- package/dist/wss.d.ts +31 -28
- package/dist/wss.js +755 -479
- package/dist/wss.mjs +758 -482
- package/package.json +16 -1
- package/vendor/epaint-0.31.1/src/image.rs +418 -0
- package/dist/server-CcBFc2F5.d.ts +0 -449
package/dist/config.d.ts
CHANGED
|
@@ -1,260 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { E as ElitConfig } from './types-tJn88E1N.js';
|
|
2
|
+
export { D as DesktopConfig, a as DesktopMode, b as DesktopNativeConfig, M as MobileAndroidConfig, c as MobileConfig, d as MobileIosConfig, e as MobileMode, f as MobileNativeAndroidConfig, g as MobileNativeConfig, h as MobileNativeIosConfig, P as PmAppConfig, i as PmConfig, j as PmHealthCheckConfig, k as PmRestartPolicy, l as PmRuntimeName, W as WapkConfig, m as WapkGoogleDriveConfig, n as WapkLiveSyncConfig, o as WapkLockConfig, p as WapkRunConfig, q as defineConfig } from './types-tJn88E1N.js';
|
|
3
|
+
import './state-DvEkDehk.js';
|
|
4
|
+
import './types-DAisuVr5.js';
|
|
3
5
|
import 'node:events';
|
|
4
|
-
import './
|
|
6
|
+
import './websocket-XfyK23zD.js';
|
|
5
7
|
import 'events';
|
|
6
8
|
import 'http';
|
|
7
9
|
import 'ws';
|
|
10
|
+
import './types-BR4wMiVx.js';
|
|
11
|
+
import './types-C4gKykuG.js';
|
|
12
|
+
import 'net';
|
|
13
|
+
import 'smtp-server';
|
|
14
|
+
import './contracts-D7KIS-TK.js';
|
|
15
|
+
import './contracts-BeW9k0yZ.js';
|
|
16
|
+
|
|
17
|
+
declare const ELIT_CONFIG_FILES: readonly ["elit.config.ts", "elit.config.mts", "elit.config.js", "elit.config.mjs", "elit.config.cjs", "elit.config.json"];
|
|
8
18
|
|
|
9
19
|
/**
|
|
10
|
-
*
|
|
20
|
+
* Load environment variables from .env files
|
|
11
21
|
*/
|
|
22
|
+
declare function loadEnv(mode?: string, cwd?: string): Record<string, string>;
|
|
12
23
|
|
|
13
|
-
interface ElitConfig {
|
|
14
|
-
/** Development server configuration */
|
|
15
|
-
dev?: DevServerOptions;
|
|
16
|
-
/** Build configuration - supports single build or multiple builds */
|
|
17
|
-
build?: BuildOptions | BuildOptions[];
|
|
18
|
-
/** Preview server configuration */
|
|
19
|
-
preview?: PreviewOptions;
|
|
20
|
-
/** Test configuration */
|
|
21
|
-
test?: TestOptions;
|
|
22
|
-
/** Desktop command configuration */
|
|
23
|
-
desktop?: DesktopConfig;
|
|
24
|
-
/** Mobile command configuration */
|
|
25
|
-
mobile?: MobileConfig;
|
|
26
|
-
/** Process manager configuration */
|
|
27
|
-
pm?: PmConfig;
|
|
28
|
-
/** WAPK packaging configuration */
|
|
29
|
-
wapk?: WapkConfig;
|
|
30
|
-
}
|
|
31
|
-
type MobileMode = 'native' | 'hybrid';
|
|
32
|
-
type DesktopMode = 'native' | 'hybrid';
|
|
33
|
-
type PmRuntimeName = 'node' | 'bun' | 'deno';
|
|
34
|
-
type PmRestartPolicy = 'always' | 'on-failure' | 'never';
|
|
35
|
-
interface PmHealthCheckConfig {
|
|
36
|
-
/** HTTP endpoint polled while the process is online */
|
|
37
|
-
url?: string;
|
|
38
|
-
/** Delay before the first health check in milliseconds */
|
|
39
|
-
gracePeriod?: number;
|
|
40
|
-
/** Interval between health checks in milliseconds */
|
|
41
|
-
interval?: number;
|
|
42
|
-
/** Per-request timeout in milliseconds */
|
|
43
|
-
timeout?: number;
|
|
44
|
-
/** Consecutive failed checks before the process is restarted */
|
|
45
|
-
maxFailures?: number;
|
|
46
|
-
}
|
|
47
|
-
interface PmAppConfig {
|
|
48
|
-
/** Unique process name used by elit pm list/stop/restart */
|
|
49
|
-
name: string;
|
|
50
|
-
/** Shell command to execute, for example: npm start */
|
|
51
|
-
script?: string;
|
|
52
|
-
/** JavaScript or TypeScript entry file executed by the selected runtime */
|
|
53
|
-
file?: string;
|
|
54
|
-
/** Packaged .wapk file or remote archive source executed through elit wapk run */
|
|
55
|
-
wapk?: string;
|
|
56
|
-
/** Runtime used for file or wapk targets */
|
|
57
|
-
runtime?: PmRuntimeName;
|
|
58
|
-
/** Working directory for the managed process */
|
|
59
|
-
cwd?: string;
|
|
60
|
-
/** Extra environment variables injected into the process */
|
|
61
|
-
env?: Record<string, string | number | boolean>;
|
|
62
|
-
/** Disable automatic restart when the process exits */
|
|
63
|
-
autorestart?: boolean;
|
|
64
|
-
/** Delay between restart attempts in milliseconds */
|
|
65
|
-
restartDelay?: number;
|
|
66
|
-
/** Maximum restart attempts before marking the process as errored */
|
|
67
|
-
maxRestarts?: number;
|
|
68
|
-
/** Password forwarded to elit wapk run for locked archives */
|
|
69
|
-
password?: string;
|
|
70
|
-
/** Extra WAPK run settings, including direct Google Drive access and live-sync options */
|
|
71
|
-
wapkRun?: WapkRunConfig;
|
|
72
|
-
/** Restart strategy used after the child process exits */
|
|
73
|
-
restartPolicy?: PmRestartPolicy;
|
|
74
|
-
/** Minimum healthy uptime before restart attempt counters reset */
|
|
75
|
-
minUptime?: number;
|
|
76
|
-
/** Restart the process when watched files change */
|
|
77
|
-
watch?: boolean;
|
|
78
|
-
/** Files or directories watched when watch mode is enabled */
|
|
79
|
-
watchPaths?: string[];
|
|
80
|
-
/** Glob-like patterns ignored by watch mode */
|
|
81
|
-
watchIgnore?: string[];
|
|
82
|
-
/** Debounce delay before restarting after a file change */
|
|
83
|
-
watchDebounce?: number;
|
|
84
|
-
/** Optional HTTP health checks for long-running services */
|
|
85
|
-
healthCheck?: PmHealthCheckConfig;
|
|
86
|
-
}
|
|
87
|
-
interface PmConfig {
|
|
88
|
-
/** Directory used to store pm metadata and log files (default: ./.elit/pm) */
|
|
89
|
-
dataDir?: string;
|
|
90
|
-
/** File used by pm save/resurrect (default: <dataDir>/dump.json) */
|
|
91
|
-
dumpFile?: string;
|
|
92
|
-
/** Managed applications available to elit pm start */
|
|
93
|
-
apps?: PmAppConfig[];
|
|
94
|
-
}
|
|
95
|
-
interface MobileConfig {
|
|
96
|
-
/** Project directory for native mobile artifacts */
|
|
97
|
-
cwd?: string;
|
|
98
|
-
/** Native app bundle identifier */
|
|
99
|
-
appId?: string;
|
|
100
|
-
/** Native app display name */
|
|
101
|
-
appName?: string;
|
|
102
|
-
/** Built web assets directory synced into native projects */
|
|
103
|
-
webDir?: string;
|
|
104
|
-
/** Mobile runtime mode: native uses generated UI, hybrid keeps the WebView shell active */
|
|
105
|
-
mode?: MobileMode;
|
|
106
|
-
/** Mobile app icon image path (recommended: .png or .webp) */
|
|
107
|
-
icon?: string;
|
|
108
|
-
/** Android permissions written to AndroidManifest uses-permission tags */
|
|
109
|
-
permissions?: string[];
|
|
110
|
-
/** Platform-specific Android CLI defaults */
|
|
111
|
-
android?: MobileAndroidConfig;
|
|
112
|
-
/** Platform-specific iOS CLI defaults */
|
|
113
|
-
ios?: MobileIosConfig;
|
|
114
|
-
/** Optional native UI generation targets using the same Elit syntax */
|
|
115
|
-
native?: MobileNativeConfig;
|
|
116
|
-
}
|
|
117
|
-
interface MobileAndroidConfig {
|
|
118
|
-
/** Default Android device/emulator id used when --target is omitted */
|
|
119
|
-
target?: string;
|
|
120
|
-
}
|
|
121
|
-
interface MobileIosConfig {
|
|
122
|
-
/** Default iOS simulator name, UDID, booted alias, or full xcodebuild destination */
|
|
123
|
-
target?: string;
|
|
124
|
-
}
|
|
125
|
-
interface MobileNativeConfig {
|
|
126
|
-
/** Elit entry file that exports a VNode tree or zero-argument factory */
|
|
127
|
-
entry?: string;
|
|
128
|
-
/** Explicit export name to read from the native entry module */
|
|
129
|
-
exportName?: string;
|
|
130
|
-
/** Android-specific native generation options */
|
|
131
|
-
android?: MobileNativeAndroidConfig;
|
|
132
|
-
/** iOS-specific native generation options */
|
|
133
|
-
ios?: MobileNativeIosConfig;
|
|
134
|
-
}
|
|
135
|
-
interface MobileNativeAndroidConfig {
|
|
136
|
-
/** Disable Android native code generation while keeping iOS enabled */
|
|
137
|
-
enabled?: boolean;
|
|
138
|
-
/** Kotlin package name for generated native screen files */
|
|
139
|
-
packageName?: string;
|
|
140
|
-
/** Output file path for generated Compose screen, relative to mobile.cwd */
|
|
141
|
-
output?: string;
|
|
142
|
-
}
|
|
143
|
-
interface MobileNativeIosConfig {
|
|
144
|
-
/** Disable iOS native code generation while keeping Android enabled */
|
|
145
|
-
enabled?: boolean;
|
|
146
|
-
/** Output file path for generated SwiftUI file, relative to mobile.cwd */
|
|
147
|
-
output?: string;
|
|
148
|
-
}
|
|
149
|
-
interface DesktopConfig {
|
|
150
|
-
/** Desktop runtime mode: native prefers desktop.native.entry and hybrid prefers desktop.entry */
|
|
151
|
-
mode?: DesktopMode;
|
|
152
|
-
/** Desktop entry file used when the CLI command omits <entry> in hybrid mode */
|
|
153
|
-
entry?: string;
|
|
154
|
-
/** Optional prebuilt hybrid desktop runtime binary path, relative to the current project when not absolute */
|
|
155
|
-
binaryPath?: string;
|
|
156
|
-
/** Optional Cargo target directory override for desktop runtime builds */
|
|
157
|
-
cargoTargetDir?: string;
|
|
158
|
-
/** Optional native desktop entry defaults */
|
|
159
|
-
native?: DesktopNativeConfig;
|
|
160
|
-
/** Optional prebuilt native desktop runtime binary path, relative to the current project when not absolute */
|
|
161
|
-
nativeBinaryPath?: string;
|
|
162
|
-
/** Native desktop runtime: quickjs, bun, node, deno */
|
|
163
|
-
runtime?: 'quickjs' | 'bun' | 'node' | 'deno';
|
|
164
|
-
/** Desktop entry compiler: auto, none, esbuild, tsx, tsup */
|
|
165
|
-
compiler?: 'auto' | 'none' | 'esbuild' | 'tsx' | 'tsup';
|
|
166
|
-
/** Build or run with release desktop runtime */
|
|
167
|
-
release?: boolean;
|
|
168
|
-
/** Desktop build output directory */
|
|
169
|
-
outDir?: string;
|
|
170
|
-
/** Desktop build target platform */
|
|
171
|
-
platform?: 'windows' | 'win' | 'windows-arm' | 'win-arm' | 'linux' | 'linux-musl' | 'linux-arm' | 'macos' | 'mac' | 'darwin' | 'macos-arm' | 'mac-arm';
|
|
172
|
-
/** Desktop WAPK mode defaults */
|
|
173
|
-
wapk?: {
|
|
174
|
-
/** Packaged runtime to execute inside desktop mode */
|
|
175
|
-
runtime?: 'node' | 'bun' | 'deno';
|
|
176
|
-
/** Polling interval for WAPK live sync */
|
|
177
|
-
syncInterval?: number;
|
|
178
|
-
/** Use event-driven file watcher for WAPK live sync */
|
|
179
|
-
useWatcher?: boolean;
|
|
180
|
-
/** Use release desktop runtime binary */
|
|
181
|
-
release?: boolean;
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
interface DesktopNativeConfig {
|
|
185
|
-
/** Elit entry file used when desktop.mode is native or --mode native is passed */
|
|
186
|
-
entry?: string;
|
|
187
|
-
/** Explicit export name to read from the desktop native entry module */
|
|
188
|
-
exportName?: string;
|
|
189
|
-
}
|
|
190
|
-
interface WapkLockConfig {
|
|
191
|
-
/** Plain-text password used to encrypt the archive */
|
|
192
|
-
password?: string;
|
|
193
|
-
}
|
|
194
|
-
interface WapkLiveSyncConfig {
|
|
195
|
-
/** Polling interval for live sync writes back into the archive */
|
|
196
|
-
syncInterval?: number;
|
|
197
|
-
/** Use event-driven file watching for local workdir changes */
|
|
198
|
-
useWatcher?: boolean;
|
|
199
|
-
/** Pull archive changes back into the temp workdir */
|
|
200
|
-
watchArchive?: boolean;
|
|
201
|
-
/** Polling interval for reading external archive changes */
|
|
202
|
-
archiveSyncInterval?: number;
|
|
203
|
-
}
|
|
204
|
-
interface WapkGoogleDriveConfig {
|
|
205
|
-
/** Google Drive file id for the remote .wapk archive */
|
|
206
|
-
fileId?: string;
|
|
207
|
-
/** OAuth access token used for Google Drive API calls */
|
|
208
|
-
accessToken?: string;
|
|
209
|
-
/** Environment variable name that contains the OAuth access token */
|
|
210
|
-
accessTokenEnv?: string;
|
|
211
|
-
/** Include supportsAllDrives=true when accessing shared drive files */
|
|
212
|
-
supportsAllDrives?: boolean;
|
|
213
|
-
}
|
|
214
|
-
interface WapkRunConfig extends WapkLiveSyncConfig {
|
|
215
|
-
/** Default archive file used by elit wapk run when no file argument is provided */
|
|
216
|
-
file?: string;
|
|
217
|
-
/** Remote Google Drive archive used by elit wapk run */
|
|
218
|
-
googleDrive?: WapkGoogleDriveConfig;
|
|
219
|
-
/** Create an online Elit Run shared session instead of starting the local runtime */
|
|
220
|
-
online?: boolean;
|
|
221
|
-
/** Elit Run base URL used when online hosting targets a non-default origin */
|
|
222
|
-
onlineUrl?: string;
|
|
223
|
-
/** Default runtime override used by elit wapk run */
|
|
224
|
-
runtime?: 'node' | 'bun' | 'deno';
|
|
225
|
-
/** Default password used to unlock a locked archive at runtime */
|
|
226
|
-
password?: string;
|
|
227
|
-
}
|
|
228
|
-
interface WapkConfig {
|
|
229
|
-
name?: string;
|
|
230
|
-
version?: string;
|
|
231
|
-
runtime?: string;
|
|
232
|
-
engine?: string;
|
|
233
|
-
entry?: string;
|
|
234
|
-
scripts?: Record<string, string>;
|
|
235
|
-
port?: number;
|
|
236
|
-
env?: Record<string, string | number | boolean>;
|
|
237
|
-
desktop?: Record<string, unknown>;
|
|
238
|
-
lock?: WapkLockConfig;
|
|
239
|
-
run?: WapkRunConfig;
|
|
240
|
-
}
|
|
241
24
|
/**
|
|
242
|
-
*
|
|
25
|
+
* Config loader for elit.config.{ts,mts,js,mjs,cjs,json}
|
|
243
26
|
*/
|
|
244
|
-
|
|
245
|
-
declare const ELIT_CONFIG_FILES: readonly ["elit.config.ts", "elit.config.mts", "elit.config.js", "elit.config.mjs", "elit.config.cjs", "elit.config.json"];
|
|
27
|
+
|
|
246
28
|
declare function resolveConfigPath(cwd?: string): string | null;
|
|
247
|
-
/**
|
|
248
|
-
* Load environment variables from .env files
|
|
249
|
-
*/
|
|
250
|
-
declare function loadEnv(mode?: string, cwd?: string): Record<string, string>;
|
|
251
29
|
/**
|
|
252
30
|
* Load elit config from current directory
|
|
253
31
|
*/
|
|
254
32
|
declare function loadConfig(cwd?: string): Promise<ElitConfig | null>;
|
|
33
|
+
|
|
255
34
|
/**
|
|
256
35
|
* Merge CLI args with config file
|
|
257
36
|
*/
|
|
258
37
|
declare function mergeConfig<T extends Record<string, any>>(config: T | undefined, cliArgs: Partial<T>): T;
|
|
259
38
|
|
|
260
|
-
export {
|
|
39
|
+
export { ELIT_CONFIG_FILES, ElitConfig, loadConfig, loadEnv, mergeConfig, resolveConfigPath };
|