├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── bin └── flyway.js ├── docker-compose.yml ├── lib └── download.js ├── package-lock.json ├── package.json └── sample ├── config.js └── sql └── V0001__StartingOut.pgsql /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | indent_style = space 10 | indent_size = 4 11 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "es6": true, 4 | "node": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "ecmaVersion": 2015 9 | }, 10 | "rules": { 11 | "no-console": "off", 12 | "indent": [ 13 | "error", 14 | 4 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "single" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | # Flyway source files 40 | jlib -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # dirs 4 | sample/ 5 | 6 | # linters and other style configs 7 | .eslintrc.js 8 | .editorconfig 9 | 10 | # docker 11 | docker-compose.yml 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-flywaydb 2 | NodeJs wrapper for [flywaydb cli](https://flywaydb.org/documentation/commandline/) 3 | 4 | ## Motivation 5 | I found myself wanting to use flyway on my build systems and dreading installing and maintaining the cli with all of the PATH requirements. This simple wrapper will download the latest Flyway cli on install and provide a hook for your package scripts. 6 | 7 | ## Example package script 8 | ``` 9 | "scripts": { 10 | "migrate": "flyway -c conf/flyway.js migrate" 11 | } 12 | ``` 13 | 14 | See [Example config file for inspiration](sample/config.js) 15 | -------------------------------------------------------------------------------- /bin/flyway.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const program = require('commander'); 6 | const path = require('path'); 7 | const spawn = require('child_process').spawn; 8 | const fs = require('fs'); 9 | const os = require('os'); 10 | const pkg = require('../package.json'); 11 | const download = require('../lib/download'); 12 | 13 | process.title = 'flyway'; 14 | program 15 | .version(pkg.version) 16 | .option('-c, --configfile ', 'A javascript or json file containing configuration.') 17 | .on('--help', function() { 18 | console.log(' See Flyway\'s configuration options at https://flywaydb.org/documentation/commandline/'); 19 | }); 20 | 21 | makeCommand('migrate', 'Migrates the schema to the latest version. Flyway will create the metadata table automatically if it doesn\'t exist.'); 22 | makeCommand('clean', 'Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas. The schemas are cleaned in the order specified by the schemas property.'); 23 | makeCommand('info', 'Prints the details and status information about all the migrations.'); 24 | makeCommand('validate', `Validate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly. 25 | 26 | Validation fails if 27 | - differences in migration names, types or checksums are found 28 | - versions have been applied that aren't resolved locally anymore 29 | - versions have been resolved that haven't been applied yet`); 30 | makeCommand('baseline', 'Baselines an existing database, excluding all migrations up to and including baselineVersion.'); 31 | makeCommand('repair', `Repairs the Flyway metadata table. This will perform the following actions: 32 | 33 | - Remove any failed migrations on databases without DDL transactions 34 | (User objects left behind must still be cleaned up manually) 35 | - Correct wrong checksums`); 36 | 37 | program.parse(process.argv); 38 | 39 | function makeCommand(name, desc) { 40 | program 41 | .command(name) 42 | .description(desc) 43 | .action(exeCommand); 44 | } 45 | 46 | function configFlywayArgs(config) { 47 | const flywayArgs = config.flywayArgs || {}; 48 | const flywayArgsKeys = Object.keys(flywayArgs); 49 | 50 | return flywayArgsKeys.map(function(key) { 51 | return `-${key}=${flywayArgs[key]}`; 52 | }); 53 | } 54 | 55 | function binIsFile(path) { 56 | const stats = fs.statSync(path); 57 | 58 | return !!stats && stats.isFile(); 59 | } 60 | 61 | function exeCommand(cmd) { 62 | if(!program.configfile) { 63 | throw new Error('Config file option is required'); 64 | } 65 | 66 | var config = require(path.resolve(program.configfile)); 67 | 68 | if (typeof config === 'function') { 69 | config = config(); 70 | } 71 | 72 | download.ensureArtifacts(config, function(err, flywayBin) { 73 | const workingDir = process.cwd(); 74 | 75 | if(err) { 76 | throw new Error(err); 77 | } 78 | 79 | // Ensure that the flywayBin is a file, helps with security risk of having 80 | // shell true in the spawn call below 81 | if (!binIsFile(flywayBin)) { 82 | throw new Error('Flyway bin was not found at "' + flywayBin + '"'); 83 | } 84 | 85 | const args = configFlywayArgs(config) 86 | .concat([cmd._name]); 87 | 88 | // Fix problem with spaces on windows OS 89 | // https://github.com/nodejs/node/issues/7367 90 | const isWindowsAndHasSpace = !!(flywayBin.match(/\s/) && os.platform() === 'win32'); 91 | const safeSpawnBin = isWindowsAndHasSpace ? '"' + flywayBin + '"' : flywayBin; 92 | 93 | const child = spawn(safeSpawnBin, args, { 94 | env: Object.assign({}, process.env, config.env), 95 | cwd: workingDir, 96 | stdio: 'inherit', 97 | windowsVerbatimArguments: true, // Super Weird, https://github.com/nodejs/node/issues/5060 98 | shell: isWindowsAndHasSpace, 99 | }); 100 | 101 | child.on('close', code => { 102 | process.exit(code); 103 | }); 104 | }); 105 | } 106 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Use postgres/example user/password credentials 2 | version: '3.1' 3 | 4 | services: 5 | db: 6 | image: postgres 7 | restart: always 8 | environment: 9 | POSTGRES_USER: postgres 10 | POSTGRES_PASSWORD: example 11 | POSTGRES_DB: postgres 12 | ports: 13 | - 5432:5432 14 | adminer: 15 | image: adminer 16 | restart: always 17 | ports: 18 | - 8080:8080 19 | -------------------------------------------------------------------------------- /lib/download.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs'); 3 | const os = require('os'); 4 | const {parse: parseUrl} = require('url'); 5 | const parseXmlString = require('xml2js').parseString; 6 | const extractZip = require('extract-zip'); 7 | const spawn = require('child_process').spawn; 8 | const rimraf = require('rimraf'); 9 | 10 | const ONE_DAY_MS = 8.64e+7; 11 | const NEVER_EXPIRE_DOWNLOADS = -1; 12 | 13 | function createProxyAgent(protocol, env) { 14 | if (protocol === 'http:') { 15 | const proxy = env.npm_config_proxy || 16 | env.npm_config_http_proxy || 17 | env.HTTP_PROXY || 18 | env.http_proxy || 19 | env.npm_config_proxy; 20 | 21 | if (proxy) { 22 | const HttpProxyAgent = require('http-proxy-agent'); 23 | 24 | return new HttpProxyAgent(proxy); 25 | } 26 | } else if (protocol === 'https:') { 27 | const proxy = env.npm_config_https_proxy || 28 | env.HTTPS_PROXY || 29 | env.https_proxy || 30 | env.npm_config_proxy; 31 | 32 | if (proxy) { 33 | const HttpsProxyAgent = require('https-proxy-agent'); 34 | 35 | return new HttpsProxyAgent(proxy); 36 | } 37 | } 38 | } 39 | 40 | function createRequest(options, agent, callback) { 41 | var client; 42 | 43 | if (options.protocol === 'http:') { 44 | client = require('http'); 45 | 46 | if (!options.port) { 47 | options.port = 80; 48 | } 49 | } else if (options.protocol === 'https:') { 50 | client = require('https'); 51 | 52 | if (!options.port) { 53 | options.port = 443; 54 | } 55 | } else { 56 | return false; 57 | } 58 | 59 | options.method = 'GET'; 60 | options.agent = agent; 61 | 62 | const req = client.request(options, callback); 63 | req.end(); 64 | 65 | return true; 66 | } 67 | 68 | function saveCachedUrlToPath(destinationPath, url, downloadExpirationTimeMs) { 69 | const expirationTime = downloadExpirationTimeMs || ONE_DAY_MS; 70 | const stats = fs.existsSync(destinationPath) ? fs.statSync(destinationPath) : null; 71 | const useCachedVersion = stats && (expirationTime === NEVER_EXPIRE_DOWNLOADS || (Date.now() - stats.mtimeMs < expirationTime)); 72 | 73 | if(useCachedVersion) { 74 | return Promise.resolve(destinationPath); 75 | } 76 | 77 | console.log('DOWNLOADING', url); 78 | 79 | return new Promise(function(resolve, reject) { 80 | const options = parseUrl(url); 81 | 82 | // Only returns an agent if the proxy env is provided. 83 | const agent = createProxyAgent(options.protocol, process.env); 84 | 85 | const requestSent = createRequest(options, agent, function(fileRes) { 86 | if (fileRes.statusCode !== 200) { 87 | const err = new Error('Request failed for ' + url + ' - ' + fileRes.statusCode); 88 | 89 | err.statusCode = fileRes.statusCode; 90 | err.type = 'HTTP_ERROR'; 91 | 92 | reject(err); 93 | } else { 94 | const fileWriter = fs.createWriteStream(destinationPath); 95 | 96 | fileRes.on('error', reject); 97 | fileRes.on('end', function() { 98 | fileWriter.end(function() { 99 | resolve(destinationPath); 100 | }); 101 | }); 102 | 103 | fileRes.pipe(fileWriter); 104 | } 105 | }); 106 | 107 | if (!requestSent) { 108 | reject(new Error('Unsupported download protocol')); 109 | } 110 | }); 111 | } 112 | 113 | function nodePlatformToMavenSuffix() { 114 | return ({ 115 | 'win32': 'windows-x64.zip', 116 | 'linux': 'linux-x64.tar.gz', 117 | 'darwin': 'macosx-x64.tar.gz' 118 | })[os.platform()]; 119 | } 120 | 121 | function resolveMavenVersion(libDir, groupId, artifactId, version, downloadExpirationTimeMs) { 122 | if(version && version !== 'latest') { 123 | return Promise.resolve(version); 124 | } else { 125 | const latestCacheFile = path.join(libDir, `${groupId}_${artifactId}.latest`); 126 | const xmlReqeust = saveCachedUrlToPath(latestCacheFile, `https://repo1.maven.org/maven2/${groupId.replace(/\./g, '/')}/${artifactId}/maven-metadata.xml`, downloadExpirationTimeMs); 127 | 128 | return xmlReqeust 129 | .then(function(manifestFilePath) { 130 | return new Promise(function(resolve, reject) { 131 | const manifestContent = fs.readFileSync(manifestFilePath, { encoding: 'utf8' }); 132 | 133 | parseXmlString(manifestContent, function(err, result) { 134 | if(err) { 135 | reject(err); 136 | } else { 137 | const nonTestVersions = result.metadata.versioning[0].versions[0].version.filter(function(version) { return version.match(/^[1-9]\.[0-9.]+$/); }); 138 | 139 | if(!nonTestVersions.length) { 140 | reject(new Error(`Stable version of ${groupId}_${artifactId} not found`)); 141 | } else { 142 | resolve(nonTestVersions[nonTestVersions.length - 1]); 143 | } 144 | } 145 | }); 146 | }); 147 | }); 148 | } 149 | } 150 | 151 | function downloadMaven(libDir, groupId, artifactId, version, downloadExpirationTimeMs) { 152 | return resolveMavenVersion(libDir, groupId, artifactId, version, downloadExpirationTimeMs) 153 | .then(function(version) { 154 | if(version.match(/^https/)) { 155 | const flywaySavePath = path.join(libDir, path.basename(version)); 156 | 157 | return saveCachedUrlToPath(flywaySavePath, version, downloadExpirationTimeMs) 158 | .then(function (fileSavePath) { 159 | return { 160 | version, 161 | type: 'asset', 162 | file: fileSavePath, 163 | }; 164 | }); 165 | } else if(artifactId === 'flyway-commandline') { 166 | const platformSuffix = nodePlatformToMavenSuffix(); 167 | const flywayUrl = `https://repo1.maven.org/maven2/${groupId.replace(/\./g, '/')}/${artifactId}/${version}/${artifactId}-${version}-${platformSuffix}`; 168 | const flywaySavePath = path.join(libDir, `${artifactId}-${version}-${platformSuffix}`); 169 | 170 | return saveCachedUrlToPath(flywaySavePath, flywayUrl, downloadExpirationTimeMs) 171 | .then(function (fileSavePath) { 172 | return { 173 | version, 174 | type: 'command', 175 | file: fileSavePath, 176 | }; 177 | }); 178 | } else { 179 | // Assume non-flyway dependencies are simple jar files 180 | const depUrl = `https://repo1.maven.org/maven2/${groupId.replace(/\./g, '/')}/${artifactId}/${version}/${artifactId}-${version}.jar`; 181 | const depSavePath = path.join(libDir, `${artifactId}-${version}.jar`); 182 | 183 | return saveCachedUrlToPath(depSavePath, depUrl, downloadExpirationTimeMs) 184 | .then(function (fileSavePath) { 185 | return { 186 | version, 187 | type: 'asset', 188 | file: fileSavePath, 189 | }; 190 | }); 191 | } 192 | }) 193 | .then(function({ version, type, file }) { 194 | const extractDir = path.join(libDir, `${artifactId}-${version}`); 195 | const fileExt = path.extname(file); 196 | 197 | if(fileExt === '.zip' || fileExt === '.gz' || fileExt === '.xz') { 198 | if(fs.existsSync(extractDir)) { 199 | return { version, type, dir: extractDir }; 200 | } else { 201 | fs.mkdirSync(extractDir); 202 | 203 | if(fileExt === '.zip') { 204 | return new Promise(function(res, rej) { 205 | extractZip(file, { dir: extractDir }, function(err) { 206 | if(err) { 207 | rimraf.sync(extractDir); 208 | 209 | rej(err); 210 | } else { 211 | res({ version, type, dir: extractDir }); 212 | } 213 | }); 214 | }); 215 | } else { 216 | return new Promise(function(res, rej) { 217 | spawn('tar', ['zxf', file], { 218 | cwd: extractDir, 219 | stdio: 'inherit' 220 | }).on('close', function(code) { 221 | if(code === 0) { 222 | res({ version, type, dir: extractDir }); 223 | } else { 224 | rimraf.sync(extractDir); 225 | 226 | rej(new Error('Untaring file failed ' + code)); 227 | } 228 | }); 229 | }); 230 | } 231 | } 232 | } else { 233 | return { version, type, file }; 234 | } 235 | }); 236 | } 237 | 238 | function ensureWritableLibDir(libDir) { 239 | if(!libDir) { 240 | libDir = path.resolve(__dirname, '../jlib'); 241 | } else if(!path.isAbsolute(libDir)) { 242 | libDir = path.resolve(libDir); 243 | } 244 | 245 | if(!fs.existsSync(libDir)) { 246 | fs.mkdirSync(libDir); 247 | } else { 248 | fs.accessSync(libDir, fs.constants.W_OK); 249 | } 250 | 251 | return libDir; 252 | } 253 | 254 | module.exports = { 255 | ensureArtifacts: function(config, callback) { 256 | const libDir = ensureWritableLibDir(config.downloads && config.downloads.storageDirectory); 257 | const downloadExpirationTimeMs = config.downloads && config.downloads.expirationTimeInMs; 258 | var pendingDownloads = [downloadMaven(libDir, 'org.flywaydb', 'flyway-commandline', config.downloadUrl || config.version, downloadExpirationTimeMs)]; 259 | 260 | // Checking config.mavinPlugins to ensure backwards compatibility with older versions of node-flyway that defined it as 'config.mavinPlugins' and not 'config.MavenPlugins' 261 | if(config.mavenPlugins || config.mavinPlugins) { 262 | const plugins = config.mavinPlugins === undefined ? config.mavenPlugins : config.mavinPlugins; 263 | pendingDownloads = pendingDownloads.concat(plugins.map(function(plugin) { 264 | return downloadMaven(libDir, plugin.groupId, plugin.artifactId, plugin.downloadUrl || plugin.version, downloadExpirationTimeMs); 265 | })); 266 | } 267 | 268 | Promise.all(pendingDownloads) 269 | .then(function(assets) { 270 | const binFile = os.platform() === 'win32' 271 | ? 'flyway.cmd' 272 | : 'flyway'; 273 | 274 | callback(null, path.join(assets[0].dir, `flyway-${assets[0].version}`, binFile)); 275 | }) 276 | .catch(callback); 277 | } 278 | }; 279 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-flywaydb", 3 | "version": "3.0.5", 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/helper-validator-identifier": { 17 | "version": "7.9.0", 18 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", 19 | "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", 20 | "dev": true 21 | }, 22 | "@babel/highlight": { 23 | "version": "7.9.0", 24 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", 25 | "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", 26 | "dev": true, 27 | "requires": { 28 | "@babel/helper-validator-identifier": "^7.9.0", 29 | "chalk": "^2.0.0", 30 | "js-tokens": "^4.0.0" 31 | } 32 | }, 33 | "@tootallnate/once": { 34 | "version": "1.0.0", 35 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.0.0.tgz", 36 | "integrity": "sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA==" 37 | }, 38 | "@types/color-name": { 39 | "version": "1.1.1", 40 | "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", 41 | "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", 42 | "dev": true 43 | }, 44 | "@types/node": { 45 | "version": "13.9.8", 46 | "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", 47 | "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", 48 | "optional": true 49 | }, 50 | "@types/yauzl": { 51 | "version": "2.9.1", 52 | "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", 53 | "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", 54 | "optional": true, 55 | "requires": { 56 | "@types/node": "*" 57 | } 58 | }, 59 | "acorn": { 60 | "version": "7.1.1", 61 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", 62 | "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", 63 | "dev": true 64 | }, 65 | "acorn-jsx": { 66 | "version": "5.2.0", 67 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", 68 | "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", 69 | "dev": true 70 | }, 71 | "agent-base": { 72 | "version": "6.0.0", 73 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz", 74 | "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==", 75 | "requires": { 76 | "debug": "4" 77 | } 78 | }, 79 | "ajv": { 80 | "version": "6.12.0", 81 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", 82 | "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", 83 | "dev": true, 84 | "requires": { 85 | "fast-deep-equal": "^3.1.1", 86 | "fast-json-stable-stringify": "^2.0.0", 87 | "json-schema-traverse": "^0.4.1", 88 | "uri-js": "^4.2.2" 89 | } 90 | }, 91 | "ansi-escapes": { 92 | "version": "4.3.1", 93 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", 94 | "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", 95 | "dev": true, 96 | "requires": { 97 | "type-fest": "^0.11.0" 98 | }, 99 | "dependencies": { 100 | "type-fest": { 101 | "version": "0.11.0", 102 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", 103 | "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", 104 | "dev": true 105 | } 106 | } 107 | }, 108 | "ansi-regex": { 109 | "version": "5.0.0", 110 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 111 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 112 | "dev": true 113 | }, 114 | "ansi-styles": { 115 | "version": "3.2.1", 116 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 117 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 118 | "dev": true, 119 | "requires": { 120 | "color-convert": "^1.9.0" 121 | } 122 | }, 123 | "argparse": { 124 | "version": "1.0.10", 125 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 126 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 127 | "dev": true, 128 | "requires": { 129 | "sprintf-js": "~1.0.2" 130 | } 131 | }, 132 | "astral-regex": { 133 | "version": "1.0.0", 134 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 135 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 136 | "dev": true 137 | }, 138 | "balanced-match": { 139 | "version": "1.0.0", 140 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 141 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 142 | }, 143 | "brace-expansion": { 144 | "version": "1.1.11", 145 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 146 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 147 | "requires": { 148 | "balanced-match": "^1.0.0", 149 | "concat-map": "0.0.1" 150 | } 151 | }, 152 | "buffer-crc32": { 153 | "version": "0.2.13", 154 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 155 | "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" 156 | }, 157 | "callsites": { 158 | "version": "3.1.0", 159 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 160 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 161 | "dev": true 162 | }, 163 | "chalk": { 164 | "version": "2.4.2", 165 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 166 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 167 | "dev": true, 168 | "requires": { 169 | "ansi-styles": "^3.2.1", 170 | "escape-string-regexp": "^1.0.5", 171 | "supports-color": "^5.3.0" 172 | } 173 | }, 174 | "chardet": { 175 | "version": "0.7.0", 176 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 177 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 178 | "dev": true 179 | }, 180 | "cli-cursor": { 181 | "version": "3.1.0", 182 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 183 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", 184 | "dev": true, 185 | "requires": { 186 | "restore-cursor": "^3.1.0" 187 | } 188 | }, 189 | "cli-width": { 190 | "version": "2.2.0", 191 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", 192 | "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", 193 | "dev": true 194 | }, 195 | "color-convert": { 196 | "version": "1.9.3", 197 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 198 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 199 | "dev": true, 200 | "requires": { 201 | "color-name": "1.1.3" 202 | } 203 | }, 204 | "color-name": { 205 | "version": "1.1.3", 206 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 207 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 208 | "dev": true 209 | }, 210 | "commander": { 211 | "version": "5.0.0", 212 | "resolved": "https://registry.npmjs.org/commander/-/commander-5.0.0.tgz", 213 | "integrity": "sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ==" 214 | }, 215 | "concat-map": { 216 | "version": "0.0.1", 217 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 218 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 219 | }, 220 | "cross-spawn": { 221 | "version": "6.0.5", 222 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 223 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 224 | "dev": true, 225 | "requires": { 226 | "nice-try": "^1.0.4", 227 | "path-key": "^2.0.1", 228 | "semver": "^5.5.0", 229 | "shebang-command": "^1.2.0", 230 | "which": "^1.2.9" 231 | }, 232 | "dependencies": { 233 | "semver": { 234 | "version": "5.7.1", 235 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 236 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 237 | "dev": true 238 | } 239 | } 240 | }, 241 | "debug": { 242 | "version": "4.1.1", 243 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 244 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 245 | "requires": { 246 | "ms": "^2.1.1" 247 | } 248 | }, 249 | "deep-is": { 250 | "version": "0.1.3", 251 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 252 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 253 | "dev": true 254 | }, 255 | "doctrine": { 256 | "version": "3.0.0", 257 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 258 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 259 | "dev": true, 260 | "requires": { 261 | "esutils": "^2.0.2" 262 | } 263 | }, 264 | "emoji-regex": { 265 | "version": "8.0.0", 266 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 267 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 268 | "dev": true 269 | }, 270 | "end-of-stream": { 271 | "version": "1.4.4", 272 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 273 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 274 | "requires": { 275 | "once": "^1.4.0" 276 | } 277 | }, 278 | "escape-string-regexp": { 279 | "version": "1.0.5", 280 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 281 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 282 | "dev": true 283 | }, 284 | "eslint": { 285 | "version": "6.8.0", 286 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", 287 | "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", 288 | "dev": true, 289 | "requires": { 290 | "@babel/code-frame": "^7.0.0", 291 | "ajv": "^6.10.0", 292 | "chalk": "^2.1.0", 293 | "cross-spawn": "^6.0.5", 294 | "debug": "^4.0.1", 295 | "doctrine": "^3.0.0", 296 | "eslint-scope": "^5.0.0", 297 | "eslint-utils": "^1.4.3", 298 | "eslint-visitor-keys": "^1.1.0", 299 | "espree": "^6.1.2", 300 | "esquery": "^1.0.1", 301 | "esutils": "^2.0.2", 302 | "file-entry-cache": "^5.0.1", 303 | "functional-red-black-tree": "^1.0.1", 304 | "glob-parent": "^5.0.0", 305 | "globals": "^12.1.0", 306 | "ignore": "^4.0.6", 307 | "import-fresh": "^3.0.0", 308 | "imurmurhash": "^0.1.4", 309 | "inquirer": "^7.0.0", 310 | "is-glob": "^4.0.0", 311 | "js-yaml": "^3.13.1", 312 | "json-stable-stringify-without-jsonify": "^1.0.1", 313 | "levn": "^0.3.0", 314 | "lodash": "^4.17.14", 315 | "minimatch": "^3.0.4", 316 | "mkdirp": "^0.5.1", 317 | "natural-compare": "^1.4.0", 318 | "optionator": "^0.8.3", 319 | "progress": "^2.0.0", 320 | "regexpp": "^2.0.1", 321 | "semver": "^6.1.2", 322 | "strip-ansi": "^5.2.0", 323 | "strip-json-comments": "^3.0.1", 324 | "table": "^5.2.3", 325 | "text-table": "^0.2.0", 326 | "v8-compile-cache": "^2.0.3" 327 | } 328 | }, 329 | "eslint-scope": { 330 | "version": "5.0.0", 331 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", 332 | "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", 333 | "dev": true, 334 | "requires": { 335 | "esrecurse": "^4.1.0", 336 | "estraverse": "^4.1.1" 337 | } 338 | }, 339 | "eslint-utils": { 340 | "version": "1.4.3", 341 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", 342 | "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", 343 | "dev": true, 344 | "requires": { 345 | "eslint-visitor-keys": "^1.1.0" 346 | } 347 | }, 348 | "eslint-visitor-keys": { 349 | "version": "1.1.0", 350 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", 351 | "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", 352 | "dev": true 353 | }, 354 | "espree": { 355 | "version": "6.2.1", 356 | "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", 357 | "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", 358 | "dev": true, 359 | "requires": { 360 | "acorn": "^7.1.1", 361 | "acorn-jsx": "^5.2.0", 362 | "eslint-visitor-keys": "^1.1.0" 363 | } 364 | }, 365 | "esprima": { 366 | "version": "4.0.1", 367 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 368 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 369 | "dev": true 370 | }, 371 | "esquery": { 372 | "version": "1.2.0", 373 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz", 374 | "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==", 375 | "dev": true, 376 | "requires": { 377 | "estraverse": "^5.0.0" 378 | }, 379 | "dependencies": { 380 | "estraverse": { 381 | "version": "5.0.0", 382 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz", 383 | "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==", 384 | "dev": true 385 | } 386 | } 387 | }, 388 | "esrecurse": { 389 | "version": "4.2.1", 390 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", 391 | "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", 392 | "dev": true, 393 | "requires": { 394 | "estraverse": "^4.1.0" 395 | } 396 | }, 397 | "estraverse": { 398 | "version": "4.3.0", 399 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 400 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 401 | "dev": true 402 | }, 403 | "esutils": { 404 | "version": "2.0.3", 405 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 406 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 407 | "dev": true 408 | }, 409 | "external-editor": { 410 | "version": "3.1.0", 411 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 412 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 413 | "dev": true, 414 | "requires": { 415 | "chardet": "^0.7.0", 416 | "iconv-lite": "^0.4.24", 417 | "tmp": "^0.0.33" 418 | } 419 | }, 420 | "extract-zip": { 421 | "version": "2.0.0", 422 | "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.0.tgz", 423 | "integrity": "sha512-i42GQ498yibjdvIhivUsRslx608whtGoFIhF26Z7O4MYncBxp8CwalOs1lnHy21A9sIohWO2+uiE4SRtC9JXDg==", 424 | "requires": { 425 | "@types/yauzl": "^2.9.1", 426 | "debug": "^4.1.1", 427 | "get-stream": "^5.1.0", 428 | "yauzl": "^2.10.0" 429 | } 430 | }, 431 | "fast-deep-equal": { 432 | "version": "3.1.1", 433 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", 434 | "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", 435 | "dev": true 436 | }, 437 | "fast-json-stable-stringify": { 438 | "version": "2.1.0", 439 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 440 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 441 | "dev": true 442 | }, 443 | "fast-levenshtein": { 444 | "version": "2.0.6", 445 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 446 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 447 | "dev": true 448 | }, 449 | "fd-slicer": { 450 | "version": "1.1.0", 451 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 452 | "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", 453 | "requires": { 454 | "pend": "~1.2.0" 455 | } 456 | }, 457 | "figures": { 458 | "version": "3.2.0", 459 | "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", 460 | "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", 461 | "dev": true, 462 | "requires": { 463 | "escape-string-regexp": "^1.0.5" 464 | } 465 | }, 466 | "file-entry-cache": { 467 | "version": "5.0.1", 468 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", 469 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", 470 | "dev": true, 471 | "requires": { 472 | "flat-cache": "^2.0.1" 473 | } 474 | }, 475 | "flat-cache": { 476 | "version": "2.0.1", 477 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 478 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", 479 | "dev": true, 480 | "requires": { 481 | "flatted": "^2.0.0", 482 | "rimraf": "2.6.3", 483 | "write": "1.0.3" 484 | }, 485 | "dependencies": { 486 | "rimraf": { 487 | "version": "2.6.3", 488 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 489 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 490 | "dev": true, 491 | "requires": { 492 | "glob": "^7.1.3" 493 | } 494 | } 495 | } 496 | }, 497 | "flatted": { 498 | "version": "2.0.2", 499 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", 500 | "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", 501 | "dev": true 502 | }, 503 | "fs.realpath": { 504 | "version": "1.0.0", 505 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 506 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 507 | }, 508 | "functional-red-black-tree": { 509 | "version": "1.0.1", 510 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 511 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 512 | "dev": true 513 | }, 514 | "get-stream": { 515 | "version": "5.1.0", 516 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", 517 | "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", 518 | "requires": { 519 | "pump": "^3.0.0" 520 | } 521 | }, 522 | "glob": { 523 | "version": "7.1.6", 524 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 525 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 526 | "requires": { 527 | "fs.realpath": "^1.0.0", 528 | "inflight": "^1.0.4", 529 | "inherits": "2", 530 | "minimatch": "^3.0.4", 531 | "once": "^1.3.0", 532 | "path-is-absolute": "^1.0.0" 533 | } 534 | }, 535 | "glob-parent": { 536 | "version": "5.1.2", 537 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 538 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 539 | "dev": true, 540 | "requires": { 541 | "is-glob": "^4.0.1" 542 | } 543 | }, 544 | "globals": { 545 | "version": "12.4.0", 546 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 547 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 548 | "dev": true, 549 | "requires": { 550 | "type-fest": "^0.8.1" 551 | } 552 | }, 553 | "has-flag": { 554 | "version": "3.0.0", 555 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 556 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 557 | "dev": true 558 | }, 559 | "http-proxy-agent": { 560 | "version": "4.0.1", 561 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", 562 | "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", 563 | "requires": { 564 | "@tootallnate/once": "1", 565 | "agent-base": "6", 566 | "debug": "4" 567 | } 568 | }, 569 | "https-proxy-agent": { 570 | "version": "5.0.0", 571 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", 572 | "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", 573 | "requires": { 574 | "agent-base": "6", 575 | "debug": "4" 576 | } 577 | }, 578 | "iconv-lite": { 579 | "version": "0.4.24", 580 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 581 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 582 | "dev": true, 583 | "requires": { 584 | "safer-buffer": ">= 2.1.2 < 3" 585 | } 586 | }, 587 | "ignore": { 588 | "version": "4.0.6", 589 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 590 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 591 | "dev": true 592 | }, 593 | "import-fresh": { 594 | "version": "3.2.1", 595 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", 596 | "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", 597 | "dev": true, 598 | "requires": { 599 | "parent-module": "^1.0.0", 600 | "resolve-from": "^4.0.0" 601 | } 602 | }, 603 | "imurmurhash": { 604 | "version": "0.1.4", 605 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 606 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 607 | "dev": true 608 | }, 609 | "inflight": { 610 | "version": "1.0.6", 611 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 612 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 613 | "requires": { 614 | "once": "^1.3.0", 615 | "wrappy": "1" 616 | } 617 | }, 618 | "inherits": { 619 | "version": "2.0.4", 620 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 621 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 622 | }, 623 | "inquirer": { 624 | "version": "7.1.0", 625 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", 626 | "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", 627 | "dev": true, 628 | "requires": { 629 | "ansi-escapes": "^4.2.1", 630 | "chalk": "^3.0.0", 631 | "cli-cursor": "^3.1.0", 632 | "cli-width": "^2.0.0", 633 | "external-editor": "^3.0.3", 634 | "figures": "^3.0.0", 635 | "lodash": "^4.17.15", 636 | "mute-stream": "0.0.8", 637 | "run-async": "^2.4.0", 638 | "rxjs": "^6.5.3", 639 | "string-width": "^4.1.0", 640 | "strip-ansi": "^6.0.0", 641 | "through": "^2.3.6" 642 | }, 643 | "dependencies": { 644 | "ansi-styles": { 645 | "version": "4.2.1", 646 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", 647 | "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", 648 | "dev": true, 649 | "requires": { 650 | "@types/color-name": "^1.1.1", 651 | "color-convert": "^2.0.1" 652 | } 653 | }, 654 | "chalk": { 655 | "version": "3.0.0", 656 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 657 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 658 | "dev": true, 659 | "requires": { 660 | "ansi-styles": "^4.1.0", 661 | "supports-color": "^7.1.0" 662 | } 663 | }, 664 | "color-convert": { 665 | "version": "2.0.1", 666 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 667 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 668 | "dev": true, 669 | "requires": { 670 | "color-name": "~1.1.4" 671 | } 672 | }, 673 | "color-name": { 674 | "version": "1.1.4", 675 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 676 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 677 | "dev": true 678 | }, 679 | "has-flag": { 680 | "version": "4.0.0", 681 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 682 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 683 | "dev": true 684 | }, 685 | "strip-ansi": { 686 | "version": "6.0.0", 687 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 688 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 689 | "dev": true, 690 | "requires": { 691 | "ansi-regex": "^5.0.0" 692 | } 693 | }, 694 | "supports-color": { 695 | "version": "7.1.0", 696 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", 697 | "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", 698 | "dev": true, 699 | "requires": { 700 | "has-flag": "^4.0.0" 701 | } 702 | } 703 | } 704 | }, 705 | "is-extglob": { 706 | "version": "2.1.1", 707 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 708 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 709 | "dev": true 710 | }, 711 | "is-fullwidth-code-point": { 712 | "version": "3.0.0", 713 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 714 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 715 | "dev": true 716 | }, 717 | "is-glob": { 718 | "version": "4.0.1", 719 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 720 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 721 | "dev": true, 722 | "requires": { 723 | "is-extglob": "^2.1.1" 724 | } 725 | }, 726 | "is-promise": { 727 | "version": "2.1.0", 728 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", 729 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", 730 | "dev": true 731 | }, 732 | "isexe": { 733 | "version": "2.0.0", 734 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 735 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 736 | "dev": true 737 | }, 738 | "js-tokens": { 739 | "version": "4.0.0", 740 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 741 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 742 | "dev": true 743 | }, 744 | "js-yaml": { 745 | "version": "3.13.1", 746 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 747 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 748 | "dev": true, 749 | "requires": { 750 | "argparse": "^1.0.7", 751 | "esprima": "^4.0.0" 752 | } 753 | }, 754 | "json-schema-traverse": { 755 | "version": "0.4.1", 756 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 757 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 758 | "dev": true 759 | }, 760 | "json-stable-stringify-without-jsonify": { 761 | "version": "1.0.1", 762 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 763 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 764 | "dev": true 765 | }, 766 | "levn": { 767 | "version": "0.3.0", 768 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 769 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 770 | "dev": true, 771 | "requires": { 772 | "prelude-ls": "~1.1.2", 773 | "type-check": "~0.3.2" 774 | } 775 | }, 776 | "lodash": { 777 | "version": "4.17.21", 778 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 779 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 780 | "dev": true 781 | }, 782 | "mimic-fn": { 783 | "version": "2.1.0", 784 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 785 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 786 | "dev": true 787 | }, 788 | "minimatch": { 789 | "version": "3.0.4", 790 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 791 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 792 | "requires": { 793 | "brace-expansion": "^1.1.7" 794 | } 795 | }, 796 | "minimist": { 797 | "version": "1.2.5", 798 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 799 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 800 | "dev": true 801 | }, 802 | "mkdirp": { 803 | "version": "0.5.4", 804 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", 805 | "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", 806 | "dev": true, 807 | "requires": { 808 | "minimist": "^1.2.5" 809 | } 810 | }, 811 | "ms": { 812 | "version": "2.1.2", 813 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 814 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 815 | }, 816 | "mute-stream": { 817 | "version": "0.0.8", 818 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 819 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 820 | "dev": true 821 | }, 822 | "natural-compare": { 823 | "version": "1.4.0", 824 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 825 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 826 | "dev": true 827 | }, 828 | "nice-try": { 829 | "version": "1.0.5", 830 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 831 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 832 | "dev": true 833 | }, 834 | "once": { 835 | "version": "1.4.0", 836 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 837 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 838 | "requires": { 839 | "wrappy": "1" 840 | } 841 | }, 842 | "onetime": { 843 | "version": "5.1.0", 844 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", 845 | "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", 846 | "dev": true, 847 | "requires": { 848 | "mimic-fn": "^2.1.0" 849 | } 850 | }, 851 | "optionator": { 852 | "version": "0.8.3", 853 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 854 | "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 855 | "dev": true, 856 | "requires": { 857 | "deep-is": "~0.1.3", 858 | "fast-levenshtein": "~2.0.6", 859 | "levn": "~0.3.0", 860 | "prelude-ls": "~1.1.2", 861 | "type-check": "~0.3.2", 862 | "word-wrap": "~1.2.3" 863 | } 864 | }, 865 | "os-tmpdir": { 866 | "version": "1.0.2", 867 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 868 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 869 | "dev": true 870 | }, 871 | "parent-module": { 872 | "version": "1.0.1", 873 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 874 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 875 | "dev": true, 876 | "requires": { 877 | "callsites": "^3.0.0" 878 | } 879 | }, 880 | "path-is-absolute": { 881 | "version": "1.0.1", 882 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 883 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 884 | }, 885 | "path-key": { 886 | "version": "2.0.1", 887 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 888 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 889 | "dev": true 890 | }, 891 | "pend": { 892 | "version": "1.2.0", 893 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 894 | "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" 895 | }, 896 | "prelude-ls": { 897 | "version": "1.1.2", 898 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 899 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 900 | "dev": true 901 | }, 902 | "progress": { 903 | "version": "2.0.3", 904 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 905 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 906 | "dev": true 907 | }, 908 | "pump": { 909 | "version": "3.0.0", 910 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 911 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 912 | "requires": { 913 | "end-of-stream": "^1.1.0", 914 | "once": "^1.3.1" 915 | } 916 | }, 917 | "punycode": { 918 | "version": "2.1.1", 919 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 920 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 921 | "dev": true 922 | }, 923 | "regexpp": { 924 | "version": "2.0.1", 925 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 926 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 927 | "dev": true 928 | }, 929 | "resolve-from": { 930 | "version": "4.0.0", 931 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 932 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 933 | "dev": true 934 | }, 935 | "restore-cursor": { 936 | "version": "3.1.0", 937 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", 938 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", 939 | "dev": true, 940 | "requires": { 941 | "onetime": "^5.1.0", 942 | "signal-exit": "^3.0.2" 943 | } 944 | }, 945 | "rimraf": { 946 | "version": "3.0.2", 947 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 948 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 949 | "requires": { 950 | "glob": "^7.1.3" 951 | } 952 | }, 953 | "run-async": { 954 | "version": "2.4.0", 955 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", 956 | "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", 957 | "dev": true, 958 | "requires": { 959 | "is-promise": "^2.1.0" 960 | } 961 | }, 962 | "rxjs": { 963 | "version": "6.5.4", 964 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", 965 | "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", 966 | "dev": true, 967 | "requires": { 968 | "tslib": "^1.9.0" 969 | } 970 | }, 971 | "safer-buffer": { 972 | "version": "2.1.2", 973 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 974 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 975 | "dev": true 976 | }, 977 | "sax": { 978 | "version": "1.2.4", 979 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 980 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 981 | }, 982 | "semver": { 983 | "version": "6.3.0", 984 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 985 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 986 | "dev": true 987 | }, 988 | "shebang-command": { 989 | "version": "1.2.0", 990 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 991 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 992 | "dev": true, 993 | "requires": { 994 | "shebang-regex": "^1.0.0" 995 | } 996 | }, 997 | "shebang-regex": { 998 | "version": "1.0.0", 999 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 1000 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 1001 | "dev": true 1002 | }, 1003 | "signal-exit": { 1004 | "version": "3.0.3", 1005 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 1006 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 1007 | "dev": true 1008 | }, 1009 | "slice-ansi": { 1010 | "version": "2.1.0", 1011 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", 1012 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", 1013 | "dev": true, 1014 | "requires": { 1015 | "ansi-styles": "^3.2.0", 1016 | "astral-regex": "^1.0.0", 1017 | "is-fullwidth-code-point": "^2.0.0" 1018 | }, 1019 | "dependencies": { 1020 | "is-fullwidth-code-point": { 1021 | "version": "2.0.0", 1022 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1023 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1024 | "dev": true 1025 | } 1026 | } 1027 | }, 1028 | "sprintf-js": { 1029 | "version": "1.0.3", 1030 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1031 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1032 | "dev": true 1033 | }, 1034 | "string-width": { 1035 | "version": "4.2.0", 1036 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 1037 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 1038 | "dev": true, 1039 | "requires": { 1040 | "emoji-regex": "^8.0.0", 1041 | "is-fullwidth-code-point": "^3.0.0", 1042 | "strip-ansi": "^6.0.0" 1043 | }, 1044 | "dependencies": { 1045 | "strip-ansi": { 1046 | "version": "6.0.0", 1047 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1048 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1049 | "dev": true, 1050 | "requires": { 1051 | "ansi-regex": "^5.0.0" 1052 | } 1053 | } 1054 | } 1055 | }, 1056 | "strip-ansi": { 1057 | "version": "5.2.0", 1058 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 1059 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 1060 | "dev": true, 1061 | "requires": { 1062 | "ansi-regex": "^4.1.0" 1063 | }, 1064 | "dependencies": { 1065 | "ansi-regex": { 1066 | "version": "4.1.0", 1067 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 1068 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 1069 | "dev": true 1070 | } 1071 | } 1072 | }, 1073 | "strip-json-comments": { 1074 | "version": "3.0.1", 1075 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", 1076 | "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", 1077 | "dev": true 1078 | }, 1079 | "supports-color": { 1080 | "version": "5.5.0", 1081 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1082 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1083 | "dev": true, 1084 | "requires": { 1085 | "has-flag": "^3.0.0" 1086 | } 1087 | }, 1088 | "table": { 1089 | "version": "5.4.6", 1090 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", 1091 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", 1092 | "dev": true, 1093 | "requires": { 1094 | "ajv": "^6.10.2", 1095 | "lodash": "^4.17.14", 1096 | "slice-ansi": "^2.1.0", 1097 | "string-width": "^3.0.0" 1098 | }, 1099 | "dependencies": { 1100 | "emoji-regex": { 1101 | "version": "7.0.3", 1102 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 1103 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 1104 | "dev": true 1105 | }, 1106 | "is-fullwidth-code-point": { 1107 | "version": "2.0.0", 1108 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1109 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1110 | "dev": true 1111 | }, 1112 | "string-width": { 1113 | "version": "3.1.0", 1114 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 1115 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 1116 | "dev": true, 1117 | "requires": { 1118 | "emoji-regex": "^7.0.1", 1119 | "is-fullwidth-code-point": "^2.0.0", 1120 | "strip-ansi": "^5.1.0" 1121 | } 1122 | } 1123 | } 1124 | }, 1125 | "text-table": { 1126 | "version": "0.2.0", 1127 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1128 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1129 | "dev": true 1130 | }, 1131 | "through": { 1132 | "version": "2.3.8", 1133 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1134 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 1135 | "dev": true 1136 | }, 1137 | "tmp": { 1138 | "version": "0.0.33", 1139 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 1140 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 1141 | "dev": true, 1142 | "requires": { 1143 | "os-tmpdir": "~1.0.2" 1144 | } 1145 | }, 1146 | "tslib": { 1147 | "version": "1.11.1", 1148 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", 1149 | "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", 1150 | "dev": true 1151 | }, 1152 | "type-check": { 1153 | "version": "0.3.2", 1154 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 1155 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 1156 | "dev": true, 1157 | "requires": { 1158 | "prelude-ls": "~1.1.2" 1159 | } 1160 | }, 1161 | "type-fest": { 1162 | "version": "0.8.1", 1163 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 1164 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 1165 | "dev": true 1166 | }, 1167 | "uri-js": { 1168 | "version": "4.2.2", 1169 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1170 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1171 | "dev": true, 1172 | "requires": { 1173 | "punycode": "^2.1.0" 1174 | } 1175 | }, 1176 | "v8-compile-cache": { 1177 | "version": "2.1.0", 1178 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", 1179 | "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", 1180 | "dev": true 1181 | }, 1182 | "which": { 1183 | "version": "1.3.1", 1184 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1185 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1186 | "dev": true, 1187 | "requires": { 1188 | "isexe": "^2.0.0" 1189 | } 1190 | }, 1191 | "word-wrap": { 1192 | "version": "1.2.3", 1193 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 1194 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 1195 | "dev": true 1196 | }, 1197 | "wrappy": { 1198 | "version": "1.0.2", 1199 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1200 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1201 | }, 1202 | "write": { 1203 | "version": "1.0.3", 1204 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", 1205 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", 1206 | "dev": true, 1207 | "requires": { 1208 | "mkdirp": "^0.5.1" 1209 | } 1210 | }, 1211 | "xml2js": { 1212 | "version": "0.4.23", 1213 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 1214 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 1215 | "requires": { 1216 | "sax": ">=0.6.0", 1217 | "xmlbuilder": "~11.0.0" 1218 | } 1219 | }, 1220 | "xmlbuilder": { 1221 | "version": "11.0.1", 1222 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 1223 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" 1224 | }, 1225 | "yauzl": { 1226 | "version": "2.10.0", 1227 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 1228 | "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", 1229 | "requires": { 1230 | "buffer-crc32": "~0.2.3", 1231 | "fd-slicer": "~1.1.0" 1232 | } 1233 | } 1234 | } 1235 | } 1236 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-flywaydb", 3 | "version": "3.0.7", 4 | "description": "NodeJs wrapper for flywaydb cli", 5 | "main": "index.js", 6 | "bin": { 7 | "flyway": "./bin/flyway.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/markgardner/node-flywaydb.git" 12 | }, 13 | "keywords": [ 14 | "flyway", 15 | "flywaydb" 16 | ], 17 | "author": "Mark Gardner", 18 | "license": "Apache-2.0", 19 | "bugs": { 20 | "url": "https://github.com/markgardner/node-flywaydb/issues" 21 | }, 22 | "homepage": "https://github.com/markgardner/node-flywaydb#readme", 23 | "dependencies": { 24 | "commander": "^5.0.0", 25 | "extract-zip": "^2.0.0", 26 | "http-proxy-agent": "^4.0.1", 27 | "https-proxy-agent": "^5.0.0", 28 | "rimraf": "^3.0.2", 29 | "xml2js": "^0.4.23" 30 | }, 31 | "devDependencies": { 32 | "eslint": "^6.8.0" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /sample/config.js: -------------------------------------------------------------------------------- 1 | // This can be a function or an object literal. 2 | module.exports = function() { 3 | return { 4 | flywayArgs: { 5 | url: 'jdbc:postgresql://localhost/postgres', 6 | schemas: 'public', 7 | locations: 'filesystem:sample/sql', 8 | user: 'postgres', 9 | password: 'example', 10 | sqlMigrationSuffixes: '.pgsql', 11 | baselineOnMigrate: true, 12 | }, 13 | // Use to configure environment variables used by flyway 14 | env: { 15 | JAVA_ARGS: '-Djava.util.logging.config.file=./conf/logging.properties', 16 | }, 17 | version: '6.3.2', // optional, empty or missing will download the latest 18 | mavenPlugins: [{ // optional, use to add any plugins (ie. logging) 19 | groupId: 'org.slf4j', 20 | artifactId: 'slf4j-api', 21 | version: '1.7.25', 22 | // This can be a specifc url to download that may be different then the auto generated url. 23 | downloadUrl: 'https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar', 24 | }, { 25 | groupId: 'org.slf4j', 26 | artifactId: 'slf4j-jdk14', 27 | version: '1.7.25' 28 | }], 29 | downloads: { 30 | storageDirectory: '/var/test', // optional, the specific directory to store the flyway downloaded files. The directory must be writable by the node app process' user. 31 | expirationTimeInMs: -1, // optional, -1 will never check for updates, defaults to 1 day. 32 | } 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /sample/sql/V0001__StartingOut.pgsql: -------------------------------------------------------------------------------- 1 | CREATE SEQUENCE next_id_seq; 2 | 3 | CREATE OR REPLACE FUNCTION _next_id(OUT result bigint) AS $$ 4 | DECLARE 5 | our_epoch bigint := 1450939010372; 6 | seq_id bigint; 7 | now_millis bigint; 8 | shard_id int := 5; 9 | BEGIN 10 | SELECT nextval('next_id_seq') % 1024 INTO seq_id; 11 | 12 | SELECT FLOOR(EXTRACT(EPOCH FROM clock_timestamp()) * 1000) INTO now_millis; 13 | result := (now_millis - our_epoch) << 23; 14 | result := result | (shard_id << 10); 15 | result := result | (seq_id); 16 | END; 17 | $$ LANGUAGE PLPGSQL; 18 | 19 | CREATE TYPE login_type AS ENUM ( 20 | 'local', 21 | 'token'); --------------------------------------------------------------------------------