Demo for query storing

Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/bin-build/index.js b/node_modules/bin-build/index.js
new file mode 100644
index 0000000..525968a
--- /dev/null
+++ b/node_modules/bin-build/index.js
@@ -0,0 +1,43 @@
+'use strict';
+const decompress = require('decompress');
+const download = require('download');
+const execa = require('execa');
+const pMapSeries = require('p-map-series');
+const tempfile = require('tempfile');
+
+const exec = (cmd, cwd) => pMapSeries(cmd, x => execa.shell(x, {cwd}));
+
+exports.directory = (dir, cmd) => {
+	if (typeof dir !== 'string') {
+		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof dir}\``));
+	}
+
+	return exec(cmd, dir);
+};
+
+exports.file = (file, cmd, opts) => {
+	opts = Object.assign({strip: 1}, opts);
+
+	if (typeof file !== 'string') {
+		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof file}\``));
+	}
+
+	const tmp = tempfile();
+
+	return decompress(file, tmp, opts).then(() => exec(cmd, tmp));
+};
+
+exports.url = (url, cmd, opts) => {
+	opts = Object.assign({
+		extract: true,
+		strip: 1
+	}, opts);
+
+	if (typeof url !== 'string') {
+		return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof url}\``));
+	}
+
+	const tmp = tempfile();
+
+	return download(url, tmp, opts).then(() => exec(cmd, tmp));
+};
diff --git a/node_modules/bin-build/license b/node_modules/bin-build/license
new file mode 100644
index 0000000..0f8cf79
--- /dev/null
+++ b/node_modules/bin-build/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Kevin Martensson <kevinmartensson@gmail.com> (github.com/kevva)
+
+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/bin-build/package.json b/node_modules/bin-build/package.json
new file mode 100644
index 0000000..f1a2b9a
--- /dev/null
+++ b/node_modules/bin-build/package.json
@@ -0,0 +1,78 @@
+{
+  "_from": "bin-build@^3.0.0",
+  "_id": "bin-build@3.0.0",
+  "_inBundle": false,
+  "_integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==",
+  "_location": "/bin-build",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "bin-build@^3.0.0",
+    "name": "bin-build",
+    "escapedName": "bin-build",
+    "rawSpec": "^3.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^3.0.0"
+  },
+  "_requiredBy": [
+    "/gifsicle",
+    "/imagemin-optipng/optipng-bin",
+    "/jpegtran-bin",
+    "/optipng-bin"
+  ],
+  "_resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz",
+  "_shasum": "c5780a25a8a9f966d8244217e6c1f5082a143861",
+  "_spec": "bin-build@^3.0.0",
+  "_where": "C:\\Users\\marcr\\Desktop\\KorAp\\Git\\Kalamar\\node_modules\\gifsicle",
+  "author": {
+    "name": "Kevin Mårtensson",
+    "email": "kevinmartensson@gmail.com",
+    "url": "https://github.com/kevva"
+  },
+  "bugs": {
+    "url": "https://github.com/kevva/bin-build/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "decompress": "^4.0.0",
+    "download": "^6.2.2",
+    "execa": "^0.7.0",
+    "p-map-series": "^1.0.0",
+    "tempfile": "^2.0.0"
+  },
+  "deprecated": false,
+  "description": "Easily build binaries",
+  "devDependencies": {
+    "ava": "*",
+    "del": "^3.0.0",
+    "nock": "^9.0.0",
+    "path-exists": "^3.0.0",
+    "xo": "*"
+  },
+  "engines": {
+    "node": ">=4"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/kevva/bin-build#readme",
+  "keywords": [
+    "binary",
+    "build",
+    "make"
+  ],
+  "license": "MIT",
+  "name": "bin-build",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/kevva/bin-build.git"
+  },
+  "scripts": {
+    "test": "xo && ava"
+  },
+  "version": "3.0.0",
+  "xo": {
+    "esnext": true
+  }
+}
diff --git a/node_modules/bin-build/readme.md b/node_modules/bin-build/readme.md
new file mode 100644
index 0000000..31b559b
--- /dev/null
+++ b/node_modules/bin-build/readme.md
@@ -0,0 +1,103 @@
+# bin-build [![Build Status](https://travis-ci.org/kevva/bin-build.svg?branch=master)](https://travis-ci.org/kevva/bin-build)
+
+> Easily build binaries
+
+
+## Install
+
+```
+$ npm install --save bin-build
+```
+
+
+## Usage
+
+```js
+const binBuild = require('bin-build');
+
+binBuild.url('http://www.lcdf.org/gifsicle/gifsicle-1.80.tar.gz', [
+	'./configure --disable-gifview --disable-gifdiff',
+	'make install'
+]).then(() => {
+	console.log('gifsicle built successfully');
+});
+
+binBuild.file('gifsicle-1.80.tar.gz', [
+	'./configure --disable-gifview --disable-gifdiff',
+	'make install'
+]).then(() => {
+	console.log('gifsicle built successfully');
+});
+```
+
+
+## API
+
+### binBuild.directory(directory, commands)
+
+#### directory
+
+Type: `string`
+
+Path to a directory containing the source code.
+
+#### commands
+
+Type: `Array`
+
+Commands to run when building.
+
+### binBuild.file(file, commands, [options])
+
+#### file
+
+Type: `string`
+
+Path to a archive file containing the source code.
+
+#### commands
+
+Type: `Array`
+
+Commands to run when building.
+
+#### options
+
+Type: `Object`
+
+##### strip
+
+Type: `number`<br>
+Default: `1`
+
+Strip a number of leading paths from file names on extraction.
+
+### binBuild.url(url, commands, [options])
+
+#### url
+
+Type: `string`
+
+URL to a archive file containing the source code.
+
+#### commands
+
+Type: `Array`
+
+Commands to run when building.
+
+#### options
+
+Type: `Object`
+
+##### strip
+
+Type: `number`<br>
+Default: `1`
+
+Strip a number of leading paths from file names on extraction.
+
+
+## License
+
+MIT © [Kevin Mårtensson](https://github.com/kevva)