sfiledl 1.0.2 → 2.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/build/lib.cjs +114 -0
- package/build/lib.cjs.map +1 -0
- package/build/lib.d.ts +29 -0
- package/build/lib.mjs +105 -0
- package/build/lib.mjs.map +1 -0
- package/changelog +593 -0
- package/license +661 -21
- package/package.json +17 -17
- package/readme +2 -171
- package/build/index.cjs +0 -794
- package/build/index.cjs.map +0 -19
- package/build/index.d.ts +0 -175
- package/build/index.mjs +0 -786
- package/build/index.mjs.map +0 -14
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfiledl",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Implement and automate downloading of any file from sfile.co with javascripts library, written entirely in typescripts",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./build/
|
|
7
|
-
"module": "./build/
|
|
8
|
-
"types": "./build/
|
|
9
|
-
"license": "
|
|
6
|
+
"main": "./build/lib.cjs",
|
|
7
|
+
"module": "./build/lib.mjs",
|
|
8
|
+
"types": "./build/lib.d.ts",
|
|
9
|
+
"license": "AGPL-3.0-only",
|
|
10
10
|
"files": [
|
|
11
|
-
"build"
|
|
11
|
+
"build",
|
|
12
|
+
"readme",
|
|
13
|
+
"license",
|
|
14
|
+
"changelog"
|
|
12
15
|
],
|
|
13
16
|
"sideEffects": false,
|
|
14
17
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
16
|
-
"bun": ">=1.
|
|
18
|
+
"node": ">=24",
|
|
19
|
+
"bun": ">=1.3"
|
|
17
20
|
},
|
|
18
21
|
"publishConfig": {
|
|
19
22
|
"access": "public"
|
|
20
23
|
},
|
|
21
24
|
"exports": {
|
|
22
25
|
".": {
|
|
23
|
-
"types": "./build/
|
|
24
|
-
"import": "./build/
|
|
25
|
-
"require": "./build/
|
|
26
|
+
"types": "./build/lib.d.ts",
|
|
27
|
+
"import": "./build/lib.mjs",
|
|
28
|
+
"require": "./build/lib.cjs"
|
|
26
29
|
}
|
|
27
30
|
},
|
|
28
|
-
"bin": {
|
|
29
|
-
"sfiledl": "build/index.cjs"
|
|
30
|
-
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"clean": "rm -rf build node_modules/.cache",
|
|
33
33
|
"typecheck": "tsc --noEmit",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"lint": "tsc --noEmit",
|
|
42
42
|
"format": "prettier . --write",
|
|
43
43
|
"format:check": "prettier . --check",
|
|
44
|
-
"clean-code": "rmcm -l js -i -c 0 -r ./
|
|
44
|
+
"clean-code": "rmcm -l js -i -c 0 -r ./lib --verbose && bun run format",
|
|
45
45
|
"rebuild": "bun run clean && bun run clean-code && bun run build && bun run format:build",
|
|
46
46
|
"test": "bun test",
|
|
47
|
-
"prepublishOnly": "bun run
|
|
47
|
+
"prepublishOnly": "bun run build && chmod +x build/lib.mjs",
|
|
48
48
|
"prepare": "husky install || true",
|
|
49
49
|
"install:playwright": "bunx playwright install chromium"
|
|
50
50
|
},
|
package/readme
CHANGED
|
@@ -1,172 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
sfiledl
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
So, the site https://sfile.co/ is a site that works like Mediafire, a place for sharing files quickly.
|
|
6
|
-
|
|
7
|
-
So, if we use a browser, it will take time. So, with sfiledl, we can automate the process of clicking on the UI. We just need to use the URL and everything is automated.
|
|
8
|
-
|
|
9
|
-
## INSTALLATION
|
|
10
|
-
|
|
11
|
-
Installing sfiledl is quite easy. Make sure you have bun (recommended), npm. If you have it, open your terminal and run it.
|
|
12
|
-
|
|
13
|
-
$ bun install --global sfiledl
|
|
14
|
-
|
|
15
|
-
Congratulations, you've now installed sfiledl
|
|
16
|
-
|
|
17
|
-
## ALTERNATIVE INSTALLATION
|
|
18
|
-
|
|
19
|
-
You can also clone this repository and install manually:
|
|
20
|
-
|
|
21
|
-
$ git clone https://github.com/neuxdotdev/sfiledl.git
|
|
22
|
-
$ cd sfiledl
|
|
23
|
-
$ bun install
|
|
24
|
-
$ bunx playwright install chromium
|
|
25
|
-
|
|
26
|
-
Then run directly:
|
|
27
|
-
|
|
28
|
-
$ bun run src/index.ts
|
|
29
|
-
|
|
30
|
-
## USAGE
|
|
31
|
-
|
|
32
|
-
Download single file:
|
|
33
|
-
|
|
34
|
-
$ bun run src/index.ts <url> [saveDir]
|
|
35
|
-
|
|
36
|
-
Example:
|
|
37
|
-
|
|
38
|
-
$ bun run src/index.ts https://sfile.co/xyz ./downloads
|
|
39
|
-
|
|
40
|
-
Using globally installed binary:
|
|
41
|
-
|
|
42
|
-
$ sfiledl https://sfile.co/xyz
|
|
43
|
-
|
|
44
|
-
## OPTIONS
|
|
45
|
-
|
|
46
|
-
--help, -h Show this help message
|
|
47
|
-
--debug Enable debug logging
|
|
48
|
-
--headless=BOOL Run browser headless (default: true)
|
|
49
|
-
--proxy=URL Proxy server URL
|
|
50
|
-
--log-file=PATH Write logs to file
|
|
51
|
-
--json Output logs as JSON
|
|
52
|
-
--batch=FILE Download URLs from file (one per line)
|
|
53
|
-
--concurrency=N Parallel downloads (1-20, default: 1)
|
|
54
|
-
--retry=N Max retry attempts (1-10, default: 3)
|
|
55
|
-
--timeout=MS Operation timeout in ms (default: 60000)
|
|
56
|
-
|
|
57
|
-
## BATCH DOWNLOAD
|
|
58
|
-
|
|
59
|
-
Create a text file with one URL per line:
|
|
60
|
-
|
|
61
|
-
## urls.txt
|
|
62
|
-
|
|
63
|
-
https://sfile.co/url1
|
|
64
|
-
https://sfile.co/url2
|
|
65
|
-
https://sfile.co/url3
|
|
66
|
-
|
|
67
|
-
Then run:
|
|
68
|
-
|
|
69
|
-
$ bun run src/index.ts --batch=urls.txt --concurrency=3
|
|
70
|
-
|
|
71
|
-
## EXIT CODES
|
|
72
|
-
|
|
73
|
-
0 Success
|
|
74
|
-
1 Download or operation error
|
|
75
|
-
2 CLI or validation error
|
|
76
|
-
|
|
77
|
-
## EXAMPLES
|
|
78
|
-
|
|
79
|
-
Basic download:
|
|
80
|
-
|
|
81
|
-
$ bun run src/index.ts https://sfile.co/abc /tmp/downloads
|
|
82
|
-
|
|
83
|
-
With more retries:
|
|
84
|
-
|
|
85
|
-
$ bun run src/index.ts https://sfile.co/xyz --retry=5
|
|
86
|
-
|
|
87
|
-
Disable headless mode (shows browser window):
|
|
88
|
-
|
|
89
|
-
$ bun run src/index.ts https://sfile.co/def --headless=false
|
|
90
|
-
|
|
91
|
-
Use proxy:
|
|
92
|
-
|
|
93
|
-
$ bun run src/index.ts https://sfile.co/ghi --proxy=http://localhost:8080
|
|
94
|
-
|
|
95
|
-
Longer timeout for slow networks:
|
|
96
|
-
|
|
97
|
-
$ bun run src/index.ts https://sfile.co/jkl --timeout=120000
|
|
98
|
-
|
|
99
|
-
Debug logging:
|
|
100
|
-
|
|
101
|
-
$ bun run src/index.ts https://sfile.co/mno --debug --verbose
|
|
102
|
-
|
|
103
|
-
## TROUBLESHOOTING
|
|
104
|
-
|
|
105
|
-
ERROR: Browser launch failed
|
|
106
|
-
SOLUTION: Install Playwright browsers by running bunx playwright install chromium
|
|
107
|
-
|
|
108
|
-
ERROR: Download timeout
|
|
109
|
-
SOLUTION: Increase timeout using --timeout flag with higher value
|
|
110
|
-
|
|
111
|
-
ERROR: Network blocked
|
|
112
|
-
SOLUTION: Use proxy option or check firewall settings
|
|
113
|
-
|
|
114
|
-
ERROR: File permission denied
|
|
115
|
-
SOLUTION: Create download directory first or change save path permissions
|
|
116
|
-
|
|
117
|
-
## REQUIREMENTS
|
|
118
|
-
|
|
119
|
-
Node.js >= 18.0.0
|
|
120
|
-
Bun >= 1.3
|
|
121
|
-
Playwright Chromium browser (install separately)
|
|
122
|
-
|
|
123
|
-
## CONTRIBUTING
|
|
124
|
-
|
|
125
|
-
Contributions are welcome! Please feel free to submit Pull Requests.
|
|
126
|
-
|
|
127
|
-
1. Fork the repository
|
|
128
|
-
2. Create your feature branch
|
|
129
|
-
3. Commit your changes
|
|
130
|
-
4. Push to the branch
|
|
131
|
-
5. Open a Pull Request
|
|
132
|
-
|
|
133
|
-
## BUILD FROM SOURCE
|
|
134
|
-
|
|
135
|
-
Build production bundle:
|
|
136
|
-
|
|
137
|
-
$ bun run build
|
|
138
|
-
|
|
139
|
-
Clean and rebuild:
|
|
140
|
-
|
|
141
|
-
$ bun run rebuild
|
|
142
|
-
|
|
143
|
-
Type check only:
|
|
144
|
-
|
|
145
|
-
$ bun run typecheck
|
|
146
|
-
|
|
147
|
-
Run tests:
|
|
148
|
-
|
|
149
|
-
$ bun run test
|
|
150
|
-
|
|
151
|
-
## PERFORMANCES
|
|
152
|
-
|
|
153
|
-
Single file: ~2-5 seconds depending on network speed
|
|
154
|
-
Batch download: Up to 20 concurrent downloads with concurrency option
|
|
155
|
-
Memory usage: Optimized for long-running operations
|
|
156
|
-
|
|
157
|
-
## LICENSE
|
|
158
|
-
|
|
159
|
-
MIT License - see LICENSE file for details
|
|
160
|
-
|
|
161
|
-
## AUTHOR
|
|
162
|
-
|
|
163
|
-
neuxdotdev - neuxdev1@gmail.com
|
|
164
|
-
|
|
165
|
-
## CREDITS
|
|
166
|
-
|
|
167
|
-
Built with Playwright automation framework
|
|
168
|
-
Designed for Bun runtime performance optimization
|
|
169
|
-
|
|
170
|
-
Repository: https://github.com/neuxdotdev/sfiledl
|
|
171
|
-
|
|
172
|
-
Issues: https://github.com/neuxdotdev/sfiledl/issues
|
|
3
|
+
Implement and automate downloading of any file from sfile.co with javascripts library, written entirely in typescripts
|