├── .gitignore ├── LICENSE ├── README.md ├── lib ├── bagpipes.js ├── fittingTypes │ ├── connect-middleware.js │ ├── node-machine.js │ ├── swagger.js │ ├── system.js │ └── user.js ├── fittings │ ├── amend.js │ ├── emit.js │ ├── eval.js │ ├── first.js │ ├── http.js │ ├── jspath.js │ ├── memo.js │ ├── omit.js │ ├── onError.js │ ├── parallel.js │ ├── parse.js │ ├── path.js │ ├── pick.js │ ├── read.js │ ├── render.js │ └── values.js ├── helpers.js └── index.js ├── package-lock.json ├── package.json └── test ├── bagpipes.js ├── fittings └── http.js └── fixtures └── fittings ├── emit.js ├── error.js ├── test.js └── this_is_20_character.js /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE files 2 | .idea 3 | 4 | # Logs 5 | logs 6 | *.log 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | 13 | # Directory for instrumented libs generated by jscoverage/JSCover 14 | lib-cov 15 | 16 | # Coverage directory used by tools like istanbul 17 | coverage 18 | 19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 20 | .grunt 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # Commenting this out is preferred by some people, see 27 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 28 | node_modules 29 | 30 | # Users Environment Variables 31 | .lock-wscript 32 | 33 | .nyc_output 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Apigee Corporation 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bagpipes 2 | 3 | [![Coverage Status](https://coveralls.io/repos/github/apigee-127/bagpipes/badge.svg?branch=master)](https://coveralls.io/github/apigee-127/bagpipes?branch=master) 4 | 5 | 6 | ### NOTE: THIS IS PRE-RELEASE SOFTWARE - SUBJECT TO CHANGE ### 7 | 8 | ** Quick Reference links: ** 9 | 10 | * [Installation](#installation) 11 | * [Pipes](#pipes) 12 | * [Parallel Execution](#parallel-execution) 13 | * [Context](#context) 14 | * [Error Handling](#error-handling) 15 | * [Fittings](#fittings) 16 | * [System Fittings](#system-fittings) 17 | * [User Defined Fittings](#user-defined-fittings) 18 | * [Debugging](#debugging) 19 | * [Change Log](#change-log) 20 | 21 | ## What is Bagpipes? 22 | 23 | Bagpipes was developed as a way to enable API flows and mashups to be created declaratively in YAML (or JSON) 24 | without writing code. It works a lot like functional programming... there's no global state, data is just 25 | passed from one function to the next down the line until we're done. (Similar to connect middleware.) 26 | 27 | For example, to expose an API to get the latitude and longitude of an address using Google's Geocode API, one 28 | could simply define a flow that looks like this: 29 | 30 | ```yaml 31 | # 1. Define a http callout we'll use in our pipe 32 | google_geocode: 33 | name: http 34 | input: 35 | url: http://maps.googleapis.com/maps/api/geocode/json?sensor=true 36 | params: 37 | address: .request.parameters.address.value[0] 38 | 39 | # 2. Defined the pipe flow we'll play 40 | getAddressLocation: 41 | - google_geocode # call the fitting defined in this swagger 42 | - path: body # system fitting: get body from output 43 | - parse: json # body is a json string, parse to object 44 | - path: results # get results from body 45 | - first # get first result 46 | - path: geometry.location # output = { lat: n, lng: n } 47 | ``` 48 | 49 | But that's just a quick example, you can do much, much more... including filtering, error handling, and even 50 | parallel handling like mashup HTTP requests to multiple services. 51 | 52 | ## Getting started 53 | 54 | Here's a simple, self-contained "Hello, World" example you can run: 55 | 56 | ```js 57 | var bagpipes = require('bagpipes'); 58 | 59 | var pipesDefs = { 60 | HelloWorld: [ 61 | { emit: 'Hello, World!' } 62 | ] 63 | }; 64 | 65 | var pipesConfig = {}; 66 | var pipes = bagpipes.create(pipesDefs, pipesConfig); 67 | var pipe = pipes.getPipe('HelloWorld'); 68 | 69 | // log the output to standard out 70 | pipe.fit(function(context, cb) { 71 | console.log(context.output); 72 | cb(null, context); 73 | }); 74 | 75 | var context = {}; 76 | pipes.play(pipe, context); 77 | ``` 78 | 79 | As you can see, the pipe in the hello world above is defined programmatically. This is perfectly ok, but 80 | in general, you'll probably want load your pipe definitions from a YAML file something like this: 81 | 82 | ```yaml 83 | HelloWorld: 84 | - emit: 'Hello, World!' 85 | ``` 86 | 87 | ```js 88 | var bagpipes = require('bagpipes'); 89 | var yaml = require('js-yaml'); 90 | 91 | var pipesDefs = yaml.safeLoad(fs.readFileSync('HelloWorld.yaml')); 92 | var pipes = bagpipes.create(pipesDefs, pipesConfig); 93 | var pipe = pipes.getPipe('HelloWorld'); 94 | 95 | // log the output to standard out 96 | pipe.fit(function(context, cb) { 97 | console.log(context.output); 98 | cb(null, context); 99 | }); 100 | 101 | var context = {}; 102 | pipes.play(pipe, context); 103 | ``` 104 | 105 | Either way, have fun! 106 | 107 | ## Fittings 108 | 109 | So what are these things called "fittings"? Well, simply, if a pipe is a list of steps, a fitting describes 110 | what a single step actually accomplishes. 111 | 112 | Let's take a very simple example: Say we have some data that looks like this: 113 | 114 | ```js 115 | [ { "name": "Scott", "city": "Los Angeles" } 116 | { "name": "Jeff", "city": "San Francisco" } ] 117 | ``` 118 | 119 | Now, we'll create a pipe that just retrieves the first name. In the definition below, we've defined a pipe called 120 | "getFirstUserName" that consists of a couple of system-provided fittings: 121 | 122 | ```yaml 123 | getFirstUserName: 124 | - first 125 | - path: name 126 | ``` 127 | 128 | The "first" fitting selects the first element of an array passed in. The "path" fitting selects the "user" attribute 129 | from the object passed on by the first fitting. Thus, the result from our example is "Scott". 130 | 131 | Or, say we want to get all the names from our data as an array. We could simply do it like this: 132 | 133 | ```yaml 134 | getUserNames: 135 | - pick: name 136 | ``` 137 | 138 | Obviously, these are trivial examples, but you can create pipes as long and as complex as you wish. In fact, you can 139 | even write your own special-purpose fittings. We'll get to that [later](#user-defined-fittings). 140 | 141 | ### Fitting Definition 142 | 143 | When you want to use a fitting in your pipe, you have 2 options: 144 | 145 | 1. A system or user fitting with zero or one input can be defined in-line, as we have shown above. 146 | 2. A fitting with configuration or more complex inputs may need to be defined before use. 147 | 148 | Let's look at the 2nd type. Here's an example of a fitting that calls out to an API with a URL that looks like 149 | something like this: http://maps.googleapis.com/maps/api/geocode/json?sensor=true?address=Los%20Angeles. And, of 150 | course, we'll want to make the address dynamic. This requires a a little bit of configuration: We need to tell the 151 | "http" fitting the URL, the operation, and what parameters to use (and how to get them): 152 | 153 | ```yaml 154 | geocode: 155 | name: http 156 | input: 157 | operation: get 158 | url: http://maps.googleapis.com/maps/api/geocode/json 159 | params: 160 | sensor: true 161 | address: .output.address[0] 162 | ``` 163 | 164 | As you can see above, we've give our fitting a name ("geocode") and specified which type of fitting we're creating 165 | (a "system" fitting called "http"). This fitting requires several inputs including the HTTP operation, the URL, and 166 | parameters to pass. Each of these is just a static string in this case except for the "address" parameter. The 167 | address is merely retrieved by picking the "address" property from the "output" object of whatever fitting came 168 | before it in the pipe. (Note: There are several options for input sources that will be defined later.) 169 | 170 | By default, the output of this operation will be placed on the pipe in the "output" variable for the next fitting 171 | to use - or to be returned to the client if it's the last fitting to execute. 172 | 173 | ----- 174 | 175 | # Reference 176 | 177 | ## Pipe 178 | 179 | A Pipe is just defined in YAML as an Array. It can be reference by its key and can reference other pipes and fittings by 180 | their keys. Each step in a pipe may be one of the following: 181 | 182 | 1. A pipe name 183 | 2. A fitting name (with an optional value) 184 | 3. An set of key/value pairs defining pipes to be performed in parallel 185 | 186 | If a fitting reference includes a value, that value will be emitted onto the output for the fitting to consume. Most 187 | of the system fittings are able to operate solely on the output without any additional configuration - similar to a 188 | Unix pipe. 189 | 190 | ### Parallel Execution 191 | 192 | Generally, a pipe flows from top to bottom in serial manner. However, in some cases it is desirable to execute two 193 | pipes in parallel (for example, a mashup of two external APIs). 194 | 195 | Parallel execution of pipes can be done by using key/value pairs on the pipe in place of a single step. The output 196 | from each pipe will be assigned to the key associated with it. It's probably easiest to explain by example: 197 | 198 | ```yaml 199 | getRestaurantsAndWeather: 200 | - getAddressLocation 201 | - restaurants: getRestaurants 202 | weather: getWeather 203 | ``` 204 | 205 | This pipe will first flow through getAddressLocation step. Then, because the restaurants and weather keys are both on 206 | the same step, it will execute the getRestaurants and getWeather pipes concurrently. The final output of this pipe 207 | will be an object that looks like this: { restaurants: {...}, weather: {...} } where the values will be the output 208 | from the respective pipes. 209 | 210 | ### Context 211 | 212 | The context object that is passed through the pipe has the following properties that should be generally used by the 213 | fittings to accept input and deliver output via the pipe to other fittings or to the client: 214 | 215 | * **input**: the input defined in the fitting definition (string, number, object, array) 216 | * **output**: output to be delivered to the next fitting or client 217 | 218 | In addition, the context has the following properties that should not be modified - and, in general, you shouldn't 219 | need to access them at all: 220 | 221 | * **_errorHandler**: the pipe played if an error occurs in the pipe 222 | * **_finish**: a final fitting or pipe run once the pipe has finished (error or not) 223 | 224 | Finally, the context object itself will contain any properties that you've assigned to it via the 'output' option on 225 | your fitting definition. 226 | 227 | Notes: 228 | 229 | The context object is extensible as well. The names listed above as well as any name starting with '_' should be 230 | considered reserved, but you may assign other additional properties to the context should you need it for communication 231 | between fittings (see also the [memo](#memo) fitting). 232 | 233 | ### Error Handling 234 | 235 | You may install a custom error handler pipe by specifying them using the system [onError](#onError) fitting. (As 236 | you might guess, this actually sets the _errorHandler property on context.) 237 | 238 | ## Fittings 239 | 240 | All fittings may have the following values (all of which are optional): 241 | 242 | * **type**: one of: system, user, swagger, node-machine 243 | * **name**: the name of the fitting of the type specified 244 | * **config**: static values passed to the fitting during construction 245 | * **input**: dynamic values passed to the fitting during execution 246 | * **output**: The name of the context key to which the output value is assigned 247 | 248 | #### Type 249 | 250 | If type is omitted (as it must be for in-line usage), Bagpipes will first check the user fittings then the 251 | system fittings for the name and use the first fitting found. Thus be aware that if you define a fitting with the 252 | same name as a system one, your fitting will override it. 253 | 254 | #### Input 255 | 256 | The **input** may be a hash, array, or constant. The value or sub-values of the input is defined as either: 257 | 258 | * a constant string or number value 259 | * a **reference** to a value 260 | 261 | A **reference** is a value populated either from data on the request or from the output of previous fittings on the 262 | pipe. It is defined like so: 263 | 264 | ```yaml 265 | key: # the variable name (key) on context.input to which the value is assigned 266 | path: '' # the variable to pick from context using [json path syntax](https://www.npmjs.com/package/jspath) 267 | default: '' # (optional) value to assign if the referenced value is undefined 268 | ``` 269 | 270 | Note: If there is no input definition, input will be assigned to the prior fitting's output. 271 | 272 | See also [Context](#context) for more information. 273 | 274 | 275 | #### System Fittings 276 | 277 | There are 2 basic types of system fittings: Internal fittings that just modify output in a flow and those that are 278 | callouts to other systems. These are listed below by category: 279 | 280 | ##### Internal Fittings 281 | 282 | ###### amend: input 283 | 284 | Amend the pipe output by copying the fields from input. Overrides output. Input and output must be objects. 285 | 286 | ###### emit: input 287 | 288 | Emit the fitting's input onto onto the pipe output. 289 | 290 | ###### eval: 'script' 291 | 292 | Used for testing and will likely be removed, but evaluates provided javascript directly. 293 | 294 | ###### first 295 | 296 | Select the first element from an array. 297 | 298 | ###### jspath: jspath 299 | 300 | Selects output using [json path](https://www.npmjs.com/package/jspath) syntax. 301 | 302 | ###### memo: key 303 | 304 | Saves the current context.output value to context[key]. Can be later retrieved via: 305 | 306 | ```yaml 307 | emit: 308 | name: key 309 | in: context 310 | ``` 311 | 312 | ###### omit: key | [ keys ] 313 | 314 | Omit the specified key or keys from an object. 315 | 316 | ###### onError: pipename 317 | 318 | In case of error, redirect the flow to the specified pipe. 319 | 320 | ###### parallel: [ pipenames ] 321 | 322 | Run multiple pipe flows concurrently. Generally not used directly (use shorthand syntax on pipe). 323 | 324 | ###### parse: json 325 | 326 | Parses a String. Currently input must be 'json'. 327 | 328 | ###### path: path 329 | 330 | Selects an element from an object by dot-delimited keys. 331 | 332 | ###### pick: key | [ keys ] 333 | 334 | Selects only the specified key or keys from an object. 335 | 336 | ###### render: string | @filename 337 | 338 | Render the object using a mustache template specified as the string or loaded from the filename in the user view 339 | directory. 340 | 341 | ###### values 342 | 343 | Select the values of an object as an array. 344 | 345 | ##### Callout Fittings 346 | 347 | ###### http 348 | 349 | Make a call to a URL. 350 | 351 | config keys: 352 | 353 | * baseUrl (optional: default = '') 354 | 355 | input keys: 356 | 357 | * url (optional: default = context.output) 358 | * method (optional: default = get) (get, post, put, delete, patch, etc.) 359 | * params (optional) key/value pairs 360 | * headers (optional) key/value pairs 361 | * baseUrl (optional) overrides config.baseUrl 362 | 363 | output: 364 | 365 | { 366 | status: statusCode 367 | headers: JSON string 368 | body: JSON string 369 | } 370 | 371 | 372 | #### User Defined Fittings 373 | 374 | The user fitting is a custom function you can write and place in the fittings directory. It requires the following 375 | values: 376 | 377 | * **name**: the javascript module name in the 'fittings' folder 378 | 379 | ``` 380 | exampleUserFitting: 381 | name: customizeResponse 382 | ``` 383 | 384 | Javascript implementation: 385 | 386 | A user fitting is a fitting defined in the user's fittings directory. It exposes a creation function that accepts a 387 | fittingDefinition and the swagger-pipes configuration. This function is executed during parsing. Thus, it should access 388 | the fittingDef.config (if any) and create any static resources at this time. 389 | 390 | The creation function returns an execution function that will called during pipe flows. This function accepts a 391 | context object and a standard javascript asynchronous callback. When executed, this function should perform its 392 | intended function and then call the callback function with (error, response) when complete. 393 | 394 | Here's an example fitting that will query Yelp for businesses near a location with an input of 395 | { latitude: n, longitude: n }: 396 | 397 | ```js 398 | var Yelp = require('yelp'); 399 | var util = require('util'); 400 | 401 | module.exports = function create(fittingDef, bagpipes) { 402 | 403 | var yelp = Yelp.createClient(fittingDef.config); 404 | 405 | return function yelp_search(context, cb) { 406 | 407 | var input = context.input; 408 | 409 | var options = { 410 | term: input.term, 411 | ll: util.format('%s,%s', input.latitude, input.longitude) 412 | }; 413 | 414 | yelp.search(options, function(error, data) { 415 | 416 | if (error) { return cb(error); } 417 | if (data.error) { return cb(data.error); } 418 | 419 | cb(null, data.businesses); 420 | }); 421 | } 422 | }; 423 | ``` 424 | 425 | #### Swagger fittings 426 | 427 | ** Experimental ** 428 | 429 | You can access Swagger APIs by simply loading that Swagger. A Swagger fitting expects this: 430 | 431 | * **type**: 'swagger' 432 | * **url**: url to the swagger definition 433 | 434 | ```yaml 435 | exampleSwaggerFitting: 436 | type: swagger 437 | url: http://petstore.swagger.io/v2/swagger.json 438 | ``` 439 | 440 | #### Node-machine fittings 441 | 442 | ** Experimental ** 443 | 444 | A node-machine is a self-documenting component format that we've adapted to the a127 (see [http://node-machine.org]()). 445 | You can use a node-machine just by using 'npm install' and declaring the fitting. The fitting definition expects a 446 | minimum of: 447 | 448 | * **type**: 'node-machine' 449 | * **machinepack**: the name of the machinepack 450 | * **machine**: the function name (or id) of the machine 451 | 452 | ```yaml 453 | exampleNodeMachineFitting: 454 | type: node-machine 455 | machinepack: machinepack-github 456 | machine: list-repos 457 | ``` 458 | 459 | #### Connect-middleware fittings 460 | 461 | ** Experimental ** 462 | 463 | Connect-middleware fittings are special-purpose fittings provided as a convenience if you want to call out to any 464 | connect middleware that you have. Before calling a connect-middleware fitting, you must set a `request` and `response` 465 | property on context with appropriate values from your request chain. These will be passed to the associated connect 466 | middleware. Also, you must have passed in to the bagpipes configuration a value for connectMiddlewareDirs. 467 | Be aware, however, as these controllers almost certainly interact directly with the response and aren't designed for 468 | use within the Bagpipes system, either appropriately wrap the response object or use this option with caution. 469 | 470 | * **type**: 'connect-middleware' 471 | * **module**: the name of the file or module to load from your middleware directory 472 | * **function**: the exported function to call on the middleware 473 | 474 | ```yaml 475 | exampleMiddlewareFitting: 476 | type: connect-middleware 477 | module: my_module 478 | function: someFunction 479 | ``` 480 | 481 | ## Debugging 482 | 483 | Currently, debugging is limited to reading log entries and the debugger. However, there is a lot of information 484 | available to you by enabling the DEBUG log. By enabling the DEBUG=pipes log, you will be able to see the entire 485 | flow of the swagger-pipes system sent to the console: 486 | 487 | DEBUG=pipes 488 | 489 | You can get more debug information from the fittings with: 490 | 491 | DEBUG=pipes:fittings 492 | 493 | You can also emit the actual output from each step by enabling pipes:content: 494 | 495 | DEBUG=pipes:content 496 | 497 | Finally, you can enable all the pipes debugging by using a wildcard: 498 | 499 | DEBUG=pipes* 500 | 501 | ## Change Log 502 | 503 | 504 | 505 | Enjoy! 506 | -------------------------------------------------------------------------------- /lib/bagpipes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var pipeworks = require('pipeworks'); 4 | var _ = require('lodash'); 5 | var debug = require('debug')('pipes'); 6 | var debugContent = require('debug')('pipes:content'); 7 | var helpers = require('./helpers'); 8 | var util = require('util'); 9 | var fs = require('fs'); 10 | var path = require('path'); 11 | var assert = require('assert'); 12 | 13 | // todo: allow for forward pipe refs? 14 | 15 | module.exports = { 16 | // conf: { connectMiddlewareDirs: [], userFittingsDirs: [], userViewsDirs: [] } 17 | create: function createPipes(pipesDefs, conf) { 18 | return new Bagpipes(pipesDefs, conf); 19 | } 20 | }; 21 | 22 | function Bagpipes(pipesDefs, conf) { 23 | debug('creating pipes:', pipesDefs); 24 | //debug('config:', conf); 25 | 26 | this.fittingTypes = {}; 27 | this.pipes = {}; 28 | this.config = _.clone(conf || {}); 29 | 30 | this.loadFittingTypes(); 31 | 32 | var self = this; 33 | _.each(pipesDefs, function(pipeDef, pipeName) { 34 | self.getPipe(pipeName, pipeDef); 35 | }); 36 | 37 | debug('done creating pipes'); 38 | } 39 | 40 | // lazy create if pipeDef is included 41 | Bagpipes.prototype.getPipe = function getPipe(pipeName, pipeDef) { 42 | 43 | if (pipeName && this.pipes[pipeName]) { return this.pipes[pipeName]; } // defined pipe 44 | 45 | if (!pipeDef) { 46 | throw new Error('Pipe not found: ' + pipeName); 47 | } 48 | 49 | debug('creating pipe %s: %j', pipeName, pipeDef); 50 | return this.pipes[pipeName] = this.createPipe(pipeDef); 51 | }; 52 | 53 | Bagpipes.prototype.play = function play(pipe, context) { 54 | 55 | assert(typeof context === 'undefined' || typeof context === 'object', 'context must be an object'); 56 | if (!context) { context = {}; } 57 | 58 | var pw = pipeworks(); 59 | pw.fit(function(context, next) { pipe.siphon(context, next); }); 60 | if (context._finish) { pw.fit(context._finish); } 61 | pw.flow(context); 62 | }; 63 | 64 | Bagpipes.prototype.createPipe = function createPipe(pipeDef) { 65 | 66 | var self = this; 67 | var pipe = pipeworks(); 68 | 69 | if (Array.isArray(pipeDef)) { // an array is a pipe 70 | 71 | pipeDef.forEach(function(step) { 72 | 73 | var keys = (typeof step === 'object') ? Object.keys(step) : undefined; 74 | 75 | if (keys && keys.length > 1) { // parallel pipe 76 | 77 | fittingDef = { 78 | name: 'parallel', 79 | input: step 80 | }; 81 | pipe.fit(self.createFitting(fittingDef)); 82 | 83 | } else { 84 | 85 | var name = keys ? keys[0] : step; 86 | var input = keys ? step[name] : undefined; 87 | 88 | if (self.pipes[name]) { // a defined pipe 89 | 90 | debug('fitting pipe: %s', name); 91 | var stepPipe = self.getPipe(name); 92 | pipe.fit(function(context, next) { 93 | debug('running pipe: %s', name); 94 | if (input) { 95 | context.input = helpers.resolveInput(context, input); 96 | debug('input: %j', context.input); 97 | } 98 | stepPipe.siphon(context, next); 99 | }); 100 | 101 | } else { // a fitting 102 | 103 | var fittingDef = { name: name, input: input }; 104 | pipe.fit(self.createFitting(fittingDef)); 105 | } 106 | } 107 | }); 108 | 109 | } else { // a 1-fitting pipe 110 | 111 | pipe.fit(this.createFitting(pipeDef)); 112 | } 113 | 114 | return pipe; 115 | }; 116 | 117 | Bagpipes.prototype.createPipeFromFitting = function createPipeFromFitting(fitting, def) { 118 | return pipeworks().fit(this.wrapFitting(fitting, def)); 119 | }; 120 | 121 | Bagpipes.prototype.loadFittingTypes = function loadFittingTypes() { 122 | 123 | var fittingTypesDir = path.resolve(__dirname, 'fittingTypes'); 124 | 125 | var files = fs.readdirSync(fittingTypesDir); 126 | 127 | var self = this; 128 | files.forEach(function(file) { 129 | if (file.substr(-3) === '.js') { 130 | var name = file.substr(0, file.length - 3); 131 | self.fittingTypes[name] = require(path.resolve(fittingTypesDir, file)); 132 | debug('loaded fitting type: %s', name); 133 | } 134 | }); 135 | return this.fittingTypes; 136 | }; 137 | 138 | Bagpipes.prototype.createFitting = function createFitting(fittingDef) { 139 | 140 | debug('create fitting %j', fittingDef); 141 | 142 | if (fittingDef.type) { 143 | return this.newFitting(fittingDef.type, fittingDef); 144 | } 145 | 146 | // anonymous fitting, try user then system 147 | var fitting = this.newFitting('user', fittingDef); 148 | if (!fitting) { 149 | fitting = this.newFitting('system', fittingDef); 150 | } 151 | return fitting; 152 | }; 153 | 154 | Bagpipes.prototype.newFitting = function newFitting(fittingType, fittingDef) { 155 | var fittingFactory = this.fittingTypes[fittingType]; 156 | if (!fittingFactory) { throw new Error('invalid fitting type: ' + fittingType); } 157 | 158 | var fitting = fittingFactory(this, fittingDef); 159 | return this.wrapFitting(fitting, fittingDef); 160 | }; 161 | 162 | Bagpipes.prototype.wrapFitting = function wrapFitting(fitting, fittingDef) { 163 | 164 | if (!fitting) { return null; } 165 | 166 | var self = this; 167 | return function(context, next) { 168 | try { 169 | preflight(context, fittingDef); 170 | debug('enter fitting: %s', fittingDef.name); 171 | fitting(context, function(err, result) { 172 | debug('exit fitting: %s', fittingDef.name); 173 | if (err) { return self.handleError(context, err); } 174 | postFlight(context, fittingDef, result, next); 175 | }); 176 | } catch (err) { 177 | self.handleError(context, err); 178 | } 179 | }; 180 | }; 181 | 182 | Bagpipes.prototype.handleError = function handleError(context, err) { 183 | 184 | if (!util.isError(err)) { err = new Error(JSON.stringify(err)); } 185 | 186 | debug('caught error: %s', err.stack); 187 | if (!context._errorHandler) { throw err; } 188 | 189 | context.error = err; 190 | debug('starting onError pipe'); 191 | var errorHandler = context._errorHandler; 192 | delete(context._errorHandler); 193 | this.play(errorHandler, context); 194 | }; 195 | 196 | function preflight(context, fittingDef) { 197 | 198 | debug('pre-flight fitting: %s', fittingDef.name); 199 | var resolvedInput = helpers.resolveInput(context, fittingDef.input); 200 | if (typeof resolvedInput === 'object' && !Array.isArray(resolvedInput)) { 201 | context.input = _.defaults({}, context.input, resolvedInput); 202 | } else { 203 | context.input = resolvedInput || context.input; 204 | } 205 | debug('input: %j', context.input); 206 | } 207 | 208 | function postFlight(context, fittingDef, result, next) { 209 | 210 | debug('post-flight fitting: %s', fittingDef.name); 211 | context.input = undefined; 212 | var target = fittingDef.output; 213 | if (target) { 214 | if (target[0] === '_') { throw new Error('output names starting with _ are reserved'); } 215 | } else { 216 | target = 'output'; 217 | } 218 | context[target] = result; 219 | debugContent('output (context[%s]): %j', target, context.output); 220 | next(context); 221 | } 222 | -------------------------------------------------------------------------------- /lib/fittingTypes/connect-middleware.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes:fittings'); 4 | var path = require('path'); 5 | var _ = require('lodash'); 6 | var assert = require('assert'); 7 | var util = require('util'); 8 | 9 | module.exports = function createFitting(pipes, fittingDef) { 10 | 11 | assert(fittingDef.module, util.format('module is required on fitting: %j', fittingDef)); 12 | assert(fittingDef.function, util.format('function is required on fitting: %j', fittingDef)); 13 | 14 | for (var i = 0; i < pipes.config.connectMiddlewareDirs.length; i++) { 15 | var dir = pipes.config.connectMiddlewareDirs[i]; 16 | 17 | try { 18 | var modulePath = path.resolve(dir, fittingDef.module); 19 | var controller = require(modulePath); 20 | var fn = controller[fittingDef['function']]; 21 | 22 | if (fn) { 23 | debug('using %s controller in %s', fittingDef.module, dir); 24 | return connectCaller(fn); 25 | } else { 26 | debug('missing function %s on controller %s in %s', fittingDef['function'], fittingDef.module, dir); 27 | } 28 | } catch (err) { 29 | debug('no controller %s in %s', fittingDef.module, dir); 30 | } 31 | } 32 | 33 | throw new Error('controller not found in %s for fitting %j', pipes.config.connectMiddlewareDirs, fittingDef); 34 | }; 35 | 36 | function connectCaller(fn) { 37 | return function connect_middleware(context, next) { 38 | fn(context.request, context.response, function(err) { 39 | next(err); 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/fittingTypes/node-machine.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes:fittings'); 4 | var _ = require('lodash'); 5 | var util = require('util'); 6 | var assert = require('assert'); 7 | 8 | module.exports = function createFitting(pipes, fittingDef) { 9 | 10 | assert(fittingDef.machinepack, util.format('machinepack is required on fitting: %j', fittingDef)); 11 | assert(fittingDef.machine, util.format('machine is required on fitting: %j', fittingDef)); 12 | 13 | var machinepack = require(fittingDef.machinepack); 14 | 15 | var machine = machinepack[fittingDef.machine] || _.find(machinepack, function(machine) { 16 | return fittingDef.machine == machine.id; 17 | }); 18 | 19 | if (!machine) { 20 | throw new Error(util.format('unknown machine: %s : %s', fittingDef.machinepack, fittingDef.machine)); 21 | } 22 | 23 | return function(context, next) { 24 | machine(context.input, next); 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/fittingTypes/swagger.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes:fittings'); 4 | var util = require('util'); 5 | var assert = require('assert'); 6 | 7 | module.exports = function createFitting(pipes, fittingDef) { 8 | 9 | assert(fittingDef.url, util.format('url is required on fitting: %j', fittingDef)); 10 | 11 | var client = require('swagger-client'); 12 | var swagger = new client.SwaggerClient({ 13 | url: fittingDef.url, 14 | success: function() { 15 | debug('swaggerjs initialized'); 16 | }, 17 | failure: function(err) { 18 | console.log('swaggerjs', err); // todo: what? 19 | }, 20 | progress: function(msg) { 21 | debug('swaggerjs', msg); 22 | } 23 | }); 24 | swagger.build(); 25 | 26 | return function(context, next) { 27 | var api = swagger.apis[context.input.api]; 28 | var operation = api[context.input.operation]; 29 | debug('swagger-js api: %j', api); 30 | debug('swagger-js operation: %j', operation); 31 | debug('swagger-js input: %j', context.input); 32 | operation(context.input, function(result) { 33 | next(null, result); 34 | }); 35 | }; 36 | }; 37 | 38 | /* 39 | Example SwaggerJs result: 40 | 41 | { headers: 42 | { input: 43 | { 'access-control-allow-origin': '*', 44 | 'access-control-allow-methods': 'GET, POST, DELETE, PUT', 45 | 'access-control-allow-headers': 'Content-Type, api_key, Authorization', 46 | 'content-type': 'application/json', 47 | connection: 'close', 48 | server: 'Jetty(9.2.7.v20150116)' }, 49 | normalized: 50 | { 'Access-Control-Allow-Origin': '*', 51 | 'Access-Control-Allow-Methods': 'GET, POST, DELETE, PUT', 52 | 'Access-Control-Allow-Headers': 'Content-Type, api_key, Authorization', 53 | 'Content-Type': 'application/json', 54 | Connection: 'close', 55 | Server: 'Jetty(9.2.7.v20150116)' } }, 56 | url: 'http://petstore.swagger.io:80/v2/pet/1', 57 | method: 'GET', 58 | status: 200, 59 | data: , 60 | obj: 61 | { id: 1, 62 | category: { id: 1, name: 'string' }, 63 | name: 'doggie', 64 | photoUrls: [ 'string' ], 65 | tags: [ [Object] ], 66 | status: 'string' } } 67 | */ 68 | -------------------------------------------------------------------------------- /lib/fittingTypes/system.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes:fittings'); 4 | var path = require('path'); 5 | var assert = require('assert'); 6 | var util = require('util'); 7 | 8 | module.exports = function createFitting(pipes, fittingDef) { 9 | 10 | assert(fittingDef.name, util.format('name is required on fitting: %j', fittingDef)); 11 | 12 | var dir = pipes.config.fittingsDir || path.resolve(__dirname, '../fittings'); 13 | 14 | var modulePath = path.resolve(dir, fittingDef.name); 15 | try { 16 | var module = require(modulePath); 17 | var fitting = module(fittingDef, pipes); 18 | debug('loaded system fitting %s from %s', fittingDef.name, dir); 19 | return fitting; 20 | } catch (err) { 21 | debug('no system fitting %s in %s', fittingDef.name, dir); 22 | throw err; 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /lib/fittingTypes/user.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes:fittings'); 4 | var path = require('path'); 5 | var util = require('util'); 6 | var assert = require('assert'); 7 | 8 | module.exports = function createFitting(pipes, fittingDef) { 9 | 10 | assert(fittingDef.name, util.format('name is required on fitting: %j', fittingDef)); 11 | 12 | // If there is pre-initialized fittings modules available, return these 13 | if (pipes.config.fittings && pipes.config.fittings[fittingDef.name]) { 14 | debug('loaded user fitting %s from pre-initialized modules', fittingDef.name); 15 | return pipes.config.fittings[fittingDef.name](fittingDef, pipes); 16 | } 17 | 18 | if (!pipes.config.userFittingsDirs) { return null; } 19 | 20 | for (var i = 0; i < pipes.config.userFittingsDirs.length; i++) { 21 | var dir = pipes.config.userFittingsDirs[i]; 22 | 23 | var modulePath = path.resolve(dir, fittingDef.name); 24 | try { 25 | var module = require(modulePath); 26 | if (module.default && typeof module.default === 'function') { 27 | module = module.default; 28 | } 29 | 30 | var fitting = module(fittingDef, pipes); 31 | debug('loaded user fitting %s from %s', fittingDef.name, dir); 32 | return fitting; 33 | } catch (err) { 34 | if (err.code !== 'MODULE_NOT_FOUND') { throw err; } 35 | var pathFromError = err.message.match(/'.*?'/)[0]; 36 | var split = pathFromError.split(path.sep); 37 | if (split[split.length - 1] === fittingDef.name + "'") { 38 | debug('no user fitting %s in %s', fittingDef.name, dir); 39 | } else { 40 | throw err; 41 | } 42 | } 43 | } 44 | 45 | if (fittingDef.type !== 'user') { 46 | return null; 47 | } 48 | 49 | throw new Error('user fitting %s not found in %s', fittingDef, pipes.config.userFittingsDirs); 50 | }; 51 | -------------------------------------------------------------------------------- /lib/fittings/amend.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var _ = require('lodash'); 5 | 6 | module.exports = function create() { 7 | 8 | return function amend(context, cb) { 9 | 10 | if (typeof context.input !== 'object' || Array.isArray(context.input)) { 11 | throw new Error('input must be an object'); 12 | } 13 | 14 | if (context.output === null || context.output === undefined) { context.output = {}; } 15 | 16 | if (typeof context.output !== 'object' || Array.isArray(context.output)) { 17 | throw new Error('output must be an object'); 18 | } 19 | 20 | cb(null, _.assign(context.output, context.input)); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /lib/fittings/emit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | 5 | module.exports = function create() { 6 | 7 | return function emit(context, cb) { 8 | 9 | cb(null, context.input); 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /lib/fittings/eval.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // todo: This is just for play... fix it or (probably) remove it! 4 | 5 | var debug = require('debug')('pipes'); 6 | 7 | module.exports = function create() { 8 | 9 | return function evaluate(context, cb) { 10 | 11 | if (typeof context.input !== 'string') { throw new Error('eval input must be a string'); } 12 | 13 | eval(context.input); 14 | 15 | cb(null, context.output); 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /lib/fittings/first.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var debug = require('debug')('pipes'); 5 | 6 | module.exports = function create() { 7 | 8 | return function first(context, cb) { 9 | 10 | cb(null, _.first(context.output)); 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /lib/fittings/http.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var _ = require('lodash'); 5 | var Http = require('machinepack-http'); 6 | 7 | // defaults output -> url 8 | module.exports = function create(fittingDef) { 9 | 10 | var config = _.extend({ baseUrl: '' }, fittingDef.config); 11 | 12 | return function http(context, cb) { 13 | 14 | var input = (typeof context.input === 'string') ? { url: context.input } : context.input; 15 | 16 | var options = _.extend({ url: context.output }, config, input); 17 | 18 | Http.sendHttpRequest(options, cb); 19 | } 20 | }; 21 | 22 | /* input: 23 | url: '/pets/18', 24 | baseUrl: 'http://google.com', 25 | method: 'get', 26 | params: {}, 27 | headers: {} 28 | */ 29 | -------------------------------------------------------------------------------- /lib/fittings/jspath.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var JSPath = require('jspath'); 5 | 6 | module.exports = function create() { 7 | 8 | return function path(context, cb) { 9 | 10 | var input = context.input; 11 | var output = JSPath.apply(input, context.output); 12 | cb(null, output); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /lib/fittings/memo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | 5 | module.exports = function create() { 6 | 7 | return function memo(context, cb) { 8 | 9 | context[context.input] = context.output; 10 | 11 | cb(null, context.output); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /lib/fittings/omit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var debug = require('debug')('pipes'); 5 | 6 | module.exports = function create() { 7 | 8 | return function omit(context, cb) { 9 | 10 | var input = context.input; 11 | 12 | if (Array.isArray(context.output)) { 13 | cb(null, _.map(context.output, _.partialRight(_.omit, input))); 14 | } else { 15 | cb(null, _.omit(context.output, input)); 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /lib/fittings/onError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var util = require('util'); 5 | 6 | module.exports = function create(fittingDef, bagpipes) { 7 | 8 | if (typeof fittingDef.input !== 'string') { throw new Error('input must be a pipe name'); } 9 | 10 | try { 11 | var pipe = bagpipes.getPipe(fittingDef.input); 12 | } catch (err) { 13 | var pipeDef = [ fittingDef.input ]; 14 | pipe = bagpipes.createPipe(pipeDef); 15 | } 16 | 17 | if (!pipe) { 18 | var msg = util.format('unknown pipe: %s', context.input); 19 | console.error(msg); 20 | throw new Error(msg); 21 | } 22 | 23 | return function onError(context, cb) { 24 | 25 | debug('setting error handler: %s', context.input); 26 | context._errorHandler = pipe; 27 | cb(); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /lib/fittings/parallel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var async = require('async'); 5 | var _ = require('lodash'); 6 | var pipeworks = require('pipeworks'); 7 | var helpers = require('../helpers'); 8 | 9 | 10 | // todo: this only currently works with backward references 11 | 12 | module.exports = function create(fittingDef, bagpipes) { 13 | 14 | return function parallel(context, cb) { 15 | debug('create parallel'); 16 | 17 | var tasks = {}; 18 | _.each(context.input, function(pipeNameOrDef, key) { 19 | var pipe = (typeof pipeNameOrDef === 'string') 20 | ? bagpipes.getPipe(pipeNameOrDef) 21 | : bagpipes.getPipe(null, pipeNameOrDef); 22 | tasks[key] = createTask(context, pipe, key); 23 | }); 24 | 25 | async.parallel(tasks, function(err, result) { 26 | debug('parallel done'); 27 | cb(err, result); 28 | }); 29 | }; 30 | }; 31 | 32 | function createTask(context, pipe, name) { 33 | return function execTask(cb) { 34 | pipeworks() 35 | .fit(function startParallel(context, next) { 36 | debug('starting parallel pipe: %s', name); 37 | pipe.siphon(context, next); 38 | }) 39 | .fit(function finishParallel(context, ignore) { 40 | debug('finished parallel pipe: %s', name); 41 | cb(null, context.output); 42 | }) 43 | .fault(helpers.faultHandler) 44 | .flow(context); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/fittings/parse.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | 5 | module.exports = function create() { 6 | 7 | return function parse(context, cb) { 8 | 9 | if (context.input !== 'json') { throw new Error('parse input must be "json"'); } 10 | if (typeof context.output !== 'string') { throw new Error('context.output must be a string'); } 11 | 12 | cb(null, JSON.parse(context.output)); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /lib/fittings/path.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | 5 | module.exports = function create() { 6 | 7 | return function path(context, cb) { 8 | 9 | var input = context.input; 10 | var output = _path(input, context.output); 11 | cb(null, output); 12 | } 13 | }; 14 | 15 | function _path(path, obj) { 16 | if (!obj || !path || !path.length) { return null; } 17 | var paths = path.split('.'); 18 | var val = obj; 19 | for (var i = 0, len = paths.length; i < len && val != null; i += 1) { 20 | val = val[paths[i]]; 21 | } 22 | return val; 23 | } 24 | -------------------------------------------------------------------------------- /lib/fittings/pick.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var _ = require('lodash'); 5 | 6 | module.exports = function create() { 7 | 8 | return function omit(context, cb) { 9 | 10 | var input = context.input; 11 | 12 | if (Array.isArray(context.output)) { 13 | cb(null, _.map(context.output, _.partialRight(_.pick, input))); 14 | } else { 15 | cb(null, _.pick(context.output, input)); 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /lib/fittings/read.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var path = require('path'); 5 | var fs = require('fs'); 6 | var assert = require('assert'); 7 | var util = require('util'); 8 | var async = require('async'); 9 | 10 | // todo: redo this as a general "file" operation w/ actions: read, write, ... 11 | 12 | module.exports = function create(fittingDef) { 13 | 14 | var searchPaths = fittingDef.searchPaths; 15 | 16 | assert(searchPaths, util.format('searchPaths is required on fitting: %j', fittingDef)); 17 | if (typeof searchPaths === 'string') { 18 | searchPaths = [searchPaths]; 19 | } 20 | 21 | return function read(context, cb) { 22 | 23 | var fileName = context.input; 24 | 25 | if (typeof fileName !== 'string') { 26 | return cb(new Error('Bad input, must be a file name.')); 27 | } 28 | 29 | // todo: variations.. string vs buffer? utf8 vs other? 30 | var paths = searchPaths.map(function(path) { 31 | path.resolve(path, fileName) 32 | }); 33 | 34 | async.detect(paths, fs.exists, function(file) { 35 | if (!file) { 36 | return cb(new Error(util.format('file %s not found in: %s', fileName, searchPaths))); 37 | } 38 | debug('reading file: %s', file); 39 | fs.readFile(file, 'utf8', cb); 40 | }); 41 | } 42 | }; 43 | -------------------------------------------------------------------------------- /lib/fittings/render.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var debug = require('debug')('pipes'); 4 | var Mustache = require('mustache'); 5 | var path = require('path'); 6 | var fs = require('fs'); 7 | var assert = require('assert'); 8 | var util = require('util'); 9 | 10 | module.exports = function create(fittingDef, bagpipes) { 11 | 12 | var viewDirs = bagpipes.config.userViewsDirs; 13 | assert(viewDirs, 'userViewsDirs not configured'); 14 | 15 | return function render(context, cb) { 16 | 17 | var input = context.input; 18 | 19 | if (typeof input === 'string' && input[0] === '@') { 20 | 21 | var fileName = input.slice(1); 22 | input = getInput(viewDirs, fileName); 23 | if (!input) { 24 | throw new Error(util.format('file not found for %j in %s', fittingDef, bagpipes.config.userViewsDirs)); 25 | } 26 | } 27 | 28 | var output = Mustache.render(input, context.output); 29 | cb(null, output); 30 | } 31 | }; 32 | 33 | function getInput(viewDirs, fileName) { 34 | for (var i = 0; i < viewDirs.length; i++) { 35 | var dir = viewDirs[i]; 36 | var file = path.resolve(dir, fileName); 37 | try { 38 | debug('reading mustache file: %s', file); 39 | return fs.readFileSync(file, 'utf8'); 40 | } catch (err) { 41 | debug('no mustache file here: %s', file); 42 | } 43 | } 44 | return null; 45 | } 46 | -------------------------------------------------------------------------------- /lib/fittings/values.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var debug = require('debug')('pipes'); 5 | 6 | module.exports = function create() { 7 | 8 | return function values(context, cb) { 9 | 10 | cb(null, _.values(context.output)); 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /lib/helpers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var debug = require('debug')('pipes'); 5 | var JSPath = require('jspath'); 6 | 7 | module.exports = { 8 | resolveInput: resolveInput, 9 | faultHandler: faultHandler 10 | }; 11 | 12 | function resolveInput(context, input) { 13 | 14 | if (!input) { return context.output; } 15 | 16 | if (Array.isArray(input)) { 17 | return _.map(input, function(input) { return resolveInput(context, input); }); 18 | } 19 | 20 | if (isParameter(input)) { 21 | debug('isInput: ', input); 22 | return getParameterValue(input, context); 23 | } 24 | 25 | if (typeof input === 'object') { 26 | var result = {}; 27 | _.each(input, function(inputDef, name) { 28 | 29 | result[name] = 30 | (isParameter(inputDef)) 31 | ? getParameterValue(inputDef, context) 32 | : resolveInput(context, inputDef); 33 | }); 34 | return result; 35 | } 36 | 37 | return input; 38 | } 39 | 40 | function isParameter(inputDef) { 41 | return !_.isUndefined(inputDef) 42 | && (typeof inputDef === 'string' || 43 | (typeof inputDef === 'object' && inputDef.path && inputDef.default)); 44 | } 45 | 46 | // parameter: string || { path, default } 47 | function getParameterValue(parameter, context) { 48 | 49 | var path = parameter.path || parameter; 50 | 51 | var value = (path[0] === '.') ? JSPath.apply(path, context) : path; 52 | 53 | //console.log('****', path, context, value); 54 | 55 | // Use the default value when necessary 56 | if (_.isUndefined(value)) { value = parameter.default; } 57 | 58 | return value; 59 | } 60 | 61 | // todo: move to connect_middleware ! 62 | function faultHandler(context, error) { 63 | debug('default errorHandler: %s', error.stack ? error.stack : error.message); 64 | if (context.response) { 65 | context.response.statusCode = 500; 66 | context.response.end(error.message); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var bagpipes = require('./bagpipes'); 4 | 5 | module.exports = { 6 | create: create 7 | }; 8 | 9 | function create(pipesDefs, config) { 10 | return bagpipes.create(pipesDefs, config); 11 | } 12 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bagpipes", 3 | "version": "0.2.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.8.3", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", 10 | "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "^7.8.3" 14 | } 15 | }, 16 | "@babel/core": { 17 | "version": "7.9.0", 18 | "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", 19 | "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", 20 | "dev": true, 21 | "requires": { 22 | "@babel/code-frame": "^7.8.3", 23 | "@babel/generator": "^7.9.0", 24 | "@babel/helper-module-transforms": "^7.9.0", 25 | "@babel/helpers": "^7.9.0", 26 | "@babel/parser": "^7.9.0", 27 | "@babel/template": "^7.8.6", 28 | "@babel/traverse": "^7.9.0", 29 | "@babel/types": "^7.9.0", 30 | "convert-source-map": "^1.7.0", 31 | "debug": "^4.1.0", 32 | "gensync": "^1.0.0-beta.1", 33 | "json5": "^2.1.2", 34 | "lodash": "^4.17.13", 35 | "resolve": "^1.3.2", 36 | "semver": "^5.4.1", 37 | "source-map": "^0.5.0" 38 | }, 39 | "dependencies": { 40 | "debug": { 41 | "version": "4.1.1", 42 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 43 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 44 | "dev": true, 45 | "requires": { 46 | "ms": "^2.1.1" 47 | } 48 | }, 49 | "ms": { 50 | "version": "2.1.2", 51 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 52 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 53 | "dev": true 54 | }, 55 | "resolve": { 56 | "version": "1.16.0", 57 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz", 58 | "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==", 59 | "dev": true, 60 | "requires": { 61 | "path-parse": "^1.0.6" 62 | } 63 | }, 64 | "semver": { 65 | "version": "5.7.1", 66 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 67 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 68 | "dev": true 69 | }, 70 | "source-map": { 71 | "version": "0.5.7", 72 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 73 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 74 | "dev": true 75 | } 76 | } 77 | }, 78 | "@babel/generator": { 79 | "version": "7.9.5", 80 | "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz", 81 | "integrity": "sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==", 82 | "dev": true, 83 | "requires": { 84 | "@babel/types": "^7.9.5", 85 | "jsesc": "^2.5.1", 86 | "lodash": "^4.17.13", 87 | "source-map": "^0.5.0" 88 | }, 89 | "dependencies": { 90 | "source-map": { 91 | "version": "0.5.7", 92 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 93 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 94 | "dev": true 95 | } 96 | } 97 | }, 98 | "@babel/helper-function-name": { 99 | "version": "7.9.5", 100 | "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", 101 | "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", 102 | "dev": true, 103 | "requires": { 104 | "@babel/helper-get-function-arity": "^7.8.3", 105 | "@babel/template": "^7.8.3", 106 | "@babel/types": "^7.9.5" 107 | } 108 | }, 109 | "@babel/helper-get-function-arity": { 110 | "version": "7.8.3", 111 | "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", 112 | "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", 113 | "dev": true, 114 | "requires": { 115 | "@babel/types": "^7.8.3" 116 | } 117 | }, 118 | "@babel/helper-member-expression-to-functions": { 119 | "version": "7.8.3", 120 | "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", 121 | "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", 122 | "dev": true, 123 | "requires": { 124 | "@babel/types": "^7.8.3" 125 | } 126 | }, 127 | "@babel/helper-module-imports": { 128 | "version": "7.8.3", 129 | "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", 130 | "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", 131 | "dev": true, 132 | "requires": { 133 | "@babel/types": "^7.8.3" 134 | } 135 | }, 136 | "@babel/helper-module-transforms": { 137 | "version": "7.9.0", 138 | "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", 139 | "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", 140 | "dev": true, 141 | "requires": { 142 | "@babel/helper-module-imports": "^7.8.3", 143 | "@babel/helper-replace-supers": "^7.8.6", 144 | "@babel/helper-simple-access": "^7.8.3", 145 | "@babel/helper-split-export-declaration": "^7.8.3", 146 | "@babel/template": "^7.8.6", 147 | "@babel/types": "^7.9.0", 148 | "lodash": "^4.17.13" 149 | } 150 | }, 151 | "@babel/helper-optimise-call-expression": { 152 | "version": "7.8.3", 153 | "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", 154 | "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", 155 | "dev": true, 156 | "requires": { 157 | "@babel/types": "^7.8.3" 158 | } 159 | }, 160 | "@babel/helper-replace-supers": { 161 | "version": "7.8.6", 162 | "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", 163 | "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", 164 | "dev": true, 165 | "requires": { 166 | "@babel/helper-member-expression-to-functions": "^7.8.3", 167 | "@babel/helper-optimise-call-expression": "^7.8.3", 168 | "@babel/traverse": "^7.8.6", 169 | "@babel/types": "^7.8.6" 170 | } 171 | }, 172 | "@babel/helper-simple-access": { 173 | "version": "7.8.3", 174 | "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", 175 | "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", 176 | "dev": true, 177 | "requires": { 178 | "@babel/template": "^7.8.3", 179 | "@babel/types": "^7.8.3" 180 | } 181 | }, 182 | "@babel/helper-split-export-declaration": { 183 | "version": "7.8.3", 184 | "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", 185 | "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", 186 | "dev": true, 187 | "requires": { 188 | "@babel/types": "^7.8.3" 189 | } 190 | }, 191 | "@babel/helper-validator-identifier": { 192 | "version": "7.9.5", 193 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", 194 | "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", 195 | "dev": true 196 | }, 197 | "@babel/helpers": { 198 | "version": "7.9.2", 199 | "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", 200 | "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", 201 | "dev": true, 202 | "requires": { 203 | "@babel/template": "^7.8.3", 204 | "@babel/traverse": "^7.9.0", 205 | "@babel/types": "^7.9.0" 206 | } 207 | }, 208 | "@babel/highlight": { 209 | "version": "7.9.0", 210 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", 211 | "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", 212 | "dev": true, 213 | "requires": { 214 | "@babel/helper-validator-identifier": "^7.9.0", 215 | "chalk": "^2.0.0", 216 | "js-tokens": "^4.0.0" 217 | } 218 | }, 219 | "@babel/parser": { 220 | "version": "7.9.4", 221 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", 222 | "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", 223 | "dev": true 224 | }, 225 | "@babel/template": { 226 | "version": "7.8.6", 227 | "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", 228 | "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", 229 | "dev": true, 230 | "requires": { 231 | "@babel/code-frame": "^7.8.3", 232 | "@babel/parser": "^7.8.6", 233 | "@babel/types": "^7.8.6" 234 | } 235 | }, 236 | "@babel/traverse": { 237 | "version": "7.9.5", 238 | "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz", 239 | "integrity": "sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==", 240 | "dev": true, 241 | "requires": { 242 | "@babel/code-frame": "^7.8.3", 243 | "@babel/generator": "^7.9.5", 244 | "@babel/helper-function-name": "^7.9.5", 245 | "@babel/helper-split-export-declaration": "^7.8.3", 246 | "@babel/parser": "^7.9.0", 247 | "@babel/types": "^7.9.5", 248 | "debug": "^4.1.0", 249 | "globals": "^11.1.0", 250 | "lodash": "^4.17.13" 251 | }, 252 | "dependencies": { 253 | "debug": { 254 | "version": "4.1.1", 255 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 256 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 257 | "dev": true, 258 | "requires": { 259 | "ms": "^2.1.1" 260 | } 261 | }, 262 | "ms": { 263 | "version": "2.1.2", 264 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 265 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 266 | "dev": true 267 | } 268 | } 269 | }, 270 | "@babel/types": { 271 | "version": "7.9.5", 272 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz", 273 | "integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==", 274 | "dev": true, 275 | "requires": { 276 | "@babel/helper-validator-identifier": "^7.9.5", 277 | "lodash": "^4.17.13", 278 | "to-fast-properties": "^2.0.0" 279 | } 280 | }, 281 | "@istanbuljs/load-nyc-config": { 282 | "version": "1.0.0", 283 | "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", 284 | "integrity": "sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg==", 285 | "dev": true, 286 | "requires": { 287 | "camelcase": "^5.3.1", 288 | "find-up": "^4.1.0", 289 | "js-yaml": "^3.13.1", 290 | "resolve-from": "^5.0.0" 291 | }, 292 | "dependencies": { 293 | "camelcase": { 294 | "version": "5.3.1", 295 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 296 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 297 | "dev": true 298 | }, 299 | "esprima": { 300 | "version": "4.0.1", 301 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 302 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 303 | "dev": true 304 | }, 305 | "js-yaml": { 306 | "version": "3.13.1", 307 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 308 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 309 | "dev": true, 310 | "requires": { 311 | "argparse": "^1.0.7", 312 | "esprima": "^4.0.0" 313 | } 314 | } 315 | } 316 | }, 317 | "@istanbuljs/schema": { 318 | "version": "0.1.2", 319 | "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", 320 | "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", 321 | "dev": true 322 | }, 323 | "@sailshq/lodash": { 324 | "version": "3.10.4", 325 | "resolved": "https://registry.npmjs.org/@sailshq/lodash/-/lodash-3.10.4.tgz", 326 | "integrity": "sha512-YXJqp9gdHcZKAmBY/WnwFpPtNQp2huD/ME2YMurH2YHJvxrVzYsmpKw/pb7yINArRpp8E++fwbQd3ajYXGA45Q==" 327 | }, 328 | "@types/color-name": { 329 | "version": "1.1.1", 330 | "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", 331 | "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", 332 | "dev": true 333 | }, 334 | "aggregate-error": { 335 | "version": "3.0.1", 336 | "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", 337 | "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", 338 | "dev": true, 339 | "requires": { 340 | "clean-stack": "^2.0.0", 341 | "indent-string": "^4.0.0" 342 | } 343 | }, 344 | "ajv": { 345 | "version": "6.12.6", 346 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 347 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 348 | "requires": { 349 | "fast-deep-equal": "^3.1.1", 350 | "fast-json-stable-stringify": "^2.0.0", 351 | "json-schema-traverse": "^0.4.1", 352 | "uri-js": "^4.2.2" 353 | } 354 | }, 355 | "anchor": { 356 | "version": "1.4.1", 357 | "resolved": "https://registry.npmjs.org/anchor/-/anchor-1.4.1.tgz", 358 | "integrity": "sha512-T4rWOGuI+pjf0KgrnLMWrHBIsLCxf6HQ2OgXboMs4QAf7ogvbqIYwCLR7k7BBeTBvrmyDv1M6mZDSUl2pKLMkw==", 359 | "requires": { 360 | "@sailshq/lodash": "^3.10.2", 361 | "validator": "13.7.0" 362 | }, 363 | "dependencies": { 364 | "validator": { 365 | "version": "13.7.0", 366 | "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", 367 | "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" 368 | } 369 | } 370 | }, 371 | "ansi-colors": { 372 | "version": "4.1.1", 373 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 374 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 375 | "dev": true 376 | }, 377 | "ansi-styles": { 378 | "version": "3.2.1", 379 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 380 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 381 | "dev": true, 382 | "requires": { 383 | "color-convert": "^1.9.0" 384 | } 385 | }, 386 | "anymatch": { 387 | "version": "3.1.3", 388 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 389 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 390 | "dev": true, 391 | "requires": { 392 | "normalize-path": "^3.0.0", 393 | "picomatch": "^2.0.4" 394 | } 395 | }, 396 | "append-transform": { 397 | "version": "2.0.0", 398 | "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", 399 | "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", 400 | "dev": true, 401 | "requires": { 402 | "default-require-extensions": "^3.0.0" 403 | } 404 | }, 405 | "archy": { 406 | "version": "1.0.0", 407 | "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", 408 | "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", 409 | "dev": true 410 | }, 411 | "argparse": { 412 | "version": "1.0.9", 413 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", 414 | "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", 415 | "dev": true, 416 | "requires": { 417 | "sprintf-js": "~1.0.2" 418 | } 419 | }, 420 | "asn1": { 421 | "version": "0.2.4", 422 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 423 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 424 | "requires": { 425 | "safer-buffer": "~2.1.0" 426 | } 427 | }, 428 | "assert-plus": { 429 | "version": "1.0.0", 430 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 431 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 432 | }, 433 | "async": { 434 | "version": "2.6.4", 435 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", 436 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", 437 | "requires": { 438 | "lodash": "^4.17.14" 439 | } 440 | }, 441 | "asynckit": { 442 | "version": "0.4.0", 443 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 444 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 445 | }, 446 | "aws-sign2": { 447 | "version": "0.7.0", 448 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 449 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 450 | }, 451 | "aws4": { 452 | "version": "1.8.0", 453 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 454 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 455 | }, 456 | "balanced-match": { 457 | "version": "1.0.0", 458 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 459 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 460 | }, 461 | "bcrypt-pbkdf": { 462 | "version": "1.0.2", 463 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 464 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 465 | "requires": { 466 | "tweetnacl": "^0.14.3" 467 | } 468 | }, 469 | "binary-extensions": { 470 | "version": "2.2.0", 471 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 472 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 473 | "dev": true 474 | }, 475 | "bluebird": { 476 | "version": "3.2.1", 477 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.2.1.tgz", 478 | "integrity": "sha1-POzzUEkEwwzj55wXCHfok6EZEP0=" 479 | }, 480 | "brace-expansion": { 481 | "version": "1.1.8", 482 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", 483 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", 484 | "dev": true, 485 | "requires": { 486 | "balanced-match": "^1.0.0", 487 | "concat-map": "0.0.1" 488 | } 489 | }, 490 | "braces": { 491 | "version": "3.0.2", 492 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 493 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 494 | "dev": true, 495 | "requires": { 496 | "fill-range": "^7.0.1" 497 | } 498 | }, 499 | "browser-stdout": { 500 | "version": "1.3.1", 501 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 502 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 503 | "dev": true 504 | }, 505 | "caching-transform": { 506 | "version": "4.0.0", 507 | "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", 508 | "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", 509 | "dev": true, 510 | "requires": { 511 | "hasha": "^5.0.0", 512 | "make-dir": "^3.0.0", 513 | "package-hash": "^4.0.0", 514 | "write-file-atomic": "^3.0.0" 515 | } 516 | }, 517 | "camelcase": { 518 | "version": "6.3.0", 519 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 520 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 521 | "dev": true 522 | }, 523 | "caseless": { 524 | "version": "0.12.0", 525 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 526 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 527 | }, 528 | "chalk": { 529 | "version": "2.4.2", 530 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 531 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 532 | "dev": true, 533 | "requires": { 534 | "ansi-styles": "^3.2.1", 535 | "escape-string-regexp": "^1.0.5", 536 | "supports-color": "^5.3.0" 537 | } 538 | }, 539 | "chokidar": { 540 | "version": "3.5.3", 541 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 542 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 543 | "dev": true, 544 | "requires": { 545 | "anymatch": "~3.1.2", 546 | "braces": "~3.0.2", 547 | "fsevents": "~2.3.2", 548 | "glob-parent": "~5.1.2", 549 | "is-binary-path": "~2.1.0", 550 | "is-glob": "~4.0.1", 551 | "normalize-path": "~3.0.0", 552 | "readdirp": "~3.6.0" 553 | } 554 | }, 555 | "clean-stack": { 556 | "version": "2.2.0", 557 | "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", 558 | "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", 559 | "dev": true 560 | }, 561 | "cliui": { 562 | "version": "7.0.4", 563 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 564 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 565 | "dev": true, 566 | "requires": { 567 | "string-width": "^4.2.0", 568 | "strip-ansi": "^6.0.0", 569 | "wrap-ansi": "^7.0.0" 570 | }, 571 | "dependencies": { 572 | "ansi-styles": { 573 | "version": "4.3.0", 574 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 575 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 576 | "dev": true, 577 | "requires": { 578 | "color-convert": "^2.0.1" 579 | } 580 | }, 581 | "color-convert": { 582 | "version": "2.0.1", 583 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 584 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 585 | "dev": true, 586 | "requires": { 587 | "color-name": "~1.1.4" 588 | } 589 | }, 590 | "color-name": { 591 | "version": "1.1.4", 592 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 593 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 594 | "dev": true 595 | }, 596 | "wrap-ansi": { 597 | "version": "7.0.0", 598 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 599 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 600 | "dev": true, 601 | "requires": { 602 | "ansi-styles": "^4.0.0", 603 | "string-width": "^4.1.0", 604 | "strip-ansi": "^6.0.0" 605 | } 606 | } 607 | } 608 | }, 609 | "color-convert": { 610 | "version": "1.9.3", 611 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 612 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 613 | "dev": true, 614 | "requires": { 615 | "color-name": "1.1.3" 616 | } 617 | }, 618 | "color-name": { 619 | "version": "1.1.3", 620 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 621 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 622 | "dev": true 623 | }, 624 | "combined-stream": { 625 | "version": "1.0.8", 626 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 627 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 628 | "requires": { 629 | "delayed-stream": "~1.0.0" 630 | } 631 | }, 632 | "commondir": { 633 | "version": "1.0.1", 634 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 635 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", 636 | "dev": true 637 | }, 638 | "component-emitter": { 639 | "version": "1.3.0", 640 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", 641 | "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", 642 | "dev": true 643 | }, 644 | "concat-map": { 645 | "version": "0.0.1", 646 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 647 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 648 | "dev": true 649 | }, 650 | "convert-source-map": { 651 | "version": "1.7.0", 652 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", 653 | "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", 654 | "dev": true, 655 | "requires": { 656 | "safe-buffer": "~5.1.1" 657 | }, 658 | "dependencies": { 659 | "safe-buffer": { 660 | "version": "5.1.2", 661 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 662 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 663 | "dev": true 664 | } 665 | } 666 | }, 667 | "cookiejar": { 668 | "version": "2.1.4", 669 | "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", 670 | "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", 671 | "dev": true 672 | }, 673 | "core-util-is": { 674 | "version": "1.0.2", 675 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 676 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 677 | }, 678 | "coveralls": { 679 | "version": "3.0.11", 680 | "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.11.tgz", 681 | "integrity": "sha512-LZPWPR2NyGKyaABnc49dR0fpeP6UqhvGq4B5nUrTQ1UBy55z96+ga7r+/ChMdMJUwBgyJDXBi88UBgz2rs9IiQ==", 682 | "dev": true, 683 | "requires": { 684 | "js-yaml": "^3.13.1", 685 | "lcov-parse": "^1.0.0", 686 | "log-driver": "^1.2.7", 687 | "minimist": "^1.2.5", 688 | "request": "^2.88.0" 689 | }, 690 | "dependencies": { 691 | "esprima": { 692 | "version": "4.0.1", 693 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 694 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 695 | "dev": true 696 | }, 697 | "js-yaml": { 698 | "version": "3.13.1", 699 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 700 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 701 | "dev": true, 702 | "requires": { 703 | "argparse": "^1.0.7", 704 | "esprima": "^4.0.0" 705 | } 706 | } 707 | } 708 | }, 709 | "cross-spawn": { 710 | "version": "7.0.2", 711 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", 712 | "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", 713 | "dev": true, 714 | "requires": { 715 | "path-key": "^3.1.0", 716 | "shebang-command": "^2.0.0", 717 | "which": "^2.0.1" 718 | }, 719 | "dependencies": { 720 | "which": { 721 | "version": "2.0.2", 722 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 723 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 724 | "dev": true, 725 | "requires": { 726 | "isexe": "^2.0.0" 727 | } 728 | } 729 | } 730 | }, 731 | "dashdash": { 732 | "version": "1.14.1", 733 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 734 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 735 | "requires": { 736 | "assert-plus": "^1.0.0" 737 | } 738 | }, 739 | "debug": { 740 | "version": "2.6.9", 741 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 742 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 743 | "requires": { 744 | "ms": "2.0.0" 745 | } 746 | }, 747 | "decamelize": { 748 | "version": "1.2.0", 749 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 750 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 751 | "dev": true 752 | }, 753 | "default-require-extensions": { 754 | "version": "3.0.0", 755 | "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", 756 | "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", 757 | "dev": true, 758 | "requires": { 759 | "strip-bom": "^4.0.0" 760 | } 761 | }, 762 | "delayed-stream": { 763 | "version": "1.0.0", 764 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 765 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 766 | }, 767 | "diff": { 768 | "version": "5.0.0", 769 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 770 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 771 | "dev": true 772 | }, 773 | "ecc-jsbn": { 774 | "version": "0.1.2", 775 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 776 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 777 | "requires": { 778 | "jsbn": "~0.1.0", 779 | "safer-buffer": "^2.1.0" 780 | } 781 | }, 782 | "emoji-regex": { 783 | "version": "8.0.0", 784 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 785 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 786 | "dev": true 787 | }, 788 | "es6-error": { 789 | "version": "4.1.1", 790 | "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", 791 | "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", 792 | "dev": true 793 | }, 794 | "escalade": { 795 | "version": "3.1.1", 796 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 797 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 798 | "dev": true 799 | }, 800 | "escape-string-regexp": { 801 | "version": "1.0.5", 802 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 803 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 804 | "dev": true 805 | }, 806 | "extend": { 807 | "version": "3.0.2", 808 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 809 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 810 | }, 811 | "extsprintf": { 812 | "version": "1.3.0", 813 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 814 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 815 | }, 816 | "fast-deep-equal": { 817 | "version": "3.1.1", 818 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", 819 | "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" 820 | }, 821 | "fast-json-stable-stringify": { 822 | "version": "2.0.0", 823 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 824 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 825 | }, 826 | "fill-keys": { 827 | "version": "1.0.2", 828 | "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", 829 | "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", 830 | "dev": true, 831 | "requires": { 832 | "is-object": "~1.0.1", 833 | "merge-descriptors": "~1.0.0" 834 | } 835 | }, 836 | "fill-range": { 837 | "version": "7.0.1", 838 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 839 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 840 | "dev": true, 841 | "requires": { 842 | "to-regex-range": "^5.0.1" 843 | } 844 | }, 845 | "find-cache-dir": { 846 | "version": "3.3.1", 847 | "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", 848 | "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", 849 | "dev": true, 850 | "requires": { 851 | "commondir": "^1.0.1", 852 | "make-dir": "^3.0.2", 853 | "pkg-dir": "^4.1.0" 854 | } 855 | }, 856 | "find-up": { 857 | "version": "4.1.0", 858 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", 859 | "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", 860 | "dev": true, 861 | "requires": { 862 | "locate-path": "^5.0.0", 863 | "path-exists": "^4.0.0" 864 | } 865 | }, 866 | "flat": { 867 | "version": "5.0.2", 868 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 869 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 870 | "dev": true 871 | }, 872 | "flaverr": { 873 | "version": "1.10.0", 874 | "resolved": "https://registry.npmjs.org/flaverr/-/flaverr-1.10.0.tgz", 875 | "integrity": "sha512-POaguCzNjWKEKsBkks4YGgNv1LVUqTX4MTudca5ArQAxtBrPswQLAW8la4Hbo0EZy9tpU3a9WwsKdAACqZnE/Q==", 876 | "requires": { 877 | "@sailshq/lodash": "^3.10.2" 878 | } 879 | }, 880 | "foreground-child": { 881 | "version": "2.0.0", 882 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", 883 | "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", 884 | "dev": true, 885 | "requires": { 886 | "cross-spawn": "^7.0.0", 887 | "signal-exit": "^3.0.2" 888 | } 889 | }, 890 | "forever-agent": { 891 | "version": "0.6.1", 892 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 893 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 894 | }, 895 | "form-data": { 896 | "version": "2.3.3", 897 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 898 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 899 | "requires": { 900 | "asynckit": "^0.4.0", 901 | "combined-stream": "^1.0.6", 902 | "mime-types": "^2.1.12" 903 | } 904 | }, 905 | "formidable": { 906 | "version": "1.2.1", 907 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", 908 | "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", 909 | "dev": true 910 | }, 911 | "fromentries": { 912 | "version": "1.2.0", 913 | "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", 914 | "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", 915 | "dev": true 916 | }, 917 | "fs.realpath": { 918 | "version": "1.0.0", 919 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 920 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 921 | "dev": true 922 | }, 923 | "fsevents": { 924 | "version": "2.3.2", 925 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 926 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 927 | "dev": true, 928 | "optional": true 929 | }, 930 | "gensync": { 931 | "version": "1.0.0-beta.1", 932 | "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", 933 | "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", 934 | "dev": true 935 | }, 936 | "get-caller-file": { 937 | "version": "2.0.5", 938 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 939 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 940 | "dev": true 941 | }, 942 | "getpass": { 943 | "version": "0.1.7", 944 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 945 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 946 | "requires": { 947 | "assert-plus": "^1.0.0" 948 | } 949 | }, 950 | "glob": { 951 | "version": "7.2.0", 952 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 953 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 954 | "dev": true, 955 | "requires": { 956 | "fs.realpath": "^1.0.0", 957 | "inflight": "^1.0.4", 958 | "inherits": "2", 959 | "minimatch": "^3.0.4", 960 | "once": "^1.3.0", 961 | "path-is-absolute": "^1.0.0" 962 | }, 963 | "dependencies": { 964 | "minimatch": { 965 | "version": "3.1.2", 966 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 967 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 968 | "dev": true, 969 | "requires": { 970 | "brace-expansion": "^1.1.7" 971 | } 972 | } 973 | } 974 | }, 975 | "glob-parent": { 976 | "version": "5.1.2", 977 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 978 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 979 | "dev": true, 980 | "requires": { 981 | "is-glob": "^4.0.1" 982 | } 983 | }, 984 | "glob-parent": { 985 | "version": "5.1.2", 986 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 987 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 988 | "dev": true, 989 | "requires": { 990 | "is-glob": "^4.0.1" 991 | } 992 | }, 993 | "globals": { 994 | "version": "11.12.0", 995 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", 996 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 997 | "dev": true 998 | }, 999 | "graceful-fs": { 1000 | "version": "4.2.3", 1001 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", 1002 | "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", 1003 | "dev": true 1004 | }, 1005 | "har-schema": { 1006 | "version": "2.0.0", 1007 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 1008 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 1009 | }, 1010 | "har-validator": { 1011 | "version": "5.1.3", 1012 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", 1013 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", 1014 | "requires": { 1015 | "ajv": "^6.5.5", 1016 | "har-schema": "^2.0.0" 1017 | } 1018 | }, 1019 | "has-flag": { 1020 | "version": "4.0.0", 1021 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1022 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1023 | "dev": true 1024 | }, 1025 | "hasha": { 1026 | "version": "5.2.0", 1027 | "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", 1028 | "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", 1029 | "dev": true, 1030 | "requires": { 1031 | "is-stream": "^2.0.0", 1032 | "type-fest": "^0.8.0" 1033 | } 1034 | }, 1035 | "he": { 1036 | "version": "1.2.0", 1037 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1038 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1039 | "dev": true 1040 | }, 1041 | "html-escaper": { 1042 | "version": "2.0.2", 1043 | "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", 1044 | "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", 1045 | "dev": true 1046 | }, 1047 | "http-signature": { 1048 | "version": "1.2.0", 1049 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 1050 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 1051 | "requires": { 1052 | "assert-plus": "^1.0.0", 1053 | "jsprim": "^1.2.2", 1054 | "sshpk": "^1.7.0" 1055 | } 1056 | }, 1057 | "imurmurhash": { 1058 | "version": "0.1.4", 1059 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1060 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 1061 | "dev": true 1062 | }, 1063 | "indent-string": { 1064 | "version": "4.0.0", 1065 | "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", 1066 | "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", 1067 | "dev": true 1068 | }, 1069 | "inflight": { 1070 | "version": "1.0.6", 1071 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1072 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1073 | "dev": true, 1074 | "requires": { 1075 | "once": "^1.3.0", 1076 | "wrappy": "1" 1077 | } 1078 | }, 1079 | "inherits": { 1080 | "version": "2.0.3", 1081 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 1082 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 1083 | "dev": true 1084 | }, 1085 | "is-binary-path": { 1086 | "version": "2.1.0", 1087 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1088 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1089 | "dev": true, 1090 | "requires": { 1091 | "binary-extensions": "^2.0.0" 1092 | } 1093 | }, 1094 | "is-extglob": { 1095 | "version": "2.1.1", 1096 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1097 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1098 | "dev": true 1099 | }, 1100 | "is-fullwidth-code-point": { 1101 | "version": "3.0.0", 1102 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1103 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1104 | "dev": true 1105 | }, 1106 | "is-glob": { 1107 | "version": "4.0.3", 1108 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1109 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1110 | "dev": true, 1111 | "requires": { 1112 | "is-extglob": "^2.1.1" 1113 | } 1114 | }, 1115 | "is-number": { 1116 | "version": "7.0.0", 1117 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1118 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1119 | "dev": true 1120 | }, 1121 | "is-object": { 1122 | "version": "1.0.1", 1123 | "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", 1124 | "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", 1125 | "dev": true 1126 | }, 1127 | "is-plain-obj": { 1128 | "version": "2.1.0", 1129 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1130 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1131 | "dev": true 1132 | }, 1133 | "is-stream": { 1134 | "version": "2.0.0", 1135 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", 1136 | "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", 1137 | "dev": true 1138 | }, 1139 | "is-typedarray": { 1140 | "version": "1.0.0", 1141 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 1142 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 1143 | }, 1144 | "is-unicode-supported": { 1145 | "version": "0.1.0", 1146 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1147 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1148 | "dev": true 1149 | }, 1150 | "is-windows": { 1151 | "version": "1.0.2", 1152 | "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", 1153 | "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", 1154 | "dev": true 1155 | }, 1156 | "isarray": { 1157 | "version": "1.0.0", 1158 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1159 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 1160 | "dev": true 1161 | }, 1162 | "isexe": { 1163 | "version": "2.0.0", 1164 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1165 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1166 | "dev": true 1167 | }, 1168 | "isstream": { 1169 | "version": "0.1.2", 1170 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 1171 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 1172 | }, 1173 | "istanbul-lib-coverage": { 1174 | "version": "3.0.0", 1175 | "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", 1176 | "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", 1177 | "dev": true 1178 | }, 1179 | "istanbul-lib-hook": { 1180 | "version": "3.0.0", 1181 | "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", 1182 | "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", 1183 | "dev": true, 1184 | "requires": { 1185 | "append-transform": "^2.0.0" 1186 | } 1187 | }, 1188 | "istanbul-lib-instrument": { 1189 | "version": "4.0.1", 1190 | "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", 1191 | "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", 1192 | "dev": true, 1193 | "requires": { 1194 | "@babel/core": "^7.7.5", 1195 | "@babel/parser": "^7.7.5", 1196 | "@babel/template": "^7.7.4", 1197 | "@babel/traverse": "^7.7.4", 1198 | "@istanbuljs/schema": "^0.1.2", 1199 | "istanbul-lib-coverage": "^3.0.0", 1200 | "semver": "^6.3.0" 1201 | } 1202 | }, 1203 | "istanbul-lib-processinfo": { 1204 | "version": "2.0.2", 1205 | "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", 1206 | "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", 1207 | "dev": true, 1208 | "requires": { 1209 | "archy": "^1.0.0", 1210 | "cross-spawn": "^7.0.0", 1211 | "istanbul-lib-coverage": "^3.0.0-alpha.1", 1212 | "make-dir": "^3.0.0", 1213 | "p-map": "^3.0.0", 1214 | "rimraf": "^3.0.0", 1215 | "uuid": "^3.3.3" 1216 | }, 1217 | "dependencies": { 1218 | "uuid": { 1219 | "version": "3.4.0", 1220 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1221 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 1222 | "dev": true 1223 | } 1224 | } 1225 | }, 1226 | "istanbul-lib-report": { 1227 | "version": "3.0.0", 1228 | "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", 1229 | "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", 1230 | "dev": true, 1231 | "requires": { 1232 | "istanbul-lib-coverage": "^3.0.0", 1233 | "make-dir": "^3.0.0", 1234 | "supports-color": "^7.1.0" 1235 | }, 1236 | "dependencies": { 1237 | "has-flag": { 1238 | "version": "4.0.0", 1239 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1240 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1241 | "dev": true 1242 | }, 1243 | "supports-color": { 1244 | "version": "7.1.0", 1245 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 1246 | "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", 1247 | "dev": true, 1248 | "requires": { 1249 | "has-flag": "^4.0.0" 1250 | } 1251 | } 1252 | } 1253 | }, 1254 | "istanbul-lib-source-maps": { 1255 | "version": "4.0.0", 1256 | "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", 1257 | "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", 1258 | "dev": true, 1259 | "requires": { 1260 | "debug": "^4.1.1", 1261 | "istanbul-lib-coverage": "^3.0.0", 1262 | "source-map": "^0.6.1" 1263 | }, 1264 | "dependencies": { 1265 | "debug": { 1266 | "version": "4.1.1", 1267 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 1268 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 1269 | "dev": true, 1270 | "requires": { 1271 | "ms": "^2.1.1" 1272 | } 1273 | }, 1274 | "ms": { 1275 | "version": "2.1.2", 1276 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1277 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1278 | "dev": true 1279 | }, 1280 | "source-map": { 1281 | "version": "0.6.1", 1282 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1283 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1284 | "dev": true 1285 | } 1286 | } 1287 | }, 1288 | "istanbul-reports": { 1289 | "version": "3.0.2", 1290 | "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", 1291 | "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", 1292 | "dev": true, 1293 | "requires": { 1294 | "html-escaper": "^2.0.0", 1295 | "istanbul-lib-report": "^3.0.0" 1296 | } 1297 | }, 1298 | "js-tokens": { 1299 | "version": "4.0.0", 1300 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1301 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1302 | "dev": true 1303 | }, 1304 | "js-yaml": { 1305 | "version": "4.1.0", 1306 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1307 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1308 | "dev": true, 1309 | "requires": { 1310 | "argparse": "^2.0.1" 1311 | }, 1312 | "dependencies": { 1313 | "argparse": { 1314 | "version": "2.0.1", 1315 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1316 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1317 | "dev": true 1318 | } 1319 | } 1320 | }, 1321 | "jsbn": { 1322 | "version": "0.1.1", 1323 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 1324 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 1325 | }, 1326 | "jsesc": { 1327 | "version": "2.5.2", 1328 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", 1329 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", 1330 | "dev": true 1331 | }, 1332 | "json-schema-traverse": { 1333 | "version": "0.4.1", 1334 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1335 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 1336 | }, 1337 | "json-stringify-safe": { 1338 | "version": "5.0.1", 1339 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 1340 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 1341 | }, 1342 | "json5": { 1343 | "version": "2.2.3", 1344 | "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", 1345 | "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", 1346 | "dev": true 1347 | }, 1348 | "jspath": { 1349 | "version": "0.3.4", 1350 | "resolved": "https://registry.npmjs.org/jspath/-/jspath-0.3.4.tgz", 1351 | "integrity": "sha1-2J0+0uh0NP5s0ASyQskS35aXNSQ=" 1352 | }, 1353 | "jsprim": { 1354 | "version": "1.4.2", 1355 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", 1356 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", 1357 | "requires": { 1358 | "assert-plus": "1.0.0", 1359 | "extsprintf": "1.3.0", 1360 | "json-schema": "0.4.0", 1361 | "verror": "1.10.0" 1362 | }, 1363 | "dependencies": { 1364 | "json-schema": { 1365 | "version": "0.4.0", 1366 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", 1367 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" 1368 | } 1369 | } 1370 | }, 1371 | "lcov-parse": { 1372 | "version": "1.0.0", 1373 | "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", 1374 | "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", 1375 | "dev": true 1376 | }, 1377 | "locate-path": { 1378 | "version": "5.0.0", 1379 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", 1380 | "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", 1381 | "dev": true, 1382 | "requires": { 1383 | "p-locate": "^4.1.0" 1384 | } 1385 | }, 1386 | "lodash": { 1387 | "version": "4.17.21", 1388 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1389 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 1390 | }, 1391 | "lodash.flattendeep": { 1392 | "version": "4.4.0", 1393 | "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", 1394 | "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", 1395 | "dev": true 1396 | }, 1397 | "log-driver": { 1398 | "version": "1.2.7", 1399 | "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", 1400 | "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", 1401 | "dev": true 1402 | }, 1403 | "log-symbols": { 1404 | "version": "4.1.0", 1405 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1406 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1407 | "dev": true, 1408 | "requires": { 1409 | "chalk": "^4.1.0", 1410 | "is-unicode-supported": "^0.1.0" 1411 | }, 1412 | "dependencies": { 1413 | "ansi-styles": { 1414 | "version": "4.3.0", 1415 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1416 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1417 | "dev": true, 1418 | "requires": { 1419 | "color-convert": "^2.0.1" 1420 | } 1421 | }, 1422 | "chalk": { 1423 | "version": "4.1.2", 1424 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1425 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1426 | "dev": true, 1427 | "requires": { 1428 | "ansi-styles": "^4.1.0", 1429 | "supports-color": "^7.1.0" 1430 | } 1431 | }, 1432 | "color-convert": { 1433 | "version": "2.0.1", 1434 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1435 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1436 | "dev": true, 1437 | "requires": { 1438 | "color-name": "~1.1.4" 1439 | } 1440 | }, 1441 | "color-name": { 1442 | "version": "1.1.4", 1443 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1444 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1445 | "dev": true 1446 | }, 1447 | "supports-color": { 1448 | "version": "7.2.0", 1449 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1450 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1451 | "dev": true, 1452 | "requires": { 1453 | "has-flag": "^4.0.0" 1454 | } 1455 | } 1456 | } 1457 | }, 1458 | "machine": { 1459 | "version": "15.2.2", 1460 | "resolved": "https://registry.npmjs.org/machine/-/machine-15.2.2.tgz", 1461 | "integrity": "sha512-gXA/U4bjMyQd2QPw8i+AxzXEDkQBImQVE2P7mmTmXPcfszT+NJc5Me0I1Tn6Fj8zsO5EsmsFxD8Xdia751ik/w==", 1462 | "requires": { 1463 | "@sailshq/lodash": "^3.10.2", 1464 | "anchor": "^1.2.0", 1465 | "flaverr": "^1.7.0", 1466 | "parley": "^3.8.0", 1467 | "rttc": "^10.0.0-3" 1468 | } 1469 | }, 1470 | "machinepack-http": { 1471 | "version": "8.0.0", 1472 | "resolved": "https://registry.npmjs.org/machinepack-http/-/machinepack-http-8.0.0.tgz", 1473 | "integrity": "sha512-rd3rquzGstjd670bnalpLJOchavcNJLcQQ9pH2ssgi0kOTPokz59LJpsu7q70ekqVu0OAy6LXUN5SmLyrR9IcA==", 1474 | "requires": { 1475 | "@sailshq/lodash": "^3.10.2", 1476 | "machine": "^15.0.0-0", 1477 | "machinepack-urls": "^6.0.2-0", 1478 | "request": "2.88.0", 1479 | "rttc": "^10.0.1" 1480 | } 1481 | }, 1482 | "machinepack-urls": { 1483 | "version": "6.0.2-0", 1484 | "resolved": "https://registry.npmjs.org/machinepack-urls/-/machinepack-urls-6.0.2-0.tgz", 1485 | "integrity": "sha512-777UDtPvgDG2XxekkQnjQi6tHgg3uepbjWZFw82isxyMThhsNdrwzaZd9hkupxcECrThw5OuPEsL963ya+SA3w==", 1486 | "requires": { 1487 | "@sailshq/lodash": "^3.10.2", 1488 | "machine": "^15.0.0-2" 1489 | } 1490 | }, 1491 | "make-dir": { 1492 | "version": "3.0.2", 1493 | "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", 1494 | "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", 1495 | "dev": true, 1496 | "requires": { 1497 | "semver": "^6.0.0" 1498 | } 1499 | }, 1500 | "merge-descriptors": { 1501 | "version": "1.0.1", 1502 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 1503 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", 1504 | "dev": true 1505 | }, 1506 | "methods": { 1507 | "version": "1.1.2", 1508 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1509 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", 1510 | "dev": true 1511 | }, 1512 | "mime": { 1513 | "version": "1.6.0", 1514 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1515 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1516 | "dev": true 1517 | }, 1518 | "mime-db": { 1519 | "version": "1.40.0", 1520 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", 1521 | "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" 1522 | }, 1523 | "mime-types": { 1524 | "version": "2.1.24", 1525 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", 1526 | "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", 1527 | "requires": { 1528 | "mime-db": "1.40.0" 1529 | } 1530 | }, 1531 | "minimatch": { 1532 | "version": "5.0.1", 1533 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", 1534 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", 1535 | "dev": true, 1536 | "requires": { 1537 | "brace-expansion": "^2.0.1" 1538 | }, 1539 | "dependencies": { 1540 | "brace-expansion": { 1541 | "version": "2.0.1", 1542 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1543 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1544 | "dev": true, 1545 | "requires": { 1546 | "balanced-match": "^1.0.0" 1547 | } 1548 | } 1549 | } 1550 | }, 1551 | "minimist": { 1552 | "version": "1.2.8", 1553 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 1554 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 1555 | "dev": true 1556 | }, 1557 | "mocha": { 1558 | "version": "10.2.0", 1559 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", 1560 | "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", 1561 | "dev": true, 1562 | "requires": { 1563 | "ansi-colors": "4.1.1", 1564 | "browser-stdout": "1.3.1", 1565 | "chokidar": "3.5.3", 1566 | "debug": "4.3.4", 1567 | "diff": "5.0.0", 1568 | "escape-string-regexp": "4.0.0", 1569 | "find-up": "5.0.0", 1570 | "glob": "7.2.0", 1571 | "he": "1.2.0", 1572 | "js-yaml": "4.1.0", 1573 | "log-symbols": "4.1.0", 1574 | "minimatch": "5.0.1", 1575 | "ms": "2.1.3", 1576 | "nanoid": "3.3.3", 1577 | "serialize-javascript": "6.0.0", 1578 | "strip-json-comments": "3.1.1", 1579 | "supports-color": "8.1.1", 1580 | "workerpool": "6.2.1", 1581 | "yargs": "16.2.0", 1582 | "yargs-parser": "20.2.4", 1583 | "yargs-unparser": "2.0.0" 1584 | }, 1585 | "dependencies": { 1586 | "brace-expansion": { 1587 | "version": "2.0.1", 1588 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1589 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1590 | "dev": true, 1591 | "requires": { 1592 | "balanced-match": "^1.0.0" 1593 | } 1594 | }, 1595 | "debug": { 1596 | "version": "4.3.4", 1597 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1598 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1599 | "dev": true, 1600 | "requires": { 1601 | "ms": "2.1.2" 1602 | }, 1603 | "dependencies": { 1604 | "ms": { 1605 | "version": "2.1.2", 1606 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1607 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1608 | "dev": true 1609 | } 1610 | } 1611 | }, 1612 | "escape-string-regexp": { 1613 | "version": "4.0.0", 1614 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1615 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1616 | "dev": true 1617 | }, 1618 | "find-up": { 1619 | "version": "5.0.0", 1620 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1621 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1622 | "dev": true, 1623 | "requires": { 1624 | "locate-path": "^6.0.0", 1625 | "path-exists": "^4.0.0" 1626 | } 1627 | }, 1628 | "locate-path": { 1629 | "version": "6.0.0", 1630 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1631 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1632 | "dev": true, 1633 | "requires": { 1634 | "p-locate": "^5.0.0" 1635 | } 1636 | }, 1637 | "minimatch": { 1638 | "version": "5.0.1", 1639 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", 1640 | "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", 1641 | "dev": true, 1642 | "requires": { 1643 | "brace-expansion": "^2.0.1" 1644 | } 1645 | }, 1646 | "ms": { 1647 | "version": "2.1.3", 1648 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1649 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1650 | "dev": true 1651 | }, 1652 | "p-limit": { 1653 | "version": "3.1.0", 1654 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1655 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1656 | "dev": true, 1657 | "requires": { 1658 | "yocto-queue": "^0.1.0" 1659 | } 1660 | }, 1661 | "p-locate": { 1662 | "version": "5.0.0", 1663 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1664 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1665 | "dev": true, 1666 | "requires": { 1667 | "p-limit": "^3.0.2" 1668 | } 1669 | }, 1670 | "supports-color": { 1671 | "version": "8.1.1", 1672 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1673 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1674 | "dev": true, 1675 | "requires": { 1676 | "has-flag": "^4.0.0" 1677 | } 1678 | }, 1679 | "yargs-parser": { 1680 | "version": "20.2.4", 1681 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1682 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1683 | "dev": true 1684 | } 1685 | } 1686 | }, 1687 | "mocha-lcov-reporter": { 1688 | "version": "1.3.0", 1689 | "resolved": "https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-1.3.0.tgz", 1690 | "integrity": "sha1-Rpve9PivyaEWBW8HnfYYLQr7A4Q=", 1691 | "dev": true 1692 | }, 1693 | "module-not-found-error": { 1694 | "version": "1.0.1", 1695 | "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", 1696 | "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", 1697 | "dev": true 1698 | }, 1699 | "ms": { 1700 | "version": "2.0.0", 1701 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1702 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1703 | }, 1704 | "mustache": { 1705 | "version": "2.3.0", 1706 | "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.0.tgz", 1707 | "integrity": "sha1-QCj3d4sXcIpImTCm5SrDvKDaQdA=" 1708 | }, 1709 | "nanoid": { 1710 | "version": "3.3.3", 1711 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", 1712 | "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", 1713 | "dev": true 1714 | }, 1715 | "node-preload": { 1716 | "version": "0.2.1", 1717 | "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", 1718 | "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", 1719 | "dev": true, 1720 | "requires": { 1721 | "process-on-spawn": "^1.0.0" 1722 | } 1723 | }, 1724 | "normalize-path": { 1725 | "version": "3.0.0", 1726 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1727 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1728 | "dev": true 1729 | }, 1730 | "nyc": { 1731 | "version": "15.0.1", 1732 | "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.1.tgz", 1733 | "integrity": "sha512-n0MBXYBYRqa67IVt62qW1r/d9UH/Qtr7SF1w/nQLJ9KxvWF6b2xCHImRAixHN9tnMMYHC2P14uo6KddNGwMgGg==", 1734 | "dev": true, 1735 | "requires": { 1736 | "@istanbuljs/load-nyc-config": "^1.0.0", 1737 | "@istanbuljs/schema": "^0.1.2", 1738 | "caching-transform": "^4.0.0", 1739 | "convert-source-map": "^1.7.0", 1740 | "decamelize": "^1.2.0", 1741 | "find-cache-dir": "^3.2.0", 1742 | "find-up": "^4.1.0", 1743 | "foreground-child": "^2.0.0", 1744 | "glob": "^7.1.6", 1745 | "istanbul-lib-coverage": "^3.0.0", 1746 | "istanbul-lib-hook": "^3.0.0", 1747 | "istanbul-lib-instrument": "^4.0.0", 1748 | "istanbul-lib-processinfo": "^2.0.2", 1749 | "istanbul-lib-report": "^3.0.0", 1750 | "istanbul-lib-source-maps": "^4.0.0", 1751 | "istanbul-reports": "^3.0.2", 1752 | "make-dir": "^3.0.0", 1753 | "node-preload": "^0.2.1", 1754 | "p-map": "^3.0.0", 1755 | "process-on-spawn": "^1.0.0", 1756 | "resolve-from": "^5.0.0", 1757 | "rimraf": "^3.0.0", 1758 | "signal-exit": "^3.0.2", 1759 | "spawn-wrap": "^2.0.0", 1760 | "test-exclude": "^6.0.0", 1761 | "yargs": "^15.0.2" 1762 | }, 1763 | "dependencies": { 1764 | "cliui": { 1765 | "version": "6.0.0", 1766 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", 1767 | "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", 1768 | "dev": true, 1769 | "requires": { 1770 | "string-width": "^4.2.0", 1771 | "strip-ansi": "^6.0.0", 1772 | "wrap-ansi": "^6.2.0" 1773 | } 1774 | }, 1775 | "glob": { 1776 | "version": "7.1.6", 1777 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 1778 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 1779 | "dev": true, 1780 | "requires": { 1781 | "fs.realpath": "^1.0.0", 1782 | "inflight": "^1.0.4", 1783 | "inherits": "2", 1784 | "minimatch": "^3.0.4", 1785 | "once": "^1.3.0", 1786 | "path-is-absolute": "^1.0.0" 1787 | } 1788 | }, 1789 | "minimatch": { 1790 | "version": "3.1.2", 1791 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1792 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1793 | "dev": true, 1794 | "requires": { 1795 | "brace-expansion": "^1.1.7" 1796 | } 1797 | }, 1798 | "yargs": { 1799 | "version": "15.3.1", 1800 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", 1801 | "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", 1802 | "dev": true, 1803 | "requires": { 1804 | "cliui": "^6.0.0", 1805 | "decamelize": "^1.2.0", 1806 | "find-up": "^4.1.0", 1807 | "get-caller-file": "^2.0.1", 1808 | "require-directory": "^2.1.1", 1809 | "require-main-filename": "^2.0.0", 1810 | "set-blocking": "^2.0.0", 1811 | "string-width": "^4.2.0", 1812 | "which-module": "^2.0.0", 1813 | "y18n": "^4.0.0", 1814 | "yargs-parser": "^18.1.1" 1815 | } 1816 | } 1817 | } 1818 | }, 1819 | "oauth-sign": { 1820 | "version": "0.9.0", 1821 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 1822 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 1823 | }, 1824 | "once": { 1825 | "version": "1.4.0", 1826 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1827 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1828 | "dev": true, 1829 | "requires": { 1830 | "wrappy": "1" 1831 | } 1832 | }, 1833 | "p-limit": { 1834 | "version": "2.3.0", 1835 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", 1836 | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", 1837 | "dev": true, 1838 | "requires": { 1839 | "p-try": "^2.0.0" 1840 | } 1841 | }, 1842 | "p-locate": { 1843 | "version": "4.1.0", 1844 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", 1845 | "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", 1846 | "dev": true, 1847 | "requires": { 1848 | "p-limit": "^2.2.0" 1849 | } 1850 | }, 1851 | "p-map": { 1852 | "version": "3.0.0", 1853 | "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", 1854 | "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", 1855 | "dev": true, 1856 | "requires": { 1857 | "aggregate-error": "^3.0.0" 1858 | } 1859 | }, 1860 | "p-try": { 1861 | "version": "2.2.0", 1862 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 1863 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", 1864 | "dev": true 1865 | }, 1866 | "package-hash": { 1867 | "version": "4.0.0", 1868 | "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", 1869 | "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", 1870 | "dev": true, 1871 | "requires": { 1872 | "graceful-fs": "^4.1.15", 1873 | "hasha": "^5.0.0", 1874 | "lodash.flattendeep": "^4.4.0", 1875 | "release-zalgo": "^1.0.0" 1876 | } 1877 | }, 1878 | "parley": { 1879 | "version": "3.8.3", 1880 | "resolved": "https://registry.npmjs.org/parley/-/parley-3.8.3.tgz", 1881 | "integrity": "sha512-9fSqT4J0jRNh+F/5EAqZvUSq232xjFXZJ3rXgKUXbIUUZ0ZPj6VjW83mI5UpVP8PMGHF3I8xycmvNjs9nQ3O8g==", 1882 | "requires": { 1883 | "@sailshq/lodash": "^3.10.2", 1884 | "bluebird": "3.2.1", 1885 | "flaverr": "^1.5.1" 1886 | } 1887 | }, 1888 | "path-exists": { 1889 | "version": "4.0.0", 1890 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1891 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1892 | "dev": true 1893 | }, 1894 | "path-is-absolute": { 1895 | "version": "1.0.1", 1896 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1897 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1898 | "dev": true 1899 | }, 1900 | "path-key": { 1901 | "version": "3.1.1", 1902 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1903 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1904 | "dev": true 1905 | }, 1906 | "path-parse": { 1907 | "version": "1.0.7", 1908 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1909 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1910 | "dev": true 1911 | }, 1912 | "performance-now": { 1913 | "version": "2.1.0", 1914 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1915 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 1916 | }, 1917 | "picomatch": { 1918 | "version": "2.3.1", 1919 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1920 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1921 | "dev": true 1922 | }, 1923 | "pipeworks": { 1924 | "version": "1.3.1", 1925 | "resolved": "https://registry.npmjs.org/pipeworks/-/pipeworks-1.3.1.tgz", 1926 | "integrity": "sha1-+ENvhWXtHZe/OoBjKlOXv9NTOF8=" 1927 | }, 1928 | "pkg-dir": { 1929 | "version": "4.2.0", 1930 | "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", 1931 | "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", 1932 | "dev": true, 1933 | "requires": { 1934 | "find-up": "^4.0.0" 1935 | } 1936 | }, 1937 | "process-nextick-args": { 1938 | "version": "2.0.1", 1939 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1940 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 1941 | "dev": true 1942 | }, 1943 | "process-on-spawn": { 1944 | "version": "1.0.0", 1945 | "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", 1946 | "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", 1947 | "dev": true, 1948 | "requires": { 1949 | "fromentries": "^1.2.0" 1950 | } 1951 | }, 1952 | "proxyquire": { 1953 | "version": "2.1.1", 1954 | "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.1.tgz", 1955 | "integrity": "sha512-LXZGUxkFTZzPHKBmL3CMYtYIEKuz6XiR3DZ3FZ1wYP7ueXbz2NW+9AdigNzeLIf8vmuhVCwG2F5BvonXK5LhHA==", 1956 | "dev": true, 1957 | "requires": { 1958 | "fill-keys": "^1.0.2", 1959 | "module-not-found-error": "^1.0.1", 1960 | "resolve": "^1.11.1" 1961 | }, 1962 | "dependencies": { 1963 | "resolve": { 1964 | "version": "1.12.0", 1965 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", 1966 | "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", 1967 | "dev": true, 1968 | "requires": { 1969 | "path-parse": "^1.0.6" 1970 | } 1971 | } 1972 | } 1973 | }, 1974 | "psl": { 1975 | "version": "1.3.0", 1976 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", 1977 | "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==" 1978 | }, 1979 | "punycode": { 1980 | "version": "1.4.1", 1981 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 1982 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 1983 | }, 1984 | "qs": { 1985 | "version": "6.5.3", 1986 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", 1987 | "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" 1988 | }, 1989 | "randombytes": { 1990 | "version": "2.1.0", 1991 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1992 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1993 | "dev": true, 1994 | "requires": { 1995 | "safe-buffer": "^5.1.0" 1996 | } 1997 | }, 1998 | "readable-stream": { 1999 | "version": "2.3.6", 2000 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 2001 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 2002 | "dev": true, 2003 | "requires": { 2004 | "core-util-is": "~1.0.0", 2005 | "inherits": "~2.0.3", 2006 | "isarray": "~1.0.0", 2007 | "process-nextick-args": "~2.0.0", 2008 | "safe-buffer": "~5.1.1", 2009 | "string_decoder": "~1.1.1", 2010 | "util-deprecate": "~1.0.1" 2011 | }, 2012 | "dependencies": { 2013 | "safe-buffer": { 2014 | "version": "5.1.2", 2015 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 2016 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 2017 | "dev": true 2018 | } 2019 | } 2020 | }, 2021 | "readdirp": { 2022 | "version": "3.6.0", 2023 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 2024 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 2025 | "dev": true, 2026 | "requires": { 2027 | "picomatch": "^2.2.1" 2028 | } 2029 | }, 2030 | "release-zalgo": { 2031 | "version": "1.0.0", 2032 | "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", 2033 | "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", 2034 | "dev": true, 2035 | "requires": { 2036 | "es6-error": "^4.0.1" 2037 | } 2038 | }, 2039 | "request": { 2040 | "version": "2.88.0", 2041 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 2042 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 2043 | "requires": { 2044 | "aws-sign2": "~0.7.0", 2045 | "aws4": "^1.8.0", 2046 | "caseless": "~0.12.0", 2047 | "combined-stream": "~1.0.6", 2048 | "extend": "~3.0.2", 2049 | "forever-agent": "~0.6.1", 2050 | "form-data": "~2.3.2", 2051 | "har-validator": "~5.1.0", 2052 | "http-signature": "~1.2.0", 2053 | "is-typedarray": "~1.0.0", 2054 | "isstream": "~0.1.2", 2055 | "json-stringify-safe": "~5.0.1", 2056 | "mime-types": "~2.1.19", 2057 | "oauth-sign": "~0.9.0", 2058 | "performance-now": "^2.1.0", 2059 | "qs": "~6.5.2", 2060 | "safe-buffer": "^5.1.2", 2061 | "tough-cookie": "~2.4.3", 2062 | "tunnel-agent": "^0.6.0", 2063 | "uuid": "^3.3.2" 2064 | } 2065 | }, 2066 | "require-directory": { 2067 | "version": "2.1.1", 2068 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 2069 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 2070 | "dev": true 2071 | }, 2072 | "require-main-filename": { 2073 | "version": "2.0.0", 2074 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", 2075 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", 2076 | "dev": true 2077 | }, 2078 | "resolve-from": { 2079 | "version": "5.0.0", 2080 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", 2081 | "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", 2082 | "dev": true 2083 | }, 2084 | "rimraf": { 2085 | "version": "3.0.2", 2086 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 2087 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 2088 | "dev": true, 2089 | "requires": { 2090 | "glob": "^7.1.3" 2091 | }, 2092 | "dependencies": { 2093 | "glob": { 2094 | "version": "7.1.6", 2095 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 2096 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 2097 | "dev": true, 2098 | "requires": { 2099 | "fs.realpath": "^1.0.0", 2100 | "inflight": "^1.0.4", 2101 | "inherits": "2", 2102 | "minimatch": "^3.0.4", 2103 | "once": "^1.3.0", 2104 | "path-is-absolute": "^1.0.0" 2105 | } 2106 | }, 2107 | "minimatch": { 2108 | "version": "3.1.2", 2109 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 2110 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 2111 | "dev": true, 2112 | "requires": { 2113 | "brace-expansion": "^1.1.7" 2114 | } 2115 | } 2116 | } 2117 | }, 2118 | "rttc": { 2119 | "version": "10.0.1", 2120 | "resolved": "https://registry.npmjs.org/rttc/-/rttc-10.0.1.tgz", 2121 | "integrity": "sha512-wBsGNVaZ8K1qG0n5jxQ7dnOpvpewyQHGIjbMFYx8D16+51MM+FwkZwDPgH4GtnaTSzrNvrJriXFyvDi7OTZQ0A==", 2122 | "requires": { 2123 | "@sailshq/lodash": "^3.10.2" 2124 | } 2125 | }, 2126 | "safe-buffer": { 2127 | "version": "5.2.0", 2128 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", 2129 | "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" 2130 | }, 2131 | "safer-buffer": { 2132 | "version": "2.1.2", 2133 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 2134 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 2135 | }, 2136 | "semver": { 2137 | "version": "6.3.0", 2138 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 2139 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 2140 | "dev": true 2141 | }, 2142 | "serialize-javascript": { 2143 | "version": "6.0.0", 2144 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 2145 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 2146 | "dev": true, 2147 | "requires": { 2148 | "randombytes": "^2.1.0" 2149 | } 2150 | }, 2151 | "set-blocking": { 2152 | "version": "2.0.0", 2153 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 2154 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 2155 | "dev": true 2156 | }, 2157 | "shebang-command": { 2158 | "version": "2.0.0", 2159 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 2160 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 2161 | "dev": true, 2162 | "requires": { 2163 | "shebang-regex": "^3.0.0" 2164 | } 2165 | }, 2166 | "shebang-regex": { 2167 | "version": "3.0.0", 2168 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 2169 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 2170 | "dev": true 2171 | }, 2172 | "should": { 2173 | "version": "7.1.1", 2174 | "resolved": "https://registry.npmjs.org/should/-/should-7.1.1.tgz", 2175 | "integrity": "sha1-ZGTEi298Hh8YrASDV4+i3VXCxuA=", 2176 | "dev": true, 2177 | "requires": { 2178 | "should-equal": "0.5.0", 2179 | "should-format": "0.3.1", 2180 | "should-type": "0.2.0" 2181 | } 2182 | }, 2183 | "should-equal": { 2184 | "version": "0.5.0", 2185 | "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz", 2186 | "integrity": "sha1-x5fxNfMGf+tp6+zbMGscP+IbPm8=", 2187 | "dev": true, 2188 | "requires": { 2189 | "should-type": "0.2.0" 2190 | } 2191 | }, 2192 | "should-format": { 2193 | "version": "0.3.1", 2194 | "resolved": "https://registry.npmjs.org/should-format/-/should-format-0.3.1.tgz", 2195 | "integrity": "sha1-LLt4JGFnCs5CkrKx7EaNuM+Z4zA=", 2196 | "dev": true, 2197 | "requires": { 2198 | "should-type": "0.2.0" 2199 | } 2200 | }, 2201 | "should-type": { 2202 | "version": "0.2.0", 2203 | "resolved": "https://registry.npmjs.org/should-type/-/should-type-0.2.0.tgz", 2204 | "integrity": "sha1-ZwfvlVKdmJ3MCY/gdTqx+RNrt/Y=", 2205 | "dev": true 2206 | }, 2207 | "signal-exit": { 2208 | "version": "3.0.3", 2209 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 2210 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 2211 | "dev": true 2212 | }, 2213 | "spawn-wrap": { 2214 | "version": "2.0.0", 2215 | "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", 2216 | "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", 2217 | "dev": true, 2218 | "requires": { 2219 | "foreground-child": "^2.0.0", 2220 | "is-windows": "^1.0.2", 2221 | "make-dir": "^3.0.0", 2222 | "rimraf": "^3.0.0", 2223 | "signal-exit": "^3.0.2", 2224 | "which": "^2.0.1" 2225 | }, 2226 | "dependencies": { 2227 | "which": { 2228 | "version": "2.0.2", 2229 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2230 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2231 | "dev": true, 2232 | "requires": { 2233 | "isexe": "^2.0.0" 2234 | } 2235 | } 2236 | } 2237 | }, 2238 | "sprintf-js": { 2239 | "version": "1.0.3", 2240 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 2241 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 2242 | "dev": true 2243 | }, 2244 | "sshpk": { 2245 | "version": "1.16.1", 2246 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 2247 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 2248 | "requires": { 2249 | "asn1": "~0.2.3", 2250 | "assert-plus": "^1.0.0", 2251 | "bcrypt-pbkdf": "^1.0.0", 2252 | "dashdash": "^1.12.0", 2253 | "ecc-jsbn": "~0.1.1", 2254 | "getpass": "^0.1.1", 2255 | "jsbn": "~0.1.0", 2256 | "safer-buffer": "^2.0.2", 2257 | "tweetnacl": "~0.14.0" 2258 | } 2259 | }, 2260 | "string-width": { 2261 | "version": "4.2.0", 2262 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 2263 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 2264 | "dev": true, 2265 | "requires": { 2266 | "emoji-regex": "^8.0.0", 2267 | "is-fullwidth-code-point": "^3.0.0", 2268 | "strip-ansi": "^6.0.0" 2269 | } 2270 | }, 2271 | "string_decoder": { 2272 | "version": "1.1.1", 2273 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 2274 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 2275 | "dev": true, 2276 | "requires": { 2277 | "safe-buffer": "~5.1.0" 2278 | }, 2279 | "dependencies": { 2280 | "safe-buffer": { 2281 | "version": "5.1.2", 2282 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 2283 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 2284 | "dev": true 2285 | } 2286 | } 2287 | }, 2288 | "strip-ansi": { 2289 | "version": "6.0.0", 2290 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2291 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2292 | "dev": true, 2293 | "requires": { 2294 | "ansi-regex": "^5.0.0" 2295 | }, 2296 | "dependencies": { 2297 | "ansi-regex": { 2298 | "version": "5.0.1", 2299 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 2300 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 2301 | "dev": true 2302 | } 2303 | } 2304 | }, 2305 | "strip-bom": { 2306 | "version": "4.0.0", 2307 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", 2308 | "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", 2309 | "dev": true 2310 | }, 2311 | "strip-json-comments": { 2312 | "version": "3.1.1", 2313 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2314 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2315 | "dev": true 2316 | }, 2317 | "superagent": { 2318 | "version": "3.8.3", 2319 | "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", 2320 | "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", 2321 | "dev": true, 2322 | "requires": { 2323 | "component-emitter": "^1.2.0", 2324 | "cookiejar": "^2.1.0", 2325 | "debug": "^3.1.0", 2326 | "extend": "^3.0.0", 2327 | "form-data": "^2.3.1", 2328 | "formidable": "^1.2.0", 2329 | "methods": "^1.1.1", 2330 | "mime": "^1.4.1", 2331 | "qs": "^6.5.1", 2332 | "readable-stream": "^2.3.5" 2333 | }, 2334 | "dependencies": { 2335 | "debug": { 2336 | "version": "3.2.6", 2337 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 2338 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 2339 | "dev": true, 2340 | "requires": { 2341 | "ms": "^2.1.1" 2342 | } 2343 | }, 2344 | "ms": { 2345 | "version": "2.1.2", 2346 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 2347 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 2348 | "dev": true 2349 | } 2350 | } 2351 | }, 2352 | "supertest": { 2353 | "version": "3.4.2", 2354 | "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.4.2.tgz", 2355 | "integrity": "sha512-WZWbwceHUo2P36RoEIdXvmqfs47idNNZjCuJOqDz6rvtkk8ym56aU5oglORCpPeXGxT7l9rkJ41+O1lffQXYSA==", 2356 | "dev": true, 2357 | "requires": { 2358 | "methods": "^1.1.2", 2359 | "superagent": "^3.8.3" 2360 | } 2361 | }, 2362 | "supports-color": { 2363 | "version": "5.4.0", 2364 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", 2365 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", 2366 | "dev": true, 2367 | "requires": { 2368 | "has-flag": "^3.0.0" 2369 | }, 2370 | "dependencies": { 2371 | "has-flag": { 2372 | "version": "3.0.0", 2373 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 2374 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 2375 | "dev": true 2376 | } 2377 | } 2378 | }, 2379 | "test-exclude": { 2380 | "version": "6.0.0", 2381 | "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", 2382 | "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", 2383 | "dev": true, 2384 | "requires": { 2385 | "@istanbuljs/schema": "^0.1.2", 2386 | "glob": "^7.1.4", 2387 | "minimatch": "^3.0.4" 2388 | }, 2389 | "dependencies": { 2390 | "glob": { 2391 | "version": "7.1.6", 2392 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 2393 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 2394 | "dev": true, 2395 | "requires": { 2396 | "fs.realpath": "^1.0.0", 2397 | "inflight": "^1.0.4", 2398 | "inherits": "2", 2399 | "minimatch": "^3.0.4", 2400 | "once": "^1.3.0", 2401 | "path-is-absolute": "^1.0.0" 2402 | } 2403 | }, 2404 | "minimatch": { 2405 | "version": "3.1.2", 2406 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 2407 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 2408 | "dev": true, 2409 | "requires": { 2410 | "brace-expansion": "^1.1.7" 2411 | } 2412 | } 2413 | } 2414 | }, 2415 | "to-fast-properties": { 2416 | "version": "2.0.0", 2417 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", 2418 | "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", 2419 | "dev": true 2420 | }, 2421 | "to-regex-range": { 2422 | "version": "5.0.1", 2423 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2424 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2425 | "dev": true, 2426 | "requires": { 2427 | "is-number": "^7.0.0" 2428 | } 2429 | }, 2430 | "tough-cookie": { 2431 | "version": "2.4.3", 2432 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 2433 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 2434 | "requires": { 2435 | "psl": "^1.1.24", 2436 | "punycode": "^1.4.1" 2437 | } 2438 | }, 2439 | "tunnel-agent": { 2440 | "version": "0.6.0", 2441 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 2442 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 2443 | "requires": { 2444 | "safe-buffer": "^5.0.1" 2445 | } 2446 | }, 2447 | "tweetnacl": { 2448 | "version": "0.14.5", 2449 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 2450 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 2451 | }, 2452 | "type-fest": { 2453 | "version": "0.8.1", 2454 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 2455 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 2456 | "dev": true 2457 | }, 2458 | "typedarray-to-buffer": { 2459 | "version": "3.1.5", 2460 | "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", 2461 | "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", 2462 | "dev": true, 2463 | "requires": { 2464 | "is-typedarray": "^1.0.0" 2465 | } 2466 | }, 2467 | "uri-js": { 2468 | "version": "4.2.2", 2469 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 2470 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 2471 | "requires": { 2472 | "punycode": "^2.1.0" 2473 | }, 2474 | "dependencies": { 2475 | "punycode": { 2476 | "version": "2.1.1", 2477 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 2478 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 2479 | } 2480 | } 2481 | }, 2482 | "util-deprecate": { 2483 | "version": "1.0.2", 2484 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 2485 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", 2486 | "dev": true 2487 | }, 2488 | "uuid": { 2489 | "version": "3.3.2", 2490 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 2491 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" 2492 | }, 2493 | "verror": { 2494 | "version": "1.10.0", 2495 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 2496 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 2497 | "requires": { 2498 | "assert-plus": "^1.0.0", 2499 | "core-util-is": "1.0.2", 2500 | "extsprintf": "^1.2.0" 2501 | } 2502 | }, 2503 | "which-module": { 2504 | "version": "2.0.0", 2505 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", 2506 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", 2507 | "dev": true 2508 | }, 2509 | "workerpool": { 2510 | "version": "6.2.1", 2511 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", 2512 | "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", 2513 | "dev": true 2514 | }, 2515 | "wrap-ansi": { 2516 | "version": "6.2.0", 2517 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", 2518 | "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", 2519 | "dev": true, 2520 | "requires": { 2521 | "ansi-styles": "^4.0.0", 2522 | "string-width": "^4.1.0", 2523 | "strip-ansi": "^6.0.0" 2524 | }, 2525 | "dependencies": { 2526 | "ansi-styles": { 2527 | "version": "4.2.1", 2528 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", 2529 | "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", 2530 | "dev": true, 2531 | "requires": { 2532 | "@types/color-name": "^1.1.1", 2533 | "color-convert": "^2.0.1" 2534 | } 2535 | }, 2536 | "color-convert": { 2537 | "version": "2.0.1", 2538 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 2539 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 2540 | "dev": true, 2541 | "requires": { 2542 | "color-name": "~1.1.4" 2543 | } 2544 | }, 2545 | "color-name": { 2546 | "version": "1.1.4", 2547 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 2548 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 2549 | "dev": true 2550 | } 2551 | } 2552 | }, 2553 | "wrappy": { 2554 | "version": "1.0.2", 2555 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2556 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2557 | "dev": true 2558 | }, 2559 | "write-file-atomic": { 2560 | "version": "3.0.3", 2561 | "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", 2562 | "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", 2563 | "dev": true, 2564 | "requires": { 2565 | "imurmurhash": "^0.1.4", 2566 | "is-typedarray": "^1.0.0", 2567 | "signal-exit": "^3.0.2", 2568 | "typedarray-to-buffer": "^3.1.5" 2569 | } 2570 | }, 2571 | "y18n": { 2572 | "version": "4.0.1", 2573 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", 2574 | "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", 2575 | "dev": true 2576 | }, 2577 | "yargs": { 2578 | "version": "16.2.0", 2579 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 2580 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 2581 | "dev": true, 2582 | "requires": { 2583 | "cliui": "^7.0.2", 2584 | "escalade": "^3.1.1", 2585 | "get-caller-file": "^2.0.5", 2586 | "require-directory": "^2.1.1", 2587 | "string-width": "^4.2.0", 2588 | "y18n": "^5.0.5", 2589 | "yargs-parser": "^20.2.2" 2590 | }, 2591 | "dependencies": { 2592 | "y18n": { 2593 | "version": "5.0.8", 2594 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 2595 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 2596 | "dev": true 2597 | }, 2598 | "yargs-parser": { 2599 | "version": "20.2.9", 2600 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 2601 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 2602 | "dev": true 2603 | } 2604 | } 2605 | }, 2606 | "yargs-parser": { 2607 | "version": "18.1.3", 2608 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", 2609 | "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", 2610 | "dev": true, 2611 | "requires": { 2612 | "camelcase": "^5.0.0", 2613 | "decamelize": "^1.2.0" 2614 | }, 2615 | "dependencies": { 2616 | "camelcase": { 2617 | "version": "5.3.1", 2618 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 2619 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 2620 | "dev": true 2621 | } 2622 | } 2623 | }, 2624 | "yargs-unparser": { 2625 | "version": "2.0.0", 2626 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 2627 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 2628 | "dev": true, 2629 | "requires": { 2630 | "camelcase": "^6.0.0", 2631 | "decamelize": "^4.0.0", 2632 | "flat": "^5.0.2", 2633 | "is-plain-obj": "^2.1.0" 2634 | }, 2635 | "dependencies": { 2636 | "decamelize": { 2637 | "version": "4.0.0", 2638 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 2639 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 2640 | "dev": true 2641 | } 2642 | } 2643 | }, 2644 | "yocto-queue": { 2645 | "version": "0.1.0", 2646 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2647 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2648 | "dev": true 2649 | } 2650 | } 2651 | } 2652 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bagpipes", 3 | "version": "0.2.2", 4 | "description": "Less code, more flow. Let's dance!", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "test": "mocha test/*", 8 | "coverage": "nyc npm test", 9 | "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/apigee-127/bagpipes.git" 14 | }, 15 | "keywords": [ 16 | "swagger", 17 | "plumbing", 18 | "pipes" 19 | ], 20 | "author": "Scott Ganyo ", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/apigee-127/bagpipes/issues" 24 | }, 25 | "homepage": "https://github.com/apigee-127/bagpipes", 26 | "dependencies": { 27 | "async": "^2.6.4", 28 | "debug": "^2.1.2", 29 | "jspath": "^0.3.1", 30 | "lodash": "^4.17.10", 31 | "machinepack-http": "^8.0.0", 32 | "mustache": "^2.1.3", 33 | "pipeworks": "^1.3.0" 34 | }, 35 | "devDependencies": { 36 | "coveralls": "^3.0.11", 37 | "mocha": "^10.2.0", 38 | "mocha-lcov-reporter": "^1.0.0", 39 | "nyc": "^15.0.1", 40 | "proxyquire": "^2.1.1", 41 | "should": "^7.1.0", 42 | "supertest": "^3.1.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /test/bagpipes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var should = require('should'); 4 | var path = require('path'); 5 | var fs = require('fs'); 6 | var _ = require('lodash'); 7 | var Bagpipes = require('../lib'); 8 | 9 | describe('bagpipes', function() { 10 | 11 | it('should load all system fittings', function(done) { 12 | var dir = path.resolve(__dirname, '../lib/fittings'); 13 | fs.readdir(dir, function(err, files) { 14 | if (err) { return done(err); } 15 | var fittingNames = files.map(function(name) { return name.split('.')[0] }); 16 | var skipFittings = [ 'onError', 'render', 'read' ]; // these need extra parameters to create 17 | fittingNames = fittingNames.filter(function(name) { return skipFittings.indexOf(name) < 0 }); 18 | var fittings = fittingNames.map(function (name) { 19 | var fittingDef = {}; 20 | fittingDef[name] = 'nothing'; 21 | return fittingDef; 22 | }); 23 | var bagpipes = Bagpipes.create({ fittings: fittings }); 24 | bagpipes.pipes.fittings.pipes.length.should.eql(fittingNames.length); 25 | done(); 26 | }); 27 | }); 28 | 29 | it('should load all user fittings', function(done) { 30 | var dir = path.resolve(__dirname, './fixtures/fittings'); 31 | var userFittingsDirs = [ dir ]; 32 | fs.readdir(dir, function(err, files) { 33 | if (err) { return done(err); } 34 | var fittingNames = files.map(function(name) { return name.split('.')[0] }); 35 | var fittings = fittingNames.map(function (name) { 36 | var fittingDef = {}; 37 | fittingDef[name] = 'nothing'; 38 | return fittingDef; 39 | }); 40 | var bagpipes = Bagpipes.create({ fittings: fittings }, { userFittingsDirs: userFittingsDirs }); 41 | bagpipes.pipes.fittings.pipes.length.should.eql(fittingNames.length); 42 | done(); 43 | }); 44 | }); 45 | 46 | it('should run a pipe with a system fitting', function(done) { 47 | var pipe = [ { 'emit': 'something' } ]; 48 | var bagpipes = Bagpipes.create({ pipe: pipe }); 49 | var context = {}; 50 | bagpipes.play(bagpipes.getPipe('pipe'), context); 51 | context.output.should.eql('something'); 52 | done(); 53 | }); 54 | 55 | it('should load a fitting from a custom directory', function(done) { 56 | var userFittingsDirs = [ path.resolve(__dirname, './fixtures/fittings') ]; 57 | var pipe = [ 'emit' ]; 58 | var bagpipes = Bagpipes.create({ pipe: pipe }, { userFittingsDirs: userFittingsDirs }); 59 | var context = {}; 60 | bagpipes.play(bagpipes.getPipe('pipe'), context); 61 | context.output.should.eql('test'); 62 | done(); 63 | }); 64 | 65 | it('should load pre-initialized fittings', function(done) { 66 | var emitFitting = function create() { 67 | return function (context, cb) { 68 | cb(null, 'pre-initialized'); 69 | }}; 70 | var pipe = [ 'emit' ]; 71 | var bagpipes = Bagpipes.create({ pipe: pipe }, {fittings: { emit: emitFitting}}); 72 | var context = {}; 73 | bagpipes.play(bagpipes.getPipe('pipe'), context); 74 | context.output.should.eql('pre-initialized'); 75 | done(); 76 | }); 77 | 78 | it('should allow user fittings to override system fittings', function(done) { 79 | var userFittingsDirs = [ path.resolve(__dirname, './fixtures/fittings') ]; 80 | var pipe = [ 'test' ]; 81 | var bagpipes = Bagpipes.create({ pipe: pipe }, { userFittingsDirs: userFittingsDirs }); 82 | var context = {}; 83 | bagpipes.play(bagpipes.getPipe('pipe'), context); 84 | context.output.should.eql('test'); 85 | done(); 86 | }); 87 | 88 | it('should throw errors if no onError handler', function(done) { 89 | var userFittingsDirs = [ path.resolve(__dirname, './fixtures/fittings') ]; 90 | var pipe = [ 'error' ]; 91 | var bagpipes = Bagpipes.create({ pipe: pipe }, { userFittingsDirs: userFittingsDirs }); 92 | var context = {}; 93 | (function() { 94 | bagpipes.play(bagpipes.getPipe('pipe'), context) 95 | }).should.throw.error; 96 | done(); 97 | }); 98 | 99 | it('should handle errors if onError registered', function(done) { 100 | var userFittingsDirs = [ path.resolve(__dirname, './fixtures/fittings') ]; 101 | var pipe = [ { onError: 'emit'}, 'error' ]; 102 | var bagpipes = Bagpipes.create({ pipe: pipe }, { userFittingsDirs: userFittingsDirs }); 103 | var context = {}; 104 | bagpipes.play(bagpipes.getPipe('pipe'), context); 105 | context.error.should.be.an.Error; 106 | context.output.should.eql('test'); 107 | done(); 108 | }) 109 | }); 110 | -------------------------------------------------------------------------------- /test/fittings/http.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var should = require('should'); 4 | var path = require('path'); 5 | var fs = require('fs'); 6 | var _ = require('lodash'); 7 | var Bagpipes = require('../../lib'); 8 | const proxyquire = require('proxyquire'); 9 | 10 | describe('http', function() { 11 | 12 | var fitting = proxyquire('../../lib/fittings/http', { 13 | 'machinepack-http': { 14 | sendHttpRequest: function(options, cb) { 15 | cb(null, options) 16 | } 17 | } 18 | }); 19 | 20 | it('should override config baseUrl with input baseURL', function(done) { 21 | 22 | var fittingDef = { 23 | config: { 24 | baseUrl: 'configBaseURL', 25 | }, 26 | input: { 27 | baseUrl: 'inputBaseURL', 28 | url: 'someURL', 29 | method: 'get', 30 | params: {}, 31 | headers: {} 32 | } 33 | } 34 | 35 | context = { 36 | input: fittingDef.input 37 | } 38 | 39 | var http = fitting(fittingDef) 40 | http(context, function(err, configured) { 41 | configured.baseUrl.should.eql(fittingDef.input.baseUrl); 42 | done() 43 | }) 44 | }) 45 | 46 | it('should use config baseUrl when no input', function(done) { 47 | 48 | var fittingDef = { 49 | config: { 50 | baseUrl: 'configBaseURL', 51 | }, 52 | input: { 53 | url: 'someURL', 54 | method: 'get', 55 | params: {}, 56 | headers: {} 57 | } 58 | } 59 | 60 | context = { 61 | input: fittingDef.input 62 | } 63 | 64 | var http = fitting(fittingDef) 65 | http(context, function(err, configured) { 66 | configured.baseUrl.should.eql(fittingDef.config.baseUrl); 67 | done() 68 | }) 69 | }) 70 | 71 | it('should use input baseUrl when no config', function(done) { 72 | 73 | var fittingDef = { 74 | config: { 75 | }, 76 | input: { 77 | baseUrl: 'inputBaseURL', 78 | url: 'someURL', 79 | method: 'get', 80 | params: {}, 81 | headers: {} 82 | } 83 | } 84 | 85 | context = { 86 | input: fittingDef.input 87 | } 88 | 89 | var http = fitting(fittingDef) 90 | http(context, function(err, output) { 91 | output.should.eql(context.input); 92 | done() 93 | }) 94 | }) 95 | }); 96 | -------------------------------------------------------------------------------- /test/fixtures/fittings/emit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function create() { 4 | return function emit(context, cb) { 5 | cb(null, 'test'); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /test/fixtures/fittings/error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function create() { 4 | return function test(context, cb) { 5 | throw new Error('test error'); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /test/fixtures/fittings/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function create() { 4 | return function test(context, cb) { 5 | cb(null, 'test'); 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /test/fixtures/fittings/this_is_20_character.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function create() { 4 | return function test(context, cb) { 5 | cb(null, 'test'); 6 | } 7 | }; 8 | --------------------------------------------------------------------------------