├── .npmignore ├── .eslintignore ├── index.js ├── .gitignore ├── test ├── schema.json └── schema-model.spec.js ├── .editorconfig ├── LICENSE ├── package.json ├── .eslintrc.yml ├── docs └── SchemaModel.md ├── .github └── workflows │ └── main.yml ├── README.md ├── src └── schema-model.js └── yarn.lock /.npmignore: -------------------------------------------------------------------------------- 1 | # RNA 2 | .* 3 | /node_modules 4 | /reports 5 | /test 6 | rollup.config.js 7 | sauce.browsers.js 8 | karma.conf.js 9 | yarn.lock 10 | package-lock.json 11 | 12 | # RNA 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # RNA 2 | # NPM 3 | /node_modules 4 | 5 | # LINT 6 | .eslintcache 7 | .stylelintcache 8 | 9 | # TEST 10 | /test/__coverage__ 11 | /test/__generated__ 12 | 13 | /dist 14 | /public 15 | 16 | # RNA -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SchemaModel 3 | * (c) 2017 Chialab (http://www.chialab.it) 4 | * 5 | * Generate Model classes based on JSON Schema definition. 6 | */ 7 | import { SchemaModel } from './src/schema-model.js'; 8 | export default SchemaModel; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # RNA 2 | # NPM 3 | /node_modules 4 | npm-debug.log 5 | yarn-error.log 6 | 7 | # LINT 8 | .eslintcache 9 | .stylelintcache 10 | 11 | # TEST 12 | /test/__coverage__ 13 | /test/__generated__ 14 | 15 | # BUILD 16 | /dist 17 | /public 18 | 19 | # RNA -------------------------------------------------------------------------------- /test/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$ref": "#/definitions/person", 3 | "definitions": { 4 | "person": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "children": { 14 | "type": "array", 15 | "items": { 16 | "$ref": "#/definitions/person" 17 | } 18 | }, 19 | "tags": { 20 | "type": "array", 21 | "items": { 22 | "type": "string" 23 | } 24 | } 25 | }, 26 | "required": ["id"] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # RNA 2 | # EditorConfig is awesome: http://EditorConfig.org 3 | 4 | # top-most EditorConfig file 5 | root = true 6 | 7 | # Unix-style newlines with a newline ending every file 8 | [*] 9 | trim_trailing_whitespace = true 10 | end_of_line = lf 11 | insert_final_newline = true 12 | 13 | # Matches multiple files with brace expansion notation 14 | # Set default charset 15 | [*.{js,json,html,css,scss,sass}] 16 | charset = utf-8 17 | 18 | # 4 space indentation 19 | [*.{js,html,css,scss,sass}] 20 | indent_style = space 21 | indent_size = 4 22 | 23 | # 2 space indentation 24 | [*.{json,yml,yaml}] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [Makefile] 29 | indent_style = tab 30 | indent_size = 4 31 | 32 | # Allow trailing whitespaces in markdown for new line statements 33 | [*.{md,markdown}] 34 | trim_trailing_whitespace = false 35 | 36 | # RNA -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License Copyright (c) 2019 Chialab (https://chialab.io) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@chialab/schema-model", 3 | "version": "1.3.4", 4 | "description": "Generate Model classes based on JSON Schema definition.", 5 | "lib": "index.js", 6 | "main": "dist/cjs/schema-model.js", 7 | "module": "dist/esm/schema-model.js", 8 | "browser": "dist/umd/schema-model.js", 9 | "directories": { 10 | "src": "src", 11 | "test": "test", 12 | "dist": "dist" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:chialab/schema-model.git" 17 | }, 18 | "keywords": [ 19 | "model", 20 | "json", 21 | "schema" 22 | ], 23 | "author": "Chialab (https://www.chialab.it)", 24 | "license": "MIT", 25 | "bugs": { 26 | "url": "https://github.com/chialab/schema-model/issues" 27 | }, 28 | "homepage": "https://www.chialab.io/p/schema-model", 29 | "dependencies": { 30 | "tv4": "^1.2.7" 31 | }, 32 | "scripts": { 33 | "build": "rna build --production", 34 | "watch": "rna build --watch", 35 | "test": "yarn test:browser && yarn test:node", 36 | "test:browser": "rna unit 'test/*.spec.js' --coverage --browser", 37 | "test:saucelabs": "rna unit 'test/*.spec.js' --coverage --saucelabs --concurrency 2", 38 | "test:node": "rna unit 'test/*.spec.js' --coverage --node", 39 | "lint": "rna lint", 40 | "start": "yarn install --ignore-scripts && yarn watch", 41 | "prepack": "yarn run build" 42 | }, 43 | "devDependencies": { 44 | "babel-eslint": "^10.0.3", 45 | "eslint": "^6.6.0", 46 | "eslint-plugin-babel": "^5.3.0", 47 | "eslint-plugin-mocha": "^6.2.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /.eslintrc.yml: -------------------------------------------------------------------------------- 1 | # RNA 2 | extends: 3 | - eslint:recommended 4 | 5 | globals: 6 | globalThis: true 7 | assert: true 8 | expect: true 9 | should: true 10 | process: true 11 | 12 | env: 13 | es6: true 14 | browser: true 15 | node: true 16 | 17 | plugins: 18 | - mocha 19 | - babel 20 | 21 | parser: babel-eslint 22 | 23 | parserOptions: 24 | sourceType: module 25 | ecmaFeatures: 26 | jsx: true 27 | generators: false 28 | objectLiteralDuplicateProperties: false 29 | 30 | rules: 31 | quotes: 32 | - 1 33 | - single 34 | semi: 35 | - 1 36 | - always 37 | indent: 38 | - 1 39 | - 4 40 | - SwitchCase: 1 41 | func-names: 0 42 | prefer-const: 0 43 | space-before-function-paren: 44 | - 1 45 | - anonymous: never 46 | named: never 47 | asyncArrow: always 48 | no-proto: 0 49 | no-param-reassign: 0 50 | quote-props: 51 | - 1 52 | - consistent-as-needed 53 | radix: 0 54 | no-new-func: 0 55 | arrow-body-style: 56 | - 2 57 | - as-needed 58 | arrow-parens: 0 59 | arrow-spacing: 60 | - 2 61 | - before: true 62 | after: true 63 | comma-dangle: 64 | - 1 65 | - always-multiline 66 | constructor-super: 0 67 | generator-star-spacing: 0 68 | getter-return: 1 69 | no-class-assign: 0 70 | no-confusing-arrow: 71 | - 2 72 | - allowParens: true 73 | no-const-assign: 2 74 | no-new-symbol: 2 75 | no-restricted-globals: 0 76 | no-restricted-imports: 0 77 | no-this-before-super: 0 78 | no-var: 2 79 | no-useless-constructor: 2 80 | object-shorthand: 81 | - 1 82 | - always 83 | prefer-arrow-callback: 2 84 | prefer-spread: 0 85 | prefer-reflect: 0 86 | prefer-rest-params: 2 87 | prefer-template: 1 88 | require-yield: 0 89 | sort-imports: 0 90 | template-curly-spacing: 2 91 | yield-star-spacing: 92 | - 2 93 | - after 94 | max-depth: 95 | - 0 96 | - 4 97 | max-params: 98 | - 0 99 | - 3 100 | max-statements: 101 | - 0 102 | - 10 103 | no-bitwise: 0 104 | no-plusplus: 0 105 | no-unused-vars: 106 | - 1 107 | no-console: 108 | - 1 109 | require-atomic-updates: 110 | - 0 111 | 112 | # RNA -------------------------------------------------------------------------------- /docs/SchemaModel.md: -------------------------------------------------------------------------------- 1 | ## SchemaModel 2 | 3 | 4 | #### new SchemaModel(data, options) 5 | 6 | 7 | 8 | Generate Model classes based on JSON Schema definition. 9 | 10 | 11 | 12 | 13 | 14 | **Parameters:** 15 | 16 | | Name |Type | Description | 17 | |---|---|---| 18 | |`data` |*`Object`* |The (optional) initial data to set.| 19 | |`options` |*`Object`* |Optional options for data setting.| 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | ### Properties 46 | 47 | | Name | Type | Description | 48 | |---|---|---| 49 | | `defaultOptions` | *`Object`* | Default model options. | 50 | | `schema` | *`Object`* | The schema of the model. | 51 | 52 | 53 | ### Methods 54 | 55 | 56 | 57 | #### *(static)* create(schema) *→ {class}* 58 | 59 | 60 | 61 | Create a new schema class extending SchemaModel. 62 | 63 | 64 | 65 | 66 | 67 | **Parameters:** 68 | 69 | | Name |Type | Description | 70 | |---|---|---| 71 | |`schema` |*`Object`* |The schema to use for the new model class.| 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | **Returns**: 81 | 82 | 83 | **Type**: *`class`* 84 | An extended SchemaModel. 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | #### get(name) *→ {any}* 104 | 105 | 106 | 107 | Get a property value. 108 | 109 | 110 | 111 | 112 | 113 | **Parameters:** 114 | 115 | | Name |Type | Description | 116 | |---|---|---| 117 | |`name` |*`String`* |The property name to retrieve.| 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | **Returns**: 127 | 128 | 129 | **Type**: *`any`* 130 | The property value. 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | #### set(data, options) 150 | 151 | 152 | 153 | Set a bunch of properties. 154 | 155 | 156 | 157 | 158 | 159 | **Parameters:** 160 | 161 | | Name |Type | Description | 162 | |---|---|---| 163 | |`data` |*`Object`* |The data to set.| 164 | |`options` |*`Object`* |Optional options for data setting.| 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | #### validate(data) *→ {Object}* 192 | 193 | 194 | 195 | Validate a bunch of data or the model instance. 196 | 197 | 198 | 199 | 200 | 201 | **Parameters:** 202 | 203 | | Name |Type | Description | 204 | |---|---|---| 205 | |`data` |*`Object`* |Optional data to validate (if empty, use model's data).| 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | **Returns**: 215 | 216 | 217 | **Type**: *`Object`* 218 | A validation result. 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | #### toJSON() *→ {Object}* 238 | 239 | 240 | 241 | Convert the model to a plain javascript object. 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | **Returns**: 254 | 255 | 256 | **Type**: *`Object`* 257 | A representation of the model as plain object. -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Main 2 | on: push 3 | 4 | jobs: 5 | # BUILD 6 | build: 7 | name: Build 8 | runs-on: ubuntu-latest 9 | if: contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false 10 | steps: 11 | - name: Checkout the repository 12 | uses: actions/checkout@v1 13 | - name: Setup Node 14 | uses: actions/setup-node@v1 15 | - name: Config Yarn cache 16 | run: yarn config set cache-folder $GITHUB_WORKSPACE/.yarn 17 | - name: Set up Yarn cache 18 | uses: actions/cache@v1 19 | with: 20 | path: .yarn 21 | key: yarn-cache-${{ runner.OS }}-${{ hashFiles('**/yarn.lock') }} 22 | - name: Set up NPM cache 23 | uses: actions/cache@v1 24 | with: 25 | path: ~/.npm 26 | key: npm-cache-${{ hashFiles('**/yarn.lock') }} 27 | - name: Install RNA 28 | run: npm install -g @chialab/rna-cli 29 | - name: Install project dependencies 30 | run: yarn install 31 | - name: Run build script 32 | run: yarn run build 33 | - name: Cache distribution files 34 | uses: actions/cache@v1 35 | with: 36 | path: dist 37 | key: build-${{ github.sha }} 38 | - name: Upload distribution files 39 | uses: actions/upload-artifact@v1 40 | with: 41 | name: SchemaModel 42 | path: dist 43 | # TEST 44 | test-node: 45 | name: Test Node 46 | needs: 47 | - build 48 | runs-on: ubuntu-latest 49 | steps: 50 | - name: Checkout the repository 51 | uses: actions/checkout@v1 52 | - name: Setup Node 53 | uses: actions/setup-node@v1 54 | - name: Config Yarn cache 55 | run: yarn config set cache-folder $GITHUB_WORKSPACE/.yarn 56 | - name: Set up Yarn cache 57 | uses: actions/cache@v1 58 | with: 59 | path: .yarn 60 | key: yarn-cache-${{ runner.OS }}-${{ hashFiles('**/yarn.lock') }} 61 | - name: Set up NPM cache 62 | uses: actions/cache@v1 63 | with: 64 | path: ~/.npm 65 | key: npm-cache-${{ hashFiles('**/yarn.lock') }} 66 | - name: Install RNA 67 | run: npm install -g @chialab/rna-cli 68 | - name: Install project dependencies 69 | run: yarn install 70 | - name: Fetch build artifacts 71 | uses: actions/cache@v1 72 | with: 73 | path: dist 74 | key: build-${{ github.sha }} 75 | - name: Run tests 76 | run: yarn run test:node 77 | - name: Upload coverage to codecov 78 | uses: codecov/codecov-action@v1 79 | with: 80 | token: ${{ secrets.CODECOV_TOKEN }} 81 | file: test/__coverage__/*/lcov.info 82 | test-browsers: 83 | name: Test Browsers 84 | needs: 85 | - build 86 | runs-on: ubuntu-latest 87 | steps: 88 | - name: Checkout the repository 89 | uses: actions/checkout@v1 90 | - name: Setup Node 91 | uses: actions/setup-node@v1 92 | - name: Config Yarn cache 93 | run: yarn config set cache-folder $GITHUB_WORKSPACE/.yarn 94 | - name: Set up Yarn cache 95 | uses: actions/cache@v1 96 | with: 97 | path: .yarn 98 | key: yarn-cache-${{ runner.OS }}-${{ hashFiles('**/yarn.lock') }} 99 | - name: Set up NPM cache 100 | uses: actions/cache@v1 101 | with: 102 | path: ~/.npm 103 | key: npm-cache-${{ hashFiles('**/yarn.lock') }} 104 | - name: Install RNA 105 | run: npm install -g @chialab/rna-cli 106 | - name: Install project dependencies 107 | run: yarn install 108 | - name: Fetch build artifacts 109 | uses: actions/cache@v1 110 | with: 111 | path: dist 112 | key: build-${{ github.sha }} 113 | - name: Run tests 114 | run: yarn run test:saucelabs 115 | env: 116 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} 117 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} 118 | - name: Upload coverage to codecov 119 | uses: codecov/codecov-action@v1 120 | with: 121 | token: ${{ secrets.CODECOV_TOKEN }} 122 | file: test/__coverage__/*/lcov.info 123 | -------------------------------------------------------------------------------- /test/schema-model.spec.js: -------------------------------------------------------------------------------- 1 | /* eslint-env mocha */ 2 | import { SchemaModel } from '../src/schema-model.js'; 3 | import SCHEMA from './schema.json'; 4 | 5 | describe('Unit: SchemaModel', () => { 6 | describe('custom model creation', () => { 7 | const Model = SchemaModel.create(SCHEMA); 8 | let model = new Model({ 9 | id: 'entry1', 10 | name: 'Alan', 11 | children: [], 12 | tags: ['father', 'man', 'mathematician'], 13 | }); 14 | 15 | it('should instantiate the model', () => { 16 | assert.equal(model.get('id'), 'entry1'); 17 | assert.equal(model.id, 'entry1'); 18 | }); 19 | 20 | it('should handle complex data', () => { 21 | model.set('children', [ 22 | new Model({ 23 | id: 'child1', 24 | name: 'Julian', 25 | }), 26 | ]); 27 | assert.equal(model.get('children').length, 1); 28 | assert(model.get('children')[0] instanceof Model); 29 | assert(model.validate().valid); 30 | assert.equal(JSON.stringify(model.toJSON()), '{"id":"entry1","name":"Alan","children":[{"id":"child1","name":"Julian"}],"tags":["father","man","mathematician"]}'); 31 | }); 32 | }); 33 | 34 | describe('empty schema model', () => { 35 | it('throws on instantiation', () => { 36 | let willThrow = () => { new SchemaModel({ id: 'throw' }); }; 37 | assert.throws(willThrow, Error, 'Missing schema'); 38 | }); 39 | }); 40 | 41 | describe('validation', () => { 42 | const Model = SchemaModel.create(SCHEMA); 43 | it('should validate correct models', () => { 44 | let model = new Model({ id: 'entry1' }); 45 | assert(model.validate().valid); 46 | }); 47 | 48 | it('should set correct values', () => { 49 | let model = new Model({ id: 'entry1' }); 50 | model.set('name', 'Alan'); 51 | assert.equal(model.get('name'), 'Alan'); 52 | assert.equal(model.name, 'Alan'); 53 | assert(model.validate().valid); 54 | }); 55 | 56 | it('should not set wrong values', () => { 57 | let model = new Model({ id: 'entry1', name: 'Alan' }); 58 | let willThrow = () => { model.set('name', 2); }; 59 | assert.throws(willThrow, Error, 'Invalid type: number (expected string)'); 60 | assert.equal(model.get('name'), 'Alan'); 61 | assert.equal(model.name, 'Alan'); 62 | }); 63 | 64 | it('should not set wrong complex values', () => { 65 | let model = new Model({ id: 'entry1', name: 'Alan', children: [] }); 66 | let willThrow = () => { model.set('children', [ 67 | { id: 'child1', name: 2 }, 68 | ]); }; 69 | assert.throws(willThrow, Error, 'Invalid type: number (expected string)'); 70 | assert.equal(model.get('name'), 'Alan'); 71 | assert.equal(model.get('children').length, 0); 72 | }); 73 | 74 | it('should skip validation', () => { 75 | let model = new Model({ id: 'entry1' }); 76 | model.set('name', 2, { validate: false }); 77 | assert(model.get('name'), 2); 78 | assert(model.name, 2); 79 | let validation = model.validate(); 80 | assert.equal(validation.valid, false); 81 | assert.equal(validation.error.message, 'Invalid type: number (expected string)'); 82 | }); 83 | 84 | it('should invalidate models with missing data', () => { 85 | let model = new Model(); 86 | let validation = model.validate(); 87 | assert.equal(validation.valid, false); 88 | assert.equal(validation.error.message, 'Missing required property: id'); 89 | }); 90 | }); 91 | 92 | describe('use custom getters', () => { 93 | const Model = class extends SchemaModel { 94 | static get schema() { 95 | return SCHEMA; 96 | } 97 | 98 | get id() { 99 | return this.get('id', { internal: true }) || 'entry1'; 100 | } 101 | 102 | set id(id) { 103 | this.set('id', id, { internal: true }); 104 | } 105 | 106 | get name() { 107 | return this.get('privateName', { internal: true }); 108 | } 109 | 110 | set name(name) { 111 | this.set('privateName', name, { internal: true }); 112 | } 113 | }; 114 | 115 | it('should set internal properties', () => { 116 | let model = new Model({ name: 'Alan' }); 117 | assert(model.validate().valid); 118 | assert.equal(model.get('id'), 'entry1'); 119 | assert.equal(model.id, 'entry1'); 120 | assert.equal(model.get('name'), 'Alan'); 121 | assert.equal(model.name, 'Alan'); 122 | assert.equal(model.get('privateName', { internal: true }), 'Alan'); 123 | assert.equal(model.privateName, undefined); 124 | }); 125 | }); 126 | }); 127 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | SchemaModel • Generate Model classes based on JSON Schema definition. 3 |

4 | 5 |

6 | Documentation link 7 | Source link 8 | Authors link 9 | NPM 10 | License 11 |

12 | 13 | --- 14 | 15 | ## Install 16 | 17 | ```sh 18 | $ npm install @chialab/schema-model 19 | # or 20 | $ yarn add @chialab/schema-model 21 | ``` 22 | 23 | Use via cdn: 24 | ```html 25 | 26 | ``` 27 | 28 | ## Usage 29 | 30 | The `SchemaModel` object can be extended or use as factory to create Model classes dynamically. 31 | 32 | ### Extend the base model 33 | 34 | ```js 35 | import SchemaModel from '@chialab/schema-model'; 36 | 37 | class PersonModel extends SchemaModel { 38 | static get schema() { 39 | return { 40 | type: 'object', 41 | properties: { 42 | id: { 43 | type: 'number', 44 | }, 45 | firstName: { 46 | type: 'string', 47 | }, 48 | lastName: { 49 | type: 'string', 50 | }, 51 | married: { 52 | type: 'boolean', 53 | }, 54 | }, 55 | required: ['id'], 56 | }; 57 | } 58 | } 59 | 60 | let person = new PersonModel({ 61 | id: 1, 62 | }); 63 | ``` 64 | 65 | ### As factory 66 | 67 | ```js 68 | const PersonModel = SchemaModel.create({ 69 | type: 'object', 70 | properties: { 71 | id: { 72 | type: 'number', 73 | }, 74 | firstName: { 75 | type: 'string', 76 | }, 77 | lastName: { 78 | type: 'string', 79 | }, 80 | married: { 81 | type: 'boolean', 82 | }, 83 | }, 84 | required: ['id'], 85 | }); 86 | 87 | let person = new PersonModel({ 88 | id: 1, 89 | }); 90 | ``` 91 | 92 | ## Validation 93 | 94 | SchemaModel uses [tv4](https://github.com/geraintluff/tv4) to validate model data on creation and update. 95 | 96 | ### Get the validation state 97 | 98 | Use the `.validate` method to retrieve the validation state of the model. 99 | 100 | ```js 101 | let person = new PersonModel(); 102 | let validation = person.validate(); 103 | console.log(validation.valid); // --> false 104 | console.log(validation.error.message); // --> 'Missing required property: id' 105 | ``` 106 | 107 | ### Creation and update 108 | 109 | When a set of data is pass to the constructor or to the `.set` method, the model will try to validate them. If the validation fails, an exception is thrown and the new data **will not** be set. 110 | 111 | ```js 112 | try { 113 | let person = new PersonModel({ firstName: 'Alan' }); 114 | } catch (err) { 115 | console.log(err.message); // --> 'Missing required property: id' 116 | } 117 | ``` 118 | 119 | ```js 120 | try { 121 | let person = new PersonModel({ id: 1, firstName: 'Alan' }); 122 | person.set({ 123 | lastName: 10, 124 | }); 125 | } catch (err) { 126 | console.log(err.message); // --> 'Invalid type: number (expected string)' 127 | } 128 | ``` 129 | 130 | ### Skip validation 131 | 132 | By the way, you can disabled the auto validation passing `validate: false` as option for constructor/set. 133 | 134 | ```js 135 | let person = new PersonModel({ firstName: 'Alan' }, { validate: false }); 136 | let validation = person.validate(); 137 | console.log(validation.valid); // --> false 138 | console.log(validation.error.message); // --> 'Missing required property: id' 139 | ``` 140 | 141 | ## Getting and setting data 142 | 143 | In order to get an object representing model data, you can use the `.toJSON` helper, which converts all model instances in javascript plain objects: 144 | 145 | ```js 146 | let person = new PersonModel({ id: 1, firstName: 'Alan' }); 147 | console.log(person); // --> PersonModel{ id: 1, firstName: 'Alan' } 148 | console.log(person.toJSON()); // --> { id: 1, firstName: 'Alan' } 149 | ``` 150 | 151 | You can access a property of the model using the `.get` method, or accessing directly to its reference: 152 | 153 | ```js 154 | let person = new PersonModel({ id: 1, firstName: 'Alan' }); 155 | console.log(person.get('id')); // --> 1 156 | console.log(person.firstName); // --> 'Alan' 157 | ``` 158 | 159 | By the way, you should always use the `.set` method to update the model: 160 | ```js 161 | let person = new PersonModel({ id: 1, firstName: 'Alan' }); 162 | 163 | // ok! 164 | person.set({ 165 | lastName: 'Turing', 166 | }); 167 | 168 | // no no no 169 | person.lastName = 'Turing'; 170 | ``` 171 | 172 | ### Define getters and setters 173 | 174 | Using ES2015 classes (or `Object.defineProperty` programmatically), you can define a custom getter and setter for a property: 175 | 176 | ```js 177 | import SchemaModel from '@chialab/schema-model'; 178 | 179 | class PersonModel extends SchemaModel { 180 | static get schema() { 181 | return { 182 | type: 'object', 183 | properties: { 184 | id: { 185 | type: 'number', 186 | }, 187 | firstName: { 188 | type: 'string', 189 | }, 190 | lastName: { 191 | type: 'string', 192 | }, 193 | married: { 194 | type: 'boolean', 195 | }, 196 | }, 197 | required: ['id'], 198 | }; 199 | } 200 | 201 | set married(married) { 202 | // passing the `internal: true` options you can set a private property. 203 | this.set('married', !!married, { internal: true }); 204 | } 205 | 206 | get married() { 207 | // setup a default value for a property 208 | return this.get('married', { internal: true }) || false; 209 | } 210 | } 211 | 212 | let person = new PersonModel({ 213 | id: 1, 214 | }); 215 | console.log(person.married); // --> false 216 | person.set({ married: true }); 217 | console.log(person.married); // --> true 218 | ``` 219 | 220 | ## Development 221 | 222 | [![Build status](https://github.com/chialab/schema-model/workflows/Main/badge.svg)](https://github.com/chialab/schema-model/actions?query=workflow%3ABuild) 223 | [![codecov](https://codecov.io/gh/chialab/schema-model/branch/master/graph/badge.svg)](https://codecov.io/gh/chialab/schema-model) 224 | 225 | [![Sauce Test Status](https://saucelabs.com/browser-matrix/chialab-sl-013.svg)](https://app.saucelabs.com/u/chialab-sl-013) 226 | 227 | ### Requirements 228 | 229 | In order to build and test SchemaModel, the following requirements are needed: 230 | * [NodeJS](https://nodejs.org/) (>= 10.0.0) 231 | * [Yarn](https://yarnpkg.com) 232 | * [RNA](https://github.com/chialab/rna-cli) (>= 3.0.0) 233 | 234 | ### Build the project 235 | 236 | Install the dependencies and run the `build` script: 237 | ``` 238 | $ yarn install 239 | $ yarn build 240 | ``` 241 | 242 | This will generate the UMD and ESM bundles in the `dist` folder, as well as the declaration file. 243 | 244 | ### Test the project 245 | 246 | Run the `test` script: 247 | 248 | ``` 249 | $ yarn test 250 | ``` 251 | 252 | --- 253 | 254 | ## License 255 | 256 | SchemaModel is released under the [MIT](https://github.com/chialab/schema-model/blob/master/LICENSE) license. 257 | -------------------------------------------------------------------------------- /src/schema-model.js: -------------------------------------------------------------------------------- 1 | import tv4 from 'tv4'; 2 | 3 | tv4.addFormat('date-time', (data) => { 4 | if (typeof data === 'string') { 5 | data = new Date(data); 6 | } 7 | if ((data instanceof Date) && !isNaN(data.getTime())) { 8 | return null; 9 | } 10 | return 'Invalid date'; 11 | }); 12 | 13 | function isObject(val) { 14 | return val !== null && val !== undefined && typeof val === 'object'; 15 | } 16 | 17 | /** 18 | * Clone javascript objects. 19 | * @private 20 | * 21 | * @param {Object|Array} obj The object to clone. 22 | * @param {Function} callback An optional function which runs before inserting a property. 23 | * @return {Object|Array} The clone of the object. 24 | */ 25 | function clone(obj, callback) { 26 | callback = callback || function(scope, key, prop) { return prop; }; 27 | if (Array.isArray(obj)) { 28 | return obj.map((entry, index) => { 29 | entry = callback(obj, index, entry); 30 | if (isObject(entry)) { 31 | return clone(entry, callback); 32 | } 33 | return entry; 34 | }); 35 | } else if (obj instanceof Date) { 36 | return new Date(obj); 37 | } 38 | let res = {}; 39 | Object.keys(obj).forEach((k) => { 40 | let val = callback(obj, k, obj[k]); 41 | if (isObject(val)) { 42 | res[k] = clone(val, callback); 43 | } else { 44 | res[k] = val; 45 | } 46 | }); 47 | return res; 48 | } 49 | /** 50 | * Merge two objects in a new one. 51 | * @private 52 | * 53 | * @param {Object} obj1 The initial object. 54 | * @param {Object} obj2 The object to merge. 55 | * @return {Object} The merged object. 56 | */ 57 | function merge(obj1, obj2) { 58 | let res = clone(obj1); 59 | Object.keys(obj2).forEach((key) => { 60 | if (isObject(obj2[key])) { 61 | if (isObject(res[key])) { 62 | res[key] = merge(res[key], obj2[key]); 63 | } else { 64 | res[key] = obj2[key]; 65 | } 66 | } else { 67 | res[key] = obj2[key]; 68 | } 69 | }); 70 | return res; 71 | } 72 | /** 73 | * Get data from an object. 74 | * @private 75 | * 76 | * @param {Object} scope The object to use. 77 | * @param {String} k The data key. 78 | * @param {Boolean} internal Should get value has private property. 79 | * @return {any} The value of the object for the given key. 80 | */ 81 | function get(scope, k, internal) { 82 | if (internal) { 83 | k = getSymbol(k); 84 | } 85 | return scope[k]; 86 | } 87 | /** 88 | * Merge data to another object. 89 | * @private 90 | * 91 | * @param {Object} scope The object to update. 92 | * @param {Object} data The object to merge. 93 | * @param {Boolean} internal Should set value has private property. 94 | */ 95 | function set(scope, data, internal) { 96 | Object.keys(data).forEach((k) => { 97 | let ok = k; 98 | if (internal) { 99 | k = getSymbol(k); 100 | } 101 | if (scope[k] !== data[ok]) { 102 | scope[k] = data[ok]; 103 | } 104 | }); 105 | } 106 | /** 107 | * Create a private symbol. 108 | * @private 109 | * 110 | * @param {String} name The name of the property to privatize. 111 | * @return {Symbol|String} 112 | */ 113 | function getSymbol(name) { 114 | if (!getSymbol.cache[name]) { 115 | if (typeof Symbol !== 'undefined') { 116 | getSymbol.cache[name] = Symbol(name); 117 | } else { 118 | getSymbol.cache[name] = `__${name}`; 119 | } 120 | } 121 | return getSymbol.cache[name]; 122 | } 123 | 124 | getSymbol.cache = {}; 125 | /** 126 | * Get all root properties merging definition. 127 | * @private 128 | * 129 | * @param {Object} schema The schema to analyze. 130 | * @param {Object} validator The validator instance. 131 | * @return {Object} A list of properties. 132 | */ 133 | function getProperties(schema, validator) { 134 | let root = !validator; 135 | if (root) { 136 | validator = tv4.freshApi(); 137 | validator.addSchema('', schema); 138 | } 139 | if (schema.definitions) { 140 | for (let k in schema.definitions) { 141 | validator.addSchema(`#/definitions/${k}`, schema.definitions[k]); 142 | } 143 | } 144 | if (schema.$ref) { 145 | schema = validator.getSchema(schema.$ref); 146 | } 147 | if (schema.properties) { 148 | return clone(schema.properties); 149 | } 150 | let res = {}; 151 | let defs = schema['anyOf'] || schema['allOf'] || (root && schema['oneOf']); 152 | if (defs) { 153 | defs.forEach((def) => { 154 | res = merge(res, getProperties(def, validator)); 155 | }); 156 | } 157 | return res; 158 | } 159 | 160 | const DEFAULT_OPTIONS = { 161 | validate: true, 162 | internal: false, 163 | }; 164 | 165 | export class SchemaModel { 166 | /** 167 | * Merge two objects in a new one. 168 | * 169 | * @param {Object} obj1 The initial object. 170 | * @param {Object} obj2 The object to merge. 171 | * @return {Object} The merged object. 172 | */ 173 | static merge(...args) { 174 | return merge(...args); 175 | } 176 | /** 177 | * Clone javascript objects. 178 | * 179 | * @param {Object|Array} obj The object to clone. 180 | * @param {Function} callback An optional function which runs before inserting a property. 181 | * @return {Object|Array} The clone of the object. 182 | */ 183 | static clone(...args) { 184 | return clone(...args); 185 | } 186 | /** 187 | * Create a new schema class extending SchemaModel. 188 | * 189 | * @param {Object} schema The schema to use for the new model class. 190 | * @return {class} An extended SchemaModel. 191 | */ 192 | static create(schema) { 193 | return class extends SchemaModel { 194 | static get schema() { 195 | return schema; 196 | } 197 | }; 198 | } 199 | /** 200 | * The schema of the model. 201 | * @type {Object} 202 | * @memberof SchemaModel 203 | */ 204 | static get schema() { 205 | throw new Error('Missing schema'); 206 | } 207 | /** 208 | * The schema merged properties. 209 | * @type {Object} 210 | * @memberof SchemaModel 211 | */ 212 | static get schemaProperties() { 213 | return getProperties(this.schema); 214 | } 215 | /** 216 | * Generate Model classes based on JSON Schema definition. 217 | * @class 218 | * 219 | * @param {Object} data The (optional) initial data to set. 220 | * @param {Object} options Optional options for data setting. 221 | */ 222 | constructor(data, options) { 223 | if (data) { 224 | this.set(data, options); 225 | } 226 | } 227 | /** 228 | * Get a property value. 229 | * 230 | * @param {String} name The property name to retrieve. 231 | * @param {Object} options Optional options for data getting. 232 | * @return {any} The property value. 233 | */ 234 | get(name, options) { 235 | options = merge(DEFAULT_OPTIONS, options || {}); 236 | return get(this, name, options.internal); 237 | } 238 | /** 239 | * Set a bunch of properties. 240 | * 241 | * @param {Object} data The data to set. 242 | * @param {Object} options Optional options for data setting. 243 | */ 244 | set(data, value, options) { 245 | if (typeof data === 'string') { 246 | return this.set({ 247 | [data]: value, 248 | }, options); 249 | } 250 | data = data || {}; 251 | options = merge(DEFAULT_OPTIONS, value || {}); 252 | if (!options.internal && options.validate) { 253 | let dataToValidate = merge(this.toJSON(true), data); 254 | let res = this.validate(dataToValidate, options); 255 | /* istanbul ignore if */ 256 | if (!res.valid) { 257 | if (res.error && res.error.message) { 258 | throw new Error(res.error.message); 259 | } else if (res.missing.length) { 260 | throw new Error(`Missing $ref schemas: ${res.missing.join(', ')}`); 261 | } 262 | throw new Error('Validation failed'); 263 | } 264 | } 265 | set(this, data, options.internal); 266 | } 267 | /** 268 | * Validate a bunch of data or the model instance. 269 | * 270 | * @param {Object} data Optional data to validate (if empty, use model's data). 271 | * @return {Object} A validation result. 272 | */ 273 | validate(data) { 274 | data = data || this.toJSON(true); 275 | let schema = this.constructor.schema; 276 | let res = tv4.validateResult(data, schema); 277 | /* istanbul ignore if */ 278 | if (res.valid && res.missing.length) { 279 | res.valid = false; 280 | } 281 | return res; 282 | } 283 | /** 284 | * Convert the model to a plain javascript object. 285 | * 286 | * @param {Boolean} stripUndefined Strip undefined values from model. 287 | * @return {Object} A representation of the model as plain object. 288 | */ 289 | toJSON(stripUndefined) { 290 | let keys = Object.keys(this.constructor.schemaProperties); 291 | let res = {}; 292 | keys.forEach((key) => { 293 | let val = this.get(key); 294 | if (!stripUndefined || val !== undefined) { 295 | res[key] = val; 296 | } 297 | }); 298 | res = clone(res, (scope, key, prop) => { 299 | if (prop instanceof SchemaModel) { 300 | return prop.toJSON(stripUndefined); 301 | } 302 | return prop; 303 | }); 304 | return res; 305 | } 306 | } 307 | 308 | SchemaModel.symbols = {}; 309 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": 6 | version "7.8.3" 7 | resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" 8 | integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== 9 | dependencies: 10 | "@babel/highlight" "^7.8.3" 11 | 12 | "@babel/generator@^7.8.6": 13 | version "7.8.8" 14 | resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz#cdcd58caab730834cee9eeadb729e833b625da3e" 15 | integrity sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg== 16 | dependencies: 17 | "@babel/types" "^7.8.7" 18 | jsesc "^2.5.1" 19 | lodash "^4.17.13" 20 | source-map "^0.5.0" 21 | 22 | "@babel/helper-function-name@^7.8.3": 23 | version "7.8.3" 24 | resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" 25 | integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== 26 | dependencies: 27 | "@babel/helper-get-function-arity" "^7.8.3" 28 | "@babel/template" "^7.8.3" 29 | "@babel/types" "^7.8.3" 30 | 31 | "@babel/helper-get-function-arity@^7.8.3": 32 | version "7.8.3" 33 | resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" 34 | integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== 35 | dependencies: 36 | "@babel/types" "^7.8.3" 37 | 38 | "@babel/helper-split-export-declaration@^7.8.3": 39 | version "7.8.3" 40 | resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" 41 | integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== 42 | dependencies: 43 | "@babel/types" "^7.8.3" 44 | 45 | "@babel/highlight@^7.8.3": 46 | version "7.8.3" 47 | resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" 48 | integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== 49 | dependencies: 50 | chalk "^2.0.0" 51 | esutils "^2.0.2" 52 | js-tokens "^4.0.0" 53 | 54 | "@babel/parser@^7.7.0", "@babel/parser@^7.8.6": 55 | version "7.8.8" 56 | resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" 57 | integrity sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA== 58 | 59 | "@babel/template@^7.8.3": 60 | version "7.8.6" 61 | resolved "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" 62 | integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== 63 | dependencies: 64 | "@babel/code-frame" "^7.8.3" 65 | "@babel/parser" "^7.8.6" 66 | "@babel/types" "^7.8.6" 67 | 68 | "@babel/traverse@^7.7.0": 69 | version "7.8.6" 70 | resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" 71 | integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== 72 | dependencies: 73 | "@babel/code-frame" "^7.8.3" 74 | "@babel/generator" "^7.8.6" 75 | "@babel/helper-function-name" "^7.8.3" 76 | "@babel/helper-split-export-declaration" "^7.8.3" 77 | "@babel/parser" "^7.8.6" 78 | "@babel/types" "^7.8.6" 79 | debug "^4.1.0" 80 | globals "^11.1.0" 81 | lodash "^4.17.13" 82 | 83 | "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": 84 | version "7.8.7" 85 | resolved "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" 86 | integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== 87 | dependencies: 88 | esutils "^2.0.2" 89 | lodash "^4.17.13" 90 | to-fast-properties "^2.0.0" 91 | 92 | "@types/color-name@^1.1.1": 93 | version "1.1.1" 94 | resolved "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" 95 | integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== 96 | 97 | acorn-jsx@^5.2.0: 98 | version "5.2.0" 99 | resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" 100 | integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== 101 | 102 | acorn@^7.1.1: 103 | version "7.1.1" 104 | resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" 105 | integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== 106 | 107 | ajv@^6.10.0, ajv@^6.10.2: 108 | version "6.12.0" 109 | resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" 110 | integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== 111 | dependencies: 112 | fast-deep-equal "^3.1.1" 113 | fast-json-stable-stringify "^2.0.0" 114 | json-schema-traverse "^0.4.1" 115 | uri-js "^4.2.2" 116 | 117 | ansi-escapes@^4.2.1: 118 | version "4.3.1" 119 | resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" 120 | integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== 121 | dependencies: 122 | type-fest "^0.11.0" 123 | 124 | ansi-regex@^4.1.0: 125 | version "4.1.0" 126 | resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" 127 | integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== 128 | 129 | ansi-regex@^5.0.0: 130 | version "5.0.0" 131 | resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" 132 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== 133 | 134 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: 135 | version "3.2.1" 136 | resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 137 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 138 | dependencies: 139 | color-convert "^1.9.0" 140 | 141 | ansi-styles@^4.1.0: 142 | version "4.2.1" 143 | resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" 144 | integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== 145 | dependencies: 146 | "@types/color-name" "^1.1.1" 147 | color-convert "^2.0.1" 148 | 149 | argparse@^1.0.7: 150 | version "1.0.10" 151 | resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 152 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 153 | dependencies: 154 | sprintf-js "~1.0.2" 155 | 156 | astral-regex@^1.0.0: 157 | version "1.0.0" 158 | resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" 159 | integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== 160 | 161 | babel-eslint@^10.0.3: 162 | version "10.1.0" 163 | resolved "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" 164 | integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== 165 | dependencies: 166 | "@babel/code-frame" "^7.0.0" 167 | "@babel/parser" "^7.7.0" 168 | "@babel/traverse" "^7.7.0" 169 | "@babel/types" "^7.7.0" 170 | eslint-visitor-keys "^1.0.0" 171 | resolve "^1.12.0" 172 | 173 | balanced-match@^1.0.0: 174 | version "1.0.0" 175 | resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 176 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 177 | 178 | brace-expansion@^1.1.7: 179 | version "1.1.11" 180 | resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 181 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 182 | dependencies: 183 | balanced-match "^1.0.0" 184 | concat-map "0.0.1" 185 | 186 | callsites@^3.0.0: 187 | version "3.1.0" 188 | resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" 189 | integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== 190 | 191 | chalk@^2.0.0, chalk@^2.1.0: 192 | version "2.4.2" 193 | resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 194 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 195 | dependencies: 196 | ansi-styles "^3.2.1" 197 | escape-string-regexp "^1.0.5" 198 | supports-color "^5.3.0" 199 | 200 | chalk@^3.0.0: 201 | version "3.0.0" 202 | resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" 203 | integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== 204 | dependencies: 205 | ansi-styles "^4.1.0" 206 | supports-color "^7.1.0" 207 | 208 | chardet@^0.7.0: 209 | version "0.7.0" 210 | resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" 211 | integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== 212 | 213 | cli-cursor@^3.1.0: 214 | version "3.1.0" 215 | resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" 216 | integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== 217 | dependencies: 218 | restore-cursor "^3.1.0" 219 | 220 | cli-width@^2.0.0: 221 | version "2.2.0" 222 | resolved "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" 223 | integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= 224 | 225 | color-convert@^1.9.0: 226 | version "1.9.3" 227 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 228 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 229 | dependencies: 230 | color-name "1.1.3" 231 | 232 | color-convert@^2.0.1: 233 | version "2.0.1" 234 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 235 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 236 | dependencies: 237 | color-name "~1.1.4" 238 | 239 | color-name@1.1.3: 240 | version "1.1.3" 241 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 242 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 243 | 244 | color-name@~1.1.4: 245 | version "1.1.4" 246 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 247 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 248 | 249 | concat-map@0.0.1: 250 | version "0.0.1" 251 | resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 252 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 253 | 254 | cross-spawn@^6.0.5: 255 | version "6.0.5" 256 | resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" 257 | integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== 258 | dependencies: 259 | nice-try "^1.0.4" 260 | path-key "^2.0.1" 261 | semver "^5.5.0" 262 | shebang-command "^1.2.0" 263 | which "^1.2.9" 264 | 265 | debug@^4.0.1, debug@^4.1.0: 266 | version "4.1.1" 267 | resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" 268 | integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== 269 | dependencies: 270 | ms "^2.1.1" 271 | 272 | deep-is@~0.1.3: 273 | version "0.1.3" 274 | resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 275 | integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= 276 | 277 | doctrine@^3.0.0: 278 | version "3.0.0" 279 | resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" 280 | integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== 281 | dependencies: 282 | esutils "^2.0.2" 283 | 284 | emoji-regex@^7.0.1: 285 | version "7.0.3" 286 | resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" 287 | integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== 288 | 289 | emoji-regex@^8.0.0: 290 | version "8.0.0" 291 | resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 292 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 293 | 294 | escape-string-regexp@^1.0.5: 295 | version "1.0.5" 296 | resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 297 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 298 | 299 | eslint-plugin-babel@^5.3.0: 300 | version "5.3.0" 301 | resolved "https://registry.npmjs.org/eslint-plugin-babel/-/eslint-plugin-babel-5.3.0.tgz#2e7f251ccc249326da760c1a4c948a91c32d0023" 302 | integrity sha512-HPuNzSPE75O+SnxHIafbW5QB45r2w78fxqwK3HmjqIUoPfPzVrq6rD+CINU3yzoDSzEhUkX07VUphbF73Lth/w== 303 | dependencies: 304 | eslint-rule-composer "^0.3.0" 305 | 306 | eslint-plugin-mocha@^6.2.1: 307 | version "6.3.0" 308 | resolved "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-6.3.0.tgz#72bfd06a5c4323e17e30ef41cd726030e8cdb8fd" 309 | integrity sha512-Cd2roo8caAyG21oKaaNTj7cqeYRWW1I2B5SfpKRp0Ip1gkfwoR1Ow0IGlPWnNjzywdF4n+kHL8/9vM6zCJUxdg== 310 | dependencies: 311 | eslint-utils "^2.0.0" 312 | ramda "^0.27.0" 313 | 314 | eslint-rule-composer@^0.3.0: 315 | version "0.3.0" 316 | resolved "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" 317 | integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== 318 | 319 | eslint-scope@^5.0.0: 320 | version "5.0.0" 321 | resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" 322 | integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== 323 | dependencies: 324 | esrecurse "^4.1.0" 325 | estraverse "^4.1.1" 326 | 327 | eslint-utils@^1.4.3: 328 | version "1.4.3" 329 | resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" 330 | integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== 331 | dependencies: 332 | eslint-visitor-keys "^1.1.0" 333 | 334 | eslint-utils@^2.0.0: 335 | version "2.0.0" 336 | resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" 337 | integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== 338 | dependencies: 339 | eslint-visitor-keys "^1.1.0" 340 | 341 | eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: 342 | version "1.1.0" 343 | resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" 344 | integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== 345 | 346 | eslint@^6.6.0: 347 | version "6.8.0" 348 | resolved "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" 349 | integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== 350 | dependencies: 351 | "@babel/code-frame" "^7.0.0" 352 | ajv "^6.10.0" 353 | chalk "^2.1.0" 354 | cross-spawn "^6.0.5" 355 | debug "^4.0.1" 356 | doctrine "^3.0.0" 357 | eslint-scope "^5.0.0" 358 | eslint-utils "^1.4.3" 359 | eslint-visitor-keys "^1.1.0" 360 | espree "^6.1.2" 361 | esquery "^1.0.1" 362 | esutils "^2.0.2" 363 | file-entry-cache "^5.0.1" 364 | functional-red-black-tree "^1.0.1" 365 | glob-parent "^5.0.0" 366 | globals "^12.1.0" 367 | ignore "^4.0.6" 368 | import-fresh "^3.0.0" 369 | imurmurhash "^0.1.4" 370 | inquirer "^7.0.0" 371 | is-glob "^4.0.0" 372 | js-yaml "^3.13.1" 373 | json-stable-stringify-without-jsonify "^1.0.1" 374 | levn "^0.3.0" 375 | lodash "^4.17.14" 376 | minimatch "^3.0.4" 377 | mkdirp "^0.5.1" 378 | natural-compare "^1.4.0" 379 | optionator "^0.8.3" 380 | progress "^2.0.0" 381 | regexpp "^2.0.1" 382 | semver "^6.1.2" 383 | strip-ansi "^5.2.0" 384 | strip-json-comments "^3.0.1" 385 | table "^5.2.3" 386 | text-table "^0.2.0" 387 | v8-compile-cache "^2.0.3" 388 | 389 | espree@^6.1.2: 390 | version "6.2.1" 391 | resolved "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" 392 | integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== 393 | dependencies: 394 | acorn "^7.1.1" 395 | acorn-jsx "^5.2.0" 396 | eslint-visitor-keys "^1.1.0" 397 | 398 | esprima@^4.0.0: 399 | version "4.0.1" 400 | resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 401 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 402 | 403 | esquery@^1.0.1: 404 | version "1.1.0" 405 | resolved "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz#c5c0b66f383e7656404f86b31334d72524eddb48" 406 | integrity sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q== 407 | dependencies: 408 | estraverse "^4.0.0" 409 | 410 | esrecurse@^4.1.0: 411 | version "4.2.1" 412 | resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" 413 | integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== 414 | dependencies: 415 | estraverse "^4.1.0" 416 | 417 | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: 418 | version "4.3.0" 419 | resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" 420 | integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== 421 | 422 | esutils@^2.0.2: 423 | version "2.0.3" 424 | resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" 425 | integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== 426 | 427 | external-editor@^3.0.3: 428 | version "3.1.0" 429 | resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" 430 | integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== 431 | dependencies: 432 | chardet "^0.7.0" 433 | iconv-lite "^0.4.24" 434 | tmp "^0.0.33" 435 | 436 | fast-deep-equal@^3.1.1: 437 | version "3.1.1" 438 | resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" 439 | integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== 440 | 441 | fast-json-stable-stringify@^2.0.0: 442 | version "2.1.0" 443 | resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 444 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== 445 | 446 | fast-levenshtein@~2.0.6: 447 | version "2.0.6" 448 | resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 449 | integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= 450 | 451 | figures@^3.0.0: 452 | version "3.2.0" 453 | resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" 454 | integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== 455 | dependencies: 456 | escape-string-regexp "^1.0.5" 457 | 458 | file-entry-cache@^5.0.1: 459 | version "5.0.1" 460 | resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" 461 | integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== 462 | dependencies: 463 | flat-cache "^2.0.1" 464 | 465 | flat-cache@^2.0.1: 466 | version "2.0.1" 467 | resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" 468 | integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== 469 | dependencies: 470 | flatted "^2.0.0" 471 | rimraf "2.6.3" 472 | write "1.0.3" 473 | 474 | flatted@^2.0.0: 475 | version "2.0.1" 476 | resolved "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" 477 | integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== 478 | 479 | fs.realpath@^1.0.0: 480 | version "1.0.0" 481 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 482 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 483 | 484 | functional-red-black-tree@^1.0.1: 485 | version "1.0.1" 486 | resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" 487 | integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= 488 | 489 | glob-parent@^5.0.0: 490 | version "5.1.0" 491 | resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" 492 | integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== 493 | dependencies: 494 | is-glob "^4.0.1" 495 | 496 | glob@^7.1.3: 497 | version "7.1.6" 498 | resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" 499 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== 500 | dependencies: 501 | fs.realpath "^1.0.0" 502 | inflight "^1.0.4" 503 | inherits "2" 504 | minimatch "^3.0.4" 505 | once "^1.3.0" 506 | path-is-absolute "^1.0.0" 507 | 508 | globals@^11.1.0: 509 | version "11.12.0" 510 | resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" 511 | integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== 512 | 513 | globals@^12.1.0: 514 | version "12.4.0" 515 | resolved "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" 516 | integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== 517 | dependencies: 518 | type-fest "^0.8.1" 519 | 520 | has-flag@^3.0.0: 521 | version "3.0.0" 522 | resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 523 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 524 | 525 | has-flag@^4.0.0: 526 | version "4.0.0" 527 | resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 528 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 529 | 530 | iconv-lite@^0.4.24: 531 | version "0.4.24" 532 | resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" 533 | integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== 534 | dependencies: 535 | safer-buffer ">= 2.1.2 < 3" 536 | 537 | ignore@^4.0.6: 538 | version "4.0.6" 539 | resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" 540 | integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== 541 | 542 | import-fresh@^3.0.0: 543 | version "3.2.1" 544 | resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" 545 | integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== 546 | dependencies: 547 | parent-module "^1.0.0" 548 | resolve-from "^4.0.0" 549 | 550 | imurmurhash@^0.1.4: 551 | version "0.1.4" 552 | resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 553 | integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= 554 | 555 | inflight@^1.0.4: 556 | version "1.0.6" 557 | resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 558 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 559 | dependencies: 560 | once "^1.3.0" 561 | wrappy "1" 562 | 563 | inherits@2: 564 | version "2.0.4" 565 | resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 566 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 567 | 568 | inquirer@^7.0.0: 569 | version "7.1.0" 570 | resolved "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" 571 | integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== 572 | dependencies: 573 | ansi-escapes "^4.2.1" 574 | chalk "^3.0.0" 575 | cli-cursor "^3.1.0" 576 | cli-width "^2.0.0" 577 | external-editor "^3.0.3" 578 | figures "^3.0.0" 579 | lodash "^4.17.15" 580 | mute-stream "0.0.8" 581 | run-async "^2.4.0" 582 | rxjs "^6.5.3" 583 | string-width "^4.1.0" 584 | strip-ansi "^6.0.0" 585 | through "^2.3.6" 586 | 587 | is-extglob@^2.1.1: 588 | version "2.1.1" 589 | resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 590 | integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= 591 | 592 | is-fullwidth-code-point@^2.0.0: 593 | version "2.0.0" 594 | resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 595 | integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= 596 | 597 | is-fullwidth-code-point@^3.0.0: 598 | version "3.0.0" 599 | resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 600 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 601 | 602 | is-glob@^4.0.0, is-glob@^4.0.1: 603 | version "4.0.1" 604 | resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" 605 | integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== 606 | dependencies: 607 | is-extglob "^2.1.1" 608 | 609 | is-promise@^2.1.0: 610 | version "2.1.0" 611 | resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 612 | integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= 613 | 614 | isexe@^2.0.0: 615 | version "2.0.0" 616 | resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 617 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 618 | 619 | js-tokens@^4.0.0: 620 | version "4.0.0" 621 | resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 622 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 623 | 624 | js-yaml@^3.13.1: 625 | version "3.13.1" 626 | resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" 627 | integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== 628 | dependencies: 629 | argparse "^1.0.7" 630 | esprima "^4.0.0" 631 | 632 | jsesc@^2.5.1: 633 | version "2.5.2" 634 | resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" 635 | integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== 636 | 637 | json-schema-traverse@^0.4.1: 638 | version "0.4.1" 639 | resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 640 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== 641 | 642 | json-stable-stringify-without-jsonify@^1.0.1: 643 | version "1.0.1" 644 | resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 645 | integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= 646 | 647 | levn@^0.3.0, levn@~0.3.0: 648 | version "0.3.0" 649 | resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 650 | integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= 651 | dependencies: 652 | prelude-ls "~1.1.2" 653 | type-check "~0.3.2" 654 | 655 | lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: 656 | version "4.17.15" 657 | resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" 658 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 659 | 660 | mimic-fn@^2.1.0: 661 | version "2.1.0" 662 | resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" 663 | integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== 664 | 665 | minimatch@^3.0.4: 666 | version "3.0.4" 667 | resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 668 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 669 | dependencies: 670 | brace-expansion "^1.1.7" 671 | 672 | minimist@0.0.8: 673 | version "0.0.8" 674 | resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 675 | integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= 676 | 677 | mkdirp@^0.5.1: 678 | version "0.5.1" 679 | resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 680 | integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= 681 | dependencies: 682 | minimist "0.0.8" 683 | 684 | ms@^2.1.1: 685 | version "2.1.2" 686 | resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 687 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 688 | 689 | mute-stream@0.0.8: 690 | version "0.0.8" 691 | resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" 692 | integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== 693 | 694 | natural-compare@^1.4.0: 695 | version "1.4.0" 696 | resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 697 | integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= 698 | 699 | nice-try@^1.0.4: 700 | version "1.0.5" 701 | resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" 702 | integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== 703 | 704 | once@^1.3.0: 705 | version "1.4.0" 706 | resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 707 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 708 | dependencies: 709 | wrappy "1" 710 | 711 | onetime@^5.1.0: 712 | version "5.1.0" 713 | resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" 714 | integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== 715 | dependencies: 716 | mimic-fn "^2.1.0" 717 | 718 | optionator@^0.8.3: 719 | version "0.8.3" 720 | resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" 721 | integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== 722 | dependencies: 723 | deep-is "~0.1.3" 724 | fast-levenshtein "~2.0.6" 725 | levn "~0.3.0" 726 | prelude-ls "~1.1.2" 727 | type-check "~0.3.2" 728 | word-wrap "~1.2.3" 729 | 730 | os-tmpdir@~1.0.2: 731 | version "1.0.2" 732 | resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 733 | integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= 734 | 735 | parent-module@^1.0.0: 736 | version "1.0.1" 737 | resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" 738 | integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== 739 | dependencies: 740 | callsites "^3.0.0" 741 | 742 | path-is-absolute@^1.0.0: 743 | version "1.0.1" 744 | resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 745 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 746 | 747 | path-key@^2.0.1: 748 | version "2.0.1" 749 | resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 750 | integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= 751 | 752 | path-parse@^1.0.6: 753 | version "1.0.6" 754 | resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 755 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 756 | 757 | prelude-ls@~1.1.2: 758 | version "1.1.2" 759 | resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 760 | integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= 761 | 762 | progress@^2.0.0: 763 | version "2.0.3" 764 | resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" 765 | integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== 766 | 767 | punycode@^2.1.0: 768 | version "2.1.1" 769 | resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 770 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 771 | 772 | ramda@^0.27.0: 773 | version "0.27.0" 774 | resolved "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz#915dc29865c0800bf3f69b8fd6c279898b59de43" 775 | integrity sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA== 776 | 777 | regexpp@^2.0.1: 778 | version "2.0.1" 779 | resolved "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" 780 | integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== 781 | 782 | resolve-from@^4.0.0: 783 | version "4.0.0" 784 | resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" 785 | integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== 786 | 787 | resolve@^1.12.0: 788 | version "1.15.1" 789 | resolved "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" 790 | integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== 791 | dependencies: 792 | path-parse "^1.0.6" 793 | 794 | restore-cursor@^3.1.0: 795 | version "3.1.0" 796 | resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" 797 | integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== 798 | dependencies: 799 | onetime "^5.1.0" 800 | signal-exit "^3.0.2" 801 | 802 | rimraf@2.6.3: 803 | version "2.6.3" 804 | resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" 805 | integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== 806 | dependencies: 807 | glob "^7.1.3" 808 | 809 | run-async@^2.4.0: 810 | version "2.4.0" 811 | resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" 812 | integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== 813 | dependencies: 814 | is-promise "^2.1.0" 815 | 816 | rxjs@^6.5.3: 817 | version "6.5.4" 818 | resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" 819 | integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== 820 | dependencies: 821 | tslib "^1.9.0" 822 | 823 | "safer-buffer@>= 2.1.2 < 3": 824 | version "2.1.2" 825 | resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 826 | integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== 827 | 828 | semver@^5.5.0: 829 | version "5.7.1" 830 | resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 831 | integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 832 | 833 | semver@^6.1.2: 834 | version "6.3.0" 835 | resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" 836 | integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== 837 | 838 | shebang-command@^1.2.0: 839 | version "1.2.0" 840 | resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 841 | integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= 842 | dependencies: 843 | shebang-regex "^1.0.0" 844 | 845 | shebang-regex@^1.0.0: 846 | version "1.0.0" 847 | resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 848 | integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= 849 | 850 | signal-exit@^3.0.2: 851 | version "3.0.2" 852 | resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 853 | integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= 854 | 855 | slice-ansi@^2.1.0: 856 | version "2.1.0" 857 | resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" 858 | integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== 859 | dependencies: 860 | ansi-styles "^3.2.0" 861 | astral-regex "^1.0.0" 862 | is-fullwidth-code-point "^2.0.0" 863 | 864 | source-map@^0.5.0: 865 | version "0.5.7" 866 | resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 867 | integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= 868 | 869 | sprintf-js@~1.0.2: 870 | version "1.0.3" 871 | resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 872 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 873 | 874 | string-width@^3.0.0: 875 | version "3.1.0" 876 | resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" 877 | integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== 878 | dependencies: 879 | emoji-regex "^7.0.1" 880 | is-fullwidth-code-point "^2.0.0" 881 | strip-ansi "^5.1.0" 882 | 883 | string-width@^4.1.0: 884 | version "4.2.0" 885 | resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" 886 | integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== 887 | dependencies: 888 | emoji-regex "^8.0.0" 889 | is-fullwidth-code-point "^3.0.0" 890 | strip-ansi "^6.0.0" 891 | 892 | strip-ansi@^5.1.0, strip-ansi@^5.2.0: 893 | version "5.2.0" 894 | resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" 895 | integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== 896 | dependencies: 897 | ansi-regex "^4.1.0" 898 | 899 | strip-ansi@^6.0.0: 900 | version "6.0.0" 901 | resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" 902 | integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== 903 | dependencies: 904 | ansi-regex "^5.0.0" 905 | 906 | strip-json-comments@^3.0.1: 907 | version "3.0.1" 908 | resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" 909 | integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== 910 | 911 | supports-color@^5.3.0: 912 | version "5.5.0" 913 | resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 914 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 915 | dependencies: 916 | has-flag "^3.0.0" 917 | 918 | supports-color@^7.1.0: 919 | version "7.1.0" 920 | resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" 921 | integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== 922 | dependencies: 923 | has-flag "^4.0.0" 924 | 925 | table@^5.2.3: 926 | version "5.4.6" 927 | resolved "https://registry.npmjs.org/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" 928 | integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== 929 | dependencies: 930 | ajv "^6.10.2" 931 | lodash "^4.17.14" 932 | slice-ansi "^2.1.0" 933 | string-width "^3.0.0" 934 | 935 | text-table@^0.2.0: 936 | version "0.2.0" 937 | resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 938 | integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= 939 | 940 | through@^2.3.6: 941 | version "2.3.8" 942 | resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 943 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 944 | 945 | tmp@^0.0.33: 946 | version "0.0.33" 947 | resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 948 | integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== 949 | dependencies: 950 | os-tmpdir "~1.0.2" 951 | 952 | to-fast-properties@^2.0.0: 953 | version "2.0.0" 954 | resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" 955 | integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= 956 | 957 | tslib@^1.9.0: 958 | version "1.11.1" 959 | resolved "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" 960 | integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== 961 | 962 | tv4@^1.2.7: 963 | version "1.3.0" 964 | resolved "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz#d020c846fadd50c855abb25ebaecc68fc10f7963" 965 | integrity sha1-0CDIRvrdUMhVq7JeuuzGj8EPeWM= 966 | 967 | type-check@~0.3.2: 968 | version "0.3.2" 969 | resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 970 | integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= 971 | dependencies: 972 | prelude-ls "~1.1.2" 973 | 974 | type-fest@^0.11.0: 975 | version "0.11.0" 976 | resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" 977 | integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== 978 | 979 | type-fest@^0.8.1: 980 | version "0.8.1" 981 | resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" 982 | integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== 983 | 984 | uri-js@^4.2.2: 985 | version "4.2.2" 986 | resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 987 | integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== 988 | dependencies: 989 | punycode "^2.1.0" 990 | 991 | v8-compile-cache@^2.0.3: 992 | version "2.1.0" 993 | resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" 994 | integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== 995 | 996 | which@^1.2.9: 997 | version "1.3.1" 998 | resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 999 | integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== 1000 | dependencies: 1001 | isexe "^2.0.0" 1002 | 1003 | word-wrap@~1.2.3: 1004 | version "1.2.3" 1005 | resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" 1006 | integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== 1007 | 1008 | wrappy@1: 1009 | version "1.0.2" 1010 | resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1011 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1012 | 1013 | write@1.0.3: 1014 | version "1.0.3" 1015 | resolved "https://registry.npmjs.org/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" 1016 | integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== 1017 | dependencies: 1018 | mkdirp "^0.5.1" 1019 | --------------------------------------------------------------------------------