├── .editorconfig ├── .github └── workflows │ ├── ci.yml │ └── codeql.yml ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── SECURITY.md ├── azure-pipelines └── publish.yml ├── binding.gyp ├── lib ├── index.ts ├── promises.ts ├── test.ts └── testWorker.ts ├── package-lock.json ├── package.json ├── src ├── addon.cc ├── cpu_worker.cc ├── cpu_worker.h ├── process.cc ├── process.h ├── process_commandline.cc ├── process_commandline.h ├── process_worker.cc └── process_worker.h ├── tsconfig.json ├── tslint.json └── typings ├── windows-process-tree.d.ts └── windows-process-tree └── promises.d.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | end_of_line = lf 9 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | # The branches below must be a subset of the branches above 8 | branches: [ "main" ] 9 | 10 | jobs: 11 | build: 12 | runs-on: ${{ matrix.os }} 13 | strategy: 14 | matrix: 15 | os: [windows-latest, macos-latest, ubuntu-latest] 16 | node-version: [18.x] 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v2 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | - run: npm ci 24 | - run: npm run lint 25 | - run: npm run compile 26 | - run: npm run test 27 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "main" ] 20 | schedule: 21 | - cron: '29 18 * * 5' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: windows-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'cpp', 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | # ℹ️ Command-line programs to run using the OS shell. 56 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 57 | 58 | # If the Autobuild fails above, remove it and uncomment the following three lines. 59 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 60 | - run: | 61 | echo "Build application using npm" 62 | npm ci 63 | 64 | - name: Perform CodeQL Analysis 65 | uses: github/codeql-action/analyze@v2 66 | with: 67 | category: "/language:${{matrix.language}}" 68 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | node_modules 3 | lib/*.js 4 | lib/*.map -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | lib/test* 2 | .editorconfig 3 | .github 4 | azure-pipelines 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @vscode/windows-process-tree 2 | 3 | [![Build status](https://github.com/microsoft/vscode-windows-process-tree/actions/workflows/node.js.yml/badge.svg)](https://github.com/microsoft/vscode-windows-process-tree/actions/workflows/node.js.yml) 4 | 5 | [![npm version](https://badge.fury.io/js/@vscode%2Fwindows-process-tree.svg)](https://badge.fury.io/js/@vscode%2Fwindows-process-tree) 6 | 7 | A Node.js library that enables quickly fetching process tree information for a particular process ID on Windows. 8 | 9 | ## Usage 10 | 11 | ```ts 12 | import * as child_process from 'child_process'; 13 | import { getProcessTree } from '@vscode/windows-process-tree'; 14 | 15 | if (process.platform === 'win32') { 16 | child_process.spawn('cmd.exe'); 17 | getProcessTree(process.pid, (tree) => { 18 | console.log(tree); 19 | }); 20 | // { pid: 11168, 21 | // name: 'node.exe', 22 | // children: 23 | // [ { pid: 1472, name: 'cmd.exe', children:[] }, 24 | 25 | getProcessTree(0, (tree) => { 26 | console.log(tree); 27 | }); 28 | // undefined 29 | } 30 | ``` 31 | 32 | For the full API look at the [typings file](./typings/windows-process-tree.d.ts). 33 | 34 | ## Why a native node module? 35 | 36 | The current convention is to run wmic.exe to query a particular process ID and then parse the output like so: 37 | 38 | ```js 39 | let cp = require('child_process'); 40 | 41 | function getChildProcessDetails(pid, cb) { 42 | let args = ['process', 'where', `parentProcessId=${pid}`, 'get', 'ExecutablePath,ProcessId']; 43 | cp.execFile('wmic.exe', args, (err, stdout, stderr) => { 44 | if (err) { 45 | throw new Error(err); 46 | } 47 | if (stderr.length > 0) { 48 | cb([]); 49 | } 50 | var childProcessLines = stdout.split('\n').slice(1).filter(str => !/^\s*$/.test(str)); 51 | var childProcessDetails = childProcessLines.map(str => { 52 | var s = str.split(' '); 53 | return { executable: s[0], pid: Number(s[1]) }; 54 | }); 55 | cb(childProcessDetails); 56 | }); 57 | } 58 | ``` 59 | 60 | This has two problems: 61 | 62 | 1. It takes > 100ms\* to spin up a process and get the output returned. 63 | 2. It only goes one level deep. Meaning, if the process tree is deeply nested or processes in the tree have many children it will take a lot more time and need a bunch of processes launched. 64 | 65 | Both of which are only exacerbated by the fact that this information is something that a consumer may want to poll for. 66 | 67 | The native node module uses Windows APIs to get the process details and then they are organized into a tree, getting the entire tree's details in < 20ms\*. 68 | 69 | \* On my machine :slightly_smiling_face: 70 | 71 | ## Contributing 72 | 73 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 74 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 75 | the rights to use your contribution. For details, visit https://cla.microsoft.com. 76 | 77 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide 78 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions 79 | provided by the bot. You will only need to do this once across all repos using our CLA. 80 | 81 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 82 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 83 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 84 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /azure-pipelines/publish.yml: -------------------------------------------------------------------------------- 1 | name: $(Date:yyyyMMdd)$(Rev:.r) 2 | 3 | trigger: 4 | branches: 5 | include: 6 | - main 7 | pr: none 8 | 9 | resources: 10 | repositories: 11 | - repository: templates 12 | type: github 13 | name: microsoft/vscode-engineering 14 | ref: main 15 | endpoint: Monaco 16 | 17 | parameters: 18 | - name: publishPackage 19 | displayName: 🚀 Publish windows-process-tree 20 | type: boolean 21 | default: false 22 | 23 | extends: 24 | template: azure-pipelines/npm-package/pipeline.yml@templates 25 | parameters: 26 | npmPackages: 27 | - name: windows-process-tree 28 | 29 | buildSteps: 30 | - script: npm ci 31 | displayName: Install dependencies 32 | 33 | testPlatforms: 34 | - name: Windows 35 | nodeVersions: 36 | - 18.x 37 | 38 | - name: macOS 39 | nodeVersions: 40 | - 18.x 41 | 42 | - name: Linux 43 | nodeVersions: 44 | - 18.x 45 | 46 | testSteps: 47 | - script: npm ci 48 | displayName: Install dependencies 49 | 50 | - script: npm run test 51 | displayName: Compile & test npm package 52 | 53 | apiScanSoftwareName: 'vscode-windows-process-tree' 54 | apiScanSoftwareVersion: '0.6' 55 | 56 | publishPackage: ${{ parameters.publishPackage }} 57 | packagePlatform: Windows 58 | -------------------------------------------------------------------------------- /binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "windows_process_tree", 5 | "dependencies": [ 6 | " void; 18 | 19 | // requestInProgress is used for any function that uses CreateToolhelp32Snapshot, as multiple calls 20 | // to this cannot be done at the same time. 21 | let requestInProgress = false; 22 | const globalRequestQueue: RequestCallback[] = []; 23 | 24 | const MAX_FILTER_DEPTH = 10; 25 | 26 | interface IProcessInfoNode { 27 | info: IProcessInfo; 28 | children: IProcessInfoNode[]; 29 | } 30 | 31 | /** 32 | * Construct tree of process infos and their children, returning the requested "root" node. 33 | * This is performed in a single iteration pass and allows reasonably efficient traversal. 34 | * 35 | * @param rootPid the pid of the "root" process to search for 36 | * @param processList the list of `IProcessInfo`s 37 | * @returns the `IProcessInfoNode` representing the root and all of its connected children 38 | */ 39 | function buildRawTree(rootPid: number, processList: Iterable): IProcessInfoNode | undefined { 40 | let root: IProcessInfoNode | undefined; 41 | 42 | // Map of pid to the array of immediate children. 43 | // Each array is shared by reference, such that: 44 | // forall n. Object.is(n.children, childrenOf[n.info.pid]) 45 | const childrenOf: { [_: number]: IProcessInfoNode[] | undefined } = {}; 46 | 47 | // Iterate over processList (once). 48 | // Add each process to children of its parent pid. 49 | // Note the process corresponding to `rootPid` when we see it. 50 | for (const info of processList) { 51 | const myChildren = (childrenOf[info.pid] ??= []); 52 | const mySiblings = (childrenOf[info.ppid] ??= []); 53 | 54 | const node = { info, children: myChildren }; 55 | mySiblings.push(node); 56 | 57 | if (root === undefined && info.pid === rootPid) { 58 | root = node; 59 | } 60 | } 61 | 62 | return root; 63 | } 64 | 65 | /** 66 | * Filters a list of processes to rootPid and its descendents and creates a tree 67 | * @param rootPid The process to use as the root 68 | * @param processList The list of processes 69 | * @param maxDepth The maximum depth to search 70 | */ 71 | export function buildProcessTree(rootPid: number, processList: Iterable, maxDepth: number = MAX_FILTER_DEPTH): IProcessTreeNode | undefined { 72 | if (process.platform !== 'win32') { 73 | throw new Error('buildProcessTree is only implemented on Windows'); 74 | } 75 | const root = buildRawTree(rootPid, processList); 76 | if (root === undefined) { 77 | return undefined; 78 | } 79 | 80 | // This differs from the "raw" tree somewhat trivially. 81 | // • the properties are inlined/splatted 82 | // • the 'ppid' field is omitted 83 | // • the depth of the tree is limited by `maxDepth` 84 | const buildNode = ({ info: { pid, name, memory, commandLine }, children }: IProcessInfoNode, depth: number): IProcessTreeNode => ({ 85 | pid, 86 | name, 87 | memory, 88 | commandLine, 89 | children: depth > 0 ? children.map(c => buildNode(c, depth - 1)) : [], 90 | }); 91 | 92 | return buildNode(root, maxDepth); 93 | } 94 | 95 | /** 96 | * Filters processList to contain the process with rootPid and all of its descendants 97 | * @param rootPid The root pid 98 | * @param processList The list of all processes 99 | * @param maxDepth The maximum depth to search 100 | */ 101 | export function filterProcessList(rootPid: number, processList: Iterable, maxDepth: number = MAX_FILTER_DEPTH): IProcessInfo[] | undefined { 102 | if (process.platform !== 'win32') { 103 | throw new Error('filterProcessList is only implemented on Windows'); 104 | } 105 | const root = buildRawTree(rootPid, processList); 106 | if (root === undefined) { 107 | return undefined; 108 | } 109 | 110 | if (maxDepth < 0) { 111 | return []; 112 | } 113 | 114 | function buildList({ info, children }: IProcessInfoNode, depth: number, accum: IProcessInfo[]): IProcessInfo[] { 115 | accum.push(info); 116 | if (depth > 0) { 117 | children.forEach(c => buildList(c, depth - 1, accum)); 118 | } 119 | return accum; 120 | } 121 | 122 | return buildList(root, maxDepth, []); 123 | } 124 | 125 | function getRawProcessList( 126 | callback: RequestCallback, 127 | flags?: ProcessDataFlag 128 | ): void { 129 | const queue = globalRequestQueue; 130 | 131 | queue.push(callback); 132 | 133 | // Only make a new request if there is not currently a request in progress. 134 | // This prevents too many requests from being made, there is also a crash that 135 | // can occur when performing multiple calls to CreateToolhelp32Snapshot at 136 | // once. 137 | if (!requestInProgress) { 138 | requestInProgress = true; 139 | native.getProcessList((processList: IProcessInfo[]) => { 140 | // It is possible and valid for one callback to cause another to be added to the queue. 141 | // To avoid orphaning those callbacks, we repeat the draining until the queue is empty. 142 | // We use "queue.splice(0)" to atomically clear the queue, returning the batch to process. 143 | // If any of those also made requests, we repeat until the callback chain completes. 144 | // 145 | // An alternative would be to splice the queue once and immediately reset requestInProgress 146 | // before invoking callbacks: `CreateToolhelp32Snapshot` has safely completed at this point. 147 | // However, that would circumvent the "too many requests" rate-limiting (?) concern above. 148 | while (queue.length) { 149 | queue.splice(0).forEach(cb => cb(processList)); 150 | } 151 | requestInProgress = false; 152 | }, flags || 0); 153 | } 154 | } 155 | 156 | /** 157 | * Returns a list of processes containing the rootPid process and all of its descendants 158 | * @param rootPid The pid of the process of interest 159 | * @param callback The callback to use with the returned set of processes 160 | * @param flags The flags for what process data should be included 161 | */ 162 | export function getProcessList(rootPid: number, callback: (processList: IProcessInfo[] | undefined) => void, flags?: ProcessDataFlag): void { 163 | if (process.platform !== 'win32') { 164 | throw new Error('getProcessList is only implemented on Windows'); 165 | } 166 | getRawProcessList(procs => callback(filterProcessList(rootPid, procs)), flags); 167 | } 168 | 169 | export namespace getProcessList { 170 | // tslint:disable-next-line:variable-name 171 | export const __promisify__ = (rootPid: number, flags?: ProcessDataFlag): Promise => new Promise((resolve, reject) => { 172 | const callback = (processList: IProcessInfo[] | undefined) => processList 173 | ? resolve(processList) 174 | : reject(new Error(`Could not find PID ${rootPid}`)); 175 | getProcessList(rootPid, callback, flags); 176 | }); 177 | } 178 | 179 | /** 180 | * Returns the list of processes annotated with cpu usage information 181 | * @param processList The list of processes 182 | * @param callback The callback to use with the returned list of processes 183 | */ 184 | export function getProcessCpuUsage(processList: IProcessInfo[], callback: (tree: IProcessCpuInfo[]) => void): void { 185 | if (process.platform !== 'win32') { 186 | throw new Error('getProcessCpuUsage is only implemented on Windows'); 187 | } 188 | native.getProcessCpuUsage(processList, callback); 189 | } 190 | 191 | export namespace getProcessCpuUsage { 192 | // tslint:disable-next-line:variable-name 193 | export const __promisify__ = (processList: IProcessInfo[]): Promise => new Promise((resolve, reject) => { 194 | // NOTE: Currently this callback is *never* called with `undefined`, unlike the other functions which do PID lookups. 195 | // The handling here is just for consistency and future-proofing. 196 | const callback = (cpuInfos: IProcessCpuInfo[] | undefined) => cpuInfos 197 | ? resolve(cpuInfos) 198 | : reject(new Error('Failed to collect CPU info')); 199 | getProcessCpuUsage(processList, callback); 200 | }); 201 | } 202 | 203 | /** 204 | * Returns a tree of processes with rootPid as the root 205 | * @param rootPid The pid of the process that will be the root of the tree 206 | * @param callback The callback to use with the returned list of processes 207 | * @param flags Flags indicating what process data should be written on each node 208 | */ 209 | export function getProcessTree(rootPid: number, callback: (tree: IProcessTreeNode | undefined) => void, flags?: ProcessDataFlag): void { 210 | if (process.platform !== 'win32') { 211 | throw new Error('getProcessTree is only implemented on Windows'); 212 | } 213 | getRawProcessList(procs => callback(buildProcessTree(rootPid, procs)), flags); 214 | } 215 | 216 | export namespace getProcessTree { 217 | // tslint:disable-next-line:variable-name 218 | export const __promisify__ = (rootPid: number, flags?: ProcessDataFlag): Promise => new Promise((resolve, reject) => { 219 | const callback = (tree: IProcessTreeNode | undefined) => tree 220 | ? resolve(tree) 221 | : reject(new Error(`Could not find PID ${rootPid}`)); 222 | getProcessTree(rootPid, callback, flags); 223 | }); 224 | } 225 | 226 | // Since symbol properties can't be declared via namespace merging, we just define __promisify__ that way and 227 | // and manually set the "modern" promisify symbol: https://github.com/microsoft/TypeScript/issues/36813 228 | [getProcessTree, getProcessList, getProcessCpuUsage].forEach(func => 229 | Object.defineProperty(func, promisify.custom, { enumerable: false, value: func.__promisify__ })); 230 | -------------------------------------------------------------------------------- /lib/promises.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { promisify } from 'util'; 7 | 8 | import * as wpc from './index'; 9 | 10 | export { ProcessDataFlag } from './index'; 11 | 12 | export const getProcessTree = promisify(wpc.getProcessTree); 13 | export const getProcessList = promisify(wpc.getProcessList); 14 | export const getProcessCpuUsage = promisify(wpc.getProcessCpuUsage); 15 | -------------------------------------------------------------------------------- /lib/test.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as assert from 'assert'; 7 | import * as child_process from 'child_process'; 8 | import * as path from 'path'; 9 | import { getProcessTree, getProcessList, getProcessCpuUsage, ProcessDataFlag, buildProcessTree, filterProcessList } from './index'; 10 | import { Worker, isMainThread } from 'worker_threads'; 11 | import { IProcessCpuInfo, IProcessInfo, IProcessTreeNode } from '@vscode/windows-process-tree'; 12 | import * as promises from './promises'; 13 | const isWindows = process.platform === 'win32'; 14 | 15 | function pollUntil(makePromise: () => Promise, cb: () => void, interval: number, timeout: number): void { 16 | makePromise().then((success) => { 17 | if (success) { 18 | cb(); 19 | } else { 20 | setTimeout(() => { 21 | pollUntil(makePromise, cb, interval, timeout - interval); 22 | }, interval); 23 | } 24 | }); 25 | } 26 | 27 | if (isWindows) { 28 | const native = require('../build/Release/windows_process_tree.node'); 29 | 30 | describe('getRawProcessList', () => { 31 | it('should throw if arguments are not provided', (done) => { 32 | assert.throws(() => native.getProcessList()); 33 | done(); 34 | }); 35 | 36 | it('should throw if the first argument is not a function', (done) => { 37 | assert.throws(() => native.getProcessList(1)); 38 | done(); 39 | }); 40 | 41 | it('should throw if the second argument is not a number', (done) => { 42 | assert.throws(() => native.getProcessList(() => {}, 'number')); 43 | done(); 44 | }); 45 | 46 | it('should return a list containing this process', (done) => { 47 | native.getProcessList((list) => { 48 | assert.notStrictEqual(list?.find(p => p.pid === process.pid), undefined); 49 | done(); 50 | }, 0); 51 | }); 52 | 53 | it('should handle multiple calls gracefully', (done) => { 54 | let counter = 0; 55 | const callback = (list) => { 56 | assert.notStrictEqual(list?.find(p => p.pid === process.pid), undefined); 57 | if (++counter === 2) { 58 | done(); 59 | } 60 | }; 61 | native.getProcessList(callback, ProcessDataFlag.None); 62 | native.getProcessList(callback, ProcessDataFlag.None); 63 | }); 64 | 65 | it('should return memory information only when the flag is set', (done) => { 66 | // Memory should be undefined when flag is not set 67 | native.getProcessList((list) => { 68 | assert.strictEqual(list?.every(p => p.memory === undefined), true); 69 | 70 | // Memory should be a number when flag is set 71 | native.getProcessList((list) => { 72 | assert.strictEqual(list?.some(p => p.memory > 0), true); 73 | done(); 74 | }, ProcessDataFlag.Memory); 75 | }, ProcessDataFlag.None); 76 | }); 77 | 78 | it('should return command line information only when the flag is set', (done) => { 79 | // commandLine should be undefined when flag is not set 80 | native.getProcessList((list) => { 81 | assert.strictEqual(list?.every(p => p.commandLine === undefined), true); 82 | 83 | // commandLine should be a string when flag is set 84 | native.getProcessList((list) => { 85 | assert.strictEqual(list?.every(p => typeof p.commandLine === 'string'), true); 86 | done(); 87 | }, ProcessDataFlag.CommandLine); 88 | }, ProcessDataFlag.None); 89 | }); 90 | }); 91 | 92 | describe('getProcessList', () => { 93 | let cps; 94 | 95 | beforeEach(() => { 96 | cps = []; 97 | }); 98 | 99 | afterEach(() => { 100 | cps.forEach(cp => { 101 | cp.kill(); 102 | }); 103 | }); 104 | 105 | it('should return a list containing this process', (done) => { 106 | getProcessList(process.pid, (list) => { 107 | assert.strictEqual(list?.length, 1); 108 | assert.strictEqual(list![0].name, 'node.exe'); 109 | assert.strictEqual(list![0].pid, process.pid); 110 | assert.strictEqual(list![0].memory, undefined); 111 | assert.strictEqual(list![0].commandLine, undefined); 112 | done(); 113 | }); 114 | }); 115 | 116 | it('should work promisified', async () => { 117 | const list: IProcessInfo[] = await promises.getProcessList(process.pid); 118 | 119 | assert.strictEqual(list.length, 1); 120 | const proc = list[0]; 121 | assert.strictEqual(proc.name, 'node.exe'); 122 | assert.strictEqual(proc.pid, process.pid); 123 | }); 124 | 125 | it('should return a list containing this process\'s memory if the flag is set', done => { 126 | getProcessList(process.pid, (list) => { 127 | assert.strictEqual(list?.length, 1); 128 | assert.strictEqual(list![0].name, 'node.exe'); 129 | assert.strictEqual(list![0].pid, process.pid); 130 | assert.strictEqual(typeof list![0].memory, 'number'); 131 | done(); 132 | }, ProcessDataFlag.Memory); 133 | }); 134 | 135 | it('should return command line information only if the flag is set', (done) => { 136 | getProcessList(process.pid, (list) => { 137 | assert.strictEqual(list?.length, 1); 138 | assert.strictEqual(list![0].name, 'node.exe'); 139 | assert.strictEqual(list![0].pid, process.pid); 140 | assert.strictEqual(typeof list![0].commandLine, 'string'); 141 | // CommandLine is " lib/test.js" 142 | assert.strictEqual(list![0].commandLine!.indexOf('mocha') > 0, true); 143 | assert.strictEqual(list![0].commandLine!.indexOf('lib/test.js') > 0, true); 144 | done(); 145 | }, ProcessDataFlag.CommandLine); 146 | }); 147 | 148 | it('should return a list containing this process\'s child processes', done => { 149 | cps.push(child_process.spawn('cmd.exe')); 150 | pollUntil(() => { 151 | return new Promise((resolve) => { 152 | getProcessList(process.pid, (list) => { 153 | resolve(list?.length === 2 && list![0].pid === process.pid && list[1].pid === cps[0].pid); 154 | }); 155 | }); 156 | }, () => done(), 20, 500); 157 | }); 158 | }); 159 | 160 | describe('getProcessCpuUsage', () => { 161 | it('should throw on incorrect argument types', done => { 162 | assert.throws(() => getProcessCpuUsage('<…>' as any, () => null), /processList.*array/); 163 | assert.throws(() => getProcessCpuUsage([], '<…>' as any), /callback.*function/); 164 | done(); 165 | }); 166 | 167 | it('should get process cpu usage', (done) => { 168 | getProcessCpuUsage([{ pid: process.pid, ppid: process.ppid, name: 'node.exe' }], (annotatedList) => { 169 | assert.strictEqual(annotatedList.length, 1); 170 | assert.strictEqual(annotatedList![0].name, 'node.exe'); 171 | assert.strictEqual(annotatedList![0].pid, process.pid); 172 | assert.strictEqual(annotatedList![0].memory, undefined); 173 | assert.strictEqual(typeof annotatedList![0].cpu, 'number'); 174 | assert.strictEqual(0 <= annotatedList![0].cpu! && annotatedList![0].cpu! <= 100, true); 175 | done(); 176 | }); 177 | }); 178 | 179 | it('should work promisified', async () => { 180 | const annotatedList: IProcessCpuInfo[] = await promises.getProcessCpuUsage([{ pid: process.pid, ppid: process.ppid, name: 'node.exe' }]); 181 | 182 | assert.strictEqual(annotatedList.length, 1); 183 | const proc = annotatedList[0]; 184 | assert.strictEqual(proc.name, 'node.exe'); 185 | assert.strictEqual(proc.pid, process.pid); 186 | }); 187 | 188 | it('should handle multiple calls gracefully', function (done: Mocha.Done): void { 189 | this.timeout(3000); 190 | 191 | let counter = 0; 192 | const callback = (list) => { 193 | assert.notStrictEqual(list?.find(p => p.pid === process.pid), undefined); 194 | if (++counter === 2) { 195 | done(); 196 | } 197 | }; 198 | getProcessCpuUsage([{ pid: process.pid, ppid: process.ppid, name: 'node.exe' }], callback); 199 | getProcessCpuUsage([{ pid: process.pid, ppid: process.ppid, name: 'node.exe' }], callback); 200 | }); 201 | }); 202 | 203 | describe('getProcessTree', () => { 204 | let cps; 205 | 206 | beforeEach(() => { 207 | cps = []; 208 | }); 209 | 210 | afterEach(() => { 211 | cps.forEach(cp => { 212 | cp.kill(); 213 | }); 214 | }); 215 | 216 | it('should return a tree containing this process', done => { 217 | getProcessTree(process.pid, (tree) => { 218 | assert.strictEqual(tree!.name, 'node.exe'); 219 | assert.strictEqual(tree!.pid, process.pid); 220 | assert.strictEqual(tree!.memory, undefined); 221 | assert.strictEqual(tree!.commandLine, undefined); 222 | assert.strictEqual(tree!.children.length, 0); 223 | done(); 224 | }); 225 | }); 226 | 227 | it('should work promisified', async () => { 228 | const tree: IProcessTreeNode = await promises.getProcessTree(process.pid); 229 | 230 | assert.strictEqual(tree?.name, 'node.exe'); 231 | assert.strictEqual(tree?.pid, process.pid); 232 | }); 233 | 234 | it('should return a tree containing this process\'s memory if the flag is set', done => { 235 | getProcessTree(process.pid, (tree) => { 236 | assert.strictEqual(tree!.name, 'node.exe'); 237 | assert.strictEqual(tree!.pid, process.pid); 238 | assert.notStrictEqual(tree!.memory, undefined); 239 | assert.strictEqual(tree!.children.length, 0); 240 | done(); 241 | }, ProcessDataFlag.Memory); 242 | }); 243 | 244 | it('should return a tree containing this process\'s command line if the flag is set', done => { 245 | getProcessTree(process.pid, (tree) => { 246 | assert.strictEqual(tree!.name, 'node.exe'); 247 | assert.strictEqual(tree!.pid, process.pid); 248 | assert.strictEqual(typeof tree!.commandLine, 'string'); 249 | assert.strictEqual(tree!.children.length, 0); 250 | done(); 251 | }, ProcessDataFlag.CommandLine); 252 | }); 253 | 254 | it('should return a tree containing this process\'s child processes (simple)', done => { 255 | cps.push(child_process.spawn('cmd.exe')); 256 | pollUntil(() => { 257 | return new Promise((resolve) => { 258 | getProcessTree(process.pid, (tree) => { 259 | resolve(tree!.children.length === 1); 260 | }); 261 | }); 262 | }, () => done(), 20, 500); 263 | }); 264 | 265 | it('should return a tree containing this process\'s child processes (complex)', done => { 266 | cps.push(child_process.spawn('powershell.exe')); 267 | cps.push(child_process.spawn('cmd.exe', ['/C', 'powershell.exe'])); 268 | pollUntil(() => { 269 | return new Promise((resolve) => { 270 | getProcessTree(process.pid, (tree) => { 271 | resolve(tree!.children.length === 2 && 272 | tree!.children[0].name === 'powershell.exe' && 273 | tree!.children[0].children.length === 0 && 274 | tree!.children[1].name === 'cmd.exe' && 275 | tree!.children[1].children && 276 | tree!.children[1].children.length === 1 && 277 | tree!.children[1].children[0].name === 'powershell.exe'); 278 | }); 279 | }); 280 | }, () => done(), 20, 500); 281 | }); 282 | }); 283 | 284 | describe('buildProcessTree', () => { 285 | it('should enforce a maximum search depth', () => { 286 | const tree = buildProcessTree(0, [ 287 | { pid: 0, ppid: 0, name: '0' } 288 | ], 3); 289 | assert.strictEqual(tree!.pid, 0); 290 | assert.strictEqual(tree!.children.length, 1); 291 | assert.strictEqual(tree!.children[0].pid, 0); 292 | assert.strictEqual(tree!.children[0].children.length, 1); 293 | assert.strictEqual(tree!.children[0].children[0].pid, 0); 294 | assert.strictEqual(tree!.children[0].children[0].children.length, 1); 295 | assert.strictEqual(tree!.children[0].children[0].children[0].pid, 0); 296 | assert.strictEqual(tree!.children[0].children[0].children[0].children.length, 0); 297 | }); 298 | }); 299 | 300 | describe('filterProcessList', () => { 301 | it('should enforce a maximum search depth', () => { 302 | const list = filterProcessList(0, [ 303 | { pid: 0, ppid: 0, name: '0' } 304 | ], 3); 305 | assert.strictEqual(list?.length, 4); 306 | assert.strictEqual(list![0].pid, 0); 307 | assert.strictEqual(list![1].pid, 0); 308 | assert.strictEqual(list![2].pid, 0); 309 | assert.strictEqual(list![3].pid, 0); 310 | }); 311 | }); 312 | 313 | describe('contextAware', () => { 314 | it('should be context aware get process list', async () => { 315 | if (isMainThread) { 316 | const workerPromise: Promise = new Promise(resolve => { 317 | const workerDir = path.join(__dirname, './testWorker.js'); 318 | const worker = new Worker(workerDir); 319 | worker.on('message', (message: string) => { 320 | assert.strictEqual(message, 'done'); 321 | }); 322 | worker.on('error', () => { 323 | resolve(false); 324 | }); 325 | worker.on('exit', (code) => { 326 | resolve(code === 0); 327 | }); 328 | }); 329 | const processListPromise: Promise = new Promise(resolve => { 330 | getProcessList(process.pid, (list) => { 331 | assert.strictEqual(list!.length >= 1, true); 332 | assert.strictEqual(list![0].name, 'node.exe'); 333 | assert.strictEqual(list![0].pid, process.pid); 334 | assert.strictEqual(list![0].memory, undefined); 335 | assert.strictEqual(list![0].commandLine, undefined); 336 | resolve(true); 337 | }); 338 | }); 339 | const combinedResult = await Promise.all([workerPromise, processListPromise]).then(results => { 340 | return results.every(result => result); 341 | }, () => { 342 | return false; 343 | }); 344 | assert.strictEqual(combinedResult, true); 345 | } 346 | }); 347 | 348 | it('should be context aware multiple workers', async () => { 349 | if (isMainThread) { 350 | const makeWorkerPromise = (): Promise => { 351 | return new Promise(resolve => { 352 | const workerDir = path.join(__dirname, './testWorker.js'); 353 | const worker = new Worker(workerDir); 354 | worker.on('message', (message: string) => { 355 | assert.strictEqual(message, 'done'); 356 | }); 357 | worker.on('error', () => { 358 | resolve(false); 359 | }); 360 | worker.on('exit', (code) => { 361 | resolve(code === 0); 362 | }); 363 | }); 364 | }; 365 | const workerPromises: Promise[] = []; 366 | for (let i = 0; i < 50; i++) { 367 | workerPromises.push(makeWorkerPromise()); 368 | } 369 | const processListPromise: Promise = new Promise(resolve => { 370 | getProcessList(process.pid, (list) => { 371 | assert.strictEqual(list!.length >= 1, true); 372 | assert.strictEqual(list![0].name, 'node.exe'); 373 | assert.strictEqual(list![0].pid, process.pid); 374 | assert.strictEqual(list![0].memory, undefined); 375 | assert.strictEqual(list![0].commandLine, undefined); 376 | resolve(true); 377 | }); 378 | }); 379 | const allPromises = [...workerPromises, processListPromise]; 380 | const workerResult = await Promise.all(allPromises).then(results => { 381 | return results.every(result => result); 382 | }, () => { 383 | return false; 384 | }); 385 | assert.strictEqual(workerResult, true); 386 | } 387 | }); 388 | }); 389 | } else { 390 | describe('getProcessTree', () => { 391 | it('should not be implemented on Windows', () => { 392 | assert.throws(() => { 393 | getProcessTree(process.pid, (_) => {}); 394 | }); 395 | assert.throws(() => { 396 | getProcessTree(process.pid, (_) => {}, ProcessDataFlag.Memory); 397 | }); 398 | }); 399 | 400 | it('should not be implemented promisified on Windows', () => { 401 | assert.rejects(() => { 402 | return promises.getProcessTree(process.pid); 403 | }); 404 | assert.rejects(() => { 405 | return promises.getProcessTree(process.pid, ProcessDataFlag.CommandLine); 406 | }); 407 | }); 408 | }); 409 | 410 | describe('getProcessList', () => { 411 | it('should not be implemented on Windows', () => { 412 | assert.throws(() => { 413 | getProcessList(process.pid, (_) => {}); 414 | }); 415 | assert.throws(() => { 416 | getProcessList(process.pid, (_) => {}, ProcessDataFlag.CommandLine); 417 | }); 418 | }); 419 | 420 | it('should not be implemented promisified on Windows', () => { 421 | assert.rejects(() => { 422 | return promises.getProcessList(process.pid); 423 | }); 424 | assert.rejects(() => { 425 | return promises.getProcessList(process.pid, ProcessDataFlag.Memory); 426 | }); 427 | }); 428 | }); 429 | 430 | describe('getProcessCpuUsage', () => { 431 | it('should not be implemented on Windows', () => { 432 | assert.throws(() => { 433 | getProcessCpuUsage([], (_) => {}); 434 | }); 435 | }); 436 | 437 | it('should not be implemented promisified on Windows', () => { 438 | assert.rejects(() => { 439 | return promises.getProcessCpuUsage([]); 440 | }); 441 | }); 442 | }); 443 | 444 | describe('buildProcessTree', () => { 445 | it('should not be implemented on Windows', () => { 446 | assert.throws(() => { 447 | buildProcessTree(process.pid, [], 0); 448 | }); 449 | }); 450 | }); 451 | 452 | describe('filterProcessList', () => { 453 | it('should not be implemented on Windows', () => { 454 | assert.throws(() => { 455 | filterProcessList(process.pid, [], 0); 456 | }); 457 | }); 458 | }); 459 | } 460 | -------------------------------------------------------------------------------- /lib/testWorker.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | import { isMainThread, parentPort } from 'worker_threads'; 3 | import { getProcessList } from './index'; 4 | 5 | if (!isMainThread) { 6 | new Promise(resolve => { 7 | getProcessList(process.pid, (list) => { 8 | assert.notStrictEqual(list, undefined); 9 | assert.strictEqual(list!.length >= 1, true); 10 | assert.strictEqual(list![0].name, 'node.exe'); 11 | assert.strictEqual(list![0].pid, process.pid); 12 | assert.strictEqual(list![0].memory, undefined); 13 | assert.strictEqual(list![0].commandLine, undefined); 14 | resolve(true); 15 | }); 16 | }).then((res) => { 17 | assert.strictEqual(res, true); 18 | parentPort?.postMessage('done'); 19 | }, () => { 20 | parentPort?.postMessage('fail'); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vscode/windows-process-tree", 3 | "version": "0.6.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "@vscode/windows-process-tree", 9 | "version": "0.6.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "node-addon-api": "7.1.0" 13 | }, 14 | "devDependencies": { 15 | "@types/mocha": "^10.0.0", 16 | "@types/node": "^14.14.0", 17 | "mocha": "^10.0.0", 18 | "tslint": "5.9.1", 19 | "typescript": "^4.0.0" 20 | } 21 | }, 22 | "node_modules/@types/mocha": { 23 | "version": "10.0.0", 24 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.0.tgz", 25 | "integrity": "sha512-rADY+HtTOA52l9VZWtgQfn4p+UDVM2eDVkMZT1I6syp0YKxW2F9v+0pbRZLsvskhQv/vMb6ZfCay81GHbz5SHg==", 26 | "dev": true 27 | }, 28 | "node_modules/@types/node": { 29 | "version": "14.14.37", 30 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", 31 | "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", 32 | "dev": true 33 | }, 34 | "node_modules/ansi-colors": { 35 | "version": "4.1.3", 36 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 37 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 38 | "dev": true, 39 | "license": "MIT", 40 | "engines": { 41 | "node": ">=6" 42 | } 43 | }, 44 | "node_modules/ansi-regex": { 45 | "version": "2.1.1", 46 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 47 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 48 | "dev": true, 49 | "engines": { 50 | "node": ">=0.10.0" 51 | } 52 | }, 53 | "node_modules/ansi-styles": { 54 | "version": "2.2.1", 55 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 56 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", 57 | "dev": true, 58 | "engines": { 59 | "node": ">=0.10.0" 60 | } 61 | }, 62 | "node_modules/anymatch": { 63 | "version": "3.1.2", 64 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 65 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 66 | "dev": true, 67 | "dependencies": { 68 | "normalize-path": "^3.0.0", 69 | "picomatch": "^2.0.4" 70 | }, 71 | "engines": { 72 | "node": ">= 8" 73 | } 74 | }, 75 | "node_modules/argparse": { 76 | "version": "1.0.10", 77 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 78 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 79 | "dev": true, 80 | "dependencies": { 81 | "sprintf-js": "~1.0.2" 82 | } 83 | }, 84 | "node_modules/babel-code-frame": { 85 | "version": "6.26.0", 86 | "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", 87 | "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", 88 | "dev": true, 89 | "dependencies": { 90 | "chalk": "^1.1.3", 91 | "esutils": "^2.0.2", 92 | "js-tokens": "^3.0.2" 93 | } 94 | }, 95 | "node_modules/babel-code-frame/node_modules/chalk": { 96 | "version": "1.1.3", 97 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 98 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 99 | "dev": true, 100 | "dependencies": { 101 | "ansi-styles": "^2.2.1", 102 | "escape-string-regexp": "^1.0.2", 103 | "has-ansi": "^2.0.0", 104 | "strip-ansi": "^3.0.0", 105 | "supports-color": "^2.0.0" 106 | }, 107 | "engines": { 108 | "node": ">=0.10.0" 109 | } 110 | }, 111 | "node_modules/babel-code-frame/node_modules/supports-color": { 112 | "version": "2.0.0", 113 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 114 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", 115 | "dev": true, 116 | "engines": { 117 | "node": ">=0.8.0" 118 | } 119 | }, 120 | "node_modules/balanced-match": { 121 | "version": "1.0.2", 122 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 123 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 124 | "dev": true 125 | }, 126 | "node_modules/binary-extensions": { 127 | "version": "2.2.0", 128 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 129 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 130 | "dev": true, 131 | "engines": { 132 | "node": ">=8" 133 | } 134 | }, 135 | "node_modules/brace-expansion": { 136 | "version": "1.1.11", 137 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 138 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 139 | "dev": true, 140 | "dependencies": { 141 | "balanced-match": "^1.0.0", 142 | "concat-map": "0.0.1" 143 | } 144 | }, 145 | "node_modules/braces": { 146 | "version": "3.0.3", 147 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 148 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 149 | "dev": true, 150 | "dependencies": { 151 | "fill-range": "^7.1.1" 152 | }, 153 | "engines": { 154 | "node": ">=8" 155 | } 156 | }, 157 | "node_modules/browser-stdout": { 158 | "version": "1.3.1", 159 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 160 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 161 | "dev": true 162 | }, 163 | "node_modules/builtin-modules": { 164 | "version": "1.1.1", 165 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 166 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", 167 | "dev": true, 168 | "engines": { 169 | "node": ">=0.10.0" 170 | } 171 | }, 172 | "node_modules/camelcase": { 173 | "version": "6.2.0", 174 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 175 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 176 | "dev": true, 177 | "engines": { 178 | "node": ">=10" 179 | }, 180 | "funding": { 181 | "url": "https://github.com/sponsors/sindresorhus" 182 | } 183 | }, 184 | "node_modules/chalk": { 185 | "version": "2.4.2", 186 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 187 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 188 | "dev": true, 189 | "dependencies": { 190 | "ansi-styles": "^3.2.1", 191 | "escape-string-regexp": "^1.0.5", 192 | "supports-color": "^5.3.0" 193 | }, 194 | "engines": { 195 | "node": ">=4" 196 | } 197 | }, 198 | "node_modules/chalk/node_modules/ansi-styles": { 199 | "version": "3.2.1", 200 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 201 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 202 | "dev": true, 203 | "dependencies": { 204 | "color-convert": "^1.9.0" 205 | }, 206 | "engines": { 207 | "node": ">=4" 208 | } 209 | }, 210 | "node_modules/chalk/node_modules/has-flag": { 211 | "version": "3.0.0", 212 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 213 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 214 | "dev": true, 215 | "engines": { 216 | "node": ">=4" 217 | } 218 | }, 219 | "node_modules/chalk/node_modules/supports-color": { 220 | "version": "5.5.0", 221 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 222 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 223 | "dev": true, 224 | "dependencies": { 225 | "has-flag": "^3.0.0" 226 | }, 227 | "engines": { 228 | "node": ">=4" 229 | } 230 | }, 231 | "node_modules/chokidar": { 232 | "version": "3.5.3", 233 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 234 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 235 | "dev": true, 236 | "funding": [ 237 | { 238 | "type": "individual", 239 | "url": "https://paulmillr.com/funding/" 240 | } 241 | ], 242 | "dependencies": { 243 | "anymatch": "~3.1.2", 244 | "braces": "~3.0.2", 245 | "glob-parent": "~5.1.2", 246 | "is-binary-path": "~2.1.0", 247 | "is-glob": "~4.0.1", 248 | "normalize-path": "~3.0.0", 249 | "readdirp": "~3.6.0" 250 | }, 251 | "engines": { 252 | "node": ">= 8.10.0" 253 | }, 254 | "optionalDependencies": { 255 | "fsevents": "~2.3.2" 256 | } 257 | }, 258 | "node_modules/cliui": { 259 | "version": "7.0.4", 260 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 261 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 262 | "dev": true, 263 | "dependencies": { 264 | "string-width": "^4.2.0", 265 | "strip-ansi": "^6.0.0", 266 | "wrap-ansi": "^7.0.0" 267 | } 268 | }, 269 | "node_modules/cliui/node_modules/ansi-regex": { 270 | "version": "5.0.1", 271 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 272 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 273 | "dev": true, 274 | "engines": { 275 | "node": ">=8" 276 | } 277 | }, 278 | "node_modules/cliui/node_modules/is-fullwidth-code-point": { 279 | "version": "3.0.0", 280 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 281 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 282 | "dev": true, 283 | "engines": { 284 | "node": ">=8" 285 | } 286 | }, 287 | "node_modules/cliui/node_modules/string-width": { 288 | "version": "4.2.2", 289 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 290 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 291 | "dev": true, 292 | "dependencies": { 293 | "emoji-regex": "^8.0.0", 294 | "is-fullwidth-code-point": "^3.0.0", 295 | "strip-ansi": "^6.0.0" 296 | }, 297 | "engines": { 298 | "node": ">=8" 299 | } 300 | }, 301 | "node_modules/cliui/node_modules/strip-ansi": { 302 | "version": "6.0.0", 303 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 304 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 305 | "dev": true, 306 | "dependencies": { 307 | "ansi-regex": "^5.0.0" 308 | }, 309 | "engines": { 310 | "node": ">=8" 311 | } 312 | }, 313 | "node_modules/color-convert": { 314 | "version": "1.9.3", 315 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 316 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 317 | "dev": true, 318 | "dependencies": { 319 | "color-name": "1.1.3" 320 | } 321 | }, 322 | "node_modules/color-name": { 323 | "version": "1.1.3", 324 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 325 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 326 | "dev": true 327 | }, 328 | "node_modules/concat-map": { 329 | "version": "0.0.1", 330 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 331 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 332 | "dev": true 333 | }, 334 | "node_modules/debug": { 335 | "version": "4.4.0", 336 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 337 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 338 | "dev": true, 339 | "license": "MIT", 340 | "dependencies": { 341 | "ms": "^2.1.3" 342 | }, 343 | "engines": { 344 | "node": ">=6.0" 345 | }, 346 | "peerDependenciesMeta": { 347 | "supports-color": { 348 | "optional": true 349 | } 350 | } 351 | }, 352 | "node_modules/decamelize": { 353 | "version": "4.0.0", 354 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 355 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 356 | "dev": true, 357 | "engines": { 358 | "node": ">=10" 359 | }, 360 | "funding": { 361 | "url": "https://github.com/sponsors/sindresorhus" 362 | } 363 | }, 364 | "node_modules/diff": { 365 | "version": "3.5.0", 366 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 367 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 368 | "dev": true, 369 | "engines": { 370 | "node": ">=0.3.1" 371 | } 372 | }, 373 | "node_modules/emoji-regex": { 374 | "version": "8.0.0", 375 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 376 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 377 | "dev": true 378 | }, 379 | "node_modules/escalade": { 380 | "version": "3.1.1", 381 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 382 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 383 | "dev": true, 384 | "engines": { 385 | "node": ">=6" 386 | } 387 | }, 388 | "node_modules/escape-string-regexp": { 389 | "version": "1.0.5", 390 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 391 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 392 | "dev": true, 393 | "engines": { 394 | "node": ">=0.8.0" 395 | } 396 | }, 397 | "node_modules/esprima": { 398 | "version": "4.0.1", 399 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 400 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 401 | "dev": true, 402 | "bin": { 403 | "esparse": "bin/esparse.js", 404 | "esvalidate": "bin/esvalidate.js" 405 | }, 406 | "engines": { 407 | "node": ">=4" 408 | } 409 | }, 410 | "node_modules/esutils": { 411 | "version": "2.0.3", 412 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 413 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 414 | "dev": true, 415 | "engines": { 416 | "node": ">=0.10.0" 417 | } 418 | }, 419 | "node_modules/fill-range": { 420 | "version": "7.1.1", 421 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 422 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 423 | "dev": true, 424 | "dependencies": { 425 | "to-regex-range": "^5.0.1" 426 | }, 427 | "engines": { 428 | "node": ">=8" 429 | } 430 | }, 431 | "node_modules/find-up": { 432 | "version": "5.0.0", 433 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 434 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 435 | "dev": true, 436 | "dependencies": { 437 | "locate-path": "^6.0.0", 438 | "path-exists": "^4.0.0" 439 | }, 440 | "engines": { 441 | "node": ">=10" 442 | }, 443 | "funding": { 444 | "url": "https://github.com/sponsors/sindresorhus" 445 | } 446 | }, 447 | "node_modules/flat": { 448 | "version": "5.0.2", 449 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 450 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 451 | "dev": true, 452 | "bin": { 453 | "flat": "cli.js" 454 | } 455 | }, 456 | "node_modules/fs.realpath": { 457 | "version": "1.0.0", 458 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 459 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 460 | "dev": true 461 | }, 462 | "node_modules/fsevents": { 463 | "version": "2.3.2", 464 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 465 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 466 | "dev": true, 467 | "hasInstallScript": true, 468 | "optional": true, 469 | "os": [ 470 | "darwin" 471 | ], 472 | "engines": { 473 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 474 | } 475 | }, 476 | "node_modules/function-bind": { 477 | "version": "1.1.1", 478 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 479 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 480 | "dev": true 481 | }, 482 | "node_modules/get-caller-file": { 483 | "version": "2.0.5", 484 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 485 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 486 | "dev": true, 487 | "engines": { 488 | "node": "6.* || 8.* || >= 10.*" 489 | } 490 | }, 491 | "node_modules/glob": { 492 | "version": "7.2.0", 493 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 494 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 495 | "dev": true, 496 | "dependencies": { 497 | "fs.realpath": "^1.0.0", 498 | "inflight": "^1.0.4", 499 | "inherits": "2", 500 | "minimatch": "^3.0.4", 501 | "once": "^1.3.0", 502 | "path-is-absolute": "^1.0.0" 503 | }, 504 | "engines": { 505 | "node": "*" 506 | }, 507 | "funding": { 508 | "url": "https://github.com/sponsors/isaacs" 509 | } 510 | }, 511 | "node_modules/glob-parent": { 512 | "version": "5.1.2", 513 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 514 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 515 | "dev": true, 516 | "dependencies": { 517 | "is-glob": "^4.0.1" 518 | }, 519 | "engines": { 520 | "node": ">= 6" 521 | } 522 | }, 523 | "node_modules/has": { 524 | "version": "1.0.3", 525 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 526 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 527 | "dev": true, 528 | "dependencies": { 529 | "function-bind": "^1.1.1" 530 | }, 531 | "engines": { 532 | "node": ">= 0.4.0" 533 | } 534 | }, 535 | "node_modules/has-ansi": { 536 | "version": "2.0.0", 537 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 538 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 539 | "dev": true, 540 | "dependencies": { 541 | "ansi-regex": "^2.0.0" 542 | }, 543 | "engines": { 544 | "node": ">=0.10.0" 545 | } 546 | }, 547 | "node_modules/has-flag": { 548 | "version": "4.0.0", 549 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 550 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 551 | "dev": true, 552 | "engines": { 553 | "node": ">=8" 554 | } 555 | }, 556 | "node_modules/he": { 557 | "version": "1.2.0", 558 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 559 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 560 | "dev": true, 561 | "bin": { 562 | "he": "bin/he" 563 | } 564 | }, 565 | "node_modules/inflight": { 566 | "version": "1.0.6", 567 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 568 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 569 | "dev": true, 570 | "dependencies": { 571 | "once": "^1.3.0", 572 | "wrappy": "1" 573 | } 574 | }, 575 | "node_modules/inherits": { 576 | "version": "2.0.4", 577 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 578 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 579 | "dev": true 580 | }, 581 | "node_modules/is-binary-path": { 582 | "version": "2.1.0", 583 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 584 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 585 | "dev": true, 586 | "dependencies": { 587 | "binary-extensions": "^2.0.0" 588 | }, 589 | "engines": { 590 | "node": ">=8" 591 | } 592 | }, 593 | "node_modules/is-core-module": { 594 | "version": "2.2.0", 595 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", 596 | "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", 597 | "dev": true, 598 | "dependencies": { 599 | "has": "^1.0.3" 600 | }, 601 | "funding": { 602 | "url": "https://github.com/sponsors/ljharb" 603 | } 604 | }, 605 | "node_modules/is-extglob": { 606 | "version": "2.1.1", 607 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 608 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 609 | "dev": true, 610 | "engines": { 611 | "node": ">=0.10.0" 612 | } 613 | }, 614 | "node_modules/is-glob": { 615 | "version": "4.0.3", 616 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 617 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 618 | "dev": true, 619 | "dependencies": { 620 | "is-extglob": "^2.1.1" 621 | }, 622 | "engines": { 623 | "node": ">=0.10.0" 624 | } 625 | }, 626 | "node_modules/is-number": { 627 | "version": "7.0.0", 628 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 629 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 630 | "dev": true, 631 | "engines": { 632 | "node": ">=0.12.0" 633 | } 634 | }, 635 | "node_modules/is-plain-obj": { 636 | "version": "2.1.0", 637 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 638 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 639 | "dev": true, 640 | "engines": { 641 | "node": ">=8" 642 | } 643 | }, 644 | "node_modules/is-unicode-supported": { 645 | "version": "0.1.0", 646 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 647 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 648 | "dev": true, 649 | "engines": { 650 | "node": ">=10" 651 | }, 652 | "funding": { 653 | "url": "https://github.com/sponsors/sindresorhus" 654 | } 655 | }, 656 | "node_modules/js-tokens": { 657 | "version": "3.0.2", 658 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", 659 | "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", 660 | "dev": true 661 | }, 662 | "node_modules/js-yaml": { 663 | "version": "3.14.1", 664 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 665 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 666 | "dev": true, 667 | "dependencies": { 668 | "argparse": "^1.0.7", 669 | "esprima": "^4.0.0" 670 | }, 671 | "bin": { 672 | "js-yaml": "bin/js-yaml.js" 673 | } 674 | }, 675 | "node_modules/locate-path": { 676 | "version": "6.0.0", 677 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 678 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 679 | "dev": true, 680 | "dependencies": { 681 | "p-locate": "^5.0.0" 682 | }, 683 | "engines": { 684 | "node": ">=10" 685 | }, 686 | "funding": { 687 | "url": "https://github.com/sponsors/sindresorhus" 688 | } 689 | }, 690 | "node_modules/log-symbols": { 691 | "version": "4.1.0", 692 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 693 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 694 | "dev": true, 695 | "dependencies": { 696 | "chalk": "^4.1.0", 697 | "is-unicode-supported": "^0.1.0" 698 | }, 699 | "engines": { 700 | "node": ">=10" 701 | }, 702 | "funding": { 703 | "url": "https://github.com/sponsors/sindresorhus" 704 | } 705 | }, 706 | "node_modules/log-symbols/node_modules/ansi-styles": { 707 | "version": "4.3.0", 708 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 709 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 710 | "dev": true, 711 | "dependencies": { 712 | "color-convert": "^2.0.1" 713 | }, 714 | "engines": { 715 | "node": ">=8" 716 | }, 717 | "funding": { 718 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 719 | } 720 | }, 721 | "node_modules/log-symbols/node_modules/chalk": { 722 | "version": "4.1.2", 723 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 724 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 725 | "dev": true, 726 | "dependencies": { 727 | "ansi-styles": "^4.1.0", 728 | "supports-color": "^7.1.0" 729 | }, 730 | "engines": { 731 | "node": ">=10" 732 | }, 733 | "funding": { 734 | "url": "https://github.com/chalk/chalk?sponsor=1" 735 | } 736 | }, 737 | "node_modules/log-symbols/node_modules/color-convert": { 738 | "version": "2.0.1", 739 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 740 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 741 | "dev": true, 742 | "dependencies": { 743 | "color-name": "~1.1.4" 744 | }, 745 | "engines": { 746 | "node": ">=7.0.0" 747 | } 748 | }, 749 | "node_modules/log-symbols/node_modules/color-name": { 750 | "version": "1.1.4", 751 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 752 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 753 | "dev": true 754 | }, 755 | "node_modules/log-symbols/node_modules/supports-color": { 756 | "version": "7.2.0", 757 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 758 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 759 | "dev": true, 760 | "dependencies": { 761 | "has-flag": "^4.0.0" 762 | }, 763 | "engines": { 764 | "node": ">=8" 765 | } 766 | }, 767 | "node_modules/minimatch": { 768 | "version": "3.1.2", 769 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 770 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 771 | "dev": true, 772 | "dependencies": { 773 | "brace-expansion": "^1.1.7" 774 | }, 775 | "engines": { 776 | "node": "*" 777 | } 778 | }, 779 | "node_modules/mocha": { 780 | "version": "10.8.2", 781 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", 782 | "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", 783 | "dev": true, 784 | "license": "MIT", 785 | "dependencies": { 786 | "ansi-colors": "^4.1.3", 787 | "browser-stdout": "^1.3.1", 788 | "chokidar": "^3.5.3", 789 | "debug": "^4.3.5", 790 | "diff": "^5.2.0", 791 | "escape-string-regexp": "^4.0.0", 792 | "find-up": "^5.0.0", 793 | "glob": "^8.1.0", 794 | "he": "^1.2.0", 795 | "js-yaml": "^4.1.0", 796 | "log-symbols": "^4.1.0", 797 | "minimatch": "^5.1.6", 798 | "ms": "^2.1.3", 799 | "serialize-javascript": "^6.0.2", 800 | "strip-json-comments": "^3.1.1", 801 | "supports-color": "^8.1.1", 802 | "workerpool": "^6.5.1", 803 | "yargs": "^16.2.0", 804 | "yargs-parser": "^20.2.9", 805 | "yargs-unparser": "^2.0.0" 806 | }, 807 | "bin": { 808 | "_mocha": "bin/_mocha", 809 | "mocha": "bin/mocha.js" 810 | }, 811 | "engines": { 812 | "node": ">= 14.0.0" 813 | } 814 | }, 815 | "node_modules/mocha/node_modules/argparse": { 816 | "version": "2.0.1", 817 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 818 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 819 | "dev": true 820 | }, 821 | "node_modules/mocha/node_modules/brace-expansion": { 822 | "version": "2.0.1", 823 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 824 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 825 | "dev": true, 826 | "license": "MIT", 827 | "dependencies": { 828 | "balanced-match": "^1.0.0" 829 | } 830 | }, 831 | "node_modules/mocha/node_modules/diff": { 832 | "version": "5.2.0", 833 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 834 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 835 | "dev": true, 836 | "license": "BSD-3-Clause", 837 | "engines": { 838 | "node": ">=0.3.1" 839 | } 840 | }, 841 | "node_modules/mocha/node_modules/escape-string-regexp": { 842 | "version": "4.0.0", 843 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 844 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 845 | "dev": true, 846 | "engines": { 847 | "node": ">=10" 848 | }, 849 | "funding": { 850 | "url": "https://github.com/sponsors/sindresorhus" 851 | } 852 | }, 853 | "node_modules/mocha/node_modules/glob": { 854 | "version": "8.1.0", 855 | "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", 856 | "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", 857 | "deprecated": "Glob versions prior to v9 are no longer supported", 858 | "dev": true, 859 | "license": "ISC", 860 | "dependencies": { 861 | "fs.realpath": "^1.0.0", 862 | "inflight": "^1.0.4", 863 | "inherits": "2", 864 | "minimatch": "^5.0.1", 865 | "once": "^1.3.0" 866 | }, 867 | "engines": { 868 | "node": ">=12" 869 | }, 870 | "funding": { 871 | "url": "https://github.com/sponsors/isaacs" 872 | } 873 | }, 874 | "node_modules/mocha/node_modules/js-yaml": { 875 | "version": "4.1.0", 876 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 877 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 878 | "dev": true, 879 | "dependencies": { 880 | "argparse": "^2.0.1" 881 | }, 882 | "bin": { 883 | "js-yaml": "bin/js-yaml.js" 884 | } 885 | }, 886 | "node_modules/mocha/node_modules/minimatch": { 887 | "version": "5.1.6", 888 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 889 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 890 | "dev": true, 891 | "license": "ISC", 892 | "dependencies": { 893 | "brace-expansion": "^2.0.1" 894 | }, 895 | "engines": { 896 | "node": ">=10" 897 | } 898 | }, 899 | "node_modules/ms": { 900 | "version": "2.1.3", 901 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 902 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 903 | "dev": true 904 | }, 905 | "node_modules/node-addon-api": { 906 | "version": "7.1.0", 907 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", 908 | "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", 909 | "engines": { 910 | "node": "^16 || ^18 || >= 20" 911 | } 912 | }, 913 | "node_modules/normalize-path": { 914 | "version": "3.0.0", 915 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 916 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 917 | "dev": true, 918 | "engines": { 919 | "node": ">=0.10.0" 920 | } 921 | }, 922 | "node_modules/once": { 923 | "version": "1.4.0", 924 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 925 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 926 | "dev": true, 927 | "dependencies": { 928 | "wrappy": "1" 929 | } 930 | }, 931 | "node_modules/p-limit": { 932 | "version": "3.1.0", 933 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 934 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 935 | "dev": true, 936 | "dependencies": { 937 | "yocto-queue": "^0.1.0" 938 | }, 939 | "engines": { 940 | "node": ">=10" 941 | }, 942 | "funding": { 943 | "url": "https://github.com/sponsors/sindresorhus" 944 | } 945 | }, 946 | "node_modules/p-locate": { 947 | "version": "5.0.0", 948 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 949 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 950 | "dev": true, 951 | "dependencies": { 952 | "p-limit": "^3.0.2" 953 | }, 954 | "engines": { 955 | "node": ">=10" 956 | }, 957 | "funding": { 958 | "url": "https://github.com/sponsors/sindresorhus" 959 | } 960 | }, 961 | "node_modules/path-exists": { 962 | "version": "4.0.0", 963 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 964 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 965 | "dev": true, 966 | "engines": { 967 | "node": ">=8" 968 | } 969 | }, 970 | "node_modules/path-is-absolute": { 971 | "version": "1.0.1", 972 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 973 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 974 | "dev": true, 975 | "engines": { 976 | "node": ">=0.10.0" 977 | } 978 | }, 979 | "node_modules/path-parse": { 980 | "version": "1.0.7", 981 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 982 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 983 | "dev": true 984 | }, 985 | "node_modules/picomatch": { 986 | "version": "2.3.1", 987 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 988 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 989 | "dev": true, 990 | "engines": { 991 | "node": ">=8.6" 992 | }, 993 | "funding": { 994 | "url": "https://github.com/sponsors/jonschlinkert" 995 | } 996 | }, 997 | "node_modules/randombytes": { 998 | "version": "2.1.0", 999 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1000 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1001 | "dev": true, 1002 | "license": "MIT", 1003 | "dependencies": { 1004 | "safe-buffer": "^5.1.0" 1005 | } 1006 | }, 1007 | "node_modules/readdirp": { 1008 | "version": "3.6.0", 1009 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1010 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1011 | "dev": true, 1012 | "dependencies": { 1013 | "picomatch": "^2.2.1" 1014 | }, 1015 | "engines": { 1016 | "node": ">=8.10.0" 1017 | } 1018 | }, 1019 | "node_modules/require-directory": { 1020 | "version": "2.1.1", 1021 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1022 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1023 | "dev": true, 1024 | "engines": { 1025 | "node": ">=0.10.0" 1026 | } 1027 | }, 1028 | "node_modules/resolve": { 1029 | "version": "1.20.0", 1030 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 1031 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 1032 | "dev": true, 1033 | "dependencies": { 1034 | "is-core-module": "^2.2.0", 1035 | "path-parse": "^1.0.6" 1036 | }, 1037 | "funding": { 1038 | "url": "https://github.com/sponsors/ljharb" 1039 | } 1040 | }, 1041 | "node_modules/safe-buffer": { 1042 | "version": "5.2.1", 1043 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1044 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1045 | "dev": true, 1046 | "funding": [ 1047 | { 1048 | "type": "github", 1049 | "url": "https://github.com/sponsors/feross" 1050 | }, 1051 | { 1052 | "type": "patreon", 1053 | "url": "https://www.patreon.com/feross" 1054 | }, 1055 | { 1056 | "type": "consulting", 1057 | "url": "https://feross.org/support" 1058 | } 1059 | ], 1060 | "license": "MIT" 1061 | }, 1062 | "node_modules/semver": { 1063 | "version": "5.7.1", 1064 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1065 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1066 | "dev": true, 1067 | "bin": { 1068 | "semver": "bin/semver" 1069 | } 1070 | }, 1071 | "node_modules/serialize-javascript": { 1072 | "version": "6.0.2", 1073 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 1074 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 1075 | "dev": true, 1076 | "license": "BSD-3-Clause", 1077 | "dependencies": { 1078 | "randombytes": "^2.1.0" 1079 | } 1080 | }, 1081 | "node_modules/sprintf-js": { 1082 | "version": "1.0.3", 1083 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1084 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1085 | "dev": true 1086 | }, 1087 | "node_modules/strip-ansi": { 1088 | "version": "3.0.1", 1089 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1090 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1091 | "dev": true, 1092 | "dependencies": { 1093 | "ansi-regex": "^2.0.0" 1094 | }, 1095 | "engines": { 1096 | "node": ">=0.10.0" 1097 | } 1098 | }, 1099 | "node_modules/strip-json-comments": { 1100 | "version": "3.1.1", 1101 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1102 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1103 | "dev": true, 1104 | "engines": { 1105 | "node": ">=8" 1106 | }, 1107 | "funding": { 1108 | "url": "https://github.com/sponsors/sindresorhus" 1109 | } 1110 | }, 1111 | "node_modules/supports-color": { 1112 | "version": "8.1.1", 1113 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1114 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1115 | "dev": true, 1116 | "dependencies": { 1117 | "has-flag": "^4.0.0" 1118 | }, 1119 | "engines": { 1120 | "node": ">=10" 1121 | }, 1122 | "funding": { 1123 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1124 | } 1125 | }, 1126 | "node_modules/to-regex-range": { 1127 | "version": "5.0.1", 1128 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1129 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1130 | "dev": true, 1131 | "dependencies": { 1132 | "is-number": "^7.0.0" 1133 | }, 1134 | "engines": { 1135 | "node": ">=8.0" 1136 | } 1137 | }, 1138 | "node_modules/tslib": { 1139 | "version": "1.14.1", 1140 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1141 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 1142 | "dev": true 1143 | }, 1144 | "node_modules/tslint": { 1145 | "version": "5.9.1", 1146 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", 1147 | "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", 1148 | "dev": true, 1149 | "dependencies": { 1150 | "babel-code-frame": "^6.22.0", 1151 | "builtin-modules": "^1.1.1", 1152 | "chalk": "^2.3.0", 1153 | "commander": "^2.12.1", 1154 | "diff": "^3.2.0", 1155 | "glob": "^7.1.1", 1156 | "js-yaml": "^3.7.0", 1157 | "minimatch": "^3.0.4", 1158 | "resolve": "^1.3.2", 1159 | "semver": "^5.3.0", 1160 | "tslib": "^1.8.0", 1161 | "tsutils": "^2.12.1" 1162 | }, 1163 | "bin": { 1164 | "tslint": "bin/tslint" 1165 | }, 1166 | "engines": { 1167 | "node": ">=4.8.0" 1168 | }, 1169 | "peerDependencies": { 1170 | "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev" 1171 | } 1172 | }, 1173 | "node_modules/tslint/node_modules/commander": { 1174 | "version": "2.20.3", 1175 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 1176 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 1177 | "dev": true 1178 | }, 1179 | "node_modules/tsutils": { 1180 | "version": "2.29.0", 1181 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 1182 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", 1183 | "dev": true, 1184 | "dependencies": { 1185 | "tslib": "^1.8.1" 1186 | }, 1187 | "peerDependencies": { 1188 | "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" 1189 | } 1190 | }, 1191 | "node_modules/typescript": { 1192 | "version": "4.2.3", 1193 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", 1194 | "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", 1195 | "dev": true, 1196 | "bin": { 1197 | "tsc": "bin/tsc", 1198 | "tsserver": "bin/tsserver" 1199 | }, 1200 | "engines": { 1201 | "node": ">=4.2.0" 1202 | } 1203 | }, 1204 | "node_modules/workerpool": { 1205 | "version": "6.5.1", 1206 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 1207 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 1208 | "dev": true, 1209 | "license": "Apache-2.0" 1210 | }, 1211 | "node_modules/wrap-ansi": { 1212 | "version": "7.0.0", 1213 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1214 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1215 | "dev": true, 1216 | "dependencies": { 1217 | "ansi-styles": "^4.0.0", 1218 | "string-width": "^4.1.0", 1219 | "strip-ansi": "^6.0.0" 1220 | }, 1221 | "engines": { 1222 | "node": ">=10" 1223 | }, 1224 | "funding": { 1225 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1226 | } 1227 | }, 1228 | "node_modules/wrap-ansi/node_modules/ansi-regex": { 1229 | "version": "5.0.1", 1230 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1231 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1232 | "dev": true, 1233 | "engines": { 1234 | "node": ">=8" 1235 | } 1236 | }, 1237 | "node_modules/wrap-ansi/node_modules/ansi-styles": { 1238 | "version": "4.3.0", 1239 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1240 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1241 | "dev": true, 1242 | "dependencies": { 1243 | "color-convert": "^2.0.1" 1244 | }, 1245 | "engines": { 1246 | "node": ">=8" 1247 | }, 1248 | "funding": { 1249 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1250 | } 1251 | }, 1252 | "node_modules/wrap-ansi/node_modules/color-convert": { 1253 | "version": "2.0.1", 1254 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1255 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1256 | "dev": true, 1257 | "dependencies": { 1258 | "color-name": "~1.1.4" 1259 | }, 1260 | "engines": { 1261 | "node": ">=7.0.0" 1262 | } 1263 | }, 1264 | "node_modules/wrap-ansi/node_modules/color-name": { 1265 | "version": "1.1.4", 1266 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1267 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1268 | "dev": true 1269 | }, 1270 | "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { 1271 | "version": "3.0.0", 1272 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1273 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1274 | "dev": true, 1275 | "engines": { 1276 | "node": ">=8" 1277 | } 1278 | }, 1279 | "node_modules/wrap-ansi/node_modules/string-width": { 1280 | "version": "4.2.2", 1281 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1282 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1283 | "dev": true, 1284 | "dependencies": { 1285 | "emoji-regex": "^8.0.0", 1286 | "is-fullwidth-code-point": "^3.0.0", 1287 | "strip-ansi": "^6.0.0" 1288 | }, 1289 | "engines": { 1290 | "node": ">=8" 1291 | } 1292 | }, 1293 | "node_modules/wrap-ansi/node_modules/strip-ansi": { 1294 | "version": "6.0.0", 1295 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1296 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1297 | "dev": true, 1298 | "dependencies": { 1299 | "ansi-regex": "^5.0.0" 1300 | }, 1301 | "engines": { 1302 | "node": ">=8" 1303 | } 1304 | }, 1305 | "node_modules/wrappy": { 1306 | "version": "1.0.2", 1307 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1308 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1309 | "dev": true 1310 | }, 1311 | "node_modules/y18n": { 1312 | "version": "5.0.6", 1313 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.6.tgz", 1314 | "integrity": "sha512-PlVX4Y0lDTN6E2V4ES2tEdyvXkeKzxa8c/vo0pxPr/TqbztddTP0yn7zZylIyiAuxerqj0Q5GhpJ1YJCP8LaZQ==", 1315 | "dev": true, 1316 | "engines": { 1317 | "node": ">=10" 1318 | } 1319 | }, 1320 | "node_modules/yargs": { 1321 | "version": "16.2.0", 1322 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1323 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1324 | "dev": true, 1325 | "dependencies": { 1326 | "cliui": "^7.0.2", 1327 | "escalade": "^3.1.1", 1328 | "get-caller-file": "^2.0.5", 1329 | "require-directory": "^2.1.1", 1330 | "string-width": "^4.2.0", 1331 | "y18n": "^5.0.5", 1332 | "yargs-parser": "^20.2.2" 1333 | }, 1334 | "engines": { 1335 | "node": ">=10" 1336 | } 1337 | }, 1338 | "node_modules/yargs-parser": { 1339 | "version": "20.2.9", 1340 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 1341 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 1342 | "dev": true, 1343 | "license": "ISC", 1344 | "engines": { 1345 | "node": ">=10" 1346 | } 1347 | }, 1348 | "node_modules/yargs-unparser": { 1349 | "version": "2.0.0", 1350 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1351 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1352 | "dev": true, 1353 | "dependencies": { 1354 | "camelcase": "^6.0.0", 1355 | "decamelize": "^4.0.0", 1356 | "flat": "^5.0.2", 1357 | "is-plain-obj": "^2.1.0" 1358 | }, 1359 | "engines": { 1360 | "node": ">=10" 1361 | } 1362 | }, 1363 | "node_modules/yargs/node_modules/ansi-regex": { 1364 | "version": "5.0.1", 1365 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1366 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1367 | "dev": true, 1368 | "engines": { 1369 | "node": ">=8" 1370 | } 1371 | }, 1372 | "node_modules/yargs/node_modules/is-fullwidth-code-point": { 1373 | "version": "3.0.0", 1374 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1375 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1376 | "dev": true, 1377 | "engines": { 1378 | "node": ">=8" 1379 | } 1380 | }, 1381 | "node_modules/yargs/node_modules/string-width": { 1382 | "version": "4.2.2", 1383 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1384 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1385 | "dev": true, 1386 | "dependencies": { 1387 | "emoji-regex": "^8.0.0", 1388 | "is-fullwidth-code-point": "^3.0.0", 1389 | "strip-ansi": "^6.0.0" 1390 | }, 1391 | "engines": { 1392 | "node": ">=8" 1393 | } 1394 | }, 1395 | "node_modules/yargs/node_modules/strip-ansi": { 1396 | "version": "6.0.0", 1397 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1398 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1399 | "dev": true, 1400 | "dependencies": { 1401 | "ansi-regex": "^5.0.0" 1402 | }, 1403 | "engines": { 1404 | "node": ">=8" 1405 | } 1406 | }, 1407 | "node_modules/yocto-queue": { 1408 | "version": "0.1.0", 1409 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1410 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1411 | "dev": true, 1412 | "engines": { 1413 | "node": ">=10" 1414 | }, 1415 | "funding": { 1416 | "url": "https://github.com/sponsors/sindresorhus" 1417 | } 1418 | } 1419 | }, 1420 | "dependencies": { 1421 | "@types/mocha": { 1422 | "version": "10.0.0", 1423 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.0.tgz", 1424 | "integrity": "sha512-rADY+HtTOA52l9VZWtgQfn4p+UDVM2eDVkMZT1I6syp0YKxW2F9v+0pbRZLsvskhQv/vMb6ZfCay81GHbz5SHg==", 1425 | "dev": true 1426 | }, 1427 | "@types/node": { 1428 | "version": "14.14.37", 1429 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", 1430 | "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", 1431 | "dev": true 1432 | }, 1433 | "ansi-colors": { 1434 | "version": "4.1.3", 1435 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 1436 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 1437 | "dev": true 1438 | }, 1439 | "ansi-regex": { 1440 | "version": "2.1.1", 1441 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 1442 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 1443 | "dev": true 1444 | }, 1445 | "ansi-styles": { 1446 | "version": "2.2.1", 1447 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 1448 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", 1449 | "dev": true 1450 | }, 1451 | "anymatch": { 1452 | "version": "3.1.2", 1453 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 1454 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 1455 | "dev": true, 1456 | "requires": { 1457 | "normalize-path": "^3.0.0", 1458 | "picomatch": "^2.0.4" 1459 | } 1460 | }, 1461 | "argparse": { 1462 | "version": "1.0.10", 1463 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 1464 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 1465 | "dev": true, 1466 | "requires": { 1467 | "sprintf-js": "~1.0.2" 1468 | } 1469 | }, 1470 | "babel-code-frame": { 1471 | "version": "6.26.0", 1472 | "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", 1473 | "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", 1474 | "dev": true, 1475 | "requires": { 1476 | "chalk": "^1.1.3", 1477 | "esutils": "^2.0.2", 1478 | "js-tokens": "^3.0.2" 1479 | }, 1480 | "dependencies": { 1481 | "chalk": { 1482 | "version": "1.1.3", 1483 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 1484 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 1485 | "dev": true, 1486 | "requires": { 1487 | "ansi-styles": "^2.2.1", 1488 | "escape-string-regexp": "^1.0.2", 1489 | "has-ansi": "^2.0.0", 1490 | "strip-ansi": "^3.0.0", 1491 | "supports-color": "^2.0.0" 1492 | } 1493 | }, 1494 | "supports-color": { 1495 | "version": "2.0.0", 1496 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 1497 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", 1498 | "dev": true 1499 | } 1500 | } 1501 | }, 1502 | "balanced-match": { 1503 | "version": "1.0.2", 1504 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1505 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1506 | "dev": true 1507 | }, 1508 | "binary-extensions": { 1509 | "version": "2.2.0", 1510 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 1511 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 1512 | "dev": true 1513 | }, 1514 | "brace-expansion": { 1515 | "version": "1.1.11", 1516 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1517 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1518 | "dev": true, 1519 | "requires": { 1520 | "balanced-match": "^1.0.0", 1521 | "concat-map": "0.0.1" 1522 | } 1523 | }, 1524 | "braces": { 1525 | "version": "3.0.3", 1526 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 1527 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 1528 | "dev": true, 1529 | "requires": { 1530 | "fill-range": "^7.1.1" 1531 | } 1532 | }, 1533 | "browser-stdout": { 1534 | "version": "1.3.1", 1535 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 1536 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 1537 | "dev": true 1538 | }, 1539 | "builtin-modules": { 1540 | "version": "1.1.1", 1541 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 1542 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", 1543 | "dev": true 1544 | }, 1545 | "camelcase": { 1546 | "version": "6.2.0", 1547 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 1548 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 1549 | "dev": true 1550 | }, 1551 | "chalk": { 1552 | "version": "2.4.2", 1553 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 1554 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 1555 | "dev": true, 1556 | "requires": { 1557 | "ansi-styles": "^3.2.1", 1558 | "escape-string-regexp": "^1.0.5", 1559 | "supports-color": "^5.3.0" 1560 | }, 1561 | "dependencies": { 1562 | "ansi-styles": { 1563 | "version": "3.2.1", 1564 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 1565 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 1566 | "dev": true, 1567 | "requires": { 1568 | "color-convert": "^1.9.0" 1569 | } 1570 | }, 1571 | "has-flag": { 1572 | "version": "3.0.0", 1573 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1574 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1575 | "dev": true 1576 | }, 1577 | "supports-color": { 1578 | "version": "5.5.0", 1579 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1580 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1581 | "dev": true, 1582 | "requires": { 1583 | "has-flag": "^3.0.0" 1584 | } 1585 | } 1586 | } 1587 | }, 1588 | "chokidar": { 1589 | "version": "3.5.3", 1590 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 1591 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 1592 | "dev": true, 1593 | "requires": { 1594 | "anymatch": "~3.1.2", 1595 | "braces": "~3.0.2", 1596 | "fsevents": "~2.3.2", 1597 | "glob-parent": "~5.1.2", 1598 | "is-binary-path": "~2.1.0", 1599 | "is-glob": "~4.0.1", 1600 | "normalize-path": "~3.0.0", 1601 | "readdirp": "~3.6.0" 1602 | } 1603 | }, 1604 | "cliui": { 1605 | "version": "7.0.4", 1606 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 1607 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 1608 | "dev": true, 1609 | "requires": { 1610 | "string-width": "^4.2.0", 1611 | "strip-ansi": "^6.0.0", 1612 | "wrap-ansi": "^7.0.0" 1613 | }, 1614 | "dependencies": { 1615 | "ansi-regex": { 1616 | "version": "5.0.1", 1617 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1618 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1619 | "dev": true 1620 | }, 1621 | "is-fullwidth-code-point": { 1622 | "version": "3.0.0", 1623 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1624 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1625 | "dev": true 1626 | }, 1627 | "string-width": { 1628 | "version": "4.2.2", 1629 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1630 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1631 | "dev": true, 1632 | "requires": { 1633 | "emoji-regex": "^8.0.0", 1634 | "is-fullwidth-code-point": "^3.0.0", 1635 | "strip-ansi": "^6.0.0" 1636 | } 1637 | }, 1638 | "strip-ansi": { 1639 | "version": "6.0.0", 1640 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1641 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1642 | "dev": true, 1643 | "requires": { 1644 | "ansi-regex": "^5.0.0" 1645 | } 1646 | } 1647 | } 1648 | }, 1649 | "color-convert": { 1650 | "version": "1.9.3", 1651 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 1652 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 1653 | "dev": true, 1654 | "requires": { 1655 | "color-name": "1.1.3" 1656 | } 1657 | }, 1658 | "color-name": { 1659 | "version": "1.1.3", 1660 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 1661 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 1662 | "dev": true 1663 | }, 1664 | "concat-map": { 1665 | "version": "0.0.1", 1666 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1667 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 1668 | "dev": true 1669 | }, 1670 | "debug": { 1671 | "version": "4.4.0", 1672 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 1673 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 1674 | "dev": true, 1675 | "requires": { 1676 | "ms": "^2.1.3" 1677 | } 1678 | }, 1679 | "decamelize": { 1680 | "version": "4.0.0", 1681 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 1682 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 1683 | "dev": true 1684 | }, 1685 | "diff": { 1686 | "version": "3.5.0", 1687 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 1688 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 1689 | "dev": true 1690 | }, 1691 | "emoji-regex": { 1692 | "version": "8.0.0", 1693 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1694 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1695 | "dev": true 1696 | }, 1697 | "escalade": { 1698 | "version": "3.1.1", 1699 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 1700 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 1701 | "dev": true 1702 | }, 1703 | "escape-string-regexp": { 1704 | "version": "1.0.5", 1705 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 1706 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 1707 | "dev": true 1708 | }, 1709 | "esprima": { 1710 | "version": "4.0.1", 1711 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 1712 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 1713 | "dev": true 1714 | }, 1715 | "esutils": { 1716 | "version": "2.0.3", 1717 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 1718 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 1719 | "dev": true 1720 | }, 1721 | "fill-range": { 1722 | "version": "7.1.1", 1723 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 1724 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 1725 | "dev": true, 1726 | "requires": { 1727 | "to-regex-range": "^5.0.1" 1728 | } 1729 | }, 1730 | "find-up": { 1731 | "version": "5.0.0", 1732 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1733 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1734 | "dev": true, 1735 | "requires": { 1736 | "locate-path": "^6.0.0", 1737 | "path-exists": "^4.0.0" 1738 | } 1739 | }, 1740 | "flat": { 1741 | "version": "5.0.2", 1742 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 1743 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 1744 | "dev": true 1745 | }, 1746 | "fs.realpath": { 1747 | "version": "1.0.0", 1748 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1749 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1750 | "dev": true 1751 | }, 1752 | "fsevents": { 1753 | "version": "2.3.2", 1754 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1755 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1756 | "dev": true, 1757 | "optional": true 1758 | }, 1759 | "function-bind": { 1760 | "version": "1.1.1", 1761 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 1762 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 1763 | "dev": true 1764 | }, 1765 | "get-caller-file": { 1766 | "version": "2.0.5", 1767 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 1768 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 1769 | "dev": true 1770 | }, 1771 | "glob": { 1772 | "version": "7.2.0", 1773 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 1774 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 1775 | "dev": true, 1776 | "requires": { 1777 | "fs.realpath": "^1.0.0", 1778 | "inflight": "^1.0.4", 1779 | "inherits": "2", 1780 | "minimatch": "^3.0.4", 1781 | "once": "^1.3.0", 1782 | "path-is-absolute": "^1.0.0" 1783 | } 1784 | }, 1785 | "glob-parent": { 1786 | "version": "5.1.2", 1787 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1788 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1789 | "dev": true, 1790 | "requires": { 1791 | "is-glob": "^4.0.1" 1792 | } 1793 | }, 1794 | "has": { 1795 | "version": "1.0.3", 1796 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 1797 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 1798 | "dev": true, 1799 | "requires": { 1800 | "function-bind": "^1.1.1" 1801 | } 1802 | }, 1803 | "has-ansi": { 1804 | "version": "2.0.0", 1805 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 1806 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 1807 | "dev": true, 1808 | "requires": { 1809 | "ansi-regex": "^2.0.0" 1810 | } 1811 | }, 1812 | "has-flag": { 1813 | "version": "4.0.0", 1814 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1815 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1816 | "dev": true 1817 | }, 1818 | "he": { 1819 | "version": "1.2.0", 1820 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1821 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1822 | "dev": true 1823 | }, 1824 | "inflight": { 1825 | "version": "1.0.6", 1826 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1827 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1828 | "dev": true, 1829 | "requires": { 1830 | "once": "^1.3.0", 1831 | "wrappy": "1" 1832 | } 1833 | }, 1834 | "inherits": { 1835 | "version": "2.0.4", 1836 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1837 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1838 | "dev": true 1839 | }, 1840 | "is-binary-path": { 1841 | "version": "2.1.0", 1842 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1843 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1844 | "dev": true, 1845 | "requires": { 1846 | "binary-extensions": "^2.0.0" 1847 | } 1848 | }, 1849 | "is-core-module": { 1850 | "version": "2.2.0", 1851 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", 1852 | "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", 1853 | "dev": true, 1854 | "requires": { 1855 | "has": "^1.0.3" 1856 | } 1857 | }, 1858 | "is-extglob": { 1859 | "version": "2.1.1", 1860 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1861 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1862 | "dev": true 1863 | }, 1864 | "is-glob": { 1865 | "version": "4.0.3", 1866 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1867 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1868 | "dev": true, 1869 | "requires": { 1870 | "is-extglob": "^2.1.1" 1871 | } 1872 | }, 1873 | "is-number": { 1874 | "version": "7.0.0", 1875 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1876 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1877 | "dev": true 1878 | }, 1879 | "is-plain-obj": { 1880 | "version": "2.1.0", 1881 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1882 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1883 | "dev": true 1884 | }, 1885 | "is-unicode-supported": { 1886 | "version": "0.1.0", 1887 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1888 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1889 | "dev": true 1890 | }, 1891 | "js-tokens": { 1892 | "version": "3.0.2", 1893 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", 1894 | "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", 1895 | "dev": true 1896 | }, 1897 | "js-yaml": { 1898 | "version": "3.14.1", 1899 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 1900 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 1901 | "dev": true, 1902 | "requires": { 1903 | "argparse": "^1.0.7", 1904 | "esprima": "^4.0.0" 1905 | } 1906 | }, 1907 | "locate-path": { 1908 | "version": "6.0.0", 1909 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1910 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1911 | "dev": true, 1912 | "requires": { 1913 | "p-locate": "^5.0.0" 1914 | } 1915 | }, 1916 | "log-symbols": { 1917 | "version": "4.1.0", 1918 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1919 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1920 | "dev": true, 1921 | "requires": { 1922 | "chalk": "^4.1.0", 1923 | "is-unicode-supported": "^0.1.0" 1924 | }, 1925 | "dependencies": { 1926 | "ansi-styles": { 1927 | "version": "4.3.0", 1928 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1929 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1930 | "dev": true, 1931 | "requires": { 1932 | "color-convert": "^2.0.1" 1933 | } 1934 | }, 1935 | "chalk": { 1936 | "version": "4.1.2", 1937 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1938 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1939 | "dev": true, 1940 | "requires": { 1941 | "ansi-styles": "^4.1.0", 1942 | "supports-color": "^7.1.0" 1943 | } 1944 | }, 1945 | "color-convert": { 1946 | "version": "2.0.1", 1947 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1948 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1949 | "dev": true, 1950 | "requires": { 1951 | "color-name": "~1.1.4" 1952 | } 1953 | }, 1954 | "color-name": { 1955 | "version": "1.1.4", 1956 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1957 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1958 | "dev": true 1959 | }, 1960 | "supports-color": { 1961 | "version": "7.2.0", 1962 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1963 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1964 | "dev": true, 1965 | "requires": { 1966 | "has-flag": "^4.0.0" 1967 | } 1968 | } 1969 | } 1970 | }, 1971 | "minimatch": { 1972 | "version": "3.1.2", 1973 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1974 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1975 | "dev": true, 1976 | "requires": { 1977 | "brace-expansion": "^1.1.7" 1978 | } 1979 | }, 1980 | "mocha": { 1981 | "version": "10.8.2", 1982 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", 1983 | "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", 1984 | "dev": true, 1985 | "requires": { 1986 | "ansi-colors": "^4.1.3", 1987 | "browser-stdout": "^1.3.1", 1988 | "chokidar": "^3.5.3", 1989 | "debug": "^4.3.5", 1990 | "diff": "^5.2.0", 1991 | "escape-string-regexp": "^4.0.0", 1992 | "find-up": "^5.0.0", 1993 | "glob": "^8.1.0", 1994 | "he": "^1.2.0", 1995 | "js-yaml": "^4.1.0", 1996 | "log-symbols": "^4.1.0", 1997 | "minimatch": "^5.1.6", 1998 | "ms": "^2.1.3", 1999 | "serialize-javascript": "^6.0.2", 2000 | "strip-json-comments": "^3.1.1", 2001 | "supports-color": "^8.1.1", 2002 | "workerpool": "^6.5.1", 2003 | "yargs": "^16.2.0", 2004 | "yargs-parser": "^20.2.9", 2005 | "yargs-unparser": "^2.0.0" 2006 | }, 2007 | "dependencies": { 2008 | "argparse": { 2009 | "version": "2.0.1", 2010 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 2011 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 2012 | "dev": true 2013 | }, 2014 | "brace-expansion": { 2015 | "version": "2.0.1", 2016 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 2017 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 2018 | "dev": true, 2019 | "requires": { 2020 | "balanced-match": "^1.0.0" 2021 | } 2022 | }, 2023 | "diff": { 2024 | "version": "5.2.0", 2025 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 2026 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 2027 | "dev": true 2028 | }, 2029 | "escape-string-regexp": { 2030 | "version": "4.0.0", 2031 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 2032 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 2033 | "dev": true 2034 | }, 2035 | "glob": { 2036 | "version": "8.1.0", 2037 | "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", 2038 | "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", 2039 | "dev": true, 2040 | "requires": { 2041 | "fs.realpath": "^1.0.0", 2042 | "inflight": "^1.0.4", 2043 | "inherits": "2", 2044 | "minimatch": "^5.0.1", 2045 | "once": "^1.3.0" 2046 | } 2047 | }, 2048 | "js-yaml": { 2049 | "version": "4.1.0", 2050 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 2051 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 2052 | "dev": true, 2053 | "requires": { 2054 | "argparse": "^2.0.1" 2055 | } 2056 | }, 2057 | "minimatch": { 2058 | "version": "5.1.6", 2059 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 2060 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 2061 | "dev": true, 2062 | "requires": { 2063 | "brace-expansion": "^2.0.1" 2064 | } 2065 | } 2066 | } 2067 | }, 2068 | "ms": { 2069 | "version": "2.1.3", 2070 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 2071 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 2072 | "dev": true 2073 | }, 2074 | "node-addon-api": { 2075 | "version": "7.1.0", 2076 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", 2077 | "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==" 2078 | }, 2079 | "normalize-path": { 2080 | "version": "3.0.0", 2081 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 2082 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 2083 | "dev": true 2084 | }, 2085 | "once": { 2086 | "version": "1.4.0", 2087 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 2088 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 2089 | "dev": true, 2090 | "requires": { 2091 | "wrappy": "1" 2092 | } 2093 | }, 2094 | "p-limit": { 2095 | "version": "3.1.0", 2096 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 2097 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 2098 | "dev": true, 2099 | "requires": { 2100 | "yocto-queue": "^0.1.0" 2101 | } 2102 | }, 2103 | "p-locate": { 2104 | "version": "5.0.0", 2105 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 2106 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 2107 | "dev": true, 2108 | "requires": { 2109 | "p-limit": "^3.0.2" 2110 | } 2111 | }, 2112 | "path-exists": { 2113 | "version": "4.0.0", 2114 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 2115 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 2116 | "dev": true 2117 | }, 2118 | "path-is-absolute": { 2119 | "version": "1.0.1", 2120 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 2121 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 2122 | "dev": true 2123 | }, 2124 | "path-parse": { 2125 | "version": "1.0.7", 2126 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 2127 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 2128 | "dev": true 2129 | }, 2130 | "picomatch": { 2131 | "version": "2.3.1", 2132 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 2133 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 2134 | "dev": true 2135 | }, 2136 | "randombytes": { 2137 | "version": "2.1.0", 2138 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 2139 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 2140 | "dev": true, 2141 | "requires": { 2142 | "safe-buffer": "^5.1.0" 2143 | } 2144 | }, 2145 | "readdirp": { 2146 | "version": "3.6.0", 2147 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 2148 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 2149 | "dev": true, 2150 | "requires": { 2151 | "picomatch": "^2.2.1" 2152 | } 2153 | }, 2154 | "require-directory": { 2155 | "version": "2.1.1", 2156 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 2157 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 2158 | "dev": true 2159 | }, 2160 | "resolve": { 2161 | "version": "1.20.0", 2162 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 2163 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 2164 | "dev": true, 2165 | "requires": { 2166 | "is-core-module": "^2.2.0", 2167 | "path-parse": "^1.0.6" 2168 | } 2169 | }, 2170 | "safe-buffer": { 2171 | "version": "5.2.1", 2172 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 2173 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 2174 | "dev": true 2175 | }, 2176 | "semver": { 2177 | "version": "5.7.1", 2178 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 2179 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 2180 | "dev": true 2181 | }, 2182 | "serialize-javascript": { 2183 | "version": "6.0.2", 2184 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 2185 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 2186 | "dev": true, 2187 | "requires": { 2188 | "randombytes": "^2.1.0" 2189 | } 2190 | }, 2191 | "sprintf-js": { 2192 | "version": "1.0.3", 2193 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 2194 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 2195 | "dev": true 2196 | }, 2197 | "strip-ansi": { 2198 | "version": "3.0.1", 2199 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 2200 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 2201 | "dev": true, 2202 | "requires": { 2203 | "ansi-regex": "^2.0.0" 2204 | } 2205 | }, 2206 | "strip-json-comments": { 2207 | "version": "3.1.1", 2208 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2209 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2210 | "dev": true 2211 | }, 2212 | "supports-color": { 2213 | "version": "8.1.1", 2214 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 2215 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 2216 | "dev": true, 2217 | "requires": { 2218 | "has-flag": "^4.0.0" 2219 | } 2220 | }, 2221 | "to-regex-range": { 2222 | "version": "5.0.1", 2223 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2224 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2225 | "dev": true, 2226 | "requires": { 2227 | "is-number": "^7.0.0" 2228 | } 2229 | }, 2230 | "tslib": { 2231 | "version": "1.14.1", 2232 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 2233 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 2234 | "dev": true 2235 | }, 2236 | "tslint": { 2237 | "version": "5.9.1", 2238 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", 2239 | "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", 2240 | "dev": true, 2241 | "requires": { 2242 | "babel-code-frame": "^6.22.0", 2243 | "builtin-modules": "^1.1.1", 2244 | "chalk": "^2.3.0", 2245 | "commander": "^2.12.1", 2246 | "diff": "^3.2.0", 2247 | "glob": "^7.1.1", 2248 | "js-yaml": "^3.7.0", 2249 | "minimatch": "^3.0.4", 2250 | "resolve": "^1.3.2", 2251 | "semver": "^5.3.0", 2252 | "tslib": "^1.8.0", 2253 | "tsutils": "^2.12.1" 2254 | }, 2255 | "dependencies": { 2256 | "commander": { 2257 | "version": "2.20.3", 2258 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 2259 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 2260 | "dev": true 2261 | } 2262 | } 2263 | }, 2264 | "tsutils": { 2265 | "version": "2.29.0", 2266 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 2267 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", 2268 | "dev": true, 2269 | "requires": { 2270 | "tslib": "^1.8.1" 2271 | } 2272 | }, 2273 | "typescript": { 2274 | "version": "4.2.3", 2275 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", 2276 | "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", 2277 | "dev": true 2278 | }, 2279 | "workerpool": { 2280 | "version": "6.5.1", 2281 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 2282 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 2283 | "dev": true 2284 | }, 2285 | "wrap-ansi": { 2286 | "version": "7.0.0", 2287 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2288 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2289 | "dev": true, 2290 | "requires": { 2291 | "ansi-styles": "^4.0.0", 2292 | "string-width": "^4.1.0", 2293 | "strip-ansi": "^6.0.0" 2294 | }, 2295 | "dependencies": { 2296 | "ansi-regex": { 2297 | "version": "5.0.1", 2298 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 2299 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 2300 | "dev": true 2301 | }, 2302 | "ansi-styles": { 2303 | "version": "4.3.0", 2304 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 2305 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 2306 | "dev": true, 2307 | "requires": { 2308 | "color-convert": "^2.0.1" 2309 | } 2310 | }, 2311 | "color-convert": { 2312 | "version": "2.0.1", 2313 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 2314 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 2315 | "dev": true, 2316 | "requires": { 2317 | "color-name": "~1.1.4" 2318 | } 2319 | }, 2320 | "color-name": { 2321 | "version": "1.1.4", 2322 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 2323 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 2324 | "dev": true 2325 | }, 2326 | "is-fullwidth-code-point": { 2327 | "version": "3.0.0", 2328 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2329 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2330 | "dev": true 2331 | }, 2332 | "string-width": { 2333 | "version": "4.2.2", 2334 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2335 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2336 | "dev": true, 2337 | "requires": { 2338 | "emoji-regex": "^8.0.0", 2339 | "is-fullwidth-code-point": "^3.0.0", 2340 | "strip-ansi": "^6.0.0" 2341 | } 2342 | }, 2343 | "strip-ansi": { 2344 | "version": "6.0.0", 2345 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2346 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2347 | "dev": true, 2348 | "requires": { 2349 | "ansi-regex": "^5.0.0" 2350 | } 2351 | } 2352 | } 2353 | }, 2354 | "wrappy": { 2355 | "version": "1.0.2", 2356 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2357 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2358 | "dev": true 2359 | }, 2360 | "y18n": { 2361 | "version": "5.0.6", 2362 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.6.tgz", 2363 | "integrity": "sha512-PlVX4Y0lDTN6E2V4ES2tEdyvXkeKzxa8c/vo0pxPr/TqbztddTP0yn7zZylIyiAuxerqj0Q5GhpJ1YJCP8LaZQ==", 2364 | "dev": true 2365 | }, 2366 | "yargs": { 2367 | "version": "16.2.0", 2368 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 2369 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 2370 | "dev": true, 2371 | "requires": { 2372 | "cliui": "^7.0.2", 2373 | "escalade": "^3.1.1", 2374 | "get-caller-file": "^2.0.5", 2375 | "require-directory": "^2.1.1", 2376 | "string-width": "^4.2.0", 2377 | "y18n": "^5.0.5", 2378 | "yargs-parser": "^20.2.2" 2379 | }, 2380 | "dependencies": { 2381 | "ansi-regex": { 2382 | "version": "5.0.1", 2383 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 2384 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 2385 | "dev": true 2386 | }, 2387 | "is-fullwidth-code-point": { 2388 | "version": "3.0.0", 2389 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2390 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2391 | "dev": true 2392 | }, 2393 | "string-width": { 2394 | "version": "4.2.2", 2395 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2396 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2397 | "dev": true, 2398 | "requires": { 2399 | "emoji-regex": "^8.0.0", 2400 | "is-fullwidth-code-point": "^3.0.0", 2401 | "strip-ansi": "^6.0.0" 2402 | } 2403 | }, 2404 | "strip-ansi": { 2405 | "version": "6.0.0", 2406 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2407 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2408 | "dev": true, 2409 | "requires": { 2410 | "ansi-regex": "^5.0.0" 2411 | } 2412 | } 2413 | } 2414 | }, 2415 | "yargs-parser": { 2416 | "version": "20.2.9", 2417 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 2418 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 2419 | "dev": true 2420 | }, 2421 | "yargs-unparser": { 2422 | "version": "2.0.0", 2423 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 2424 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 2425 | "dev": true, 2426 | "requires": { 2427 | "camelcase": "^6.0.0", 2428 | "decamelize": "^4.0.0", 2429 | "flat": "^5.0.2", 2430 | "is-plain-obj": "^2.1.0" 2431 | } 2432 | }, 2433 | "yocto-queue": { 2434 | "version": "0.1.0", 2435 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2436 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2437 | "dev": true 2438 | } 2439 | } 2440 | } 2441 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vscode/windows-process-tree", 3 | "version": "0.6.0", 4 | "description": "Fetch a Windows process tree fast", 5 | "main": "lib/index.js", 6 | "types": "typings/windows-process-tree.d.ts", 7 | "scripts": { 8 | "test": "mocha lib/test.js -t 5000", 9 | "prepublish": "tsc", 10 | "compile": "tsc", 11 | "watch": "tsc -w", 12 | "lint": "tslint lib/*.ts typings/*.ts *.ts" 13 | }, 14 | "author": "Microsoft Corporation", 15 | "license": "MIT", 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/microsoft/vscode-windows-process-tree.git" 19 | }, 20 | "homepage": "https://github.com/microsoft/vscode-windows-process-tree", 21 | "bugs": { 22 | "url": "https://github.com/microsoft/vscode-windows-process-tree/issues" 23 | }, 24 | "dependencies": { 25 | "node-addon-api": "7.1.0" 26 | }, 27 | "devDependencies": { 28 | "@types/mocha": "^10.0.0", 29 | "@types/node": "^14.14.0", 30 | "mocha": "^10.0.0", 31 | "tslint": "5.9.1", 32 | "typescript": "^4.0.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/addon.cc: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #include 7 | #include "cpu_worker.h" 8 | #include "process_worker.h" 9 | 10 | void GetProcessList(const Napi::CallbackInfo& args) { 11 | Napi::Env env(args.Env()); 12 | 13 | if (args.Length() < 2) { 14 | throw Napi::TypeError::New(env, "GetProcessList expects two arguments."); 15 | } 16 | 17 | if (!args[0].IsFunction()) { 18 | throw Napi::TypeError::New(env, "The first argument of GetProcessList, callback, must be a function."); 19 | } 20 | 21 | if (!args[1].IsNumber()) { 22 | throw Napi::TypeError::New(env, "The second argument of GetProcessList, flags, must be a number."); 23 | } 24 | 25 | Napi::Function callback = args[0].As(); 26 | DWORD flags = static_cast(args[1].As().Int32Value()); 27 | auto* worker = new GetProcessesWorker(callback, flags); 28 | worker->Queue(); 29 | } 30 | 31 | void GetProcessCpuUsage(const Napi::CallbackInfo& args) { 32 | Napi::Env env(args.Env()); 33 | 34 | if (args.Length() < 2) { 35 | throw Napi::TypeError::New(env, "GetProcessCpuUsage expects two arguments."); 36 | } 37 | 38 | if (!args[0].IsArray()) { 39 | throw Napi::TypeError::New(env, "The first argument of GetProcessCpuUsage, processList, must be an array."); 40 | } 41 | 42 | if (!args[1].IsFunction()) { 43 | throw Napi::TypeError::New(env, "The second argument of GetProcessCpuUsage, callback, must be a function."); 44 | } 45 | 46 | // Read the ProcessTreeNode JS object 47 | Napi::Array processes = args[0].As(); 48 | Napi::Function callback = args[1].As(); 49 | auto* worker = new GetCPUWorker(callback, processes); 50 | worker->Queue(); 51 | } 52 | 53 | Napi::Object Init(Napi::Env env, Napi::Object exports) { 54 | exports.Set("getProcessList", Napi::Function::New(env, GetProcessList)); 55 | exports.Set("getProcessCpuUsage", Napi::Function::New(env, GetProcessCpuUsage)); 56 | return exports; 57 | } 58 | 59 | NODE_API_MODULE(WindowsProcessTree, Init) 60 | -------------------------------------------------------------------------------- /src/cpu_worker.cc: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #include "cpu_worker.h" 7 | #include 8 | 9 | GetCPUWorker::GetCPUWorker( 10 | Napi::Function& callback, 11 | Napi::Array& processes) 12 | : AsyncWorker(callback, "windows-process-tree:cpuworker.OnOK") { 13 | for (uint32_t i = 0; i < processes.Length(); i++) { 14 | Cpu cpu_info; 15 | Napi::Object process = processes.Get(i).As(); 16 | if (process.Has("pid")) { 17 | Napi::Value pid = process.Get("pid"); 18 | cpu_info.pid = static_cast(pid.As().Int32Value()); 19 | } 20 | cpu_info_.push_back(std::move(cpu_info)); 21 | } 22 | process_count_ = processes.Length(); 23 | // Processes is persisted so it can be copied out, but the value is not accessible 24 | // within Execute, so copy all pids into cpu info object 25 | processes_ref_ = Napi::Persistent(processes); 26 | } 27 | 28 | GetCPUWorker::~GetCPUWorker() = default; 29 | 30 | void GetCPUWorker::Execute() { 31 | // Take first sample of counters 32 | for (uint32_t i = 0; i < process_count_; i++) { 33 | GetCpuUsage(cpu_info_[i], true); 34 | } 35 | 36 | // Sleep for one second 37 | Sleep(1000); 38 | 39 | // Sample counters again and complete CPU usage calculation 40 | for (uint32_t i = 0; i < process_count_; i++) { 41 | GetCpuUsage(cpu_info_[i], false); 42 | } 43 | } 44 | 45 | void GetCPUWorker::OnOK() { 46 | Napi::HandleScope scope(Env()); 47 | Napi::Env env = Env(); 48 | Napi::Array processes = processes_ref_.Value(); 49 | // Transfer results into actual result object 50 | Napi::Array result = Napi::Array::New(env, processes.Length()); 51 | for (uint32_t i = 0; i < processes.Length(); i++) { 52 | Cpu cpu_info = cpu_info_[i]; 53 | Napi::Object process = processes.Get(i).As(); 54 | if (!std::isnan(cpu_info.cpu)) { 55 | process.Set("cpu", 56 | Napi::Number::New(env, cpu_info.cpu)); 57 | } 58 | 59 | result.Set(i, process); 60 | } 61 | 62 | Callback().Call({result}); 63 | } 64 | -------------------------------------------------------------------------------- /src/cpu_worker.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #ifndef SRC_CPU_WORKER_H 7 | #define SRC_CPU_WORKER_H 8 | 9 | #include 10 | #include "process.h" 11 | 12 | class GetCPUWorker : public Napi::AsyncWorker { 13 | public: 14 | GetCPUWorker(Napi::Function& callback, 15 | Napi::Array& processes); 16 | ~GetCPUWorker(); 17 | 18 | void Execute() override; 19 | void OnOK() override; 20 | 21 | private: 22 | Napi::Reference processes_ref_; 23 | std::vector cpu_info_; 24 | uint32_t process_count_; 25 | }; 26 | 27 | #endif // SRC_CPU_WORKER_H 28 | -------------------------------------------------------------------------------- /src/process.cc: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #include "process.h" 7 | #include "process_commandline.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | uint32_t GetRawProcessList(std::vector& process_info, 14 | DWORD process_data_flags) { 15 | // Fetch the PID and PPIDs 16 | PROCESSENTRY32 process_entry = { 0 }; 17 | DWORD parent_pid = 0; 18 | uint32_t process_count = 0; 19 | HANDLE snapshot_handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 20 | process_entry.dwSize = sizeof(PROCESSENTRY32); 21 | if (Process32First(snapshot_handle, &process_entry)) { 22 | do { 23 | if (process_entry.th32ProcessID != 0) { 24 | ProcessInfo pinfo; 25 | pinfo.pid = process_entry.th32ProcessID; 26 | pinfo.ppid = process_entry.th32ParentProcessID; 27 | 28 | if (MEMORY & process_data_flags) { 29 | GetProcessMemoryUsage(pinfo); 30 | } 31 | 32 | if (COMMANDLINE & process_data_flags) { 33 | GetProcessCommandLine(pinfo); 34 | } 35 | 36 | strcpy(pinfo.name, process_entry.szExeFile); 37 | process_info.push_back(std::move(pinfo)); 38 | process_count++; 39 | } 40 | } while (process_count < 1024 && Process32Next(snapshot_handle, &process_entry)); 41 | } 42 | 43 | CloseHandle(snapshot_handle); 44 | return process_count; 45 | } 46 | 47 | void GetProcessMemoryUsage(ProcessInfo& process_info) { 48 | DWORD pid = process_info.pid; 49 | HANDLE hProcess; 50 | PROCESS_MEMORY_COUNTERS pmc; 51 | 52 | hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, false, pid); 53 | 54 | if (hProcess == NULL) { 55 | return; 56 | } 57 | 58 | if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) { 59 | process_info.memory = (DWORD)pmc.WorkingSetSize; 60 | } 61 | 62 | CloseHandle(hProcess); 63 | } 64 | 65 | // Per documentation, it is not recommended to add or subtract values from the FILETIME 66 | // structure, or to cast it to ULARGE_INTEGER as this can cause alignment faults on 64-bit Windows. 67 | // Copy the high and low part to a ULARGE_INTEGER and peform arithmetic on that instead. 68 | // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx 69 | ULONGLONG GetTotalTime(const FILETIME* kernelTime, const FILETIME* userTime) { 70 | ULARGE_INTEGER kt, ut; 71 | kt.LowPart = (*kernelTime).dwLowDateTime; 72 | kt.HighPart = (*kernelTime).dwHighDateTime; 73 | 74 | ut.LowPart = (*userTime).dwLowDateTime; 75 | ut.HighPart = (*userTime).dwHighDateTime; 76 | 77 | return kt.QuadPart + ut.QuadPart; 78 | } 79 | 80 | void GetCpuUsage(Cpu& cpu_info, bool first_pass) { 81 | DWORD pid = cpu_info.pid; 82 | HANDLE hProcess; 83 | 84 | hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, false, pid); 85 | 86 | if (hProcess == NULL) { 87 | return; 88 | } 89 | 90 | FILETIME creationTime, exitTime, kernelTime, userTime; 91 | FILETIME sysIdleTime, sysKernelTime, sysUserTime; 92 | if (GetProcessTimes(hProcess, &creationTime, &exitTime, &kernelTime, &userTime) 93 | && GetSystemTimes(&sysIdleTime, &sysKernelTime, &sysUserTime)) { 94 | if (first_pass) { 95 | cpu_info.initialProcRunTime = GetTotalTime(&kernelTime, &userTime); 96 | cpu_info.initialSystemTime = GetTotalTime(&sysKernelTime, &sysUserTime); 97 | } else { 98 | ULONGLONG endProcTime = GetTotalTime(&kernelTime, &userTime); 99 | ULONGLONG endSysTime = GetTotalTime(&sysKernelTime, &sysUserTime); 100 | 101 | cpu_info.cpu = 100.0 * (endProcTime - cpu_info.initialProcRunTime) / (endSysTime - cpu_info.initialSystemTime); 102 | } 103 | } else { 104 | cpu_info.cpu = std::numeric_limits::quiet_NaN(); 105 | } 106 | 107 | CloseHandle(hProcess); 108 | } -------------------------------------------------------------------------------- /src/process.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #ifndef SRC_PROCESS_H_ 7 | #define SRC_PROCESS_H_ 8 | 9 | #include 10 | #include 11 | 12 | struct Cpu { 13 | DWORD pid; 14 | double cpu; 15 | ULONGLONG initialProcRunTime; 16 | ULONGLONG initialSystemTime; 17 | }; 18 | 19 | struct ProcessInfo { 20 | TCHAR name[MAX_PATH]; 21 | DWORD pid; 22 | DWORD ppid; 23 | DWORD memory; // Reported in bytes 24 | std::string commandLine; 25 | }; 26 | 27 | enum ProcessDataFlags { 28 | NONE = 0, 29 | MEMORY = 1, 30 | COMMANDLINE = 2 31 | }; 32 | 33 | uint32_t GetRawProcessList(std::vector& process_info, DWORD flags); 34 | 35 | void GetProcessMemoryUsage(ProcessInfo& process_info); 36 | 37 | void GetCpuUsage(Cpu& cpu_info, bool first_run); 38 | 39 | #endif // SRC_PROCESS_H_ 40 | -------------------------------------------------------------------------------- /src/process_commandline.cc: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #include "process.h" 7 | #include "process_commandline.h" 8 | #include 9 | #include 10 | #include 11 | 12 | bool GetProcessCommandLine(ProcessInfo& process_info) { 13 | HINSTANCE ntdll = GetModuleHandleW(L"ntdll.dll"); 14 | if (!ntdll) { 15 | return false; 16 | } 17 | 18 | decltype(NtQueryInformationProcess)* nt_query_information_process = 19 | reinterpret_cast( 20 | GetProcAddress(ntdll, "NtQueryInformationProcess")); 21 | 22 | if (!nt_query_information_process) { 23 | return false; 24 | } 25 | 26 | PROCESS_BASIC_INFORMATION pbi{}; 27 | PEB peb = {NULL}; 28 | RTL_USER_PROCESS_PARAMETERS process_parameters = {NULL}; 29 | 30 | // Get process handle 31 | DWORD pid = process_info.pid; 32 | HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); 33 | if (hProcess == INVALID_HANDLE_VALUE) { 34 | return false; 35 | } 36 | 37 | // Get Process Environment Block (PEB) 38 | NTSTATUS status = nt_query_information_process(hProcess, ProcessBasicInformation, &pbi, sizeof(pbi), nullptr); 39 | if (NT_SUCCESS(status) && pbi.PebBaseAddress) { 40 | // Read PEB 41 | if (ReadProcessMemory(hProcess, pbi.PebBaseAddress, &peb, sizeof(peb), nullptr)) { 42 | // Read the processs parameters 43 | if (ReadProcessMemory(hProcess, peb.ProcessParameters, &process_parameters, sizeof(RTL_USER_PROCESS_PARAMETERS), nullptr)) { 44 | if (process_parameters.CommandLine.Length > 0) { 45 | std::wstring buffer; 46 | buffer.resize(process_parameters.CommandLine.Length / sizeof(wchar_t)); 47 | if (ReadProcessMemory(hProcess, process_parameters.CommandLine.Buffer, &buffer[0], process_parameters.CommandLine.Length, nullptr)) { 48 | int wide_length = static_cast(buffer.length()); 49 | int charcount = WideCharToMultiByte(CP_ACP, 0, buffer.data(), wide_length, 50 | NULL, 0, NULL, NULL); 51 | if (charcount) { 52 | process_info.commandLine.resize(static_cast(charcount)); 53 | WideCharToMultiByte(CP_ACP, 0, buffer.data(), wide_length, 54 | &process_info.commandLine[0], charcount, 55 | NULL, NULL); 56 | } 57 | CloseHandle(hProcess); 58 | return true; 59 | } 60 | } 61 | } 62 | } 63 | } 64 | 65 | CloseHandle(hProcess); 66 | return false; 67 | } 68 | -------------------------------------------------------------------------------- /src/process_commandline.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #ifndef SRC_PROCESS_COMMANDLINE_H_ 7 | #define SRC_PROCESS_COMMANDLINE_H_ 8 | 9 | #include "process.h" 10 | #include 11 | 12 | typedef NTSTATUS(NTAPI *pfnNtQueryInformationProcess)( 13 | IN HANDLE ProcessHandle, 14 | IN PROCESSINFOCLASS ProcessInformationClass, 15 | OUT PVOID ProcessInformation, 16 | IN ULONG ProcessInformationLength, 17 | OUT PULONG ReturnLength OPTIONAL); 18 | 19 | bool GetProcessCommandLine(ProcessInfo& process_info); 20 | 21 | #endif -------------------------------------------------------------------------------- /src/process_worker.cc: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #include "process_worker.h" 7 | 8 | GetProcessesWorker::GetProcessesWorker( 9 | Napi::Function& callback, 10 | DWORD process_data_flags) 11 | : Napi::AsyncWorker(callback, "windows-process-tree:addon.HandleOKCallback"), 12 | process_data_flags_(process_data_flags) {} 13 | 14 | GetProcessesWorker::~GetProcessesWorker() = default; 15 | 16 | void GetProcessesWorker::Execute() { 17 | process_count_ = GetRawProcessList(process_info_, process_data_flags_); 18 | } 19 | 20 | void GetProcessesWorker::OnOK() { 21 | Napi::HandleScope scope(Env()); 22 | Napi::Env env = Env(); 23 | // Transfer results into actual result object 24 | Napi::Array result = Napi::Array::New(env, process_count_); 25 | for (uint32_t i = 0; i < process_count_; i++) { 26 | const ProcessInfo& pinfo = process_info_[i]; 27 | Napi::Object object = Napi::Object::New(env); 28 | object.Set("name", 29 | Napi::String::New(env, pinfo.name)); 30 | object.Set("pid", 31 | Napi::Number::New(env, pinfo.pid)); 32 | object.Set("ppid", 33 | Napi::Number::New(env, pinfo.ppid)); 34 | 35 | // Property should be undefined when memory flag isn't set 36 | if (MEMORY & process_data_flags_) { 37 | object.Set("memory", 38 | Napi::Number::New(env, pinfo.memory)); 39 | } 40 | 41 | if (COMMANDLINE & process_data_flags_) { 42 | object.Set("commandLine", 43 | Napi::String::New(env, pinfo.commandLine)); 44 | } 45 | 46 | result.Set(i, object); 47 | } 48 | 49 | Callback().Call({result}); 50 | } 51 | -------------------------------------------------------------------------------- /src/process_worker.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | #ifndef SRC_PROCESS_WORKER_H 7 | #define SRC_PROCESS_WORKER_H 8 | 9 | #include 10 | #include "process.h" 11 | 12 | class GetProcessesWorker : public Napi::AsyncWorker { 13 | public: 14 | GetProcessesWorker(Napi::Function& callback, 15 | DWORD process_data_flags); 16 | ~GetProcessesWorker(); 17 | 18 | void Execute() override; 19 | void OnOK() override; 20 | 21 | private: 22 | std::vector process_info_; 23 | uint32_t process_count_ = 0; 24 | DWORD process_data_flags_; 25 | }; 26 | 27 | #endif // SRC_PROCESS_WORKER_H 28 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "sourceMap": true, 6 | "noImplicitReturns": true, 7 | "noUnusedLocals": true, 8 | "noImplicitThis": true, 9 | "alwaysStrict": true, 10 | "strictNullChecks": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-type": [ 4 | true, 5 | "array" 6 | ], 7 | "class-name": true, 8 | "comment-format": [ 9 | true, 10 | "check-space" 11 | ], 12 | "curly": [ 13 | true, 14 | "ignore-same-line" 15 | ], 16 | "indent": [ 17 | true, 18 | "spaces" 19 | ], 20 | "interface-name": [ 21 | true, 22 | "always-prefix" 23 | ], 24 | "interface-over-type-literal": true, 25 | "typedef": [ 26 | true, 27 | "call-signature", 28 | "parameter" 29 | ], 30 | "eofline": true, 31 | "no-duplicate-imports": true, 32 | "no-eval": true, 33 | "no-internal-module": true, 34 | "no-trailing-whitespace": true, 35 | "one-variable-per-declaration": true, 36 | "no-unsafe-finally": true, 37 | "no-var-keyword": true, 38 | "quotemark": [ 39 | true, 40 | "single" 41 | ], 42 | "semicolon": [ 43 | true, 44 | "always" 45 | ], 46 | "triple-equals": [ 47 | true, 48 | "allow-null-check" 49 | ], 50 | "typedef-whitespace": [ 51 | true, 52 | { 53 | "call-signature": "nospace", 54 | "index-signature": "nospace", 55 | "parameter": "nospace", 56 | "property-declaration": "nospace", 57 | "variable-declaration": "nospace" 58 | } 59 | ], 60 | "variable-name": [ 61 | true, 62 | "ban-keywords", 63 | "check-format", 64 | "allow-leading-underscore" 65 | ], 66 | "whitespace": [ 67 | true, 68 | "check-branch", 69 | "check-decl", 70 | "check-module", 71 | "check-operator", 72 | "check-rest-spread", 73 | "check-separator", 74 | "check-type", 75 | "check-type-operator", 76 | "check-preblock" 77 | ] 78 | } 79 | } -------------------------------------------------------------------------------- /typings/windows-process-tree.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | declare module '@vscode/windows-process-tree' { 7 | export enum ProcessDataFlag { 8 | None = 0, 9 | Memory = 1, 10 | CommandLine = 2 11 | } 12 | 13 | export interface IProcessInfo { 14 | pid: number; 15 | ppid: number; 16 | name: string; 17 | 18 | /** 19 | * The working set size of the process, in bytes. 20 | */ 21 | memory?: number; 22 | 23 | /** 24 | * The string returned is at most 512 chars, strings exceeding this length are truncated. 25 | */ 26 | commandLine?: string; 27 | } 28 | 29 | export interface IProcessCpuInfo extends IProcessInfo { 30 | cpu?: number; 31 | } 32 | 33 | export interface IProcessTreeNode { 34 | pid: number; 35 | name: string; 36 | memory?: number; 37 | commandLine?: string; 38 | children: IProcessTreeNode[]; 39 | } 40 | 41 | /** 42 | * Returns a tree of processes with the rootPid process as the root. 43 | * @param rootPid - The pid of the process that will be the root of the tree. 44 | * @param callback - The callback to use with the returned list of processes. 45 | * @param flags - The flags for what process data should be included. 46 | */ 47 | export function getProcessTree(rootPid: number, callback: (tree: IProcessTreeNode | undefined) => void, flags?: ProcessDataFlag): void; 48 | 49 | namespace getProcessTree { 50 | function __promisify__(rootPid: number, flags?: ProcessDataFlag): Promise; 51 | } 52 | 53 | /** 54 | * Returns a list of processes containing the rootPid process and all of its descendants. 55 | * @param rootPid - The pid of the process of interest. 56 | * @param callback - The callback to use with the returned set of processes. 57 | * @param flags - The flags for what process data should be included. 58 | */ 59 | export function getProcessList(rootPid: number, callback: (processList: IProcessInfo[] | undefined) => void, flags?: ProcessDataFlag): void; 60 | 61 | namespace getProcessList { 62 | function __promisify__(rootPid: number, flags?: ProcessDataFlag): Promise; 63 | } 64 | 65 | /** 66 | * Returns the list of processes annotated with cpu usage information. 67 | * @param processList - The list of processes. 68 | * @param callback - The callback to use with the returned list of processes. 69 | */ 70 | export function getProcessCpuUsage(processList: IProcessInfo[], callback: (processListWithCpu: IProcessCpuInfo[]) => void): void; 71 | 72 | namespace getProcessCpuUsage { 73 | function __promisify__(processList: IProcessInfo[]): Promise; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /typings/windows-process-tree/promises.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | declare module '@vscode/windows-process-tree/promises' { 7 | import { 8 | IProcessCpuInfo, 9 | IProcessInfo, 10 | IProcessTreeNode, 11 | ProcessDataFlag, 12 | } from '@vscode/windows-process-tree'; 13 | 14 | export { 15 | IProcessCpuInfo, 16 | IProcessInfo, 17 | IProcessTreeNode, 18 | ProcessDataFlag, 19 | } from '@vscode/windows-process-tree'; 20 | 21 | /** 22 | * Returns a tree of processes with the rootPid process as the root. 23 | * @param rootPid - The pid of the process that will be the root of the tree. 24 | * @param flags - The flags for what process data should be included. 25 | */ 26 | export function getProcessTree(rootPid: number, flags?: ProcessDataFlag): Promise; 27 | 28 | /** 29 | * Returns a list of processes containing the rootPid process and all of its descendants. 30 | * @param rootPid - The pid of the process of interest. 31 | * @param flags - The flags for what process data should be included. 32 | */ 33 | export function getProcessList(rootPid: number, flags?: ProcessDataFlag): Promise; 34 | 35 | /** 36 | * Returns the list of processes annotated with cpu usage information. 37 | * @param processList - The list of processes. 38 | */ 39 | export function getProcessCpuUsage(processList: IProcessInfo[]): Promise; 40 | } 41 | --------------------------------------------------------------------------------