bun-dev-server 0.3.0 → 0.5.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} +32 -27
- package/dist/bunTSWatcher.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1354 -0
- package/dist/server.d.ts +2 -0
- package/dist/tsChecker.d.ts +2 -0
- package/package.json +12 -2
- 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,32 @@
|
|
|
1
|
-
import { type BuildConfig, type TLSOptions } from "bun";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
/**
|
|
7
|
+
* The delay in milliseconds to wait before starting a new build once a file has changed.
|
|
8
|
+
* Used in debounce function, in case many changes happen in file system at once
|
|
9
|
+
* @default 1000
|
|
10
|
+
*/
|
|
11
|
+
watchDelay?: number;
|
|
12
|
+
enableTSC?: boolean;
|
|
13
|
+
writeManifest?: boolean;
|
|
14
|
+
manifestName?: string;
|
|
15
|
+
manifestWithHash?: boolean;
|
|
16
|
+
hotReload?: "plugin" | "footer";
|
|
17
|
+
reloadOnChange?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The path to the directory to serve files from.
|
|
20
|
+
* Takes precedence over `buildConfig.outdir`.
|
|
21
|
+
* Defaults to "dist".
|
|
22
|
+
*/
|
|
23
|
+
servePath?: string;
|
|
24
|
+
cleanServePath?: boolean;
|
|
25
|
+
serveOutputEjs?: string;
|
|
26
|
+
serveOutputHtml?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface BunDevServerSocketConfig {
|
|
29
|
+
port: number;
|
|
30
|
+
tls?: TLSOptions;
|
|
31
|
+
websocketPath?: string;
|
|
32
|
+
}
|
package/dist/index.d.ts
ADDED