├── .coveralls.yml ├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── index.js ├── package-lock.json ├── package.json └── test ├── index.js ├── src ├── gulp.png ├── ignore.png ├── ignore_other.png └── inner │ └── inner.png └── update └── gulp.png /.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: ixxYDXE6bcXvpYiyjE8KwcEEaZDzbSg0j 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = false 10 | 11 | # Matches multiple files with brace expansion notation 12 | # Set default charset 13 | charset = utf-8 14 | 15 | # Tab indentation (no size specified) 16 | indent_style = space 17 | indent_size = 4 18 | 19 | [*.{scss,css}] 20 | indent_size = 2 21 | 22 | # Others 23 | trim_trailing_whitespace = true 24 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true, 4 | "commonjs": true, 5 | "es6": true 6 | }, 7 | "globals" : { 8 | // For Mocha 9 | "describe" : false, 10 | "it" : false, 11 | "before" : false, 12 | "beforeEach" : false, 13 | "after" : false, 14 | "afterEach" : false 15 | }, 16 | "extends": "eslint:recommended", 17 | "parserOptions": { 18 | "sourceType": "module" 19 | }, 20 | "rules": { 21 | "accessor-pairs": "error", 22 | "array-bracket-spacing": "error", 23 | "array-callback-return": "error", 24 | "arrow-body-style": "error", 25 | "arrow-parens": "error", 26 | "arrow-spacing": "error", 27 | "block-scoped-var": "error", 28 | "block-spacing": "error", 29 | "brace-style": [ 30 | "error", 31 | "1tbs" 32 | ], 33 | "callback-return": "error", 34 | "camelcase": "error", 35 | "comma-spacing": [ 36 | "error", 37 | { 38 | "after": true, 39 | "before": false 40 | } 41 | ], 42 | "comma-style": [ 43 | "error", 44 | "last" 45 | ], 46 | "complexity": "error", 47 | "computed-property-spacing": "error", 48 | "consistent-return": "error", 49 | "consistent-this": "error", 50 | "curly": "error", 51 | "default-case": "error", 52 | "dot-location": "error", 53 | "dot-notation": "error", 54 | "eol-last": "error", 55 | "eqeqeq": "error", 56 | "func-names": "off", 57 | "func-style": [ 58 | "error", 59 | "expression" 60 | ], 61 | "generator-star-spacing": "error", 62 | "global-require": "error", 63 | "guard-for-in": "error", 64 | "handle-callback-err": "error", 65 | "id-blacklist": "error", 66 | "id-length": "error", 67 | "id-match": "error", 68 | "indent": "off", 69 | "init-declarations": "error", 70 | "jsx-quotes": "error", 71 | "key-spacing": "error", 72 | "keyword-spacing": [ 73 | "error", 74 | { 75 | "after": true, 76 | "before": true 77 | } 78 | ], 79 | "linebreak-style": [ 80 | "error", 81 | "unix" 82 | ], 83 | "lines-around-comment": "error", 84 | "max-depth": "error", 85 | "max-len": "off", 86 | "max-nested-callbacks": "error", 87 | "max-params": "error", 88 | "max-statements": "off", 89 | "max-statements-per-line": "error", 90 | "new-cap": "error", 91 | "new-parens": "error", 92 | "newline-after-var": "off", 93 | "newline-before-return": "off", 94 | "newline-per-chained-call": "error", 95 | "no-alert": "error", 96 | "no-array-constructor": "error", 97 | "no-bitwise": "error", 98 | "no-caller": "error", 99 | "no-catch-shadow": "error", 100 | "no-confusing-arrow": "error", 101 | "no-continue": "error", 102 | "no-div-regex": "error", 103 | "no-duplicate-imports": "error", 104 | "no-else-return": "off", 105 | "no-empty-function": "error", 106 | "no-eq-null": "error", 107 | "no-eval": "error", 108 | "no-extend-native": "error", 109 | "no-extra-bind": "error", 110 | "no-extra-label": "error", 111 | "no-extra-parens": "off", 112 | "no-floating-decimal": "error", 113 | "no-implicit-coercion": "error", 114 | "no-implicit-globals": "error", 115 | "no-implied-eval": "error", 116 | "no-inline-comments": "error", 117 | "no-inner-declarations": [ 118 | "error", 119 | "functions" 120 | ], 121 | "no-invalid-this": "error", 122 | "no-iterator": "error", 123 | "no-label-var": "error", 124 | "no-labels": "error", 125 | "no-lone-blocks": "error", 126 | "no-lonely-if": "error", 127 | "no-loop-func": "error", 128 | "no-magic-numbers": "off", 129 | "no-mixed-requires": "error", 130 | "no-multi-spaces": "off", 131 | "no-multi-str": "error", 132 | "no-multiple-empty-lines": "error", 133 | "no-native-reassign": "error", 134 | "no-negated-condition": "off", 135 | "no-nested-ternary": "error", 136 | "no-new": "error", 137 | "no-new-func": "error", 138 | "no-new-object": "error", 139 | "no-new-require": "error", 140 | "no-new-wrappers": "error", 141 | "no-octal-escape": "error", 142 | "no-param-reassign": "off", 143 | "no-path-concat": "error", 144 | "no-plusplus": "error", 145 | "no-process-env": "error", 146 | "no-process-exit": "error", 147 | "no-proto": "error", 148 | "no-restricted-globals": "error", 149 | "no-restricted-imports": "error", 150 | "no-restricted-modules": "error", 151 | "no-restricted-syntax": "error", 152 | "no-return-assign": "error", 153 | "no-script-url": "error", 154 | "no-self-compare": "error", 155 | "no-sequences": "error", 156 | "no-shadow": "error", 157 | "no-shadow-restricted-names": "error", 158 | "no-spaced-func": "error", 159 | "no-sync": "off", 160 | "no-ternary": "error", 161 | "no-throw-literal": "error", 162 | "no-trailing-spaces": "off", 163 | "no-undef-init": "error", 164 | "no-undefined": "off", 165 | "no-underscore-dangle": "off", 166 | "no-unmodified-loop-condition": "error", 167 | "no-unneeded-ternary": "error", 168 | "no-unsafe-finally": "error", 169 | "no-use-before-define": "error", 170 | "no-useless-call": "error", 171 | "no-useless-computed-key": "error", 172 | "no-useless-concat": "error", 173 | "no-useless-constructor": "error", 174 | "no-useless-escape": "error", 175 | "no-var": "off", 176 | "no-void": "error", 177 | "no-warning-comments": "error", 178 | "no-whitespace-before-property": "error", 179 | "no-with": "error", 180 | "object-curly-spacing": [ 181 | "error", 182 | "always" 183 | ], 184 | "object-property-newline": "error", 185 | "object-shorthand": 0, 186 | "one-var": "off", 187 | "one-var-declaration-per-line": "error", 188 | "operator-assignment": "error", 189 | "operator-linebreak": "error", 190 | "padded-blocks": "off", 191 | "prefer-arrow-callback": "off", 192 | "prefer-const": "error", 193 | "prefer-reflect": "error", 194 | "prefer-rest-params": "error", 195 | "prefer-spread": "error", 196 | "prefer-template": "off", 197 | "quote-props": "off", 198 | "quotes": [ 199 | "error", 200 | "single" 201 | ], 202 | "radix": "error", 203 | "require-jsdoc": "error", 204 | "require-yield": "error", 205 | "semi": "off", 206 | "semi-spacing": "error", 207 | "sort-imports": "error", 208 | "sort-vars": "off", 209 | "space-before-blocks": "error", 210 | "space-before-function-paren": "off", 211 | "space-in-parens": "off", 212 | "space-infix-ops": "error", 213 | "space-unary-ops": [ 214 | "error", 215 | { 216 | "nonwords": false, 217 | "words": false 218 | } 219 | ], 220 | "spaced-comment": [ 221 | "error", 222 | "always" 223 | ], 224 | "strict": "off", 225 | "template-curly-spacing": "error", 226 | "valid-jsdoc": "error", 227 | "vars-on-top": "off", 228 | "wrap-iife": "error", 229 | "wrap-regex": "error", 230 | "yield-star-spacing": "error", 231 | "yoda": [ 232 | "error", 233 | "never" 234 | ] 235 | } 236 | }; 237 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | npm-debug.log* 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | *.pid.lock 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 | test/dest/ 29 | 30 | # Dependency directories 31 | node_modules 32 | jspm_packages 33 | 34 | # Optional npm cache directory 35 | .npm 36 | 37 | # Optional eslint cache 38 | .eslintcache 39 | 40 | # Optional REPL history 41 | .node_repl_history 42 | 43 | # Output of 'npm pack' 44 | *.tgz 45 | 46 | # Others 47 | .DS_Store 48 | .idea 49 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | *.log 4 | .idea -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | nguage: node_js 2 | node_js: 3 | - "4.0" 4 | - "5.0" 5 | - "6.0" 6 | - "stable" 7 | before_script: 8 | - npm install -g istanbul 9 | - npm install 10 | script: npm run cov 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2015 Kayo Lee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gulp-file-sync 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![Build Status][build-image]][build-result] 5 | [![Coveralls Status][coveralls-image]][coveralls-url] 6 | [![Dependency Status][david-dm-image]][david-dm-url] 7 | [![Downloads][downloads-image]][npm-url] 8 | 9 | [npm-url]: https://npmjs.org/package/gulp-file-sync 10 | [npm-image]: https://img.shields.io/npm/v/gulp-file-sync.svg 11 | [build-image]: https://travis-ci.org/kayo5994/gulp-file-sync.svg 12 | [build-result]: https://travis-ci.org/kayo5994/gulp-file-sync 13 | [coveralls-image]: https://img.shields.io/coveralls/kayo5994/gulp-file-sync.svg?branch=master 14 | [coveralls-url]: https://coveralls.io/r/kayo5994/gulp-file-sync 15 | [david-dm-url]: https://david-dm.org/kayo5994/gulp-file-sync 16 | [david-dm-image]: https://img.shields.io/david/kayo5994/gulp-file-sync.svg 17 | [downloads-image]: https://img.shields.io/npm/dm/gulp-file-sync.svg 18 | 19 | > Sync file It keeps your files synced between two directory. In other words, any change of files in one directory will automatically take place in another one. 20 | 21 | ## Migration from Version 1 22 | 23 | If you were previously passing a function as an ignore option, you'll have to replace the old function signature `dir` with `stats`. We [made this change](https://github.com/kayo5994/gulp-file-sync/issues/4) in [2.0.0](https://github.com/kayo5994/gulp-file-sync/releases/tag/2.0.0). 24 | 25 | ## Installation 26 | 27 | ```shell 28 | npm install --save-dev gulp-file-sync 29 | ``` 30 | 31 | ## Usage 32 | 33 | ```js 34 | var gulp = require('gulp'), 35 | fileSync = require('gulp-file-sync'); 36 | 37 | gulp.task('sync', function() { 38 | gulp.watch(['src/*.*'], function() { 39 | fileSync('src', 'dest', {recursive: false}); 40 | }); 41 | }); 42 | ``` 43 | 44 | ## API 45 | 46 | ### fileSync('source directory', 'destination directory', options) 47 | 48 | #### 'source directory' and 'destination directory' 49 | 50 | type: `String` 51 | 52 | Any change of files in 'source directory' will automatically take place in 'destination directory'. 53 | 54 | #### options.recursive 55 | 56 | type: `Boolean` 57 | 58 | default: true 59 | 60 | Synchronize subdirectories recursively. 61 | 62 | #### options.ignore 63 | 64 | type: `string` or `array` or `regex` or `function` 65 | 66 | Either a string, array, regex, or function to exclude some specific files. For example: 67 | 68 | ```js 69 | // ignore all .log files 70 | fileSync('source directory', 'destination directory', { 71 | ignore: '.log' 72 | }) 73 | fileSync('source directory', 'destination directory', { 74 | ignore: [/^\.log$/i, '.cache'] // Exclude all .log and .cache files 75 | }) 76 | fileSync('source directory', 'destination directory', { 77 | ignore: /^\.log$/i 78 | }) 79 | fileSync('source directory', 'destination directory', { 80 | ignore: function(stats, file) { 81 | if (stats.isFile()) { 82 | return file === '.log'; 83 | } 84 | return false; 85 | } 86 | }) 87 | ``` 88 | #### options.addFileCallback 89 | 90 | type: `function(fullPathSrc, fullPathDest)` 91 | 92 | default: 93 | 94 | ```js 95 | var gutil = require('gulp-util'); 96 | function(fullPathSrc, fullPathDest) { 97 | gutil.log('File addition synced ' + fullPathDest); 98 | } 99 | ``` 100 | 101 | This function is called when file was added on source directory. 102 | 103 | * `fullPathSrc` - is the path of file that was added on source directory. 104 | * `fullPathDest` - is the path of file that was copied to destination directory. 105 | 106 | #### options.deleteFileCallback 107 | 108 | type: `function(fullPathSrc, fullPathDest)` 109 | 110 | default: 111 | 112 | ```js 113 | var gutil = require('gulp-util'); 114 | function(fullPathSrc, fullPathDest) { 115 | gutil.log('File deletion synced ' + fullPathDest); 116 | } 117 | ``` 118 | 119 | This function is called when file was deleted on source directory. 120 | 121 | * `fullPathSrc` - is the path of file that was deleted on source directory. 122 | * `fullPathDest` - is the path of file that was deleted on destination directory. 123 | 124 | #### options.updateFileCallback 125 | 126 | type: `function(fullPathSrc, fullPathDest)` 127 | 128 | default: 129 | 130 | ```js 131 | var gutil = require('gulp-util'); 132 | function(fullPathSrc, fullPathDest) { 133 | gutil.log('File modification synced ' + fullPathDest); 134 | } 135 | ``` 136 | 137 | This function is called when file was updated on source directory. 138 | 139 | * `fullPathSrc` - is the path of file that was updated on source directory. 140 | * `fullPathDest` - is the path of file that was copied to destination directory. 141 | 142 | #### options.beforeAddFileCallback 143 | 144 | type: `function(fullPathSrc)` 145 | 146 | This function is called before file is added on source directory. 147 | 148 | * `fullPathSrc` - is the path of file that was added on source directory. 149 | 150 | #### options.beforeDeleteFileCallback 151 | 152 | type: `function(fullPathSrc)` 153 | 154 | This function is called before file is deleted on source directory. 155 | 156 | * `fullPathSrc` - is the path of file that was deleted on source directory. 157 | 158 | #### options.beforeUpdateFileCallback 159 | 160 | type: `function(fullPathSrc)` 161 | 162 | This function is called before file is updated on source directory. 163 | 164 | * `fullPathSrc` - is the path of file that was updated on source directory. 165 | 166 | ## License 167 | 168 | MIT (c) 2015 Kayo Lee (330956999@qq.com) 169 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var log = require('fancy-log'), 4 | PluginError = require('plugin-error'), 5 | fs = require('fs-extra'), 6 | path = require('path'), 7 | crc = require('crc'), 8 | packageInfo = require('./package.json'); 9 | 10 | var pluginDisplayName = packageInfo.name.replace('gulp-', ''); 11 | 12 | var isIgnored = function (options, stats, file) { 13 | if (options.ignore) { 14 | if (Array.isArray(options.ignore)) { 15 | // 为了让 ignore 参数更容易使用,ignore 参数支持传入数组 16 | // 如果 ignore 的文件为数组,则遍历数组元素并把每个元素封装成一个 options,然后重新调用 isIgnored 17 | return options.ignore.some(function (filter) { 18 | return isIgnored({ignore: filter}, stats, file); 19 | }); 20 | } else { 21 | var ignoreFileType = typeof options.ignore; 22 | // 判断参数类型,转换为实际使用的类型 23 | if (ignoreFileType === 'function') { 24 | return options.ignore(stats, file); 25 | 26 | } else if (ignoreFileType === 'string') { 27 | return options.ignore === file; 28 | 29 | } else { 30 | // 获取匹配的文件 31 | var matcheFile = options.ignore.exec(file); 32 | return matcheFile && matcheFile.length > 0; 33 | } 34 | } 35 | } 36 | return false; 37 | }; 38 | 39 | // 判断两个文件是否为相同的文件(即文件没有变动) 40 | var isSameFile = function (src, dest) { 41 | var srcCrc = crc.crc32(fs.readFileSync(src)).toString(16), 42 | destCrc = crc.crc32(fs.readFileSync(dest)).toString(16); 43 | return srcCrc === destCrc; 44 | }; 45 | 46 | // 移除文件 47 | var remove = function (options, src, dest) { 48 | 49 | var files = fs.readdirSync(dest); 50 | files.forEach(function (file) { 51 | var fullPathSrc = path.join(src, file), 52 | fullPathDest = path.join(dest, file), 53 | statDest = fs.statSync(fullPathDest); 54 | 55 | if (isIgnored(options, statDest, file)) { 56 | return; 57 | } 58 | 59 | if (statDest.isDirectory() && !options.recursive) { 60 | // 不允许递归子目录 61 | return; 62 | } 63 | 64 | if (!fs.existsSync(fullPathSrc)) { 65 | options.beforeDeleteFileCallback && options.beforeDeleteFileCallback(fullPathSrc); 66 | 67 | // 如果一个文件不在源目录而在目标目录,则删除该文件 68 | fs.removeSync(fullPathDest); 69 | 70 | options.deleteFileCallback(fullPathSrc, fullPathDest); 71 | 72 | } else { 73 | var statSrc = fs.statSync(fullPathSrc); 74 | if (statSrc.isFile() !== statDest.isFile() || statSrc.isDirectory() !== statDest.isDirectory()) { 75 | options.beforeDeleteFileCallback && options.beforeDeleteFileCallback(fullPathSrc); 76 | 77 | fs.removeSync(fullPathDest); 78 | 79 | options.deleteFileCallback(fullPathSrc, fullPathDest); 80 | 81 | } else if (statDest.isDirectory()) { 82 | remove(options, fullPathSrc, fullPathDest); 83 | } 84 | } 85 | }); 86 | }; 87 | 88 | // 新增文件 89 | var add = function (options, src, dest) { 90 | 91 | var files = fs.readdirSync(src); 92 | files.forEach(function (file) { 93 | var fullPathSrc = path.join(src, file), 94 | fullPathDest = path.join(dest, file), 95 | existsDest = fs.existsSync(fullPathDest), 96 | statSrc = fs.statSync(fullPathSrc); 97 | 98 | if (isIgnored(options, statSrc, file)) { 99 | return; 100 | } 101 | 102 | if (statSrc.isFile()) { 103 | if (existsDest) { 104 | var statDest = fs.statSync(fullPathDest); 105 | if (statDest.isFile()) { 106 | // 源目录与目标目录都存在该文件,判断该文件是否为相同的文件(没有被修改过) 107 | if (!isSameFile(fullPathSrc, fullPathDest)) { 108 | // 文件不相同,即文件被修改过,则把新文件拷贝到目标目录 109 | 110 | options.beforeUpdateFileCallback && options.beforeUpdateFileCallback(fullPathSrc); 111 | 112 | // forece 参数为 true 表明可以操作 index.js 所在目录更上层的目录内的文件 113 | fs.copySync(fullPathSrc, fullPathDest, {force: true}); 114 | 115 | options.updateFileCallback(fullPathSrc, fullPathDest); 116 | } 117 | } 118 | } else { 119 | // 如果文件只存在于源目录而不在目标目录,即为新增文件,同步到目标目录 120 | 121 | options.beforeAddFileCallback && options.beforeAddFileCallback(fullPathSrc); 122 | 123 | // forece 参数为 true 表明可以操作 index.js 所在目录更上层的目录内的文件 124 | fs.copySync(fullPathSrc, fullPathDest, {force: true}); 125 | 126 | options.addFileCallback(fullPathSrc, fullPathDest); 127 | } 128 | 129 | } else if (statSrc.isDirectory()) { 130 | 131 | if (!options.recursive) { 132 | // 不允许递归子目录 133 | return; 134 | } 135 | 136 | add(options, fullPathSrc, fullPathDest); 137 | } 138 | }); 139 | }; 140 | 141 | // 同步文件操作 142 | var fileSync = function (src, dest, options) { 143 | if (typeof(src) !== 'string') { 144 | throw new PluginError(pluginDisplayName, 'Missing source directory or type is not a string.') 145 | } 146 | if (typeof(dest) !== 'string') { 147 | throw new PluginError(pluginDisplayName, 'Missing destination directory or type is not a string.') 148 | } 149 | 150 | options = options || {}; 151 | 152 | // 是否递归所有子目录的参数的默认值 153 | options.recursive = (options.recursive === undefined) || options.recursive; 154 | 155 | // 新增文件时输出到控制台的默认 callback 156 | options.addFileCallback = options.addFileCallback || function (fullPathSrc, fullPathDest) { 157 | log('File addition synced ' + fullPathDest); 158 | }; 159 | 160 | // 删除文件时输出到控制台的默认 callback 161 | options.deleteFileCallback = options.deleteFileCallback || function (fullPathSrc, fullPathDest) { 162 | log('File deletion synced ' + fullPathDest); 163 | }; 164 | 165 | // 修改文件时输出到控制台的默认 callback 166 | options.updateFileCallback = options.updateFileCallback || function (fullPathSrc, fullPathDest) { 167 | log('File modification synced ' + fullPathDest); 168 | }; 169 | 170 | // 检查目标目录是否存在,如果目标目录不存在则创建一个,如果目标目录不存在而直接写入文件则会 crash 171 | fs.ensureDirSync(dest); 172 | remove(options, src, dest); 173 | add(options, src, dest); 174 | }; 175 | 176 | module.exports = fileSync; 177 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gulp-file-sync", 3 | "version": "2.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@ungap/promise-all-settled": { 8 | "version": "1.1.2", 9 | "resolved": "https://mirrors.tencent.com/npm/@ungap%2fpromise-all-settled/-/promise-all-settled-1.1.2.tgz", 10 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 11 | "dev": true 12 | }, 13 | "ajv": { 14 | "version": "6.12.6", 15 | "resolved": "https://mirrors.tencent.com/npm/ajv/-/ajv-6.12.6.tgz", 16 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 17 | "dev": true, 18 | "requires": { 19 | "fast-deep-equal": "^3.1.1", 20 | "fast-json-stable-stringify": "^2.0.0", 21 | "json-schema-traverse": "^0.4.1", 22 | "uri-js": "^4.2.2" 23 | } 24 | }, 25 | "ansi-colors": { 26 | "version": "1.1.0", 27 | "resolved": "https://mirrors.tencent.com/npm/ansi-colors/-/ansi-colors-1.1.0.tgz", 28 | "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", 29 | "requires": { 30 | "ansi-wrap": "^0.1.0" 31 | } 32 | }, 33 | "ansi-regex": { 34 | "version": "5.0.1", 35 | "resolved": "https://mirrors.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", 36 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 37 | "dev": true 38 | }, 39 | "ansi-styles": { 40 | "version": "4.3.0", 41 | "resolved": "https://mirrors.tencent.com/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", 42 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 43 | "dev": true, 44 | "requires": { 45 | "color-convert": "^2.0.1" 46 | } 47 | }, 48 | "ansi-wrap": { 49 | "version": "0.1.0", 50 | "resolved": "https://mirrors.tencent.com/npm/ansi-wrap/-/ansi-wrap-0.1.0.tgz", 51 | "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=" 52 | }, 53 | "anymatch": { 54 | "version": "3.1.2", 55 | "resolved": "https://mirrors.tencent.com/npm/anymatch/-/anymatch-3.1.2.tgz", 56 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 57 | "dev": true, 58 | "requires": { 59 | "normalize-path": "^3.0.0", 60 | "picomatch": "^2.0.4" 61 | } 62 | }, 63 | "argparse": { 64 | "version": "1.0.10", 65 | "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-1.0.10.tgz", 66 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 67 | "dev": true, 68 | "requires": { 69 | "sprintf-js": "~1.0.2" 70 | } 71 | }, 72 | "arr-diff": { 73 | "version": "4.0.0", 74 | "resolved": "https://mirrors.tencent.com/npm/arr-diff/-/arr-diff-4.0.0.tgz", 75 | "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" 76 | }, 77 | "arr-union": { 78 | "version": "3.1.0", 79 | "resolved": "https://mirrors.tencent.com/npm/arr-union/-/arr-union-3.1.0.tgz", 80 | "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" 81 | }, 82 | "asn1": { 83 | "version": "0.2.6", 84 | "resolved": "https://mirrors.tencent.com/npm/asn1/-/asn1-0.2.6.tgz", 85 | "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", 86 | "dev": true, 87 | "requires": { 88 | "safer-buffer": "~2.1.0" 89 | } 90 | }, 91 | "assert-plus": { 92 | "version": "1.0.0", 93 | "resolved": "https://mirrors.tencent.com/npm/assert-plus/-/assert-plus-1.0.0.tgz", 94 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", 95 | "dev": true 96 | }, 97 | "assertion-error": { 98 | "version": "1.1.0", 99 | "resolved": "https://mirrors.tencent.com/npm/assertion-error/-/assertion-error-1.1.0.tgz", 100 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 101 | "dev": true 102 | }, 103 | "assign-symbols": { 104 | "version": "1.0.0", 105 | "resolved": "https://mirrors.tencent.com/npm/assign-symbols/-/assign-symbols-1.0.0.tgz", 106 | "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" 107 | }, 108 | "asynckit": { 109 | "version": "0.4.0", 110 | "resolved": "https://mirrors.tencent.com/npm/asynckit/-/asynckit-0.4.0.tgz", 111 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", 112 | "dev": true 113 | }, 114 | "aws-sign2": { 115 | "version": "0.7.0", 116 | "resolved": "https://mirrors.tencent.com/npm/aws-sign2/-/aws-sign2-0.7.0.tgz", 117 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", 118 | "dev": true 119 | }, 120 | "aws4": { 121 | "version": "1.11.0", 122 | "resolved": "https://mirrors.tencent.com/npm/aws4/-/aws4-1.11.0.tgz", 123 | "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", 124 | "dev": true 125 | }, 126 | "balanced-match": { 127 | "version": "1.0.2", 128 | "resolved": "https://mirrors.tencent.com/npm/balanced-match/-/balanced-match-1.0.2.tgz", 129 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 130 | "dev": true 131 | }, 132 | "bcrypt-pbkdf": { 133 | "version": "1.0.2", 134 | "resolved": "https://mirrors.tencent.com/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 135 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 136 | "dev": true, 137 | "requires": { 138 | "tweetnacl": "^0.14.3" 139 | } 140 | }, 141 | "binary-extensions": { 142 | "version": "2.2.0", 143 | "resolved": "https://mirrors.tencent.com/npm/binary-extensions/-/binary-extensions-2.2.0.tgz", 144 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 145 | "dev": true 146 | }, 147 | "brace-expansion": { 148 | "version": "1.1.11", 149 | "resolved": "https://mirrors.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", 150 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 151 | "dev": true, 152 | "requires": { 153 | "balanced-match": "^1.0.0", 154 | "concat-map": "0.0.1" 155 | } 156 | }, 157 | "braces": { 158 | "version": "3.0.2", 159 | "resolved": "https://mirrors.tencent.com/npm/braces/-/braces-3.0.2.tgz", 160 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 161 | "dev": true, 162 | "requires": { 163 | "fill-range": "^7.0.1" 164 | } 165 | }, 166 | "browser-stdout": { 167 | "version": "1.3.1", 168 | "resolved": "https://mirrors.tencent.com/npm/browser-stdout/-/browser-stdout-1.3.1.tgz", 169 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 170 | "dev": true 171 | }, 172 | "camelcase": { 173 | "version": "6.3.0", 174 | "resolved": "https://mirrors.tencent.com/npm/camelcase/-/camelcase-6.3.0.tgz", 175 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 176 | "dev": true 177 | }, 178 | "caseless": { 179 | "version": "0.12.0", 180 | "resolved": "https://mirrors.tencent.com/npm/caseless/-/caseless-0.12.0.tgz", 181 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", 182 | "dev": true 183 | }, 184 | "chai": { 185 | "version": "4.3.6", 186 | "resolved": "https://mirrors.tencent.com/npm/chai/-/chai-4.3.6.tgz", 187 | "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", 188 | "dev": true, 189 | "requires": { 190 | "assertion-error": "^1.1.0", 191 | "check-error": "^1.0.2", 192 | "deep-eql": "^3.0.1", 193 | "get-func-name": "^2.0.0", 194 | "loupe": "^2.3.1", 195 | "pathval": "^1.1.1", 196 | "type-detect": "^4.0.5" 197 | } 198 | }, 199 | "chalk": { 200 | "version": "4.1.2", 201 | "resolved": "https://mirrors.tencent.com/npm/chalk/-/chalk-4.1.2.tgz", 202 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 203 | "dev": true, 204 | "requires": { 205 | "ansi-styles": "^4.1.0", 206 | "supports-color": "^7.1.0" 207 | }, 208 | "dependencies": { 209 | "supports-color": { 210 | "version": "7.2.0", 211 | "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-7.2.0.tgz", 212 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 213 | "dev": true, 214 | "requires": { 215 | "has-flag": "^4.0.0" 216 | } 217 | } 218 | } 219 | }, 220 | "check-error": { 221 | "version": "1.0.2", 222 | "resolved": "https://mirrors.tencent.com/npm/check-error/-/check-error-1.0.2.tgz", 223 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 224 | "dev": true 225 | }, 226 | "chokidar": { 227 | "version": "3.5.3", 228 | "resolved": "https://mirrors.tencent.com/npm/chokidar/-/chokidar-3.5.3.tgz", 229 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 230 | "dev": true, 231 | "requires": { 232 | "anymatch": "~3.1.2", 233 | "braces": "~3.0.2", 234 | "fsevents": "~2.3.2", 235 | "glob-parent": "~5.1.2", 236 | "is-binary-path": "~2.1.0", 237 | "is-glob": "~4.0.1", 238 | "normalize-path": "~3.0.0", 239 | "readdirp": "~3.6.0" 240 | } 241 | }, 242 | "cliui": { 243 | "version": "7.0.4", 244 | "resolved": "https://mirrors.tencent.com/npm/cliui/-/cliui-7.0.4.tgz", 245 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 246 | "dev": true, 247 | "requires": { 248 | "string-width": "^4.2.0", 249 | "strip-ansi": "^6.0.0", 250 | "wrap-ansi": "^7.0.0" 251 | } 252 | }, 253 | "color-convert": { 254 | "version": "2.0.1", 255 | "resolved": "https://mirrors.tencent.com/npm/color-convert/-/color-convert-2.0.1.tgz", 256 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 257 | "dev": true, 258 | "requires": { 259 | "color-name": "~1.1.4" 260 | } 261 | }, 262 | "color-name": { 263 | "version": "1.1.4", 264 | "resolved": "https://mirrors.tencent.com/npm/color-name/-/color-name-1.1.4.tgz", 265 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 266 | "dev": true 267 | }, 268 | "color-support": { 269 | "version": "1.1.3", 270 | "resolved": "https://mirrors.tencent.com/npm/color-support/-/color-support-1.1.3.tgz", 271 | "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" 272 | }, 273 | "combined-stream": { 274 | "version": "1.0.8", 275 | "resolved": "https://mirrors.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz", 276 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 277 | "dev": true, 278 | "requires": { 279 | "delayed-stream": "~1.0.0" 280 | } 281 | }, 282 | "concat-map": { 283 | "version": "0.0.1", 284 | "resolved": "https://mirrors.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz", 285 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 286 | "dev": true 287 | }, 288 | "core-util-is": { 289 | "version": "1.0.2", 290 | "resolved": "https://mirrors.tencent.com/npm/core-util-is/-/core-util-is-1.0.2.tgz", 291 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 292 | "dev": true 293 | }, 294 | "coveralls": { 295 | "version": "3.1.1", 296 | "resolved": "https://mirrors.tencent.com/npm/coveralls/-/coveralls-3.1.1.tgz", 297 | "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", 298 | "dev": true, 299 | "requires": { 300 | "js-yaml": "^3.13.1", 301 | "lcov-parse": "^1.0.0", 302 | "log-driver": "^1.2.7", 303 | "minimist": "^1.2.5", 304 | "request": "^2.88.2" 305 | } 306 | }, 307 | "crc": { 308 | "version": "4.1.0", 309 | "resolved": "https://mirrors.tencent.com/npm/crc/-/crc-4.1.0.tgz", 310 | "integrity": "sha512-xl6/PgOWZCDOA9mnytKzg2ftRS2YT/SUnNPPiCMoD6KWuiJayRjHcaLmBzGWNZGHSXDSrDuLNUEIljLRMbn7vA==" 311 | }, 312 | "dashdash": { 313 | "version": "1.14.1", 314 | "resolved": "https://mirrors.tencent.com/npm/dashdash/-/dashdash-1.14.1.tgz", 315 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 316 | "dev": true, 317 | "requires": { 318 | "assert-plus": "^1.0.0" 319 | } 320 | }, 321 | "debug": { 322 | "version": "4.3.3", 323 | "resolved": "https://mirrors.tencent.com/npm/debug/-/debug-4.3.3.tgz", 324 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 325 | "dev": true, 326 | "requires": { 327 | "ms": "2.1.2" 328 | }, 329 | "dependencies": { 330 | "ms": { 331 | "version": "2.1.2", 332 | "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.2.tgz", 333 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 334 | "dev": true 335 | } 336 | } 337 | }, 338 | "decamelize": { 339 | "version": "4.0.0", 340 | "resolved": "https://mirrors.tencent.com/npm/decamelize/-/decamelize-4.0.0.tgz", 341 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 342 | "dev": true 343 | }, 344 | "deep-eql": { 345 | "version": "3.0.1", 346 | "resolved": "https://mirrors.tencent.com/npm/deep-eql/-/deep-eql-3.0.1.tgz", 347 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 348 | "dev": true, 349 | "requires": { 350 | "type-detect": "^4.0.0" 351 | } 352 | }, 353 | "delayed-stream": { 354 | "version": "1.0.0", 355 | "resolved": "https://mirrors.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", 356 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", 357 | "dev": true 358 | }, 359 | "diff": { 360 | "version": "5.0.0", 361 | "resolved": "https://mirrors.tencent.com/npm/diff/-/diff-5.0.0.tgz", 362 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 363 | "dev": true 364 | }, 365 | "ecc-jsbn": { 366 | "version": "0.1.2", 367 | "resolved": "https://mirrors.tencent.com/npm/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 368 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 369 | "dev": true, 370 | "requires": { 371 | "jsbn": "~0.1.0", 372 | "safer-buffer": "^2.1.0" 373 | } 374 | }, 375 | "emoji-regex": { 376 | "version": "8.0.0", 377 | "resolved": "https://mirrors.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", 378 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 379 | "dev": true 380 | }, 381 | "escalade": { 382 | "version": "3.1.1", 383 | "resolved": "https://mirrors.tencent.com/npm/escalade/-/escalade-3.1.1.tgz", 384 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 385 | "dev": true 386 | }, 387 | "escape-string-regexp": { 388 | "version": "4.0.0", 389 | "resolved": "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 390 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 391 | "dev": true 392 | }, 393 | "esprima": { 394 | "version": "4.0.1", 395 | "resolved": "https://mirrors.tencent.com/npm/esprima/-/esprima-4.0.1.tgz", 396 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 397 | "dev": true 398 | }, 399 | "extend": { 400 | "version": "3.0.2", 401 | "resolved": "https://mirrors.tencent.com/npm/extend/-/extend-3.0.2.tgz", 402 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", 403 | "dev": true 404 | }, 405 | "extend-shallow": { 406 | "version": "3.0.2", 407 | "resolved": "https://mirrors.tencent.com/npm/extend-shallow/-/extend-shallow-3.0.2.tgz", 408 | "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", 409 | "requires": { 410 | "assign-symbols": "^1.0.0", 411 | "is-extendable": "^1.0.1" 412 | } 413 | }, 414 | "extsprintf": { 415 | "version": "1.3.0", 416 | "resolved": "https://mirrors.tencent.com/npm/extsprintf/-/extsprintf-1.3.0.tgz", 417 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", 418 | "dev": true 419 | }, 420 | "fancy-log": { 421 | "version": "2.0.0", 422 | "resolved": "https://mirrors.tencent.com/npm/fancy-log/-/fancy-log-2.0.0.tgz", 423 | "integrity": "sha512-9CzxZbACXMUXW13tS0tI8XsGGmxWzO2DmYrGuBJOJ8k8q2K7hwfJA5qHjuPPe8wtsco33YR9wc+Rlr5wYFvhSA==", 424 | "requires": { 425 | "color-support": "^1.1.3" 426 | } 427 | }, 428 | "fast-deep-equal": { 429 | "version": "3.1.3", 430 | "resolved": "https://mirrors.tencent.com/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 431 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 432 | "dev": true 433 | }, 434 | "fast-json-stable-stringify": { 435 | "version": "2.1.0", 436 | "resolved": "https://mirrors.tencent.com/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 437 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 438 | "dev": true 439 | }, 440 | "fill-range": { 441 | "version": "7.0.1", 442 | "resolved": "https://mirrors.tencent.com/npm/fill-range/-/fill-range-7.0.1.tgz", 443 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 444 | "dev": true, 445 | "requires": { 446 | "to-regex-range": "^5.0.1" 447 | } 448 | }, 449 | "find-up": { 450 | "version": "5.0.0", 451 | "resolved": "https://mirrors.tencent.com/npm/find-up/-/find-up-5.0.0.tgz", 452 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 453 | "dev": true, 454 | "requires": { 455 | "locate-path": "^6.0.0", 456 | "path-exists": "^4.0.0" 457 | } 458 | }, 459 | "flat": { 460 | "version": "5.0.2", 461 | "resolved": "https://mirrors.tencent.com/npm/flat/-/flat-5.0.2.tgz", 462 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 463 | "dev": true 464 | }, 465 | "forever-agent": { 466 | "version": "0.6.1", 467 | "resolved": "https://mirrors.tencent.com/npm/forever-agent/-/forever-agent-0.6.1.tgz", 468 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", 469 | "dev": true 470 | }, 471 | "form-data": { 472 | "version": "2.3.3", 473 | "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-2.3.3.tgz", 474 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 475 | "dev": true, 476 | "requires": { 477 | "asynckit": "^0.4.0", 478 | "combined-stream": "^1.0.6", 479 | "mime-types": "^2.1.12" 480 | } 481 | }, 482 | "fs-extra": { 483 | "version": "10.0.0", 484 | "resolved": "https://mirrors.tencent.com/npm/fs-extra/-/fs-extra-10.0.0.tgz", 485 | "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", 486 | "requires": { 487 | "graceful-fs": "^4.2.0", 488 | "jsonfile": "^6.0.1", 489 | "universalify": "^2.0.0" 490 | } 491 | }, 492 | "fs.realpath": { 493 | "version": "1.0.0", 494 | "resolved": "https://mirrors.tencent.com/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", 495 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 496 | "dev": true 497 | }, 498 | "fsevents": { 499 | "version": "2.3.2", 500 | "resolved": "https://mirrors.tencent.com/npm/fsevents/-/fsevents-2.3.2.tgz", 501 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 502 | "dev": true, 503 | "optional": true 504 | }, 505 | "get-caller-file": { 506 | "version": "2.0.5", 507 | "resolved": "https://mirrors.tencent.com/npm/get-caller-file/-/get-caller-file-2.0.5.tgz", 508 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 509 | "dev": true 510 | }, 511 | "get-func-name": { 512 | "version": "2.0.0", 513 | "resolved": "https://mirrors.tencent.com/npm/get-func-name/-/get-func-name-2.0.0.tgz", 514 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 515 | "dev": true 516 | }, 517 | "getpass": { 518 | "version": "0.1.7", 519 | "resolved": "https://mirrors.tencent.com/npm/getpass/-/getpass-0.1.7.tgz", 520 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 521 | "dev": true, 522 | "requires": { 523 | "assert-plus": "^1.0.0" 524 | } 525 | }, 526 | "glob": { 527 | "version": "7.2.0", 528 | "resolved": "https://mirrors.tencent.com/npm/glob/-/glob-7.2.0.tgz", 529 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 530 | "dev": true, 531 | "requires": { 532 | "fs.realpath": "^1.0.0", 533 | "inflight": "^1.0.4", 534 | "inherits": "2", 535 | "minimatch": "^3.0.4", 536 | "once": "^1.3.0", 537 | "path-is-absolute": "^1.0.0" 538 | } 539 | }, 540 | "glob-parent": { 541 | "version": "5.1.2", 542 | "resolved": "https://mirrors.tencent.com/npm/glob-parent/-/glob-parent-5.1.2.tgz", 543 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 544 | "dev": true, 545 | "requires": { 546 | "is-glob": "^4.0.1" 547 | } 548 | }, 549 | "graceful-fs": { 550 | "version": "4.2.9", 551 | "resolved": "https://mirrors.tencent.com/npm/graceful-fs/-/graceful-fs-4.2.9.tgz", 552 | "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" 553 | }, 554 | "growl": { 555 | "version": "1.10.5", 556 | "resolved": "https://mirrors.tencent.com/npm/growl/-/growl-1.10.5.tgz", 557 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 558 | "dev": true 559 | }, 560 | "har-schema": { 561 | "version": "2.0.0", 562 | "resolved": "https://mirrors.tencent.com/npm/har-schema/-/har-schema-2.0.0.tgz", 563 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", 564 | "dev": true 565 | }, 566 | "har-validator": { 567 | "version": "5.1.5", 568 | "resolved": "https://mirrors.tencent.com/npm/har-validator/-/har-validator-5.1.5.tgz", 569 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 570 | "dev": true, 571 | "requires": { 572 | "ajv": "^6.12.3", 573 | "har-schema": "^2.0.0" 574 | } 575 | }, 576 | "has-flag": { 577 | "version": "4.0.0", 578 | "resolved": "https://mirrors.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz", 579 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 580 | "dev": true 581 | }, 582 | "he": { 583 | "version": "1.2.0", 584 | "resolved": "https://mirrors.tencent.com/npm/he/-/he-1.2.0.tgz", 585 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 586 | "dev": true 587 | }, 588 | "http-signature": { 589 | "version": "1.2.0", 590 | "resolved": "https://mirrors.tencent.com/npm/http-signature/-/http-signature-1.2.0.tgz", 591 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 592 | "dev": true, 593 | "requires": { 594 | "assert-plus": "^1.0.0", 595 | "jsprim": "^1.2.2", 596 | "sshpk": "^1.7.0" 597 | } 598 | }, 599 | "inflight": { 600 | "version": "1.0.6", 601 | "resolved": "https://mirrors.tencent.com/npm/inflight/-/inflight-1.0.6.tgz", 602 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 603 | "dev": true, 604 | "requires": { 605 | "once": "^1.3.0", 606 | "wrappy": "1" 607 | } 608 | }, 609 | "inherits": { 610 | "version": "2.0.4", 611 | "resolved": "https://mirrors.tencent.com/npm/inherits/-/inherits-2.0.4.tgz", 612 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 613 | "dev": true 614 | }, 615 | "is-binary-path": { 616 | "version": "2.1.0", 617 | "resolved": "https://mirrors.tencent.com/npm/is-binary-path/-/is-binary-path-2.1.0.tgz", 618 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 619 | "dev": true, 620 | "requires": { 621 | "binary-extensions": "^2.0.0" 622 | } 623 | }, 624 | "is-extendable": { 625 | "version": "1.0.1", 626 | "resolved": "https://mirrors.tencent.com/npm/is-extendable/-/is-extendable-1.0.1.tgz", 627 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", 628 | "requires": { 629 | "is-plain-object": "^2.0.4" 630 | } 631 | }, 632 | "is-extglob": { 633 | "version": "2.1.1", 634 | "resolved": "https://mirrors.tencent.com/npm/is-extglob/-/is-extglob-2.1.1.tgz", 635 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 636 | "dev": true 637 | }, 638 | "is-fullwidth-code-point": { 639 | "version": "3.0.0", 640 | "resolved": "https://mirrors.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 641 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 642 | "dev": true 643 | }, 644 | "is-glob": { 645 | "version": "4.0.3", 646 | "resolved": "https://mirrors.tencent.com/npm/is-glob/-/is-glob-4.0.3.tgz", 647 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 648 | "dev": true, 649 | "requires": { 650 | "is-extglob": "^2.1.1" 651 | } 652 | }, 653 | "is-number": { 654 | "version": "7.0.0", 655 | "resolved": "https://mirrors.tencent.com/npm/is-number/-/is-number-7.0.0.tgz", 656 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 657 | "dev": true 658 | }, 659 | "is-plain-obj": { 660 | "version": "2.1.0", 661 | "resolved": "https://mirrors.tencent.com/npm/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 662 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 663 | "dev": true 664 | }, 665 | "is-plain-object": { 666 | "version": "2.0.4", 667 | "resolved": "https://mirrors.tencent.com/npm/is-plain-object/-/is-plain-object-2.0.4.tgz", 668 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", 669 | "requires": { 670 | "isobject": "^3.0.1" 671 | } 672 | }, 673 | "is-typedarray": { 674 | "version": "1.0.0", 675 | "resolved": "https://mirrors.tencent.com/npm/is-typedarray/-/is-typedarray-1.0.0.tgz", 676 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", 677 | "dev": true 678 | }, 679 | "is-unicode-supported": { 680 | "version": "0.1.0", 681 | "resolved": "https://mirrors.tencent.com/npm/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 682 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 683 | "dev": true 684 | }, 685 | "isexe": { 686 | "version": "2.0.0", 687 | "resolved": "https://mirrors.tencent.com/npm/isexe/-/isexe-2.0.0.tgz", 688 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 689 | "dev": true 690 | }, 691 | "isobject": { 692 | "version": "3.0.1", 693 | "resolved": "https://mirrors.tencent.com/npm/isobject/-/isobject-3.0.1.tgz", 694 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" 695 | }, 696 | "isstream": { 697 | "version": "0.1.2", 698 | "resolved": "https://mirrors.tencent.com/npm/isstream/-/isstream-0.1.2.tgz", 699 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", 700 | "dev": true 701 | }, 702 | "js-yaml": { 703 | "version": "3.14.1", 704 | "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-3.14.1.tgz", 705 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 706 | "dev": true, 707 | "requires": { 708 | "argparse": "^1.0.7", 709 | "esprima": "^4.0.0" 710 | } 711 | }, 712 | "jsbn": { 713 | "version": "0.1.1", 714 | "resolved": "https://mirrors.tencent.com/npm/jsbn/-/jsbn-0.1.1.tgz", 715 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", 716 | "dev": true 717 | }, 718 | "json-schema": { 719 | "version": "0.4.0", 720 | "resolved": "https://mirrors.tencent.com/npm/json-schema/-/json-schema-0.4.0.tgz", 721 | "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", 722 | "dev": true 723 | }, 724 | "json-schema-traverse": { 725 | "version": "0.4.1", 726 | "resolved": "https://mirrors.tencent.com/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 727 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 728 | "dev": true 729 | }, 730 | "json-stringify-safe": { 731 | "version": "5.0.1", 732 | "resolved": "https://mirrors.tencent.com/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 733 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", 734 | "dev": true 735 | }, 736 | "jsonfile": { 737 | "version": "6.1.0", 738 | "resolved": "https://mirrors.tencent.com/npm/jsonfile/-/jsonfile-6.1.0.tgz", 739 | "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", 740 | "requires": { 741 | "graceful-fs": "^4.1.6", 742 | "universalify": "^2.0.0" 743 | } 744 | }, 745 | "jsprim": { 746 | "version": "1.4.2", 747 | "resolved": "https://mirrors.tencent.com/npm/jsprim/-/jsprim-1.4.2.tgz", 748 | "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", 749 | "dev": true, 750 | "requires": { 751 | "assert-plus": "1.0.0", 752 | "extsprintf": "1.3.0", 753 | "json-schema": "0.4.0", 754 | "verror": "1.10.0" 755 | } 756 | }, 757 | "lcov-parse": { 758 | "version": "1.0.0", 759 | "resolved": "https://mirrors.tencent.com/npm/lcov-parse/-/lcov-parse-1.0.0.tgz", 760 | "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=", 761 | "dev": true 762 | }, 763 | "locate-path": { 764 | "version": "6.0.0", 765 | "resolved": "https://mirrors.tencent.com/npm/locate-path/-/locate-path-6.0.0.tgz", 766 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 767 | "dev": true, 768 | "requires": { 769 | "p-locate": "^5.0.0" 770 | } 771 | }, 772 | "log-driver": { 773 | "version": "1.2.7", 774 | "resolved": "https://mirrors.tencent.com/npm/log-driver/-/log-driver-1.2.7.tgz", 775 | "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", 776 | "dev": true 777 | }, 778 | "log-symbols": { 779 | "version": "4.1.0", 780 | "resolved": "https://mirrors.tencent.com/npm/log-symbols/-/log-symbols-4.1.0.tgz", 781 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 782 | "dev": true, 783 | "requires": { 784 | "chalk": "^4.1.0", 785 | "is-unicode-supported": "^0.1.0" 786 | } 787 | }, 788 | "loupe": { 789 | "version": "2.3.3", 790 | "resolved": "https://mirrors.tencent.com/npm/loupe/-/loupe-2.3.3.tgz", 791 | "integrity": "sha512-krIV4Cf1BIGIx2t1e6tucThhrBemUnIUjMtD2vN4mrMxnxpBvrcosBSpooqunBqP/hOEEV1w/Cr1YskGtqw5Jg==", 792 | "dev": true, 793 | "requires": { 794 | "get-func-name": "^2.0.0" 795 | } 796 | }, 797 | "mime-db": { 798 | "version": "1.51.0", 799 | "resolved": "https://mirrors.tencent.com/npm/mime-db/-/mime-db-1.51.0.tgz", 800 | "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", 801 | "dev": true 802 | }, 803 | "mime-types": { 804 | "version": "2.1.34", 805 | "resolved": "https://mirrors.tencent.com/npm/mime-types/-/mime-types-2.1.34.tgz", 806 | "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", 807 | "dev": true, 808 | "requires": { 809 | "mime-db": "1.51.0" 810 | } 811 | }, 812 | "minimatch": { 813 | "version": "3.0.4", 814 | "resolved": "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.0.4.tgz", 815 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 816 | "dev": true, 817 | "requires": { 818 | "brace-expansion": "^1.1.7" 819 | } 820 | }, 821 | "minimist": { 822 | "version": "1.2.5", 823 | "resolved": "https://mirrors.tencent.com/npm/minimist/-/minimist-1.2.5.tgz", 824 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 825 | "dev": true 826 | }, 827 | "mocha": { 828 | "version": "9.2.0", 829 | "resolved": "https://mirrors.tencent.com/npm/mocha/-/mocha-9.2.0.tgz", 830 | "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", 831 | "dev": true, 832 | "requires": { 833 | "@ungap/promise-all-settled": "1.1.2", 834 | "ansi-colors": "4.1.1", 835 | "browser-stdout": "1.3.1", 836 | "chokidar": "3.5.3", 837 | "debug": "4.3.3", 838 | "diff": "5.0.0", 839 | "escape-string-regexp": "4.0.0", 840 | "find-up": "5.0.0", 841 | "glob": "7.2.0", 842 | "growl": "1.10.5", 843 | "he": "1.2.0", 844 | "js-yaml": "4.1.0", 845 | "log-symbols": "4.1.0", 846 | "minimatch": "3.0.4", 847 | "ms": "2.1.3", 848 | "nanoid": "3.2.0", 849 | "serialize-javascript": "6.0.0", 850 | "strip-json-comments": "3.1.1", 851 | "supports-color": "8.1.1", 852 | "which": "2.0.2", 853 | "workerpool": "6.2.0", 854 | "yargs": "16.2.0", 855 | "yargs-parser": "20.2.4", 856 | "yargs-unparser": "2.0.0" 857 | }, 858 | "dependencies": { 859 | "ansi-colors": { 860 | "version": "4.1.1", 861 | "resolved": "https://mirrors.tencent.com/npm/ansi-colors/-/ansi-colors-4.1.1.tgz", 862 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 863 | "dev": true 864 | }, 865 | "argparse": { 866 | "version": "2.0.1", 867 | "resolved": "https://mirrors.tencent.com/npm/argparse/-/argparse-2.0.1.tgz", 868 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 869 | "dev": true 870 | }, 871 | "js-yaml": { 872 | "version": "4.1.0", 873 | "resolved": "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz", 874 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 875 | "dev": true, 876 | "requires": { 877 | "argparse": "^2.0.1" 878 | } 879 | } 880 | } 881 | }, 882 | "ms": { 883 | "version": "2.1.3", 884 | "resolved": "https://mirrors.tencent.com/npm/ms/-/ms-2.1.3.tgz", 885 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 886 | "dev": true 887 | }, 888 | "nanoid": { 889 | "version": "3.2.0", 890 | "resolved": "https://mirrors.tencent.com/npm/nanoid/-/nanoid-3.2.0.tgz", 891 | "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", 892 | "dev": true 893 | }, 894 | "normalize-path": { 895 | "version": "3.0.0", 896 | "resolved": "https://mirrors.tencent.com/npm/normalize-path/-/normalize-path-3.0.0.tgz", 897 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 898 | "dev": true 899 | }, 900 | "oauth-sign": { 901 | "version": "0.9.0", 902 | "resolved": "https://mirrors.tencent.com/npm/oauth-sign/-/oauth-sign-0.9.0.tgz", 903 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", 904 | "dev": true 905 | }, 906 | "once": { 907 | "version": "1.4.0", 908 | "resolved": "https://mirrors.tencent.com/npm/once/-/once-1.4.0.tgz", 909 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 910 | "dev": true, 911 | "requires": { 912 | "wrappy": "1" 913 | } 914 | }, 915 | "p-limit": { 916 | "version": "3.1.0", 917 | "resolved": "https://mirrors.tencent.com/npm/p-limit/-/p-limit-3.1.0.tgz", 918 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 919 | "dev": true, 920 | "requires": { 921 | "yocto-queue": "^0.1.0" 922 | } 923 | }, 924 | "p-locate": { 925 | "version": "5.0.0", 926 | "resolved": "https://mirrors.tencent.com/npm/p-locate/-/p-locate-5.0.0.tgz", 927 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 928 | "dev": true, 929 | "requires": { 930 | "p-limit": "^3.0.2" 931 | } 932 | }, 933 | "path-exists": { 934 | "version": "4.0.0", 935 | "resolved": "https://mirrors.tencent.com/npm/path-exists/-/path-exists-4.0.0.tgz", 936 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 937 | "dev": true 938 | }, 939 | "path-is-absolute": { 940 | "version": "1.0.1", 941 | "resolved": "https://mirrors.tencent.com/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 942 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 943 | "dev": true 944 | }, 945 | "pathval": { 946 | "version": "1.1.1", 947 | "resolved": "https://mirrors.tencent.com/npm/pathval/-/pathval-1.1.1.tgz", 948 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", 949 | "dev": true 950 | }, 951 | "performance-now": { 952 | "version": "2.1.0", 953 | "resolved": "https://mirrors.tencent.com/npm/performance-now/-/performance-now-2.1.0.tgz", 954 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", 955 | "dev": true 956 | }, 957 | "picomatch": { 958 | "version": "2.3.1", 959 | "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-2.3.1.tgz", 960 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 961 | "dev": true 962 | }, 963 | "plugin-error": { 964 | "version": "1.0.1", 965 | "resolved": "https://mirrors.tencent.com/npm/plugin-error/-/plugin-error-1.0.1.tgz", 966 | "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", 967 | "requires": { 968 | "ansi-colors": "^1.0.1", 969 | "arr-diff": "^4.0.0", 970 | "arr-union": "^3.1.0", 971 | "extend-shallow": "^3.0.2" 972 | } 973 | }, 974 | "psl": { 975 | "version": "1.8.0", 976 | "resolved": "https://mirrors.tencent.com/npm/psl/-/psl-1.8.0.tgz", 977 | "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", 978 | "dev": true 979 | }, 980 | "punycode": { 981 | "version": "2.1.1", 982 | "resolved": "https://mirrors.tencent.com/npm/punycode/-/punycode-2.1.1.tgz", 983 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 984 | "dev": true 985 | }, 986 | "qs": { 987 | "version": "6.5.3", 988 | "resolved": "https://mirrors.tencent.com/npm/qs/-/qs-6.5.3.tgz", 989 | "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", 990 | "dev": true 991 | }, 992 | "randombytes": { 993 | "version": "2.1.0", 994 | "resolved": "https://mirrors.tencent.com/npm/randombytes/-/randombytes-2.1.0.tgz", 995 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 996 | "dev": true, 997 | "requires": { 998 | "safe-buffer": "^5.1.0" 999 | } 1000 | }, 1001 | "readdirp": { 1002 | "version": "3.6.0", 1003 | "resolved": "https://mirrors.tencent.com/npm/readdirp/-/readdirp-3.6.0.tgz", 1004 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1005 | "dev": true, 1006 | "requires": { 1007 | "picomatch": "^2.2.1" 1008 | } 1009 | }, 1010 | "request": { 1011 | "version": "2.88.2", 1012 | "resolved": "https://mirrors.tencent.com/npm/request/-/request-2.88.2.tgz", 1013 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", 1014 | "dev": true, 1015 | "requires": { 1016 | "aws-sign2": "~0.7.0", 1017 | "aws4": "^1.8.0", 1018 | "caseless": "~0.12.0", 1019 | "combined-stream": "~1.0.6", 1020 | "extend": "~3.0.2", 1021 | "forever-agent": "~0.6.1", 1022 | "form-data": "~2.3.2", 1023 | "har-validator": "~5.1.3", 1024 | "http-signature": "~1.2.0", 1025 | "is-typedarray": "~1.0.0", 1026 | "isstream": "~0.1.2", 1027 | "json-stringify-safe": "~5.0.1", 1028 | "mime-types": "~2.1.19", 1029 | "oauth-sign": "~0.9.0", 1030 | "performance-now": "^2.1.0", 1031 | "qs": "~6.5.2", 1032 | "safe-buffer": "^5.1.2", 1033 | "tough-cookie": "~2.5.0", 1034 | "tunnel-agent": "^0.6.0", 1035 | "uuid": "^3.3.2" 1036 | } 1037 | }, 1038 | "require-directory": { 1039 | "version": "2.1.1", 1040 | "resolved": "https://mirrors.tencent.com/npm/require-directory/-/require-directory-2.1.1.tgz", 1041 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1042 | "dev": true 1043 | }, 1044 | "safe-buffer": { 1045 | "version": "5.2.1", 1046 | "resolved": "https://mirrors.tencent.com/npm/safe-buffer/-/safe-buffer-5.2.1.tgz", 1047 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1048 | "dev": true 1049 | }, 1050 | "safer-buffer": { 1051 | "version": "2.1.2", 1052 | "resolved": "https://mirrors.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", 1053 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1054 | "dev": true 1055 | }, 1056 | "serialize-javascript": { 1057 | "version": "6.0.0", 1058 | "resolved": "https://mirrors.tencent.com/npm/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1059 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1060 | "dev": true, 1061 | "requires": { 1062 | "randombytes": "^2.1.0" 1063 | } 1064 | }, 1065 | "sprintf-js": { 1066 | "version": "1.0.3", 1067 | "resolved": "https://mirrors.tencent.com/npm/sprintf-js/-/sprintf-js-1.0.3.tgz", 1068 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1069 | "dev": true 1070 | }, 1071 | "sshpk": { 1072 | "version": "1.17.0", 1073 | "resolved": "https://mirrors.tencent.com/npm/sshpk/-/sshpk-1.17.0.tgz", 1074 | "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", 1075 | "dev": true, 1076 | "requires": { 1077 | "asn1": "~0.2.3", 1078 | "assert-plus": "^1.0.0", 1079 | "bcrypt-pbkdf": "^1.0.0", 1080 | "dashdash": "^1.12.0", 1081 | "ecc-jsbn": "~0.1.1", 1082 | "getpass": "^0.1.1", 1083 | "jsbn": "~0.1.0", 1084 | "safer-buffer": "^2.0.2", 1085 | "tweetnacl": "~0.14.0" 1086 | } 1087 | }, 1088 | "string-width": { 1089 | "version": "4.2.3", 1090 | "resolved": "https://mirrors.tencent.com/npm/string-width/-/string-width-4.2.3.tgz", 1091 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1092 | "dev": true, 1093 | "requires": { 1094 | "emoji-regex": "^8.0.0", 1095 | "is-fullwidth-code-point": "^3.0.0", 1096 | "strip-ansi": "^6.0.1" 1097 | } 1098 | }, 1099 | "strip-ansi": { 1100 | "version": "6.0.1", 1101 | "resolved": "https://mirrors.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", 1102 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1103 | "dev": true, 1104 | "requires": { 1105 | "ansi-regex": "^5.0.1" 1106 | } 1107 | }, 1108 | "strip-json-comments": { 1109 | "version": "3.1.1", 1110 | "resolved": "https://mirrors.tencent.com/npm/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1111 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1112 | "dev": true 1113 | }, 1114 | "supports-color": { 1115 | "version": "8.1.1", 1116 | "resolved": "https://mirrors.tencent.com/npm/supports-color/-/supports-color-8.1.1.tgz", 1117 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1118 | "dev": true, 1119 | "requires": { 1120 | "has-flag": "^4.0.0" 1121 | } 1122 | }, 1123 | "to-regex-range": { 1124 | "version": "5.0.1", 1125 | "resolved": "https://mirrors.tencent.com/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", 1126 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1127 | "dev": true, 1128 | "requires": { 1129 | "is-number": "^7.0.0" 1130 | } 1131 | }, 1132 | "tough-cookie": { 1133 | "version": "2.5.0", 1134 | "resolved": "https://mirrors.tencent.com/npm/tough-cookie/-/tough-cookie-2.5.0.tgz", 1135 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 1136 | "dev": true, 1137 | "requires": { 1138 | "psl": "^1.1.28", 1139 | "punycode": "^2.1.1" 1140 | } 1141 | }, 1142 | "tunnel-agent": { 1143 | "version": "0.6.0", 1144 | "resolved": "https://mirrors.tencent.com/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1145 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1146 | "dev": true, 1147 | "requires": { 1148 | "safe-buffer": "^5.0.1" 1149 | } 1150 | }, 1151 | "tweetnacl": { 1152 | "version": "0.14.5", 1153 | "resolved": "https://mirrors.tencent.com/npm/tweetnacl/-/tweetnacl-0.14.5.tgz", 1154 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", 1155 | "dev": true 1156 | }, 1157 | "type-detect": { 1158 | "version": "4.0.8", 1159 | "resolved": "https://mirrors.tencent.com/npm/type-detect/-/type-detect-4.0.8.tgz", 1160 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 1161 | "dev": true 1162 | }, 1163 | "universalify": { 1164 | "version": "2.0.0", 1165 | "resolved": "https://mirrors.tencent.com/npm/universalify/-/universalify-2.0.0.tgz", 1166 | "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" 1167 | }, 1168 | "uri-js": { 1169 | "version": "4.4.1", 1170 | "resolved": "https://mirrors.tencent.com/npm/uri-js/-/uri-js-4.4.1.tgz", 1171 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1172 | "dev": true, 1173 | "requires": { 1174 | "punycode": "^2.1.0" 1175 | } 1176 | }, 1177 | "uuid": { 1178 | "version": "3.4.0", 1179 | "resolved": "https://mirrors.tencent.com/npm/uuid/-/uuid-3.4.0.tgz", 1180 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 1181 | "dev": true 1182 | }, 1183 | "verror": { 1184 | "version": "1.10.0", 1185 | "resolved": "https://mirrors.tencent.com/npm/verror/-/verror-1.10.0.tgz", 1186 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1187 | "dev": true, 1188 | "requires": { 1189 | "assert-plus": "^1.0.0", 1190 | "core-util-is": "1.0.2", 1191 | "extsprintf": "^1.2.0" 1192 | } 1193 | }, 1194 | "which": { 1195 | "version": "2.0.2", 1196 | "resolved": "https://mirrors.tencent.com/npm/which/-/which-2.0.2.tgz", 1197 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1198 | "dev": true, 1199 | "requires": { 1200 | "isexe": "^2.0.0" 1201 | } 1202 | }, 1203 | "workerpool": { 1204 | "version": "6.2.0", 1205 | "resolved": "https://mirrors.tencent.com/npm/workerpool/-/workerpool-6.2.0.tgz", 1206 | "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", 1207 | "dev": true 1208 | }, 1209 | "wrap-ansi": { 1210 | "version": "7.0.0", 1211 | "resolved": "https://mirrors.tencent.com/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1212 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1213 | "dev": true, 1214 | "requires": { 1215 | "ansi-styles": "^4.0.0", 1216 | "string-width": "^4.1.0", 1217 | "strip-ansi": "^6.0.0" 1218 | } 1219 | }, 1220 | "wrappy": { 1221 | "version": "1.0.2", 1222 | "resolved": "https://mirrors.tencent.com/npm/wrappy/-/wrappy-1.0.2.tgz", 1223 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1224 | "dev": true 1225 | }, 1226 | "y18n": { 1227 | "version": "5.0.8", 1228 | "resolved": "https://mirrors.tencent.com/npm/y18n/-/y18n-5.0.8.tgz", 1229 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1230 | "dev": true 1231 | }, 1232 | "yargs": { 1233 | "version": "16.2.0", 1234 | "resolved": "https://mirrors.tencent.com/npm/yargs/-/yargs-16.2.0.tgz", 1235 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1236 | "dev": true, 1237 | "requires": { 1238 | "cliui": "^7.0.2", 1239 | "escalade": "^3.1.1", 1240 | "get-caller-file": "^2.0.5", 1241 | "require-directory": "^2.1.1", 1242 | "string-width": "^4.2.0", 1243 | "y18n": "^5.0.5", 1244 | "yargs-parser": "^20.2.2" 1245 | } 1246 | }, 1247 | "yargs-parser": { 1248 | "version": "20.2.4", 1249 | "resolved": "https://mirrors.tencent.com/npm/yargs-parser/-/yargs-parser-20.2.4.tgz", 1250 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1251 | "dev": true 1252 | }, 1253 | "yargs-unparser": { 1254 | "version": "2.0.0", 1255 | "resolved": "https://mirrors.tencent.com/npm/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1256 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1257 | "dev": true, 1258 | "requires": { 1259 | "camelcase": "^6.0.0", 1260 | "decamelize": "^4.0.0", 1261 | "flat": "^5.0.2", 1262 | "is-plain-obj": "^2.1.0" 1263 | } 1264 | }, 1265 | "yocto-queue": { 1266 | "version": "0.1.0", 1267 | "resolved": "https://mirrors.tencent.com/npm/yocto-queue/-/yocto-queue-0.1.0.tgz", 1268 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1269 | "dev": true 1270 | } 1271 | } 1272 | } 1273 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gulp-file-sync", 3 | "version": "2.1.0", 4 | "description": "Sync file It keeps your files synced between two directory. In other words, any change of files in one directory will automatically take place in another one.", 5 | "main": "index.js", 6 | "dependencies": { 7 | "crc": "^4.1.0", 8 | "fancy-log": "^2.0.0", 9 | "fs-extra": "^10.0.0", 10 | "plugin-error": "^1.0.1" 11 | }, 12 | "devDependencies": { 13 | "chai": "^4.3.6", 14 | "coveralls": "^3.1.1", 15 | "mocha": "^9.2.0" 16 | }, 17 | "scripts": { 18 | "test": "echo \"Error: no test specified\" && exit 1", 19 | "cov": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "url": "git+https://github.com/kayo5994/gulp-file-sync.git" 24 | }, 25 | "keywords": [ 26 | "sync", 27 | "Synchronize", 28 | "file", 29 | "manage", 30 | "gulpplugin", 31 | "gulpplugin", 32 | "gulpfriendly", 33 | "gulpfriendly" 34 | ], 35 | "author": "Kayo Lee <330956999@qq.com>", 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/kayo5994/gulp-file-sync/issues" 39 | }, 40 | "homepage": "https://github.com/kayo5994/gulp-file-sync#readme" 41 | } 42 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var fs = require('fs-extra'), 4 | path = require('path'), 5 | expect = require('chai').expect, 6 | fileSync = require('..'); 7 | 8 | // 工具方法 9 | 10 | // 判断一个元素是否存在于某个数组中 11 | var isElementInArray = function (targetArray, element) { 12 | for (var i = 0; i < targetArray.length; i += 1) { 13 | if (element === targetArray[i]) { 14 | return true; 15 | } 16 | } 17 | return false; 18 | } 19 | 20 | // 为了消除测试输出中的 Log,避免对测试输出造成影响,随便定义些内容,由于覆盖 callback 21 | var placeHolderFunction = function () { 22 | var i = 1; 23 | i += 1; 24 | } 25 | 26 | // 相关文件目录 27 | var srcDirectory = 'test/src', 28 | destDirectory = 'test/dest', 29 | updateDirectory = 'test/update'; 30 | 31 | describe('fileSync(src, dest, options)', function () { 32 | 33 | var fileSyncWithOption = function (source, options) { 34 | options = options || {}; 35 | 36 | fileSync(source, destDirectory, options); 37 | } 38 | 39 | // 确保目标目录存在 40 | fs.ensureDirSync(destDirectory); 41 | // 清空目标目录,准备开始测试流程 42 | var clearDestDirectory = function () { 43 | var destFiles = fs.readdirSync(destDirectory); 44 | destFiles.forEach(function (file) { 45 | var fullPathDest = path.join(destDirectory, file), 46 | existsDest = fs.existsSync(fullPathDest); 47 | 48 | if (existsDest) { 49 | fs.removeSync(fullPathDest); 50 | } 51 | }); 52 | } 53 | clearDestDirectory(); 54 | 55 | // 测试参数遗漏时是否 throw 56 | it('Throws when `src` is missing or `src` is not a string', function () { 57 | expect(fileSync).to.throw('Missing source directory or type is not a string.'); 58 | }); 59 | 60 | // 测试参数遗漏时是否 throw 61 | it('Throws when `dest` is missing or `dest` is not a string', function () { 62 | expect(fileSync.bind(undefined, srcDirectory)).to.throw('Missing destination directory or type is not a string.'); 63 | }); 64 | 65 | // 测试非递归同步 66 | describe('non-recursively', function () { 67 | 68 | before(function () { 69 | fileSyncWithOption(srcDirectory, {recursive: false}); 70 | }); 71 | 72 | it('Sync directory non-recursively', function () { 73 | var srcFiles = fs.readdirSync(srcDirectory); 74 | srcFiles.forEach(function (file) { 75 | var filePathSrc = path.join(srcDirectory, file), 76 | statSrc = fs.statSync(filePathSrc), 77 | fullPathDest = path.join(destDirectory, file); 78 | 79 | if (statSrc.isDirectory()) { 80 | expect(fs.existsSync(fullPathDest)).to.be.false; 81 | } else { 82 | expect(fs.existsSync(fullPathDest)).to.be.true; 83 | } 84 | }); 85 | }); 86 | }); 87 | 88 | // 测试递归同步 89 | describe('recursively', function () { 90 | 91 | before(function () { 92 | fileSyncWithOption(srcDirectory, {recursive: true}); 93 | }); 94 | 95 | it('Sync directory recursively', function () { 96 | var srcFiles = fs.readdirSync(srcDirectory); 97 | srcFiles.forEach(function (file) { 98 | var fullPathDest = path.join(destDirectory, file); 99 | 100 | expect(fs.existsSync(fullPathDest)).to.be.true; 101 | }); 102 | }); 103 | }); 104 | 105 | // 测试排除文件 106 | describe('ignore', function () { 107 | 108 | var shouldIgnoreFile = 'ignore.png'; 109 | describe('ignore by function', function () { 110 | before(function () { 111 | clearDestDirectory(); 112 | fileSyncWithOption(srcDirectory, { 113 | ignore: function (dir, file) { 114 | return file === shouldIgnoreFile; 115 | } 116 | }); 117 | }); 118 | 119 | it('Sync directory but ignore a file', function () { 120 | var srcFiles = fs.readdirSync(srcDirectory); 121 | srcFiles.forEach(function (file) { 122 | var fullPathDest = path.join(destDirectory, file); 123 | 124 | if (file === shouldIgnoreFile) { 125 | expect(fs.existsSync(fullPathDest)).to.be.false; 126 | } else { 127 | expect(fs.existsSync(fullPathDest)).to.be.true; 128 | } 129 | }); 130 | }); 131 | }); 132 | 133 | var shouldIgnoreRegex = /^ignore\.png$/i; 134 | describe('ignore by regex', function () { 135 | before(function () { 136 | clearDestDirectory(); 137 | fileSyncWithOption(srcDirectory, { 138 | ignore: shouldIgnoreRegex 139 | }); 140 | }); 141 | 142 | it('Sync directory but ignore a file by regex', function () { 143 | var srcFiles = fs.readdirSync(srcDirectory); 144 | srcFiles.forEach(function (file) { 145 | var fullPathDest = path.join(destDirectory, file); 146 | 147 | if (file === shouldIgnoreFile) { 148 | expect(fs.existsSync(fullPathDest)).to.be.false; 149 | } else { 150 | expect(fs.existsSync(fullPathDest)).to.be.true; 151 | } 152 | }); 153 | }); 154 | }); 155 | 156 | var shouldIgnoreFileList = ['ignore.png', 'ignore_other.png']; 157 | describe('ignore by array', function () { 158 | before(function () { 159 | clearDestDirectory(); 160 | fileSyncWithOption(srcDirectory, {ignore: shouldIgnoreFileList}); 161 | }); 162 | 163 | it('Sync directory but ignore some files', function () { 164 | var srcFiles = fs.readdirSync(srcDirectory); 165 | srcFiles.forEach(function (file) { 166 | var fullPathDest = path.join(destDirectory, file); 167 | 168 | if (isElementInArray(shouldIgnoreFileList, file)) { 169 | expect(fs.existsSync(fullPathDest)).to.be.false; 170 | } else { 171 | expect(fs.existsSync(fullPathDest)).to.be.true; 172 | } 173 | }); 174 | }); 175 | }); 176 | 177 | }); 178 | 179 | // 测试更新和删除文件 180 | var specialDir = '/ignore.png'; 181 | describe('update and delete', function () { 182 | 183 | before(function () { 184 | fs.mkdirSync(updateDirectory + specialDir); 185 | fileSyncWithOption(updateDirectory); 186 | }); 187 | 188 | it('Sync directory to update and delete some files', function () { 189 | var destFiles = fs.readdirSync(destDirectory); 190 | destFiles.forEach(function (file) { 191 | var fullPathSrc = path.join(updateDirectory, file); 192 | 193 | expect(fs.existsSync(fullPathSrc)).to.be.true; 194 | }); 195 | }); 196 | 197 | after(function () { 198 | fs.removeSync(updateDirectory + specialDir); 199 | }); 200 | }); 201 | 202 | // 测试新增文件,并且该文件在目标文件夹有同名目录 203 | var specialFile = '/special'; 204 | describe('add special file', function () { 205 | 206 | before(function () { 207 | fs.writeFileSync(updateDirectory + specialFile); 208 | fs.mkdirSync(destDirectory + specialFile); 209 | fileSyncWithOption(updateDirectory); 210 | }); 211 | 212 | it('Sync directory to add files that already exists with the same name directory in target directory', function () { 213 | var destFiles = fs.readdirSync(destDirectory); 214 | destFiles.forEach(function (file) { 215 | var fullPathSrc = path.join(updateDirectory, file), 216 | fullPathDest = path.join(destDirectory, file); 217 | 218 | // 验证目标目录中的文件是否存在于源目录中 219 | expect(fs.existsSync(fullPathSrc)).to.be.true; 220 | // 验证目标目录中与源目录文件同名的子目录是否被更新 221 | if ('/' + file.toString === specialFile) { 222 | var statDest = fs.statSync(fullPathDest); 223 | expect(fs.existsSync(statDest.isFile())).to.be.true; 224 | } 225 | }); 226 | }); 227 | 228 | after(function () { 229 | fs.removeSync(updateDirectory + specialFile); 230 | fs.removeSync(destDirectory + specialFile); 231 | }); 232 | }); 233 | 234 | // 测试回调函数 235 | describe('callback testing', function () { 236 | 237 | var addStatus = {}, 238 | updateStatus = {}, 239 | deleteStatus = {}; 240 | 241 | before(function () { 242 | fileSync(srcDirectory, destDirectory, { 243 | beforeAddFileCallback: function (fullPathSrc) { 244 | addStatus.before = fullPathSrc; 245 | }, 246 | addFileCallback: function (fullPathSrc) { 247 | addStatus.done = fullPathSrc; 248 | }, 249 | updateFileCallback: function () { 250 | placeHolderFunction(); 251 | }, 252 | deleteFileCallback: function () { 253 | placeHolderFunction(); 254 | } 255 | }); 256 | 257 | fileSync(updateDirectory, destDirectory, { 258 | addFileCallback: function () { 259 | placeHolderFunction(); 260 | }, 261 | beforeUpdateFileCallback: function (fullPathSrc) { 262 | updateStatus.before = fullPathSrc; 263 | }, 264 | beforeDeleteFileCallback: function (fullPathSrc) { 265 | deleteStatus.before = fullPathSrc; 266 | }, 267 | updateFileCallback: function (fullPathSrc) { 268 | updateStatus.done = fullPathSrc; 269 | }, 270 | deleteFileCallback: function (fullPathSrc) { 271 | deleteStatus.done = fullPathSrc; 272 | } 273 | }); 274 | }); 275 | 276 | it('Test the callbacks of add file', function () { 277 | expect(addStatus).to.have.deep.property('before', addStatus.done); 278 | }); 279 | 280 | it('Test the callbacks of update file', function () { 281 | expect(updateStatus).to.have.deep.property('before', updateStatus.done); 282 | }); 283 | 284 | it('Test the callbacks of delete file', function () { 285 | expect(deleteStatus).to.have.deep.property('before', deleteStatus.done); 286 | }); 287 | }); 288 | 289 | }); 290 | -------------------------------------------------------------------------------- /test/src/gulp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kayo5994/gulp-file-sync/adf1aaafe436122769b83af43cc4efc2b69e540f/test/src/gulp.png -------------------------------------------------------------------------------- /test/src/ignore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kayo5994/gulp-file-sync/adf1aaafe436122769b83af43cc4efc2b69e540f/test/src/ignore.png -------------------------------------------------------------------------------- /test/src/ignore_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kayo5994/gulp-file-sync/adf1aaafe436122769b83af43cc4efc2b69e540f/test/src/ignore_other.png -------------------------------------------------------------------------------- /test/src/inner/inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kayo5994/gulp-file-sync/adf1aaafe436122769b83af43cc4efc2b69e540f/test/src/inner/inner.png -------------------------------------------------------------------------------- /test/update/gulp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kayo5994/gulp-file-sync/adf1aaafe436122769b83af43cc4efc2b69e540f/test/update/gulp.png --------------------------------------------------------------------------------