question-store
Advanced tools
Comparing version 0.8.6 to 0.8.7
@@ -5,2 +5,3 @@ 'use strict'; | ||
var util = require('util'); | ||
var path = require('path'); | ||
var debug = require('debug')('questions'); | ||
@@ -58,5 +59,5 @@ var Options = require('option-cache'); | ||
debug('initializing question-store'); | ||
this.answers = sessionAnswers; | ||
this.inquirer = opts.inquirer || utils.inquirer(); | ||
this.project = opts.project || utils.project(process.cwd()); | ||
this.answers = sessionAnswers; | ||
this.data = opts.data || {}; | ||
@@ -112,3 +113,4 @@ this.cache = {}; | ||
if (typeof hints === 'undefined') { | ||
hints = self.store.create('hints'); | ||
var name = path.basename(self.options.cwd || process.cwd()); | ||
hints = self.store.create(name + '/hints'); | ||
debug('created hints store'); | ||
@@ -115,0 +117,0 @@ } |
{ | ||
"name": "question-store", | ||
"description": "Ask questions, persist the answers. Basic support for i18n and storing answers based on current working directory.", | ||
"version": "0.8.6", | ||
"version": "0.8.7", | ||
"homepage": "https://github.com/jonschlinkert/question-store", | ||
@@ -27,7 +27,7 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"async": "^1.5.2", | ||
"data-store": "^0.15.3", | ||
"data-store": "^0.15.5", | ||
"debug": "^2.2.0", | ||
"define-property": "^0.2.5", | ||
"get-value": "^2.0.3", | ||
"has-value": "^0.3.0", | ||
"get-value": "^2.0.5", | ||
"has-value": "^0.3.1", | ||
"inquirer2": "^0.1.1", | ||
@@ -38,4 +38,4 @@ "is-answer": "^0.1.0", | ||
"mixin-deep": "^1.1.3", | ||
"omit-empty": "^0.3.2", | ||
"option-cache": "^3.3.4", | ||
"omit-empty": "^0.3.4", | ||
"option-cache": "^3.3.5", | ||
"project-name": "^0.2.4", | ||
@@ -54,5 +54,5 @@ "resolve-dir": "^0.1.0", | ||
"minimist": "^1.2.0", | ||
"mocha": "*", | ||
"mocha": "^2.4.5", | ||
"question-force": "^0.1.0", | ||
"question-match": "^0.1.1", | ||
"question-match": "^0.1.2", | ||
"through2": "^2.0.1" | ||
@@ -78,3 +78,4 @@ }, | ||
"question-cache", | ||
"inquirer" | ||
"inquirer", | ||
"base-questions" | ||
] | ||
@@ -81,0 +82,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# question-store [![NPM version](https://img.shields.io/npm/v/question-store.svg)](https://www.npmjs.com/package/question-store) [![Build Status](https://img.shields.io/travis/jonschlinkert/question-store.svg)](https://travis-ci.org/jonschlinkert/question-store) | ||
# question-store [![NPM version](https://img.shields.io/npm/v/question-store.svg?style=flat)](https://www.npmjs.com/package/question-store) [![NPM downloads](https://img.shields.io/npm/dm/question-store.svg?style=flat)](https://npmjs.org/package/question-store) [![Build Status](https://img.shields.io/travis/jonschlinkert/question-store.svg?style=flat)](https://travis-ci.org/jonschlinkert/question-store) | ||
@@ -39,3 +39,3 @@ > Ask questions, persist the answers. Basic support for i18n and storing answers based on current working directory. | ||
### [Questions](index.js#L36) | ||
### [Questions](index.js#L37) | ||
@@ -54,3 +54,3 @@ Create an instance of `Questions` with the given `options`. | ||
### [.createStores](index.js#L78) | ||
### [.createStores](index.js#L79) | ||
@@ -68,3 +68,3 @@ Create stores for persisting data across sessions. | ||
### [.set](index.js#L148) | ||
### [.set](index.js#L150) | ||
@@ -101,3 +101,3 @@ Calls [addQuestion](#addQuestion), with the only difference being that `.set` returns the `questions` instance and `.addQuestion` returns the question object. So use `.set` if you want to chain questions, or `.addQuestion` if you need the created question object. | ||
### [.addQuestion](index.js#L180) | ||
### [.addQuestion](index.js#L182) | ||
@@ -131,3 +131,3 @@ Add a question to be asked at a later point. Creates an instance of [Question](#question), so any `Question` options or settings may be used. Also, the default `type` is `input` if not defined by the user. | ||
### [.choices](index.js#L214) | ||
### [.choices](index.js#L216) | ||
@@ -154,3 +154,3 @@ Create a "choices" question from an array of values. | ||
### [.list](index.js#L242) | ||
### [.list](index.js#L244) | ||
@@ -177,3 +177,3 @@ Create a "list" question from an array of values. | ||
### [.rawlist](index.js#L270) | ||
### [.rawlist](index.js#L272) | ||
@@ -200,3 +200,3 @@ Create a "rawlist" question from an array of values. | ||
### [.expand](index.js#L298) | ||
### [.expand](index.js#L300) | ||
@@ -223,3 +223,3 @@ Create an "expand" question from an array of values. | ||
### [.confirm](index.js#L325) | ||
### [.confirm](index.js#L327) | ||
@@ -245,3 +245,3 @@ Create a "choices" question from an array of values. | ||
### [.get](index.js#L344) | ||
### [.get](index.js#L346) | ||
@@ -262,3 +262,3 @@ Get question `name`, or group `name` if question is not found. You can also do a direct lookup using `quesions.cache['foo']`. | ||
### [.has](index.js#L360) | ||
### [.has](index.js#L362) | ||
@@ -276,3 +276,3 @@ Returns true if `questions.cache` or `questions.groups` has question `name`. | ||
### [.del](index.js#L385) | ||
### [.del](index.js#L387) | ||
@@ -296,3 +296,3 @@ Delete the given question or any questions that have the given namespace using dot-notation. | ||
### [.clearAnswers](index.js#L403) | ||
### [.clearAnswers](index.js#L405) | ||
@@ -307,3 +307,3 @@ Clear all cached answers. | ||
### [.clearQuestions](index.js#L418) | ||
### [.clearQuestions](index.js#L420) | ||
@@ -318,3 +318,3 @@ Clear all questions from the cache. | ||
### [.clear](index.js#L433) | ||
### [.clear](index.js#L435) | ||
@@ -329,3 +329,3 @@ Clear all cached questions and answers. | ||
### [.ask](index.js#L452) | ||
### [.ask](index.js#L454) | ||
@@ -348,3 +348,3 @@ Ask one or more questions, with the given `options` and callback. | ||
### [.normalize](index.js#L598) | ||
### [.normalize](index.js#L600) | ||
@@ -433,3 +433,6 @@ Normalize the given value to return an array of question keys. | ||
You might also be interested in these projects: | ||
* [answer-store](https://www.npmjs.com/package/answer-store): Store answers to user prompts, based on locale and/or current working directory. | [homepage](https://github.com/jonschlinkert/answer-store) | ||
* [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://www.npmjs.com/package/base-questions) | [homepage](https://github.com/node-base/base-questions) | ||
* [inquirer](https://www.npmjs.com/package/inquirer): A collection of common interactive command line user interfaces. | [homepage](https://github.com/sboudrias/Inquirer.js) | ||
@@ -468,2 +471,4 @@ * [question-cache](https://www.npmjs.com/package/question-cache): A wrapper around inquirer that makes it easy to create and selectively reuse questions. | [homepage](https://github.com/jonschlinkert/question-cache) | ||
Follow me on GitHub or Twitter for updates about question-store and my other libraries: | ||
* [github/jonschlinkert](https://github.com/jonschlinkert) | ||
@@ -474,3 +479,3 @@ * [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) | ||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Released under the [MIT license](https://github.com/jonschlinkert/question-store/blob/master/LICENSE). | ||
@@ -480,2 +485,2 @@ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 11, 2016._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v, on April 05, 2016._ |
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
37404
847
465
Updateddata-store@^0.15.5
Updatedget-value@^2.0.5
Updatedhas-value@^0.3.1
Updatedomit-empty@^0.3.4
Updatedoption-cache@^3.3.5