elit 2.0.1 → 3.0.1
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/README.md +275 -128
- package/dist/build.d.mts +10 -1
- package/dist/build.d.ts +10 -1
- package/dist/build.js +670 -1
- package/dist/build.mjs +641 -1
- package/dist/chokidar.d.mts +134 -0
- package/dist/chokidar.d.ts +134 -0
- package/dist/chokidar.js +240 -0
- package/dist/chokidar.mjs +221 -0
- package/dist/cli.js +2792 -495
- package/dist/dom.d.mts +10 -3
- package/dist/dom.d.ts +10 -3
- package/dist/dom.js +676 -1
- package/dist/dom.mjs +647 -1
- package/dist/el.d.mts +16 -36
- package/dist/el.d.ts +16 -36
- package/dist/el.js +789 -1
- package/dist/el.mjs +583 -1
- package/dist/fs.d.mts +255 -0
- package/dist/fs.d.ts +255 -0
- package/dist/fs.js +513 -0
- package/dist/fs.mjs +469 -0
- package/dist/hmr.js +112 -1
- package/dist/hmr.mjs +91 -1
- package/dist/http.d.mts +163 -0
- package/dist/http.d.ts +163 -0
- package/dist/http.js +632 -0
- package/dist/http.mjs +605 -0
- package/dist/https.d.mts +108 -0
- package/dist/https.d.ts +108 -0
- package/dist/https.js +907 -0
- package/dist/https.mjs +901 -0
- package/dist/index.d.mts +613 -33
- package/dist/index.d.ts +613 -33
- package/dist/index.js +2589 -1
- package/dist/index.mjs +2312 -1
- package/dist/mime-types.d.mts +48 -0
- package/dist/mime-types.d.ts +48 -0
- package/dist/mime-types.js +197 -0
- package/dist/mime-types.mjs +166 -0
- package/dist/path.d.mts +163 -0
- package/dist/path.d.ts +163 -0
- package/dist/path.js +350 -0
- package/dist/path.mjs +310 -0
- package/dist/router.d.mts +3 -1
- package/dist/router.d.ts +3 -1
- package/dist/router.js +830 -1
- package/dist/router.mjs +801 -1
- package/dist/runtime.d.mts +97 -0
- package/dist/runtime.d.ts +97 -0
- package/dist/runtime.js +43 -0
- package/dist/runtime.mjs +15 -0
- package/dist/server.d.mts +5 -1
- package/dist/server.d.ts +5 -1
- package/dist/server.js +3267 -1
- package/dist/server.mjs +3241 -1
- package/dist/state.d.mts +3 -1
- package/dist/state.d.ts +3 -1
- package/dist/state.js +1036 -1
- package/dist/state.mjs +992 -1
- package/dist/style.d.mts +47 -1
- package/dist/style.d.ts +47 -1
- package/dist/style.js +551 -1
- package/dist/style.mjs +483 -1
- package/dist/{types-DOAdFFJB.d.ts → types-C0nGi6MX.d.mts} +29 -13
- package/dist/{types-DOAdFFJB.d.mts → types-Du6kfwTm.d.ts} +29 -13
- package/dist/types.d.mts +452 -3
- package/dist/types.d.ts +452 -3
- package/dist/types.js +18 -1
- package/dist/ws.d.mts +195 -0
- package/dist/ws.d.ts +195 -0
- package/dist/ws.js +380 -0
- package/dist/ws.mjs +358 -0
- package/dist/wss.d.mts +108 -0
- package/dist/wss.d.ts +108 -0
- package/dist/wss.js +1306 -0
- package/dist/wss.mjs +1300 -0
- package/package.json +53 -6
- package/dist/client.d.mts +0 -9
- package/dist/client.d.ts +0 -9
- package/dist/client.js +0 -1
- package/dist/client.mjs +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime detection and global type declarations
|
|
3
|
+
* Shared across all modules for consistency
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Runtime detection (cached at module load)
|
|
7
|
+
*/
|
|
8
|
+
declare const runtime: "node" | "bun" | "deno";
|
|
9
|
+
declare const isNode: boolean;
|
|
10
|
+
declare const isBun: boolean;
|
|
11
|
+
declare const isDeno: boolean;
|
|
12
|
+
declare global {
|
|
13
|
+
const Bun: {
|
|
14
|
+
build(options: {
|
|
15
|
+
entrypoints: string[];
|
|
16
|
+
outdir?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
format?: string;
|
|
19
|
+
minify?: boolean;
|
|
20
|
+
sourcemap?: string;
|
|
21
|
+
external?: string[];
|
|
22
|
+
naming?: string;
|
|
23
|
+
plugins?: any[];
|
|
24
|
+
define?: Record<string, string>;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
outputs: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
size: number;
|
|
30
|
+
}>;
|
|
31
|
+
logs: any[];
|
|
32
|
+
}>;
|
|
33
|
+
Transpiler: new (options?: {
|
|
34
|
+
loader?: string;
|
|
35
|
+
target?: string;
|
|
36
|
+
minify?: boolean;
|
|
37
|
+
}) => {
|
|
38
|
+
transform(code: string, loader?: string): Promise<string>;
|
|
39
|
+
transformSync(code: string, loader?: string): string;
|
|
40
|
+
};
|
|
41
|
+
file(path: string): {
|
|
42
|
+
size: number;
|
|
43
|
+
arrayBuffer(): ArrayBuffer | Promise<ArrayBuffer>;
|
|
44
|
+
exists(): Promise<boolean>;
|
|
45
|
+
};
|
|
46
|
+
write(path: string, data: string | Buffer | Uint8Array): Promise<void>;
|
|
47
|
+
} | undefined;
|
|
48
|
+
const Deno: {
|
|
49
|
+
emit(rootSpecifier: string | URL, options?: {
|
|
50
|
+
bundle?: 'module' | 'classic';
|
|
51
|
+
check?: boolean;
|
|
52
|
+
compilerOptions?: any;
|
|
53
|
+
importMap?: string;
|
|
54
|
+
importMapPath?: string;
|
|
55
|
+
sources?: Record<string, string>;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
files: Record<string, string>;
|
|
58
|
+
diagnostics: any[];
|
|
59
|
+
}>;
|
|
60
|
+
writeTextFile(path: string, data: string): Promise<void>;
|
|
61
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
62
|
+
readFileSync(path: string): Uint8Array;
|
|
63
|
+
writeFile(path: string, data: Uint8Array): Promise<void>;
|
|
64
|
+
writeFileSync(path: string, data: Uint8Array): void;
|
|
65
|
+
stat(path: string): Promise<any>;
|
|
66
|
+
statSync(path: string): any;
|
|
67
|
+
mkdir(path: string, options?: {
|
|
68
|
+
recursive?: boolean;
|
|
69
|
+
}): Promise<void>;
|
|
70
|
+
mkdirSync(path: string, options?: {
|
|
71
|
+
recursive?: boolean;
|
|
72
|
+
}): void;
|
|
73
|
+
readDir(path: string): AsyncIterable<any>;
|
|
74
|
+
readDirSync(path: string): Iterable<any>;
|
|
75
|
+
remove(path: string, options?: {
|
|
76
|
+
recursive?: boolean;
|
|
77
|
+
}): Promise<void>;
|
|
78
|
+
removeSync(path: string, options?: {
|
|
79
|
+
recursive?: boolean;
|
|
80
|
+
}): void;
|
|
81
|
+
rename(oldPath: string, newPath: string): Promise<void>;
|
|
82
|
+
renameSync(oldPath: string, newPath: string): void;
|
|
83
|
+
copyFile(src: string, dest: string): Promise<void>;
|
|
84
|
+
copyFileSync(src: string, dest: string): void;
|
|
85
|
+
realPath(path: string): Promise<string>;
|
|
86
|
+
realPathSync(path: string): string;
|
|
87
|
+
watchFs(paths: string | string[]): AsyncIterable<{
|
|
88
|
+
kind: string;
|
|
89
|
+
paths: string[];
|
|
90
|
+
}>;
|
|
91
|
+
build: {
|
|
92
|
+
os: string;
|
|
93
|
+
};
|
|
94
|
+
} | undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { isBun, isDeno, isNode, runtime };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime detection and global type declarations
|
|
3
|
+
* Shared across all modules for consistency
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Runtime detection (cached at module load)
|
|
7
|
+
*/
|
|
8
|
+
declare const runtime: "node" | "bun" | "deno";
|
|
9
|
+
declare const isNode: boolean;
|
|
10
|
+
declare const isBun: boolean;
|
|
11
|
+
declare const isDeno: boolean;
|
|
12
|
+
declare global {
|
|
13
|
+
const Bun: {
|
|
14
|
+
build(options: {
|
|
15
|
+
entrypoints: string[];
|
|
16
|
+
outdir?: string;
|
|
17
|
+
target?: string;
|
|
18
|
+
format?: string;
|
|
19
|
+
minify?: boolean;
|
|
20
|
+
sourcemap?: string;
|
|
21
|
+
external?: string[];
|
|
22
|
+
naming?: string;
|
|
23
|
+
plugins?: any[];
|
|
24
|
+
define?: Record<string, string>;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
outputs: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
size: number;
|
|
30
|
+
}>;
|
|
31
|
+
logs: any[];
|
|
32
|
+
}>;
|
|
33
|
+
Transpiler: new (options?: {
|
|
34
|
+
loader?: string;
|
|
35
|
+
target?: string;
|
|
36
|
+
minify?: boolean;
|
|
37
|
+
}) => {
|
|
38
|
+
transform(code: string, loader?: string): Promise<string>;
|
|
39
|
+
transformSync(code: string, loader?: string): string;
|
|
40
|
+
};
|
|
41
|
+
file(path: string): {
|
|
42
|
+
size: number;
|
|
43
|
+
arrayBuffer(): ArrayBuffer | Promise<ArrayBuffer>;
|
|
44
|
+
exists(): Promise<boolean>;
|
|
45
|
+
};
|
|
46
|
+
write(path: string, data: string | Buffer | Uint8Array): Promise<void>;
|
|
47
|
+
} | undefined;
|
|
48
|
+
const Deno: {
|
|
49
|
+
emit(rootSpecifier: string | URL, options?: {
|
|
50
|
+
bundle?: 'module' | 'classic';
|
|
51
|
+
check?: boolean;
|
|
52
|
+
compilerOptions?: any;
|
|
53
|
+
importMap?: string;
|
|
54
|
+
importMapPath?: string;
|
|
55
|
+
sources?: Record<string, string>;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
files: Record<string, string>;
|
|
58
|
+
diagnostics: any[];
|
|
59
|
+
}>;
|
|
60
|
+
writeTextFile(path: string, data: string): Promise<void>;
|
|
61
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
62
|
+
readFileSync(path: string): Uint8Array;
|
|
63
|
+
writeFile(path: string, data: Uint8Array): Promise<void>;
|
|
64
|
+
writeFileSync(path: string, data: Uint8Array): void;
|
|
65
|
+
stat(path: string): Promise<any>;
|
|
66
|
+
statSync(path: string): any;
|
|
67
|
+
mkdir(path: string, options?: {
|
|
68
|
+
recursive?: boolean;
|
|
69
|
+
}): Promise<void>;
|
|
70
|
+
mkdirSync(path: string, options?: {
|
|
71
|
+
recursive?: boolean;
|
|
72
|
+
}): void;
|
|
73
|
+
readDir(path: string): AsyncIterable<any>;
|
|
74
|
+
readDirSync(path: string): Iterable<any>;
|
|
75
|
+
remove(path: string, options?: {
|
|
76
|
+
recursive?: boolean;
|
|
77
|
+
}): Promise<void>;
|
|
78
|
+
removeSync(path: string, options?: {
|
|
79
|
+
recursive?: boolean;
|
|
80
|
+
}): void;
|
|
81
|
+
rename(oldPath: string, newPath: string): Promise<void>;
|
|
82
|
+
renameSync(oldPath: string, newPath: string): void;
|
|
83
|
+
copyFile(src: string, dest: string): Promise<void>;
|
|
84
|
+
copyFileSync(src: string, dest: string): void;
|
|
85
|
+
realPath(path: string): Promise<string>;
|
|
86
|
+
realPathSync(path: string): string;
|
|
87
|
+
watchFs(paths: string | string[]): AsyncIterable<{
|
|
88
|
+
kind: string;
|
|
89
|
+
paths: string[];
|
|
90
|
+
}>;
|
|
91
|
+
build: {
|
|
92
|
+
os: string;
|
|
93
|
+
};
|
|
94
|
+
} | undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { isBun, isDeno, isNode, runtime };
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/runtime.ts
|
|
21
|
+
var runtime_exports = {};
|
|
22
|
+
__export(runtime_exports, {
|
|
23
|
+
isBun: () => isBun,
|
|
24
|
+
isDeno: () => isDeno,
|
|
25
|
+
isNode: () => isNode,
|
|
26
|
+
runtime: () => runtime
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(runtime_exports);
|
|
29
|
+
var runtime = (() => {
|
|
30
|
+
if (typeof Deno !== "undefined") return "deno";
|
|
31
|
+
if (typeof Bun !== "undefined") return "bun";
|
|
32
|
+
return "node";
|
|
33
|
+
})();
|
|
34
|
+
var isNode = runtime === "node";
|
|
35
|
+
var isBun = runtime === "bun";
|
|
36
|
+
var isDeno = runtime === "deno";
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
isBun,
|
|
40
|
+
isDeno,
|
|
41
|
+
isNode,
|
|
42
|
+
runtime
|
|
43
|
+
});
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/runtime.ts
|
|
2
|
+
var runtime = (() => {
|
|
3
|
+
if (typeof Deno !== "undefined") return "deno";
|
|
4
|
+
if (typeof Bun !== "undefined") return "bun";
|
|
5
|
+
return "node";
|
|
6
|
+
})();
|
|
7
|
+
var isNode = runtime === "node";
|
|
8
|
+
var isBun = runtime === "bun";
|
|
9
|
+
var isDeno = runtime === "deno";
|
|
10
|
+
export {
|
|
11
|
+
isBun,
|
|
12
|
+
isDeno,
|
|
13
|
+
isNode,
|
|
14
|
+
runtime
|
|
15
|
+
};
|
package/dist/server.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import './http.mjs';
|
|
2
|
+
import './ws.mjs';
|
|
3
|
+
export { l as HttpMethod, M as Middleware, m as ServerRouteContext, n as ServerRouteHandler, o as ServerRouter, K as SharedState, I as SharedStateOptions, G as StateChangeHandler, L as StateManager, x as bodyLimit, y as cacheControl, z as compress, r as cors, N as createDevServer, F as createProxyHandler, v as errorHandler, q as html, p as json, u as logger, w as rateLimit, A as security, s as status, t as text } from './types-C0nGi6MX.mjs';
|
|
4
|
+
import 'node:events';
|
|
5
|
+
import 'events';
|
|
1
6
|
import 'http';
|
|
2
7
|
import 'ws';
|
|
3
|
-
export { H as HttpMethod, M as Middleware, a as ServerRouteContext, b as ServerRouteHandler, S as ServerRouter, n as SharedState, o as SharedStateOptions, p as StateChangeHandler, m as StateManager, f as bodyLimit, g as cacheControl, i as compress, d as cors, c as createDevServer, L as createProxyHandler, e as errorHandler, h as html, j as json, l as logger, r as rateLimit, k as security, s as status, t as text } from './types-DOAdFFJB.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import './http.js';
|
|
2
|
+
import './ws.js';
|
|
3
|
+
export { l as HttpMethod, M as Middleware, m as ServerRouteContext, n as ServerRouteHandler, o as ServerRouter, K as SharedState, I as SharedStateOptions, G as StateChangeHandler, L as StateManager, x as bodyLimit, y as cacheControl, z as compress, r as cors, N as createDevServer, F as createProxyHandler, v as errorHandler, q as html, p as json, u as logger, w as rateLimit, A as security, s as status, t as text } from './types-Du6kfwTm.js';
|
|
4
|
+
import 'node:events';
|
|
5
|
+
import 'events';
|
|
1
6
|
import 'http';
|
|
2
7
|
import 'ws';
|
|
3
|
-
export { H as HttpMethod, M as Middleware, a as ServerRouteContext, b as ServerRouteHandler, S as ServerRouter, n as SharedState, o as SharedStateOptions, p as StateChangeHandler, m as StateManager, f as bodyLimit, g as cacheControl, i as compress, d as cors, c as createDevServer, L as createProxyHandler, e as errorHandler, h as html, j as json, l as logger, r as rateLimit, k as security, s as status, t as text } from './types-DOAdFFJB.js';
|