Commit Graph

340 Commits

Author SHA1 Message Date
Alex Kocharin 5d4068d539 remove undefined variable 2014-08-08 05:14:27 +04:00
Alex Kocharin 57d6fe7150 Merge remote-tracking branch 'origin/0.9.x'
Conflicts:
	lib/local-storage.js
2014-08-08 05:12:42 +04:00
Alex Kocharin a8dc1b2f7b option not to cache third party files
ref #85
2014-08-08 05:08:41 +04:00
John Gozde 060dcb49b4 Filter falsey _npmUser values. 2014-08-08 03:15:39 +04:00
John Gozde 58046a2ec7 Filter falsey _npmUser values. 2014-08-01 14:08:44 -06:00
Alex Kocharin 21704c9f84 removing unused code 2014-07-26 20:46:17 +04:00
Alex Kocharin 4f913f2468 Merge https://github.com/bpeacock/sinopia.git
Conflicts:
	lib/config.js
	lib/config_def.yaml
	lib/index.js
	lib/local-storage.js
	lib/storage.js
	package.json
2014-07-26 20:36:22 +04:00
Alex Kocharin c2d3fe9929 add comments about registration 2014-07-26 17:14:06 +04:00
Alex Kocharin 3809d6eb32 add a bunch of tests for htpasswd 2014-07-23 01:45:28 +04:00
Alex Kocharin 490340fbb0 tweaking messages and status codes for user login 2014-07-23 01:44:06 +04:00
Alex Kocharin a528811e35 bugfixes for htpasswd authentication 2014-07-22 23:48:15 +04:00
Alex Kocharin 9275b2cc85 "msg" -> "message"
former one created too much confusion
2014-07-22 23:31:01 +04:00
Alex Kocharin 41d4997ea7 only close socket if it exists, fix #89 2014-07-21 19:06:44 +04:00
Alex Kocharin ff8a5e99ec add user registration 2014-07-21 17:02:02 +04:00
Alex Kocharin e929e089d0 basic support for .htpasswd 2014-06-26 20:21:23 +04:00
Alex Kocharin 81486f412f make authentication function async 2014-06-26 19:23:21 +04:00
Alex Kocharin 5cc0187b67 fix tests 2014-06-24 06:57:54 +04:00
Alex Kocharin d9accbb6a7 better access control for search
For each of the packages check if user has access to it and remove
package info from the result if he doesn't.

ref #65
2014-06-24 06:50:05 +04:00
Alex Kocharin 17d8ab7dcd use req.query instead of manually parsing querystring
ref #65
2014-06-24 06:48:58 +04:00
Alex Kocharin 3f746eb7c8 fix logging: in search "error" can be legitimate output (package named "error"), not an actual error
ref #65
2014-06-24 06:46:35 +04:00
Alex Kocharin 9816059485 Merge pull request #65 from yannickcr/npm-search
Add search functionality
2014-06-24 06:25:28 +04:00
Alex Kocharin 703adeaffc socket could've been closed twice, fix #80 2014-06-20 08:12:37 +04:00
Alex Kocharin c4e5cb71b4 eslint version bump 2014-06-18 05:59:22 +04:00
Alex Kocharin 73572b0839 fix #77, config assert() has no effect 2014-06-18 04:52:07 +04:00
Alex Kocharin 88f3944f5a whitelist all allowed characters in filenames, see #75 2014-06-18 02:01:58 +04:00
Joseph Gentle 68bf469ad4 Fixed unit tests 2014-05-15 16:17:48 -07:00
Joseph Gentle 21f7f03cf7 Fixed sinopia to allow old tarballs with @ in them 2014-05-15 16:07:33 -07:00
Brian Peacock 490b04f298 Removed 'root' config parameter 2014-05-13 17:12:21 -05:00
Brian Peacock 2a299c9201 Switched some tabs to spaces 2014-05-12 10:43:18 -05:00
Brian Peacock f5b9e0e0d5 Added default logo to the page 2014-05-12 09:35:53 -05:00
Brian Peacock a38cf312b2 Updated the config 2014-05-12 09:21:07 -05:00
Brian Peacock ab44907dac Fixed bug with creating users with hashed passwords 2014-05-09 13:26:47 -05:00
Brian Peacock 1246f12f5a Added CSS for no logo 2014-05-09 09:19:42 -05:00
Brian Peacock 99b8c31d3a Added the ability to add users 2014-05-08 19:24:41 -05:00
Brian Peacock dbf3301ff9 Added favicon 2014-05-08 18:03:14 -05:00
Brian Peacock a6fe4a1516 Added logo support 2014-05-08 17:58:13 -05:00
Brian Peacock 277f1023c9 Fixed unpublish 2014-05-08 16:48:15 -05:00
Brian Peacock d52cfe8bac Fixed issue publishing unpublished modules 2014-05-08 16:34:16 -05:00
Brian Peacock f74d7cbd3e Added fixed header 2014-05-08 15:41:59 -05:00
Brian Peacock 7e9b5944fd Removed logging 2014-05-08 14:47:54 -05:00
Brian Peacock 6fb0be9cc0 Fixed search UI bugs 2014-05-08 14:47:24 -05:00
Brian Peacock 1ddc1c68dc Added icons, smoother animations, search readme's 2014-05-08 11:13:39 -05:00
Brian Peacock 8b3dc9072f Added nifty transitions 2014-05-07 16:51:03 -05:00
Brian Peacock 112e551240 Fixed issue with no packages and the template 2014-05-07 15:53:24 -05:00
Brian Peacock 7b4bac1874 Added url config option 2014-05-07 15:43:22 -05:00
Brian Peacock baa7f78e83 Nicer formamtting 2014-05-07 15:36:03 -05:00
Brian Peacock 45e4208218 Added cases for no local packages 2014-05-07 15:31:25 -05:00
Brian Peacock 9e062994fe Modified the search box 2014-05-07 15:00:36 -05:00
Brian Peacock 4f155f5004 Added highligting CSS 2014-05-07 14:56:48 -05:00
Brian Peacock c0ee2db8a4 Added readme API with markdown support 2014-05-07 14:28:10 -05:00
Brian Peacock 5464b449ce Formatted entries 2014-05-07 13:36:48 -05:00
Brian Peacock f2e433d52b Formatting 2014-05-07 13:26:44 -05:00
Brian Peacock 11fdc9340e Search works 2014-05-07 13:08:29 -05:00
Brian Peacock 1e71e2faa0 Fixed grunt build location 2014-05-07 11:29:04 -05:00
Brian Peacock 2806de2a5d Added static resources 2014-05-07 11:27:51 -05:00
Brian Peacock 27c032d53f Added a search class 2014-05-07 10:29:47 -05:00
Brian Peacock c47f73f799 Added pack in user put 2014-05-07 10:11:48 -05:00
Brian Peacock 2901e619cb Fixed refresh issue 2014-05-07 10:10:59 -05:00
Brian Peacock 5a98db9589 Added Setup instructions 2014-05-06 17:48:15 -05:00
Brian Peacock 34b631fa12 Added listings 2014-05-06 17:40:21 -05:00
Brian Peacock bb129c1151 Got handlebars templates working right 2014-05-06 17:04:03 -05:00
Brian Peacock 37afd429ec Added basic GUI 2014-05-06 16:34:48 -05:00
Brian Peacock cb6e2cd7f6 More specific express version to try to get old node working. 2014-05-06 11:34:09 -05:00
Alex Kocharin a79fa68deb lint 2014-04-14 00:44:17 +00:00
Alex Kocharin 6eada0f22e preserve tags when publishing something (ref #63) 2014-04-13 02:04:48 +00:00
Yannick Croissant 5241ddfe84 Add search functionality 2014-04-12 19:20:26 +02:00
Alex Kocharin b4c0b89365 set ignore_latest_tag to false by default 2014-04-01 00:13:59 +00:00
Alex Kocharin 752d0f62f0 make fs-ext optional 2014-03-31 04:32:11 +00:00
Alex Kocharin 9404e811a5 accept gzip from uplinks, fix #54 2014-03-30 21:05:42 +00:00
Alex Kocharin 2102e71c10 removing outdated todo 2014-03-30 19:43:03 +00:00
Alex Kocharin 7f56593ee3 document new config option 2014-03-29 06:15:43 +00:00
Alex Kocharin a8cdfcd7cd add err.status instead of checking for exact error message
it's done for consistency reasons
2014-03-29 04:32:05 +00:00
Alex Kocharin 4470cb7d55 making latest tag behaviour configurable 2014-03-29 02:31:34 +00:00
Alex Kocharin 4b06026d2e Revert "Make 404 responses compatible with CouchDB API"
This reverts commit dabf5e1c9a.

See discussion in #57
2014-03-29 01:08:28 +00:00
Alex Kocharin 7967d5857d Revert "fix logs and tests for #56"
This reverts commit df49fb84c1.
2014-03-29 01:08:00 +00:00
Alex Kocharin 8af77df0e0 fix zero timeouts in config 2014-03-13 19:45:47 +00:00
Alex Kocharin df49fb84c1 fix logs and tests for #56 2014-03-13 19:23:21 +00:00
Alex Kocharin 0afd9d1bb3 Merge pull request #56 from strongloop/fix-unknown-package-name-response
Make 404 responses compatible with CouchDB API
2014-03-13 19:15:04 +00:00
Alex Kocharin f839837f34 document new config options 2014-03-13 18:56:31 +00:00
Miroslav Bajtoš dabf5e1c9a Make 404 responses compatible with CouchDB API
The CouchDB REST API returns always `"error": "not_found"` in the body
of a 404 response:
  http://couchdb-13.readthedocs.org/en/latest/api-basics/#http-status-codes

The npm client depends on the magic string 'not_found' as can be seen
in requestDone() in npm-registry-client/lib/request.js.

Before this change, npm install of an unknown package was reporting
the Sinopia error string and a stack trace of npm.

After this change, npm install of an unknown package returns a nice
error saying "the package is not in the npm registry, bug the author"
2014-03-13 19:47:44 +01:00
Alex Kocharin bb9612441c trim intervals 2014-03-08 04:38:37 +00:00
Alex Kocharin 48825a2e46 change intervals formatting to match nginx
see http://wiki.nginx.org/ConfigNotation
2014-03-08 04:37:16 +00:00
Alex Kocharin 6a2a463b76 count each failed request only once 2014-03-08 04:00:07 +00:00
Alex Kocharin f1ec18dc4b implement nginx-like logic to avoid hitting upstream when it's down 2014-03-08 03:54:28 +00:00
Alex Kocharin 6b9001ef6c change interval formatting in config
All intervals are now in milliseconds. But you can add
multiples ("ms", "s", "m", "h", "d", "M", "y") to set
value using different units.

For example, value "1.5h" would mean 1.5 hours.
2014-03-08 03:49:59 +00:00
Alex Kocharin 9ff1203688 throw away incomplete downloads 2014-03-07 19:48:24 +00:00
Alex Kocharin a891354a32 always return content-length for tarballs 2014-03-07 19:39:20 +00:00
Alex Kocharin 9c4c93695b fix crash in #52 2014-03-07 18:20:41 +00:00
Sam Day 58e98c7263 Support maxage for uplinks 2014-03-02 20:47:09 +11:00
Alex Kocharin 691d62f403 eslint update + style fixes 2014-02-23 21:20:50 +04:00
Alex Kocharin a5d0094669 remove npmsslkeys
See commit in npmconf:
e0b4a4e5cc
2014-02-23 20:55:41 +04:00
Alex Kocharin b65cf7afe3 move eslint config to yaml 2014-02-07 00:56:46 +04:00
Alex Kocharin 8840ac4c1f removing bad statement 2014-02-03 00:50:38 +04:00
Alex Kocharin 9f662a69e1 validate all url parameters better 2014-02-01 12:08:48 +04:00
Alex Kocharin 616ec7626a process.getuid doesn't always exist (fixes #41) 2014-01-24 06:36:03 +03:00
Alex Kocharin 2add883370 adding config param to specify upload limits, fixes #39 2014-01-18 23:04:12 +04:00
Alex Kocharin e522347667 making loose semver versions work, ref #38 2014-01-18 22:57:44 +04:00
Alex Kocharin 6c258758c8 support setting different storage paths for different packages
fixes #35
2014-01-13 22:56:36 +04:00
Alex Kocharin 68d3cc7295 fs interface refactoring 2014-01-13 20:48:51 +04:00
Alex Kocharin 5422de642e tag support, closes #8 2013-12-29 10:41:31 +04:00
Alex Kocharin 3c7ae2f37d a few bugfixes 2013-12-29 04:58:48 +04:00
Alex Kocharin 6075034521 proxy_access -> proxy (since we're removing proxy_publish) 2013-12-29 04:54:46 +04:00
Alex Kocharin d1a1a8f4cd bugfix 2013-12-29 04:54:39 +04:00
Alex Kocharin 54535893ab adding support for new npm behaviour, closes #31 2013-12-29 04:53:31 +04:00
Alex Kocharin 8c05cfe6a2 require heapdump if present on the system 2013-12-29 04:52:23 +04:00
Alex Kocharin 6c838c7947 remove all replication-like functionality
apparently it was a bad idea, it's simpler to just run a single
sinopia instance as a master

TODO: write some help in readme about it
2013-12-27 17:23:14 +04:00
Alex Kocharin 985d705ad2 working on tags / incomplete 2013-12-27 17:06:30 +04:00
Alex Kocharin 6234f8cba9 Merge branch 'master' of github.com:rlidwka/sinopia 2013-12-27 17:05:05 +04:00
Alex Kocharin c0e34890e4 req.user -> req.remoteUser 2013-12-27 15:29:23 +04:00
Alex Kocharin b42687d230 Merge tag 'v0.5.9' of github.com:rlidwka/sinopia
0.5.9
2013-12-26 23:46:08 +04:00
Alex Kocharin b44255de3c set right Accept header for tarballs, closes #32 2013-12-26 23:25:19 +04:00
Alex Kocharin b0fa7ee2d1 using eslint to check the code 2013-12-23 04:14:57 +04:00
Alex Kocharin 3b2bd161b7 logging bad versions 2013-12-21 16:09:29 +04:00
Alex Kocharin 3a31064ded deal with js-yaml warning 2013-12-19 18:50:31 +04:00
Alex Kocharin 151136381e style fix 2013-12-19 07:18:45 +04:00
Alex Kocharin 503b60a45b catch bind errors 2013-12-19 07:17:52 +04:00
Alex Kocharin 225c2bb65f added a warning to not run it under root 2013-12-17 20:25:17 +04:00
Alex Kocharin 8ea985ff6b don't color multiline strings in logs output
stack traces should be easily recognizable
2013-12-16 03:07:19 +04:00
Alex Kocharin 0cec69ee1d Merge branch 'master' of github.com:rlidwka/sinopia 2013-12-16 00:58:09 +04:00
Alex Kocharin 693aa576b4 safeguard against bad tarball names 2013-12-16 00:54:29 +04:00
Alex Kocharin 3abce5e2b6 better error message when publishing with bad auth header 2013-12-16 00:38:16 +04:00
Alex Kocharin f43ec71ccb 0.5.7 2013-12-15 04:05:58 +04:00
Alex Kocharin ef61515f28 try to fetch package from uplinks if user requested a tarball we don't know about
closes #29 + tests fix
2013-12-15 03:15:58 +04:00
Alex Kocharin 9094d0742f better error message for incorrect package names 2013-12-15 03:09:55 +04:00
Alex Kocharin ede09b5c77 refactoring: move uplink.get_package() calls to it's own function 2013-12-13 20:50:41 +04:00
Alex Kocharin 380ec1e917 always end response with a newline 2013-12-13 19:12:24 +04:00
Alex Kocharin 8149f883b0 default express.js to production mode, not development 2013-12-12 03:19:40 +04:00
Alex Kocharin 96b336acc3 if uplink doesn't answer, stop sending requests to it for a while (2 min default) 2013-12-12 02:00:26 +04:00
Alex Kocharin 520a3b0220 cleanup 2013-12-12 01:55:40 +04:00
Alex Kocharin 230750ff88 adding sinopia version to logs 2013-12-12 01:55:17 +04:00
Alex Kocharin 203f0300e3 Merge branch '0.5.x' of github.com:rlidwka/sinopia
Conflicts:
	lib/storage.js
	test/start.sh
2013-12-12 01:44:29 +04:00
Alex Kocharin 7ee2361700 better tests for various tags (including bad ones), ref #21 2013-12-12 01:22:35 +04:00
Alex Kocharin 47a92ff273 fail-safe semver parsing + tests, ref #25 2013-12-12 00:51:48 +04:00
Brett Trotter fc99692219 Update semver.compare to semver.compareLoose to tolerate grunt and other packages 2013-12-12 00:35:07 +04:00
Alex Kocharin bd7dde229a Merge branch 'master' of github.com:rlidwka/sinopia 2013-12-11 21:40:41 +04:00
Alex Kocharin d149252a3b fixing crash on bad tags 2013-12-11 17:04:08 +04:00
Brett Trotter ed3386f044 Update semver.compare to semver.compareLoose to tolerate grunt and other packages 2013-12-10 13:04:47 -06:00
Alex Kocharin 36fa1ba655 log fatal errors 2013-12-10 14:29:46 +04:00
Alex Kocharin 77182a755d expose sinopia's version in Server header for debugging purposes 2013-12-10 14:12:34 +04:00
Alex Kocharin f05a4784fd fixing crash on bad tags 2013-12-10 13:55:35 +04:00
Alex Kocharin 7f7c056ecd various bugfixes, camelcase for http headers 2013-12-09 08:00:16 +04:00
Alex Kocharin bbb402f762 detecting http loops 2013-12-09 07:59:31 +04:00
Alex Kocharin 4d70d8065e add via tag to prevent loops 2013-12-09 07:58:25 +04:00
Alex Kocharin 2f45649a2c improving tags support, ref #8 2013-12-08 02:55:50 +04:00
Alex Kocharin 08d1011433 use standard \033 escape sequence for vt esc codes 2013-12-08 02:54:26 +04:00
Alex Kocharin 6e71913c46 setting default timeout to 30 seconds, #18 2013-12-08 02:37:27 +04:00
Alex Kocharin cc7165dd3c Merge branch 'master' of github.com:rlidwka/sinopia 2013-12-06 21:49:31 +04:00
Alex Kocharin a257fc3962 swallow bad auth errors, fixes #17 2013-12-06 21:46:51 +04:00
Alex Kocharin 6a295ac196 don't send etags with errors 2013-12-06 21:46:11 +04:00
Alex Kocharin 9ee8d484db dealing with internal errors in express.js 2013-12-05 16:31:21 +04:00