1
0
Fork 0
forked from svrjs/svrjs

Compare commits

...
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.

307 commits

Author SHA1 Message Date
1174a348b6 refactor: use config.wwwroot instead of current working directory as a webroot in internal code 2024-11-10 12:14:55 +01:00
847fb46f07 build: don't create the "out" directory when building for development 2024-11-09 20:21:42 +01:00
11e99ead1c build: fix the development build script by add the ready handler for chokidar watcher 2024-11-09 13:33:17 +01:00
5a0ea4007e feat: add options related to disabling configuration file saving, and use them in the "dev" script 2024-11-09 13:31:31 +01:00
8e1ea9e5bc build: add rebuilding SVR.JS when the source code changes when the "dev" script is executed 2024-11-09 13:20:02 +01:00
bbd1c88016 docs: update README.md 2024-11-09 12:15:07 +01:00
12f2109ad9 chore: update dependencies to latest versions 2024-11-01 09:40:56 +01:00
ad23033b15 feat: add support for Deno 2 for additional SVR.JS utilities 2024-10-19 07:16:02 +02:00
38cf8bb68d fix: fix the cluster limit of one process for Deno with shimmed clustering module 2024-10-18 21:01:51 +02:00
63d3f5df32 fix: fix Deno inconsistencies regarding HTTP status code texts 2024-10-18 20:21:01 +02:00
ad0417b468 fix: add notice about Deno support being experimental 2024-10-18 20:15:13 +02:00
648cf488d9 chore: add a notice about the cluster shim being used for Deno in index.js file 2024-10-18 20:09:42 +02:00
b1a40e7a20 chore: rename the cluster shim method and function, because it's also for Deno 2, not just for Bun 2024-10-18 20:08:52 +02:00
9abb89d560 feat: add support for Deno 2 2024-10-18 20:05:02 +02:00
2f475b4066 fix: fix a bug with 497, 598, and 599 status code HTTP responses 2024-10-15 18:23:09 +02:00
d7b5d0af44 docs: change documentation URL in README 2024-10-02 06:10:56 +02:00
ff15ec542e fix: fix a bug with no request ID shown for multiline log entries for HTTP requests 2024-09-25 15:41:39 +02:00
070f60f7e3 docs: update file structure in README 2024-09-20 07:16:49 +02:00
350496f57a style: enforce the new Prettier rules on the build script 2024-09-20 06:37:14 +02:00
f01d5d5b1e refactor: move SVR.JS logo for the log viewer to src/res/logo.js file 2024-09-20 06:36:37 +02:00
37df85d84a fix: remove unused "tar" dependency from the extraction script 2024-09-20 06:35:17 +02:00
147c7c5d03 build: move utils/ directory to src/extraScripts/ 2024-09-20 06:27:28 +02:00
efdf6f1551 build: enable bundling for utility scripts 2024-09-20 06:22:04 +02:00
e474361673 fix: update the documentation URL 2024-09-14 15:48:08 +02:00
b6f6be8d43 chore: update dependencies to latest versions 2024-09-13 05:49:19 +02:00
5827d88392 chore: update dependencies to latest versions 2024-09-12 16:20:37 +02:00
b5edc0a5dd feat: change the default page CSS to match the new redesigned SVR.JS website 2024-09-11 05:51:12 +02:00
75108c7760 fix: change the code font for index, tests and licenses pages 2024-09-11 05:41:44 +02:00
1637e9dfcf feat: redesign index, tests and licenses pages 2024-09-11 05:39:13 +02:00
58d252defa test: rename web root postfixes middleware test suite to match the corresponding middleware file 2024-09-05 18:50:35 +02:00
645223451a refactor: move printing the command line usage to a separate function 2024-09-02 18:07:07 +02:00
fe6853524e test: mock "path" module in forbidden path utility function unit tests 2024-09-02 13:08:05 +02:00
0fe9a505a6 chore: ignore more OS-specific files and temporary editor files 2024-09-02 08:00:50 +02:00
dad4496488 docs: update file structure in README.md 2024-09-02 07:42:28 +02:00
ea8f17eb7d build: configure lint-staged to only lint files from tests, src, and utils directory 2024-09-01 22:18:59 +02:00
7f1dd091c0 chore: remove .eslintcache 2024-09-01 22:07:56 +02:00
1309f91e90 chore: ignore .eslintcache 2024-09-01 22:03:32 +02:00
0dea0fa4b4 build: make the commit-msg Git hook executable 2024-09-01 22:02:31 +02:00
f287289af3 build: move lint-staged configuration from package.json to separate configuration file 2024-09-01 22:01:49 +02:00
72b803de4b build: add lint-staged and update Git hooks 2024-09-01 21:58:58 +02:00
c2eed2870d style: style the code according to new Prettier rules 2024-09-01 21:54:42 +02:00
48b112f98b build: add Prettier configuration 2024-09-01 21:53:53 +02:00
896d3ee1ff build: add commitizen and "cz" script 2024-09-01 21:43:19 +02:00
d555b2af80 build: add husky and commitlint for commit validation 2024-09-01 21:39:58 +02:00
ae04419988 chore: Update dependencies 2024-09-01 19:33:47 +02:00
5570042732 Remove unnecessary mock implementations and update web root prefixes middleware test description 2024-09-01 14:17:06 +02:00
087eff332f Change the link to GitHub repository in README.md to point to the "next" branch 2024-09-01 12:24:39 +02:00
5049d22153 Temporarily change the documentation URL in the "Documentation" badge in README.md to tentative documentation URL 2024-09-01 10:07:23 +02:00
519c80f397 Convert one more string to template string 2024-09-01 09:51:29 +02:00
39a96cb339 Add link to GitHub repository to GitHub badge in README.md 2024-09-01 09:45:18 +02:00
cfe77b090c Add badges to README.md 2024-09-01 09:42:55 +02:00
99a42cc119 Add dots in README.md 2024-09-01 09:22:15 +02:00
ead2156af0 Update .gitignore 2024-09-01 09:09:16 +02:00
de7d804ca0 Lint out the static file serving and directory listing middleware test script 2024-08-31 20:50:10 +02:00
53dac33694 Add static file serving test 2024-08-31 20:48:55 +02:00
ce9550cc39 Add ".js" extension to one of the requires to tests for blocklist middleware 2024-08-31 17:28:14 +02:00
b6f17d2af4 Change the level of headings in Features section in README.md 2024-08-31 15:31:30 +02:00
65a3f373f0 Format npm scripts section in README.md 2024-08-31 14:29:12 +02:00
8a890bf4ea Open SVR.JS website in a new tab, when SVR.JS logo is clicked in README.md 2024-08-31 14:27:05 +02:00
5c96f87e7c Adjust the width of the SVR.JS logo in README.md 2024-08-31 14:18:45 +02:00
c35d913410 Change logo.png to one with "SVR.JS" name, adjust index.ejs for the new logo file, and adjust README.md 2024-08-31 14:15:55 +02:00
a3f76c56c1 Replace the width attribute with height attribute on logo in README.md 2024-08-31 14:11:44 +02:00
bb274ed045 Make the logo even smaller and remove the <big> tag in README.md 2024-08-31 14:10:53 +02:00
ad0d8b6f3d Replace CSS rule that increases font size with <big> tag in README.md 2024-08-31 14:09:33 +02:00
914fd6612b Make the logo smaller and make the description text bigger in README 2024-08-31 14:08:08 +02:00
70670ee396 Replace external logo with one in the source code 2024-08-31 14:05:41 +02:00
05e3749d53 Replace README with README.md 2024-08-31 14:04:05 +02:00
66fdced1a5 Add thumbnail cache files to .gitignore 2024-08-31 12:08:22 +02:00
4cd5cb4429 Add a newline to .gitignore 2024-08-31 12:04:04 +02:00
bffce3b1db Update README 2024-08-31 11:48:14 +02:00
70bebc1d1e Update dependencies 2024-08-30 22:48:53 +02:00
db238d8b0d Remove lockfiles from .gitignore 2024-08-30 22:21:56 +02:00
fb0da78488 Add test coverage npm script and add "coverage" folder to .gitignore 2024-08-30 22:18:22 +02:00
fdb3e32091 Add package manager lock files to .gitignore 2024-08-30 22:16:57 +02:00
dc71c3a50f Reorganize .gitignore 2024-08-30 22:15:39 +02:00
0450094c68 Add tests for middleware, add ".js" file extensions inside the require functions in tests for utility functions, make error handling in URL rewriting middleware better, and lint out static file serving and directory listing middleware 2024-08-30 22:11:16 +02:00
57ce4018dc Make the build script also pack empty directories into zip file 2024-08-30 08:06:09 +02:00
1444660d19 Fix "NaN" file sizes in directory listings 2024-08-30 06:39:06 +02:00
e293c08592 Convert even more strings to template strings 2024-08-30 06:29:32 +02:00
41901d9a27 Fix the forbidden path checking function, and add test cases, where it would fail before the fix 2024-08-29 19:37:03 +02:00
9f51366515 Simplify ES6-style functions 2024-08-29 19:27:04 +02:00
57d988831f Replace ES6-style functions in server-side JavaScript header with ES5-style functions 2024-08-29 19:19:11 +02:00
0aa4f9df2b Replace ES5-style functions with ES6-style ones 2024-08-29 19:17:28 +02:00
09e33a2265 Lint out the codebase 2024-08-29 19:15:49 +02:00
058c39ab0d Replace __dirname with process.dirname 2024-08-29 19:15:37 +02:00
979a30e938 Replace var's with let's and const's 2024-08-29 19:15:07 +02:00
3b4fd9641c Change blocklist-related commands to use .forEach() function instead of a for loop 2024-08-29 19:05:02 +02:00
7680bb8c27 Improved the test coverage for the URL sanitizer 2024-08-29 13:39:55 +02:00
ce2a73dbd3 Lint out the codebase 2024-08-28 21:46:20 +02:00
9fa194b33d Fix the regular expression in the URL parser 2024-08-28 21:45:36 +02:00
a33a86ee62 Fix bug with "ext" variable passed to .tar.gz mod handler 2024-08-28 18:28:07 +02:00
82b0510774 Optimize URL sanitizer 2024-08-28 16:17:06 +02:00
7fe503c07d Modify package.json - change the lint script (again) 2024-08-28 14:08:38 +02:00
1309e36151 Modify package.json - change the lint script 2024-08-28 14:03:31 +02:00
64b4e056cb Make sizify() function more concise and readable 2024-08-28 13:24:15 +02:00
0318047078 Optimize function related to forbidden path checking and hostname matching 2024-08-28 11:29:54 +02:00
32d29be09f Change the comment above the URL parser function 2024-08-28 11:09:26 +02:00
a4ca117020 Optimize fixNodeMojibakeURL function 2024-08-28 10:52:39 +02:00
486820e1da Converted one more string to template string 2024-08-28 07:35:27 +02:00
17614dc6c7 Clone parsed JSON into process.serverConfig using deepClone() function 2024-08-28 07:27:40 +02:00
5bd369e38d Make deepClone create a null prototype object, and make process.serverConfig a null prototype object. 2024-08-28 07:20:28 +02:00
4b37e08bb5 Optimize deepClone function 2024-08-28 07:14:13 +02:00
fb887e4122 Replace deep clone in getCustomHeaders() function with shallow clone 2024-08-27 23:13:02 +02:00
63633d1de1 Fix the deepClone function 2024-08-27 22:52:36 +02:00
67d9ae524c Optimize deepClone function even more 2024-08-27 22:51:41 +02:00
c73ce5d9f7 Optimize deepClone function and lint out the codebase 2024-08-27 22:49:05 +02:00
47ad7006e9 Replace the iteration with object spread operator 2024-08-27 22:44:21 +02:00
4506d38eac Replace some ES5-style functions with ES6-style ones 2024-08-27 21:53:37 +02:00
12a4bcdc8a Remove unneeded global flag for /\.$/ regular expression 2024-08-27 21:49:06 +02:00
30498263fc Convert a "bytes */" + filelen string to a template string 2024-08-27 21:39:51 +02:00
189fbdc617 Replace Object.assign for arrays with spread operator. 2024-08-27 21:14:58 +02:00
b3cd8d699d Replace shallow cloning with deep cloning when needed. Also create deep cloning JavaScript file and corresponding tests 2024-08-27 21:09:43 +02:00
3eb7f3d4d9 Remove unneeded code 2024-08-27 18:45:56 +02:00
bced5927fe Replace ES5-style function in request handler with ES6-style ones 2024-08-27 18:23:57 +02:00
0c286bda43 Convert "Host name rewritten" message to template string 2024-08-27 18:04:32 +02:00
8589f0a6e4 Changed URL parser from WHATWG to custom one and adapted code accordingly 2024-08-27 18:03:47 +02:00
f247e7a035 Use template strings for user agent information log messages 2024-08-27 17:43:31 +02:00
fc14cfcc1b Remove some empty lines 2024-08-27 16:20:42 +02:00
de08646bba Add unknown licenses, but display "Unknown" as a license type 2024-08-27 16:04:43 +02:00
2783516c86 Don't add unknown licenses to the license page. 2024-08-27 16:02:50 +02:00
f739f5dbbe Fix cluster shim for Bun 2024-08-27 13:57:58 +02:00
9b01d46907 Fix the code for "${name} is running without mods and server-side JavaScript enabled. Web applications may not work as expected" message 2024-08-27 12:16:21 +02:00
ff66e26af0 Change regular expression for createRegex() function 2024-08-27 12:06:23 +02:00
fae1b661ed Fix or ignore all ESLint errors 2024-08-27 11:28:24 +02:00
2872be5b5b Lint out the codebase 2024-08-27 11:03:51 +02:00
7a14e4508c Remove unused "name" constant in noproxyHandler.js 2024-08-27 10:56:49 +02:00
fd5e8ba70e Lint out the codebase 2024-08-27 10:55:24 +02:00
5a3e6765f1 Replace ES5-style functions with ES6-style ones 2024-08-27 10:54:08 +02:00
79f8f2ddf9 Make change log for specific SVR.JS version generated by the build script 2024-08-27 10:49:36 +02:00
1001d6ca41 Change the documentation URL to a tentative one 2024-08-27 10:42:22 +02:00
8de05d87b5 Make the build script not pack two "svr.js" files in the zip file. 2024-08-27 10:38:26 +02:00
6f6fb1f89f Fix 500 Internal Server Error related to URL rewriting 2024-08-27 09:42:06 +02:00
1c94a990fa Use spread operator and change ES5-style functions to ES6-style ones in cluster shim for Bun 2024-08-27 09:31:23 +02:00
4eb2987f01 Fix HTML MIME type in cached requests, regardless of the extension 2024-08-27 09:27:35 +02:00
33fde81ba1 Fix problems with loading .tar.gz mods 2024-08-27 09:15:15 +02:00
9a5d43d129 Change the ASCII logo 2024-08-26 20:01:32 +02:00
4077e6da5e Update package-lock.json 2024-08-26 19:48:03 +02:00
2f783ce1a2 Lint out the codebase 2024-08-26 19:23:52 +02:00
488bee1a95 Replace some strings with template strings 2024-08-26 19:21:52 +02:00
d92fc14991 Remove listenerEmitted flag from HTTP authentication message callback 2024-08-26 17:13:48 +02:00
5672c4a3d5 Fix static file served with wrong MIME type 2024-08-26 13:48:58 +02:00
4299a09c86 Change SVR.JS logo 2024-08-26 13:46:57 +02:00
d1523cea3c Fix the sendStatistics.js file 2024-08-26 13:32:21 +02:00
460829e0be Move code for sending the data to the statistics server to separate utility function 2024-08-26 10:14:21 +02:00
686ec4924e Replace ES5-style functions in code for sending data to a statistics server with ES6-style functions 2024-08-26 10:03:51 +02:00
f403053c44 Add README 2024-08-26 09:59:49 +02:00
9d31eac2f9 Lint out the build script 2024-08-26 09:33:02 +02:00
f074612dda Replace one more "SVR.JS" with reference to svrjs.json file 2024-08-26 09:31:50 +02:00
2e9b0ed1c5 Move default SVR.JS-generate page CSS to the separate file 2024-08-26 09:30:52 +02:00
771327cd8a Add the "folder" directory in "testdir" directory in "assets" directory with a .gitkeep file 2024-08-26 09:23:14 +02:00
5197058e32 Fix the build script and make the output zip file compatible with SVR.JS installer 2024-08-26 09:21:14 +02:00
c4c207cd98 Make the build script transpile the utilities 2024-08-26 08:24:29 +02:00
2a9b47a318 Add NOTES file 2024-08-26 08:06:58 +02:00
1108393b59 Add LICENSE file 2024-08-26 08:00:04 +02:00
25c784181d Don't assign variables to public IP requests 2024-08-26 07:58:37 +02:00
914b38e0b0 Fix 500 Internal Server Error related to HTTP authentication 2024-08-26 07:57:07 +02:00
60b0ea6933 Lint out svrpasswd.js script 2024-08-26 07:38:42 +02:00
34afacd0d2 Replace "config.json" and "./config.json" with __dirname + "/config.json" in svrpasswd.js 2024-08-26 07:38:14 +02:00
7133e750cc Rename utilities directory to utils. 2024-08-26 07:35:01 +02:00
343dce37ec Add utilities to ESLint check list, and lint out the utilities. 2024-08-26 07:34:07 +02:00
26fc7f3b08 Refactor the index.js file 2024-08-26 07:08:31 +02:00
39712a17f4 Lint out the codebase 2024-08-26 07:06:02 +02:00
1fbede69e5 Replace __dirname with process.dirname 2024-08-26 07:05:04 +02:00
9b8ccd31fc Remove commented out required modules 2024-08-26 07:04:47 +02:00
cbf11e7ed6 Replace "SVR.JS" with references to svrjs.json 2024-08-26 07:04:21 +02:00
43235f867a Discard unrecognized control messages (worker side) 2024-08-26 07:02:26 +02:00
233af94d28 Implement sending data to the statistics server 2024-08-26 07:01:52 +02:00
ef78a88a39 Implement listeningMessage() function, around with public IP obtaining 2024-08-26 07:00:08 +02:00
57f9c2ac99 Remove "TODO: configuration from config.json" comment 2024-08-26 06:37:38 +02:00
1403a37dea Remove notifications about broken mods and server-side JavaScript outside the start function 2024-08-26 06:36:57 +02:00
1f043d774a Replace code invoke the start() function with one with error handler 2024-08-26 06:35:25 +02:00
83418dbb10 Remove "TODO: after implementing clustering in new SVR.JS" comment 2024-08-26 06:34:06 +02:00
57bb2293b9 Fix "block" and "unblock" commands 2024-08-26 06:32:54 +02:00
a02e976dfe Added configuration file saving. 2024-08-26 06:26:22 +02:00
87cecd6cf3 Remove more TODO comments 2024-08-26 06:23:24 +02:00
9d1e6e82ba Remove some TODO comments 2024-08-26 06:21:50 +02:00
cc859e0319 Enable saving the configuration file when process is exiting 2024-08-26 06:20:23 +02:00
601eed5f62 Lint out the codebase 2024-08-26 06:19:53 +02:00
a82f5ac010 Discard unrecognized control messages (main-side) 2024-08-26 06:19:27 +02:00
96dfe853d4 Implement configuration file saving interval 2024-08-26 06:17:51 +02:00
ab98415030 Remove commented code snippet that's already in src/handlers/serverErrorHander.js file 2024-08-26 06:12:45 +02:00
662528847a Add termination of unused workers. 2024-08-26 06:11:19 +02:00
083b2794df Uncomment the code related to sending the "stop" command to workers when Ctrl+C is pressed 2024-08-25 20:45:40 +02:00
0eb6cf8c07 Fix --single-threaded flag 2024-08-25 20:38:35 +02:00
fca7fb78d6 Add "restart" command placeholder. 2024-08-25 20:37:25 +02:00
4a528120be Fix 3eacbdb397 commit 2024-08-25 20:21:48 +02:00
3eacbdb397 Add handler for "\x12CLOSE" messages 2024-08-25 20:20:15 +02:00
3de85443d5 Add server console, and fixed listening error message handler 2024-08-25 20:18:35 +02:00
a55b123926 Lint out the codebase 2024-08-25 19:46:17 +02:00
adfd3ff809 Enable hangup check and restart 2024-08-25 19:45:02 +02:00
e85f53197c Add "let" before "i=0" for logo iterative loop 2024-08-25 19:40:27 +02:00
9db7ffdaec Add reqcounterKillReq variable 2024-08-25 19:39:49 +02:00
99583731d9 Move getWorkerCountToFork and forkWorkers functions to global scope 2024-08-25 19:37:22 +02:00
4f565d1550 Add addListenersToWorker() function 2024-08-25 19:35:58 +02:00
a92616b0a4 Partially implemented clustering. 2024-08-25 19:28:20 +02:00
1f5602626a Add stop command 2024-08-25 19:23:01 +02:00
b36a301e03 Add close and open commands. 2024-08-25 19:20:15 +02:00
85debce9c9 Lint out the codebase 2024-08-25 19:17:54 +02:00
0ea53fdf96 Lint out the codebase, add SVRJSFork() function, networking-related code, and ipSubnetUtils.js utility functions file and corresponding unit tests 2024-08-25 19:17:19 +02:00
2c990a6907 Lint out the codebase 2024-08-25 18:59:16 +02:00
2c271bccdc Add portions of real start() function, and logo resource JavaScript file. 2024-08-25 18:57:46 +02:00
54de936aae Lint out the codebase 2024-08-25 18:02:18 +02:00
bdc11fa3dc Replace var's with const's in OCSP stapling handler 2024-08-25 18:02:02 +02:00
9b03abc646 Add OCSP stapling support 2024-08-25 17:59:52 +02:00
95416f4604 Lint out the codebase 2024-08-25 17:58:01 +02:00
58cb60fb8f Change the way of adding process message listeners, and add process message listener to server error handler. 2024-08-25 17:57:23 +02:00
45815957d5 Create the server error handler and temporary startup script. 2024-08-25 17:51:25 +02:00
489ec9741a Add process.serverConfig.productName 2024-08-25 17:15:40 +02:00
67658ad329 Lint out the codebase 2024-08-25 17:15:00 +02:00
eaafa8cc41 Add certificate and SNI loading. 2024-08-25 17:11:31 +02:00
b758e11513 Add secondary HTTP server and handlers for primary HTTP server 2024-08-25 17:04:49 +02:00
7b4612e8b0 Move commands in index.js 2024-08-25 16:51:25 +02:00
98c36d2b64 Add commands 2024-08-25 16:47:26 +02:00
a241af753e Server crashes now results in exit code of 1 if errno is not specified. 2024-08-25 16:35:19 +02:00
984c94cd00 Lint out the codebase 2024-08-25 16:25:25 +02:00
44e4c15b30 Fix parsePostData function in legacy mod wrapper. 2024-08-25 16:24:34 +02:00
21b5f46e9e Add process exit and crash handlers. 2024-08-25 16:23:16 +02:00
6958ec6c94 Remove commented out addMiddleware function. 2024-08-25 15:55:36 +02:00
7d4dcdd2a6 Fix problems executing SVR.JS 2.x and 3.x mods, and server-side JavaScript 2024-08-25 15:53:45 +02:00
6302bb0044 Fix problem with hexstrbase64 2024-08-25 15:50:56 +02:00
8d825403b9 Add default server-side JavaScript from SVR.JS 3.15.6 to assets directory. 2024-08-25 15:48:12 +02:00
f05fb50625 Add support for SVR.JS 2.x and 3.x server-side JavaScript. 2024-08-25 15:47:12 +02:00
23508a5292 Added support for SVR.JS 2.x and 3.x mods. 2024-08-25 15:40:53 +02:00
85e15e0517 Change ESLint configuration to use CommonJS modules instead of ES modules. 2024-08-25 14:27:22 +02:00
eebada191b Lint out the codebase 2024-08-25 14:24:18 +02:00
6461728eee Fix the description for URL parser test suite 2024-08-25 14:14:22 +02:00
88554a05d2 Modify the description for URL parser test suite 2024-08-25 14:13:27 +02:00
2884c33c8c Rename urlParser files to urlParserLegacy 2024-08-25 14:12:13 +02:00
aa4e4d0c15 Add "Load SVR.JS mods as middleware" comment. 2024-08-25 14:05:19 +02:00
9d0a156c46 Add mod loader 2024-08-25 14:02:45 +02:00
ed71618856 Lint out SHA256 function 2024-08-25 13:18:19 +02:00
b5de4b79c5 Make generateServerString() function replace spaces in name property of svrjs.json with dashes. 2024-08-25 13:13:16 +02:00
7decde6b58 Lint out the codebase 2024-08-25 13:10:28 +02:00
fcec27fee1 Replace "SVR.JS" with references to svrjs.json file 2024-08-25 13:09:58 +02:00
04ab80cc95 Lint out the codebase 2024-08-25 12:56:36 +02:00
b79e165bed Change proxy handler to end the socket with 500 Internal Server Error only when it is not destroyed. 2024-08-25 12:55:34 +02:00
5b91c21973 Add CONNECT request (proxy request) handler. 2024-08-25 12:54:36 +02:00
ddae2e468e Fix Cannot assign to "currentMiddleware" because it is a constant error. 2024-08-25 12:38:15 +02:00
4b02efdeba Add proxySafe flag to middleware. 2024-08-25 12:37:14 +02:00
fb7c5ed854 Move core middleware to the request handler. 2024-08-25 12:33:11 +02:00
988ff7c29c Lint out the codebase 2024-08-25 11:57:45 +02:00
314cf247d4 Fix server string not displaying in the bad request response. 2024-08-25 11:55:42 +02:00
60615cdb5a Move handlers to JavaScript files in handler directory. 2024-08-25 11:47:43 +02:00
e9e3bf5377 Fix eslint script to also lint index.js file. 2024-08-25 11:38:11 +02:00
726d161a64 Add client error handler, and lint out index.js 2024-08-25 11:32:03 +02:00
0085ff740d Change reqerrhandler placeholder to emitting clientError event on the server. 2024-08-25 10:57:37 +02:00
478c3002f0 Remove "TODO: default handler" comment 2024-08-25 10:33:29 +02:00
bdd3e56bb1 Make the build script also copy hidden directories in assets directory. 2024-08-25 10:32:08 +02:00
0ceded2256 Add static file serving and directory listing functionality. 2024-08-25 10:23:37 +02:00
b5ad179097 Replace "SVR.JS" in status page with reference to svrjs.json 2024-08-25 09:47:36 +02:00
695816b9d0 Lint out the codebase. 2024-08-25 09:45:42 +02:00
55d5efe54f Add default handler checks, server status page, sizify() utility function, and move counters from core.js middleware to index.js. 2024-08-25 09:44:53 +02:00
8a54834276 Lint out the codebase. 2024-08-25 09:25:06 +02:00
9bb77f9d98 Add more tests for ipBlockList function. 2024-08-25 09:23:55 +02:00
5d463c9f11 Fix a 500 HTTP error code related to URL rewriting functionality. 2024-08-25 09:14:38 +02:00
89e9b35829 Add ipBlockList utility function, blocklist functionality, and read from config.json functionality. 2024-08-25 09:12:39 +02:00
2f836231f4 Do some config.json TODO's 2024-08-25 08:32:49 +02:00
41bea903bb Remove node_modules (they are ignored in .gitignore) 2024-08-25 07:23:45 +02:00
bafc08d965 Lint out the codebase. 2024-08-25 07:17:34 +02:00
5fab894caf Move parts of middleware that checks for forbidden paths to separate utils file, and add tests for them. 2024-08-25 07:13:41 +02:00
983133017f Add some TODO comments for middleware. 2024-08-24 20:47:23 +02:00
e94391f197 Lint out the codebase. 2024-08-24 20:45:17 +02:00
2075d41ab3 Fix URL sanitiation and rewriting-related functions removing query strings and hashes. 2024-08-24 20:44:43 +02:00
3613aa92d2 Add trailing slash redirection middleware. 2024-08-24 20:40:28 +02:00
c1900ee128 Add non-standard codes and HTTP authentication middleware, and SHA256 utility function. 2024-08-24 20:32:06 +02:00
eb0d30f307 Lint out the codebase. 2024-08-24 19:50:01 +02:00
8be7735e71 Refactor code for --reset parameter again. 2024-08-24 19:49:36 +02:00
2e8a4fb042 Refactor command line argument parsing code, and split deleteFolderRecursive function into one JavaScript file. 2024-08-24 19:47:48 +02:00
918c0d3646 Added missing "testdir" directory to assets folder. 2024-08-24 19:43:40 +02:00
07c7199adb Add log, mods, and temp directory creation in output directory 2024-08-24 19:43:02 +02:00
b9bb16b0ed Add command line options 2024-08-24 19:41:13 +02:00
ca5c22c9c3 Move required modules in index.js 2024-08-24 19:30:25 +02:00
11e7247869 Replace __dirname with process.dirname (declared as __dirname in index.js) 2024-08-24 19:29:12 +02:00
24b161b0ed Replace var's with const's in the middleware that checks for forbidden paths. 2024-08-24 17:48:55 +02:00
519988fbdb Lint out the codebase. 2024-08-24 17:46:55 +02:00
67fec5fe98 Add middleware that checks for forbidden paths. Also add some more placeholder config.json variables. 2024-08-24 17:44:25 +02:00
d688166022 Add middleware responsible for setting response headers (res.setHeader function). 2024-08-24 17:32:27 +02:00
f552b34878 Lint out the codebase. 2024-08-24 17:23:06 +02:00
f48125f4f2 Move matchHostname function to separate source file, and add unit tests for the function. 2024-08-24 17:21:09 +02:00
519e68465a Add SVR.JS name and documentation URL to svrjs.json file. 2024-08-24 17:13:59 +02:00
1161256ab9 Create config.generateServerString() function and src/utils/generateServerString.js file. 2024-08-24 17:06:34 +02:00
1a7e602198 Change version from Nightly-GitMain to Nightly-GitNext. 2024-08-24 16:59:05 +02:00
e1b6ca8803 Change serverconsole.js, so it no longer exports the constructor, just serverconsole object. 2024-08-24 16:58:27 +02:00
3a8cdccc0d Replace configJSON with process.serverConfig. 2024-08-24 16:55:44 +02:00
7a658613fe Added process.singleThreaded flag. 2024-08-24 16:54:28 +02:00
a3e4ee2328 Replace some var's with const's in URL rewrite and web root postfix middleware. 2024-08-24 08:24:39 +02:00
2481e3ed58 Add URL rewriting middleware, and lint out some other middleware. 2024-08-24 08:22:49 +02:00
a49dba73fe Lint out the codebase. 2024-08-24 08:07:31 +02:00
1929641ba7 Add web root postfixes middleware 2024-08-24 08:02:11 +02:00
a7acd9e1f4 Replace "callServerError" with "res.error" in the core middleware. 2024-08-23 22:47:27 +02:00
cbd3ab0cd0 Adapted redirectes middleware function to new SVR.JS API. 2024-08-23 22:19:41 +02:00
53024dfdab Added redirects middleware. 2024-08-23 22:13:58 +02:00
0c9013feac Added res.head, res.foot, res.responseWrite, and rejection of expectations. 2024-08-23 22:10:49 +02:00
881502d897 Disable console.log for non-TTY stdout 2024-08-23 21:58:26 +02:00
00d01e7cf5 Replace "var" with "let" in core middleware, and add req.authUser set to null. 2024-08-23 21:46:08 +02:00
0e8b8392a4 Replace the placeholder fromMain with estimated one. 2024-08-23 21:41:31 +02:00
d5c4e9aeaf Fix the baf38ee353 commit. 2024-08-23 21:35:58 +02:00
baf38ee353 Add "throw wwwrootError", for now. 2024-08-23 21:34:58 +02:00
be33f83ed1 Added default config.json setting from SVR.JS 3.x, and fixed core middleware. 2024-08-23 21:33:26 +02:00
2dda7d73ab Replaced responseEnd() function (which doesn't exist) with res.end() function for now 2024-08-23 21:27:36 +02:00
dd344ecca3 Expand core middleware, add URL sanitizer middleware, and add logging to the middleware error handling. 2024-08-23 21:25:23 +02:00
000ae75904 Add middleware functionality. Also replace JSON.parse with JSON.stringify with Object.assign. 2024-08-23 20:43:09 +02:00
ee4c3dcda6 Add some core functionality to SVR.JS 2024-08-23 19:58:15 +02:00
fbdb3f93d4 Add URL sanitizer. Also add eslint-plugin-jest to ESLint configuration. 2024-08-23 17:43:37 +02:00
5171855776 Add more npm scripts. 2024-08-23 17:21:52 +02:00
c9db45c0fe The build script now builds SVR.JS .zip archive. 2024-08-23 17:18:18 +02:00
6564ccbe83 Rewritten SVR.JS from scratch - the build system for the new SVR.JS is set up, but the source is just placeholders. 2024-08-23 17:05:10 +02:00
603 changed files with 22574 additions and 65352 deletions

27
.gitignore vendored
View file

@ -1,2 +1,25 @@
temp
log
# Build output
/dist/
/out/
# Temporary files used by build script
/generatedAssets/
# Dependencies
node_modules/
# Test coverage
/coverage/
# ESLint cache
.eslintcache
# OS-specific files
.DS_Store
Thumbs.db
.Spotlight-V100
.Trashes
# Temporary files used by the editor
*.swp
*.swo

2
.husky/commit-msg Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
npx --no -- commitlint --edit "$1"

2
.husky/pre-commit Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
npx lint-staged

149
README.md Normal file
View file

@ -0,0 +1,149 @@
<p align="center">
<a href="https://svrjs.org" target="_blank">
<img src="assets/logo.png" width="384">
</a>
</p>
<p align="center">
<b>SVR.JS</b> - a web server running on Node.JS<br/>
It's free as in freedom, scalable, secure, and configurable.
</p>
<p align="center">
<a href="https://svrjs.org/docs" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/Documentation-green"></a>
<a href="https://svrjs.org" target="_blank"><img alt="Website" src="https://img.shields.io/website?url=https%3A%2F%2Fsvrjs.org"></a>
<a href="https://hub.docker.com/r/svrjs/svrjs" target="_blank"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/svrjs/svrjs"></a>
<a href="https://github.com/svr-js/svrjs" target="_blank"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/svr-js/svrjs"></a>
<a href="https://x.com/SVR_JS" target="_blank"><img alt="X (formerly Twitter) Follow" src="https://img.shields.io/twitter/follow/SVR_JS"></a>
<a href="https://mastodon.social/@svrjs" target="_blank"><img alt="Mastodon Follow" src="https://img.shields.io/mastodon/follow/111643338718098121"></a>
</p>
* * *
## Features
### Static file handling
* Static file serving (even above 2GB)
* Directory listing serving
* Protection against path traversal
* Content-Range support (for non-HTML static files; also for HTML files from SVR.JS 3.15.1)
* Serving from web root different than SVR.JS installation directory
### Security
* HTTPS support
* HTTP/2 support
* Built-in block list
* Protection against HTTP authentication brute force attacks (from SVR.JS 3.4.8; enabled by default)
* Ability to hide server version
* OCSP stapling support (from SVR.JS 3.4.9)
### Configuration and customization
* Configurability via _config.json_ file
* Expandability via server-side JavaScript and mods
* Ability to serve non-standard error pages
* URL rewriting engine
* Event driven architecture powered by Node.JS, along with clustering.
### Compression and content delivery
* Brotli, gzip and Deflate HTTP compression (Brotli supported since SVR.JS 3.4.11)
* SNI (Server Name Indication) support
* ETag support (from SVR.JS 3.6.1)
* Reverse proxy functionality (requires reverse-proxy-mod SVR.JS mod)
* Forward proxy functionality (requires forward-proxy-mod SVR.JS mod)
### Authentication and access control
* HTTP basic authentication
### Gateway interfaces
* CGI (Common Gateway Interface) support (requires RedBrick mod)
* SCGI (Simple Common Gateway Interface) support (requires OrangeCircle mod)
* JSGI (JavaScript Gateway Interface) support (requires YellowSquare mod)
* PHP support (PHP-CGI with RedBrick mod or PHP-FPM with GreenRhombus mod)
### Additional functionality
* Logging
* Ability to display IP addresses, from which originally request was made (from reverse proxies; via X-Forwarded-For)
## Building SVR.JS
To build SVR.JS, you need Node.JS 18.0.0 or newer.
Before building SVR.JS, install the npm packages using this command:
```bash
npm install
```
After installing the packages, build SVR.JS with this command:
```bash
npm run build
```
After running the command, you will get bundled SVR.JS script, around with built-in utilities and assets in the `dist` directory. You will also get a zip archive in `out` directory, that can be installed using SVR.JS installer
## Installation (built from source)
To install SVR.JS you just built from the source code, you can install it via SVR.JS installer for GNU/Linux or manually.
If you want to install SVR.JS manually, you can read the [server documentation](https://svrjs.org/docs).
If you want to install via SVR.JS installer for GNU/Linux, run this command:
```bash
curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh > /tmp/installer.sh && sudo bash /tmp/installer.sh
```
You will be then prompted about the type of installation. Choose option “2” to install SVR.JS from the zip archive, and type in the path to the zip archive (hint: it is in the `out` directory).
After typing the path, you may be prompted to install dependencies via GNU/Linux distributions package manager. Proceed with the installation of dependencies.
After installation, SVR.JS should be listening at http://localhost.
## SVR.JS documentation
You can read the [SVR.JS documentation](https://svrjs.org/docs) to get information on how to use SVR.JS.
## npm scripts
- To build SVR.JS along with the zip archive, run `npm run build`.
- To check SVR.JS code for errors with ESLint, run `npm run lint`.
- To fix and beautify SVR.JS code with ESLint and Prettier, run `npm run lint:fix`.
- To run SVR.JS from the "dist" folder, run `npm start`.
- To test SVR.JS itself, run `npm run dev`. This removes existing configuration.
- To perform unit tests with Jest, run `npm test`.
## File structure
The file structure for SVR.JS source code looks like this:
- .husky - Git hooks
- assets - files to copy into dist folder and to the archive
- dist - contains SVR.JS, assets, and SVR.JS utiltiies
- generatedAssets - assets generated by the build script
- out - contains SVR.JS zip archive
- src - contains SVR.JS source code
- index.js - entry point
- extraScripts - SVR.JS extra scripts (each script has a single file)
- handlers - handlers for servers
- middleware - built-in middleware for servers
- res - resources
- utils - utility functions
- templates - EJS templates for build script to use
- tests - Jest unit tests
- middleware - tests for middleware
- utils - unit tests for utility functions
- commitlint.config.js - commitlint configuration
- esbuild.config.js - the build script
- eslint.config.js - ESLint configuration
- jest.config.js - Jest configuration
- lint-staged.config.js - lint-staged configuration
- prettier.config.js - Prettier configuration
- svrjs.json - SVR.JS version, name, documentation URL, and statistics server collection endpoint URL
## Contribute
See [SVR.JS contribution page](https://svrjs.org/contribute) for details.
## License
This project is licensed under the MIT/X11 License - see the [LICENSE](LICENSE) file for details.

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Inspect JS
Copyright (c) 2018-2024 SVR.JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -59,5 +59,6 @@
"disableTrailingSlashRedirects": false,
"environmentVariables": {},
"allowDoubleSlashes": false,
"optOutOfStatisticsServer": false
"optOutOfStatisticsServer": false,
"disableConfigurationSaving": false
}

BIN
assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
assets/powered.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

3
commitlint.config.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
extends: ["@commitlint/config-conventional"]
};

365
esbuild.config.js Normal file
View file

@ -0,0 +1,365 @@
const esbuild = require("esbuild");
const esbuildCopyPlugin = require("esbuild-plugin-copy");
const fs = require("fs");
const zlib = require("zlib");
const ejs = require("ejs");
const archiver = require("archiver");
const chokidar = require("chokidar");
const svrjsInfo = JSON.parse(fs.readFileSync(__dirname + "/svrjs.json"));
const { version } = svrjsInfo;
const isDev = process.env.NODE_ENV == "development";
// Create the dist directory if it doesn't exist
if (!fs.existsSync(__dirname + "/dist")) fs.mkdirSync(__dirname + "/dist");
if (!fs.existsSync(__dirname + "/dist/log"))
fs.mkdirSync(__dirname + "/dist/log");
if (!fs.existsSync(__dirname + "/dist/mods"))
fs.mkdirSync(__dirname + "/dist/mods");
if (!fs.existsSync(__dirname + "/dist/temp"))
fs.mkdirSync(__dirname + "/dist/temp");
// Create the out directory if it doesn't exist and if not building for development
if (!isDev && !fs.existsSync(__dirname + "/out")) fs.mkdirSync(__dirname + "/out");
function generateAssets() {
// Variables from "svrjs.json" file
const svrjsInfo = JSON.parse(fs.readFileSync(__dirname + "/svrjs.json"));
const { name, version, documentationURL, changes } = svrjsInfo;
// Dependency-related variables
const dependencies =
JSON.parse(fs.readFileSync(__dirname + "/package.json")).dependencies || {};
const requiredDependencyList = Object.keys(dependencies);
let dependencyList = Object.keys(dependencies);
// Function to find and add all dependencies into the dependencyList array.
const findAllDependencies = (curList) => {
// If no curList parameter is specified, use dependencyList.
if (!curList) curList = dependencyList;
curList.forEach((dependency) => {
const newDeplist = Object.keys(
JSON.parse(
fs
.readFileSync(
__dirname +
"/node_modules/" +
dependency.replace(/\/\.\./g, "") +
"/package.json"
)
.toString()
).dependencies || {}
);
let noDupNewDepList = [];
newDeplist.forEach((dep) => {
// Ignore duplicates
if (dependencyList.indexOf(dep) == -1) {
noDupNewDepList.push(dep);
dependencyList.push(dep);
}
});
// Call findAllDependencies for the dependency list.
findAllDependencies(noDupNewDepList);
});
};
// Get list of all dependencies
findAllDependencies();
dependencyList = dependencyList.sort();
// Create and populate an object, where whenever the dependencies are required are listed.
let dependenciesAreRequired = {};
dependencyList.forEach((dependency) => {
dependenciesAreRequired[dependency] = false;
});
requiredDependencyList.forEach((dependency) => {
dependenciesAreRequired[dependency] = true;
});
// Create the template functions using EJS
const layoutTemplate = ejs.compile(
fs.readFileSync(__dirname + "/templates/layout.ejs").toString()
);
const testsTemplate = ejs.compile(
fs.readFileSync(__dirname + "/templates/tests.ejs").toString()
);
const indexTemplate = ejs.compile(
fs.readFileSync(__dirname + "/templates/index.ejs").toString()
);
const licensesTemplate = ejs.compile(
fs.readFileSync(__dirname + "/templates/licenses.ejs").toString()
);
const licenseElementTemplate = ejs.compile(
fs.readFileSync(__dirname + "/templates/licenseElement.ejs").toString()
);
let licenseElements = "";
// Generate the licenses list in HTML
dependencyList.forEach((dependency) => {
const packageJSON = JSON.parse(
fs
.readFileSync(
__dirname +
"/node_modules/" +
dependency.replace(/\/\.\./g, "") +
"/package.json"
)
.toString()
);
licenseElements += licenseElementTemplate({
moduleName: packageJSON.name,
name: name,
license: packageJSON.license,
description: packageJSON.description || "No description",
author: packageJSON.author ? packageJSON.author.name : packageJSON.author,
required: dependenciesAreRequired[dependency]
});
});
// Generate pages
const licensesPage = layoutTemplate({
title: name + " " + version + " Licenses",
content: licensesTemplate({
name: name,
version: version,
licenses: licenseElements
})
});
const testsPage = layoutTemplate({
title: name + " " + version + " Tests",
content: testsTemplate({
name: name,
version: version
})
});
const indexPage = layoutTemplate({
title: name + " " + version,
content: indexTemplate({
name: name,
version: version,
documentationURL: documentationURL,
changes: changes
})
});
// Create the generated assets directory if it doesn't exist
if (!fs.existsSync(__dirname + "/generatedAssets"))
fs.mkdirSync(__dirname + "/generatedAssets");
// Create a licenses directory
if (!fs.existsSync(__dirname + "/generatedAssets/licenses"))
fs.mkdirSync(__dirname + "/generatedAssets/licenses");
// Write to HTML files
fs.writeFileSync(__dirname + "/generatedAssets/index.html", indexPage);
fs.writeFileSync(__dirname + "/generatedAssets/tests.html", testsPage);
fs.writeFileSync(
__dirname + "/generatedAssets/licenses/index.html",
licensesPage
);
}
if (!isDev) {
// Generate assets
generateAssets();
} else {
// Generate assets with watching
const watcher = chokidar.watch([
__dirname + "/templates",
__dirname + "/package.json",
__dirname + "/svrjs.json"
]);
watcher.on("change", () => {
try {
generateAssets();
} catch (err) {
console.error("There is a problem when regenerating assets!");
console.error("Stack:");
console.error(err.stack);
}
}).on("ready", () => {
try {
generateAssets();
} catch (err) {
console.error("There is a problem when regenerating assets!");
console.error("Stack:");
console.error(err.stack);
}
});
}
if (!isDev) {
// Bundle the source and copy the assets using esbuild and esbuild-plugin-copy
esbuild
.build({
entryPoints: ["src/index.js"],
bundle: true,
outfile: "dist/svr.js",
platform: "node",
target: "es2017",
plugins: [
esbuildCopyPlugin.copy({
resolveFrom: __dirname,
assets: {
from: ["./assets/**/*"],
to: ["./dist"]
},
globbyOptions: {
dot: true
}
}),
esbuildCopyPlugin.copy({
resolveFrom: __dirname,
assets: {
from: ["./generatedAssets/**/*"],
to: ["./dist"]
}
})
]
})
.then(() => {
const utilFilesAndDirectories = fs.existsSync(
__dirname + "/src/extraScripts"
)
? fs.readdirSync(__dirname + "/src/extraScripts")
: [];
const utilFiles = [];
utilFilesAndDirectories.forEach((entry) => {
if (fs.statSync(__dirname + "/src/extraScripts/" + entry).isFile())
utilFiles.push(entry);
});
// Transpile utilities using esbuild
esbuild
.build({
entryPoints: utilFiles.map(
(filename) => "src/extraScripts/" + filename
),
bundle: true,
outdir: "dist",
platform: "node",
target: "es2017"
})
.then(() => {
const archiveName =
"svr.js." +
version.toLowerCase().replace(/[^0-9a-z]+/g, ".") +
".zip";
const output = fs.createWriteStream(
__dirname + "/out/" + archiveName
);
const archive = archiver("zip", {
zlib: { level: 9 }
});
archive.pipe(output);
// Add everything in the "dist" directory except for "svr.js" and "svr.compressed"
archive.glob("**/*", {
cwd: __dirname + "/dist",
ignore: ["svr.js", "svr.compressed"],
dot: true
});
// Create a stream for the "svr.compressed" file
const compressedSVRJSFileStream = fs
.createReadStream(__dirname + "/dist/svr.js")
.pipe(
zlib.createGzip({
level: 9
})
);
archive.append(compressedSVRJSFileStream, { name: "svr.compressed" });
archive.append(
'const zlib = require("zlib");\nconst fs = require("fs");\nconsole.log("Deleting SVR.JS stub...");\nfs.unlinkSync("svr.js");\nconsole.log("Decompressing SVR.JS...");\nconst script = zlib.gunzipSync(fs.readFileSync("svr.compressed"));\nfs.unlinkSync("svr.compressed");\nfs.writeFileSync("svr.js",script);\nconsole.log("Restart SVR.JS to get server interface.");',
{ name: "svr.js" }
);
archive.finalize();
})
.catch((err) => {
throw err;
});
})
.catch((err) => {
throw err;
});
} else {
// Bundle the source and copy the assets using esbuild and esbuild-plugin-copy with watching
esbuild
.context({
entryPoints: ["src/index.js"],
bundle: true,
outfile: "dist/svr.js",
platform: "node",
target: "es2017",
plugins: [
esbuildCopyPlugin.copy({
resolveFrom: __dirname,
assets: {
from: ["./assets/**/*"],
to: ["./dist"]
},
globbyOptions: {
dot: true
},
watch: {}
}),
esbuildCopyPlugin.copy({
resolveFrom: __dirname,
assets: {
from: ["./generatedAssets/**/*"],
to: ["./dist"]
},
watch: {}
})
]
})
.then((ctx) => {
ctx
.watch()
.then(() => {
const utilFilesAndDirectories = fs.existsSync(
__dirname + "/src/extraScripts"
)
? fs.readdirSync(__dirname + "/src/extraScripts")
: [];
const utilFiles = [];
utilFilesAndDirectories.forEach((entry) => {
if (fs.statSync(__dirname + "/src/extraScripts/" + entry).isFile())
utilFiles.push(entry);
});
// Transpile utilities using esbuild
esbuild
.context({
entryPoints: utilFiles.map(
(filename) => "src/extraScripts/" + filename
),
bundle: true,
outdir: "dist",
platform: "node",
target: "es2017"
})
.then((ctx) => {
ctx
.watch()
.then(() => {
console.log("Watching for changes in SVR.JS source code...");
})
.catch((err) => {
throw err;
});
})
.catch((err) => {
throw err;
});
})
.catch((err) => {
throw err;
});
})
.catch((err) => {
throw err;
});
}

30
eslint.config.js Normal file
View file

@ -0,0 +1,30 @@
const globals = require("globals");
const pluginJs = require("@eslint/js");
const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended");
const jest = require("eslint-plugin-jest");
module.exports = [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs"
}
},
{
files: ["tests/*.test.js", "tests/**/*.test.js"],
...jest.configs['flat/recommended'],
rules: {
...jest.configs['flat/recommended'].rules,
'jest/prefer-expect-assertions': 'off',
}
},
{
languageOptions: {
globals: {
...globals.node
}
}
},
pluginJs.configs.recommended,
eslintPluginPrettierRecommended
];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,167 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS Nightly-GitMain</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
html {
background-color: #dfffdf;
color: #000000;
font-family: FreeSans, Helvetica, Tahoma, Verdana, Arial, sans-serif;
margin: 0.75em;
text-align: center;
}
body {
background-color: #ffffff;
padding: 0.5em 0.5em 0.1em;
margin: 0.5em auto;
width: 90%;
max-width: 800px;
-webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15)
}
h1 {
text-align: center;
font-size: 2.25em;
margin: 0.3em 0 0.5em
}
pre,
code {
background-color: #dfffdf;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
display: block;
padding: 0.2em;
font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Hack, Menlo, Consolas, Monaco, monospace;
font-size: 0.85em;
margin: auto;
width: 95%;
}
@media screen and (prefers-color-scheme: dark) {
html {
background-color: #002000;
color: #ffffff
}
body {
background-color: #000f00;
-webkit-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
-moz-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15)
}
pre,
code {
background-color: #002000;
-webkit-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
-moz-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1)
}
a {
color: #ffffff
}
a:hover {
color: #00ff00
}
}
</style>
</head>
<body>
<h1>Welcome to SVR.JS Nightly-GitMain</h1>
<div style="background-color: #ffff00; color: #000000; border-color: #ff7f00; border-width: 5px; border-style: solid; padding: 5px; display: inline-block;">
<b style="font-size: 26px">WARNING!</b><br />
This version is only for test purposes and may be unstable.
</div>
<br />
<img src="/logo.png" style="width: 224px; max-width: 100%;" />
<br />
<p>If you see this page that means that the server is working properly. You can further configure the server and replace <i>index.html</i> and <i>tests.html</i> pages with custom ones.</p>
<p>Default <i>config.json</i> looks like this:</p>
<code style="padding: 5px; text-align: left; display: block; display: inline-block;">
<pre style="margin: 0.2em; white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; word-break: break-all; word-break: break-word; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;">{
"users": [],
"port": 80,
"pubport": 80,
"page404": "404.html",
"timestamp": 1709477722479,
"blacklist": [],
"nonStandardCodes": [],
"enableCompression": true,
"customHeaders": {},
"enableHTTP2": false,
"enableLogging": true,
"enableDirectoryListing": true,
"enableDirectoryListingWithDefaultHead": false,
"serverAdministratorEmail": "[no contact information]",
"stackHidden": false,
"enableRemoteLogBrowsing": false,
"exposeServerVersion": true,
"disableServerSideScriptExpose": true,
"rewriteMap": [
{
"definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
"replacements": [
{
"regex": "/^\\/serverSideScript\\.js($|[#?])/",
"replacement": "/NONEXISTENT_PAGE$1"
}
]
},
{
"definingRegex": "/^\\/testdir_rewritten(?:$|[\\/?#])/",
"replacements": [
{
"regex": "/^\\/testdir_rewritten($|[\\/?#])/",
"replacement": "/testdir$1"
}
]
}
],
"allowStatus": true,
"dontCompress": [
"/.*\\.ipxe$/",
"/.*\\.(?:jpe?g|png|bmp|tiff|jfif|gif|webp)$/",
"/.*\\.(?:[id]mg|iso|flp)$/",
"/.*\\.(?:zip|rar|bz2|[gb7x]z|lzma|tar)$/",
"/.*\\.(?:mp[34]|mov|wm[av]|avi|webm|og[gv]|mk[va])$/"
],
"enableIPSpoofing": false,
"secure": false,
"sni": {},
"disableNonEncryptedServer": false,
"disableToHTTPSRedirect": false,
"enableETag": true,
"disableUnusedWorkerTermination": false,
"rewriteDirtyURLs": true,
"errorPages": [],
"useWebRootServerSideScript": true,
"exposeModsInErrorPages": true,
"disableTrailingSlashRedirects": false,
"environmentVariables": {},
"allowDoubleSlashes": false,
"optOutOfStatisticsServer": false
}</pre>
</code>
<p>Changes:</p>
<ul style="display: inline-block; margin: 0;">
<li><i>INSERT CHANGES THERE</i></li>
</ul>
<p>
<a href="/tests.html">Tests</a><br />
<a href="/licenses/">Licenses</a><br />
<a href="/svrjsstatus.svr">SVR.JS status page</a><br />
<a href="https://svrjs.org/docs">SVR.JS documentation</a>
</p>
<img src="/powered.png" />
</body>
</html>

5
jest.config.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
testEnvironment: 'node',
testMatch: ['**/tests/**/*.test.js'],
verbose: true,
};

View file

@ -1,21 +0,0 @@
Copyright 20092014 Contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

View file

View file

@ -1,19 +0,0 @@
Copyright (c) 2010-2014 Caolan McMahon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,19 +0,0 @@
Copyright Fedor Indutny, 2015.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2024 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2011-present Felix Geisendörfer, and contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,20 +0,0 @@
Copyright (c) 2013 Raynos.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Inspect JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Inspect JS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2016 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) Jordan Harband and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,9 +0,0 @@
MIT License
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,476 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS Nightly-GitMain Licenses</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
html {
background-color: #dfffdf;
color: #000000;
font-family: FreeSans, Helvetica, Tahoma, Verdana, Arial, sans-serif;
margin: 0.75em;
text-align: center;
}
body {
background-color: #ffffff;
padding: 0.5em 0.5em 0.1em;
margin: 0.5em auto;
width: 90%;
max-width: 800px;
-webkit-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15);
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15)
}
h1 {
text-align: center;
font-size: 2.25em;
margin: 0.3em 0 0.5em
}
pre,
code {
background-color: #dfffdf;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
display: block;
padding: 0.2em;
font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Hack, Menlo, Consolas, Monaco, monospace;
font-size: 0.85em;
margin: auto;
width: 95%;
}
@media screen and (prefers-color-scheme: dark) {
html {
background-color: #002000;
color: #ffffff
}
body {
background-color: #000f00;
-webkit-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
-moz-box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15);
box-shadow: 0 5px 10px 0 rgba(127, 127, 127, 0.15)
}
pre,
code {
background-color: #002000;
-webkit-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
-moz-box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1);
box-shadow: 0 2px 4px 0 rgba(127, 127, 127, 0.1)
}
a {
color: #ffffff
}
a:hover {
color: #00ff00
}
}
</style>
</head>
<body>
<h1>SVR.JS Nightly-GitMain Licenses</h1>
<h2>SVR.JS Nightly-GitMain</h2>
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
MIT License<br/>
<br/>
Copyright (c) 2018-2024 SVR.JS<br/>
<br/>
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
of this software and associated documentation files (the "Software"), to deal<br/>
in the Software without restriction, including without limitation the rights<br/>
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>
copies of the Software, and to permit persons to whom the Software is<br/>
furnished to do so, subject to the following conditions:<br/>
<br/>
The above copyright notice and this permission notice shall be included in all<br/>
copies or substantial portions of the Software.<br/>
<br/>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
SOFTWARE.<br/>
</div>
<h2>Packages used by SVR.JS Nightly-GitMain</h2>
<div style="width: 100%; max-width: 1280px; margin: auto">
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/asap.txt"><b>asap</b></a>
</div>
<div style="font-size: 12px;">
High-priority task queue for Node.js and browsers
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/asn1.js.txt"><b>asn1.js</b></a> (by Fedor Indutny)
</div>
<div style="font-size: 12px;">
ASN.1 encoder and decoder
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/asn1.js-rfc2560.txt"><b>asn1.js-rfc2560</b></a> (by Fedor Indutny)
</div>
<div style="font-size: 12px;">
RFC2560 structures for asn1.js
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/asn1.js-rfc5280.txt"><b>asn1.js-rfc5280</b></a> (by Felix Hanley)
</div>
<div style="font-size: 12px;">
RFC5280 extension structures for asn1.js
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/async.txt"><b>async</b></a> (by Caolan McMahon)
</div>
<div style="font-size: 12px;">
Higher-order functions and common patterns for asynchronous code
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/bn.js.txt"><b>bn.js</b></a> (by Fedor Indutny)
</div>
<div style="font-size: 12px;">
Big number implementation in pure javascript
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/call-bind.txt"><b>call-bind</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Robustly `.call.bind()` a function
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/chownr.txt"><b>chownr</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
like `chown -R`
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/define-data-property.txt"><b>define-data-property</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/dezalgo.txt"><b>dezalgo</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
Contain async insanity so that the dark pony lord doesn't eat souls
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/es-define-property.txt"><b>es-define-property</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
`Object.defineProperty`, but not IE 8's broken one.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/es-errors.txt"><b>es-errors</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
A simple cache for a few of the JS Error constructors.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/formidable.txt"><b>formidable</b></a>
</div>
<div style="font-size: 12px;">
A node.js module for parsing form data, especially file uploads.<br/>
<b>Required by SVR.JS</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/fs-minipass.txt"><b>fs-minipass</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
fs read and write streams based on minipass<br/>
<b>Patched to work with Bun</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/function-bind.txt"><b>function-bind</b></a> (by Raynos)
</div>
<div style="font-size: 12px;">
Implementation of Function.prototype.bind
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/get-intrinsic.txt"><b>get-intrinsic</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Get and robustly cache all JS language-level intrinsics at first require time
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/gopd.txt"><b>gopd</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/graceful-fs.txt"><b>graceful-fs</b></a>
</div>
<div style="font-size: 12px;">
A drop-in replacement for fs, making various improvements.<br/>
<b>Required by SVR.JS.</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/has-property-descriptors.txt"><b>has-property-descriptors</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/has-proto.txt"><b>has-proto</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Does this environment have the ability to get the [[Prototype]] of an object on creation with <code>__proto__</code>?
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/has-symbols.txt"><b>has-symbols</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Determine if the JS environment has Symbol support. Supports spec, or shams.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/hasown.txt"><b>hasown</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
A robust, ES3 compatible, "has own property" predicate.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/hexoid.txt"><b>hexoid</b></a> (by Luke Edwards)
</div>
<div style="font-size: 12px;">
A tiny (190B) and extremely fast utility to generate random IDs of fixed length
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/inherits.txt"><b>inherits</b></a>
</div>
<div style="font-size: 12px;">
Browser-friendly inheritance fully compatible with standard node.js inherits()
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/mime-db.txt"><b>mime-db</b></a>
</div>
<div style="font-size: 12px;">
Media Type Database
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/mime-types.txt"><b>mime-types</b></a>
</div>
<div style="font-size: 12px;">
The ultimate javascript content-type utility.<br/>
<b>Required by SVR.JS.</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/minimalistic-assert.txt"><b>minimalistic-assert</b></a>
</div>
<div style="font-size: 12px;">
minimalistic-assert ===
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/minipass.txt"><b>minipass</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
minimal implementation of a PassThrough stream
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/minizlib.txt"><b>minizlib</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
A small fast zlib stream built on <a href="http://npm.im/minipass">minipass</a> and Node.js's zlib binding.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/mkdirp.txt"><b>mkdirp</b></a>
</div>
<div style="font-size: 12px;">
Recursively mkdir, like `mkdir -p`
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/object-inspect.txt"><b>object-inspect</b></a> (by James Halliday)
</div>
<div style="font-size: 12px;">
string representations of objects in node and the browser
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/ocsp.txt"><b>ocsp</b></a> (by Fedor Indutny)
</div>
<div style="font-size: 12px;">
OCSP Stapling implementation<br/>
<b>Required by SVR.JS.</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/once.txt"><b>once</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
Run a function exactly one time
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: BSD-3</div>
<div style="font-size: 20px;">
<a href="/licenses/qs.txt"><b>qs</b></a>
</div>
<div style="font-size: 12px;">
A querystring parser that supports nesting and arrays, with a depth limit
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/set-function-length.txt"><b>set-function-length</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Set a function's length property
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/side-channel.txt"><b>side-channel</b></a> (by Jordan Harband)
</div>
<div style="font-size: 12px;">
Store information about any JS value in a side channel. Uses WeakMap if available.
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>
<div style="font-size: 20px;">
<a href="/licenses/simple-lru-cache.txt"><b>simple-lru-cache</b></a> (by Gabriel Eisbruch)
</div>
<div style="font-size: 12px;">
node-simple-lru-cache =====================
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/tar.txt"><b>tar</b></a> (by GitHub Inc.)
</div>
<div style="font-size: 12px;">
tar for node<br/>
<b>Required by SVR.JS.</b>
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/wrappy.txt"><b>wrappy</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
Callback wrapping utility
</div>
</div>
<div style="width: 100%; background-color: #ccc; background-color: rgba(200, 200, 200, 0.3); border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: ISC</div>
<div style="font-size: 20px;">
<a href="/licenses/yallist.txt"><b>yallist</b></a> (by Isaac Z. Schlueter)
</div>
<div style="font-size: 12px;">
Yet Another Linked List
</div>
</div>
</div>
<br/>
<img src="/powered.png" />
</body>
</html>

View file

@ -1,16 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,23 +0,0 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,23 +0,0 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,13 +0,0 @@
Copyright 2015 Calvin Metcalf
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,26 +0,0 @@
Minizlib was created by Isaac Z. Schlueter.
It is a derivative work of the Node.js project.
"""
Copyright Isaac Z. Schlueter and Contributors
Copyright Node.js contributors. All rights reserved.
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

View file

@ -1,21 +0,0 @@
Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
This project is free software released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2013 James Halliday
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,29 +0,0 @@
BSD 3-Clause License
Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) Jordan Harband and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2019 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,19 +0,0 @@
Copyright (c) 2013 Mercadolibre.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -1,15 +0,0 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

5
lint-staged.config.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
"tests/**/*.js": "eslint --cache --fix",
"src/**/*.js": "eslint --cache --fix",
"utils/**/*.js": "eslint --cache --fix"
};

View file

@ -1,52 +0,0 @@
//SVR.JS LOG HIGHLIGHTER
var readline = require("readline");
var process = require("process");
var args = process.argv;
for (var i = (process.argv[0].indexOf("node") > -1 || process.argv[0].indexOf("bun") > -1 ? 2 : 1); i < args.length; i++) {
if (args[i] == "-h" || args[i] == "--help" || args[i] == "-?" || args[i] == "/h" || args[i] == "/?") {
console.log("SVR.JS log highlighter usage:");
console.log("<some process> | node loghighlight.js [-h] [--help] [-?] [/h] [/?]");
console.log("-h -? /h /? --help -- Displays help");
process.exit(0);
} else {
console.log("Unrecognized argument: " + args[i]);
console.log("SVR.JS log highlighter usage:");
console.log("<some process> | node loghighlight.js [-h] [--help] [-?] [/h] [/?]");
console.log("-h -? /h /? --help -- Displays help");
process.exit(1);
}
}
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false,
prompt: ''
});
rl.prompt();
rl.on('line', (line) => {
viewLog([line]);
});
function viewLog(log) {
if(log[log.length-1] == "") log.pop();
if(log[0] == "") log.shift();
for(var i=0;i<log.length;i++) {
if(log[i].indexOf("SERVER REQUEST MESSAGE") != -1) {
log[i] = log[i].replace("SERVER REQUEST MESSAGE","\x1b[34m\x1b[1mSERVER REQUEST MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
} else if(log[i].indexOf("SERVER RESPONSE MESSAGE") != -1) {
log[i] = log[i].replace("SERVER RESPONSE MESSAGE","\x1b[32m\x1b[1mSERVER RESPONSE MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
} else if(log[i].indexOf("SERVER RESPONSE ERROR MESSAGE") != -1) {
log[i] = log[i].replace("SERVER RESPONSE ERROR MESSAGE","\x1b[31m\x1b[1mSERVER RESPONSE ERROR MESSAGE\x1b[22m") + "\x1b[37m\x1b[0m";
} else if(log[i].indexOf("SERVER ERROR MESSAGE") != -1) {
log[i] = log[i].replace("SERVER ERROR MESSAGE","\x1b[41m\x1b[1mSERVER ERROR MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
} else if(log[i].indexOf("SERVER WARNING MESSAGE") != -1) {
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
} else if(log[i].indexOf("SERVER MESSAGE") != -1) {
log[i] = log[i].replace("SERVER MESSAGE","\x1b[1mSERVER MESSAGE\x1b[22m");
}
console.log(log[i]);
}
}

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long

1
node_modules/.bin/mkdirp generated vendored
View file

@ -1 +0,0 @@
../mkdirp/bin/cmd.js

70
node_modules/asap/CHANGES.md generated vendored
View file

@ -1,70 +0,0 @@
## 2.0.6
Version 2.0.4 adds support for React Native by clarifying in package.json that
the browser environment does not support Node.js domains.
Why this is necessary, we leave as an exercise for the user.
## 2.0.3
Version 2.0.3 fixes a bug when adjusting the capacity of the task queue.
## 2.0.1-2.02
Version 2.0.1 fixes a bug in the way redirects were expressed that affected the
function of Browserify, but which Mr would tolerate.
## 2.0.0
Version 2 of ASAP is a full rewrite with a few salient changes.
First, the ASAP source is CommonJS only and designed with [Browserify][] and
[Browserify-compatible][Mr] module loaders in mind.
[Browserify]: https://github.com/substack/node-browserify
[Mr]: https://github.com/montagejs/mr
The new version has been refactored in two dimensions.
Support for Node.js and browsers have been separated, using Browserify
redirects and ASAP has been divided into two modules.
The "raw" layer depends on the tasks to catch thrown exceptions and unravel
Node.js domains.
The full implementation of ASAP is loadable as `require("asap")` in both Node.js
and browsers.
The raw layer that lacks exception handling overhead is loadable as
`require("asap/raw")`.
The interface is the same for both layers.
Tasks are no longer required to be functions, but can rather be any object that
implements `task.call()`.
With this feature you can recycle task objects to avoid garbage collector churn
and avoid closures in general.
The implementation has been rigorously documented so that our successors can
understand the scope of the problem that this module solves and all of its
nuances, ensuring that the next generation of implementations know what details
are essential.
- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js)
- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js)
- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js)
- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js)
The new version has also been rigorously tested across a broad spectrum of
browsers, in both the window and worker context.
The following charts capture the browser test results for the most recent
release.
The first chart shows test results for ASAP running in the main window context.
The second chart shows test results for ASAP running in a web worker context.
Test results are inconclusive (grey) on browsers that do not support web
workers.
These data are captured automatically by [Continuous
Integration][].
![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)
![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)
[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md

21
node_modules/asap/LICENSE.md generated vendored
View file

@ -1,21 +0,0 @@
Copyright 20092014 Contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

237
node_modules/asap/README.md generated vendored
View file

@ -1,237 +0,0 @@
# ASAP
[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)
Promise and asynchronous observer libraries, as well as hand-rolled callback
programs and libraries, often need a mechanism to postpone the execution of a
callback until the next available event.
(See [Designing APIs for Asynchrony][Zalgo].)
The `asap` function executes a task **as soon as possible** but not before it
returns, waiting only for the completion of the current event and previously
scheduled tasks.
```javascript
asap(function () {
// ...
});
```
[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
This CommonJS package provides an `asap` module that exports a function that
executes a task function *as soon as possible*.
ASAP strives to schedule events to occur before yielding for IO, reflow,
or redrawing.
Each event receives an independent stack, with only platform code in parent
frames and the events run in the order they are scheduled.
ASAP provides a fast event queue that will execute tasks until it is
empty before yielding to the JavaScript engine's underlying event-loop.
When a task gets added to a previously empty event queue, ASAP schedules a flush
event, preferring for that event to occur before the JavaScript engine has an
opportunity to perform IO tasks or rendering, thus making the first task and
subsequent tasks semantically indistinguishable.
ASAP uses a variety of techniques to preserve this invariant on different
versions of browsers and Node.js.
By design, ASAP prevents input events from being handled until the task
queue is empty.
If the process is busy enough, this may cause incoming connection requests to be
dropped, and may cause existing connections to inform the sender to reduce the
transmission rate or stall.
ASAP allows this on the theory that, if there is enough work to do, there is no
sense in looking for trouble.
As a consequence, ASAP can interfere with smooth animation.
If your task should be tied to the rendering loop, consider using
`requestAnimationFrame` instead.
A long sequence of tasks can also effect the long running script dialog.
If this is a problem, you may be able to use ASAPs cousin `setImmediate` to
break long processes into shorter intervals and periodically allow the browser
to breathe.
`setImmediate` will yield for IO, reflow, and repaint events.
It also returns a handler and can be canceled.
For a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].
[setImmediate]: https://github.com/YuzuJS/setImmediate
Take care.
ASAP can sustain infinite recursive calls without warning.
It will not halt from a stack overflow, and it will not consume unbounded
memory.
This is behaviorally equivalent to an infinite loop.
Just as with infinite loops, you can monitor a Node.js process for this behavior
with a heart-beat signal.
As with infinite loops, a very small amount of caution goes a long way to
avoiding problems.
```javascript
function loop() {
asap(loop);
}
loop();
```
In browsers, if a task throws an exception, it will not interrupt the flushing
of high-priority tasks.
The exception will be postponed to a later, low-priority event to avoid
slow-downs.
In Node.js, if a task throws an exception, ASAP will resume flushing only if—and
only after—the error is handled by `domain.on("error")` or
`process.on("uncaughtException")`.
## Raw ASAP
Checking for exceptions comes at a cost.
The package also provides an `asap/raw` module that exports the underlying
implementation which is faster but stalls if a task throws an exception.
This internal version of the ASAP function does not check for errors.
If a task does throw an error, it will stall the event queue unless you manually
call `rawAsap.requestFlush()` before throwing the error, or any time after.
In Node.js, `asap/raw` also runs all tasks outside any domain.
If you need a task to be bound to your domain, you will have to do it manually.
```js
if (process.domain) {
task = process.domain.bind(task);
}
rawAsap(task);
```
## Tasks
A task may be any object that implements `call()`.
A function will suffice, but closures tend not to be reusable and can cause
garbage collector churn.
Both `asap` and `rawAsap` accept task objects to give you the option of
recycling task objects or using higher callable object abstractions.
See the `asap` source for an illustration.
## Compatibility
ASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.
The following charts capture the browser test results for the most recent
release.
The first chart shows test results for ASAP running in the main window context.
The second chart shows test results for ASAP running in a web worker context.
Test results are inconclusive (grey) on browsers that do not support web
workers.
These data are captured automatically by [Continuous
Integration][].
[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)
![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)
## Caveats
When a task is added to an empty event queue, it is not always possible to
guarantee that the task queue will begin flushing immediately after the current
event.
However, once the task queue begins flushing, it will not yield until the queue
is empty, even if the queue grows while executing tasks.
The following browsers allow the use of [DOM mutation observers][] to access
the HTML [microtask queue][], and thus begin flushing ASAP's task queue
immediately at the end of the current event loop turn, before any rendering or
IO:
[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue
[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers
- Android 44.3
- Chrome 2634
- Firefox 1429
- Internet Explorer 11
- iPad Safari 67.1
- iPhone Safari 77.1
- Safari 67
In the absense of mutation observers, there are a few browsers, and situations
like web workers in some of the above browsers, where [message channels][]
would be a useful way to avoid falling back to timers.
Message channels give direct access to the HTML [task queue][], so the ASAP
task queue would flush after any already queued rendering and IO tasks, but
without having the minimum delay imposed by timers.
However, among these browsers, Internet Explorer 10 and Safari do not reliably
dispatch messages, so they are not worth the trouble to implement.
[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels
[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task
- Internet Explorer 10
- Safair 5.0-1
- Opera 11-12
In the absense of mutation observers, these browsers and the following browsers
all fall back to using `setTimeout` and `setInterval` to ensure that a `flush`
occurs.
The implementation uses both and cancels whatever handler loses the race, since
`setTimeout` tends to occasionally skip tasks in unisolated circumstances.
Timers generally delay the flushing of ASAP's task queue for four milliseconds.
- Firefox 313
- Internet Explorer 610
- iPad Safari 4.3
- Lynx 2.8.7
## Heritage
ASAP has been factored out of the [Q][] asynchronous promise library.
It originally had a naïve implementation in terms of `setTimeout`, but
[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be
useful for creating a high-priority, no-delay event dispatch hack.
Since then, Internet Explorer proposed and implemented `setImmediate`.
Robert Katić began contributing to Q by measuring the performance of
the internal implementation of `asap`, paying particular attention to
error recovery.
Domenic, Robert, and Kris Kowal collectively settled on the current strategy of
unrolling the high-priority event queue internally regardless of what strategy
we used to dispatch the potentially lower-priority flush event.
Domenic went on to make ASAP cooperate with Node.js domains.
[Q]: https://github.com/kriskowal/q
[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html
For further reading, Nicholas Zakas provided a thorough article on [The
Case for setImmediate][NCZ].
[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
Embers RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but
further developed the implentation.
Particularly, The `MessagePort` implementation was abandoned due to interaction
[problems with Mobile Internet Explorer][IE Problems] in favor of an
implementation backed on the newer and more reliable DOM `MutationObserver`
interface.
These changes were back-ported into this library.
[IE Problems]: https://github.com/cujojs/when/issues/197
[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
In addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained
exception-safe, but `asap/raw` provided a tight kernel that could be used for
tasks that guaranteed that they would not throw exceptions.
This core is useful for promise implementations that capture thrown errors in
rejected promises and do not need a second safety net.
At the same time, the exception handling in `asap` was factored into separate
implementations for Node.js and browsers, using the the [Browserify][Browser
Config] `browser` property in `package.json` to instruct browser module loaders
and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the
browser-only implementation.
[Browser Config]: https://gist.github.com/defunctzombie/4339901
[Browserify]: https://github.com/substack/node-browserify
[Mr]: https://github.com/montagejs/mr
[Mop]: https://github.com/montagejs/mop
## License
Copyright 2009-2014 by Contributors
MIT License (enclosed)

65
node_modules/asap/asap.js generated vendored
View file

@ -1,65 +0,0 @@
"use strict";
var rawAsap = require("./raw");
var freeTasks = [];
/**
* Calls a task as soon as possible after returning, in its own event, with
* priority over IO events. An exception thrown in a task can be handled by
* `process.on("uncaughtException") or `domain.on("error")`, but will otherwise
* crash the process. If the error is handled, all subsequent tasks will
* resume.
*
* @param {{call}} task A callable object, typically a function that takes no
* arguments.
*/
module.exports = asap;
function asap(task) {
var rawTask;
if (freeTasks.length) {
rawTask = freeTasks.pop();
} else {
rawTask = new RawTask();
}
rawTask.task = task;
rawTask.domain = process.domain;
rawAsap(rawTask);
}
function RawTask() {
this.task = null;
this.domain = null;
}
RawTask.prototype.call = function () {
if (this.domain) {
this.domain.enter();
}
var threw = true;
try {
this.task.call();
threw = false;
// If the task throws an exception (presumably) Node.js restores the
// domain stack for the next event.
if (this.domain) {
this.domain.exit();
}
} finally {
// We use try/finally and a threw flag to avoid messing up stack traces
// when we catch and release errors.
if (threw) {
// In Node.js, uncaught exceptions are considered fatal errors.
// Re-throw them to interrupt flushing!
// Ensure that flushing continues if an uncaught exception is
// suppressed listening process.on("uncaughtException") or
// domain.on("error").
rawAsap.requestFlush();
}
// If the task threw an error, we do not want to exit the domain here.
// Exiting the domain would prevent the domain from catching the error.
this.task = null;
this.domain = null;
freeTasks.push(this);
}
};

66
node_modules/asap/browser-asap.js generated vendored
View file

@ -1,66 +0,0 @@
"use strict";
// rawAsap provides everything we need except exception management.
var rawAsap = require("./raw");
// RawTasks are recycled to reduce GC churn.
var freeTasks = [];
// We queue errors to ensure they are thrown in right order (FIFO).
// Array-as-queue is good enough here, since we are just dealing with exceptions.
var pendingErrors = [];
var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);
function throwFirstError() {
if (pendingErrors.length) {
throw pendingErrors.shift();
}
}
/**
* Calls a task as soon as possible after returning, in its own event, with priority
* over other events like animation, reflow, and repaint. An error thrown from an
* event will not interrupt, nor even substantially slow down the processing of
* other events, but will be rather postponed to a lower priority event.
* @param {{call}} task A callable object, typically a function that takes no
* arguments.
*/
module.exports = asap;
function asap(task) {
var rawTask;
if (freeTasks.length) {
rawTask = freeTasks.pop();
} else {
rawTask = new RawTask();
}
rawTask.task = task;
rawAsap(rawTask);
}
// We wrap tasks with recyclable task objects. A task object implements
// `call`, just like a function.
function RawTask() {
this.task = null;
}
// The sole purpose of wrapping the task is to catch the exception and recycle
// the task object after its single use.
RawTask.prototype.call = function () {
try {
this.task.call();
} catch (error) {
if (asap.onerror) {
// This hook exists purely for testing purposes.
// Its name will be periodically randomized to break any code that
// depends on its existence.
asap.onerror(error);
} else {
// In a web browser, exceptions are not fatal. However, to avoid
// slowing down the queue of pending tasks, we rethrow the error in a
// lower priority turn.
pendingErrors.push(error);
requestErrorThrow();
}
} finally {
this.task = null;
freeTasks[freeTasks.length] = this;
}
};

223
node_modules/asap/browser-raw.js generated vendored
View file

@ -1,223 +0,0 @@
"use strict";
// Use the fastest means possible to execute a task in its own turn, with
// priority over other events including IO, animation, reflow, and redraw
// events in browsers.
//
// An exception thrown by a task will permanently interrupt the processing of
// subsequent tasks. The higher level `asap` function ensures that if an
// exception is thrown by a task, that the task queue will continue flushing as
// soon as possible, but if you use `rawAsap` directly, you are responsible to
// either ensure that no exceptions are thrown from your task, or to manually
// call `rawAsap.requestFlush` if an exception is thrown.
module.exports = rawAsap;
function rawAsap(task) {
if (!queue.length) {
requestFlush();
flushing = true;
}
// Equivalent to push, but avoids a function call.
queue[queue.length] = task;
}
var queue = [];
// Once a flush has been requested, no further calls to `requestFlush` are
// necessary until the next `flush` completes.
var flushing = false;
// `requestFlush` is an implementation-specific method that attempts to kick
// off a `flush` event as quickly as possible. `flush` will attempt to exhaust
// the event queue before yielding to the browser's own event loop.
var requestFlush;
// The position of the next task to execute in the task queue. This is
// preserved between calls to `flush` so that it can be resumed if
// a task throws an exception.
var index = 0;
// If a task schedules additional tasks recursively, the task queue can grow
// unbounded. To prevent memory exhaustion, the task queue will periodically
// truncate already-completed tasks.
var capacity = 1024;
// The flush function processes all tasks that have been scheduled with
// `rawAsap` unless and until one of those tasks throws an exception.
// If a task throws an exception, `flush` ensures that its state will remain
// consistent and will resume where it left off when called again.
// However, `flush` does not make any arrangements to be called again if an
// exception is thrown.
function flush() {
while (index < queue.length) {
var currentIndex = index;
// Advance the index before calling the task. This ensures that we will
// begin flushing on the next task the task throws an error.
index = index + 1;
queue[currentIndex].call();
// Prevent leaking memory for long chains of recursive calls to `asap`.
// If we call `asap` within tasks scheduled by `asap`, the queue will
// grow, but to avoid an O(n) walk for every task we execute, we don't
// shift tasks off the queue after they have been executed.
// Instead, we periodically shift 1024 tasks off the queue.
if (index > capacity) {
// Manually shift all values starting at the index back to the
// beginning of the queue.
for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
queue[scan] = queue[scan + index];
}
queue.length -= index;
index = 0;
}
}
queue.length = 0;
index = 0;
flushing = false;
}
// `requestFlush` is implemented using a strategy based on data collected from
// every available SauceLabs Selenium web driver worker at time of writing.
// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
// have WebKitMutationObserver but not un-prefixed MutationObserver.
// Must use `global` or `self` instead of `window` to work in both frames and web
// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
/* globals self */
var scope = typeof global !== "undefined" ? global : self;
var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
// MutationObservers are desirable because they have high priority and work
// reliably everywhere they are implemented.
// They are implemented in all modern browsers.
//
// - Android 4-4.3
// - Chrome 26-34
// - Firefox 14-29
// - Internet Explorer 11
// - iPad Safari 6-7.1
// - iPhone Safari 7-7.1
// - Safari 6-7
if (typeof BrowserMutationObserver === "function") {
requestFlush = makeRequestCallFromMutationObserver(flush);
// MessageChannels are desirable because they give direct access to the HTML
// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
// 11-12, and in web workers in many engines.
// Although message channels yield to any queued rendering and IO tasks, they
// would be better than imposing the 4ms delay of timers.
// However, they do not work reliably in Internet Explorer or Safari.
// Internet Explorer 10 is the only browser that has setImmediate but does
// not have MutationObservers.
// Although setImmediate yields to the browser's renderer, it would be
// preferrable to falling back to setTimeout since it does not have
// the minimum 4ms penalty.
// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
// Desktop to a lesser extent) that renders both setImmediate and
// MessageChannel useless for the purposes of ASAP.
// https://github.com/kriskowal/q/issues/396
// Timers are implemented universally.
// We fall back to timers in workers in most engines, and in foreground
// contexts in the following browsers.
// However, note that even this simple case requires nuances to operate in a
// broad spectrum of browsers.
//
// - Firefox 3-13
// - Internet Explorer 6-9
// - iPad Safari 4.3
// - Lynx 2.8.7
} else {
requestFlush = makeRequestCallFromTimer(flush);
}
// `requestFlush` requests that the high priority event queue be flushed as
// soon as possible.
// This is useful to prevent an error thrown in a task from stalling the event
// queue if the exception handled by Node.jss
// `process.on("uncaughtException")` or by a domain.
rawAsap.requestFlush = requestFlush;
// To request a high priority event, we induce a mutation observer by toggling
// the text of a text node between "1" and "-1".
function makeRequestCallFromMutationObserver(callback) {
var toggle = 1;
var observer = new BrowserMutationObserver(callback);
var node = document.createTextNode("");
observer.observe(node, {characterData: true});
return function requestCall() {
toggle = -toggle;
node.data = toggle;
};
}
// The message channel technique was discovered by Malte Ubl and was the
// original foundation for this library.
// http://www.nonblocking.io/2011/06/windownexttick.html
// Safari 6.0.5 (at least) intermittently fails to create message ports on a
// page's first load. Thankfully, this version of Safari supports
// MutationObservers, so we don't need to fall back in that case.
// function makeRequestCallFromMessageChannel(callback) {
// var channel = new MessageChannel();
// channel.port1.onmessage = callback;
// return function requestCall() {
// channel.port2.postMessage(0);
// };
// }
// For reasons explained above, we are also unable to use `setImmediate`
// under any circumstances.
// Even if we were, there is another bug in Internet Explorer 10.
// It is not sufficient to assign `setImmediate` to `requestFlush` because
// `setImmediate` must be called *by name* and therefore must be wrapped in a
// closure.
// Never forget.
// function makeRequestCallFromSetImmediate(callback) {
// return function requestCall() {
// setImmediate(callback);
// };
// }
// Safari 6.0 has a problem where timers will get lost while the user is
// scrolling. This problem does not impact ASAP because Safari 6.0 supports
// mutation observers, so that implementation is used instead.
// However, if we ever elect to use timers in Safari, the prevalent work-around
// is to add a scroll event listener that calls for a flush.
// `setTimeout` does not call the passed callback if the delay is less than
// approximately 7 in web workers in Firefox 8 through 18, and sometimes not
// even then.
function makeRequestCallFromTimer(callback) {
return function requestCall() {
// We dispatch a timeout with a specified delay of 0 for engines that
// can reliably accommodate that request. This will usually be snapped
// to a 4 milisecond delay, but once we're flushing, there's no delay
// between events.
var timeoutHandle = setTimeout(handleTimer, 0);
// However, since this timer gets frequently dropped in Firefox
// workers, we enlist an interval handle that will try to fire
// an event 20 times per second until it succeeds.
var intervalHandle = setInterval(handleTimer, 50);
function handleTimer() {
// Whichever timer succeeds will cancel both timers and
// execute the callback.
clearTimeout(timeoutHandle);
clearInterval(intervalHandle);
callback();
}
};
}
// This is for `asap.js` only.
// Its name will be periodically randomized to break any code that depends on
// its existence.
rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
// ASAP was originally a nextTick shim included in Q. This was factored out
// into this ASAP package. It was later adapted to RSVP which made further
// amendments. These decisions, particularly to marginalize MessageChannel and
// to capture the MutationObserver implementation in a closure, were integrated
// back into ASAP proper.
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js

58
node_modules/asap/package.json generated vendored
View file

@ -1,58 +0,0 @@
{
"name": "asap",
"version": "2.0.6",
"description": "High-priority task queue for Node.js and browsers",
"keywords": [
"event",
"task",
"queue"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/kriskowal/asap.git"
},
"main": "./asap.js",
"browser": {
"./asap": "./browser-asap.js",
"./asap.js": "./browser-asap.js",
"./raw": "./browser-raw.js",
"./raw.js": "./browser-raw.js",
"./test/domain.js": "./test/browser-domain.js"
},
"react-native": {
"domain": false
},
"files": [
"raw.js",
"asap.js",
"browser-raw.js",
"browser-asap.js"
],
"scripts": {
"test": "npm run lint && npm run test-node",
"test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker",
"test-node": "node test/asap-test.js",
"test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy",
"test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener",
"test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json",
"test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json",
"test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json",
"test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json",
"lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)",
"benchmarks": "node benchmarks"
},
"devDependencies": {
"events": "^1.0.1",
"jshint": "^2.5.1",
"knox": "^0.8.10",
"mr": "^2.0.5",
"opener": "^1.3.0",
"q": "^2.0.3",
"q-io": "^2.0.3",
"saucelabs": "^0.1.1",
"wd": "^0.2.21",
"weak-map": "^1.0.5",
"benchmark": "^1.0.0"
}
}

101
node_modules/asap/raw.js generated vendored
View file

@ -1,101 +0,0 @@
"use strict";
var domain; // The domain module is executed on demand
var hasSetImmediate = typeof setImmediate === "function";
// Use the fastest means possible to execute a task in its own turn, with
// priority over other events including network IO events in Node.js.
//
// An exception thrown by a task will permanently interrupt the processing of
// subsequent tasks. The higher level `asap` function ensures that if an
// exception is thrown by a task, that the task queue will continue flushing as
// soon as possible, but if you use `rawAsap` directly, you are responsible to
// either ensure that no exceptions are thrown from your task, or to manually
// call `rawAsap.requestFlush` if an exception is thrown.
module.exports = rawAsap;
function rawAsap(task) {
if (!queue.length) {
requestFlush();
flushing = true;
}
// Avoids a function call
queue[queue.length] = task;
}
var queue = [];
// Once a flush has been requested, no further calls to `requestFlush` are
// necessary until the next `flush` completes.
var flushing = false;
// The position of the next task to execute in the task queue. This is
// preserved between calls to `flush` so that it can be resumed if
// a task throws an exception.
var index = 0;
// If a task schedules additional tasks recursively, the task queue can grow
// unbounded. To prevent memory excaustion, the task queue will periodically
// truncate already-completed tasks.
var capacity = 1024;
// The flush function processes all tasks that have been scheduled with
// `rawAsap` unless and until one of those tasks throws an exception.
// If a task throws an exception, `flush` ensures that its state will remain
// consistent and will resume where it left off when called again.
// However, `flush` does not make any arrangements to be called again if an
// exception is thrown.
function flush() {
while (index < queue.length) {
var currentIndex = index;
// Advance the index before calling the task. This ensures that we will
// begin flushing on the next task the task throws an error.
index = index + 1;
queue[currentIndex].call();
// Prevent leaking memory for long chains of recursive calls to `asap`.
// If we call `asap` within tasks scheduled by `asap`, the queue will
// grow, but to avoid an O(n) walk for every task we execute, we don't
// shift tasks off the queue after they have been executed.
// Instead, we periodically shift 1024 tasks off the queue.
if (index > capacity) {
// Manually shift all values starting at the index back to the
// beginning of the queue.
for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
queue[scan] = queue[scan + index];
}
queue.length -= index;
index = 0;
}
}
queue.length = 0;
index = 0;
flushing = false;
}
rawAsap.requestFlush = requestFlush;
function requestFlush() {
// Ensure flushing is not bound to any domain.
// It is not sufficient to exit the domain, because domains exist on a stack.
// To execute code outside of any domain, the following dance is necessary.
var parentDomain = process.domain;
if (parentDomain) {
if (!domain) {
// Lazy execute the domain module.
// Only employed if the user elects to use domains.
domain = require("domain");
}
domain.active = process.domain = null;
}
// `setImmediate` is slower that `process.nextTick`, but `process.nextTick`
// cannot handle recursion.
// `requestFlush` will only be called recursively from `asap.js`, to resume
// flushing after an error is thrown into a domain.
// Conveniently, `setImmediate` was introduced in the same version
// `process.nextTick` started throwing recursion errors.
if (flushing && hasSetImmediate) {
setImmediate(flush);
} else {
process.nextTick(flush);
}
if (parentDomain) {
domain.active = process.domain = parentDomain;
}
}

145
node_modules/asn1.js-rfc2560/index.js generated vendored
View file

@ -1,145 +0,0 @@
var asn1 = require('asn1.js');
var rfc5280 = require('asn1.js-rfc5280');
var OCSPRequest = asn1.define('OCSPRequest', function() {
this.seq().obj(
this.key('tbsRequest').use(TBSRequest),
this.key('optionalSignature').optional().explicit(0).use(Signature)
);
});
exports.OCSPRequest = OCSPRequest;
var TBSRequest = asn1.define('TBSRequest', function() {
this.seq().obj(
this.key('version').def('v1').explicit(0).use(rfc5280.Version),
this.key('requestorName').optional().explicit(1).use(rfc5280.GeneralName),
this.key('requestList').seqof(Request),
this.key('requestExtensions').optional().explicit(2)
.seqof(rfc5280.Extension)
);
});
exports.TBSRequest = TBSRequest;
var Signature = asn1.define('Signature', function() {
this.seq().obj(
this.key('signatureAlgorithm').use(rfc5280.AlgorithmIdentifier),
this.key('signature').bitstr(),
this.key('certs').optional().explicit(0).seqof(rfc5280.Certificate)
);
});
exports.Signature = Signature;
var Request = asn1.define('Request', function() {
this.seq().obj(
this.key('reqCert').use(CertID),
this.key('singleRequestExtensions').optional().explicit(0).seqof(
rfc5280.Extension)
);
});
exports.Request = Request;
var OCSPResponse = asn1.define('OCSPResponse', function() {
this.seq().obj(
this.key('responseStatus').use(ResponseStatus),
this.key('responseBytes').optional().explicit(0).seq().obj(
this.key('responseType').objid({
'1 3 6 1 5 5 7 48 1 1': 'id-pkix-ocsp-basic'
}),
this.key('response').octstr()
)
);
});
exports.OCSPResponse = OCSPResponse;
var ResponseStatus = asn1.define('ResponseStatus', function() {
this.enum({
0: 'successful',
1: 'malformed_request',
2: 'internal_error',
3: 'try_later',
5: 'sig_required',
6: 'unauthorized'
});
});
exports.ResponseStatus = ResponseStatus;
var BasicOCSPResponse = asn1.define('BasicOCSPResponse', function() {
this.seq().obj(
this.key('tbsResponseData').use(ResponseData),
this.key('signatureAlgorithm').use(rfc5280.AlgorithmIdentifier),
this.key('signature').bitstr(),
this.key('certs').optional().explicit(0).seqof(rfc5280.Certificate)
);
});
exports.BasicOCSPResponse = BasicOCSPResponse;
var ResponseData = asn1.define('ResponseData', function() {
this.seq().obj(
this.key('version').def('v1').explicit(0).use(rfc5280.Version),
this.key('responderID').use(ResponderID),
this.key('producedAt').gentime(),
this.key('responses').seqof(SingleResponse),
this.key('responseExtensions').optional().explicit(0)
.seqof(rfc5280.Extension)
);
});
exports.ResponseData = ResponseData;
var ResponderID = asn1.define('ResponderId', function() {
this.choice({
byName: this.explicit(1).use(rfc5280.Name),
byKey: this.explicit(2).use(KeyHash)
});
});
exports.ResponderID = ResponderID;
var KeyHash = asn1.define('KeyHash', function() {
this.octstr();
});
exports.KeyHash = KeyHash;
var SingleResponse = asn1.define('SingleResponse', function() {
this.seq().obj(
this.key('certId').use(CertID),
this.key('certStatus').use(CertStatus),
this.key('thisUpdate').gentime(),
this.key('nextUpdate').optional().explicit(0).gentime(),
this.key('singleExtensions').optional().explicit(1).seqof(rfc5280.Extension)
);
});
exports.SingleResponse = SingleResponse;
var CertStatus = asn1.define('CertStatus', function() {
this.choice({
good: this.implicit(0).null_(),
revoked: this.implicit(1).use(RevokedInfo),
unknown: this.implicit(2).null_()
});
});
exports.CertStatus = CertStatus;
var RevokedInfo = asn1.define('RevokedInfo', function() {
this.seq().obj(
this.key('revocationTime').gentime(),
this.key('revocationReason').optional().explicit(0).use(rfc5280.ReasonCode)
);
});
exports.RevokedInfo = RevokedInfo;
var CertID = asn1.define('CertID', function() {
this.seq().obj(
this.key('hashAlgorithm').use(rfc5280.AlgorithmIdentifier),
this.key('issuerNameHash').octstr(),
this.key('issuerKeyHash').octstr(),
this.key('serialNumber').use(rfc5280.CertificateSerialNumber)
);
});
exports.CertID = CertID;
var Nonce = asn1.define('Nonce', function() {
this.octstr();
});
exports.Nonce = Nonce;
exports['id-pkix-ocsp'] = [ 1, 3, 6, 1, 5, 5, 7, 48, 1 ];
exports['id-pkix-ocsp-nonce'] = [ 1, 3, 6, 1, 5, 5, 7, 48, 1, 2 ];

Some files were not shown because too many files have changed in this diff Show more