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.
Files changed (154) hide show
  1. package/Cargo.lock +1 -1
  2. package/Cargo.toml +1 -1
  3. package/README.md +6 -0
  4. package/dist/build.cjs +421 -331
  5. package/dist/build.d.ts +1 -16
  6. package/dist/build.js +420 -330
  7. package/dist/build.mjs +420 -330
  8. package/dist/chokidar.cjs +219 -182
  9. package/dist/chokidar.d.ts +25 -10
  10. package/dist/chokidar.js +217 -182
  11. package/dist/chokidar.mjs +218 -183
  12. package/dist/cli.cjs +21608 -20241
  13. package/dist/cli.d.ts +19 -37
  14. package/dist/cli.mjs +21262 -19910
  15. package/dist/config.cjs +357 -350
  16. package/dist/config.d.ts +19 -240
  17. package/dist/config.js +520 -515
  18. package/dist/config.mjs +346 -341
  19. package/dist/contracts-BeW9k0yZ.d.ts +54 -0
  20. package/dist/contracts-D7KIS-TK.d.ts +36 -0
  21. package/dist/coverage.cjs +448 -485
  22. package/dist/coverage.d.ts +13 -59
  23. package/dist/coverage.js +447 -484
  24. package/dist/coverage.mjs +447 -484
  25. package/dist/database.cjs +819 -828
  26. package/dist/database.d.ts +8 -24
  27. package/dist/database.js +818 -829
  28. package/dist/database.mjs +818 -829
  29. package/dist/desktop-auto-render.cjs +1700 -1522
  30. package/dist/desktop-auto-render.d.ts +4 -9
  31. package/dist/desktop-auto-render.js +1695 -1517
  32. package/dist/desktop-auto-render.mjs +1696 -1518
  33. package/dist/desktop.cjs +3 -1
  34. package/dist/desktop.d.ts +4 -1
  35. package/dist/desktop.js +1 -1
  36. package/dist/desktop.mjs +1 -1
  37. package/dist/dev-build.cjs +830 -0
  38. package/dist/dev-build.d.ts +53 -0
  39. package/dist/dev-build.js +3318 -0
  40. package/dist/dev-build.mjs +797 -0
  41. package/dist/dom.cjs +717 -590
  42. package/dist/dom.d.ts +2 -15
  43. package/dist/dom.js +714 -587
  44. package/dist/dom.mjs +716 -589
  45. package/dist/el.cjs +62 -52
  46. package/dist/el.d.ts +5 -10
  47. package/dist/el.js +60 -52
  48. package/dist/el.mjs +60 -52
  49. package/dist/fs.cjs +72 -63
  50. package/dist/fs.d.ts +22 -19
  51. package/dist/fs.js +71 -62
  52. package/dist/fs.mjs +71 -62
  53. package/dist/hmr.cjs +40 -14
  54. package/dist/hmr.d.ts +11 -23
  55. package/dist/hmr.js +38 -14
  56. package/dist/hmr.mjs +38 -14
  57. package/dist/http.cjs +251 -99
  58. package/dist/http.d.ts +38 -104
  59. package/dist/http.js +249 -99
  60. package/dist/http.mjs +249 -99
  61. package/dist/https.cjs +524 -228
  62. package/dist/https.d.ts +44 -36
  63. package/dist/https.js +520 -226
  64. package/dist/https.mjs +522 -228
  65. package/dist/index.cjs +7502 -7690
  66. package/dist/index.d.ts +8 -3
  67. package/dist/index.js +7486 -7676
  68. package/dist/index.mjs +7497 -7686
  69. package/dist/mime-types.cjs +10 -4
  70. package/dist/mime-types.d.ts +8 -11
  71. package/dist/mime-types.js +9 -3
  72. package/dist/mime-types.mjs +9 -3
  73. package/dist/native.cjs +8616 -8869
  74. package/dist/native.d.ts +7 -8
  75. package/dist/native.js +8682 -8935
  76. package/dist/native.mjs +8615 -8868
  77. package/dist/path.cjs +83 -77
  78. package/dist/path.d.ts +29 -29
  79. package/dist/path.js +82 -76
  80. package/dist/path.mjs +82 -76
  81. package/dist/pm.cjs +3300 -0
  82. package/dist/pm.d.ts +256 -0
  83. package/dist/pm.js +5638 -0
  84. package/dist/pm.mjs +3196 -0
  85. package/dist/preview-build.cjs +712 -0
  86. package/dist/preview-build.d.ts +59 -0
  87. package/dist/preview-build.js +3194 -0
  88. package/dist/preview-build.mjs +676 -0
  89. package/dist/render-context.cjs +13 -2
  90. package/dist/render-context.d.ts +9 -31
  91. package/dist/render-context.js +11 -2
  92. package/dist/render-context.mjs +11 -2
  93. package/dist/router.cjs +787 -645
  94. package/dist/router.d.ts +8 -12
  95. package/dist/router.js +786 -644
  96. package/dist/router.mjs +786 -644
  97. package/dist/runtime.cjs +1 -1
  98. package/dist/runtime.js +1 -1
  99. package/dist/runtime.mjs +1 -1
  100. package/dist/server.cjs +3315 -2603
  101. package/dist/server.d.ts +49 -4
  102. package/dist/server.js +7611 -2834
  103. package/dist/server.mjs +3317 -2607
  104. package/dist/smtp-server.cjs +128 -0
  105. package/dist/smtp-server.d.ts +27 -0
  106. package/dist/smtp-server.js +4199 -0
  107. package/dist/smtp-server.mjs +100 -0
  108. package/dist/state-DvEkDehk.d.ts +195 -0
  109. package/dist/state.cjs +768 -658
  110. package/dist/state.d.ts +11 -69
  111. package/dist/state.js +760 -650
  112. package/dist/state.mjs +767 -657
  113. package/dist/style.cjs +1011 -968
  114. package/dist/style.d.ts +13 -127
  115. package/dist/style.js +1009 -970
  116. package/dist/style.mjs +1011 -971
  117. package/dist/test-reporter.cjs +332 -316
  118. package/dist/test-reporter.d.ts +28 -33
  119. package/dist/test-reporter.js +328 -312
  120. package/dist/test-reporter.mjs +328 -312
  121. package/dist/test-runtime.cjs +927 -968
  122. package/dist/test-runtime.d.ts +24 -99
  123. package/dist/test-runtime.js +922 -965
  124. package/dist/test-runtime.mjs +922 -965
  125. package/dist/test.cjs +4428 -4273
  126. package/dist/test.d.ts +2 -8
  127. package/dist/test.js +4307 -4154
  128. package/dist/test.mjs +4419 -4267
  129. package/dist/types-BONVzPtp.d.ts +59 -0
  130. package/dist/types-BR4wMiVx.d.ts +32 -0
  131. package/dist/types-C4gKykuG.d.ts +23 -0
  132. package/dist/types-CIhpN1-K.d.ts +64 -0
  133. package/dist/types-Ckj8md_j.d.ts +84 -0
  134. package/dist/types-CpjQTAkX.d.ts +24 -0
  135. package/dist/types-D0LjrYjS.d.ts +14 -0
  136. package/dist/types-DAisuVr5.d.ts +75 -0
  137. package/dist/types-tJn88E1N.d.ts +242 -0
  138. package/dist/types.d.ts +71 -226
  139. package/dist/universal.cjs +1 -1
  140. package/dist/universal.d.ts +1 -5
  141. package/dist/universal.js +1 -1
  142. package/dist/universal.mjs +1 -1
  143. package/dist/websocket-XfyK23zD.d.ts +119 -0
  144. package/dist/ws.cjs +129 -108
  145. package/dist/ws.d.ts +21 -131
  146. package/dist/ws.js +128 -109
  147. package/dist/ws.mjs +128 -109
  148. package/dist/wss.cjs +757 -479
  149. package/dist/wss.d.ts +31 -28
  150. package/dist/wss.js +755 -479
  151. package/dist/wss.mjs +758 -482
  152. package/package.json +16 -1
  153. package/vendor/epaint-0.31.1/src/image.rs +418 -0
  154. package/dist/server-CcBFc2F5.d.ts +0 -449
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Elit core render and state contracts.
3
+ */
4
+ interface VNode {
5
+ tagName: string;
6
+ props: Props;
7
+ children: Children;
8
+ }
9
+ type Child = VNode | string | number | boolean | null | undefined | Child[];
10
+ type Children = Child[];
11
+ interface Props {
12
+ [key: string]: any;
13
+ className?: string | string[];
14
+ class?: string | string[];
15
+ style?: Partial<CSSStyleDeclaration> | string;
16
+ dangerouslySetInnerHTML?: {
17
+ __html: string;
18
+ };
19
+ ref?: RefCallback | RefObject;
20
+ onClick?: (event: MouseEvent) => void;
21
+ onChange?: (event: Event) => void;
22
+ onInput?: (event: Event) => void;
23
+ onSubmit?: (event: Event) => void;
24
+ value?: string | number | string[];
25
+ checked?: boolean;
26
+ }
27
+ type RefCallback = (element: HTMLElement | SVGElement) => void;
28
+ interface RefObject {
29
+ current: HTMLElement | SVGElement | null;
30
+ }
31
+ interface State<T> {
32
+ value: T;
33
+ subscribe(fn: (value: T) => void): () => void;
34
+ destroy(): void;
35
+ }
36
+ interface StateOptions {
37
+ throttle?: number;
38
+ deep?: boolean;
39
+ }
40
+ interface VirtualListController {
41
+ render: () => void;
42
+ destroy: () => void;
43
+ }
44
+ interface JsonNode {
45
+ tag: string;
46
+ attributes?: Record<string, any>;
47
+ children?: JsonNode | JsonNode[] | string | number | boolean | null;
48
+ }
49
+ type VNodeJson = {
50
+ tagName: string;
51
+ props?: Record<string, any>;
52
+ children?: (VNodeJson | string | number | boolean | null)[];
53
+ } | string | number | boolean | null;
54
+ type ElementFactory = {
55
+ (...children: Child[]): VNode;
56
+ (props: Props | null, ...children: Child[]): VNode;
57
+ };
58
+
59
+ export type { Child as C, ElementFactory as E, JsonNode as J, Props as P, RefCallback as R, State as S, VNode as V, Children as a, RefObject as b, StateOptions as c, VNodeJson as d, VirtualListController as e };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Elit core render and state contracts.
3
+ */
4
+ interface VNode {
5
+ tagName: string;
6
+ props: Props;
7
+ children: Children;
8
+ }
9
+ type Child = VNode | string | number | boolean | null | undefined | Child[];
10
+ type Children = Child[];
11
+ interface Props {
12
+ [key: string]: any;
13
+ className?: string | string[];
14
+ class?: string | string[];
15
+ style?: Partial<CSSStyleDeclaration> | string;
16
+ dangerouslySetInnerHTML?: {
17
+ __html: string;
18
+ };
19
+ ref?: RefCallback | RefObject;
20
+ onClick?: (event: MouseEvent) => void;
21
+ onChange?: (event: Event) => void;
22
+ onInput?: (event: Event) => void;
23
+ onSubmit?: (event: Event) => void;
24
+ value?: string | number | string[];
25
+ checked?: boolean;
26
+ }
27
+ type RefCallback = (element: HTMLElement | SVGElement) => void;
28
+ interface RefObject {
29
+ current: HTMLElement | SVGElement | null;
30
+ }
31
+
32
+ export type { Child as C, VNode as V };
@@ -0,0 +1,23 @@
1
+ import { Server, AddressInfo } from 'net';
2
+ import { SMTPServerOptions, SMTPServer } from 'smtp-server';
3
+
4
+ interface ElitSMTPServerConfig extends SMTPServerOptions {
5
+ port?: number;
6
+ host?: string;
7
+ label?: string;
8
+ }
9
+ type ElitSMTPServerInput = ElitSMTPServerConfig | ElitSMTPServerConfig[] | undefined;
10
+ interface ResolvedElitSMTPServerConfig extends SMTPServerOptions {
11
+ port: number;
12
+ host: string;
13
+ label?: string;
14
+ }
15
+ interface ElitSMTPServerHandle {
16
+ server: SMTPServer;
17
+ config: ResolvedElitSMTPServerConfig;
18
+ listen(callback?: () => void): Server;
19
+ address(): AddressInfo | string | null;
20
+ close(): Promise<void>;
21
+ }
22
+
23
+ export type { ElitSMTPServerConfig as E, ResolvedElitSMTPServerConfig as R, ElitSMTPServerHandle as a, ElitSMTPServerInput as b };
@@ -0,0 +1,64 @@
1
+ interface TestFunction {
2
+ (name: string, fn: () => void, timeout?: number): void;
3
+ skip: (name: string, fn: () => void, timeout?: number) => void;
4
+ only: (name: string, fn: () => void, timeout?: number) => void;
5
+ todo: (name: string, fn: () => void, timeout?: number) => void;
6
+ }
7
+ interface DescribeFunction {
8
+ (name: string, fn: () => void): void;
9
+ skip: (name: string, fn: () => void) => void;
10
+ only: (name: string, fn: () => void) => void;
11
+ }
12
+ interface MockFunction<T extends (...args: any[]) => any> {
13
+ (...args: Parameters<T>): ReturnType<T>;
14
+ _isMock: boolean;
15
+ _calls: Parameters<T>[];
16
+ _results: Array<{
17
+ type: 'return' | 'throw';
18
+ value: any;
19
+ }>;
20
+ _implementation: T | null;
21
+ mockImplementation(fn: T): MockFunction<T>;
22
+ mockReturnValue(value: ReturnType<T>): MockFunction<T>;
23
+ mockResolvedValue(value: ReturnType<T>): MockFunction<T>;
24
+ mockRejectedValue(value: any): MockFunction<T>;
25
+ restore(): void;
26
+ clear(): void;
27
+ }
28
+ interface TestMatchers<T> {
29
+ toBe(value: T): void;
30
+ toEqual(value: T): void;
31
+ toBeTruthy(): void;
32
+ toBeFalsy(): void;
33
+ toBeNull(): void;
34
+ toBeUndefined(): void;
35
+ toBeDefined(): void;
36
+ toBeGreaterThan(value: number): void;
37
+ toBeLessThan(value: number): void;
38
+ toContain(value: any): void;
39
+ toHaveLength(length: number): void;
40
+ toThrow(error?: any): void;
41
+ toMatch(pattern: RegExp | string): void;
42
+ toBeInstanceOf(classType: any): void;
43
+ toHaveProperty(path: string | string[], value?: any): void;
44
+ toBeCalled(): void;
45
+ toBeCalledTimes(times: number): void;
46
+ toBeCalledWith(...args: any[]): void;
47
+ lastReturnedWith(value: any): void;
48
+ not: TestMatchers<any>;
49
+ resolves: TestMatchers<any>;
50
+ rejects: TestMatchers<any>;
51
+ }
52
+ interface TestResult {
53
+ name: string;
54
+ status: 'pass' | 'fail' | 'skip' | 'todo';
55
+ duration: number;
56
+ error?: Error;
57
+ suite: string;
58
+ file?: string;
59
+ lineNumber?: number;
60
+ codeSnippet?: string;
61
+ }
62
+ type HookFunction = () => void | Promise<void>;
63
+
64
+ export type { DescribeFunction as D, HookFunction as H, MockFunction as M, TestMatchers as T, TestFunction as a, TestResult as b };
@@ -0,0 +1,84 @@
1
+ interface CSSVariable {
2
+ name: string;
3
+ value: string;
4
+ toString(): string;
5
+ }
6
+ interface CSSRule {
7
+ selector: string;
8
+ styles: Record<string, string | number>;
9
+ nested?: CSSRule[];
10
+ type: 'tag' | 'class' | 'id' | 'pseudo-class' | 'pseudo-element' | 'name' | 'custom' | 'media' | 'attribute';
11
+ }
12
+ interface MediaRule {
13
+ type: string;
14
+ condition: string;
15
+ rules: CSSRule[];
16
+ }
17
+ interface KeyframeStep {
18
+ step: string | number;
19
+ styles: Record<string, string | number>;
20
+ }
21
+ interface Keyframes {
22
+ name: string;
23
+ steps: KeyframeStep[];
24
+ }
25
+ interface FontFace {
26
+ fontFamily: string;
27
+ src: string;
28
+ fontWeight?: string | number;
29
+ fontStyle?: string;
30
+ fontDisplay?: string;
31
+ unicodeRange?: string;
32
+ }
33
+ interface ContainerRule {
34
+ name?: string;
35
+ condition: string;
36
+ rules: CSSRule[];
37
+ }
38
+ interface SupportsRule {
39
+ condition: string;
40
+ rules: CSSRule[];
41
+ }
42
+ interface LayerRule {
43
+ name: string;
44
+ rules: CSSRule[];
45
+ }
46
+ interface StyleSelectorTarget {
47
+ tagName?: string;
48
+ classNames?: string[];
49
+ attributes?: Record<string, string | number | boolean>;
50
+ pseudoStates?: string[];
51
+ previousSiblings?: StyleSelectorTarget[];
52
+ nextSiblings?: StyleSelectorTarget[];
53
+ children?: StyleSelectorTarget[];
54
+ childIndex?: number;
55
+ siblingCount?: number;
56
+ sameTypeIndex?: number;
57
+ sameTypeCount?: number;
58
+ containerNames?: string[];
59
+ containerWidth?: number;
60
+ isContainer?: boolean;
61
+ isScopeReference?: boolean;
62
+ }
63
+ interface NativeStyleResolveOptions {
64
+ viewportWidth?: number;
65
+ viewportHeight?: number;
66
+ colorScheme?: 'light' | 'dark';
67
+ reducedMotion?: boolean;
68
+ mediaType?: 'screen' | 'print' | 'all';
69
+ }
70
+ interface CreateStyleStore {
71
+ variables: CSSVariable[];
72
+ rules: CSSRule[];
73
+ mediaRules: MediaRule[];
74
+ keyframes: Keyframes[];
75
+ fontFaces: FontFace[];
76
+ imports: string[];
77
+ containerRules: ContainerRule[];
78
+ supportsRules: SupportsRule[];
79
+ layerRules: LayerRule[];
80
+ layerOrder: string[];
81
+ }
82
+ type StyleRenderInput = CSSRule | CSSRule[] | MediaRule | Keyframes | ContainerRule | SupportsRule | LayerRule | undefined | null;
83
+
84
+ export type { CSSRule as C, FontFace as F, KeyframeStep as K, LayerRule as L, MediaRule as M, NativeStyleResolveOptions as N, StyleSelectorTarget as S, CSSVariable as a, ContainerRule as b, Keyframes as c, SupportsRule as d, CreateStyleStore as e, StyleRenderInput as f };
@@ -0,0 +1,24 @@
1
+ import { V as VNode } from './types-BR4wMiVx.js';
2
+
3
+ type RenderRuntimeTarget = 'web' | 'desktop' | 'mobile' | 'unknown';
4
+ interface DesktopInteractionOutputOptions {
5
+ file?: string;
6
+ stdout?: boolean;
7
+ emitReady?: boolean;
8
+ }
9
+ interface DesktopRenderOptions {
10
+ title?: string;
11
+ width?: number;
12
+ height?: number;
13
+ center?: boolean;
14
+ icon?: string;
15
+ autoClose?: boolean;
16
+ interactionOutput?: DesktopInteractionOutputOptions;
17
+ }
18
+ interface CapturedRenderState {
19
+ rootElement: string | unknown;
20
+ target: RenderRuntimeTarget;
21
+ vNode: VNode;
22
+ }
23
+
24
+ export type { CapturedRenderState as C, DesktopRenderOptions as D, RenderRuntimeTarget as R, DesktopInteractionOutputOptions as a };
@@ -0,0 +1,14 @@
1
+ interface HMRClient {
2
+ enabled: boolean;
3
+ reload: () => void;
4
+ accept: (callback?: () => void) => void;
5
+ decline: () => void;
6
+ dispose: (callback: () => void) => void;
7
+ }
8
+ declare global {
9
+ interface Window {
10
+ __ELIT_HMR__: HMRClient;
11
+ }
12
+ }
13
+
14
+ export type { HMRClient as H };
@@ -0,0 +1,75 @@
1
+ import { EventEmitter } from 'node:events';
2
+
3
+ /**
4
+ * IncomingMessage - Ultra-optimized for zero-copy operations
5
+ */
6
+ declare class IncomingMessage extends EventEmitter {
7
+ method: string;
8
+ url: string;
9
+ headers: IncomingHttpHeaders;
10
+ statusCode?: number;
11
+ statusMessage?: string;
12
+ httpVersion: string;
13
+ rawHeaders: string[];
14
+ socket: any;
15
+ private _req;
16
+ constructor(req: any, requestMethod?: string);
17
+ text(): Promise<string>;
18
+ json(): Promise<any>;
19
+ }
20
+
21
+ /**
22
+ * ServerResponse - Ultra-optimized write operations
23
+ */
24
+ declare class ServerResponse extends EventEmitter {
25
+ statusCode: number;
26
+ statusMessage: string;
27
+ headersSent: boolean;
28
+ private _headers;
29
+ private _body;
30
+ private _resolve?;
31
+ private _finished;
32
+ private _nodeRes?;
33
+ constructor(_req?: IncomingMessage, nodeRes?: any);
34
+ setHeader(name: string, value: string | string[] | number): this;
35
+ getHeader(name: string): string | string[] | number | undefined;
36
+ getHeaders(): OutgoingHttpHeaders;
37
+ getHeaderNames(): string[];
38
+ hasHeader(name: string): boolean;
39
+ removeHeader(name: string): void;
40
+ writeHead(statusCode: number, statusMessage?: string | OutgoingHttpHeaders, headers?: OutgoingHttpHeaders): this;
41
+ write(chunk: any, encoding?: BufferEncoding | (() => void), callback?: () => void): boolean;
42
+ end(chunk?: any, encoding?: BufferEncoding | (() => void), callback?: () => void): this;
43
+ _setResolver(resolve: (response: Response) => void): void;
44
+ json(data: any, statusCode?: number): this;
45
+ send(data: any): this;
46
+ status(code: number): this;
47
+ }
48
+
49
+ /**
50
+ * HTTP Headers type
51
+ */
52
+ type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
53
+ type OutgoingHttpHeaders = Record<string, string | string[] | number>;
54
+ /**
55
+ * Request listener type
56
+ */
57
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
58
+ /**
59
+ * Request options
60
+ */
61
+ interface RequestOptions {
62
+ method?: string;
63
+ headers?: OutgoingHttpHeaders;
64
+ timeout?: number;
65
+ signal?: AbortSignal;
66
+ }
67
+ /**
68
+ * Server options
69
+ */
70
+ interface ServerOptions {
71
+ IncomingMessage?: typeof IncomingMessage;
72
+ ServerResponse?: typeof ServerResponse;
73
+ }
74
+
75
+ export { IncomingMessage as I, type OutgoingHttpHeaders as O, type RequestOptions as R, ServerResponse as S, type RequestListener as a, type ServerOptions as b, type IncomingHttpHeaders as c };
@@ -0,0 +1,242 @@
1
+ import { D as DevServerOptions, i as PreviewOptions } from './state-DvEkDehk.js';
2
+ import { B as BuildOptions } from './contracts-D7KIS-TK.js';
3
+ import { a as TestOptions } from './contracts-BeW9k0yZ.js';
4
+
5
+ interface ElitConfig {
6
+ /** Development server configuration */
7
+ dev?: DevServerOptions;
8
+ /** Build configuration - supports single build or multiple builds */
9
+ build?: BuildOptions | BuildOptions[];
10
+ /** Preview server configuration */
11
+ preview?: PreviewOptions;
12
+ /** Test configuration */
13
+ test?: TestOptions;
14
+ /** Desktop command configuration */
15
+ desktop?: DesktopConfig;
16
+ /** Mobile command configuration */
17
+ mobile?: MobileConfig;
18
+ /** Process manager configuration */
19
+ pm?: PmConfig;
20
+ /** WAPK packaging configuration */
21
+ wapk?: WapkConfig;
22
+ }
23
+ type MobileMode = 'native' | 'hybrid';
24
+ type DesktopMode = 'native' | 'hybrid';
25
+ type PmRuntimeName = 'node' | 'bun' | 'deno';
26
+ type PmRestartPolicy = 'always' | 'on-failure' | 'never';
27
+ interface PmHealthCheckConfig {
28
+ /** HTTP endpoint polled while the process is online */
29
+ url?: string;
30
+ /** Delay before the first health check in milliseconds */
31
+ gracePeriod?: number;
32
+ /** Interval between health checks in milliseconds */
33
+ interval?: number;
34
+ /** Per-request timeout in milliseconds */
35
+ timeout?: number;
36
+ /** Consecutive failed checks before the process is restarted */
37
+ maxFailures?: number;
38
+ }
39
+ interface PmAppConfig {
40
+ /** Unique process name used by elit pm list/stop/restart */
41
+ name: string;
42
+ /** Shell command to execute, for example: npm start */
43
+ script?: string;
44
+ /** JavaScript or TypeScript entry file executed by the selected runtime */
45
+ file?: string;
46
+ /** Packaged .wapk file or remote archive source executed through elit wapk run */
47
+ wapk?: string;
48
+ /** Runtime used for file or wapk targets */
49
+ runtime?: PmRuntimeName;
50
+ /** Working directory for the managed process */
51
+ cwd?: string;
52
+ /** Extra environment variables injected into the process */
53
+ env?: Record<string, string | number | boolean>;
54
+ /** Disable automatic restart when the process exits */
55
+ autorestart?: boolean;
56
+ /** Delay between restart attempts in milliseconds */
57
+ restartDelay?: number;
58
+ /** Maximum restart attempts before marking the process as errored */
59
+ maxRestarts?: number;
60
+ /** Password forwarded to elit wapk run for locked archives */
61
+ password?: string;
62
+ /** Extra WAPK run settings, including direct Google Drive access and live-sync options */
63
+ wapkRun?: WapkRunConfig;
64
+ /** Restart strategy used after the child process exits */
65
+ restartPolicy?: PmRestartPolicy;
66
+ /** Minimum healthy uptime before restart attempt counters reset */
67
+ minUptime?: number;
68
+ /** Restart the process when watched files change */
69
+ watch?: boolean;
70
+ /** Files or directories watched when watch mode is enabled */
71
+ watchPaths?: string[];
72
+ /** Glob-like patterns ignored by watch mode */
73
+ watchIgnore?: string[];
74
+ /** Debounce delay before restarting after a file change */
75
+ watchDebounce?: number;
76
+ /** Optional HTTP health checks for long-running services */
77
+ healthCheck?: PmHealthCheckConfig;
78
+ }
79
+ interface PmConfig {
80
+ /** Directory used to store pm metadata and log files (default: ./.elit/pm) */
81
+ dataDir?: string;
82
+ /** File used by pm save/resurrect (default: <dataDir>/dump.json) */
83
+ dumpFile?: string;
84
+ /** Managed applications available to elit pm start */
85
+ apps?: PmAppConfig[];
86
+ }
87
+ interface MobileConfig {
88
+ /** Project directory for native mobile artifacts */
89
+ cwd?: string;
90
+ /** Native app bundle identifier */
91
+ appId?: string;
92
+ /** Native app display name */
93
+ appName?: string;
94
+ /** Built web assets directory synced into native projects */
95
+ webDir?: string;
96
+ /** Mobile runtime mode: native uses generated UI, hybrid keeps the WebView shell active */
97
+ mode?: MobileMode;
98
+ /** Mobile app icon image path (recommended: .png or .webp) */
99
+ icon?: string;
100
+ /** Android permissions written to AndroidManifest uses-permission tags */
101
+ permissions?: string[];
102
+ /** Platform-specific Android CLI defaults */
103
+ android?: MobileAndroidConfig;
104
+ /** Platform-specific iOS CLI defaults */
105
+ ios?: MobileIosConfig;
106
+ /** Optional native UI generation targets using the same Elit syntax */
107
+ native?: MobileNativeConfig;
108
+ }
109
+ interface MobileAndroidConfig {
110
+ /** Default Android device/emulator id used when --target is omitted */
111
+ target?: string;
112
+ }
113
+ interface MobileIosConfig {
114
+ /** Default iOS simulator name, UDID, booted alias, or full xcodebuild destination */
115
+ target?: string;
116
+ }
117
+ interface MobileNativeConfig {
118
+ /** Elit entry file that exports a VNode tree or zero-argument factory */
119
+ entry?: string;
120
+ /** Explicit export name to read from the native entry module */
121
+ exportName?: string;
122
+ /** Android-specific native generation options */
123
+ android?: MobileNativeAndroidConfig;
124
+ /** iOS-specific native generation options */
125
+ ios?: MobileNativeIosConfig;
126
+ }
127
+ interface MobileNativeAndroidConfig {
128
+ /** Disable Android native code generation while keeping iOS enabled */
129
+ enabled?: boolean;
130
+ /** Kotlin package name for generated native screen files */
131
+ packageName?: string;
132
+ /** Output file path for generated Compose screen, relative to mobile.cwd */
133
+ output?: string;
134
+ }
135
+ interface MobileNativeIosConfig {
136
+ /** Disable iOS native code generation while keeping Android enabled */
137
+ enabled?: boolean;
138
+ /** Output file path for generated SwiftUI file, relative to mobile.cwd */
139
+ output?: string;
140
+ }
141
+ interface DesktopConfig {
142
+ /** Desktop runtime mode: native prefers desktop.native.entry and hybrid prefers desktop.entry */
143
+ mode?: DesktopMode;
144
+ /** Desktop entry file used when the CLI command omits <entry> in hybrid mode */
145
+ entry?: string;
146
+ /** Optional prebuilt hybrid desktop runtime binary path, relative to the current project when not absolute */
147
+ binaryPath?: string;
148
+ /** Optional Cargo target directory override for desktop runtime builds */
149
+ cargoTargetDir?: string;
150
+ /** Optional native desktop entry defaults */
151
+ native?: DesktopNativeConfig;
152
+ /** Optional prebuilt native desktop runtime binary path, relative to the current project when not absolute */
153
+ nativeBinaryPath?: string;
154
+ /** Native desktop runtime: quickjs, bun, node, deno */
155
+ runtime?: 'quickjs' | 'bun' | 'node' | 'deno';
156
+ /** Desktop entry compiler: auto, none, esbuild, tsx, tsup */
157
+ compiler?: 'auto' | 'none' | 'esbuild' | 'tsx' | 'tsup';
158
+ /** Build or run with release desktop runtime */
159
+ release?: boolean;
160
+ /** Desktop build output directory */
161
+ outDir?: string;
162
+ /** Desktop build target platform */
163
+ platform?: 'windows' | 'win' | 'windows-arm' | 'win-arm' | 'linux' | 'linux-musl' | 'linux-arm' | 'macos' | 'mac' | 'darwin' | 'macos-arm' | 'mac-arm';
164
+ /** Desktop WAPK mode defaults */
165
+ wapk?: {
166
+ /** Packaged runtime to execute inside desktop mode */
167
+ runtime?: 'node' | 'bun' | 'deno';
168
+ /** Polling interval for WAPK live sync */
169
+ syncInterval?: number;
170
+ /** Use event-driven file watcher for WAPK live sync */
171
+ useWatcher?: boolean;
172
+ /** Use release desktop runtime binary */
173
+ release?: boolean;
174
+ };
175
+ }
176
+ interface DesktopNativeConfig {
177
+ /** Elit entry file used when desktop.mode is native or --mode native is passed */
178
+ entry?: string;
179
+ /** Explicit export name to read from the desktop native entry module */
180
+ exportName?: string;
181
+ }
182
+ interface WapkLockConfig {
183
+ /** Plain-text password used to encrypt the archive */
184
+ password?: string;
185
+ }
186
+ interface WapkLiveSyncConfig {
187
+ /** Polling interval for live sync writes back into the archive */
188
+ syncInterval?: number;
189
+ /** Use event-driven file watching for local workdir changes */
190
+ useWatcher?: boolean;
191
+ /** Pull archive changes back into the temp workdir */
192
+ watchArchive?: boolean;
193
+ /** Polling interval for reading external archive changes */
194
+ archiveSyncInterval?: number;
195
+ }
196
+ interface WapkGoogleDriveConfig {
197
+ /** Google Drive file id for the remote .wapk archive */
198
+ fileId?: string;
199
+ /** OAuth access token used for Google Drive API calls */
200
+ accessToken?: string;
201
+ /** Environment variable name that contains the OAuth access token */
202
+ accessTokenEnv?: string;
203
+ /** Include supportsAllDrives=true when accessing shared drive files */
204
+ supportsAllDrives?: boolean;
205
+ }
206
+ interface WapkRunConfig extends WapkLiveSyncConfig {
207
+ /** Default archive file used by elit wapk run when no file argument is provided */
208
+ file?: string;
209
+ /** Remote Google Drive archive used by elit wapk run */
210
+ googleDrive?: WapkGoogleDriveConfig;
211
+ /** Create an online Elit Run shared session instead of starting the local runtime */
212
+ online?: boolean;
213
+ /** Elit Run base URL used when online hosting targets a non-default origin */
214
+ onlineUrl?: string;
215
+ /** Default runtime override used by elit wapk run */
216
+ runtime?: 'node' | 'bun' | 'deno';
217
+ /** Default password used to unlock a locked archive at runtime */
218
+ password?: string;
219
+ }
220
+ interface WapkConfig {
221
+ name?: string;
222
+ version?: string;
223
+ runtime?: string;
224
+ engine?: string;
225
+ entry?: string;
226
+ scripts?: Record<string, string>;
227
+ /** Stable logical app identifier embedded into the WAPK header */
228
+ appId?: string;
229
+ /** Stable publisher or owner identifier embedded into the WAPK header */
230
+ publisherId?: string;
231
+ port?: number;
232
+ env?: Record<string, string | number | boolean>;
233
+ desktop?: Record<string, unknown>;
234
+ lock?: WapkLockConfig;
235
+ run?: WapkRunConfig;
236
+ }
237
+ /**
238
+ * Helper function for type-safe config definition
239
+ */
240
+ declare function defineConfig(config: ElitConfig): ElitConfig;
241
+
242
+ export { type DesktopConfig as D, type ElitConfig as E, type MobileAndroidConfig as M, type PmAppConfig as P, type WapkConfig as W, type DesktopMode as a, type DesktopNativeConfig as b, type MobileConfig as c, type MobileIosConfig as d, type MobileMode as e, type MobileNativeAndroidConfig as f, type MobileNativeConfig as g, type MobileNativeIosConfig as h, type PmConfig as i, type PmHealthCheckConfig as j, type PmRestartPolicy as k, type PmRuntimeName as l, type WapkGoogleDriveConfig as m, type WapkLiveSyncConfig as n, type WapkLockConfig as o, type WapkRunConfig as p, defineConfig as q };