Comparing version 1.0.1 to 1.0.2
99
index.js
@@ -1,3 +0,98 @@ | ||
exports.printMsg=function(){ | ||
console.log('this message is from esm'); | ||
//var program = require('commander'); | ||
var util = require('util'); | ||
var prompt = require('prompt'); | ||
var program=(function(){ | ||
var x={params:{},command:[]}; | ||
var stopCmd=false; | ||
var last=''; | ||
function update(k,v) { | ||
if (typeof(v)=='undefined') { | ||
v=true; | ||
} | ||
if (typeof(x.params[k])=='undefined' || x.params[k]===true) { | ||
x.params[k]=v; | ||
} else { | ||
if (!util.isArray(x.params[k])) { | ||
x.params[k]=[x.params[k]] | ||
} | ||
if (v!==true) { | ||
x.params[k].push(v); | ||
} | ||
} | ||
}; | ||
function cmd(c){ | ||
x.command.push(c); | ||
} | ||
process.argv.forEach(function(val, i, array) { | ||
if (i>1) { | ||
var smin=val.match(/^\-(\w+)/); | ||
var sminmin=val.match(/^\-\-(\w+)/); | ||
var scmd=val.match(/^(\w+)/); | ||
if (scmd && scmd.length && scmd[1] && !stopCmd) { | ||
cmd(scmd[1]); | ||
} else { | ||
stopCmd=true; | ||
if (smin && smin.length && smin[1]) { | ||
if(smin[1].length > 1){ | ||
last=''; | ||
for(var j=0;j<smin[1].length;j++){ | ||
update(smin[1][j]); | ||
} | ||
} else { | ||
last=smin[1]; | ||
update(smin[1]) | ||
} | ||
} else if (sminmin && sminmin.length && sminmin[1]) { | ||
last=sminmin[1]; | ||
update(sminmin[1]) | ||
} else { | ||
update(last,val); | ||
} | ||
} | ||
} | ||
}); | ||
return x; | ||
}()); | ||
console.log(program); | ||
//function range(val) { | ||
// return val.split('..').map(Number); | ||
//} | ||
// | ||
//function list(val) { | ||
// return val.split(','); | ||
//} | ||
// | ||
//function collect(val, memo) { | ||
// memo.push(val); | ||
// return memo; | ||
//} | ||
// | ||
//function increaseVerbosity(v, total) { | ||
// return total + 1; | ||
//} | ||
//var _init=false; | ||
// | ||
//program | ||
// .version('1.0.1') | ||
// .usage('esm <command>') | ||
// .command('init', 'init esm packages').action(function () { | ||
// console.log('tanya-tanya...'); | ||
// _init=true; | ||
// }); | ||
////program.parse(process.argv); | ||
// | ||
//process.argv.forEach(function(val, index, array) { | ||
// console.log(index + ': ' + val); | ||
//}); | ||
// | ||
if (program.command && program.command.length && program.command.indexOf('init')>-1) { | ||
prompt.start(); | ||
prompt.get(['name'], function (err, result) { | ||
console.log('Command-line input received:'); | ||
console.log(' name: ' + result.name); | ||
}); | ||
} |
{ | ||
"name": "esm", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "emobiq service manager", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "node ./node_modules/tad/bin/tad" | ||
}, | ||
@@ -12,4 +12,11 @@ "keywords": [ | ||
], | ||
"dependencies": { | ||
"cli-color": "^1.0.0", | ||
"prompt": "^0.2.14" | ||
}, | ||
"devDependencies": { | ||
"tad": "^0.2.2" | ||
}, | ||
"author": "Agus Made <krisnaparta@gmail.com>", | ||
"license": "ISC" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
2478
93
1
0
2
1
+ Addedcli-color@^1.0.0
+ Addedprompt@^0.2.14
+ Addedansi-regex@2.1.1(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedasync@0.2.10(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcli-color@1.4.0(transitive)
+ Addedcolors@0.6.2(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcycle@1.0.3(transitive)
+ Addedd@1.0.2(transitive)
+ Addeddeep-equal@2.2.3(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-get-iterator@1.1.3(transitive)
+ Addedes5-ext@0.10.64(transitive)
+ Addedes6-iterator@2.0.3(transitive)
+ Addedes6-symbol@3.1.4(transitive)
+ Addedes6-weak-map@2.0.3(transitive)
+ Addedesniff@2.0.1(transitive)
+ Addedevent-emitter@0.3.5(transitive)
+ Addedext@1.7.0(transitive)
+ Addedeyes@0.1.8(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedi@0.3.7(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-arguments@1.1.1(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakset@2.0.3(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedlru-queue@0.1.0(transitive)
+ Addedmemoizee@0.4.17(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addedncp@0.4.2(transitive)
+ Addednext-tick@1.1.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject-is@1.1.6(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpkginfo@0.3.10.4.1(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedprompt@0.2.14(transitive)
+ Addedread@1.0.7(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedrevalidator@0.1.8(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstack-trace@0.0.10(transitive)
+ Addedstop-iteration-iterator@1.0.0(transitive)
+ Addedtimers-ext@0.1.8(transitive)
+ Addedtype@2.7.3(transitive)
+ Addedutile@0.2.1(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-collection@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
+ Addedwinston@0.8.3(transitive)
+ Addedwrappy@1.0.2(transitive)