Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ module.exports = function(config_hash) {
// run in production mode by default, just in case
// it shouldn't make any difference anyway
app.set('env', process.env.NODE_ENV || 'production')

// for nginx proxy
if (process.env.VIRTUAL_HOST) {
app.enable('trust proxy');
}

function error_reporting_middleware(req, res, next) {
res.report_error = res.report_error || function(err) {
Expand Down
90 changes: 90 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"name": "sinopia",
"version": "1.4.0",
"description": "Private npm repository server",
"author": {
"name": "Alex Kocharin",
"email": "alex@kocharin.ru"
},
"repository": {
"type": "git",
"url": "git://github.com/rlidwka/sinopia"
},
"main": "index.js",
"bin": {
"sinopia": "./bin/sinopia"
},
"dependencies": {
"express": ">=5.0.0-0 <6.0.0-0",
"express-json5": ">=0.1.0 <1.0.0-0",
"body-parser": ">=1.9.2 <2.0.0-0",
"compression": ">=1.2.0 <2.0.0-0",
"commander": ">=2.3.0 <3.0.0-0",
"js-yaml": ">=3.0.1 <4.0.0-0",
"cookies": ">=0.5.0 <1.0.0-0",
"request": ">=2.31.0 <3.0.0-0",
"async": ">=0.9.0 <1.0.0-0",
"es6-shim": "0.21.x",
"semver": ">=2.2.1 <5.0.0-0",
"minimatch": ">=0.2.14 <2.0.0-0",
"bunyan": ">=0.22.1 <2.0.0-0",
"handlebars": "2.x",
"highlight.js": "8.x",
"lunr": ">=0.5.2 <1.0.0-0",
"render-readme": ">=0.2.1",
"jju": "1.x",
"JSONStream": "1.x",
"mkdirp": ">=0.3.5 <1.0.0-0",
"sinopia-htpasswd": ">= 0.4.3",
"http-errors": ">=1.2.0",
"readable-stream": "~1.1.0"
},
"optionalDependencies": {
"fs-ext": ">=0.4.1 <1.0.0-0",
"crypt3": ">=0.1.6 <1.0.0-0"
},
"devDependencies": {
"rimraf": ">=2.2.5 <3.0.0-0",
"bluebird": "2 >=2.9",
"mocha": "2 >=2.2.3",
"eslint": ">= 0.18",
"browserify": "7.x",
"browserify-handlebars": "1.x",
"grunt": ">=0.4.4 <1.0.0-0",
"grunt-cli": "*",
"grunt-browserify": ">=2.0.8 <3.0.0-0",
"grunt-contrib-less": ">=0.11.0 <1.0.0-0",
"grunt-contrib-watch": ">=0.6.1 <1.0.0-0",
"unopinionate": ">=0.0.4 <1.0.0-0",
"onclick": ">=0.1.0 <1.0.0-0",
"transition-complete": ">=0.0.2 <1.0.0-0"
},
"keywords": [
"private",
"package",
"repository",
"registry",
"modules",
"proxy",
"server"
],
"scripts": {
"test": "eslint --reset . && mocha ./test/functional ./test/unit",
"test-travis": "eslint --reset . && mocha -R spec ./test/functional ./test/unit",
"test-only": "mocha ./test/functional ./test/unit",
"lint": "eslint --reset .",
"prepublish": "js-yaml package.yaml > package.json",
"clean-shrinkwrap": "node -e '\n function clean(j) {\n if (!j) return\n for (var k in j) {\n delete j[k].from\n delete j[k].resolved\n if (j[k].dependencies) clean(j[k].dependencies)\n }\n }\n x = JSON.parse(require(\"fs\").readFileSync(\"./npm-shrinkwrap.json\"))\n clean(x.dependencies)\n x = JSON.stringify(x, null, \" \")\n require(\"fs\").writeFileSync(\"./npm-shrinkwrap.json\", x + \"\\n\")\n'\n"
},
"engines": {
"node": ">=0.10"
},
"preferGlobal": true,
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"license": {
"type": "WTFPL",
"url": "http://www.wtfpl.net/txt/copying/"
}
}