consultant
Advanced tools
Comparing version 0.1.27 to 0.1.28
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Consultant_1 = require("./Consultant"); | ||
@@ -4,0 +3,0 @@ var consultant = new Consultant_1.Consultant(); |
@@ -11,4 +11,4 @@ "use strict"; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t; | ||
return { next: verb(0), "throw": verb(1), "return": verb(2) }; | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
@@ -79,9 +79,9 @@ function step(op) { | ||
inquiry.importRules(rules); | ||
return [4 /*yield*/, inquiry.prompt()]; | ||
return [4, inquiry.prompt()]; | ||
case 1: | ||
result = _a.sent(); | ||
if (result.cancelled) { | ||
return [2 /*return*/, null]; | ||
return [2, null]; | ||
} | ||
return [2 /*return*/, this.fromObject(result.argv)]; | ||
return [2, this.fromObject(result.argv)]; | ||
} | ||
@@ -88,0 +88,0 @@ }); |
@@ -11,4 +11,4 @@ "use strict"; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t; | ||
return { next: verb(0), "throw": verb(1), "return": verb(2) }; | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
@@ -135,9 +135,9 @@ function step(op) { | ||
case 1: | ||
if (!(_i < _a.length)) return [3 /*break*/, 4]; | ||
if (!(_i < _a.length)) return [3, 4]; | ||
questionInfo = _a[_i]; | ||
return [4 /*yield*/, inquirer.prompt(questionInfo.inquirerInput)]; | ||
return [4, inquirer.prompt(questionInfo.inquirerInput)]; | ||
case 2: | ||
result = _e.sent(); | ||
if ((questionInfo.rule.cancelValue !== undefined) && (result.value === this.cancelValue)) { | ||
return [2 /*return*/, { | ||
return [2, { | ||
cancelled: true, | ||
@@ -165,4 +165,4 @@ argv: argv | ||
_i++; | ||
return [3 /*break*/, 1]; | ||
case 4: return [2 /*return*/, { | ||
return [3, 1]; | ||
case 4: return [2, { | ||
cancelled: false, | ||
@@ -169,0 +169,0 @@ argv: argv |
@@ -19,3 +19,3 @@ { | ||
], | ||
"version": "0.1.27", | ||
"version": "0.1.28", | ||
"homepage": "", | ||
@@ -40,2 +40,3 @@ "author": "Eser Ozvataf <eser@ozvataf.com>", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"engines": { | ||
@@ -55,6 +56,6 @@ "node": ">=6.9.0" | ||
"colors": "^1.1.2", | ||
"evangelist": "^0.0.4", | ||
"immunity": "^0.0.12", | ||
"evangelist": "^0.0.6", | ||
"immunity": "^0.0.14", | ||
"inquirer": "^3.0.6", | ||
"yargs-parser": "^5.0.0" | ||
"yargs-parser": "^7.0.0" | ||
}, | ||
@@ -61,0 +62,0 @@ "devDependencies": { |
@@ -84,8 +84,8 @@ # [consultant](https://github.com/eserozvataf/consultant) | ||
// string parsing | ||
const input1 = consultant.input.fromString(rules, 'eser testing --makefile testfile.js'); | ||
console.log(input1); | ||
const input1 = consultant.input.fromString('eser testing --makefile testfile.js'); | ||
console.log(input1.validate(rules)); | ||
// command line parsing | ||
const input2 = consultant.input.fromCommandLine(rules); | ||
console.log(input2); | ||
const input2 = consultant.input.fromCommandLine(); | ||
console.log(input2.validate(rules)); | ||
@@ -95,3 +95,3 @@ // command line user interface | ||
.then((input3) => { | ||
console.log(input3); | ||
console.log(input3.validate(rules)); | ||
}); | ||
@@ -98,0 +98,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
41234
579
+ Addedcamelcase@4.1.0(transitive)
+ Addedevangelist@0.0.6(transitive)
+ Addedimmunity@0.0.14(transitive)
+ Addedyargs-parser@7.0.0(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcamelcase@3.0.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedevangelist@0.0.4(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedimmunity@0.0.12(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedyargs-parser@5.0.1(transitive)
Updatedevangelist@^0.0.6
Updatedimmunity@^0.0.14
Updatedyargs-parser@^7.0.0