Demo for query storing
Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/lead/LICENSE b/node_modules/lead/LICENSE
new file mode 100644
index 0000000..b8fc743
--- /dev/null
+++ b/node_modules/lead/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/lead/README.md b/node_modules/lead/README.md
new file mode 100644
index 0000000..759b991
--- /dev/null
+++ b/node_modules/lead/README.md
@@ -0,0 +1,55 @@
+<p align="center">
+ <a href="http://gulpjs.com">
+ <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+ </a>
+</p>
+
+# lead
+
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
+
+Sink your streams.
+
+## Usage
+
+```js
+var from = require('from2');
+var through = require('through2');
+var sink = require('lead');
+
+// Might be used as a Transform or Writeable
+var maybeThrough = through(function(chunk, enc, cb) {
+ // processing
+ cb(null, chunk);
+});
+
+from(['hello', 'world'])
+ // Sink it to behave like a Writeable
+ .pipe(sink(maybeThrough))
+```
+
+## API
+
+### `sink(stream)`
+
+Takes a `stream` to sink and returns the same stream. Sets up event listeners to infer if the stream is being used as a `Transform` or `Writeable` stream and sinks it on `nextTick` if necessary. If the stream is being used as a `Transform` stream but becomes unpiped, it will be sunk. Respects `pipe`, `on('data')` and `on('readable')` handlers.
+
+## License
+
+MIT
+
+[downloads-image]: http://img.shields.io/npm/dm/lead.svg
+[npm-url]: https://npmjs.com/package/lead
+[npm-image]: http://img.shields.io/npm/v/lead.svg
+
+[travis-url]: https://travis-ci.org/gulpjs/lead
+[travis-image]: http://img.shields.io/travis/gulpjs/lead.svg?label=travis-ci
+
+[appveyor-url]: https://ci.appveyor.com/project/gulpjs/lead
+[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/lead.svg?label=appveyor
+
+[coveralls-url]: https://coveralls.io/r/gulpjs/lead
+[coveralls-image]: http://img.shields.io/coveralls/gulpjs/lead/master.svg
+
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
diff --git a/node_modules/lead/index.js b/node_modules/lead/index.js
new file mode 100644
index 0000000..8e3df6a
--- /dev/null
+++ b/node_modules/lead/index.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var Writable = require('flush-write-stream');
+
+function listenerCount(stream, evt) {
+ return stream.listeners(evt).length;
+}
+
+function hasListeners(stream) {
+ return !!(listenerCount(stream, 'readable') || listenerCount(stream, 'data'));
+}
+
+function sinker(file, enc, callback) {
+ callback();
+}
+
+function sink(stream) {
+ var sinkAdded = false;
+
+ var sinkOptions = {
+ objectMode: stream._readableState.objectMode,
+ };
+
+ var sinkStream = new Writable(sinkOptions, sinker);
+
+ function addSink() {
+ if (sinkAdded) {
+ return;
+ }
+
+ if (hasListeners(stream)) {
+ return;
+ }
+
+ sinkAdded = true;
+ stream.pipe(sinkStream);
+ }
+
+ function removeSink(evt) {
+ if (evt !== 'readable' && evt !== 'data') {
+ return;
+ }
+
+ if (hasListeners(stream)) {
+ sinkAdded = false;
+ stream.unpipe(sinkStream);
+ }
+ }
+
+ stream.on('newListener', removeSink);
+ stream.on('removeListener', removeSink);
+ stream.on('removeListener', addSink);
+
+ // Sink the stream to start flowing
+ // Do this on nextTick, it will flow at slowest speed of piped streams
+ process.nextTick(addSink);
+
+ return stream;
+}
+
+module.exports = sink;
diff --git a/node_modules/lead/package.json b/node_modules/lead/package.json
new file mode 100644
index 0000000..454900d
--- /dev/null
+++ b/node_modules/lead/package.json
@@ -0,0 +1,85 @@
+{
+ "_from": "lead@^1.0.0",
+ "_id": "lead@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
+ "_location": "/lead",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "lead@^1.0.0",
+ "name": "lead",
+ "escapedName": "lead",
+ "rawSpec": "^1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.0.0"
+ },
+ "_requiredBy": [
+ "/vinyl-fs"
+ ],
+ "_resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
+ "_shasum": "6f14f99a37be3a9dd784f5495690e5903466ee42",
+ "_spec": "lead@^1.0.0",
+ "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\vinyl-fs",
+ "author": {
+ "name": "Gulp Team",
+ "email": "team@gulpjs.com",
+ "url": "http://gulpjs.com/"
+ },
+ "bugs": {
+ "url": "https://github.com/gulpjs/lead/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine.bublitz@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "flush-write-stream": "^1.0.2"
+ },
+ "deprecated": false,
+ "description": "Sink your streams.",
+ "devDependencies": {
+ "eslint": "^1.10.3",
+ "eslint-config-gulp": "^2.0.0",
+ "expect": "^1.20.2",
+ "istanbul": "^0.4.3",
+ "istanbul-coveralls": "^1.0.3",
+ "jscs": "^2.4.0",
+ "jscs-preset-gulp": "^1.0.0",
+ "mississippi": "^1.3.0",
+ "mocha": "^3.2.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "homepage": "https://github.com/gulpjs/lead#readme",
+ "keywords": [
+ "streams",
+ "sink",
+ "through",
+ "writeable"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "lead",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/gulpjs/lead.git"
+ },
+ "scripts": {
+ "cover": "istanbul cover _mocha --report lcovonly",
+ "coveralls": "npm run cover && istanbul-coveralls",
+ "lint": "eslint index.js test/ && jscs index.js test/",
+ "pretest": "npm run lint",
+ "test": "mocha --async-only"
+ },
+ "version": "1.0.0"
+}