-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from justmywyw/master
1.registry with nexus;2.token;3.file view
- Loading branch information
Showing
12 changed files
with
453 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict' | ||
var path = require('path'), | ||
fsExtra = require('fs-extra'), | ||
utils = require('../../common/utils'); | ||
|
||
require('shelljs/global'); | ||
|
||
var modulesCachePath = utils.getServerCachePath(), | ||
fileExt = utils.getFileExt(); | ||
|
||
/*@Controller*/ | ||
module.exports = { | ||
/*@RequestMapping(["/"])*/ | ||
view: function(req, res){ | ||
res.redirect('/view'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
var nexusRegistry = require('../registry/nexus'), | ||
nodeRegistry = require('../registry/node'); | ||
|
||
module.exports = function(opts){ | ||
var type = opts.type; | ||
delete opts.type; | ||
switch (type) { | ||
case 'nexus': | ||
var repository = opts.registry, | ||
authArr = opts.auth.split(':'), | ||
auth = { | ||
user: authArr[0], | ||
password: authArr[1] | ||
}; | ||
delete opts.registry; | ||
delete opts.auth; | ||
return new nexusRegistry({ | ||
repository: repository, | ||
auth: auth | ||
}); | ||
break; | ||
case 'node': | ||
var server = opts.registry, | ||
token = opts.token; | ||
delete opts.registry; | ||
delete opts.token; | ||
return new nodeRegistry({ | ||
server: server, | ||
token: token | ||
}); | ||
break; | ||
default: | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.