mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-03 21:23:05 +00:00
minor changes
This commit is contained in:
parent
b2eacd2b59
commit
39c0405850
8 changed files with 223 additions and 212 deletions
|
|
@ -9,7 +9,8 @@
|
|||
'# Module is part of Cloud Commander,' + '\n' +
|
||||
'# used for work with Aplication Cache.' + '\n' +
|
||||
'# If you wont to see at work set appcache: true' + '\n' +
|
||||
'# in config.json and start cloudcmd.js' + '\n');
|
||||
'# in config.json and start cloudcmd.js' + '\n' +
|
||||
'# http://github.com/coderaiser/cloudcmd' + '\n');
|
||||
|
||||
var main = global.cloudcmd.main,
|
||||
fs = main.fs,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
'# If you wont to see at work set auth' + '\n' +
|
||||
'# parameters in config.json or environment' + '\n' +
|
||||
'# and start cloudcmd.js or just do' + '\n' +
|
||||
'# require(\'auth.js\').auth(pCode, pCallBack)' + '\n');
|
||||
'# require(\'auth.js\').auth(pCode, pCallBack)' + '\n' +
|
||||
'# http://github.com/coderaiser/cloudcmd' + '\n');
|
||||
|
||||
var main = global.cloudcmd.main,
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@
|
|||
(function(){
|
||||
"use strict";
|
||||
|
||||
if(!global.cloudcmd)
|
||||
return console.log(
|
||||
'# rest.js' + '\n' +
|
||||
'# -----------' + '\n' +
|
||||
'# Module is part of Cloud Commander,' + '\n' +
|
||||
'# used for work with REST API.' + '\n' +
|
||||
'# If you wont to see at work set rest: true' + '\n' +
|
||||
'# and api_url in config.json' + '\n' +
|
||||
'# http://github.com/coderaiser/cloudcmd' + '\n');
|
||||
|
||||
var main = global.cloudcmd.main,
|
||||
Util = main.util,
|
||||
Config = main.config,
|
||||
|
|
@ -98,26 +108,26 @@
|
|||
lCmd = pParams.command,
|
||||
lConfig = main.config,
|
||||
lEnv = process.env,
|
||||
lEnvId,
|
||||
lConfigId;
|
||||
lEnvKey,
|
||||
lConfigKey;
|
||||
|
||||
switch(lCmd){
|
||||
case '':
|
||||
lResult = {info: 'Cloud Commander API v1'};
|
||||
break;
|
||||
|
||||
case 'github_id':
|
||||
lEnvId = lEnv.github_id;
|
||||
lConfigId = lConfig.github_id,
|
||||
case 'github_key':
|
||||
lEnvKey = lEnv.github_key;
|
||||
lConfigKey = lConfig.github_key,
|
||||
|
||||
lResult = lEnvId || lConfigId;
|
||||
lResult = lEnvKey || lConfigKey;
|
||||
break;
|
||||
|
||||
case 'dropbox_chooser_id':
|
||||
lEnvId = lEnv.dropbox_chooser_id;
|
||||
lConfigId = lConfig.dropbox_chooser_id;
|
||||
case 'dropbox_chooser_key':
|
||||
lEnvKey = lEnv.dropbox_chooser_key;
|
||||
lConfigKey = lConfig.dropbox_chooser_key;
|
||||
|
||||
lResult = lEnvId || lConfigId;
|
||||
lResult = lEnvKey || lConfigKey;
|
||||
break;
|
||||
|
||||
case 'kill':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue