bun-dev-server 0.9.85 → 1.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/dist/assets/file.svg +4 -0
- package/dist/assets/folder.svg +4 -0
- package/dist/assets/index.ejs +18 -0
- package/dist/assets/output.ejs +74 -0
- package/dist/assets/parent.svg +4 -0
- package/dist/assets/serveOutputStyles.css +166 -0
- package/dist/buildManager.d.ts +20 -0
- package/dist/bunClientHmr.d.ts +1 -0
- package/dist/bunServeConfig.d.ts +1 -1
- package/dist/bunTSWatcher.d.ts +1 -1
- package/dist/configManager.d.ts +18 -0
- package/dist/fileWatcher.d.ts +12 -0
- package/dist/httpHandler.d.ts +17 -0
- package/dist/index.js +765 -545
- package/dist/staticAssets.d.ts +18 -0
- package/dist/utils/cors.d.ts +10 -0
- package/dist/utils/filesystem.d.ts +17 -0
- package/package.json +8 -5
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static assets loaded as Bun.file instances
|
|
3
|
+
*/
|
|
4
|
+
export declare const staticAssets: {
|
|
5
|
+
listingStyle: Bun.BunFile;
|
|
6
|
+
fileSvg: Bun.BunFile;
|
|
7
|
+
folderSvg: Bun.BunFile;
|
|
8
|
+
parentSvg: Bun.BunFile;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Routes for static assets
|
|
12
|
+
*/
|
|
13
|
+
export declare const staticAssetRoutes: {
|
|
14
|
+
"/__bun_dev_server__/serveOutputStyles.css": Bun.BunFile;
|
|
15
|
+
"/__bun_dev_server__/file.svg": Bun.BunFile;
|
|
16
|
+
"/__bun_dev_server__/folder.svg": Bun.BunFile;
|
|
17
|
+
"/__bun_dev_server__/parent.svg": Bun.BunFile;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CORS (Cross-Origin Resource Sharing) utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Add CORS headers to a Response object
|
|
6
|
+
* @param response - The Response object to add headers to
|
|
7
|
+
* @param request - Optional Request object to get origin from
|
|
8
|
+
* @returns The Response with CORS headers added
|
|
9
|
+
*/
|
|
10
|
+
export declare function withCORSHeaders(response: Response, request?: Request): Response;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clean a directory by removing all its contents
|
|
3
|
+
* @param dst - The absolute path to the directory to clean
|
|
4
|
+
*/
|
|
5
|
+
export declare function cleanDirectory(dst: string): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Convert bytes to human-readable format
|
|
8
|
+
* @param bytes - Number of bytes to convert
|
|
9
|
+
* @returns A formatted string (e.g., "1.5 MB")
|
|
10
|
+
*/
|
|
11
|
+
export declare function convertBytes(bytes: number): string;
|
|
12
|
+
/**
|
|
13
|
+
* Check if a file or directory exists and is readable
|
|
14
|
+
* @param fsPath - The absolute path to check
|
|
15
|
+
* @returns true if the object exists and is readable, false otherwise
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkObjectExists(fsPath: string): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -24,23 +24,26 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
".": "./dist/index.js"
|
|
26
26
|
},
|
|
27
|
-
"version": "0.
|
|
27
|
+
"version": "1.0.1",
|
|
28
28
|
"module": "index.ts",
|
|
29
29
|
"type": "module",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "bun run ./build.ts"
|
|
32
|
+
"build": "bun run ./build.ts",
|
|
33
|
+
"test": "bun test",
|
|
34
|
+
"test:watch": "bun test --watch",
|
|
35
|
+
"test:coverage": "bun test --coverage"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@types/bun": "^1.
|
|
38
|
+
"@types/bun": "^1.3.0"
|
|
36
39
|
},
|
|
37
40
|
"peerDependencies": {
|
|
38
|
-
"typescript": "^5.9.
|
|
41
|
+
"typescript": "^5.9.3"
|
|
39
42
|
},
|
|
40
43
|
"dependencies": {
|
|
41
44
|
"@types/ejs": "^3.1.5",
|
|
42
45
|
"ejs": "^3.1.10",
|
|
43
|
-
"p-queue": "^
|
|
46
|
+
"p-queue": "^9.0.0",
|
|
44
47
|
"picocolors": "^1.1.1"
|
|
45
48
|
}
|
|
46
49
|
}
|