Gathering detailed insights and metrics for fstp
Gathering detailed insights and metrics for fstp
npm install fstp
Typescript
Module System
Node Version
NPM Version
69.1
Supply Chain
98.9
Quality
74.3
Maintenance
100
Vulnerability
100
License
JavaScript (88.82%)
HTML (11.18%)
Total Downloads
2,529
Last Day
7
Last Week
14
Last Month
29
Last Year
164
3 Stars
16 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.9.3
Package Id
fstp@0.9.3
Unpacked Size
32.66 kB
Size
10.79 kB
File Count
29
NPM Version
8.3.1
Node Version
14.18.1
Cumulative downloads
Total Downloads
Last day
0%
7
Compared to previous day
Last week
133.3%
14
Compared to previous week
Last month
625%
29
Compared to previous month
Last year
-18.4%
164
Compared to previous year
3
4
File System Transfer Protocol - File System CRUD server (over HTTP)
This "NPX ready" executable will serve any file system location as a web api supporting CRUD operations.
"to"
query string)"recursive"
(rm -rf) is optional)There are 2 options:
npm i -g fstp
.
Then you can use fstp
in any directory to start the server there.npx fstp
(This will run the application without actually installing it).--help
fstp [path]
Run the server
Options:
--version Show version number [boolean]
-p, --port Port to listen on [number] [default: 8210]
-h, --host Host to listen on [string] [default: "127.0.0.1"]
-r, --readonly Read only file system (allow only GET operations)
[boolean] [default: false]
-v, --verbose Verbose logging [boolean] [default: false]
-f, --prefix Path prefix (e.g. /some-route) [string] [default: ""]
-c, --cors Whether to allow CORS [boolean] [default: true]
-a, --auth Authentication scheme. For basic, provide --user with
username:password string. For bearer, either provide --token
or one will be generated randomly on startup.
[choices: "none", "bearer", "basic"] [default: "bearer"]
-d, --hidden Allow hidden files [boolean] [default: false]
-t, --token Specify a token for bearer authentication (if not specified, a
random token will be generated) [string]
-u, --user Specify a username and password for basic authentication (i.e.
alice:Passw0rd) [string]
--help Show help [boolean]
There are 3 types of authentication schemes: (set with -a/--auth
)
none
- No authentication neededbasic
- Basic authentication (username and password). Specified with -u/--user
as <username>:<password>
string. Authorization
header should have the format of Basic <BASE64_ENCODED_USER_PASS>
.bearer
[default] - A token. Specified with -t/--token
or generated randomly on startup. Authorization
header should have the format of Bearer <TOKEN>
.Using none
or basic
also allows to use a browser.
1curl localhost:8210/some-dir/some-file.txt 2curl localhost:8210/some-dir/some-file.txt?tail 3curl localhost:8210/some-dir/some-file.txt?tail=20
Response is the file's content
Content-Type
will contain the MIME-Type as and if detected by mime
.Last-Modified
will hold the date of last modification time on file system.Query parameters
-tail
- If specified, only the last N lines will be returned (default is 10) (Only 'text/' and 'application/' mime-types are supported).
1curl localhost:8210/some-dir 2curl localhost:8210/some-dir -H "Accept: application/json"
result
which is FstpFileDescriptor[]
:1interface FstpFileDescriptor { 2 /** file / dir name */ 3 name: string; 4 /** Whether is a directory */ 5 dir: boolean, 6 /** Size of file in bytes */ 7 size: Number, 8 /** Date in ISO format */ 9 mtime: string; 10 /** Mime type */ 11 mime: string; 12}
1curl -X POST localhost:8210/some-dir/new-dir 2curl -X POST localhost:8210/some-dir/non-existing-dir/nested-dir
1# Specify content in data 2curl -X PUT localhost:8210/some-dir/new-file.txt -d "This is the content" 3# Get data from file 4curl -X PUT localhost:8210/some-dir/new-file.txt --data-binary @local-file.txt 5# Get data from stdin 6cat local-file.txt | curl -X PUT localhost:8210/some-dir/new-file.txt --data-binary @-
1curl -X PATCH "localhost:8210/some-dir/some-file.txt?to=/some-dir/new-name.txt"
1curl -X DELETE localhost:8210/some-dir/some-file.txt 2curl -X DELETE localhost:8210/some-dir/some-nested-dir 3curl -X DELETE "localhost:8210/some-dir?recursive"
fstp is MIT Licensed
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More