├── .editorconfig ├── .eslintrc.js ├── .github └── dependabot.yml ├── .gitignore ├── .npmignore ├── .semaphore ├── publish.yml └── semaphore.yml ├── LICENSE ├── README.md ├── bench ├── packetparser.js └── slowpoke.js ├── index.js ├── lib ├── banner.js ├── bannerparser.js ├── index.js ├── packet.js ├── packetparser.js ├── parser.js ├── quirks.js ├── result.js ├── sampler.js └── transmitter.js ├── package.json ├── test ├── bannerparser.js ├── index.js ├── packetparser.js └── sampler.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org/ 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: [ 4 | 'standard' 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | ignore: 9 | - dependency-name: eslint 10 | versions: 11 | - 7.18.0 12 | - 7.19.0 13 | - 7.20.0 14 | - 7.21.0 15 | - 7.22.0 16 | - 7.23.0 17 | - 7.24.0 18 | - dependency-name: terminal-kit 19 | versions: 20 | - 1.45.9 21 | - 1.46.1 22 | - 1.47.0 23 | - 1.48.0 24 | - 1.49.2 25 | - 2.0.2 26 | - 2.0.3 27 | - 2.0.4 28 | - 2.0.5 29 | - dependency-name: eslint-plugin-promise 30 | versions: 31 | - 4.2.1 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /*.tgz 3 | /node_modules/ 4 | /npm-debug.log 5 | package-lock.json 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /*.tgz 3 | /bench/ 4 | /node_modules/ 5 | /npm-debug.log 6 | /test/ 7 | -------------------------------------------------------------------------------- /.semaphore/publish.yml: -------------------------------------------------------------------------------- 1 | version: v1.0 2 | name: Publish 3 | blocks: 4 | - name: Publish 5 | task: 6 | jobs: 7 | - name: NPM publish 8 | commands: 9 | - checkout 10 | - sem-version node 12 11 | - cache restore 12 | - npm install 13 | - npm publish --access public 14 | secrets: 15 | - name: npmjs 16 | agent: 17 | machine: 18 | type: e1-standard-2 19 | os_image: ubuntu1804 20 | -------------------------------------------------------------------------------- /.semaphore/semaphore.yml: -------------------------------------------------------------------------------- 1 | version: v1.0 2 | name: NPM Test 3 | agent: 4 | machine: 5 | type: e1-standard-2 6 | os_image: ubuntu1804 7 | blocks: 8 | - name: Test 9 | task: 10 | jobs: 11 | - name: Test 12 | commands: 13 | - checkout 14 | - sem-version node 12 15 | - cache restore 16 | - npm install 17 | - cache store 18 | - npm run build --if-present 19 | - npm test 20 | promotions: 21 | - name: NPM publish 22 | pipeline_file: publish.yml 23 | auto_promote: 24 | when: (branch = 'master' OR tag =~ '.*') AND result = 'passed' 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2016 The OpenSTF Project 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-minicap 2 | 3 | [![npm](https://img.shields.io/npm/v/minicap.svg)](https://www.npmjs.com/package/@devicefarmer/minicap) 4 | 5 | **node-minicap** provides a [minicap](https://github.com/devicefarmer/minicap) "driver" of sorts for [Node.js](https://nodejs.org/en/). Note that prebuilt minicap binaries are not included in this package. If you need them, try [minicap-prebuilt](https://www.npmjs.com/package/minicap-prebuilt). 6 | 7 | ## Requirements 8 | 9 | * [Node.js](https://nodejs.org) v6.9.0 or later. Older versions will triggers syntax errors. 10 | 11 | ## Installation 12 | 13 | Using [yarn](https://yarnpkg.com/): 14 | 15 | ```sh 16 | yarn add @devicefarmer/minicap 17 | ``` 18 | 19 | Using [npm](https://www.npmjs.com/): 20 | 21 | ```sh 22 | npm install --save @devicefarmer/minicap 23 | ``` 24 | 25 | ## License 26 | 27 | See [LICENSE](LICENSE). 28 | -------------------------------------------------------------------------------- /bench/packetparser.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | 3 | const {Packet, PacketParser, Result} = require('../') 4 | 5 | const KB = 1024 6 | const MB = KB * 1024 7 | 8 | function produceFakePacketChunks (packetCount, chunkSize) { 9 | const chunks = [] 10 | let totalSize = 0 11 | 12 | assert.equal(packetCount % 5, 0, 'Packet count must be divisible by 5') 13 | 14 | const generatePacket = (id, size, fill) => { 15 | const idealChunk = new Packet(id, Packet.MCJD, Buffer.alloc(size, fill)).toProtocol() 16 | for (let i = 0; i < idealChunk.length;) { 17 | const usualChunk = idealChunk.slice(i, i + chunkSize) 18 | chunks.push(usualChunk) 19 | i += usualChunk.length 20 | } 21 | totalSize += size 22 | } 23 | 24 | for (let i = 0, l = packetCount / 5; i < l; ++i) { 25 | generatePacket(i * 5 + 1, 501 * KB, 0x01) 26 | generatePacket(i * 5 + 2, 485 * KB, 0x02) 27 | generatePacket(i * 5 + 3, 522 * KB, 0x03) 28 | generatePacket(i * 5 + 4, 686 * KB, 0x04) 29 | generatePacket(i * 5 + 5, 168 * KB, 0x05) 30 | } 31 | 32 | return { 33 | chunks, 34 | totalSize 35 | } 36 | } 37 | 38 | function parse (chunks) { 39 | const parser = new PacketParser() 40 | let chunk, result 41 | let count = 0 42 | for (let i = 0, l = chunks.length; i < l; ++i) { 43 | do { 44 | chunk = chunks[i] 45 | result = parser.parse(chunk) 46 | if (result.state === Result.COMPLETE) { 47 | count += 1 48 | } 49 | chunk = result.rest 50 | } while (chunk.length) 51 | } 52 | return count 53 | } 54 | 55 | const wantedPacketCount = process.env.PACKETS || 1000 56 | const chunkSize = process.env.CHUNKSIZE || 1440 57 | 58 | console.error(`Allocating ${wantedPacketCount} fake packets...`) 59 | const {chunks, totalSize} = produceFakePacketChunks(wantedPacketCount, chunkSize) 60 | 61 | console.error(`Allocated ${chunks.length} chunks totaling ${totalSize / MB}MB`) 62 | console.error('Parsing chunks...') 63 | 64 | const startTime = Date.now() 65 | const parsedPacketCount = parse(chunks) 66 | const endTime = Date.now() 67 | const elapsedTime = endTime - startTime 68 | 69 | console.error( 70 | 'Parsed %d packets in %ds (%dMB/s)', 71 | parsedPacketCount, 72 | elapsedTime / 1000, 73 | (totalSize / MB) / (elapsedTime / 1000) 74 | ) 75 | 76 | assert.equal(wantedPacketCount, parsedPacketCount) 77 | -------------------------------------------------------------------------------- /bench/slowpoke.js: -------------------------------------------------------------------------------- 1 | const term = require('terminal-kit').terminal 2 | 3 | const Sampler = require('../lib/sampler') 4 | const Frame = require('../lib/frame') 5 | const Transmitter = require('../lib/transmitter') 6 | 7 | const KB = 1024 8 | 9 | const kInterval = Symbol('interval') 10 | const kTimer = Symbol('timer') 11 | const kOnFrameRendered = Symbol('onFrameRendered') 12 | const kOnFrameProduced = Symbol('onFrameProduced') 13 | const kProducedFrameId = Symbol('producedFrame') 14 | const kProducedFrame = Symbol('producedFrameId') 15 | const kRenderedFrameId = Symbol('renderedFrameId') 16 | const kBytesPerSecond = Symbol('bytesPerSecond') 17 | const kQueue = Symbol('queue') 18 | const kProducedFrameSampler = Symbol('producedFrameSampler') 19 | const kRenderedFrameSampler = Symbol('renderedFrameSampler') 20 | 21 | class FrameProducingServer { 22 | constructor ({interval, onFrameProduced}) { 23 | this[kInterval] = interval 24 | this[kTimer] = null 25 | this[kOnFrameProduced] = onFrameProduced 26 | this[kProducedFrame] = null 27 | this[kProducedFrameId] = 0 28 | this[kRenderedFrameId] = 0 29 | this[kProducedFrameSampler] = new Sampler(60) 30 | this[kRenderedFrameSampler] = new Sampler(60) 31 | } 32 | 33 | onClientReportedFrameRendered (frameId) { 34 | this[kRenderedFrameId] = frameId 35 | this[kRenderedFrameSampler].push(1) 36 | } 37 | 38 | produceFrame () { 39 | const frame = new Frame(this[kProducedFrameId] + 1, null) 40 | this[kProducedFrame] = frame 41 | this[kProducedFrameId] = frame.id 42 | this[kProducedFrameSampler].push(1) 43 | this[kOnFrameProduced](frame) 44 | } 45 | 46 | start () { 47 | this[kTimer] = setInterval(() => this.produceFrame(), this[kInterval]) 48 | } 49 | 50 | stop () { 51 | clearInterval(this[kTimer]) 52 | } 53 | } 54 | 55 | class FrameRenderingClient { 56 | constructor ({onFrameRendered}) { 57 | this[kOnFrameRendered] = onFrameRendered 58 | } 59 | 60 | onReceivedFrameFromServer (frame) { 61 | this[kOnFrameRendered](frame) 62 | } 63 | } 64 | 65 | class LimitedBandwidthNetwork { 66 | constructor (bytesPerSecond) { 67 | this[kBytesPerSecond] = bytesPerSecond 68 | this[kQueue] = [] 69 | this[kTimer] = null 70 | } 71 | 72 | send (size, message) { 73 | this[kQueue].push({ size, message }) 74 | this.next() 75 | } 76 | 77 | next () { 78 | if (this[kTimer]) { 79 | return 80 | } 81 | 82 | const payload = this[kQueue].shift() 83 | 84 | if (!payload) { 85 | return 86 | } 87 | 88 | const timeToSend = payload.size / this[kBytesPerSecond] * 1000 89 | 90 | this[kTimer] = setTimeout(() => { 91 | payload.message() 92 | this[kTimer] = null 93 | this.next() 94 | }, timeToSend) 95 | } 96 | 97 | queue (size, message) { 98 | this[kQueue].push({ size, message }) 99 | } 100 | } 101 | 102 | function report () { 103 | term.clear() 104 | term.moveTo(1, 1) 105 | const producedFps = server[kProducedFrameSampler].samplesPerInterval(1000) 106 | const renderedFps = server[kRenderedFrameSampler].samplesPerInterval(1000) 107 | term.cyan(producedFps.toFixed(2))(' frames produced per second') 108 | term.moveTo(1, 2) 109 | term.cyan(renderedFps.toFixed(2))(' frames rendered per second') 110 | term.moveTo(1, 3) 111 | term.cyan(server[kProducedFrameId])(' latest produced frame') 112 | term.moveTo(1, 4) 113 | term.cyan(server[kRenderedFrameId])(' latest rendered frame') 114 | term.moveTo(1, 5) 115 | term.red(transmitter.howMuchBehind())(' frames behind') 116 | term.moveTo(1, 6) 117 | term.red(transmitter.shouldThrottleMore() ? 'YES' : 'NO')(' should throttle more') 118 | term.hideCursor() 119 | } 120 | 121 | const upstream = new LimitedBandwidthNetwork(200 * KB) 122 | const downstream = new LimitedBandwidthNetwork(200 * KB) 123 | 124 | const client = new FrameRenderingClient({ 125 | onFrameRendered: (frame) => { 126 | upstream.send(0.1 * KB, () => { 127 | transmitter.markReceived(frame.id) 128 | }) 129 | } 130 | }) 131 | 132 | const server = new FrameProducingServer({ 133 | interval: 16, 134 | onFrameProduced: (frame) => { 135 | transmitter.push(frame) 136 | } 137 | }) 138 | 139 | const transmitter = new Transmitter({ 140 | onFrameReady: (frame) => { 141 | downstream.send(20 * KB, () => { 142 | client.onReceivedFrameFromServer(frame) 143 | }) 144 | } 145 | }) 146 | 147 | server.start() 148 | 149 | setInterval(report, 500) 150 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib') 2 | -------------------------------------------------------------------------------- /lib/banner.js: -------------------------------------------------------------------------------- 1 | class Banner { 2 | constructor (banner) { 3 | this.version = banner.version 4 | this.length = banner.length 5 | this.pid = banner.pid 6 | this.realWidth = banner.realWidth 7 | this.realHeight = banner.realHeight 8 | this.virtualWidth = banner.virtualWidth 9 | this.virtualHeight = banner.virtualHeight 10 | this.orientation = banner.orientation 11 | this.quirks = banner.quirks 12 | } 13 | 14 | toProtocol () { 15 | const buffer = Buffer.alloc(this.length) 16 | buffer[0] = this.version 17 | buffer[1] = this.length 18 | buffer.writeUInt32LE(this.pid, 2) 19 | buffer.writeUInt32LE(this.realWidth, 6) 20 | buffer.writeUInt32LE(this.realHeight, 10) 21 | buffer.writeUInt32LE(this.virtualWidth, 14) 22 | buffer.writeUInt32LE(this.virtualHeight, 18) 23 | buffer[22] = this.orientation / 90 24 | buffer[23] = this.quirks 25 | return buffer 26 | } 27 | } 28 | 29 | module.exports = Banner 30 | -------------------------------------------------------------------------------- /lib/bannerparser.js: -------------------------------------------------------------------------------- 1 | const Banner = require('./banner') 2 | const Result = require('./result') 3 | 4 | const kParser = Symbol('parser') 5 | const kState = Symbol('state') 6 | const kResult = Symbol('result') 7 | const kVersion = Symbol('version') 8 | const kLength = Symbol('length') 9 | const kPid = Symbol('pid') 10 | const kRealWidth = Symbol('realWidth') 11 | const kRealHeight = Symbol('realHeight') 12 | const kVirtualWidth = Symbol('virtualWidth') 13 | const kVirtualHeight = Symbol('virtualHeight') 14 | const kOrientation = Symbol('orientation') 15 | const kQuirks = Symbol('quirks') 16 | 17 | const { 18 | INCOMPLETE, 19 | UNACCEPTABLE, 20 | COMPLETE 21 | } = Result 22 | 23 | class BannerParser { 24 | constructor () { 25 | this[kVersion] = 0 26 | this[kLength] = 0 27 | this[kPid] = 0 28 | this[kRealWidth] = 0 29 | this[kRealHeight] = 0 30 | this[kVirtualWidth] = 0 31 | this[kVirtualHeight] = 0 32 | this[kOrientation] = 0 33 | this[kQuirks] = 0 34 | this[kParser] = this.parseVersion0 35 | this[kState] = INCOMPLETE 36 | this[kResult] = new Result() 37 | } 38 | 39 | take () { 40 | const banner = new Banner({ 41 | version: this[kVersion], 42 | length: this[kLength], 43 | pid: this[kPid], 44 | realWidth: this[kRealWidth], 45 | realHeight: this[kRealHeight], 46 | virtualWidth: this[kVirtualWidth], 47 | virtualHeight: this[kVirtualHeight], 48 | orientation: this[kOrientation], 49 | quirks: this[kQuirks] 50 | }) 51 | 52 | return banner 53 | } 54 | 55 | parseVersion0 (chunk) { 56 | const byte = chunk[0] 57 | this[kVersion] = byte 58 | this[kParser] = this.parseLength0 59 | this[kState] = INCOMPLETE 60 | return 1 61 | } 62 | 63 | parseLength0 (chunk) { 64 | const byte = chunk[0] 65 | this[kLength] = byte 66 | this[kParser] = this.parsePid0 67 | this[kState] = INCOMPLETE 68 | return 1 69 | } 70 | 71 | parsePid0 (chunk) { 72 | const byte = chunk[0] 73 | this[kPid] = 0 74 | this[kPid] += (byte << (0 * 8)) >>> 0 75 | this[kParser] = this.parsePid1 76 | this[kState] = INCOMPLETE 77 | return 1 78 | } 79 | 80 | parsePid1 (chunk) { 81 | const byte = chunk[0] 82 | this[kPid] += (byte << (1 * 8)) >>> 0 83 | this[kParser] = this.parsePid2 84 | this[kState] = INCOMPLETE 85 | return 1 86 | } 87 | 88 | parsePid2 (chunk) { 89 | const byte = chunk[0] 90 | this[kPid] += (byte << (2 * 8)) >>> 0 91 | this[kParser] = this.parsePid3 92 | this[kState] = INCOMPLETE 93 | return 1 94 | } 95 | 96 | parsePid3 (chunk) { 97 | const byte = chunk[0] 98 | this[kPid] += (byte << (3 * 8)) >>> 0 99 | this[kParser] = this.parseRealWidth0 100 | this[kState] = INCOMPLETE 101 | return 1 102 | } 103 | 104 | parseRealWidth0 (chunk) { 105 | const byte = chunk[0] 106 | this[kRealWidth] = 0 107 | this[kRealWidth] += (byte << (0 * 8)) >>> 0 108 | this[kParser] = this.parseRealWidth1 109 | this[kState] = INCOMPLETE 110 | return 1 111 | } 112 | 113 | parseRealWidth1 (chunk) { 114 | const byte = chunk[0] 115 | this[kRealWidth] += (byte << (1 * 8)) >>> 0 116 | this[kParser] = this.parseRealWidth2 117 | this[kState] = INCOMPLETE 118 | return 1 119 | } 120 | 121 | parseRealWidth2 (chunk) { 122 | const byte = chunk[0] 123 | this[kRealWidth] += (byte << (2 * 8)) >>> 0 124 | this[kParser] = this.parseRealWidth3 125 | this[kState] = INCOMPLETE 126 | return 1 127 | } 128 | 129 | parseRealWidth3 (chunk) { 130 | const byte = chunk[0] 131 | this[kRealWidth] += (byte << (3 * 8)) >>> 0 132 | this[kParser] = this.parseRealHeight0 133 | this[kState] = INCOMPLETE 134 | return 1 135 | } 136 | 137 | parseRealHeight0 (chunk) { 138 | const byte = chunk[0] 139 | this[kRealHeight] = 0 140 | this[kRealHeight] += (byte << (0 * 8)) >>> 0 141 | this[kParser] = this.parseRealHeight1 142 | this[kState] = INCOMPLETE 143 | return 1 144 | } 145 | 146 | parseRealHeight1 (chunk) { 147 | const byte = chunk[0] 148 | this[kRealHeight] += (byte << (1 * 8)) >>> 0 149 | this[kParser] = this.parseRealHeight2 150 | this[kState] = INCOMPLETE 151 | return 1 152 | } 153 | 154 | parseRealHeight2 (chunk) { 155 | const byte = chunk[0] 156 | this[kRealHeight] += (byte << (2 * 8)) >>> 0 157 | this[kParser] = this.parseRealHeight3 158 | this[kState] = INCOMPLETE 159 | return 1 160 | } 161 | 162 | parseRealHeight3 (chunk) { 163 | const byte = chunk[0] 164 | this[kRealHeight] += (byte << (3 * 8)) >>> 0 165 | this[kParser] = this.parseVirtualWidth0 166 | this[kState] = INCOMPLETE 167 | return 1 168 | } 169 | 170 | parseVirtualWidth0 (chunk) { 171 | const byte = chunk[0] 172 | this[kVirtualWidth] = 0 173 | this[kVirtualWidth] += (byte << (0 * 8)) >>> 0 174 | this[kParser] = this.parseVirtualWidth1 175 | this[kState] = INCOMPLETE 176 | return 1 177 | } 178 | 179 | parseVirtualWidth1 (chunk) { 180 | const byte = chunk[0] 181 | this[kVirtualWidth] += (byte << (1 * 8)) >>> 0 182 | this[kParser] = this.parseVirtualWidth2 183 | this[kState] = INCOMPLETE 184 | return 1 185 | } 186 | 187 | parseVirtualWidth2 (chunk) { 188 | const byte = chunk[0] 189 | this[kVirtualWidth] += (byte << (2 * 8)) >>> 0 190 | this[kParser] = this.parseVirtualWidth3 191 | this[kState] = INCOMPLETE 192 | return 1 193 | } 194 | 195 | parseVirtualWidth3 (chunk) { 196 | const byte = chunk[0] 197 | this[kVirtualWidth] += (byte << (3 * 8)) >>> 0 198 | this[kParser] = this.parseVirtualHeight0 199 | this[kState] = INCOMPLETE 200 | return 1 201 | } 202 | 203 | parseVirtualHeight0 (chunk) { 204 | const byte = chunk[0] 205 | this[kVirtualHeight] = 0 206 | this[kVirtualHeight] += (byte << (0 * 8)) >>> 0 207 | this[kParser] = this.parseVirtualHeight1 208 | this[kState] = INCOMPLETE 209 | return 1 210 | } 211 | 212 | parseVirtualHeight1 (chunk) { 213 | const byte = chunk[0] 214 | this[kVirtualHeight] += (byte << (1 * 8)) >>> 0 215 | this[kParser] = this.parseVirtualHeight2 216 | this[kState] = INCOMPLETE 217 | return 1 218 | } 219 | 220 | parseVirtualHeight2 (chunk) { 221 | const byte = chunk[0] 222 | this[kVirtualHeight] += (byte << (2 * 8)) >>> 0 223 | this[kParser] = this.parseVirtualHeight3 224 | this[kState] = INCOMPLETE 225 | return 1 226 | } 227 | 228 | parseVirtualHeight3 (chunk) { 229 | const byte = chunk[0] 230 | this[kVirtualHeight] += (byte << (3 * 8)) >>> 0 231 | this[kParser] = this.parseOrientation0 232 | this[kState] = INCOMPLETE 233 | return 1 234 | } 235 | 236 | parseOrientation0 (chunk) { 237 | const byte = chunk[0] 238 | this[kOrientation] = byte * 90 239 | this[kParser] = this.parseQuirks0 240 | this[kState] = INCOMPLETE 241 | return 1 242 | } 243 | 244 | parseQuirks0 (chunk) { 245 | const byte = chunk[0] 246 | this[kQuirks] = byte 247 | this[kParser] = this.parseVersion0 248 | this[kState] = COMPLETE 249 | return 1 250 | } 251 | 252 | parse (chunk) { 253 | for (let i = 0; i < chunk.length;) { 254 | i += this[kParser](chunk.slice(i)) 255 | switch (this[kState]) { 256 | case INCOMPLETE: 257 | break 258 | case COMPLETE: 259 | return this[kResult].update(this[kState], this.take(), chunk.slice(i)) 260 | case UNACCEPTABLE: 261 | return this[kResult].update(this[kState], null, chunk.slice(i)) 262 | } 263 | } 264 | return this[kResult].update(this[kState], null, chunk.slice(chunk.length)) 265 | } 266 | } 267 | 268 | module.exports = BannerParser 269 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | const { 2 | QUIRK_DUMB, 3 | QUIRK_ALWAYS_UPRIGHT, 4 | QUIRK_TEAR 5 | } = require('./quirks') 6 | 7 | const Banner = require('./banner') 8 | const BannerParser = require('./bannerparser') 9 | const Packet = require('./packet') 10 | const PacketParser = require('./packetparser') 11 | const Parser = require('./parser') 12 | const Result = require('./result') 13 | 14 | module.exports.QUIRK_DUMB = QUIRK_DUMB 15 | module.exports.QUIRK_ALWAYS_UPRIGHT = QUIRK_ALWAYS_UPRIGHT 16 | module.exports.QUIRK_TEAR = QUIRK_TEAR 17 | 18 | module.exports.Banner = Banner 19 | module.exports.BannerParser = BannerParser 20 | module.exports.Packet = Packet 21 | module.exports.PacketParser = PacketParser 22 | module.exports.Parser = Parser 23 | module.exports.Result = Result 24 | -------------------------------------------------------------------------------- /lib/packet.js: -------------------------------------------------------------------------------- 1 | class Packet { 2 | constructor (id, type, data) { 3 | this.id = id 4 | this.type = type 5 | this.data = data 6 | } 7 | 8 | toProtocol () { 9 | // Use allocUnsafe since we know we're filling the whole buffer. 10 | const buffer = Buffer.allocUnsafe(4 + 4 + this.data.length) 11 | buffer.writeUInt32LE(this.data.length + 8, 0) 12 | buffer.writeUInt32LE(this.type, 4) 13 | this.data.copy(buffer, 8) 14 | return buffer 15 | } 16 | } 17 | 18 | Packet.HELO = 0x68656c6f // hello 19 | Packet.MCH1 = 0x6d636831 // minicap header v1 20 | Packet.MCJD = 0x6d636a64 // minicap jpeg data 21 | 22 | module.exports = Packet 23 | -------------------------------------------------------------------------------- /lib/packetparser.js: -------------------------------------------------------------------------------- 1 | const Packet = require('./packet') 2 | const Result = require('./result') 3 | 4 | const kParser = Symbol('parser') 5 | const kState = Symbol('state') 6 | const kResult = Symbol('result') 7 | const kChunks = Symbol('chunks') 8 | const kLength = Symbol('length') 9 | const kType = Symbol('type') 10 | const kRead = Symbol('read') 11 | const kNextId = Symbol('nextId') 12 | 13 | const { 14 | INCOMPLETE, 15 | UNACCEPTABLE, 16 | COMPLETE 17 | } = Result 18 | 19 | class PacketParser { 20 | constructor () { 21 | this[kChunks] = [] 22 | this[kLength] = 0 23 | this[kType] = 0 24 | this[kRead] = 0 25 | this[kNextId] = 0 26 | this[kParser] = this.parseLength0 27 | this[kState] = INCOMPLETE 28 | this[kResult] = new Result() 29 | } 30 | 31 | take () { 32 | const buffer = Buffer.concat(this[kChunks], this[kLength] - 8) 33 | const type = this[kType] 34 | const id = this[kNextId] 35 | this[kNextId] += 1 36 | this[kChunks] = [] 37 | return new Packet(id, type, buffer) 38 | } 39 | 40 | parseLength0 (chunk) { 41 | // Optimization for when the length is in a single chunk. 42 | if (chunk.length >= 4) { 43 | this[kLength] = chunk.readUInt32LE(0) 44 | this[kParser] = this.parseType0 45 | this[kState] = INCOMPLETE 46 | return 4 47 | } 48 | const byte = chunk[0] 49 | this[kLength] = (byte << (0 * 8)) >>> 0 50 | this[kParser] = this.parseLength1 51 | this[kState] = INCOMPLETE 52 | return 1 53 | } 54 | 55 | parseLength1 (chunk) { 56 | const byte = chunk[0] 57 | this[kLength] += (byte << (1 * 8)) >>> 0 58 | this[kParser] = this.parseLength2 59 | this[kState] = INCOMPLETE 60 | return 1 61 | } 62 | 63 | parseLength2 (chunk) { 64 | const byte = chunk[0] 65 | this[kLength] += (byte << (2 * 8)) >>> 0 66 | this[kParser] = this.parseLength3 67 | this[kState] = INCOMPLETE 68 | return 1 69 | } 70 | 71 | parseLength3 (chunk) { 72 | const byte = chunk[0] 73 | this[kLength] += (byte << (3 * 8)) >>> 0 74 | this[kParser] = this.parseType0 75 | this[kState] = INCOMPLETE 76 | return 1 77 | } 78 | 79 | parseType0 (chunk) { 80 | // Optimization for when the type is in a single chunk. 81 | if (chunk.length >= 4) { 82 | this[kType] = chunk.readUInt32LE(0) 83 | this[kParser] = this.parseData 84 | this[kState] = this[kLength] === 8 ? COMPLETE : INCOMPLETE 85 | return 4 86 | } 87 | const byte = chunk[0] 88 | this[kType] = (byte << (0 * 8)) >>> 0 89 | this[kParser] = this.parseType1 90 | this[kState] = INCOMPLETE 91 | return 1 92 | } 93 | 94 | parseType1 (chunk) { 95 | const byte = chunk[0] 96 | this[kType] += (byte << (1 * 8)) >>> 0 97 | this[kParser] = this.parseType2 98 | this[kState] = INCOMPLETE 99 | return 1 100 | } 101 | 102 | parseType2 (chunk) { 103 | const byte = chunk[0] 104 | this[kType] += (byte << (2 * 8)) >>> 0 105 | this[kParser] = this.parseType3 106 | this[kState] = INCOMPLETE 107 | return 1 108 | } 109 | 110 | parseType3 (chunk) { 111 | const byte = chunk[0] 112 | this[kType] += (byte << (3 * 8)) >>> 0 113 | this[kParser] = this.parseData 114 | this[kState] = this[kLength] === 8 ? COMPLETE : INCOMPLETE 115 | return 1 116 | } 117 | 118 | parseData (chunk) { 119 | const recv = chunk.length 120 | const need = this[kLength] - 8 - this[kRead] 121 | 122 | if (need < 0) { 123 | this[kState] = UNACCEPTABLE 124 | return 0 125 | } 126 | 127 | if (recv >= need) { 128 | this[kChunks].push(chunk.slice(0, need)) 129 | this[kParser] = this.parseLength0 130 | this[kState] = COMPLETE 131 | this[kRead] = 0 132 | return need 133 | } 134 | 135 | this[kChunks].push(chunk) 136 | this[kState] = INCOMPLETE 137 | this[kRead] += recv 138 | return recv 139 | } 140 | 141 | parse (chunk) { 142 | for (let i = 0; i < chunk.length;) { 143 | i += this[kParser](chunk.slice(i)) 144 | switch (this[kState]) { 145 | case INCOMPLETE: 146 | break 147 | case COMPLETE: 148 | return this[kResult].update(this[kState], this.take(), chunk.slice(i)) 149 | case UNACCEPTABLE: 150 | return this[kResult].update(this[kState], null, chunk.slice(i)) 151 | } 152 | } 153 | return this[kResult].update(this[kState], null, chunk.slice(chunk.length)) 154 | } 155 | } 156 | 157 | module.exports = PacketParser 158 | -------------------------------------------------------------------------------- /lib/parser.js: -------------------------------------------------------------------------------- 1 | const PacketParser = require('./packetparser') 2 | const Result = require('./result') 3 | 4 | const kPacketParser = Symbol('packetParser') 5 | const kOnPacketAvailable = Symbol('onPacketAvailable') 6 | 7 | class Parser { 8 | constructor ({onPacketAvailable}) { 9 | this[kPacketParser] = new PacketParser() 10 | this[kOnPacketAvailable] = onPacketAvailable 11 | } 12 | 13 | parse (chunk) { 14 | const packetParser = this[kPacketParser] 15 | do { 16 | const result = packetParser.parse(chunk) 17 | switch (result.state) { 18 | case Result.COMPLETE: 19 | this[kOnPacketAvailable](result.take()) 20 | break 21 | case Result.UNACCEPTABLE: 22 | throw new Error('Unacceptable input data') 23 | } 24 | chunk = result.rest 25 | } while (chunk.length) 26 | } 27 | } 28 | 29 | module.exports = Parser 30 | -------------------------------------------------------------------------------- /lib/quirks.js: -------------------------------------------------------------------------------- 1 | const QUIRK_DUMB = 1 2 | const QUIRK_ALWAYS_UPRIGHT = 2 3 | const QUIRK_TEAR = 4 4 | 5 | module.exports.QUIRK_DUMB = QUIRK_DUMB 6 | module.exports.QUIRK_ALWAYS_UPRIGHT = QUIRK_ALWAYS_UPRIGHT 7 | module.exports.QUIRK_TEAR = QUIRK_TEAR 8 | -------------------------------------------------------------------------------- /lib/result.js: -------------------------------------------------------------------------------- 1 | const INCOMPLETE = Symbol('incomplete') 2 | const UNACCEPTABLE = Symbol('unacceptable') 3 | const COMPLETE = Symbol('complete') 4 | 5 | const kResult = Symbol('result') 6 | 7 | class Result { 8 | constructor () { 9 | this.state = INCOMPLETE 10 | this.rest = null 11 | this[kResult] = null 12 | } 13 | 14 | is (state) { 15 | return state === this.state 16 | } 17 | 18 | take () { 19 | const result = this[kResult] 20 | this[kResult] = null 21 | return result 22 | } 23 | 24 | update (state, result, rest) { 25 | this.state = state 26 | this.rest = rest 27 | this[kResult] = result 28 | return this 29 | } 30 | } 31 | 32 | Result.INCOMPLETE = INCOMPLETE 33 | Result.UNACCEPTABLE = UNACCEPTABLE 34 | Result.COMPLETE = COMPLETE 35 | 36 | module.exports = Result 37 | -------------------------------------------------------------------------------- /lib/sampler.js: -------------------------------------------------------------------------------- 1 | class Sample { 2 | constructor (item, time = Date.now()) { 3 | this.time = time 4 | this.item = item 5 | this.next = null 6 | } 7 | } 8 | 9 | class Sampler { 10 | constructor (limit) { 11 | this.head = null 12 | this.tail = null 13 | this.count = 0 14 | this.limit = limit 15 | } 16 | 17 | push (item) { 18 | const sample = new Sample(item, Date.now()) 19 | 20 | if (!this.head) { 21 | this.head = sample 22 | this.tail = sample 23 | this.count += 1 24 | return 25 | } 26 | 27 | while (this.count >= this.limit) { 28 | if (this.head === this.tail) { 29 | this.head = this.tail = this.head.next 30 | } else { 31 | this.head = this.head.next 32 | } 33 | this.count -= 1 34 | } 35 | 36 | this.tail.next = sample 37 | this.tail = sample 38 | this.count += 1 39 | } 40 | 41 | samplesPerInterval (ms) { 42 | if (!this.head) { 43 | return 0 44 | } 45 | 46 | const a = this.head.time 47 | const b = this.tail.time 48 | 49 | if (a === b) { 50 | return 0 51 | } 52 | 53 | return this.count * (ms / (b - a)) 54 | } 55 | 56 | isDecreasingInValue () { 57 | if (this.count < this.limit) { 58 | return false 59 | } 60 | 61 | let prev = this.head 62 | let item = prev.next 63 | 64 | while (item) { 65 | if (item.value >= prev.value) { 66 | return false 67 | } 68 | 69 | prev = item 70 | item = prev.next 71 | } 72 | 73 | return true 74 | } 75 | } 76 | 77 | module.exports = Sampler 78 | -------------------------------------------------------------------------------- /lib/transmitter.js: -------------------------------------------------------------------------------- 1 | const Sampler = require('./sampler') 2 | 3 | const kLatestProducedFrame = Symbol('latestProducedFrame') 4 | const kRenderBehindProduction = Symbol('renderBehindProduction') 5 | const kLastTransmittedFrameId = Symbol('lastTransmittedFrameId') 6 | const kLastReceivedFrameId = Symbol('lastReceivedFrameId') 7 | const kOnFrameReady = Symbol('onFrameReady') 8 | 9 | class Transmitter { 10 | constructor ({onFrameReady}) { 11 | this[kLatestProducedFrame] = null 12 | this[kRenderBehindProduction] = new Sampler(3) 13 | this[kLastTransmittedFrameId] = 0 14 | this[kLastReceivedFrameId] = 0 15 | this[kOnFrameReady] = onFrameReady 16 | } 17 | 18 | markReceived (frameId) { 19 | const diff = this[kLastTransmittedFrameId] - this[kLastReceivedFrameId] 20 | this[kLastReceivedFrameId] = frameId 21 | this[kRenderBehindProduction].push(diff) 22 | } 23 | 24 | shouldThrottleMore () { 25 | return this[kRenderBehindProduction].isDecreasingInValue() 26 | } 27 | 28 | howMuchBehind () { 29 | return this[kLastTransmittedFrameId] - this[kLastReceivedFrameId] 30 | } 31 | 32 | transmit () { 33 | const frame = this[kLatestProducedFrame] 34 | if (!frame) { 35 | return 36 | } 37 | this[kLastTransmittedFrameId] = frame.id 38 | this[kOnFrameReady](frame) 39 | } 40 | 41 | push (frame) { 42 | this[kLatestProducedFrame] = frame 43 | this.transmit() // 44 | } 45 | } 46 | 47 | module.exports = Transmitter 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@devicefarmer/minicap", 3 | "version": "0.2.3", 4 | "description": "A minicap driver for Node.", 5 | "keywords": [ 6 | "minicap" 7 | ], 8 | "bugs": { 9 | "url": "https://github.com/DeviceFarmer/node-minicap/issues" 10 | }, 11 | "license": "Apache-2.0", 12 | "author": { 13 | "name": "DeviceFarmer", 14 | "email": "contact@devicefarmer.com", 15 | "url": "https://devicefarmer.com" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/DeviceFarmer/node-minicap.git" 20 | }, 21 | "devDependencies": { 22 | "eslint": "^8.36.0", 23 | "eslint-config-standard": "^7.1.0", 24 | "eslint-plugin-promise": "^4.3.1", 25 | "eslint-plugin-standard": "^2.0.1", 26 | "terminal-kit": "^0.25.2" 27 | }, 28 | "scripts": { 29 | "test": "node test" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/bannerparser.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | 3 | const Banner = require('../lib/banner') 4 | const BannerParser = require('../lib/bannerparser') 5 | const Result = require('../lib/result') 6 | 7 | function shouldParseValidBannerFromIdealChunk () { 8 | const parser = new BannerParser() 9 | const expected = new Banner({ 10 | version: 1, 11 | length: 24, 12 | pid: 32038, 13 | realWidth: 1080, 14 | realHeight: 1920, 15 | virtualWidth: 720, 16 | virtualHeight: 1280, 17 | orientation: 90, 18 | quirks: 1 | 4 19 | }) 20 | const result = parser.parse(expected.toProtocol()) 21 | assert.equal(result.state, Result.COMPLETE) 22 | assert.deepEqual(result.take(), expected) 23 | assert.equal(result.rest.length, 0) 24 | } 25 | 26 | shouldParseValidBannerFromIdealChunk() 27 | 28 | function shouldParseValidBannerFromMultipleChunks () { 29 | const parser = new BannerParser() 30 | 31 | const expected = new Banner({ 32 | version: 1, 33 | length: 24, 34 | pid: 32038, 35 | realWidth: 1080, 36 | realHeight: 1920, 37 | virtualWidth: 720, 38 | virtualHeight: 1280, 39 | orientation: 90, 40 | quirks: 1 | 4 41 | }) 42 | 43 | const chunk = Buffer.concat([expected.toProtocol(), Buffer.alloc(4)]) 44 | 45 | const result1 = parser.parse(chunk.slice(0, 10)) 46 | assert.equal(result1.state, Result.INCOMPLETE) 47 | assert.equal(result1.take(), null) 48 | assert.equal(result1.rest.length, 0) 49 | 50 | const result2 = parser.parse(chunk.slice(10, 20)) 51 | assert.equal(result2.state, Result.INCOMPLETE) 52 | assert.equal(result2.take(), null) 53 | assert.equal(result2.rest.length, 0) 54 | 55 | const result3 = parser.parse(chunk.slice(20)) 56 | assert.equal(result3.state, Result.COMPLETE) 57 | assert.deepEqual(result3.take(), expected) 58 | assert.equal(result3.rest.length, 4) 59 | } 60 | 61 | shouldParseValidBannerFromMultipleChunks() 62 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | require('./bannerparser') 2 | require('./packetparser') 3 | require('./sampler') 4 | -------------------------------------------------------------------------------- /test/packetparser.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | 3 | const Packet = require('../lib/packet') 4 | const PacketParser = require('../lib/packetparser') 5 | const Result = require('../lib/result') 6 | 7 | function shouldParseValidPacketFromIdealChunk () { 8 | const parser = new PacketParser() 9 | const expected = new Packet(0, Packet.HELO, Buffer.alloc(20).fill(0xFF)) 10 | const result = parser.parse(expected.toProtocol()) 11 | assert.equal(result.state, Result.COMPLETE) 12 | assert.deepEqual(result.take(), expected) 13 | assert.equal(result.rest.length, 0) 14 | } 15 | 16 | function shouldParsePacketWithNoData () { 17 | const parser = new PacketParser() 18 | const expected = new Packet(0, Packet.MCH1, Buffer.alloc(0)) 19 | const result = parser.parse(expected.toProtocol()) 20 | assert.equal(result.state, Result.COMPLETE) 21 | assert.deepEqual(result.take(), expected) 22 | assert.equal(result.rest.length, 0) 23 | } 24 | 25 | function shouldParseValidPacketFromMultipleChunks () { 26 | const parser = new PacketParser() 27 | const expected = new Packet(0, Packet.MCH1, Buffer.alloc(100).fill(0xFF)) 28 | const chunk = Buffer.concat([expected.toProtocol(), Buffer.alloc(40)]) 29 | 30 | const result1 = parser.parse(chunk.slice(0, 10)) 31 | assert.equal(result1.state, Result.INCOMPLETE) 32 | assert.deepEqual(result1.take(), null) 33 | assert.equal(result1.rest.length, 0) 34 | 35 | const result2 = parser.parse(chunk.slice(10, 11)) 36 | assert.equal(result2.state, Result.INCOMPLETE) 37 | assert.deepEqual(result2.take(), null) 38 | assert.equal(result2.rest.length, 0) 39 | 40 | const result3 = parser.parse(chunk.slice(11, 80)) 41 | assert.equal(result3.state, Result.INCOMPLETE) 42 | assert.deepEqual(result3.take(), null) 43 | assert.equal(result3.rest.length, 0) 44 | 45 | const result4 = parser.parse(chunk.slice(80)) 46 | assert.equal(result4.state, Result.COMPLETE) 47 | assert.deepEqual(result4.take(), expected) 48 | assert.equal(result4.rest.length, 40) 49 | } 50 | 51 | function shouldParseMultiplePacketsFromChunk () { 52 | const parser = new PacketParser() 53 | 54 | const expected1 = new Packet(0, Packet.MCH1, Buffer.alloc(100).fill(0x01)) 55 | const expected2 = new Packet(1, Packet.MCJD, Buffer.alloc(5).fill(0x02)) 56 | const expected3 = new Packet(2, Packet.MCH1, Buffer.alloc(18).fill(0x03)) 57 | 58 | const chunk = Buffer.concat([ 59 | expected1.toProtocol(), 60 | expected2.toProtocol(), 61 | expected3.toProtocol() 62 | ]) 63 | 64 | const result1 = parser.parse(chunk) 65 | assert.equal(result1.state, Result.COMPLETE) 66 | assert.deepEqual(result1.take(), expected1) 67 | assert.equal(result1.rest.length, 8 + 5 + 8 + 18) 68 | 69 | const result2 = parser.parse(result1.rest) 70 | assert.equal(result2.state, Result.COMPLETE) 71 | assert.deepEqual(result2.take(), expected2) 72 | assert.equal(result2.rest.length, 8 + 18) 73 | 74 | const result3 = parser.parse(result2.rest) 75 | assert.equal(result3.state, Result.COMPLETE) 76 | assert.deepEqual(result3.take(), expected3) 77 | assert.equal(result3.rest.length, 0) 78 | } 79 | 80 | shouldParseValidPacketFromIdealChunk() 81 | shouldParsePacketWithNoData() 82 | shouldParseValidPacketFromMultipleChunks() 83 | shouldParseMultiplePacketsFromChunk() 84 | -------------------------------------------------------------------------------- /test/sampler.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | 3 | const Sampler = require('../lib/sampler') 4 | 5 | function shouldDiscardOldSamples () { 6 | const sampler = new Sampler(3) 7 | sampler.push(1) 8 | assert.equal(sampler.count, 1) 9 | sampler.push(2) 10 | assert.equal(sampler.count, 2) 11 | sampler.push(3) 12 | assert.equal(sampler.head.item, 1) 13 | assert.equal(sampler.count, 3) 14 | sampler.push(4) 15 | assert.equal(sampler.head.item, 2) 16 | assert.equal(sampler.count, 3) 17 | sampler.push(5) 18 | assert.equal(sampler.head.item, 3) 19 | assert.equal(sampler.count, 3) 20 | sampler.push(6) 21 | assert.equal(sampler.head.item, 4) 22 | assert.equal(sampler.count, 3) 23 | } 24 | 25 | shouldDiscardOldSamples() 26 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@eslint-community/eslint-utils@^4.2.0": 6 | version "4.2.0" 7 | resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz#a831e6e468b4b2b5ae42bf658bea015bf10bc518" 8 | dependencies: 9 | eslint-visitor-keys "^3.3.0" 10 | 11 | "@eslint-community/regexpp@^4.4.0": 12 | version "4.4.0" 13 | resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" 14 | 15 | "@eslint/eslintrc@^2.0.3": 16 | version "2.0.3" 17 | resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331" 18 | dependencies: 19 | ajv "^6.12.4" 20 | debug "^4.3.2" 21 | espree "^9.5.2" 22 | globals "^13.19.0" 23 | ignore "^5.2.0" 24 | import-fresh "^3.2.1" 25 | js-yaml "^4.1.0" 26 | minimatch "^3.1.2" 27 | strip-json-comments "^3.1.1" 28 | 29 | "@eslint/js@8.40.0": 30 | version "8.40.0" 31 | resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.40.0.tgz#3ba73359e11f5a7bd3e407f70b3528abfae69cec" 32 | 33 | "@humanwhocodes/config-array@^0.11.8": 34 | version "0.11.8" 35 | resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" 36 | dependencies: 37 | "@humanwhocodes/object-schema" "^1.2.1" 38 | debug "^4.1.1" 39 | minimatch "^3.0.5" 40 | 41 | "@humanwhocodes/module-importer@^1.0.1": 42 | version "1.0.1" 43 | resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" 44 | 45 | "@humanwhocodes/object-schema@^1.2.1": 46 | version "1.2.1" 47 | resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" 48 | 49 | "@nodelib/fs.scandir@2.1.5": 50 | version "2.1.5" 51 | resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" 52 | dependencies: 53 | "@nodelib/fs.stat" "2.0.5" 54 | run-parallel "^1.1.9" 55 | 56 | "@nodelib/fs.stat@2.0.5": 57 | version "2.0.5" 58 | resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" 59 | 60 | "@nodelib/fs.walk@^1.2.8": 61 | version "1.2.8" 62 | resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" 63 | dependencies: 64 | "@nodelib/fs.scandir" "2.1.5" 65 | fastq "^1.6.0" 66 | 67 | acorn-jsx@^5.3.2: 68 | version "5.3.2" 69 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" 70 | 71 | acorn@^8.8.0: 72 | version "8.8.2" 73 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" 74 | 75 | ajv@^6.10.0, ajv@^6.12.4: 76 | version "6.12.6" 77 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" 78 | dependencies: 79 | fast-deep-equal "^3.1.1" 80 | fast-json-stable-stringify "^2.0.0" 81 | json-schema-traverse "^0.4.1" 82 | uri-js "^4.2.2" 83 | 84 | ansi-regex@^5.0.1: 85 | version "5.0.1" 86 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 87 | 88 | ansi-styles@^4.1.0: 89 | version "4.3.0" 90 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 91 | dependencies: 92 | color-convert "^2.0.1" 93 | 94 | argparse@^2.0.1: 95 | version "2.0.1" 96 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" 97 | 98 | async-kit@^2.2.1: 99 | version "2.2.3" 100 | resolved "https://registry.yarnpkg.com/async-kit/-/async-kit-2.2.3.tgz#264751a279ddc5f59b419638b805ae2c49858fb7" 101 | dependencies: 102 | nextgen-events "^0.9.0" 103 | tree-kit "^0.5.26" 104 | 105 | balanced-match@^1.0.0: 106 | version "1.0.0" 107 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 108 | 109 | brace-expansion@^1.0.0, brace-expansion@^1.1.7: 110 | version "1.1.11" 111 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 112 | dependencies: 113 | balanced-match "^1.0.0" 114 | concat-map "0.0.1" 115 | 116 | browser-stdout@1.3.0: 117 | version "1.3.0" 118 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" 119 | 120 | callsites@^3.0.0: 121 | version "3.1.0" 122 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" 123 | 124 | chalk@^4.0.0: 125 | version "4.1.2" 126 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 127 | dependencies: 128 | ansi-styles "^4.1.0" 129 | supports-color "^7.1.0" 130 | 131 | cli@~1.0.0: 132 | version "1.0.1" 133 | resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" 134 | dependencies: 135 | exit "0.1.2" 136 | glob "^7.1.1" 137 | 138 | color-convert@^2.0.1: 139 | version "2.0.1" 140 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 141 | dependencies: 142 | color-name "~1.1.4" 143 | 144 | color-name@~1.1.4: 145 | version "1.1.4" 146 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 147 | 148 | commander@2.9.0: 149 | version "2.9.0" 150 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 151 | dependencies: 152 | graceful-readlink ">= 1.0.0" 153 | 154 | concat-map@0.0.1: 155 | version "0.0.1" 156 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 157 | 158 | console-browserify@1.1.x: 159 | version "1.1.0" 160 | resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" 161 | dependencies: 162 | date-now "^0.1.4" 163 | 164 | core-util-is@~1.0.0: 165 | version "1.0.2" 166 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 167 | 168 | cross-spawn@^7.0.2: 169 | version "7.0.3" 170 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" 171 | dependencies: 172 | path-key "^3.1.0" 173 | shebang-command "^2.0.0" 174 | which "^2.0.1" 175 | 176 | date-now@^0.1.4: 177 | version "0.1.4" 178 | resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" 179 | 180 | debug@2.2.0: 181 | version "2.2.0" 182 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" 183 | dependencies: 184 | ms "0.7.1" 185 | 186 | debug@^4.1.1, debug@^4.3.2: 187 | version "4.3.4" 188 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" 189 | dependencies: 190 | ms "2.1.2" 191 | 192 | deep-is@^0.1.3: 193 | version "0.1.4" 194 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" 195 | 196 | diff@1.4.0: 197 | version "1.4.0" 198 | resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" 199 | 200 | doctrine@^3.0.0: 201 | version "3.0.0" 202 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" 203 | dependencies: 204 | esutils "^2.0.2" 205 | 206 | dom-serializer@0: 207 | version "0.1.0" 208 | resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" 209 | dependencies: 210 | domelementtype "~1.1.1" 211 | entities "~1.1.1" 212 | 213 | domelementtype@1: 214 | version "1.3.0" 215 | resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" 216 | 217 | domelementtype@~1.1.1: 218 | version "1.1.3" 219 | resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" 220 | 221 | domhandler@2.3: 222 | version "2.3.0" 223 | resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" 224 | dependencies: 225 | domelementtype "1" 226 | 227 | domutils@1.5: 228 | version "1.5.1" 229 | resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" 230 | dependencies: 231 | dom-serializer "0" 232 | domelementtype "1" 233 | 234 | entities@1.0: 235 | version "1.0.0" 236 | resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" 237 | 238 | entities@~1.1.1: 239 | version "1.1.1" 240 | resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" 241 | 242 | escape-string-regexp@1.0.5: 243 | version "1.0.5" 244 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 245 | 246 | escape-string-regexp@^4.0.0: 247 | version "4.0.0" 248 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" 249 | 250 | eslint-config-standard@^7.1.0: 251 | version "7.1.0" 252 | resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-7.1.0.tgz#47e769ea0739f5b2d5693b1a501c21c9650fafcf" 253 | 254 | eslint-plugin-promise@^4.3.1: 255 | version "4.3.1" 256 | resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" 257 | 258 | eslint-plugin-standard@^2.0.1: 259 | version "2.3.1" 260 | resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.3.1.tgz#6765bd2a6d9ecdc7bdf1b145ae4bb30e2b7b86f8" 261 | 262 | eslint-scope@^7.2.0: 263 | version "7.2.0" 264 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" 265 | dependencies: 266 | esrecurse "^4.3.0" 267 | estraverse "^5.2.0" 268 | 269 | eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: 270 | version "3.4.1" 271 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" 272 | 273 | eslint@^8.36.0: 274 | version "8.40.0" 275 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.40.0.tgz#a564cd0099f38542c4e9a2f630fa45bf33bc42a4" 276 | dependencies: 277 | "@eslint-community/eslint-utils" "^4.2.0" 278 | "@eslint-community/regexpp" "^4.4.0" 279 | "@eslint/eslintrc" "^2.0.3" 280 | "@eslint/js" "8.40.0" 281 | "@humanwhocodes/config-array" "^0.11.8" 282 | "@humanwhocodes/module-importer" "^1.0.1" 283 | "@nodelib/fs.walk" "^1.2.8" 284 | ajv "^6.10.0" 285 | chalk "^4.0.0" 286 | cross-spawn "^7.0.2" 287 | debug "^4.3.2" 288 | doctrine "^3.0.0" 289 | escape-string-regexp "^4.0.0" 290 | eslint-scope "^7.2.0" 291 | eslint-visitor-keys "^3.4.1" 292 | espree "^9.5.2" 293 | esquery "^1.4.2" 294 | esutils "^2.0.2" 295 | fast-deep-equal "^3.1.3" 296 | file-entry-cache "^6.0.1" 297 | find-up "^5.0.0" 298 | glob-parent "^6.0.2" 299 | globals "^13.19.0" 300 | grapheme-splitter "^1.0.4" 301 | ignore "^5.2.0" 302 | import-fresh "^3.0.0" 303 | imurmurhash "^0.1.4" 304 | is-glob "^4.0.0" 305 | is-path-inside "^3.0.3" 306 | js-sdsl "^4.1.4" 307 | js-yaml "^4.1.0" 308 | json-stable-stringify-without-jsonify "^1.0.1" 309 | levn "^0.4.1" 310 | lodash.merge "^4.6.2" 311 | minimatch "^3.1.2" 312 | natural-compare "^1.4.0" 313 | optionator "^0.9.1" 314 | strip-ansi "^6.0.1" 315 | strip-json-comments "^3.1.0" 316 | text-table "^0.2.0" 317 | 318 | espree@^9.5.2: 319 | version "9.5.2" 320 | resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" 321 | dependencies: 322 | acorn "^8.8.0" 323 | acorn-jsx "^5.3.2" 324 | eslint-visitor-keys "^3.4.1" 325 | 326 | esquery@^1.4.2: 327 | version "1.5.0" 328 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" 329 | dependencies: 330 | estraverse "^5.1.0" 331 | 332 | esrecurse@^4.3.0: 333 | version "4.3.0" 334 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" 335 | dependencies: 336 | estraverse "^5.2.0" 337 | 338 | estraverse@^5.1.0, estraverse@^5.2.0: 339 | version "5.3.0" 340 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" 341 | 342 | esutils@^2.0.2: 343 | version "2.0.2" 344 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 345 | 346 | exit@0.1.2, exit@0.1.x: 347 | version "0.1.2" 348 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 349 | 350 | fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: 351 | version "3.1.3" 352 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" 353 | 354 | fast-json-stable-stringify@^2.0.0: 355 | version "2.1.0" 356 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 357 | 358 | fast-levenshtein@^2.0.6: 359 | version "2.0.6" 360 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 361 | 362 | fastq@^1.6.0: 363 | version "1.15.0" 364 | resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" 365 | dependencies: 366 | reusify "^1.0.4" 367 | 368 | file-entry-cache@^6.0.1: 369 | version "6.0.1" 370 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" 371 | dependencies: 372 | flat-cache "^3.0.4" 373 | 374 | find-up@^5.0.0: 375 | version "5.0.0" 376 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" 377 | dependencies: 378 | locate-path "^6.0.0" 379 | path-exists "^4.0.0" 380 | 381 | flat-cache@^3.0.4: 382 | version "3.0.4" 383 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" 384 | dependencies: 385 | flatted "^3.1.0" 386 | rimraf "^3.0.2" 387 | 388 | flatted@^3.1.0: 389 | version "3.2.7" 390 | resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" 391 | 392 | fs.realpath@^1.0.0: 393 | version "1.0.0" 394 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 395 | 396 | glob-parent@^6.0.2: 397 | version "6.0.2" 398 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" 399 | dependencies: 400 | is-glob "^4.0.3" 401 | 402 | glob@7.0.5: 403 | version "7.0.5" 404 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" 405 | dependencies: 406 | fs.realpath "^1.0.0" 407 | inflight "^1.0.4" 408 | inherits "2" 409 | minimatch "^3.0.2" 410 | once "^1.3.0" 411 | path-is-absolute "^1.0.0" 412 | 413 | glob@^7.1.1: 414 | version "7.1.1" 415 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 416 | dependencies: 417 | fs.realpath "^1.0.0" 418 | inflight "^1.0.4" 419 | inherits "2" 420 | minimatch "^3.0.2" 421 | once "^1.3.0" 422 | path-is-absolute "^1.0.0" 423 | 424 | glob@^7.1.3: 425 | version "7.2.3" 426 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" 427 | dependencies: 428 | fs.realpath "^1.0.0" 429 | inflight "^1.0.4" 430 | inherits "2" 431 | minimatch "^3.1.1" 432 | once "^1.3.0" 433 | path-is-absolute "^1.0.0" 434 | 435 | globals@^13.19.0: 436 | version "13.20.0" 437 | resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" 438 | dependencies: 439 | type-fest "^0.20.2" 440 | 441 | "graceful-readlink@>= 1.0.0": 442 | version "1.0.1" 443 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 444 | 445 | grapheme-splitter@^1.0.4: 446 | version "1.0.4" 447 | resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" 448 | 449 | growl@1.9.2: 450 | version "1.9.2" 451 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" 452 | 453 | has-flag@^1.0.0: 454 | version "1.0.0" 455 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" 456 | 457 | has-flag@^4.0.0: 458 | version "4.0.0" 459 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 460 | 461 | htmlparser2@3.8.x: 462 | version "3.8.3" 463 | resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" 464 | dependencies: 465 | domelementtype "1" 466 | domhandler "2.3" 467 | domutils "1.5" 468 | entities "1.0" 469 | readable-stream "1.1" 470 | 471 | ignore@^5.2.0: 472 | version "5.2.4" 473 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" 474 | 475 | import-fresh@^3.0.0, import-fresh@^3.2.1: 476 | version "3.3.0" 477 | resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" 478 | dependencies: 479 | parent-module "^1.0.0" 480 | resolve-from "^4.0.0" 481 | 482 | imurmurhash@^0.1.4: 483 | version "0.1.4" 484 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 485 | 486 | inflight@^1.0.4: 487 | version "1.0.6" 488 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 489 | dependencies: 490 | once "^1.3.0" 491 | wrappy "1" 492 | 493 | inherits@2, inherits@~2.0.1: 494 | version "2.0.3" 495 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 496 | 497 | is-extglob@^2.1.1: 498 | version "2.1.1" 499 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 500 | 501 | is-glob@^4.0.0, is-glob@^4.0.3: 502 | version "4.0.3" 503 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 504 | dependencies: 505 | is-extglob "^2.1.1" 506 | 507 | is-path-inside@^3.0.3: 508 | version "3.0.3" 509 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" 510 | 511 | isarray@0.0.1: 512 | version "0.0.1" 513 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" 514 | 515 | isexe@^2.0.0: 516 | version "2.0.0" 517 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 518 | 519 | js-sdsl@^4.1.4: 520 | version "4.3.0" 521 | resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711" 522 | 523 | js-yaml@^4.1.0: 524 | version "4.1.0" 525 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" 526 | dependencies: 527 | argparse "^2.0.1" 528 | 529 | jshint@^2.9.4: 530 | version "2.9.4" 531 | resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.4.tgz#5e3ba97848d5290273db514aee47fe24cf592934" 532 | dependencies: 533 | cli "~1.0.0" 534 | console-browserify "1.1.x" 535 | exit "0.1.x" 536 | htmlparser2 "3.8.x" 537 | lodash "3.7.x" 538 | minimatch "~3.0.2" 539 | shelljs "0.3.x" 540 | strip-json-comments "1.0.x" 541 | 542 | json-schema-traverse@^0.4.1: 543 | version "0.4.1" 544 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 545 | 546 | json-stable-stringify-without-jsonify@^1.0.1: 547 | version "1.0.1" 548 | resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 549 | 550 | json3@3.3.2: 551 | version "3.3.2" 552 | resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" 553 | 554 | levn@^0.4.1: 555 | version "0.4.1" 556 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" 557 | dependencies: 558 | prelude-ls "^1.2.1" 559 | type-check "~0.4.0" 560 | 561 | locate-path@^6.0.0: 562 | version "6.0.0" 563 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" 564 | dependencies: 565 | p-locate "^5.0.0" 566 | 567 | lodash._baseassign@^3.0.0: 568 | version "3.2.0" 569 | resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" 570 | dependencies: 571 | lodash._basecopy "^3.0.0" 572 | lodash.keys "^3.0.0" 573 | 574 | lodash._basecopy@^3.0.0: 575 | version "3.0.1" 576 | resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" 577 | 578 | lodash._basecreate@^3.0.0: 579 | version "3.0.3" 580 | resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" 581 | 582 | lodash._getnative@^3.0.0: 583 | version "3.9.1" 584 | resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" 585 | 586 | lodash._isiterateecall@^3.0.0: 587 | version "3.0.9" 588 | resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" 589 | 590 | lodash.create@3.1.1: 591 | version "3.1.1" 592 | resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" 593 | dependencies: 594 | lodash._baseassign "^3.0.0" 595 | lodash._basecreate "^3.0.0" 596 | lodash._isiterateecall "^3.0.0" 597 | 598 | lodash.isarguments@^3.0.0: 599 | version "3.1.0" 600 | resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" 601 | 602 | lodash.isarray@^3.0.0: 603 | version "3.0.4" 604 | resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" 605 | 606 | lodash.keys@^3.0.0: 607 | version "3.1.2" 608 | resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" 609 | dependencies: 610 | lodash._getnative "^3.0.0" 611 | lodash.isarguments "^3.0.0" 612 | lodash.isarray "^3.0.0" 613 | 614 | lodash.merge@^4.6.2: 615 | version "4.6.2" 616 | resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" 617 | 618 | lodash@3.7.x: 619 | version "3.7.0" 620 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" 621 | 622 | minimatch@^3.0.2, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: 623 | version "3.1.2" 624 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" 625 | dependencies: 626 | brace-expansion "^1.1.7" 627 | 628 | minimatch@~3.0.2: 629 | version "3.0.3" 630 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 631 | dependencies: 632 | brace-expansion "^1.0.0" 633 | 634 | minimist@0.0.8: 635 | version "0.0.8" 636 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 637 | 638 | mkdirp@0.5.1: 639 | version "0.5.1" 640 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 641 | dependencies: 642 | minimist "0.0.8" 643 | 644 | mocha@^3.1.2: 645 | version "3.1.2" 646 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.1.2.tgz#51f93b432bf7e1b175ffc22883ccd0be32dba6b5" 647 | dependencies: 648 | browser-stdout "1.3.0" 649 | commander "2.9.0" 650 | debug "2.2.0" 651 | diff "1.4.0" 652 | escape-string-regexp "1.0.5" 653 | glob "7.0.5" 654 | growl "1.9.2" 655 | json3 "3.3.2" 656 | lodash.create "3.1.1" 657 | mkdirp "0.5.1" 658 | supports-color "3.1.2" 659 | 660 | ms@0.7.1: 661 | version "0.7.1" 662 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" 663 | 664 | ms@2.1.2: 665 | version "2.1.2" 666 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 667 | 668 | natural-compare@^1.4.0: 669 | version "1.4.0" 670 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 671 | 672 | nextgen-events@^0.9.0, nextgen-events@^0.9.8: 673 | version "0.9.8" 674 | resolved "https://registry.yarnpkg.com/nextgen-events/-/nextgen-events-0.9.8.tgz#ed1712c2b37dad55407b3e941672d1568c3a4630" 675 | 676 | once@^1.3.0: 677 | version "1.4.0" 678 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 679 | dependencies: 680 | wrappy "1" 681 | 682 | optionator@^0.9.1: 683 | version "0.9.1" 684 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" 685 | dependencies: 686 | deep-is "^0.1.3" 687 | fast-levenshtein "^2.0.6" 688 | levn "^0.4.1" 689 | prelude-ls "^1.2.1" 690 | type-check "^0.4.0" 691 | word-wrap "^1.2.3" 692 | 693 | p-limit@^3.0.2: 694 | version "3.1.0" 695 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" 696 | dependencies: 697 | yocto-queue "^0.1.0" 698 | 699 | p-locate@^5.0.0: 700 | version "5.0.0" 701 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" 702 | dependencies: 703 | p-limit "^3.0.2" 704 | 705 | parent-module@^1.0.0: 706 | version "1.0.1" 707 | resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" 708 | dependencies: 709 | callsites "^3.0.0" 710 | 711 | path-exists@^4.0.0: 712 | version "4.0.0" 713 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 714 | 715 | path-is-absolute@^1.0.0: 716 | version "1.0.1" 717 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 718 | 719 | path-key@^3.1.0: 720 | version "3.1.1" 721 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 722 | 723 | prelude-ls@^1.2.1: 724 | version "1.2.1" 725 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" 726 | 727 | punycode@^2.1.0: 728 | version "2.3.0" 729 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" 730 | 731 | queue-microtask@^1.2.2: 732 | version "1.2.3" 733 | resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" 734 | 735 | readable-stream@1.1: 736 | version "1.1.13" 737 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" 738 | dependencies: 739 | core-util-is "~1.0.0" 740 | inherits "~2.0.1" 741 | isarray "0.0.1" 742 | string_decoder "~0.10.x" 743 | 744 | resolve-from@^4.0.0: 745 | version "4.0.0" 746 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" 747 | 748 | reusify@^1.0.4: 749 | version "1.0.4" 750 | resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" 751 | 752 | rimraf@^3.0.2: 753 | version "3.0.2" 754 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" 755 | dependencies: 756 | glob "^7.1.3" 757 | 758 | run-parallel@^1.1.9: 759 | version "1.2.0" 760 | resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" 761 | dependencies: 762 | queue-microtask "^1.2.2" 763 | 764 | shebang-command@^2.0.0: 765 | version "2.0.0" 766 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 767 | dependencies: 768 | shebang-regex "^3.0.0" 769 | 770 | shebang-regex@^3.0.0: 771 | version "3.0.0" 772 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 773 | 774 | shelljs@0.3.x: 775 | version "0.3.0" 776 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" 777 | 778 | string-kit@^0.5.12: 779 | version "0.5.12" 780 | resolved "https://registry.yarnpkg.com/string-kit/-/string-kit-0.5.12.tgz#8b4c151304fb94d955bcfa3f900fd6e225b9702f" 781 | dependencies: 782 | tree-kit "^0.5.24" 783 | 784 | string_decoder@~0.10.x: 785 | version "0.10.31" 786 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" 787 | 788 | strip-ansi@^6.0.1: 789 | version "6.0.1" 790 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 791 | dependencies: 792 | ansi-regex "^5.0.1" 793 | 794 | strip-json-comments@1.0.x: 795 | version "1.0.4" 796 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" 797 | 798 | strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: 799 | version "3.1.1" 800 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" 801 | 802 | supports-color@3.1.2: 803 | version "3.1.2" 804 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" 805 | dependencies: 806 | has-flag "^1.0.0" 807 | 808 | supports-color@^7.1.0: 809 | version "7.2.0" 810 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 811 | dependencies: 812 | has-flag "^4.0.0" 813 | 814 | terminal-kit: 815 | version "0.25.2" 816 | resolved "https://registry.yarnpkg.com/terminal-kit/-/terminal-kit-0.25.2.tgz#587f7a4dbc5ea778b4df2236136a6c19357a7fbf" 817 | dependencies: 818 | async-kit "^2.2.1" 819 | jshint "^2.9.4" 820 | mocha "^3.1.2" 821 | nextgen-events "^0.9.8" 822 | string-kit "^0.5.12" 823 | tree-kit "^0.5.26" 824 | 825 | text-table@^0.2.0: 826 | version "0.2.0" 827 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 828 | 829 | tree-kit@^0.5.24, tree-kit@^0.5.26: 830 | version "0.5.26" 831 | resolved "https://registry.yarnpkg.com/tree-kit/-/tree-kit-0.5.26.tgz#8571c86fa24d1db754e5b0cb3a7e09f41e74a8df" 832 | 833 | type-check@^0.4.0, type-check@~0.4.0: 834 | version "0.4.0" 835 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" 836 | dependencies: 837 | prelude-ls "^1.2.1" 838 | 839 | type-fest@^0.20.2: 840 | version "0.20.2" 841 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" 842 | 843 | uri-js@^4.2.2: 844 | version "4.4.1" 845 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" 846 | dependencies: 847 | punycode "^2.1.0" 848 | 849 | which@^2.0.1: 850 | version "2.0.2" 851 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 852 | dependencies: 853 | isexe "^2.0.0" 854 | 855 | word-wrap@^1.2.3: 856 | version "1.2.3" 857 | resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" 858 | 859 | wrappy@1: 860 | version "1.0.2" 861 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 862 | 863 | yocto-queue@^0.1.0: 864 | version "0.1.0" 865 | resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" 866 | --------------------------------------------------------------------------------