diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 00000000..c4d58397 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,54 @@ +version: "2" # required to adjust maintainability checks +checks: + argument-count: + config: + threshold: 4 + complex-logic: + config: + threshold: 4 + file-lines: + config: + threshold: 250 + method-complexity: + config: + threshold: 5 + method-count: + config: + threshold: 20 + method-lines: + config: + threshold: 25 + nested-control-flow: + config: + threshold: 4 + return-statements: + config: + threshold: 4 + similar-code: + config: + threshold: # language-specific defaults. an override will affect all languages. + identical-code: + config: + threshold: # language-specific defaults. an override will affect all languages. + +plugins: + eslint: + enabled: true + # channel: "eslint-6" +# csslint: +# enabled: true + markdownlint: + enabled: true + +exclude_patterns: +# - "config/" + - "db/" + - "dist/" + - "features/" + - "**/node_modules/" + - "script/" + - "**/spec/" + - "**/test/" + - "**/tests/" + - "Tests/" + - "**/vendor/" diff --git a/.drone.yml b/.drone.yml index bbc3d5b7..ebfefd9b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,10 @@ kind: pipeline -name: default +type: docker +name: linux-amd64 + +platform: + arch: amd64 + os: linux steps: - name: docker @@ -10,17 +15,101 @@ steps: password: from_secret: dockerhub_password repo: ptarmiganlabs/butler - dockerfile: src/Dockerfile + dockerfile: src/Dockerfile.amd64 context: src - # auto_tag: true - tags: - - latest - - 'v3.0.4' - - '3.0.4' + auto_tag: true + auto_tag_suffix: linux-amd64 when: event: + - push - tag -# trigger: -# event: -# - tag \ No newline at end of file +--- +kind: pipeline +type: docker +name: linux-arm64 + +platform: + arch: arm64 + os: linux + +steps: +- name: docker + image: plugins/docker + settings: + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + repo: ptarmiganlabs/butler + dockerfile: src/Dockerfile.arm64 + context: src + auto_tag: true + auto_tag_suffix: linux-arm64 + +trigger: + event: + - push + - tag + +depends_on: +- linux-amd64 + + +--- +kind: pipeline +type: docker +name: linux-arm + +platform: + arch: arm + os: linux + +steps: +- name: docker + image: plugins/docker + settings: + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + repo: ptarmiganlabs/butler + dockerfile: src/Dockerfile.arm + context: src + auto_tag: true + auto_tag_suffix: linux-arm + +trigger: + event: + - push + - tag + +depends_on: +- linux-amd64 + + +--- +kind: pipeline +type: docker +name: manifest + +steps: +- name: publish + image: plugins/manifest:1.2 + settings: + auto_tag: true + ignore_missing: true + spec: src/docker/manifest.tmpl + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + +trigger: + event: + - push + - tag + +depends_on: +- linux-arm64 +- linux-arm \ No newline at end of file diff --git a/.gitignore b/.gitignore index f325dba8..3d295192 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ butler-docs/site/ src/udp_client/node_modules/* npm-debug.log .DS_Store +**/log \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2de66fcd..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - node -env: - - NODE_ENV=production -notifications: - slack: - rooms: - - secure: "h1ELLwWu1P8u4aLjbyISIe0K/xMRWovbGMxKfRHTsaTaudxSQ6Pbb1kmjFrtVUKSIdxdPS4k5JwY+YIMK5TbUql+gdPQ+WYSG9pdQUE3HeednhpE5XkbSUFQKFxw9a0QNdnslpm6MO8Qz5HtTjJWPhgVNZkNErvt9lH8/3Lg7xxneanJV/dCQ9fB/zdgtci5p18DjzjAqyT8pGzV3qVaoDF5XQrsdYwm+adUombWxBpLQGcybetB6xqpHMu/j9sPbdXfr4Ain+R+PBf3YnmR/iaCbHhvY38vvZbgEVo2WY9tMO0+pdZzsiMJ7lijuNT56HnsSd+uG7joCXHAp/Z5l2uiCc1H/DKoQmfk0qeQPsSx5ieocM9nlQuzrlouq97EnC1SzOGzFlRDA+J2/itVQB9t14sIUY1pnuwxzbITEdytAjOeG6b3MVnmMVTHissnIjZyjpQd4Pn7km3Avy0htdvBe9loUUrnceMF99bFPW8AK9QFV02WiKe0Md0OJ8hznxNWVuoMu6XZLdSB34SpdRgiptu7ghk+wvGmQFrFKe9uOwAyGSfJP9UF/yPvRRwhlt0ryFptU4zWVokDe9hMVuMctZFdWhTCrbIHXVwY98qzWC4Pqs5SLqW5MxWXMkP+AMEvBy+mswopEquMzREvslngzKODvtzSX5afVaOdtOg=" - on_success: always - on_failure: always - on_pull_requests: true -script: - - cd src - - npm run format1 diff --git a/.vscode/launch.json b/.vscode/launch.json index 87444c51..dbc99a01 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,7 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { "type": "node", diff --git a/README.md b/README.md index 91512fa7..567170b3 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,11 @@ [![Build Status](https://travis-ci.com/ptarmiganlabs/butler.svg?branch=master)](https://travis-ci.com/ptarmiganlabs/butler) [![Build Status](https://cloud.drone.io/api/badges/ptarmiganlabs/butler/status.svg)](https://cloud.drone.io/ptarmiganlabs/butler) -![Butler](icon.png) - +![Butler](icon.png) +\ Butler is a utility toolbox for [Qlik Sense](https://www.qlik.com/us/products/qlik-sense). -
-
-
- +\ +\ +\ **Documentation is available at [https://butler.ptarmiganlabs.com](https://butler.ptarmiganlabs.com).** diff --git a/changelog.md b/changelog.md index fd44d973..6f524854 100644 --- a/changelog.md +++ b/changelog.md @@ -1,11 +1,18 @@ # Change log +## 3.1.0 + +Stayin' alive: hearbeats are here. + +1. Added user configurable heartbeat option. Butler can now (optionally) do http calls to a url, indicating it is alive and well. This is useful in enterprise settings, for use together with network monitoring tools etc. +2. Updated dependencies to their latest versions. + ## 3.0.0 This version brings a general refresh of the tool, both in terms of updated dependencies, streamlined configuration settings and more up-to-date documentation. 1. **Breaking change** Streamline the names of configuration options in the production_template.yaml config file. This change however means that the config files for existing Butler environments need to be updated. Please refer to the [documentation site](https://ptarmiganlabs.github.io/butler/install-config/#config_file_syntax) file for info on the most recent config options. -2. Each REST API endpoint can be enabled/disabled. This is useful for deployment scarios when some endpoints for whatever reasons should not be available. +2. Each REST API endpoint can be enabled/disabled. This is useful for deployment scarios when some endpoints for whatever reasons should not be available. 3. Much improved logging of requests to the REST API endpoints. Turning on verbose logging will output lots of info on the requests, including what IP address the request comes from. 4. Better error messages when connection to Sense server for some reason fails. diff --git a/src/.eslintrc.yml b/src/.eslintrc.yml index 9358b9a5..5d47eb7f 100644 --- a/src/.eslintrc.yml +++ b/src/.eslintrc.yml @@ -1,5 +1,5 @@ parserOptions: - ecmaVersion: 6 + ecmaVersion: 2020 env: node: true extends: 'eslint:recommended' diff --git a/src/Dockerfile b/src/Dockerfile.amd64 similarity index 95% rename from src/Dockerfile rename to src/Dockerfile.amd64 index 3785e0e0..58506001 100644 --- a/src/Dockerfile +++ b/src/Dockerfile.amd64 @@ -1,3 +1,5 @@ +# Build Docker image for Amd64 + FROM node:12-stretch # Add metadata about the image diff --git a/src/Dockerfile.arm b/src/Dockerfile.arm new file mode 100644 index 00000000..bc646e6b --- /dev/null +++ b/src/Dockerfile.arm @@ -0,0 +1,29 @@ +# Build Docker image for Arm64 + +FROM node:12-stretch + +# Add metadata about the image +LABEL maintainer="Göran Sander mountaindude@ptarmiganlabs.com" +LABEL description="Extensible micro service adding features that Qlik Sense do not offer out of the box." + +# Create app dir inside container +WORKDIR /nodeapp + +# Install app dependencies separately (creating a separate layer for node_modules, effectively caching them between image rebuilds) +COPY package.json . +RUN npm install + +# Copy app's source files +COPY . . + +# Create and use non-root user +RUN groupadd -r nodejs \ + && useradd -m -r -g nodejs nodejs + +USER nodejs + +# Set up Docker healthcheck +HEALTHCHECK --interval=12s --timeout=12s --start-period=30s CMD ["node", "docker-healthcheck.js"] + +CMD ["node", "butler.js"] + diff --git a/src/Dockerfile.arm64 b/src/Dockerfile.arm64 new file mode 100644 index 00000000..bc646e6b --- /dev/null +++ b/src/Dockerfile.arm64 @@ -0,0 +1,29 @@ +# Build Docker image for Arm64 + +FROM node:12-stretch + +# Add metadata about the image +LABEL maintainer="Göran Sander mountaindude@ptarmiganlabs.com" +LABEL description="Extensible micro service adding features that Qlik Sense do not offer out of the box." + +# Create app dir inside container +WORKDIR /nodeapp + +# Install app dependencies separately (creating a separate layer for node_modules, effectively caching them between image rebuilds) +COPY package.json . +RUN npm install + +# Copy app's source files +COPY . . + +# Create and use non-root user +RUN groupadd -r nodejs \ + && useradd -m -r -g nodejs nodejs + +USER nodejs + +# Set up Docker healthcheck +HEALTHCHECK --interval=12s --timeout=12s --start-period=30s CMD ["node", "docker-healthcheck.js"] + +CMD ["node", "butler.js"] + diff --git a/src/butler-claim0-persistentvolumeclaim.yaml b/src/butler-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..360aa43c --- /dev/null +++ b/src/butler-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: butler-claim0 + name: butler-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/src/butler-deployment.yaml b/src/butler-deployment.yaml new file mode 100644 index 00000000..8c7847d1 --- /dev/null +++ b/src/butler-deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.controller.type: deployment + kompose.service.export: "true" + kompose.service.type: nodeport + kompose.version: 1.21.0 () + creationTimestamp: null + labels: + io.kompose.service: butler + name: butler +spec: + replicas: 2 + selector: + matchLabels: + io.kompose.service: butler + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.controller.type: deployment + kompose.service.export: "true" + kompose.service.type: nodeport + kompose.version: 1.21.0 () + creationTimestamp: null + labels: + io.kompose.service: butler + spec: + containers: + - env: + - name: NODE_ENV + value: production + image: ptarmiganlabs/butler:3.1.0 + imagePullPolicy: "" + name: butler + ports: + - containerPort: 8080 + - containerPort: 9997 + - containerPort: 9998 + resources: {} + volumeMounts: + - mountPath: /nodeapp/config + # name: butler-claim0 + name: butler-config-volume + restartPolicy: Always + serviceAccountName: "" + volumes: + # - name: butler-claim0 + # persistentVolumeClaim: + # claimName: butler-claim0 + - name: butler-config-volume + configMap: + name: production.yaml +status: {} diff --git a/src/butler-service.yaml b/src/butler-service.yaml new file mode 100644 index 00000000..2475de50 --- /dev/null +++ b/src/butler-service.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.controller.type: deployment + kompose.service.export: "true" + kompose.service.type: nodeport + kompose.version: 1.21.0 () + creationTimestamp: null + labels: + io.kompose.service: butler + name: butler +spec: + ports: + - name: "8080" + port: 8080 + targetPort: 8080 + - name: "9997" + port: 9997 + targetPort: 9997 + - name: "9998" + port: 9998 + targetPort: 9998 + selector: + io.kompose.service: butler + type: NodePort +status: + loadBalancer: {} diff --git a/src/butler.js b/src/butler.js index 13b71d92..9437ff9d 100644 --- a/src/butler.js +++ b/src/butler.js @@ -7,6 +7,7 @@ var globals = require('./globals'); var rest = require('./rest'); var mqtt = require('./mqtt'); var udp = require('./udp'); +heartbeat = require('./lib/heartbeat.js'); // Load certificates to use when connecting to healthcheck API // var fs = require('fs'), @@ -239,6 +240,13 @@ if (globals.config.get('Butler.restServerConfig.enable')) { } +// Set up heartbeats +if (globals.config.get('Butler.heartbeat.enabled') == true) { + heartbeat.setupHeartbeatTimer(globals.config, globals.logger); +} + + + // Start Docker healthcheck REST server on port 12398 restServerDockerHealthCheck.listen(12398, function () { globals.logger.info('MAIN: Docker healthcheck server now listening'); diff --git a/src/config/production_template.yaml b/src/config/production_template.yaml index 95c3ee9b..41c9d57e 100644 --- a/src/config/production_template.yaml +++ b/src/config/production_template.yaml @@ -5,6 +5,12 @@ Butler: fileLogging: false # true/false to enable/disable logging to disk file logDirectory: log # Subdirectory where log files are stored (no trailing / ) + # Heartbeats can be used to send "I'm alive" messages to any other tool, e.g. a infrastructure monitoring tool + heartbeat: + enabled: false + remoteURL: http://my.monitoring.server/some/path/ + frequency: every 1 hour # https://bunkat.github.io/later/parsers.html + slackConfig: enable: true webhookURL: diff --git a/src/docker-compose.yml b/src/docker-compose.yml index f37821ab..2d730474 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.3' services: butler: - image: ptarmiganlabs/butler:3.0.4 + image: ptarmiganlabs/butler:3.1.0 container_name: butler restart: always ports: @@ -19,4 +19,9 @@ services: options: max-file: "5" max-size: "5m" + labels: + kompose.service.type: nodeport # Used when creating Kubernetes resource files from this docker-compose file + kompose.service.export: "true" # Used when creating Kubernetes resource files from this docker-compose file + kompose.controller.type: deployment # Used when creating Kubernetes resource files from this docker-compose file + diff --git a/src/docker/manifest.tmpl b/src/docker/manifest.tmpl new file mode 100644 index 00000000..cf29a6a0 --- /dev/null +++ b/src/docker/manifest.tmpl @@ -0,0 +1,25 @@ +image: ptarmiganlabs/butler:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: ptarmiganlabs/butler:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - + image: ptarmiganlabs/butler:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - + image: ptarmiganlabs/butler:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 \ No newline at end of file diff --git a/src/lib/heartbeat.js b/src/lib/heartbeat.js new file mode 100644 index 00000000..f5aac4c1 --- /dev/null +++ b/src/lib/heartbeat.js @@ -0,0 +1,46 @@ +var later = require('later'); +const axios = require('axios'); + + +var callRemoteURL = function (remoteURL, logger) { + axios.get(remoteURL) + .then(function (response) { + // handle success + logger.debug(`HEARTBEAT: Sent heartbeat to ${remoteURL}`); + }) + .catch(function (error) { + // handle error + logger.error(`HEARTBEAT: Error sending heartbeat: ${error}`); + // }) + // .then(function () { + // // always executed + }); +}; + + +function setupHeartbeatTimer(config, logger) { + + try { + logger.debug( + `HEARTBEAT: Setting up heartbeat to remote: ${config.get('Butler.heartbeat.remoteURL')}`, + ); + + + var sched = later.parse.text(config.get('Butler.heartbeat.frequency')); + var t = later.setInterval(function () { + callRemoteURL(config.get('Butler.heartbeat.remoteURL'), logger); + }, sched); + + // Do an initial ping to the remote URL + callRemoteURL(config.get('Butler.heartbeat.remoteURL'), logger); + } catch (err) { + logger.error(`HEARTBEAT: ${err}`); + } + +} + + + +module.exports = { + setupHeartbeatTimer, +}; \ No newline at end of file diff --git a/src/lib/logRESTCall.js b/src/lib/logRESTCall.js new file mode 100644 index 00000000..af155629 --- /dev/null +++ b/src/lib/logRESTCall.js @@ -0,0 +1,9 @@ +// Load global variables and functions +var globals = require('../globals'); + +// Function for logging info about REST call +module.exports.logRESTCall = function (req) { + globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); + globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); + globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +}; diff --git a/src/package-lock.json b/src/package-lock.json index a906cf63..2cadb213 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1,27 +1,56 @@ { "name": "butler", - "version": "3.0.4", + "version": "3.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.10.4" } }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" } }, "@netflix/nerror": { @@ -41,16 +70,22 @@ } } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", + "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", "dev": true }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "ajv": { @@ -64,14 +99,11 @@ "uri-js": "^4.2.2" } }, - "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true }, "ansi-regex": { "version": "5.0.0", @@ -126,12 +158,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" }, "async-limiter": { "version": "1.0.1", @@ -143,6 +172,11 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -153,6 +187,14 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -255,22 +297,57 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", @@ -280,21 +357,6 @@ "glob": "^7.1.1" } }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, "color": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", @@ -326,11 +388,6 @@ "simple-swizzle": "^0.2.2" } }, - "colornames": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", - "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" - }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", @@ -408,11 +465,11 @@ } }, "config": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/config/-/config-3.3.0.tgz", - "integrity": "sha512-Xw++JjmYOLLX2HaYpySAveO8a9o+Af0jpDdEt1st8xtLeZI0bDfNsI90DGFyE/7mNnEjHiI8ivp/PieM6ODtdw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.1.tgz", + "integrity": "sha512-+2/KaaaAzdwUBE3jgZON11L1ggLLhpf2FsGrfqYFHZW22ySGv/HqYIXrBwKKvn+XZh1UBUjHwAcrfsSkSygT+Q==", "requires": { - "json5": "^1.0.1" + "json5": "^2.1.1" } }, "console-browserify": { @@ -429,24 +486,14 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "csv": { @@ -557,16 +604,6 @@ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" }, - "diagnostics": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", - "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", - "requires": { - "colorspace": "1.1.x", - "enabled": "1.0.x", - "kuler": "1.0.x" - } - }, "dict": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/dict/-/dict-1.4.0.tgz", @@ -596,9 +633,9 @@ "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==" }, "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" } } }, @@ -688,18 +725,15 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "enabled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", - "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", - "requires": { - "env-variable": "0.0.x" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "encodeurl": { "version": "1.0.2", @@ -715,20 +749,24 @@ } }, "enigma.js": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/enigma.js/-/enigma.js-2.6.3.tgz", - "integrity": "sha512-iF0biH11Sykyf8T4ghnvEE2hicE2MScm87/Etf6RLuXcHGVViY4MkT6p6fCJzpN3g+CpNyunPyrn07RY5mW5yg==" + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/enigma.js/-/enigma.js-2.7.1.tgz", + "integrity": "sha512-vQq0k8f2NDCr5bFBP/CPhUyVX2sNm1XIsGgx0zWGpApeWJrOkpfUBjPpqBrQq3KFa0aLEVWO6vBrQkFv3rIHFw==" + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } }, "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=" }, - "env-variable": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.6.tgz", - "integrity": "sha512-bHz59NlBbtS0NhftmR8+ExBEekE7br0e01jw+kk0NDro7TtZzBYZ5ScGPs3OmwnpyfHTHOtr1Y6uedCdrIldtg==" - }, "es5-ext": { "version": "0.10.53", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", @@ -811,22 +849,23 @@ "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.4.0.tgz", + "integrity": "sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.0", + "eslint-utils": "^2.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", @@ -835,30 +874,28 @@ "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", + "levn": "^0.4.1", "lodash": "^4.17.14", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -873,25 +910,16 @@ "is-extglob": "^2.1.1" } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true } } @@ -903,9 +931,9 @@ "dev": true }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -913,29 +941,29 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.2.0", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.2.0" } }, "esprima": { @@ -944,12 +972,20 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", - "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } } }, "esrecurse": { @@ -1020,17 +1056,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -1063,18 +1088,9 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==" }, "file-entry-cache": { "version": "5.0.1", @@ -1126,11 +1142,39 @@ } }, "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1157,13 +1201,14 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" } }, "fs.realpath": { @@ -1254,18 +1299,18 @@ } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "handle-thing": { "version": "2.0.0", @@ -1388,15 +1433,6 @@ "sshpk": "^1.7.0" } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1433,27 +1469,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "inquirer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", - "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - } - }, "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -1474,9 +1489,9 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-glob": { @@ -1492,12 +1507,6 @@ "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -1507,9 +1516,9 @@ } }, "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, "is-typedarray": { "version": "1.0.0", @@ -1552,9 +1561,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -1566,9 +1575,9 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jshint": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.0.tgz", - "integrity": "sha512-ooaD/hrBPhu35xXW4gn+o3SOuzht73gdBuffgJzrZBJZPGgGiiTvJEgTyxFvBO2nz0+X1G6etF8SzUODTlLY6Q==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.1.tgz", + "integrity": "sha512-WXWePB8ssAH3DlD05IoqolsY6arhbll/1+i2JkRPpihQAuiNaR/gSt8VKIcxpV5m6XChP0hCwESQUqpuQMA8Tg==", "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", @@ -1601,19 +1610,20 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", + "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "^4.1.6", + "universalify": "^1.0.0" } }, "jsprim": { @@ -1628,12 +1638,14 @@ } }, "kuler": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", - "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", - "requires": { - "colornames": "^1.1.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, + "later": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/later/-/later-1.2.0.tgz", + "integrity": "sha1-8s9sTdeVbdL1IK3wMpg26YdrrQ8=" }, "leven": { "version": "2.1.0", @@ -1641,28 +1653,28 @@ "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "logform": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", - "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", "requires": { "colors": "^1.2.1", "fast-safe-stringify": "^2.0.4", - "fecha": "^2.3.3", + "fecha": "^4.2.0", "ms": "^2.1.1", "triple-beam": "^1.3.0" } @@ -1693,12 +1705,6 @@ "mime-db": "1.43.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -1713,9 +1719,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mixme": { "version": "0.3.5", @@ -1723,9 +1729,9 @@ "integrity": "sha512-SyV9uPETRig5ZmYev0ANfiGeB+g6N2EnqqEfBbCGmmJ6MgZ3E4qv5aPbnHVdZ60KAHHXV+T3sXopdrnIXQdmjQ==" }, "mkdirp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz", - "integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "moment": { "version": "2.24.0", @@ -1733,13 +1739,14 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "mqtt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-3.0.0.tgz", - "integrity": "sha512-0nKV6MAc1ibKZwaZQUTb3iIdT4NVpj541BsYrqrGBcQdQ7Jd0MnZD1/6/nj1UFdGTboK9ZEUXvkCu2nPCugHFA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-4.1.0.tgz", + "integrity": "sha512-dBihVZzaB8p9G/2ktSfamiaHmMnpCpP2du08317ZuEX1kBAbZOG9aMJQ11EChXnOX3GKUeiZYaSITueceQKT2A==", "requires": { "base64-js": "^1.3.0", "commist": "^1.0.0", "concat-stream": "^1.6.2", + "debug": "^4.1.1", "end-of-stream": "^1.4.1", "es6-map": "^0.1.5", "help-me": "^1.0.1", @@ -1800,12 +1807,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "mv": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", @@ -1817,19 +1818,13 @@ "rimraf": "~2.4.0" }, "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "optional": true - }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } } } @@ -1862,12 +1857,6 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node-slack": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/node-slack/-/node-slack-0.0.7.tgz", @@ -1909,31 +1898,25 @@ } }, "one-time": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", - "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", "requires": { - "mimic-fn": "^2.1.0" + "fn.name": "1.x.x" } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "ordered-read-streams": { @@ -1973,12 +1956,6 @@ } } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -1999,9 +1976,9 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "performance-now": { @@ -2018,9 +1995,9 @@ } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "process-nextick-args": { @@ -2104,9 +2081,9 @@ } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "reinterval": { @@ -2207,16 +2184,6 @@ "safe-json-stringify": "^1.0.4" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "ret": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", @@ -2246,24 +2213,6 @@ } } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -2354,18 +2303,18 @@ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "shelljs": { @@ -2373,12 +2322,6 @@ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=" }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -2396,14 +2339,6 @@ "ansi-styles": "^3.2.0", "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } } }, "spdy": { @@ -2475,9 +2410,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "string_decoder": { "version": "1.3.0", @@ -2534,23 +2469,29 @@ } }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^4.1.0" } } } @@ -2561,20 +2502,12 @@ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "ansi-regex": "^5.0.0" } }, "strip-json-comments": { @@ -2601,31 +2534,6 @@ "lodash": "^4.17.14", "slice-ansi": "^2.1.0", "string-width": "^3.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } } }, "text-hex": { @@ -2639,12 +2547,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -2692,15 +2594,6 @@ "xtend": "~4.0.0" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", @@ -2724,12 +2617,6 @@ "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2749,12 +2636,12 @@ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-fest": { @@ -2788,9 +2675,9 @@ } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" }, "uri-js": { "version": "4.2.2", @@ -2811,9 +2698,9 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, "vasync": { @@ -2895,28 +2782,28 @@ } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, "winston": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", - "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", - "requires": { - "async": "^2.6.1", - "diagnostics": "^1.1.1", - "is-stream": "^1.1.0", - "logform": "^2.1.1", - "one-time": "0.0.4", - "readable-stream": "^3.1.1", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.3.0" + "winston-transport": "^4.4.0" }, "dependencies": { "readable-stream": { @@ -2930,9 +2817,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "string_decoder": { "version": "1.3.0", @@ -2945,9 +2832,9 @@ } }, "winston-daily-rotate-file": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-4.4.2.tgz", - "integrity": "sha512-pVOUJKxN+Kn6LnOJZ4tTwdV5+N+fCkiRAb3bVnzcPtOj1ScxGNC3DyUhHuAHssBtMl5s45/aUcSUtApH+69V5A==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-4.5.0.tgz", + "integrity": "sha512-/HqeWiU48dzGqcrABRlxYWVMdL6l3uKCtFSJyrqK+E2rLnSFNsgYpvwx15EgTitBLNzH69lQd/+z2ASryV2aqw==", "requires": { "file-stream-rotator": "^0.5.7", "object-hash": "^2.0.1", @@ -2956,11 +2843,11 @@ } }, "winston-transport": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", - "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", "requires": { - "readable-stream": "^2.3.6", + "readable-stream": "^2.3.7", "triple-beam": "^1.2.0" }, "dependencies": { @@ -3013,27 +2900,21 @@ "mkdirp": "^0.5.1" }, "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } } } }, "ws": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", - "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", + "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" }, "xtend": { "version": "4.0.2", diff --git a/src/package.json b/src/package.json index 5ae4d4f4..e377e770 100644 --- a/src/package.json +++ b/src/package.json @@ -1,30 +1,32 @@ { "name": "butler", - "version": "3.0.4", + "version": "3.1.0", "description": "Microservice providing features that Qlik Sense or Qlikview cannot do out of the box.", "docs": "node_modules/.bin/docco {mqtt,qrs}/{**/*,*} -l classic", "dependencies": { "any-base": "^1.1.0", - "config": "^3.2.4", + "axios": "^0.19.2", + "config": "^3.3.1", "dict": "^1.4.0", - "enigma.js": "^2.6.3", - "fs-extra": "^8.1.0", - "js-yaml": "^3.13.1", - "jshint": "^2.10.3", - "mkdirp": "^1.0.3", - "mqtt": "^3.0.0", + "enigma.js": "^2.7.1", + "fs-extra": "^9.0.1", + "js-yaml": "^3.14.0", + "jshint": "^2.11.1", + "later": "^1.2.0", + "mkdirp": "^1.0.4", + "mqtt": "^4.1.0", "node-slack": "0.0.7", "promise": "^8.0.3", "restify": "^8.4.1", "restify-cors-middleware": "^1.1.1", "restify-errors": "^8.0.1", "serializeapp": "^3.0.0", - "winston": "^3.2.1", - "winston-daily-rotate-file": "^4.3.0", - "ws": "^7.2.0" + "winston": "^3.3.3", + "winston-daily-rotate-file": "^4.5.0", + "ws": "^7.3.1" }, "devDependencies": { - "eslint": "6.8.0", + "eslint": "7.4.0", "eslint-config-google": "0.14.0" }, "homepage": "https://github.com/ptarmiganlabs/butler", diff --git a/src/rest/activeUserCount.js b/src/rest/activeUserCount.js index 7e153653..cd37116f 100644 --- a/src/rest/activeUserCount.js +++ b/src/rest/activeUserCount.js @@ -1,14 +1,13 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /activeUserCount REST endpoint -module.exports.respondActiveUserCount = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondActiveUserCount = function (req, res, next) { + logRESTCall(req); - req.query.response = globals.currentUsers.size; + req.query.response = globals.currentUsers.size; - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/activeUsers.js b/src/rest/activeUsers.js index fe766fd3..7cd6dd77 100644 --- a/src/rest/activeUsers.js +++ b/src/rest/activeUsers.js @@ -1,20 +1,19 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /activeUsers REST endpoint -module.exports.respondActiveUsers = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondActiveUsers = function (req, res, next) { + logRESTCall(req); - // Build JSON of all active users - var activeUsers = []; - globals.currentUsers.forEach(function(value, key) { - activeUsers.push(key); - }); + // Build JSON of all active users + var activeUsers = []; + globals.currentUsers.forEach(function (value, key) { + activeUsers.push(key); + }); - req.query.response = JSON.stringify(activeUsers); + req.query.response = JSON.stringify(activeUsers); - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/baseConversion.js b/src/rest/baseConversion.js index e59390d1..4979b23b 100644 --- a/src/rest/baseConversion.js +++ b/src/rest/baseConversion.js @@ -1,36 +1,35 @@ // Load global variables and functions -var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; + var anyBase = require('any-base'), - base62_to_Hex = anyBase( - '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', - '0123456789abcdef', - ), - hex_to_base62 = anyBase( - '0123456789abcdef', - '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', - ); + base62_to_Hex = anyBase( + '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', + '0123456789abcdef', + ), + hex_to_base62 = anyBase( + '0123456789abcdef', + '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', + ); + + // Conversion base62 to base16 -module.exports.respondBase62ToBase16 = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondBase62ToBase16 = function (req, res, next) { + logRESTCall(req); - var base16 = base62_to_Hex(req.query.base62); + var base16 = base62_to_Hex(req.query.base62); - res.send(base16); - next(); + res.send(base16); + next(); }; // Conversion base16 to base62 -module.exports.respondBase16ToBase62 = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondBase16ToBase62 = function (req, res, next) { + logRESTCall(req); - var base62 = hex_to_base62(req.query.base16); + var base62 = hex_to_base62(req.query.base16); - res.send(base62); - next(); + res.send(base62); + next(); }; diff --git a/src/rest/butlerPing.js b/src/rest/butlerPing.js index b9cfb4c1..3dfce584 100644 --- a/src/rest/butlerPing.js +++ b/src/rest/butlerPing.js @@ -1,14 +1,12 @@ // Load global variables and functions -var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /butlerPing REST endpoint -module.exports.respondButlerPing = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondButlerPing = function (req, res, next) { + logRESTCall(req); - req.params.response = 'Butler reporting for duty'; + req.params.response = 'Butler reporting for duty'; - res.send(req.params); - next(); + res.send(req.params); + next(); }; diff --git a/src/rest/createDir.js b/src/rest/createDir.js index 6c901f34..8dc76267 100644 --- a/src/rest/createDir.js +++ b/src/rest/createDir.js @@ -1,23 +1,22 @@ // Load global variables and functions var globals = require('../globals'); - var mkdirp = require('mkdirp'); +const errors = require('restify-errors'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /createDir REST endpoint -module.exports.respondCreateDir = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondCreateDir = function (req, res, next) { + logRESTCall(req); + + mkdirp(req.query.directory) + .then(made => + globals.logger.verbose(`Created dir ${made}`)) - mkdirp(req.query.directory, function(err) { - // path was created unless there was error - if (err) { - globals.logger.error(`Error while creating dir ${req.query.directory}: ${err}`); - } else { - globals.logger.verbose(`Created dir ${req.query.directory}`); - } - }); + .catch(function (error) { + globals.logger.error(`CREATE_DIR: ${JSON.stringify(error, null, 2)}`); + return next(new errors.InternalServerError('Failed to create directory.')); + }); - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/createDirQVD.js b/src/rest/createDirQVD.js index 283f75fb..acbe46f9 100644 --- a/src/rest/createDirQVD.js +++ b/src/rest/createDirQVD.js @@ -1,23 +1,22 @@ // Load global variables and functions var globals = require('../globals'); - var mkdirp = require('mkdirp'); +const errors = require('restify-errors'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /createDirQVD REST endpoint -module.exports.respondCreateDirQVD = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondCreateDirQVD = function (req, res, next) { + logRESTCall(req); + + mkdirp(globals.qvdFolder + '/' + req.query.directory) + .then(made => + globals.logger.verbose(`Created dir ${made}`)) - mkdirp(globals.qvdFolder + '/' + req.query.directory, function(err) { - // path was created unless there was error - if (err) { - globals.logger.error(`Error while creating dir ${req.query.directory}: ${err}`); - } else { - globals.logger.verbose(`Created dir ${req.query.directory}`); - } - }); + .catch(function (error) { + globals.logger.error(`CREATE_DIR: ${JSON.stringify(error, null, 2)}`); + return next(new errors.InternalServerError('Failed to create directory.')); + }); - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/getDiskSpace.js b/src/rest/getDiskSpace.js index e68fe0fe..7c030f87 100644 --- a/src/rest/getDiskSpace.js +++ b/src/rest/getDiskSpace.js @@ -1,25 +1,24 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; var disk = require('diskusage'); // Function for handling /getDiskSpace REST endpoint -module.exports.respondGetDiskSpace = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondGetDiskSpace = function (req, res, next) { + logRESTCall(req); - // Windows: get disk usage. Takes path as first parameter - disk.check(req.query.path, function(err, info) { - globals.logger.info(`Get disk space: ${info}`); + // Windows: get disk usage. Takes path as first parameter + disk.check(req.query.path, function (err, info) { + globals.logger.info(`Get disk space: ${info}`); - req.query.available = info.available; - req.query.free = info.free; - req.query.total = info.total; - }); + req.query.available = info.available; + req.query.free = info.free; + req.query.total = info.total; + }); - res.send(req.query); - next(); + res.send(req.query); + next(); }; /* diff --git a/src/rest/index.js b/src/rest/index.js index 19453eed..10df97e2 100644 --- a/src/rest/index.js +++ b/src/rest/index.js @@ -1,16 +1,16 @@ module.exports = { - activeUserCount: require('./activeUserCount.js'), - activeUsers: require('./activeUsers.js'), - slackPostMessage: require('./slackPostMessage.js'), - createDir: require('./createDir.js'), - createDirQVD: require('./createDirQVD.js'), - mqttPublishMessage: require('./mqttPublishMessage.js'), - senseStartTask: require('./senseStartTask.js'), - senseQRSPing: require('./senseQRSPing.js'), - senseAppDump: require('./senseAppDump.js'), - senseListApps: require('./senseListApps.js'), - butlerPing: require('./butlerPing.js'), - base62ToBase16: require('./baseConversion.js'), - base16ToBase62: require('./baseConversion.js'), + activeUserCount: require('./activeUserCount.js'), + activeUsers: require('./activeUsers.js'), + slackPostMessage: require('./slackPostMessage.js'), + createDir: require('./createDir.js'), + createDirQVD: require('./createDirQVD.js'), + mqttPublishMessage: require('./mqttPublishMessage.js'), + senseStartTask: require('./senseStartTask.js'), + senseQRSPing: require('./senseQRSPing.js'), + senseAppDump: require('./senseAppDump.js'), + senseListApps: require('./senseListApps.js'), + butlerPing: require('./butlerPing.js'), + base62ToBase16: require('./baseConversion.js'), + base16ToBase62: require('./baseConversion.js'), }; //getDiskSpace: require('./getDiskSpace.js'), diff --git a/src/rest/mqttPublishMessage.js b/src/rest/mqttPublishMessage.js index e29face3..79f379a5 100644 --- a/src/rest/mqttPublishMessage.js +++ b/src/rest/mqttPublishMessage.js @@ -1,15 +1,14 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /mqttPublishMessage REST endpoint -module.exports.respondMQTTPublishMessage = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondMQTTPublishMessage = function (req, res, next) { + logRESTCall(req); - // Use data in request to publish MQTT message - globals.mqttClient.publish(req.query.topic, req.query.message); + // Use data in request to publish MQTT message + globals.mqttClient.publish(req.query.topic, req.query.message); - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/senseAppDump.js b/src/rest/senseAppDump.js index 6d52c55a..abbc8b8c 100644 --- a/src/rest/senseAppDump.js +++ b/src/rest/senseAppDump.js @@ -1,5 +1,6 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; var serializeApp = require('serializeapp'); @@ -11,91 +12,89 @@ const errors = require('restify-errors'); const qixSchema = require('enigma.js/schemas/' + globals.configEngine.engineVersion); // Function for handling /senseAppDump REST endpoint -module.exports.respondSenseAppDump = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondSenseAppDump = function (req, res, next) { + logRESTCall(req); - globals.logger.info(`Dumping app: ${req.query.appId}`); + globals.logger.info(`Dumping app: ${req.query.appId}`); - // create a new session - const configEnigma = { - schema: qixSchema, - url: `wss://${globals.configEngine.host}:${globals.configEngine.port}`, - createSocket: url => - new WebSocket(url, { - key: globals.configEngine.key, - cert: globals.configEngine.cert, - headers: { - 'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository', - }, - rejectUnauthorized: false, - }), - }; + // create a new session + const configEnigma = { + schema: qixSchema, + url: `wss://${globals.configEngine.host}:${globals.configEngine.port}`, + createSocket: url => + new WebSocket(url, { + key: globals.configEngine.key, + cert: globals.configEngine.cert, + headers: { + 'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository', + }, + rejectUnauthorized: false, + }), + }; - var session = enigma.create(configEnigma); - session - .open() - .then(global => { - // We can now interact with the global object, for example get the document list. - // Please refer to the Engine API documentation for available methods. + var session = enigma.create(configEnigma); + session + .open() + .then(global => { + // We can now interact with the global object, for example get the document list. + // Please refer to the Engine API documentation for available methods. - global - .openDoc(req.query.appId, '', '', '', true) - .then(function(app) { - return serializeApp(app); - }) - .then(function(data) { - var d = data; + global + .openDoc(req.query.appId, '', '', '', true) + .then(function (app) { + return serializeApp(app); + }) + .then(function (data) { + var d = data; - // Close connection to Sense server - try { - session.close(); - } catch (err) { - globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); - } + // Close connection to Sense server + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + } - res.send(d); - }) - .catch(function(error) { - globals.logger.error( - `Error while opening doc during app dump: ${JSON.stringify(error, null, 2)}`, - ); + res.send(d); + }) + .catch(function (error) { + globals.logger.error( + `Error while opening doc during app dump: ${JSON.stringify(error, null, 2)}`, + ); - try { - session.close(); - } catch (err) { - globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); - } + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + } - // res.send(error); - return next(new errors.RequestTimeoutError('Failed to open document in Sense engine.')); - }); + // res.send(error); + return next(new errors.RequestTimeoutError('Failed to open document in Sense engine.')); + }); - return next(); - }) - .catch(function(error) { - globals.logger.error( - `Error while opening session to Sense engine during app dump: ${JSON.stringify( + return next(); + }) + .catch(function (error) { + globals.logger.error( + `Error while opening session to Sense engine during app dump: ${JSON.stringify( error, null, 2, )}`, - ); + ); - try { - session.close(); - } catch (err) { - globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); - } + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + } - // res.send(error); - return next(new errors.RequestTimeoutError('Failed to open session to Sense engine.')); - }); + // res.send(error); + return next(new errors.RequestTimeoutError('Failed to open session to Sense engine.')); + }); }; diff --git a/src/rest/senseListApps.js b/src/rest/senseListApps.js index 0c8dc681..a8d63ba8 100644 --- a/src/rest/senseListApps.js +++ b/src/rest/senseListApps.js @@ -1,5 +1,6 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; const enigma = require('enigma.js'); const WebSocket = require('ws'); @@ -8,91 +9,89 @@ const errors = require('restify-errors'); // Set up enigma.js configuration const qixSchema = require('enigma.js/schemas/' + globals.configEngine.engineVersion); + + // Function for handling /senseListApps REST endpoint -module.exports.respondSenseListApps = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondSenseListApps = function (req, res, next) { + logRESTCall(req); - // create a new session - const configEnigma = { - schema: qixSchema, - url: `wss://${globals.configEngine.host}:${globals.configEngine.port}`, - createSocket: url => - new WebSocket(url, { - key: globals.configEngine.key, - cert: globals.configEngine.cert, - headers: { - 'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository', - }, - rejectUnauthorized: false, - }), - }; + // create a new session + const configEnigma = { + schema: qixSchema, + url: `wss://${globals.configEngine.host}:${globals.configEngine.port}`, + createSocket: url => + new WebSocket(url, { + key: globals.configEngine.key, + cert: globals.configEngine.cert, + headers: { + 'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository', + }, + rejectUnauthorized: false, + }), + }; - var session = enigma.create(configEnigma); - session - .open() - .then(global => { - // We can now interact with the global object, for example get the document list. - // Please refer to the Engine API documentation for available methods. - // Note: getting a list of all apps could also be done using QRS - global - .getDocList() - .then(function(docList) { - var jsonArray = []; - docList.forEach(function(doc) { - jsonArray = jsonArray.concat([ - { - id: doc.qDocId.toString(), - name: doc.qDocName.toString(), - }, - ]); - }); + var session = enigma.create(configEnigma); + session + .open() + .then(global => { + // We can now interact with the global object, for example get the document list. + // Please refer to the Engine API documentation for available methods. + // Note: getting a list of all apps could also be done using QRS + global + .getDocList() + .then(function (docList) { + var jsonArray = []; + docList.forEach(function (doc) { + jsonArray = jsonArray.concat([{ + id: doc.qDocId.toString(), + name: doc.qDocName.toString(), + }, ]); + }); - res.send(jsonArray); + res.send(jsonArray); + + // Close connection to Sense server + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + next(); + } + }) + .catch(function (error) { + globals.logger.error(`Èrror while getting app list: ${JSON.stringify(error, null, 2)}`); + + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + } + }); - // Close connection to Sense server - try { - session.close(); - } catch (err) { - globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); next(); - } }) - .catch(function(error) { - globals.logger.error(`Èrror while getting app list: ${JSON.stringify(error, null, 2)}`); - - try { - session.close(); - } catch (err) { + .catch(function (error) { globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); - } - }); - - next(); - }) - .catch(function(error) { - globals.logger.error( - `Error while opening session to Sense engine during app listing: ${JSON.stringify( + `Error while opening session to Sense engine during app listing: ${JSON.stringify( error, null, 2, )}`, - ); + ); - try { - session.close(); - } catch (err) { - globals.logger.error( - `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, - ); - } + try { + session.close(); + } catch (err) { + globals.logger.error( + `Error closing connection to Sense engine: ${JSON.stringify(err, null, 2)}`, + ); + } - // res.send(error); - return next(new errors.RequestTimeoutError('Failed to open session to Sense engine.')); - }); + // res.send(error); + return next(new errors.RequestTimeoutError('Failed to open session to Sense engine.')); + }); }; diff --git a/src/rest/senseQRSPing.js b/src/rest/senseQRSPing.js index a72f3f5d..d1c502eb 100644 --- a/src/rest/senseQRSPing.js +++ b/src/rest/senseQRSPing.js @@ -1,22 +1,21 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /senseQRSPing REST endpoint -module.exports.respondSenseQRSPing = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondSenseQRSPing = function (req, res, next) { + logRESTCall(req); - // Ping Sense QRS - globals.qrs.get('/qrs/ping').then( - function(data) { - globals.logger.verbose(`return value: ${data}`); - }, - function(err) { - globals.logger.error(`An error occurred: ${err}`); - }, - ); + // Ping Sense QRS + globals.qrs.get('/qrs/ping').then( + function (data) { + globals.logger.verbose(`return value: ${data}`); + }, + function (err) { + globals.logger.error(`An error occurred: ${err}`); + }, + ); - res.send(req.query); - next(); + res.send(req.query); + next(); }; diff --git a/src/rest/senseStartTask.js b/src/rest/senseStartTask.js index 1ef0728c..58cefba6 100644 --- a/src/rest/senseStartTask.js +++ b/src/rest/senseStartTask.js @@ -1,17 +1,16 @@ // Load global variables and functions var globals = require('../globals'); -const errors = require('restify-errors'); +// const errors = require('restify-errors'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /senseStartTask REST endpoint -module.exports.respondSenseStartTask = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondSenseStartTask = function (req, res, next) { + logRESTCall(req); - // Use data in request to start Qlik Sense task - globals.logger.verbose(`Starting task: ${req.query.taskId}`); + // Use data in request to start Qlik Sense task + globals.logger.verbose(`Starting task: ${req.query.taskId}`); - globals.qrsUtil.senseStartTask.senseStartTask(req.query.taskId); - res.send(req.query); - next(); + globals.qrsUtil.senseStartTask.senseStartTask(req.query.taskId); + res.send(req.query); + next(); }; diff --git a/src/rest/slackPostMessage.js b/src/rest/slackPostMessage.js index 4f49b9d8..2234191f 100644 --- a/src/rest/slackPostMessage.js +++ b/src/rest/slackPostMessage.js @@ -1,19 +1,18 @@ // Load global variables and functions var globals = require('../globals'); +var logRESTCall = require('../lib/logRESTCall').logRESTCall; // Function for handling /slackPostMessage REST endpoint -module.exports.respondSlackPostMessage = function(req, res, next) { - globals.logger.info(`${req.url} called from ${req.client.remoteAddress}`); - globals.logger.verbose(`Query: ${JSON.stringify(req.query, null, 2)}`); - globals.logger.verbose(`Headers: ${JSON.stringify(req.headers, null, 2)}`); +module.exports.respondSlackPostMessage = function (req, res, next) { + logRESTCall(req); - globals.slackObj.send({ - text: req.query.msg, - channel: req.query.channel, - username: req.query.from_user, - icon_emoji: req.query.emoji, - }); + globals.slackObj.send({ + text: req.query.msg, + channel: req.query.channel, + username: req.query.from_user, + icon_emoji: req.query.emoji, + }); - res.send(req.query); - next(); + res.send(req.query); + next(); };