bun-dev-server 0.3.0 → 0.4.0
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/bunClientHmr.d.ts +3 -0
- package/dist/bunHmrPlugin.d.ts +8 -0
- package/dist/bunManifest.d.ts +2 -0
- package/{bunServeConfig.ts → dist/bunServeConfig.d.ts} +26 -27
- package/dist/bunTSWatcher.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1242 -0
- package/dist/server.d.ts +2 -0
- package/dist/tsChecker.d.ts +2 -0
- package/package.json +11 -3
- package/.vscode/launch.json +0 -36
- package/.vscode/settings.json +0 -15
- package/@types/fileTypes.d.ts +0 -5
- package/bunClientHmr.ts +0 -51
- package/bunHmrPlugin.ts +0 -38
- package/bunManifest.ts +0 -18
- package/bunTSWatcher.ts +0 -74
- package/index.ts +0 -247
- package/indexHTMLTemplate.ejs +0 -15
- package/serveOutputTemplate.ejs +0 -16
- package/test/README.md +0 -15
- package/test/bun.lockb +0 -0
- package/test/bunrun.ts +0 -18
- package/test/package.json +0 -16
- package/test/src/@types/filetypes.d.ts +0 -4
- package/test/src/app.ts +0 -10
- package/test/src/assets/something.svg +0 -6
- package/test/src/services/someservice.ts +0 -7
- package/test/src/something.ts +0 -3
- package/test/tsconfig.json +0 -28
- package/tsconfig.json +0 -28
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BunPlugin } from "bun";
|
|
2
|
+
export interface BunHMROptions {
|
|
3
|
+
secure?: boolean;
|
|
4
|
+
port: number;
|
|
5
|
+
websocketPath?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function bunHotReloadPlugin(config: BunHMROptions): BunPlugin;
|
|
8
|
+
export declare function getBunHMRFooter(config: BunHMROptions): string;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { type BuildConfig, type TLSOptions } from "bun";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
reloadOnChange?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The path to the directory to serve files from.
|
|
14
|
-
* Takes precedence over `buildConfig.outdir`.
|
|
15
|
-
* Defaults to "dist".
|
|
16
|
-
*/
|
|
17
|
-
servePath?: string;
|
|
18
|
-
cleanServePath?: boolean;
|
|
19
|
-
serveOutputEjs?: string;
|
|
20
|
-
serveOutputHtml?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
1
|
+
import { type BuildConfig, type TLSOptions } from "bun";
|
|
2
|
+
export interface BunDevServerConfig extends Partial<BunDevServerSocketConfig> {
|
|
3
|
+
port: number;
|
|
4
|
+
buildConfig: BuildConfig;
|
|
5
|
+
watchDir: string;
|
|
6
|
+
enableTSC?: boolean;
|
|
7
|
+
writeManifest?: boolean;
|
|
8
|
+
manifestName?: string;
|
|
9
|
+
manifestWithHash?: boolean;
|
|
10
|
+
hotReload?: "plugin" | "footer";
|
|
11
|
+
reloadOnChange?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The path to the directory to serve files from.
|
|
14
|
+
* Takes precedence over `buildConfig.outdir`.
|
|
15
|
+
* Defaults to "dist".
|
|
16
|
+
*/
|
|
17
|
+
servePath?: string;
|
|
18
|
+
cleanServePath?: boolean;
|
|
19
|
+
serveOutputEjs?: string;
|
|
20
|
+
serveOutputHtml?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface BunDevServerSocketConfig {
|
|
23
|
+
port: number;
|
|
24
|
+
tls?: TLSOptions;
|
|
25
|
+
websocketPath?: string;
|
|
26
|
+
}
|
package/dist/index.d.ts
ADDED