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/dist/build.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { B as BuildOptions, a as BuildResult } from './server-
|
|
1
|
+
import { B as BuildOptions, a as BuildResult } from './server-CRNme9Bc.mjs';
|
|
2
2
|
import './http.mjs';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
import './ws.mjs';
|
|
5
5
|
import 'events';
|
|
6
|
+
import './database.mjs';
|
|
7
|
+
import 'node:vm';
|
|
6
8
|
import 'http';
|
|
7
9
|
import 'ws';
|
|
8
10
|
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA2EzD,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA2EzD,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA0PvE;AAUD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/build.js
CHANGED
|
@@ -532,7 +532,7 @@ async function build(options) {
|
|
|
532
532
|
let size;
|
|
533
533
|
if (runtime === "node") {
|
|
534
534
|
const { build: esbuild } = await import("esbuild");
|
|
535
|
-
|
|
535
|
+
const baseOptions = {
|
|
536
536
|
entryPoints: [entryPath],
|
|
537
537
|
bundle: true,
|
|
538
538
|
outfile: outputPath,
|
|
@@ -549,10 +549,16 @@ async function build(options) {
|
|
|
549
549
|
logLevel: config.logging ? "info" : "silent",
|
|
550
550
|
metafile: true,
|
|
551
551
|
// Prioritize browser field for browser builds
|
|
552
|
-
mainFields: platform === "browser" ? ["browser", "module", "main"] : ["module", "main"]
|
|
553
|
-
|
|
552
|
+
mainFields: platform === "browser" ? ["browser", "module", "main"] : ["module", "main"]
|
|
553
|
+
};
|
|
554
|
+
const esbuildOptions = {
|
|
555
|
+
...baseOptions,
|
|
554
556
|
...getMinifyOptions(config.minify)
|
|
555
|
-
}
|
|
557
|
+
};
|
|
558
|
+
if (config.resolve?.alias) {
|
|
559
|
+
esbuildOptions.resolve = { alias: config.resolve.alias };
|
|
560
|
+
}
|
|
561
|
+
result = await esbuild(esbuildOptions);
|
|
556
562
|
({ buildTime, size } = calculateBuildMetrics(startTime, outputPath));
|
|
557
563
|
} else if (runtime === "bun") {
|
|
558
564
|
result = await Bun.build({
|
package/dist/build.mjs
CHANGED
|
@@ -504,7 +504,7 @@ async function build(options) {
|
|
|
504
504
|
let size;
|
|
505
505
|
if (runtime === "node") {
|
|
506
506
|
const { build: esbuild } = await import("esbuild");
|
|
507
|
-
|
|
507
|
+
const baseOptions = {
|
|
508
508
|
entryPoints: [entryPath],
|
|
509
509
|
bundle: true,
|
|
510
510
|
outfile: outputPath,
|
|
@@ -521,10 +521,16 @@ async function build(options) {
|
|
|
521
521
|
logLevel: config.logging ? "info" : "silent",
|
|
522
522
|
metafile: true,
|
|
523
523
|
// Prioritize browser field for browser builds
|
|
524
|
-
mainFields: platform === "browser" ? ["browser", "module", "main"] : ["module", "main"]
|
|
525
|
-
|
|
524
|
+
mainFields: platform === "browser" ? ["browser", "module", "main"] : ["module", "main"]
|
|
525
|
+
};
|
|
526
|
+
const esbuildOptions = {
|
|
527
|
+
...baseOptions,
|
|
526
528
|
...getMinifyOptions(config.minify)
|
|
527
|
-
}
|
|
529
|
+
};
|
|
530
|
+
if (config.resolve?.alias) {
|
|
531
|
+
esbuildOptions.resolve = { alias: config.resolve.alias };
|
|
532
|
+
}
|
|
533
|
+
result = await esbuild(esbuildOptions);
|
|
528
534
|
({ buildTime, size } = calculateBuildMetrics(startTime, outputPath));
|
|
529
535
|
} else if (runtime === "bun") {
|
|
530
536
|
result = await Bun.build({
|