fwdcast 1.0.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/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # fwdcast
2
+
3
+ Temporary file sharing - stream local files as a public website without uploading.
4
+
5
+ ## Features
6
+
7
+ - **No upload required** - Files stream directly from your machine
8
+ - **Instant sharing** - Get a public URL in seconds
9
+ - **VS Code-style UI** - Beautiful dark theme file browser
10
+ - **File preview** - View text files, images, and code in-browser
11
+ - **Download as ZIP** - Download entire directories with one click
12
+ - **Auto-expires** - Sessions automatically expire after 30 minutes
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install -g fwdcast
18
+ ```
19
+
20
+ Or use directly with npx:
21
+
22
+ ```bash
23
+ npx fwdcast
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ Share the current directory:
29
+
30
+ ```bash
31
+ fwdcast
32
+ ```
33
+
34
+ Share a specific directory:
35
+
36
+ ```bash
37
+ fwdcast /path/to/folder
38
+ ```
39
+
40
+ Use a custom relay server:
41
+
42
+ ```bash
43
+ fwdcast --relay wss://your-relay.com/ws
44
+ ```
45
+
46
+ ## How It Works
47
+
48
+ 1. fwdcast scans your local directory
49
+ 2. Connects to a relay server via WebSocket
50
+ 3. You get a public URL to share
51
+ 4. Viewers request files through the relay
52
+ 5. Files stream directly from your machine - nothing is uploaded
53
+
54
+ ## Limits
55
+
56
+ - Maximum total size: 500 MB
57
+ - Maximum file size: 100 MB per file
58
+ - Session duration: 30 minutes
59
+ - Maximum concurrent viewers: 3
60
+
61
+ ## Self-Hosting
62
+
63
+ You can run your own relay server. See the [relay documentation](https://github.com/vamsiy/fwdcast/tree/main/relay) for setup instructions.
64
+
65
+ ## License
66
+
67
+ MIT
@@ -0,0 +1,22 @@
1
+ import { DirectoryEntry } from './scanner';
2
+ /**
3
+ * Generates an HTML directory listing page with VS Code-style UI.
4
+ */
5
+ export declare function generateDirectoryHtml(entries: DirectoryEntry[], currentPath: string, sessionId?: string): string;
6
+ /**
7
+ * Sorts entries with directories first, then files, alphabetically within each group.
8
+ */
9
+ export declare function sortEntries(entries: DirectoryEntry[]): DirectoryEntry[];
10
+ /**
11
+ * Generates the href link for an entry.
12
+ */
13
+ export declare function generateHref(entry: DirectoryEntry, currentPath: string, sessionId?: string): string;
14
+ /**
15
+ * Escapes HTML special characters to prevent XSS.
16
+ */
17
+ export declare function escapeHtml(str: string): string;
18
+ /**
19
+ * Filters entries to only include direct children of the given path.
20
+ */
21
+ export declare function getDirectChildren(allEntries: DirectoryEntry[], parentPath: string): DirectoryEntry[];
22
+ //# sourceMappingURL=html-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-generator.d.ts","sourceRoot":"","sources":["../src/html-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA4C3C;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,cAAc,EAAE,EACzB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CA8eR;AAoCD;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAMvE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAcnG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,cAAc,EAAE,EAC5B,UAAU,EAAE,MAAM,GACjB,cAAc,EAAE,CASlB"}