From 87acca168b227ba3237351f4e52d3cd303cc16bd Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 21:00:43 +0800 Subject: [PATCH 01/17] process windows x86 and x64 --- .github/workflows/nodejs.yaml | 9 ++ scripts/nodejs/.gitignore | 1 + scripts/nodejs/index.js | 181 ++++++++++++++++++++++++++++++++++ scripts/nodejs/package.json | 29 ++++++ scripts/nodejs/run.sh | 45 +++++++++ 5 files changed, 265 insertions(+) create mode 100644 scripts/nodejs/.gitignore create mode 100644 scripts/nodejs/index.js create mode 100644 scripts/nodejs/package.json create mode 100755 scripts/nodejs/run.sh diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 6dadf78e..8d763023 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -4,12 +4,14 @@ on: push: branches: - master + - nodejs paths: - '.github/workflows/nodejs.yaml' - 'CMakeLists.txt' - 'cmake/**' - 'nodejs-examples/**' - 'sherpa-ncnn/csrc/*' + - 'scripts/nodejs/**' pull_request: branches: - master @@ -19,6 +21,7 @@ on: - 'cmake/**' - 'nodejs-examples/**' - 'sherpa-ncnn/csrc/*' + - 'scripts/nodejs/**' concurrency: group: nodejs-${{ github.ref }} @@ -50,6 +53,12 @@ jobs: with: node-version: 13 + - name: Build nodejs package + shell: bash + run: | + cd scripts/nodejs + ./run.sh + - name: Display node version shell: bash run: | diff --git a/scripts/nodejs/.gitignore b/scripts/nodejs/.gitignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/scripts/nodejs/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/scripts/nodejs/index.js b/scripts/nodejs/index.js new file mode 100644 index 00000000..f33bd676 --- /dev/null +++ b/scripts/nodejs/index.js @@ -0,0 +1,181 @@ +// Copyright (c) 2023 Xiaomi Corporation (authors: Fangjun Kuang) +// +// Please use +// +// npm install ffi-napi ref-struct-napi +// +// before you use this file +// +// +// Please use node 13. node 16, 18, 20, and 21 are known not working. +// See also +// https://github.com/node-ffi-napi/node-ffi-napi/issues/244 +// and +// https://github.com/node-ffi-napi/node-ffi-napi/issues/97 +'use strict' + +const debug = require('debug')('sherpa-ncnn'); +const os = require('os'); +const path = require('path'); +const ffi = require('ffi-napi'); +const ref = require('ref-napi'); +const fs = require('fs'); + +const StructType = require('ref-struct-napi'); +const cstring = ref.types.CString; +const int32_t = ref.types.int32; +const float = ref.types.float; +const floatPtr = ref.refType(float); + +const RecognizerPtr = ref.refType(ref.types.void); +const StreamPtr = ref.refType(ref.types.void); +const SherpaNcnnModelConfig = StructType({ + 'encoderParam': cstring, + 'encoderBin': cstring, + 'decoderParam': cstring, + 'decoderBin': cstring, + 'joinerParam': cstring, + 'joinerBin': cstring, + 'tokens': cstring, + 'useVulkanCompute': int32_t, + 'numThreads': int32_t, +}); + +const SherpaNcnnDecoderConfig = StructType({ + 'decodingMethod': cstring, + 'numActivePaths': int32_t, +}); + +const SherpaNcnnFeatureExtractorConfig = StructType({ + 'sampleRate': float, + 'featureDim': int32_t, +}); + +const SherpaNcnnRecognizerConfig = StructType({ + 'featConfig': SherpaNcnnFeatureExtractorConfig, + 'modelConfig': SherpaNcnnModelConfig, + 'decoderConfig': SherpaNcnnDecoderConfig, + 'enableEndpoint': int32_t, + 'rule1MinTrailingSilence': float, + 'rule2MinTrailingSilence': float, + 'rule3MinUtteranceLength': float, + 'hotwordsFile': cstring, + 'hotwordsScore': cstring, +}); + +const SherpaNcnnResult = StructType({ + 'text': cstring, + 'tokens': cstring, + 'timestamps': floatPtr, + 'count': int32_t, +}); + + +const ResultPtr = ref.refType(SherpaNcnnResult); +const RecognizerConfigPtr = ref.refType(SherpaNcnnRecognizerConfig) + +let soname; +if (os.platform() == 'win32') { + soname = path.join(__dirname, 'install', 'lib', 'sherpa-ncnn-c-api.dll'); +} else if (os.platform() == 'darwin') { + soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.dylib'); +} else if (os.platform() == 'linux') { + soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.so'); +} else { + throw new Error(`Unsupported platform ${os.platform()}`); +} +if (!fs.existsSync(soname)) { + throw new Error(`Cannot find file ${soname}. Please make sure you have run + ./build.sh`); +} + +debug('soname ', soname) + +const libsherpa_ncnn = ffi.Library(soname, { + 'CreateRecognizer': [RecognizerPtr, [RecognizerConfigPtr]], + 'DestroyRecognizer': ['void', [RecognizerPtr]], + 'CreateStream': [StreamPtr, [RecognizerPtr]], + 'DestroyStream': ['void', [StreamPtr]], + 'AcceptWaveform': ['void', [StreamPtr, float, floatPtr, int32_t]], + 'IsReady': [int32_t, [RecognizerPtr, StreamPtr]], + 'Decode': ['void', [RecognizerPtr, StreamPtr]], + 'GetResult': [ResultPtr, [RecognizerPtr, StreamPtr]], + 'DestroyResult': ['void', [ResultPtr]], + 'Reset': ['void', [RecognizerPtr, StreamPtr]], + 'InputFinished': ['void', [StreamPtr]], + 'IsEndpoint': [int32_t, [RecognizerPtr, StreamPtr]], +}); + +class Recognizer { + /** + * @param {SherpaNcnnRecognizerConfig} config Configuration for the recognizer + * + * The user has to invoke this.free() at the end to avoid memory leak. + */ + constructor(config) { + this.recognizer_handle = libsherpa_ncnn.CreateRecognizer(config.ref()); + this.stream_handle = libsherpa_ncnn.CreateStream(this.recognizer_handle); + } + + free() { + if (this.stream_handle) { + libsherpa_ncnn.DestroyStream(this.stream_handle); + this.stream_handle = null; + } + + libsherpa_ncnn.DestroyRecognizer(this.recognizer_handle); + this.handle = null; + } + + /** + * @param {bool} true to create a new stream + */ + reset(recreate) { + if (recreate) { + libsherpa_ncnn.DestroyStream(this.stream_handle); + this.stream_handle = libsherpa_ncnn.CreateStream(this.recognizer_handle); + return; + } + libsherpa_ncnn.Reset(this.recognizer_handle, this.stream_handle) + } + /** + * @param {float} Sample rate of the input data + * @param {float[]} A 1-d float array containing audio samples. It should be + * in the range [-1, 1]. + */ + acceptWaveform(sampleRate, samples) { + libsherpa_ncnn.AcceptWaveform( + this.stream_handle, sampleRate, samples, samples.length); + } + + isReady() { + return libsherpa_ncnn.IsReady(this.recognizer_handle, this.stream_handle); + } + + decode() { + libsherpa_ncnn.Decode(this.recognizer_handle, this.stream_handle); + } + + getResult() { + const h = + libsherpa_ncnn.GetResult(this.recognizer_handle, this.stream_handle); + const text = Buffer.from(h.deref().text, 'utf-8').toString(); + libsherpa_ncnn.DestroyResult(h); + return text; + } +}; + +// alias + +const ModelConfig = SherpaNcnnModelConfig; +const DecoderConfig = SherpaNcnnDecoderConfig; +const FeatureConfig = SherpaNcnnFeatureExtractorConfig; +const RecognizerConfig = SherpaNcnnRecognizerConfig; + +module.exports = { + FeatureConfig, + ModelConfig, + DecoderConfig, + Recognizer, + RecognizerConfig, +}; diff --git a/scripts/nodejs/package.json b/scripts/nodejs/package.json new file mode 100644 index 00000000..7583d6b6 --- /dev/null +++ b/scripts/nodejs/package.json @@ -0,0 +1,29 @@ +{ + "name": "sherpa-ncnn", + "version": "2.1.4", + "description": "real-time speech recognition with Next-gen Kaldi", + "main": "index.js", + "dependencies": { + "ffi-napi": "^4.0.3", + "ref-struct-napi": "^1.1.1", + "wav": "^1.0.2" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/k2-fsa/sherpa-ncnn.git" + }, + "keywords": [ + "speech-to-text;", + "ASR" + ], + "author": "The Next-gen Kaldi team", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/k2-fsa/sherpa-ncnn/issues" + }, + "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme" +} diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh new file mode 100755 index 00000000..d9c0d0ac --- /dev/null +++ b/scripts/nodejs/run.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +set -ex + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +SHERPA_NCNN_DIR=$(realpath $SCRIPT_DIR/../..) +echo "SCRIPT_DIR: $SCRIPT_DIR" +echo "SHERPA_NCNN_DIR: $SHERPA_NCNN_DIR" + +SHERPA_NCNN_VERSION=$(grep "SHERPA_NCNN_VERSION" $SHERPA_NCNN_DIR/CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + +echo "SHERPA_NCNN_VERSION $SHERPA_NCNN_VERSION" + +function windows_x64() { + echo "Process Windows (x64)" + mkdir -p lib/windows-x64 + dst=$(realpath lib/windows-x64) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win_amd64.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win_amd64.whl + cp -v sherpa_ncnn/lib/sherpa-ncnn-c-api.dll $dst/ + cp -v sherpa_ncnn/*.dll $dst + cd .. + rm -rf t +} + +function windows_x86() { + echo "Process Windows (x86)" + mkdir -p lib/windows-x86 + dst=$(realpath lib/windows-x86) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win32.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win32.whl + cp -v sherpa_ncnn/lib/sherpa-ncnn-c-api.dll $dst/ + cp -v sherpa_ncnn/*.dll $dst + cd .. + rm -rf t +} + +windows_x64 +ls -lh lib/windows_x64 + +windows_x86 +ls -lh lib/windows_x86 From 908ecc4db17d339cbd197cb5a297f96ab072adad Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 21:15:32 +0800 Subject: [PATCH 02/17] small fixes --- scripts/nodejs/run.sh | 58 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh index d9c0d0ac..57f02961 100755 --- a/scripts/nodejs/run.sh +++ b/scripts/nodejs/run.sh @@ -19,7 +19,7 @@ function windows_x64() { wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win_amd64.whl unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win_amd64.whl cp -v sherpa_ncnn/lib/sherpa-ncnn-c-api.dll $dst/ - cp -v sherpa_ncnn/*.dll $dst + cp -v ./*.dll $dst cd .. rm -rf t } @@ -33,13 +33,63 @@ function windows_x86() { wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win32.whl unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-win32.whl cp -v sherpa_ncnn/lib/sherpa-ncnn-c-api.dll $dst/ - cp -v sherpa_ncnn/*.dll $dst + cp -v ./*.dll $dst + cd .. + rm -rf t +} + +function linux_x64() { + echo "Process Linux (x64)" + mkdir -p lib/linux-x64 + dst=$(realpath lib/linux-x64) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + cp -v sherpa_ncnn.libs/* $dst/ + cp -v sherpa_ncnn/lib/*.so $dst/ + cd .. + rm -rf t +} + +function linux_x86() { + echo "Process Linux (x86)" + mkdir -p lib/linux-x86 + dst=$(realpath lib/linux-x86) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl + cp -v sherpa_ncnn.libs/* $dst/ + cp -v sherpa_ncnn/lib/*.so $dst/ + cd .. + rm -rf t +} + +function osx_universal2() { + echo "Process osx-universal2" + mkdir -p lib/osx-universal2 + dst=$(realpath lib/osx-universal2) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_universal2.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_universal2.whl + cp -v sherpa_ncnn/lib/*.dylib $dst/ cd .. rm -rf t } windows_x64 -ls -lh lib/windows_x64 +ls -lh lib/windows-x64 windows_x86 -ls -lh lib/windows_x86 +ls -lh lib/windows-x86 + +linux_x64 +ls -lh lib/linux-x64 + +linux_x86 +ls -lh lib/linux-x86 + +osx_universal2 +ls -lh lib/osx-universal2 From 2d781f9f4eec76c76da49909db8a489bc137ff7d Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 21:52:27 +0800 Subject: [PATCH 03/17] small fixes --- .github/workflows/nodejs.yaml | 18 ++++++++++++------ scripts/nodejs/index.js | 32 +++++++++++++++++++++++++++++--- scripts/nodejs/package.json | 12 ++++++------ scripts/nodejs/package.json.in | 29 +++++++++++++++++++++++++++++ scripts/nodejs/run.sh | 4 ++++ 5 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 scripts/nodejs/package.json.in diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 8d763023..f109a067 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -52,12 +52,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 13 - - - name: Build nodejs package - shell: bash - run: | - cd scripts/nodejs - ./run.sh + registry-url: 'https://registry.npmjs.org' - name: Display node version shell: bash @@ -70,6 +65,17 @@ jobs: npm install npm@6.14.4 npm --version + - name: Build nodejs package + if: matrix.os == 'ubuntu-latest' + shell: bash + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + cd scripts/nodejs + ./run.sh + npm ci + npm publish --provenance --access public + - name: Install npm packages shell: bash run: | diff --git a/scripts/nodejs/index.js b/scripts/nodejs/index.js index f33bd676..76b9ed9c 100644 --- a/scripts/nodejs/index.js +++ b/scripts/nodejs/index.js @@ -76,11 +76,37 @@ const RecognizerConfigPtr = ref.refType(SherpaNcnnRecognizerConfig) let soname; if (os.platform() == 'win32') { - soname = path.join(__dirname, 'install', 'lib', 'sherpa-ncnn-c-api.dll'); + // see https://nodejs.org/api/process.html#processarch + if (process.arch == 'x64') { + let currentPath = process.env.Path; + let dllDirectory = path.resolve(path.join(__dirname, 'lib', 'win-x64')); + process.env.Path = currentPath + path.delimiter + dllDirectory; + + soname = path.join(__dirname, 'lib', 'win-x64', 'sherpa-ncnn-c-api.dll') + } else if (process.arch == 'ia32') { + let currentPath = process.env.Path; + let dllDirectory = path.resolve(path.join(__dirname, 'lib', 'win-x86')); + process.env.Path = currentPath + path.delimiter + dllDirectory; + + soname = path.join(__dirname, 'lib', 'win-x86', 'sherpa-ncnn-c-api.dll') + } else { + throw new Error( + `Support only Windows x86 and x64 for now. Given ${process.arch}`); + } } else if (os.platform() == 'darwin') { - soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.dylib'); + soname = path.join( + __dirname, 'lib', 'osx-universal2', 'libsherpa-ncnn-c-api.dylib'); } else if (os.platform() == 'linux') { - soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.so'); + if (process.arch == 'x64') { + soname = + path.join(__dirname, 'lib', 'linux-x64', 'libsherpa-ncnn-c-api.so'); + } else if (process.arch == 'ia32') { + soname = + path.join(__dirname, 'lib', 'linux-x86', 'libsherpa-ncnn-c-api.so'); + } else { + throw new Error( + `Support only Linux x86 and x64 for now. Given ${process.arch}`); + } } else { throw new Error(`Unsupported platform ${os.platform()}`); } diff --git a/scripts/nodejs/package.json b/scripts/nodejs/package.json index 7583d6b6..38a4cc36 100644 --- a/scripts/nodejs/package.json +++ b/scripts/nodejs/package.json @@ -1,7 +1,7 @@ { "name": "sherpa-ncnn", "version": "2.1.4", - "description": "real-time speech recognition with Next-gen Kaldi", + "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", "dependencies": { "ffi-napi": "^4.0.3", @@ -12,13 +12,13 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/k2-fsa/sherpa-ncnn.git" - }, + "repository": "k2-fsa/sherpa-ncnn", "keywords": [ "speech-to-text;", - "ASR" + "ASR", + "speech", + "speech recognition", + "voice" ], "author": "The Next-gen Kaldi team", "license": "Apache-2.0", diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in new file mode 100644 index 00000000..38a4cc36 --- /dev/null +++ b/scripts/nodejs/package.json.in @@ -0,0 +1,29 @@ +{ + "name": "sherpa-ncnn", + "version": "2.1.4", + "description": "Real-time speech recognition with Next-gen Kaldi", + "main": "index.js", + "dependencies": { + "ffi-napi": "^4.0.3", + "ref-struct-napi": "^1.1.1", + "wav": "^1.0.2" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": "k2-fsa/sherpa-ncnn", + "keywords": [ + "speech-to-text;", + "ASR", + "speech", + "speech recognition", + "voice" + ], + "author": "The Next-gen Kaldi team", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/k2-fsa/sherpa-ncnn/issues" + }, + "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme" +} diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh index 57f02961..f7bedf0f 100755 --- a/scripts/nodejs/run.sh +++ b/scripts/nodejs/run.sh @@ -9,6 +9,10 @@ echo "SHERPA_NCNN_DIR: $SHERPA_NCNN_DIR" SHERPA_NCNN_VERSION=$(grep "SHERPA_NCNN_VERSION" $SHERPA_NCNN_DIR/CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) echo "SHERPA_NCNN_VERSION $SHERPA_NCNN_VERSION" +sed -i.bak s/SHERPA_NCNN_VERSION/$SHERPA_NCNN_VERSION/g ./package.json.in +cp package.json.in package.json +rm package.json.in + function windows_x64() { echo "Process Windows (x64)" From b9c82682111f7fe4d6b80c2b366b835033c1feef Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:02:41 +0800 Subject: [PATCH 04/17] small fixes --- scripts/nodejs/package-lock.json | 3246 ++++++++++++++++++++++++++++++ scripts/nodejs/package.json | 29 +- scripts/nodejs/package.json.in | 25 +- 3 files changed, 3274 insertions(+), 26 deletions(-) create mode 100644 scripts/nodejs/package-lock.json diff --git a/scripts/nodejs/package-lock.json b/scripts/nodejs/package-lock.json new file mode 100644 index 00000000..9bb0a4ce --- /dev/null +++ b/scripts/nodejs/package-lock.json @@ -0,0 +1,3246 @@ +{ + "name": "sherpa-ncnn", + "version": "2.4.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ffi-napi": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ffi-napi/-/ffi-napi-4.0.3.tgz", + "integrity": "sha512-PMdLCIvDY9mS32RxZ0XGb95sonPRal8aqRhLbeEtWKZTe2A87qRFG9HjOhvG8EX2UmQw5XNRMIOT+1MYlWmdeg==", + "requires": { + "debug": "^4.1.1", + "get-uv-event-loop-napi-h": "^1.0.5", + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.1", + "ref-napi": "^2.0.1 || ^3.0.2", + "ref-struct-di": "^1.1.0" + } + }, + "get-symbol-from-current-process-h": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz", + "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==" + }, + "get-uv-event-loop-napi-h": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz", + "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==", + "requires": { + "get-symbol-from-current-process-h": "^1.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + }, + "node-gyp-build": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.0.tgz", + "integrity": "sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==" + }, + "npm": { + "version": "6.14.4", + "resolved": "https://registry.npmjs.org/npm/-/npm-6.14.4.tgz", + "integrity": "sha512-B8UDDbWvdkW6RgXFn8/h2cHJP/u/FPa4HWeGzW23aNEBARN3QPrRaHqPIZW2NSN3fW649gtgUDNZpaRs0zTMPw==", + "requires": { + "JSONStream": "^1.3.5", + "abbrev": "~1.1.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "aproba": "^2.0.0", + "archy": "~1.0.0", + "bin-links": "^1.1.7", + "bluebird": "^3.5.5", + "byte-size": "^5.0.1", + "cacache": "^12.0.3", + "call-limit": "^1.1.1", + "chownr": "^1.1.4", + "ci-info": "^2.0.0", + "cli-columns": "^3.1.2", + "cli-table3": "^0.5.1", + "cmd-shim": "^3.0.3", + "columnify": "~1.5.4", + "config-chain": "^1.1.12", + "debuglog": "*", + "detect-indent": "~5.0.0", + "detect-newline": "^2.1.0", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "figgy-pudding": "^3.5.1", + "find-npm-prefix": "^1.0.2", + "fs-vacuum": "~1.2.10", + "fs-write-stream-atomic": "~1.0.10", + "gentle-fs": "^2.3.0", + "glob": "^7.1.6", + "graceful-fs": "^4.2.3", + "has-unicode": "~2.0.1", + "hosted-git-info": "^2.8.8", + "iferr": "^1.0.2", + "imurmurhash": "*", + "infer-owner": "^1.0.4", + "inflight": "~1.0.6", + "inherits": "^2.0.4", + "ini": "^1.3.5", + "init-package-json": "^1.10.3", + "is-cidr": "^3.0.0", + "json-parse-better-errors": "^1.0.2", + "lazy-property": "~1.0.0", + "libcipm": "^4.0.7", + "libnpm": "^3.0.1", + "libnpmaccess": "^3.0.2", + "libnpmhook": "^5.0.3", + "libnpmorg": "^1.0.1", + "libnpmsearch": "^2.0.2", + "libnpmteam": "^1.0.2", + "libnpx": "^10.2.2", + "lock-verify": "^2.1.0", + "lockfile": "^1.0.4", + "lodash._baseindexof": "*", + "lodash._baseuniq": "~4.6.0", + "lodash._bindcallback": "*", + "lodash._cacheindexof": "*", + "lodash._createcache": "*", + "lodash._getnative": "*", + "lodash.clonedeep": "~4.5.0", + "lodash.restparam": "*", + "lodash.union": "~4.6.0", + "lodash.uniq": "~4.5.0", + "lodash.without": "~4.4.0", + "lru-cache": "^5.1.1", + "meant": "~1.0.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.4", + "move-concurrently": "^1.0.1", + "node-gyp": "^5.1.0", + "nopt": "~4.0.1", + "normalize-package-data": "^2.5.0", + "npm-audit-report": "^1.3.2", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "^3.0.2", + "npm-lifecycle": "^3.1.4", + "npm-package-arg": "^6.1.1", + "npm-packlist": "^1.4.8", + "npm-pick-manifest": "^3.0.2", + "npm-profile": "^4.0.4", + "npm-registry-fetch": "^4.0.3", + "npm-user-validate": "~1.0.0", + "npmlog": "~4.1.2", + "once": "~1.4.0", + "opener": "^1.5.1", + "osenv": "^0.1.5", + "pacote": "^9.5.12", + "path-is-inside": "~1.0.2", + "promise-inflight": "~1.0.1", + "qrcode-terminal": "^0.12.0", + "query-string": "^6.8.2", + "qw": "~1.0.1", + "read": "~1.0.7", + "read-cmd-shim": "^1.0.5", + "read-installed": "~4.0.3", + "read-package-json": "^2.1.1", + "read-package-tree": "^5.3.1", + "readable-stream": "^3.6.0", + "readdir-scoped-modules": "^1.1.0", + "request": "^2.88.0", + "retry": "^0.12.0", + "rimraf": "^2.7.1", + "safe-buffer": "^5.1.2", + "semver": "^5.7.1", + "sha": "^3.0.0", + "slide": "~1.1.6", + "sorted-object": "~2.0.1", + "sorted-union-stream": "~2.1.3", + "ssri": "^6.0.1", + "stringify-package": "^1.0.1", + "tar": "^4.4.13", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "unique-filename": "^1.1.1", + "unpipe": "~1.0.0", + "update-notifier": "^2.5.0", + "uuid": "^3.3.3", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "~3.0.0", + "which": "^1.3.1", + "worker-farm": "^1.7.0", + "write-file-atomic": "^2.4.3" + }, + "dependencies": { + "JSONStream": { + "version": "1.3.5", + "bundled": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "agent-base": { + "version": "4.3.0", + "bundled": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "agentkeepalive": { + "version": "3.5.2", + "bundled": true, + "requires": { + "humanize-ms": "^1.2.1" + } + }, + "ajv": { + "version": "5.5.2", + "bundled": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-align": { + "version": "2.0.0", + "bundled": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true + }, + "aproba": { + "version": "2.0.0", + "bundled": true + }, + "archy": { + "version": "1.0.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "asap": { + "version": "2.0.6", + "bundled": true + }, + "asn1": { + "version": "0.2.4", + "bundled": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "aws-sign2": { + "version": "0.7.0", + "bundled": true + }, + "aws4": { + "version": "1.8.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bin-links": { + "version": "1.1.7", + "bundled": true, + "requires": { + "bluebird": "^3.5.3", + "cmd-shim": "^3.0.0", + "gentle-fs": "^2.3.0", + "graceful-fs": "^4.1.15", + "npm-normalize-package-bin": "^1.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "bluebird": { + "version": "3.5.5", + "bundled": true + }, + "boxen": { + "version": "1.3.0", + "bundled": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.0.0", + "bundled": true + }, + "builtins": { + "version": "1.0.3", + "bundled": true + }, + "byline": { + "version": "5.0.0", + "bundled": true + }, + "byte-size": { + "version": "5.0.1", + "bundled": true + }, + "cacache": { + "version": "12.0.3", + "bundled": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "call-limit": { + "version": "1.1.1", + "bundled": true + }, + "camelcase": { + "version": "4.1.0", + "bundled": true + }, + "capture-stack-trace": { + "version": "1.0.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "chalk": { + "version": "2.4.1", + "bundled": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chownr": { + "version": "1.1.4", + "bundled": true + }, + "ci-info": { + "version": "2.0.0", + "bundled": true + }, + "cidr-regex": { + "version": "2.0.10", + "bundled": true, + "requires": { + "ip-regex": "^2.1.0" + } + }, + "cli-boxes": { + "version": "1.0.0", + "bundled": true + }, + "cli-columns": { + "version": "3.1.2", + "bundled": true, + "requires": { + "string-width": "^2.0.0", + "strip-ansi": "^3.0.1" + } + }, + "cli-table3": { + "version": "0.5.1", + "bundled": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + } + }, + "cliui": { + "version": "4.1.0", + "bundled": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "bundled": true + }, + "cmd-shim": { + "version": "3.0.3", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "co": { + "version": "4.6.0", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "color-convert": { + "version": "1.9.1", + "bundled": true, + "requires": { + "color-name": "^1.1.1" + } + }, + "color-name": { + "version": "1.1.3", + "bundled": true + }, + "colors": { + "version": "1.3.3", + "bundled": true, + "optional": true + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.6", + "bundled": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "concat-stream": { + "version": "1.6.2", + "bundled": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "config-chain": { + "version": "1.1.12", + "bundled": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "configstore": { + "version": "3.1.2", + "bundled": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "copy-concurrently": { + "version": "1.0.5", + "bundled": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "iferr": { + "version": "0.1.5", + "bundled": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "create-error-class": { + "version": "3.0.2", + "bundled": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "bundled": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "yallist": { + "version": "2.1.2", + "bundled": true + } + } + }, + "crypto-random-string": { + "version": "1.0.0", + "bundled": true + }, + "cyclist": { + "version": "0.2.2", + "bundled": true + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true + }, + "decamelize": { + "version": "1.2.0", + "bundled": true + }, + "decode-uri-component": { + "version": "0.2.0", + "bundled": true + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true + }, + "defaults": { + "version": "1.0.3", + "bundled": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "bundled": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-indent": { + "version": "5.0.0", + "bundled": true + }, + "detect-newline": { + "version": "2.1.0", + "bundled": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "dot-prop": { + "version": "4.2.0", + "bundled": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "dotenv": { + "version": "5.0.1", + "bundled": true + }, + "duplexer3": { + "version": "0.1.4", + "bundled": true + }, + "duplexify": { + "version": "3.6.0", + "bundled": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editor": { + "version": "1.0.0", + "bundled": true + }, + "encoding": { + "version": "0.1.12", + "bundled": true, + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "requires": { + "once": "^1.4.0" + } + }, + "env-paths": { + "version": "2.2.0", + "bundled": true + }, + "err-code": { + "version": "1.1.2", + "bundled": true + }, + "errno": { + "version": "0.1.7", + "bundled": true, + "requires": { + "prr": "~1.0.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "bundled": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "bundled": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "bundled": true + }, + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "bundled": true + } + } + }, + "extend": { + "version": "3.0.2", + "bundled": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true + }, + "figgy-pudding": { + "version": "3.5.1", + "bundled": true + }, + "find-npm-prefix": { + "version": "1.0.2", + "bundled": true + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.3.2", + "bundled": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "requires": { + "minipass": "^2.6.0" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, + "fs-vacuum": { + "version": "1.2.10", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.5.2" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "bundled": true + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "function-bind": { + "version": "1.1.1", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "genfun": { + "version": "5.0.0", + "bundled": true + }, + "gentle-fs": { + "version": "2.3.0", + "bundled": true, + "requires": { + "aproba": "^1.1.2", + "chownr": "^1.1.2", + "cmd-shim": "^3.0.3", + "fs-vacuum": "^1.2.10", + "graceful-fs": "^4.1.11", + "iferr": "^0.1.5", + "infer-owner": "^1.0.4", + "mkdirp": "^0.5.1", + "path-is-inside": "^1.0.2", + "read-cmd-shim": "^1.0.1", + "slide": "^1.1.6" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "iferr": { + "version": "0.1.5", + "bundled": true + } + } + }, + "get-caller-file": { + "version": "1.0.3", + "bundled": true + }, + "get-stream": { + "version": "4.1.0", + "bundled": true, + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-dirs": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ini": "^1.3.4" + } + }, + "got": { + "version": "6.7.1", + "bundled": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "bundled": true + } + } + }, + "graceful-fs": { + "version": "4.2.3", + "bundled": true + }, + "har-schema": { + "version": "2.0.0", + "bundled": true + }, + "har-validator": { + "version": "5.1.0", + "bundled": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "bundled": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "bundled": true + }, + "has-symbols": { + "version": "1.0.0", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hosted-git-info": { + "version": "2.8.8", + "bundled": true + }, + "http-cache-semantics": { + "version": "3.8.1", + "bundled": true + }, + "http-proxy-agent": { + "version": "2.1.0", + "bundled": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + } + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "bundled": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + } + }, + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "iferr": { + "version": "1.0.2", + "bundled": true + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "import-lazy": { + "version": "2.1.0", + "bundled": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "infer-owner": { + "version": "1.0.4", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "init-package-json": { + "version": "1.10.3", + "bundled": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "bundled": true + }, + "ip": { + "version": "1.1.5", + "bundled": true + }, + "ip-regex": { + "version": "2.1.0", + "bundled": true + }, + "is-callable": { + "version": "1.1.4", + "bundled": true + }, + "is-ci": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ci-info": "^1.5.0" + }, + "dependencies": { + "ci-info": { + "version": "1.6.0", + "bundled": true + } + } + }, + "is-cidr": { + "version": "3.0.0", + "bundled": true, + "requires": { + "cidr-regex": "^2.0.10" + } + }, + "is-date-object": { + "version": "1.0.1", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "bundled": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-npm": { + "version": "1.0.0", + "bundled": true + }, + "is-obj": { + "version": "1.0.1", + "bundled": true + }, + "is-path-inside": { + "version": "1.0.1", + "bundled": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-redirect": { + "version": "1.0.0", + "bundled": true + }, + "is-regex": { + "version": "1.0.4", + "bundled": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "bundled": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true + }, + "is-symbol": { + "version": "1.0.2", + "bundled": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "bundled": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "jsonparse": { + "version": "1.3.1", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "latest-version": { + "version": "3.1.0", + "bundled": true, + "requires": { + "package-json": "^4.0.0" + } + }, + "lazy-property": { + "version": "1.0.0", + "bundled": true + }, + "lcid": { + "version": "2.0.0", + "bundled": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "libcipm": { + "version": "4.0.7", + "bundled": true, + "requires": { + "bin-links": "^1.1.2", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.5.1", + "find-npm-prefix": "^1.0.2", + "graceful-fs": "^4.1.11", + "ini": "^1.3.5", + "lock-verify": "^2.0.2", + "mkdirp": "^0.5.1", + "npm-lifecycle": "^3.0.0", + "npm-logical-tree": "^1.2.1", + "npm-package-arg": "^6.1.0", + "pacote": "^9.1.0", + "read-package-json": "^2.0.13", + "rimraf": "^2.6.2", + "worker-farm": "^1.6.0" + } + }, + "libnpm": { + "version": "3.0.1", + "bundled": true, + "requires": { + "bin-links": "^1.1.2", + "bluebird": "^3.5.3", + "find-npm-prefix": "^1.0.2", + "libnpmaccess": "^3.0.2", + "libnpmconfig": "^1.2.1", + "libnpmhook": "^5.0.3", + "libnpmorg": "^1.0.1", + "libnpmpublish": "^1.1.2", + "libnpmsearch": "^2.0.2", + "libnpmteam": "^1.0.2", + "lock-verify": "^2.0.2", + "npm-lifecycle": "^3.0.0", + "npm-logical-tree": "^1.2.1", + "npm-package-arg": "^6.1.0", + "npm-profile": "^4.0.2", + "npm-registry-fetch": "^4.0.0", + "npmlog": "^4.1.2", + "pacote": "^9.5.3", + "read-package-json": "^2.0.13", + "stringify-package": "^1.0.0" + } + }, + "libnpmaccess": { + "version": "3.0.2", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "get-stream": "^4.0.0", + "npm-package-arg": "^6.1.0", + "npm-registry-fetch": "^4.0.0" + } + }, + "libnpmconfig": { + "version": "1.2.1", + "bundled": true, + "requires": { + "figgy-pudding": "^3.5.1", + "find-up": "^3.0.0", + "ini": "^1.3.5" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "bundled": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "bundled": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.0", + "bundled": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "bundled": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "bundled": true + } + } + }, + "libnpmhook": { + "version": "5.0.3", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "figgy-pudding": "^3.4.1", + "get-stream": "^4.0.0", + "npm-registry-fetch": "^4.0.0" + } + }, + "libnpmorg": { + "version": "1.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "figgy-pudding": "^3.4.1", + "get-stream": "^4.0.0", + "npm-registry-fetch": "^4.0.0" + } + }, + "libnpmpublish": { + "version": "1.1.2", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "lodash.clonedeep": "^4.5.0", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^6.1.0", + "npm-registry-fetch": "^4.0.0", + "semver": "^5.5.1", + "ssri": "^6.0.1" + } + }, + "libnpmsearch": { + "version": "2.0.2", + "bundled": true, + "requires": { + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "npm-registry-fetch": "^4.0.0" + } + }, + "libnpmteam": { + "version": "1.0.2", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "figgy-pudding": "^3.4.1", + "get-stream": "^4.0.0", + "npm-registry-fetch": "^4.0.0" + } + }, + "libnpx": { + "version": "10.2.2", + "bundled": true, + "requires": { + "dotenv": "^5.0.1", + "npm-package-arg": "^6.0.0", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.0", + "update-notifier": "^2.3.0", + "which": "^1.3.0", + "y18n": "^4.0.0", + "yargs": "^11.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lock-verify": { + "version": "2.1.0", + "bundled": true, + "requires": { + "npm-package-arg": "^6.1.0", + "semver": "^5.4.1" + } + }, + "lockfile": { + "version": "1.0.4", + "bundled": true, + "requires": { + "signal-exit": "^3.0.2" + } + }, + "lodash._baseindexof": { + "version": "3.1.0", + "bundled": true + }, + "lodash._baseuniq": { + "version": "4.6.0", + "bundled": true, + "requires": { + "lodash._createset": "~4.0.0", + "lodash._root": "~3.0.0" + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "bundled": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "bundled": true + }, + "lodash._createcache": { + "version": "3.1.2", + "bundled": true, + "requires": { + "lodash._getnative": "^3.0.0" + } + }, + "lodash._createset": { + "version": "4.0.3", + "bundled": true + }, + "lodash._getnative": { + "version": "3.9.1", + "bundled": true + }, + "lodash._root": { + "version": "3.0.1", + "bundled": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "bundled": true + }, + "lodash.restparam": { + "version": "3.6.1", + "bundled": true + }, + "lodash.union": { + "version": "4.6.0", + "bundled": true + }, + "lodash.uniq": { + "version": "4.5.0", + "bundled": true + }, + "lodash.without": { + "version": "4.4.0", + "bundled": true + }, + "lowercase-keys": { + "version": "1.0.1", + "bundled": true + }, + "lru-cache": { + "version": "5.1.1", + "bundled": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "1.3.0", + "bundled": true, + "requires": { + "pify": "^3.0.0" + } + }, + "make-fetch-happen": { + "version": "5.0.2", + "bundled": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^12.0.0", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^4.0.0", + "ssri": "^6.0.0" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "bundled": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "meant": { + "version": "1.0.1", + "bundled": true + }, + "mem": { + "version": "4.3.0", + "bundled": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "bundled": true + } + } + }, + "mime-db": { + "version": "1.35.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.19", + "bundled": true, + "requires": { + "mime-db": "~1.35.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "requires": { + "minipass": "^2.9.0" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, + "mississippi": { + "version": "3.0.0", + "bundled": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mkdirp": { + "version": "0.5.4", + "bundled": true, + "requires": { + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "bundled": true + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "bundled": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + } + } + }, + "ms": { + "version": "2.1.1", + "bundled": true + }, + "mute-stream": { + "version": "0.0.7", + "bundled": true + }, + "nice-try": { + "version": "1.0.5", + "bundled": true + }, + "node-fetch-npm": { + "version": "2.0.2", + "bundled": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node-gyp": { + "version": "5.1.0", + "bundled": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.1.2", + "request": "^2.88.0", + "rimraf": "^2.6.3", + "semver": "^5.7.1", + "tar": "^4.4.12", + "which": "^1.3.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "bundled": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.10.0", + "bundled": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "npm-audit-report": { + "version": "1.3.2", + "bundled": true, + "requires": { + "cli-table3": "^0.5.0", + "console-control-strings": "^1.1.0" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true + }, + "npm-install-checks": { + "version": "3.0.2", + "bundled": true, + "requires": { + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, + "npm-lifecycle": { + "version": "3.1.4", + "bundled": true, + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.15", + "node-gyp": "^5.0.2", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.1" + } + }, + "npm-logical-tree": { + "version": "1.2.1", + "bundled": true + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true + }, + "npm-package-arg": { + "version": "6.1.1", + "bundled": true, + "requires": { + "hosted-git-info": "^2.7.1", + "osenv": "^0.1.5", + "semver": "^5.6.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-packlist": { + "version": "1.4.8", + "bundled": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "3.0.2", + "bundled": true, + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + } + }, + "npm-profile": { + "version": "4.0.4", + "bundled": true, + "requires": { + "aproba": "^1.1.2 || 2", + "figgy-pudding": "^3.4.1", + "npm-registry-fetch": "^4.0.0" + } + }, + "npm-registry-fetch": { + "version": "4.0.3", + "bundled": true, + "requires": { + "JSONStream": "^1.3.4", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.4.1", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "npm-package-arg": "^6.1.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "bundled": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.0", + "bundled": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.9.0", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "object-keys": { + "version": "1.0.12", + "bundled": true + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "bundled": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.5.1", + "bundled": true + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-locale": { + "version": "3.1.0", + "bundled": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "bundled": 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" + } + }, + "execa": { + "version": "1.0.0", + "bundled": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "bundled": true + }, + "p-finally": { + "version": "1.0.0", + "bundled": true + }, + "p-is-promise": { + "version": "2.1.0", + "bundled": true + }, + "p-limit": { + "version": "1.2.0", + "bundled": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "bundled": true + }, + "package-json": { + "version": "4.0.1", + "bundled": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "pacote": { + "version": "9.5.12", + "bundled": true, + "requires": { + "bluebird": "^3.5.3", + "cacache": "^12.0.2", + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.1.0", + "glob": "^7.1.3", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "minimatch": "^3.0.4", + "minipass": "^2.3.5", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "normalize-package-data": "^2.4.0", + "npm-normalize-package-bin": "^1.0.0", + "npm-package-arg": "^6.1.0", + "npm-packlist": "^1.1.12", + "npm-pick-manifest": "^3.0.0", + "npm-registry-fetch": "^4.0.0", + "osenv": "^0.1.5", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^5.0.1", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.2", + "semver": "^5.6.0", + "ssri": "^6.0.1", + "tar": "^4.4.10", + "unique-filename": "^1.1.1", + "which": "^1.3.1" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "path-is-inside": { + "version": "1.0.2", + "bundled": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true + }, + "path-parse": { + "version": "1.0.6", + "bundled": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true + }, + "pify": { + "version": "3.0.0", + "bundled": true + }, + "prepend-http": { + "version": "1.0.4", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "retry": { + "version": "0.10.1", + "bundled": true + } + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "requires": { + "read": "1" + } + }, + "proto-list": { + "version": "1.2.4", + "bundled": true + }, + "protoduck": { + "version": "5.0.1", + "bundled": true, + "requires": { + "genfun": "^5.0.0" + } + }, + "prr": { + "version": "1.0.1", + "bundled": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true + }, + "psl": { + "version": "1.1.29", + "bundled": true + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "bundled": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "1.4.1", + "bundled": true + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true + }, + "qs": { + "version": "6.5.2", + "bundled": true + }, + "query-string": { + "version": "6.8.2", + "bundled": true, + "requires": { + "decode-uri-component": "^0.2.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, + "qw": { + "version": "1.0.1", + "bundled": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "bundled": true + } + } + }, + "read": { + "version": "1.0.7", + "bundled": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "1.0.5", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + } + }, + "read-package-json": { + "version": "2.1.1", + "bundled": true, + "requires": { + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "read-package-tree": { + "version": "5.3.1", + "bundled": true, + "requires": { + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdir-scoped-modules": { + "version": "1.1.0", + "bundled": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "registry-auth-token": { + "version": "3.4.0", + "bundled": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "bundled": true, + "requires": { + "rc": "^1.0.1" + } + }, + "request": { + "version": "2.88.0", + "bundled": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true + }, + "retry": { + "version": "0.12.0", + "bundled": true + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-queue": { + "version": "1.0.3", + "bundled": true, + "requires": { + "aproba": "^1.1.1" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, + "semver": { + "version": "5.7.1", + "bundled": true + }, + "semver-diff": { + "version": "2.1.0", + "bundled": true, + "requires": { + "semver": "^5.0.3" + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "sha": { + "version": "3.0.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "slide": { + "version": "1.1.6", + "bundled": true + }, + "smart-buffer": { + "version": "4.1.0", + "bundled": true + }, + "socks": { + "version": "2.3.3", + "bundled": true, + "requires": { + "ip": "1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "4.0.2", + "bundled": true, + "requires": { + "agent-base": "~4.2.1", + "socks": "~2.3.2" + }, + "dependencies": { + "agent-base": { + "version": "4.2.1", + "bundled": true, + "requires": { + "es6-promisify": "^5.0.0" + } + } + } + }, + "sorted-object": { + "version": "2.0.1", + "bundled": true + }, + "sorted-union-stream": { + "version": "2.1.3", + "bundled": true, + "requires": { + "from2": "^1.3.0", + "stream-iterate": "^1.1.0" + }, + "dependencies": { + "from2": { + "version": "1.3.0", + "bundled": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.10" + } + }, + "isarray": { + "version": "0.0.1", + "bundled": true + }, + "readable-stream": { + "version": "1.1.14", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true + } + } + }, + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "bundled": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "bundled": true + }, + "split-on-first": { + "version": "1.1.0", + "bundled": true + }, + "sshpk": { + "version": "1.14.2", + "bundled": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "6.0.1", + "bundled": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "stream-each": { + "version": "1.2.2", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-iterate": { + "version": "1.2.0", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "bundled": true + }, + "strict-uri-encode": { + "version": "2.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.3.0", + "bundled": true, + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "bundled": true + } + } + }, + "stringify-package": { + "version": "1.0.1", + "bundled": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "supports-color": { + "version": "5.4.0", + "bundled": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, + "term-size": { + "version": "1.2.0", + "bundled": true, + "requires": { + "execa": "^0.7.0" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true + }, + "through": { + "version": "2.3.8", + "bundled": true + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "timed-out": { + "version": "4.0.1", + "bundled": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true + }, + "tough-cookie": { + "version": "2.4.3", + "bundled": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "typedarray": { + "version": "0.0.6", + "bundled": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true + }, + "umask": { + "version": "1.1.0", + "bundled": true + }, + "unique-filename": { + "version": "1.1.1", + "bundled": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unique-string": { + "version": "1.0.0", + "bundled": true, + "requires": { + "crypto-random-string": "^1.0.0" + } + }, + "unpipe": { + "version": "1.0.0", + "bundled": true + }, + "unzip-response": { + "version": "2.0.1", + "bundled": true + }, + "update-notifier": { + "version": "2.5.0", + "bundled": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "bundled": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "util-extend": { + "version": "1.0.3", + "bundled": true + }, + "util-promisify": { + "version": "2.1.0", + "bundled": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "uuid": { + "version": "3.3.3", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "1.3.1", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "requires": { + "string-width": "^1.0.2" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "widest-line": { + "version": "2.0.1", + "bundled": true, + "requires": { + "string-width": "^2.1.1" + } + }, + "worker-farm": { + "version": "1.7.0", + "bundled": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "2.4.3", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "bundled": true + }, + "xtend": { + "version": "4.0.1", + "bundled": true + }, + "y18n": { + "version": "4.0.0", + "bundled": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true + }, + "yargs": { + "version": "11.1.1", + "bundled": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "y18n": { + "version": "3.2.1", + "bundled": true + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "ref-napi": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ref-napi/-/ref-napi-3.0.3.tgz", + "integrity": "sha512-LiMq/XDGcgodTYOMppikEtJelWsKQERbLQsYm0IOOnzhwE9xYZC7x8txNnFC9wJNOkPferQI4vD4ZkC0mDyrOA==", + "requires": { + "debug": "^4.1.1", + "get-symbol-from-current-process-h": "^1.0.2", + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.1" + } + }, + "ref-struct-di": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ref-struct-di/-/ref-struct-di-1.1.1.tgz", + "integrity": "sha512-2Xyn/0Qgz89VT+++WP0sTosdm9oeowLP23wRJYhG4BFdMUrLj3jhwHZNEytYNYgtPKLNTP3KJX4HEgBvM1/Y2g==", + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "ref-struct-napi": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ref-struct-napi/-/ref-struct-napi-1.1.1.tgz", + "integrity": "sha512-YgS5/d7+kT5zgtySYI5ieH0hREdv+DabgDvoczxsui0f9VLm0rrDcWEj4DHKehsH+tJnVMsLwuyctWgvdEcVRw==", + "requires": { + "debug": "2", + "ref-napi": "^1.4.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "ref-napi": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ref-napi/-/ref-napi-1.5.2.tgz", + "integrity": "sha512-hwyNmWpUkt1bDWDW4aiwCoC+SJfJO69UIdjqssNqdaS0sYJpgqzosGg/rLtk69UoQ8drZdI9yyQefM7eEMM3Gw==", + "requires": { + "debug": "^3.1.0", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + } + } + } + } +} diff --git a/scripts/nodejs/package.json b/scripts/nodejs/package.json index 38a4cc36..088a303b 100644 --- a/scripts/nodejs/package.json +++ b/scripts/nodejs/package.json @@ -1,29 +1,28 @@ { "name": "sherpa-ncnn", - "version": "2.1.4", + "version": "2.4.1", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", - "dependencies": { - "ffi-napi": "^4.0.3", - "ref-struct-napi": "^1.1.1", - "wav": "^1.0.2" - }, - "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "repository": "k2-fsa/sherpa-ncnn", + "repository": { + "type": "git", + "url": "git+https://github.com/k2-fsa/sherpa-ncnn.git" + }, "keywords": [ - "speech-to-text;", - "ASR", - "speech", - "speech recognition", - "voice" + "asr" ], - "author": "The Next-gen Kaldi team", + "author": "The next-gen Kaldi team", "license": "Apache-2.0", "bugs": { "url": "https://github.com/k2-fsa/sherpa-ncnn/issues" }, - "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme" + "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme", + "dependencies": { + "ffi-napi": "^4.0.3", + "npm": "^6.14.4", + "ref-napi": "^3.0.3", + "ref-struct-napi": "^1.1.1" + } } diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in index 38a4cc36..1c3d438a 100644 --- a/scripts/nodejs/package.json.in +++ b/scripts/nodejs/package.json.in @@ -1,29 +1,32 @@ { "name": "sherpa-ncnn", - "version": "2.1.4", + "version": "$SHERPA_NCNN_VERSION", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", - "dependencies": { - "ffi-napi": "^4.0.3", - "ref-struct-napi": "^1.1.1", - "wav": "^1.0.2" - }, - "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "repository": "k2-fsa/sherpa-ncnn", + "repository": { + "type": "git", + "url": "git+https://github.com/k2-fsa/sherpa-ncnn.git" + }, "keywords": [ - "speech-to-text;", + "speech-to-text", "ASR", "speech", "speech recognition", "voice" ], - "author": "The Next-gen Kaldi team", + "author": "The next-gen Kaldi team", "license": "Apache-2.0", "bugs": { "url": "https://github.com/k2-fsa/sherpa-ncnn/issues" }, - "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme" + "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme", + "dependencies": { + "ffi-napi": "^4.0.3", + "npm": "^6.14.4", + "ref-napi": "^3.0.3", + "ref-struct-napi": "^1.1.1" + } } From 56ffe35f1ebaba40cb46f71bac7bbb605b51f204 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:03:36 +0800 Subject: [PATCH 05/17] small fixes --- scripts/nodejs/package.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in index 1c3d438a..d1e85b2e 100644 --- a/scripts/nodejs/package.json.in +++ b/scripts/nodejs/package.json.in @@ -1,6 +1,6 @@ { "name": "sherpa-ncnn", - "version": "$SHERPA_NCNN_VERSION", + "version": "SHERPA_NCNN_VERSION", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", "scripts": { From a8a8d9e8888da26c98c1e61df3f5a7c6803a4de5 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:07:14 +0800 Subject: [PATCH 06/17] small fixes --- scripts/nodejs/README.md | 7 +++++++ scripts/nodejs/run.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 scripts/nodejs/README.md diff --git a/scripts/nodejs/README.md b/scripts/nodejs/README.md new file mode 100644 index 00000000..f2aba0f9 --- /dev/null +++ b/scripts/nodejs/README.md @@ -0,0 +1,7 @@ +# Introduction + +Real-time speech recognition with [Next-gen Kaldi](https://github.com/k2-fsa/) + +Please refer to +https://github.com/k2-fsa/sherpa-ncnn/tree/master/nodejs-examples +for examples. diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh index f7bedf0f..c978b714 100755 --- a/scripts/nodejs/run.sh +++ b/scripts/nodejs/run.sh @@ -12,7 +12,7 @@ echo "SHERPA_NCNN_VERSION $SHERPA_NCNN_VERSION" sed -i.bak s/SHERPA_NCNN_VERSION/$SHERPA_NCNN_VERSION/g ./package.json.in cp package.json.in package.json rm package.json.in - +rm package.json.in.bak function windows_x64() { echo "Process Windows (x64)" From 55afb9746406c93e09ee6e6b5e36f10a59b83260 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:12:30 +0800 Subject: [PATCH 07/17] small fixes --- scripts/nodejs/package.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in index d1e85b2e..41ce10aa 100644 --- a/scripts/nodejs/package.json.in +++ b/scripts/nodejs/package.json.in @@ -1,5 +1,5 @@ { - "name": "sherpa-ncnn", + "name": "sherpa-ncnn2", "version": "SHERPA_NCNN_VERSION", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", From 42079c1774e21b2ab89e1c09be1eb95431c10444 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:20:18 +0800 Subject: [PATCH 08/17] small fixes --- .github/workflows/nodejs.yaml | 20 +--- .github/workflows/npm.yaml | 56 +++++++++++ nodejs-examples/README.md | 13 +++ nodejs-examples/index.js | 181 ---------------------------------- nodejs-examples/package.json | 29 ------ nodejs-examples/run.sh | 34 ------- nodejs-examples/test.js | 2 +- 7 files changed, 72 insertions(+), 263 deletions(-) create mode 100644 .github/workflows/npm.yaml create mode 100644 nodejs-examples/README.md delete mode 100644 nodejs-examples/index.js delete mode 100644 nodejs-examples/package.json delete mode 100755 nodejs-examples/run.sh diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index f109a067..2197f2ee 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -4,7 +4,6 @@ on: push: branches: - master - - nodejs paths: - '.github/workflows/nodejs.yaml' - 'CMakeLists.txt' @@ -65,17 +64,6 @@ jobs: npm install npm@6.14.4 npm --version - - name: Build nodejs package - if: matrix.os == 'ubuntu-latest' - shell: bash - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - cd scripts/nodejs - ./run.sh - npm ci - npm publish --provenance --access public - - name: Install npm packages shell: bash run: | @@ -100,11 +88,7 @@ jobs: - name: Test shell: bash run: | - export CMAKE_CXX_COMPILER_LAUNCHER=ccache - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - cmake --version - cd nodejs-examples ls -lh - - ./run.sh + npm install sherpa-ncnn2 wav + node ./test.js diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml new file mode 100644 index 00000000..a087a45d --- /dev/null +++ b/.github/workflows/npm.yaml @@ -0,0 +1,56 @@ +name: npm + +on: + workflow_dispatch: + +concurrency: + group: npm-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + nodejs: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.8"] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/setup-node@v3 + with: + node-version: 13 + registry-url: 'https://registry.npmjs.org' + + - name: Display node version + shell: bash + run: | + node --version + npm --version + cd nodejs-examples + + npm install npm@6.14.4 -g + npm install npm@6.14.4 + npm --version + + - name: Build nodejs package + shell: bash + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + cd scripts/nodejs + ./run.sh + npm ci + npm publish --provenance --access public diff --git a/nodejs-examples/README.md b/nodejs-examples/README.md new file mode 100644 index 00000000..1882ef9a --- /dev/null +++ b/nodejs-examples/README.md @@ -0,0 +1,13 @@ +# Introduction + +## Usage +``` +GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13 +cd sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13 +git lfs pull --include "*.bin" +ls -lh +cd .. + +npm install sherpa-ncnn wav +node ./test.js +``` diff --git a/nodejs-examples/index.js b/nodejs-examples/index.js deleted file mode 100644 index f33bd676..00000000 --- a/nodejs-examples/index.js +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2023 Xiaomi Corporation (authors: Fangjun Kuang) -// -// Please use -// -// npm install ffi-napi ref-struct-napi -// -// before you use this file -// -// -// Please use node 13. node 16, 18, 20, and 21 are known not working. -// See also -// https://github.com/node-ffi-napi/node-ffi-napi/issues/244 -// and -// https://github.com/node-ffi-napi/node-ffi-napi/issues/97 -'use strict' - -const debug = require('debug')('sherpa-ncnn'); -const os = require('os'); -const path = require('path'); -const ffi = require('ffi-napi'); -const ref = require('ref-napi'); -const fs = require('fs'); - -const StructType = require('ref-struct-napi'); -const cstring = ref.types.CString; -const int32_t = ref.types.int32; -const float = ref.types.float; -const floatPtr = ref.refType(float); - -const RecognizerPtr = ref.refType(ref.types.void); -const StreamPtr = ref.refType(ref.types.void); -const SherpaNcnnModelConfig = StructType({ - 'encoderParam': cstring, - 'encoderBin': cstring, - 'decoderParam': cstring, - 'decoderBin': cstring, - 'joinerParam': cstring, - 'joinerBin': cstring, - 'tokens': cstring, - 'useVulkanCompute': int32_t, - 'numThreads': int32_t, -}); - -const SherpaNcnnDecoderConfig = StructType({ - 'decodingMethod': cstring, - 'numActivePaths': int32_t, -}); - -const SherpaNcnnFeatureExtractorConfig = StructType({ - 'sampleRate': float, - 'featureDim': int32_t, -}); - -const SherpaNcnnRecognizerConfig = StructType({ - 'featConfig': SherpaNcnnFeatureExtractorConfig, - 'modelConfig': SherpaNcnnModelConfig, - 'decoderConfig': SherpaNcnnDecoderConfig, - 'enableEndpoint': int32_t, - 'rule1MinTrailingSilence': float, - 'rule2MinTrailingSilence': float, - 'rule3MinUtteranceLength': float, - 'hotwordsFile': cstring, - 'hotwordsScore': cstring, -}); - -const SherpaNcnnResult = StructType({ - 'text': cstring, - 'tokens': cstring, - 'timestamps': floatPtr, - 'count': int32_t, -}); - - -const ResultPtr = ref.refType(SherpaNcnnResult); -const RecognizerConfigPtr = ref.refType(SherpaNcnnRecognizerConfig) - -let soname; -if (os.platform() == 'win32') { - soname = path.join(__dirname, 'install', 'lib', 'sherpa-ncnn-c-api.dll'); -} else if (os.platform() == 'darwin') { - soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.dylib'); -} else if (os.platform() == 'linux') { - soname = path.join(__dirname, 'install', 'lib', 'libsherpa-ncnn-c-api.so'); -} else { - throw new Error(`Unsupported platform ${os.platform()}`); -} -if (!fs.existsSync(soname)) { - throw new Error(`Cannot find file ${soname}. Please make sure you have run - ./build.sh`); -} - -debug('soname ', soname) - -const libsherpa_ncnn = ffi.Library(soname, { - 'CreateRecognizer': [RecognizerPtr, [RecognizerConfigPtr]], - 'DestroyRecognizer': ['void', [RecognizerPtr]], - 'CreateStream': [StreamPtr, [RecognizerPtr]], - 'DestroyStream': ['void', [StreamPtr]], - 'AcceptWaveform': ['void', [StreamPtr, float, floatPtr, int32_t]], - 'IsReady': [int32_t, [RecognizerPtr, StreamPtr]], - 'Decode': ['void', [RecognizerPtr, StreamPtr]], - 'GetResult': [ResultPtr, [RecognizerPtr, StreamPtr]], - 'DestroyResult': ['void', [ResultPtr]], - 'Reset': ['void', [RecognizerPtr, StreamPtr]], - 'InputFinished': ['void', [StreamPtr]], - 'IsEndpoint': [int32_t, [RecognizerPtr, StreamPtr]], -}); - -class Recognizer { - /** - * @param {SherpaNcnnRecognizerConfig} config Configuration for the recognizer - * - * The user has to invoke this.free() at the end to avoid memory leak. - */ - constructor(config) { - this.recognizer_handle = libsherpa_ncnn.CreateRecognizer(config.ref()); - this.stream_handle = libsherpa_ncnn.CreateStream(this.recognizer_handle); - } - - free() { - if (this.stream_handle) { - libsherpa_ncnn.DestroyStream(this.stream_handle); - this.stream_handle = null; - } - - libsherpa_ncnn.DestroyRecognizer(this.recognizer_handle); - this.handle = null; - } - - /** - * @param {bool} true to create a new stream - */ - reset(recreate) { - if (recreate) { - libsherpa_ncnn.DestroyStream(this.stream_handle); - this.stream_handle = libsherpa_ncnn.CreateStream(this.recognizer_handle); - return; - } - libsherpa_ncnn.Reset(this.recognizer_handle, this.stream_handle) - } - /** - * @param {float} Sample rate of the input data - * @param {float[]} A 1-d float array containing audio samples. It should be - * in the range [-1, 1]. - */ - acceptWaveform(sampleRate, samples) { - libsherpa_ncnn.AcceptWaveform( - this.stream_handle, sampleRate, samples, samples.length); - } - - isReady() { - return libsherpa_ncnn.IsReady(this.recognizer_handle, this.stream_handle); - } - - decode() { - libsherpa_ncnn.Decode(this.recognizer_handle, this.stream_handle); - } - - getResult() { - const h = - libsherpa_ncnn.GetResult(this.recognizer_handle, this.stream_handle); - const text = Buffer.from(h.deref().text, 'utf-8').toString(); - libsherpa_ncnn.DestroyResult(h); - return text; - } -}; - -// alias - -const ModelConfig = SherpaNcnnModelConfig; -const DecoderConfig = SherpaNcnnDecoderConfig; -const FeatureConfig = SherpaNcnnFeatureExtractorConfig; -const RecognizerConfig = SherpaNcnnRecognizerConfig; - -module.exports = { - FeatureConfig, - ModelConfig, - DecoderConfig, - Recognizer, - RecognizerConfig, -}; diff --git a/nodejs-examples/package.json b/nodejs-examples/package.json deleted file mode 100644 index 7583d6b6..00000000 --- a/nodejs-examples/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "sherpa-ncnn", - "version": "2.1.4", - "description": "real-time speech recognition with Next-gen Kaldi", - "main": "index.js", - "dependencies": { - "ffi-napi": "^4.0.3", - "ref-struct-napi": "^1.1.1", - "wav": "^1.0.2" - }, - "devDependencies": {}, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/k2-fsa/sherpa-ncnn.git" - }, - "keywords": [ - "speech-to-text;", - "ASR" - ], - "author": "The Next-gen Kaldi team", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/k2-fsa/sherpa-ncnn/issues" - }, - "homepage": "https://github.com/k2-fsa/sherpa-ncnn#readme" -} diff --git a/nodejs-examples/run.sh b/nodejs-examples/run.sh deleted file mode 100755 index 76d57873..00000000 --- a/nodejs-examples/run.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2023 Xiaomi Corporation (authors: Fangjun Kuang) - -npm list | grep ffi-napi >/dev/null || npm install ffi-napi -npm list | grep ref-struct-napi >/dev/null || npm install ref-struct-napi -npm list | grep wav >/dev/null || npm install wav - -if [ ! -e ./install ]; then - cd .. - mkdir -p build - cd build - cmake -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=./install \ - -DSHERPA_NCNN_ENABLE_PORTAUDIO=OFF \ - -DSHERPA_NCNN_ENABLE_BINARY=OFF \ - -DSHERPA_NCNN_ENABLE_C_API=ON \ - -DSHERPA_NCNN_ENABLE_GENERATE_INT8_SCALE_TABLE=OFF \ - -DSHERPA_NCNN_ENABLE_PYTHON=OFF \ - .. - make -j3 - make install - cd ../nodejs-examples - ln -s $PWD/../build/install . -fi - -if [ ! -d ./sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13 ]; then - echo "Please refer to" - echo "https://k2-fsa.github.io/sherpa/ncnn/pretrained_models/zipformer-transucer-models.html#csukuangfj-sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13-bilingual-chinese-english" - echo "to download the models" - exit 0 -fi - -node ./test.js diff --git a/nodejs-examples/test.js b/nodejs-examples/test.js index 119dff7d..60d203f0 100644 --- a/nodejs-examples/test.js +++ b/nodejs-examples/test.js @@ -4,7 +4,7 @@ const fs = require('fs'); const {Readable} = require('stream'); const wav = require('wav'); -sherpa_ncnn = require('./index.js') +const sherpa_ncnn = require('sherpa-ncnn2') const featConfig = new sherpa_ncnn.FeatureConfig(); featConfig.sampleRate = 16000; From 1d1fa4828f8292e04cacfb6c0d1618e177a13778 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:21:11 +0800 Subject: [PATCH 09/17] small fixes --- .github/workflows/nodejs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 2197f2ee..79b1ae46 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + - nodejs paths: - '.github/workflows/nodejs.yaml' - 'CMakeLists.txt' From eacd81444fa931dd226177671e261f9f33cfb86d Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:24:07 +0800 Subject: [PATCH 10/17] small fixes --- .github/workflows/aarch64-linux-gnu.yaml | 1 + .github/workflows/arm-linux-gnueabihf.yaml | 1 + .github/workflows/jni.yaml | 2 ++ .github/workflows/linux.yaml | 2 ++ .github/workflows/macos.yaml | 2 ++ .github/workflows/mfc.yaml | 13 ------------- .github/workflows/nodejs.yaml | 13 +------------ .github/workflows/swift-api-test.yaml | 1 + .github/workflows/test-dot-net.yaml | 2 ++ .github/workflows/test-pip-install.yaml | 1 + .github/workflows/windows-x64.yaml | 1 + .github/workflows/windows-x86.yaml | 1 + 12 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/aarch64-linux-gnu.yaml b/.github/workflows/aarch64-linux-gnu.yaml index 5b4dac03..57a3918e 100644 --- a/.github/workflows/aarch64-linux-gnu.yaml +++ b/.github/workflows/aarch64-linux-gnu.yaml @@ -22,6 +22,7 @@ on: - 'cmake/**' - 'sherpa-ncnn/csrc/*' - 'toolchains/aarch64-linux-gnu.toolchain.cmake' + workflow_dispatch: concurrency: group: aarch64-linux-gnu-${{ github.ref }} diff --git a/.github/workflows/arm-linux-gnueabihf.yaml b/.github/workflows/arm-linux-gnueabihf.yaml index ec79fe47..d2fe3fa4 100644 --- a/.github/workflows/arm-linux-gnueabihf.yaml +++ b/.github/workflows/arm-linux-gnueabihf.yaml @@ -22,6 +22,7 @@ on: - 'cmake/**' - 'sherpa-ncnn/csrc/*' - 'toolchains/arm-linux-gnueabihf.toolchain.cmake' + workflow_dispatch: concurrency: group: arm-linux-gnueabihf-${{ github.ref }} diff --git a/.github/workflows/jni.yaml b/.github/workflows/jni.yaml index 8fa253aa..c27dabbf 100644 --- a/.github/workflows/jni.yaml +++ b/.github/workflows/jni.yaml @@ -22,6 +22,8 @@ on: - 'sherpa-ncnn/jni/*' - '.github/scripts/test-jni.sh' + workflow_dispatch: + concurrency: group: jni-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 519bc75a..3a643818 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -21,6 +21,8 @@ on: - 'sherpa-ncnn/csrc/*' - 'sherpa-ncnn/csrc/*' + workflow_dispatch: + concurrency: group: linux-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index a3df7f2a..12628d83 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -20,6 +20,8 @@ on: - 'cmake/**' - 'sherpa-ncnn/csrc/*' + workflow_dispatch: + concurrency: group: macos-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/mfc.yaml b/.github/workflows/mfc.yaml index ba1b6dad..4bdc7002 100644 --- a/.github/workflows/mfc.yaml +++ b/.github/workflows/mfc.yaml @@ -23,20 +23,8 @@ on: - 'mfc-examples/**' - 'sherpa-ncnn/csrc/*' - 'sherpa-ncnn/c-api/*' - release: - types: - - published workflow_dispatch: - inputs: - release: - description: "Whether to release" - type: boolean - -env: - RELEASE: - |- # Release if there is a release tag name or a release flag in workflow_dispatch - ${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }} concurrency: group: mfc-${{ github.ref }} @@ -130,7 +118,6 @@ jobs: path: ./sherpa-ncnn*.exe - name: Release pre-compiled binaries for Windows ${{ matrix.arch }} - if: env.RELEASE == 'true' uses: svenstaro/upload-release-action@v2 with: file_glob: true diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 79b1ae46..4d041642 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -22,6 +22,7 @@ on: - 'nodejs-examples/**' - 'sherpa-ncnn/csrc/*' - 'scripts/nodejs/**' + workflow_dispatch: concurrency: group: nodejs-${{ github.ref }} @@ -65,18 +66,6 @@ jobs: npm install npm@6.14.4 npm --version - - name: Install npm packages - shell: bash - run: | - cd nodejs-examples - npm install ffi-napi ref-struct-napi wav - npm list - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ matrix.os }}-shared - - name: Download model shell: bash run: | diff --git a/.github/workflows/swift-api-test.yaml b/.github/workflows/swift-api-test.yaml index 1353e3f6..c77d6d45 100644 --- a/.github/workflows/swift-api-test.yaml +++ b/.github/workflows/swift-api-test.yaml @@ -23,6 +23,7 @@ on: - 'sherpa-ncnn/csrc/*' - 'sherpa-ncnn/swift-api-examples/*' - 'build-swift-macos.sh' + workflow_dispatch: concurrency: group: swift-api-test-${{ github.ref }} diff --git a/.github/workflows/test-dot-net.yaml b/.github/workflows/test-dot-net.yaml index ccdaf107..1f0af3ca 100644 --- a/.github/workflows/test-dot-net.yaml +++ b/.github/workflows/test-dot-net.yaml @@ -24,6 +24,8 @@ on: # nightly build at 23:50 UTC time every day - cron: "50 23 * * *" + workflow_dispatch: + concurrency: group: test-dot-net cancel-in-progress: true diff --git a/.github/workflows/test-pip-install.yaml b/.github/workflows/test-pip-install.yaml index 7254b988..621addee 100644 --- a/.github/workflows/test-pip-install.yaml +++ b/.github/workflows/test-pip-install.yaml @@ -12,6 +12,7 @@ on: # day of the week (0-6) # nightly test at 22:50 UTC time every day - cron: "50 22 * * *" + workflow_dispatch: concurrency: group: test_pip_install-${{ github.ref }} diff --git a/.github/workflows/windows-x64.yaml b/.github/workflows/windows-x64.yaml index 95a707a2..65d9df05 100644 --- a/.github/workflows/windows-x64.yaml +++ b/.github/workflows/windows-x64.yaml @@ -19,6 +19,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-ncnn/csrc/*' + workflow_dispatch: concurrency: group: windows-x64-${{ github.ref }} diff --git a/.github/workflows/windows-x86.yaml b/.github/workflows/windows-x86.yaml index 2908f746..28c64ec3 100644 --- a/.github/workflows/windows-x86.yaml +++ b/.github/workflows/windows-x86.yaml @@ -19,6 +19,7 @@ on: - 'CMakeLists.txt' - 'cmake/**' - 'sherpa-ncnn/csrc/*' + workflow_dispatch: concurrency: group: windows-x86-${{ github.ref }} From 9da48802fabb040db59c8c840683d689c7d0e90b Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:25:20 +0800 Subject: [PATCH 11/17] small fixes --- .github/workflows/nodejs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 4d041642..bc5e909d 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.8"] steps: From 5e49dbd7685cc485fc683803afb5d3b0dab70980 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:26:30 +0800 Subject: [PATCH 12/17] small fixes --- .github/workflows/nodejs.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index bc5e909d..e3d4a3ce 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -4,24 +4,15 @@ on: push: branches: - master - - nodejs paths: - - '.github/workflows/nodejs.yaml' - - 'CMakeLists.txt' - - 'cmake/**' - 'nodejs-examples/**' - - 'sherpa-ncnn/csrc/*' - - 'scripts/nodejs/**' + pull_request: branches: - master paths: - - '.github/workflows/nodejs.yaml' - - 'CMakeLists.txt' - - 'cmake/**' - 'nodejs-examples/**' - - 'sherpa-ncnn/csrc/*' - - 'scripts/nodejs/**' + workflow_dispatch: concurrency: From 11b9749160667c0d2432eab90d610957735f4493 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:38:25 +0800 Subject: [PATCH 13/17] small fixes --- .../workflows/build-wheels-macos-arm64.yaml | 93 +++++++++++++++++++ ...macos.yaml => build-wheels-macos-x64.yaml} | 11 ++- 2 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build-wheels-macos-arm64.yaml rename .github/workflows/{build-wheels-macos.yaml => build-wheels-macos-x64.yaml} (93%) diff --git a/.github/workflows/build-wheels-macos-arm64.yaml b/.github/workflows/build-wheels-macos-arm64.yaml new file mode 100644 index 00000000..d50dc2eb --- /dev/null +++ b/.github/workflows/build-wheels-macos-arm64.yaml @@ -0,0 +1,93 @@ +name: build-wheels-macos-arm64 + +on: + push: + branches: + - wheel + - nodejs + tags: + - '*' + workflow_dispatch: + +env: + SHERPA_NCNN_IS_IN_GITHUB_ACTIONS: 1 + +concurrency: + group: build-wheels-macos-arm64-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_wheels_arm64: + name: ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest] + python-version: ["cp38", "cp39", "cp310", "cp311", "cp312"] + + steps: + - uses: actions/checkout@v4 + + # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ + # for a list of versions + - name: Build wheels + uses: pypa/cibuildwheel@v2.15.0 + env: + CIBW_BUILD: "${{ matrix.python-version}}-* " + CIBW_ENVIRONMENT: SHERPA_NCNN_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='arm64'" + CIBW_ARCHS: "arm64" + CIBW_BUILD_VERBOSITY: 3 + + # Don't repair macOS wheels + CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" + + - name: Display wheels + shell: bash + run: | + ls -lh ./wheelhouse/ + + ls -lh ./wheelhouse/*.whl + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + + - name: Publish to huggingface + if: matrix.python-version == 'cp38' + env: + HF_TOKEN: ${{ secrets.HF_TOKEN }} + uses: nick-fields/retry@v2 + with: + max_attempts: 20 + timeout_seconds: 200 + shell: bash + command: | + git config --global user.email "csukuangfj@gmail.com" + git config --global user.name "Fangjun Kuang" + + rm -rf huggingface + export GIT_LFS_SKIP_SMUDGE=1 + + git clone https://huggingface.co/csukuangfj/sherpa-ncnn-wheels huggingface + cd huggingface + git fetch + git pull + git merge -m "merge remote" --ff origin main + + cp -v ../wheelhouse/*.whl . + + git status + git add . + git commit -m "add more wheels" + git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-ncnn-wheels main + + - name: Publish wheels to PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python3 -m pip install --upgrade pip + python3 -m pip install wheel twine setuptools + + twine upload ./wheelhouse/*.whl diff --git a/.github/workflows/build-wheels-macos.yaml b/.github/workflows/build-wheels-macos-x64.yaml similarity index 93% rename from .github/workflows/build-wheels-macos.yaml rename to .github/workflows/build-wheels-macos-x64.yaml index 2443d5fb..e8546ead 100644 --- a/.github/workflows/build-wheels-macos.yaml +++ b/.github/workflows/build-wheels-macos-x64.yaml @@ -1,9 +1,10 @@ -name: build-wheels-macos +name: build-wheels-macos-x64 on: push: branches: - wheel + - nodejs tags: - '*' workflow_dispatch: @@ -12,11 +13,11 @@ env: SHERPA_NCNN_IS_IN_GITHUB_ACTIONS: 1 concurrency: - group: build-wheels-macos-${{ github.ref }} + group: build-wheels-macos-x64-${{ github.ref }} cancel-in-progress: true jobs: - build_wheels: + build_wheels_x64: name: ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: @@ -34,8 +35,8 @@ jobs: uses: pypa/cibuildwheel@v2.15.0 env: CIBW_BUILD: "${{ matrix.python-version}}-* " - CIBW_ENVIRONMENT: SHERPA_NCNN_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'" - CIBW_ARCHS: "universal2" + CIBW_ENVIRONMENT: SHERPA_NCNN_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='x86_64'" + CIBW_ARCHS: "x86_64" CIBW_BUILD_VERBOSITY: 3 # Don't repair macOS wheels From a4535095438cee4ab402f85b73fa836c96e046a3 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:46:16 +0800 Subject: [PATCH 14/17] small fixes --- .../workflows/build-wheels-macos-arm64.yaml | 1 - .github/workflows/build-wheels-macos-x64.yaml | 1 - .github/workflows/nodejs.yaml | 1 + .github/workflows/npm.yaml | 4 +++ nodejs-examples/test.js | 8 +++-- scripts/nodejs/index.js | 11 +++++-- scripts/nodejs/package.json.in | 2 +- scripts/nodejs/run.sh | 32 ++++++++++++++----- 8 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-wheels-macos-arm64.yaml b/.github/workflows/build-wheels-macos-arm64.yaml index d50dc2eb..64fd45bc 100644 --- a/.github/workflows/build-wheels-macos-arm64.yaml +++ b/.github/workflows/build-wheels-macos-arm64.yaml @@ -4,7 +4,6 @@ on: push: branches: - wheel - - nodejs tags: - '*' workflow_dispatch: diff --git a/.github/workflows/build-wheels-macos-x64.yaml b/.github/workflows/build-wheels-macos-x64.yaml index e8546ead..a752b00c 100644 --- a/.github/workflows/build-wheels-macos-x64.yaml +++ b/.github/workflows/build-wheels-macos-x64.yaml @@ -4,7 +4,6 @@ on: push: branches: - wheel - - nodejs tags: - '*' workflow_dispatch: diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index e3d4a3ce..d6e65e9e 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + - nodejs paths: - 'nodejs-examples/**' diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml index a087a45d..8e533f16 100644 --- a/.github/workflows/npm.yaml +++ b/.github/workflows/npm.yaml @@ -1,6 +1,10 @@ name: npm on: + push: + branches: + - master + - nodejs workflow_dispatch: concurrency: diff --git a/nodejs-examples/test.js b/nodejs-examples/test.js index 60d203f0..fe2b86b9 100644 --- a/nodejs-examples/test.js +++ b/nodejs-examples/test.js @@ -4,7 +4,7 @@ const fs = require('fs'); const {Readable} = require('stream'); const wav = require('wav'); -const sherpa_ncnn = require('sherpa-ncnn2') +const sherpa_ncnn = require('sherpa-ncnn3') const featConfig = new sherpa_ncnn.FeatureConfig(); featConfig.sampleRate = 16000; @@ -39,16 +39,19 @@ const recognizerConfig = new sherpa_ncnn.RecognizerConfig(); recognizerConfig.featConfig = featConfig; recognizerConfig.modelConfig = modelConfig; recognizerConfig.decoderConfig = decoderConfig; +recognizerConfig.enableEndpoint = 0; const recognizer = new sherpa_ncnn.Recognizer(recognizerConfig); const waveFilename = - './sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/test_wavs/2.wav' + './sherpa-ncnn-streaming-zipformer-bilingual-zh-en-2023-02-13/test_wavs/0.wav' const reader = new wav.Reader(); const readable = new Readable().wrap(reader); function decode(samples) { + i += samples.length; + console.log(i); recognizer.acceptWaveform(recognizerConfig.featConfig.sampleRate, samples); while (recognizer.isReady()) { @@ -71,6 +74,7 @@ reader.on('format', ({audioFormat, sampleRate, channels, bitDepth}) => { } }); +let i = 0; fs.createReadStream(waveFilename, {'highWaterMark': 4096}) .pipe(reader) .on('finish', function(err) { diff --git a/scripts/nodejs/index.js b/scripts/nodejs/index.js index 76b9ed9c..8f1c4aa0 100644 --- a/scripts/nodejs/index.js +++ b/scripts/nodejs/index.js @@ -94,8 +94,15 @@ if (os.platform() == 'win32') { `Support only Windows x86 and x64 for now. Given ${process.arch}`); } } else if (os.platform() == 'darwin') { - soname = path.join( - __dirname, 'lib', 'osx-universal2', 'libsherpa-ncnn-c-api.dylib'); + if (process.arch == 'x64') { + soname = path.join(__dirname, 'lib', 'osx-x64', 'libsherpa-ncnn-c-api.so'); + } else if (process.arch == 'arm64') { + soname = + path.join(__dirname, 'lib', 'osx-arm64', 'libsherpa-ncnn-c-api.so'); + } else { + throw new Error( + `Support only macOS x64 and arm64 for now. Given ${process.arch}`); + } } else if (os.platform() == 'linux') { if (process.arch == 'x64') { soname = diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in index 41ce10aa..e1eae8f2 100644 --- a/scripts/nodejs/package.json.in +++ b/scripts/nodejs/package.json.in @@ -1,5 +1,5 @@ { - "name": "sherpa-ncnn2", + "name": "sherpa-ncnn3", "version": "SHERPA_NCNN_VERSION", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh index c978b714..d74604e5 100755 --- a/scripts/nodejs/run.sh +++ b/scripts/nodejs/run.sh @@ -70,14 +70,27 @@ function linux_x86() { rm -rf t } -function osx_universal2() { - echo "Process osx-universal2" - mkdir -p lib/osx-universal2 - dst=$(realpath lib/osx-universal2) +function osx_x64() { + echo "Process osx-x64" + mkdir -p lib/osx-x64 + dst=$(realpath lib/osx-x64) mkdir t cd t - wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_universal2.whl - unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_universal2.whl + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_x86_64.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_10_9_x86_64.whl + cp -v sherpa_ncnn/lib/*.dylib $dst/ + cd .. + rm -rf t +} + +function osx_arm64() { + echo "Process osx-arm64" + mkdir -p lib/osx-arm64 + dst=$(realpath lib/osx-arm64) + mkdir t + cd t + wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_11_0_arm64.whl + unzip ./https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_11_0_arm64.whl cp -v sherpa_ncnn/lib/*.dylib $dst/ cd .. rm -rf t @@ -95,5 +108,8 @@ ls -lh lib/linux-x64 linux_x86 ls -lh lib/linux-x86 -osx_universal2 -ls -lh lib/osx-universal2 +osx_x64 +ls -lh lib/osx-x64 + +osx_arm64 +ls -lh lib/osx-arm64 From 33b78830d7efec21b0dd253d66e782afa1b844b9 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:49:07 +0800 Subject: [PATCH 15/17] small fixes --- scripts/nodejs/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nodejs/run.sh b/scripts/nodejs/run.sh index d74604e5..c5527a01 100755 --- a/scripts/nodejs/run.sh +++ b/scripts/nodejs/run.sh @@ -90,7 +90,7 @@ function osx_arm64() { mkdir t cd t wget -q https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_11_0_arm64.whl - unzip ./https://huggingface.co/csukuangfj/sherpa-ncnn-wheels/resolve/main/sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_11_0_arm64.whl + unzip ./sherpa_ncnn-${SHERPA_NCNN_VERSION}-cp38-cp38-macosx_11_0_arm64.whl cp -v sherpa_ncnn/lib/*.dylib $dst/ cd .. rm -rf t From 059eded101e5d027b07e50c4316450d902bc6aae Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:52:19 +0800 Subject: [PATCH 16/17] small fixes --- .github/workflows/nodejs.yaml | 2 +- .github/workflows/npm.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index d6e65e9e..7ce48cb4 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] python-version: ["3.8"] steps: diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml index 8e533f16..57895df3 100644 --- a/.github/workflows/npm.yaml +++ b/.github/workflows/npm.yaml @@ -4,7 +4,6 @@ on: push: branches: - master - - nodejs workflow_dispatch: concurrency: From d777712d1f345eb9e0d0ca3969b091d19796666b Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 19 Nov 2023 22:52:55 +0800 Subject: [PATCH 17/17] small fixes --- .github/workflows/nodejs.yaml | 6 +----- .github/workflows/npm.yaml | 1 + nodejs-examples/test.js | 5 +---- scripts/nodejs/index.js | 5 +++-- scripts/nodejs/package.json | 2 +- scripts/nodejs/package.json.in | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 7ce48cb4..0e11f3f6 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -5,14 +5,10 @@ on: branches: - master - nodejs - paths: - - 'nodejs-examples/**' pull_request: branches: - master - paths: - - 'nodejs-examples/**' workflow_dispatch: @@ -72,5 +68,5 @@ jobs: run: | cd nodejs-examples ls -lh - npm install sherpa-ncnn2 wav + npm install sherpa-ncnn4 wav node ./test.js diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml index 57895df3..4af709c8 100644 --- a/.github/workflows/npm.yaml +++ b/.github/workflows/npm.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: concurrency: diff --git a/nodejs-examples/test.js b/nodejs-examples/test.js index fe2b86b9..d40ade3a 100644 --- a/nodejs-examples/test.js +++ b/nodejs-examples/test.js @@ -4,7 +4,7 @@ const fs = require('fs'); const {Readable} = require('stream'); const wav = require('wav'); -const sherpa_ncnn = require('sherpa-ncnn3') +const sherpa_ncnn = require('sherpa-ncnn4') const featConfig = new sherpa_ncnn.FeatureConfig(); featConfig.sampleRate = 16000; @@ -50,8 +50,6 @@ const reader = new wav.Reader(); const readable = new Readable().wrap(reader); function decode(samples) { - i += samples.length; - console.log(i); recognizer.acceptWaveform(recognizerConfig.featConfig.sampleRate, samples); while (recognizer.isReady()) { @@ -74,7 +72,6 @@ reader.on('format', ({audioFormat, sampleRate, channels, bitDepth}) => { } }); -let i = 0; fs.createReadStream(waveFilename, {'highWaterMark': 4096}) .pipe(reader) .on('finish', function(err) { diff --git a/scripts/nodejs/index.js b/scripts/nodejs/index.js index 8f1c4aa0..1255bc35 100644 --- a/scripts/nodejs/index.js +++ b/scripts/nodejs/index.js @@ -95,10 +95,11 @@ if (os.platform() == 'win32') { } } else if (os.platform() == 'darwin') { if (process.arch == 'x64') { - soname = path.join(__dirname, 'lib', 'osx-x64', 'libsherpa-ncnn-c-api.so'); + soname = + path.join(__dirname, 'lib', 'osx-x64', 'libsherpa-ncnn-c-api.dylib'); } else if (process.arch == 'arm64') { soname = - path.join(__dirname, 'lib', 'osx-arm64', 'libsherpa-ncnn-c-api.so'); + path.join(__dirname, 'lib', 'osx-arm64', 'libsherpa-ncnn-c-api.dylib'); } else { throw new Error( `Support only macOS x64 and arm64 for now. Given ${process.arch}`); diff --git a/scripts/nodejs/package.json b/scripts/nodejs/package.json index 088a303b..0c84042c 100644 --- a/scripts/nodejs/package.json +++ b/scripts/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "sherpa-ncnn", - "version": "2.4.1", + "version": "2.1.4", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js", "scripts": { diff --git a/scripts/nodejs/package.json.in b/scripts/nodejs/package.json.in index e1eae8f2..d1e85b2e 100644 --- a/scripts/nodejs/package.json.in +++ b/scripts/nodejs/package.json.in @@ -1,5 +1,5 @@ { - "name": "sherpa-ncnn3", + "name": "sherpa-ncnn", "version": "SHERPA_NCNN_VERSION", "description": "Real-time speech recognition with Next-gen Kaldi", "main": "index.js",