diff --git a/.travis.yml b/.travis.yml index 237f315d4d..21c75bf9e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,8 @@ before_install: - export PATH="$HOME/.yarn/bin:$PATH" install: + - export DISPLAY=':99.0' + - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - yarn install before_script: diff --git a/docs/api/layer/heatmap_layer/grid.en.md b/docs/api/layer/heatmap_layer/grid.en.md index 0d347accfa..99183df18d 100644 --- a/docs/api/layer/heatmap_layer/grid.en.md +++ b/docs/api/layer/heatmap_layer/grid.en.md @@ -9,7 +9,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` diff --git a/docs/api/layer/heatmap_layer/grid.zh.md b/docs/api/layer/heatmap_layer/grid.zh.md index 4cc7924b39..dc90c00c94 100644 --- a/docs/api/layer/heatmap_layer/grid.zh.md +++ b/docs/api/layer/heatmap_layer/grid.zh.md @@ -7,7 +7,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` diff --git a/docs/api/layer/heatmap_layer/hexagon.en.md b/docs/api/layer/heatmap_layer/hexagon.en.md index 8493c7bb78..0c39408f88 100644 --- a/docs/api/layer/heatmap_layer/hexagon.en.md +++ b/docs/api/layer/heatmap_layer/hexagon.en.md @@ -6,7 +6,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` ## source 网格数据只支持点数据作为数据源,数据格式支持csv、json、geojson. diff --git a/docs/api/layer/heatmap_layer/hexagon.zh.md b/docs/api/layer/heatmap_layer/hexagon.zh.md index f13b7144e8..93775ba010 100644 --- a/docs/api/layer/heatmap_layer/hexagon.zh.md +++ b/docs/api/layer/heatmap_layer/hexagon.zh.md @@ -8,7 +8,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` diff --git a/docs/api/layer/heatmap_layer/normal.en.md b/docs/api/layer/heatmap_layer/normal.en.md index 7705b74a5d..f973c79c88 100644 --- a/docs/api/layer/heatmap_layer/normal.en.md +++ b/docs/api/layer/heatmap_layer/normal.en.md @@ -6,7 +6,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` diff --git a/docs/api/layer/heatmap_layer/normal.zh.md b/docs/api/layer/heatmap_layer/normal.zh.md index 7705b74a5d..f973c79c88 100644 --- a/docs/api/layer/heatmap_layer/normal.zh.md +++ b/docs/api/layer/heatmap_layer/normal.zh.md @@ -6,7 +6,7 @@ order: 1 ## 使用 ```javascript -import { HeatMapLayer] } from '@antv/l7'; +import { HeatMapLayer } from '@antv/l7'; ``` diff --git a/examples/tutorial/control/demo/amap.js b/examples/tutorial/control/demo/amap.js index 714d4db1a3..12ecb9baff 100644 --- a/examples/tutorial/control/demo/amap.js +++ b/examples/tutorial/control/demo/amap.js @@ -32,7 +32,7 @@ fetch( scene.addLayer(pointLayer); const overlayers = { - 围栏填充: pointLayer + 气泡图: pointLayer }; const layersControl = new Layers({ overlayers diff --git a/jest.config.js b/jest.config.js index 7499dfa676..39e29a7b29 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,6 @@ module.exports = { + runner: 'jest-electron/runner', + testEnvironment: 'jest-electron/environment', preset: 'ts-jest', clearMocks: true, collectCoverageFrom: [ diff --git a/package.json b/package.json index 6ed1484432..729a552860 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "html-webpack-plugin": "^3.2.0", "husky": "^3.0.9", "jest": "^24.9.0", + "jest-electron": "^0.1.11", "jest-styled-components": "^6.2.1", "lerna": "^3.16.4", "lint-staged": "^9.2.4", @@ -140,6 +141,7 @@ "release-cdn": "antv-bin upload -n @antv/l7", "storybook": "start-storybook -p 6006", "test": "cross-env BABEL_ENV=test jest", + "test-live": "cross-env BABEL_ENV=test DEBUG_MODE=1 jest --watch packages/scene/__tests__/index.spec.ts ", "coveralls": "jest --coverage && cat ./tests/coverage/lcov.info | coveralls", "tsc": "tsc", "watch": "yarn clean && lerna exec --parallel -- cross-env BABEL_ENV=cjs babel --watch src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments", diff --git a/packages/component/src/control/layer.ts b/packages/component/src/control/layer.ts index 4a4aa75e12..58c7596768 100644 --- a/packages/component/src/control/layer.ts +++ b/packages/component/src/control/layer.ts @@ -96,7 +96,6 @@ export default class Layers extends Control { const className = 'l7-control-layers'; const container = (this.container = DOM.create('div', className)); const { collapsed } = this.controlOption; - // makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released container.setAttribute('aria-haspopup', 'true'); @@ -105,11 +104,11 @@ export default class Layers extends Control { className + '-list', ) as HTMLElement); - // if (collapsed) { - // this.mapsService.on('click', this.collapse); - // container.addEventListener('mouseenter', this.expand); - // container.addEventListener('mouseleave', this.collapse); - // } + if (collapsed) { + this.mapsService.on('click', this.collapse); + container.addEventListener('mouseenter', this.expand); + container.addEventListener('mouseleave', this.collapse); + } this.layersLink = DOM.create('a', className + '-toggle', container); const link = this.layersLink; @@ -297,7 +296,6 @@ export default class Layers extends Control { for (let i = inputs.length - 1; i >= 0; i--) { input = inputs[i]; layer = this.layerService.getLayer(input.layerId); - if (input.checked) { addedLayers.push(layer); } else if (!input.checked) { diff --git a/packages/component/src/css/l7.css b/packages/component/src/css/l7.css index f20392e7c5..e547d69118 100644 --- a/packages/component/src/css/l7.css +++ b/packages/component/src/css/l7.css @@ -726,12 +726,10 @@ .l7-control-layers-toggle { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAkCAYAAAGf7Ah0AAAABGdBTUEAALGPC/xhBQAABzdJREFUWAnVV3lslEUUn/l2F0tpwdAih1HEqCReDcphNCo1EkgFkXa5PNpuC0Fo2e7Wgko8KiaKWrvbK5672xYFpNtiR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tGQgdeuwqWuUjGbUgrdszLHRXXDLF0oe54AS0kyPnc5Iz/2CmV7EeIzSwcjvsHQPXkUhld/kCP6Xu+DRNjg/SWHh+SnODF+aPeVh9XCydAPEsA4kAqsCzcuiTPiw7+maTj6SwGsVk/9gY9xbUpizR8MNS47aAd0C7s35CG8VdrxYyjl/FcdUgo73nY77X9D/Au9RDMh+aBoVAAAAAElFTkSuQmCC'); width: 36px; - height: 36px; - } -.l7-retina .l7-control-layers-toggle { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAkCAYAAAGf7Ah0AAAABGdBTUEAALGPC/xhBQAABzdJREFUWAnVV3lslEUUn/l2F0tpwdAih1HEqCReDcphNCo1EkgFkXa5PNpuC0Fo2e7Wgko8KiaKWrvbK5672xYFpNtiRRuNiY0aURA14BGviBcVlaKltVa6+42/N9v5Mrtt05rwj/PHzjt+8743b+a9N8vYwKgMNlUQyemnMtAkaJajvb3dToQSGp8e6boopkr4VYgEMYwO0vhCTfMVzBcMf8bx086YyODcuM80zTqp9IWat+7evW8sMdIxIqqCLa6oiAaJpuEtcBqcc2HEWMZ0JclgZR/Nchf++ubrzKjJSguXS4tVjXvPjfb3/UAAacGTn/MOMb7QnjNpNqP/bKZ50Ai0tqYmCi0n4zbM+W+lBc7JBOa+QPhDwcTsxJXE2+32edKCL9h8hRDmRzpIOWydAylhrcMfDN+ugBRKSdP3KwPhsFJIPth02FISIYQwYsDYcVfWhy/Bon4JgumffMGmiGTwQ0B/sHml4q2ZFAD3WQIQVhx0IdFw8B189lolN+w8w5PnjPmlhJgtA8/vfn3iye7u3yGzDljDxZEG4097Cp3rSSjBtMHunp6vFR+HHoIxmbgTe1xHKssDHecLNFUjMzbqMs5ZlHF7ute17M84+TMHDzr+OvR9JwKdCms9yRkzJq6bPTsWXh05QOPUN+PUHyPWMPhm6UHd7vaUohWZPSRE8OqxpTyibQa/qcTlbEP0vwF7AWUAT3JM9dy69FfSNza+MU4awNE8iQtXSkJuGL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cYqkInzzeX06C8emO8sKlS7stZQLxVMPes/+O9FVAvEpXob+utY6gZmfrtMjf/RUI+2odhF7wJbq+Gzf3zTj5CAwyaoEwozVoCzN1KKK00z7WUbZx9dIOklsO6CAZpu87i5gpHoJ8gtLh9vZixSO2KckV7qysf5Sc5uq2tjOix3rL0FW3IJuSNV0XM/iDs85LqxvqeKUD8n3LxUobt5WVuLJlS9IM4O9i09VRwWtxLWfpcix+hXjs8mZdjn19YuOiuKRgufzXqOuqQi2r8O+yAk/tl2Q/RMW7ETe8UdX1GJhHDM5qjDHJ5e7bs07qBp7ZsTe9t6/vUXykkLKEdLFbLgLJSUn3rrt1yXEdX/1C23jzVG+5Keg/B5r2wJD9g/NcaUAJq4MvXxxl/TWoATcoGc0Av4eUKnIXZlsvXpLHO0CS2KgOtGQgdeuwqWuUjGbUgrdszLHRXXDLF0oe54AS0kyPnc5Iz/2CmV7EeIzSwcjvsHQPXkUhld/kCP6Xu+DRNjg/SWHh+SnODF+aPeVh9XCydAPEsA4kAqsCzcuiTPiw7+maTj6SwGsVk/9gY9xbUpizR8MNS47aAd0C7s35CG8VdrxYyjl/FcdUgo73nY77X9D/Au9RDMh+aBoVAAAAAElFTkSuQmCC'); - background-size: 26px 26px; + height: 36px; + background-size: 26px 26px; } + .l7-touch .l7-control-layers-toggle { width: 44px; height: 44px; diff --git a/packages/core/src/services/log/LogService.ts b/packages/core/src/services/log/LogService.ts index e648b11c28..e158a702f4 100644 --- a/packages/core/src/services/log/LogService.ts +++ b/packages/core/src/services/log/LogService.ts @@ -1,8 +1,9 @@ import { injectable } from 'inversify'; -import { Log } from 'probe.gl'; +import Probe, { Log } from 'probe.gl'; import { ILogService } from './ILogService'; -const Logger = new Log({ id: 'L7' }).enable(true); +const Logger = new Log({ id: 'L7' }).enable(false); + // // 只输出 debug 级别以上的日志信息 Logger.priority = 5; diff --git a/packages/core/src/shaders/projection.glsl b/packages/core/src/shaders/projection.glsl index f42069a71f..05bd91cc54 100644 --- a/packages/core/src/shaders/projection.glsl +++ b/packages/core/src/shaders/projection.glsl @@ -98,21 +98,20 @@ vec4 project_position(vec4 position) { // TODO: 瓦片坐标系 & 常规世界坐标系 } - vec2 project_pixel_size_to_clipspace(vec2 pixels) { vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0; return offset * u_FocalDistance; } float project_pixel(float pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { + if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)); } return pixel; } vec2 project_pixel(vec2 pixel) { - if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) { + if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) { // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1 return pixel * pow(2.0, (19.0 - u_Zoom)); } diff --git a/packages/layers/src/core/BaseLayer.ts b/packages/layers/src/core/BaseLayer.ts index f4f66dd808..b856a4fdbd 100644 --- a/packages/layers/src/core/BaseLayer.ts +++ b/packages/layers/src/core/BaseLayer.ts @@ -551,13 +551,13 @@ export default class BaseLayer extends EventEmitter blend: type, }); this.layerModelNeedUpdate = true; - this.render(); + this.reRender(); } public show(): ILayer { this.updateLayerConfig({ visible: true, }); - + this.reRender(); return this; } @@ -565,9 +565,9 @@ export default class BaseLayer extends EventEmitter this.updateLayerConfig({ visible: false, }); + this.reRender(); return this; } - public setIndex(index: number): ILayer { this.zIndex = index; this.layerService.updateRenderOrder(); @@ -777,6 +777,11 @@ export default class BaseLayer extends EventEmitter protected getDefaultConfig() { return {}; } + private reRender() { + if (this.inited) { + this.layerService.renderLayers(); + } + } private splitValuesAndCallbackInAttribute( valuesOrCallback?: unknown[], defaultValues?: unknown[], diff --git a/packages/layers/src/point/shaders/extrude_vert.glsl b/packages/layers/src/point/shaders/extrude_vert.glsl index 3586c80cda..603215a834 100644 --- a/packages/layers/src/point/shaders/extrude_vert.glsl +++ b/packages/layers/src/point/shaders/extrude_vert.glsl @@ -22,7 +22,7 @@ void main() { vec2 offset = project_pixel(size.xy); - vec4 project_pos = project_position(vec4(a_Pos.xy, 0, 1.0)); + vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0)); vec4 pos = vec4(project_pos.xy + offset, project_pixel(size.z), 1.0); float lightWeight = calc_lighting(pos); diff --git a/packages/layers/src/point/shaders/fill_vert.glsl b/packages/layers/src/point/shaders/fill_vert.glsl index 80cfc15b18..cf0e996ea2 100644 --- a/packages/layers/src/point/shaders/fill_vert.glsl +++ b/packages/layers/src/point/shaders/fill_vert.glsl @@ -27,9 +27,9 @@ void main() { vec2 offset = project_pixel(extrude * (a_Size + u_stroke_width)); vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0)); - // TODO: billboard gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0)); + // TODO: billboard // anti-alias float antialiasblur = 1.0 / (a_Size + u_stroke_width); diff --git a/packages/layers/src/point/shaders/normal_vert.glsl b/packages/layers/src/point/shaders/normal_vert.glsl index 7e77f5fdb4..7f22493694 100644 --- a/packages/layers/src/point/shaders/normal_vert.glsl +++ b/packages/layers/src/point/shaders/normal_vert.glsl @@ -10,7 +10,7 @@ varying vec4 v_color; void main() { v_color = a_Color; - vec4 project_pos = project_position(vec4(a_Position, 1.0)); + vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.); gl_Position = project_common_position_to_clipspace(project_pos); gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio; setPickingColor(a_PickingColor); diff --git a/packages/maps/src/amap/index.ts b/packages/maps/src/amap/index.ts index 3143322762..51db48ee19 100644 --- a/packages/maps/src/amap/index.ts +++ b/packages/maps/src/amap/index.ts @@ -37,7 +37,7 @@ let amapLoaded = false; * 高德地图脚本加载成功等待队列,成功之后依次触发 */ let pendingResolveQueue: Array<() => void> = []; -const LNGLAT_OFFSET_ZOOM_THRESHOLD = 20; // 暂时关闭 fix 统一不同坐标系,不同底图的高度位置 +const LNGLAT_OFFSET_ZOOM_THRESHOLD = 12; // 暂时关闭 fix 统一不同坐标系,不同底图的高度位置 /** * AMapService diff --git a/packages/scene/__tests__/index.spec.ts b/packages/scene/__tests__/index.spec.ts new file mode 100644 index 0000000000..9aad41996a --- /dev/null +++ b/packages/scene/__tests__/index.spec.ts @@ -0,0 +1,11 @@ +// @ts-ignore +describe('template', () => { + const el = document.createElement('div'); + el.id = 'test-div-id'; + el.innerHTML = 'hello L7'; + document.querySelector('body')?.appendChild(el); + + it('div content', () => { + expect(document.querySelector('#test-div-id')?.innerHTML).toBe('hello L7'); + }); +}); diff --git a/stories/Components/components/Marker.tsx b/stories/Components/components/Marker.tsx index 0bad662f5e..48716491ac 100644 --- a/stories/Components/components/Marker.tsx +++ b/stories/Components/components/Marker.tsx @@ -1,6 +1,6 @@ // @ts-ignore -import { Marker, PolygonLayer, Scene } from '@antv/l7'; -import { Mapbox, GaodeMap } from '@antv/l7-maps'; +import { Marker, PointLayer, PolygonLayer, Scene } from '@antv/l7'; +import { GaodeMap, Mapbox } from '@antv/l7-maps'; import * as React from 'react'; export default class MarkerComponent extends React.Component { @@ -19,55 +19,62 @@ export default class MarkerComponent extends React.Component { id: 'map', map: new GaodeMap({ style: 'dark', - center: [110.19382669582967, 30.258134], + center: [120.184824, 30.248341], pitch: 0, - zoom: 3, + zoom: 18, }), }); this.scene = scene; - const layer = new PolygonLayer({}); - layer - .source(data) - .size('name', [0, 10000, 50000, 30000, 100000]) - .active(true) - .color('name', [ - '#2E8AE6', - '#69D1AB', - '#DAF291', - '#FFD591', - '#FF7A45', - '#CF1D49', - ]) - .shape('fill') - .style({ - opacity: 0.8, - }); - scene.addLayer(layer); const marker = new Marker().setLnglat({ - lng: 120.19382669582967, - lat: 30.258134, - }); - marker.on('click', (e) => { - console.log(e); + lng: 120.184824, + lat: 30.248341, }); + const arr = [ + { + lng: 120.184824, + lat: 30.248341, + count: 40, + }, + ]; + const pointLayer = new PointLayer({}) + .source(arr, { + parser: { + type: 'json', + x: 'lng', + y: 'lat', + }, + }) + .shape('dot') + .active(true) + .animate(false) + .size(5) + .color('#ffa842') + .style({ + opacity: 1, + }); + scene.addLayer(pointLayer); scene.addMarker(marker); + scene.on('loaded', () => { // @ts-ignore - const marker1 = new AMap.Marker({ - map: scene.map, - position: [113.800646, 34.796227], - shadow: '#000', - label: { - content: '站点', - direction: 'top', - }, - }); - marker1.on('click', () => { - alert(1111); - console.log('选中的点', 1111); + marker.on('click', (e) => { + console.log(this.scene.getZoom()); }); + // const marker1 = new AMap.Marker({ + // map: scene.map, + // position: [120.184824, 30.248341], + // shadow: '#000', + // label: { + // content: '站点', + // direction: 'top', + // }, + // }); + // marker1.on('click', () => { + // console.log(this.scene.getZoom()); + // console.log('选中的点', 1111); + // }); }); } diff --git a/stories/Layers/components/column.tsx b/stories/Layers/components/column.tsx index 77060db564..07823fca6c 100644 --- a/stories/Layers/components/column.tsx +++ b/stories/Layers/components/column.tsx @@ -43,7 +43,7 @@ export default class Column extends React.Component { 'squareColumn', ]) .size('unit_price', (h) => { - return [6, 6, h / 500]; + return [6, 6, 100]; }) .color('name', ['#739DFF', '#61FCBF', '#FFDE74', '#FF896F']) .style({ diff --git a/yarn.lock b/yarn.lock index ed689b727c..2b6c263f10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3760,6 +3760,11 @@ resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e" integrity sha1-TP2QF1ogDumwK9axzRm8NJdBYH4= +"@types/node@^10.12.18": + version "10.17.13" + resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-10.17.13.tgz?cache=0&sync_timestamp=1578585994687&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" + integrity sha1-zOvNuZC9YTnNFuhMOdwvsQI8qQw= + "@types/node@^12.0.2", "@types/node@^12.12.22": version "12.12.24" resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-12.12.24.tgz#d4606afd8cf6c609036b854360367d1b2c78931f" @@ -7004,7 +7009,7 @@ concat-map@0.0.1: resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@~1.6.0: +concat-stream@1.6.2, concat-stream@^1.5.0, concat-stream@~1.6.0: version "1.6.2" resolved "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconcat-stream%2Fdownload%2Fconcat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ= @@ -8093,7 +8098,7 @@ dateformat@^3.0.0: resolved "https://registry.npm.taobao.org/dateformat/download/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha1-puN0maTZqc+F71hyBE1ikByYia4= -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: +debug@2, debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= @@ -8397,7 +8402,7 @@ detect-indent@^5.0.0: resolved "https://registry.npm.taobao.org/detect-indent/download/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= -detect-libc@^1.0.2, detect-libc@^1.0.3: +detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -8831,11 +8836,35 @@ ejs@^2.6.1: resolved "https://registry.npm.taobao.org/ejs/download/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha1-SGYSh1c9zFPjZsehrlLDoSDuybo= +electron-download@^4.1.0: + version "4.1.1" + resolved "https://registry.npm.taobao.org/electron-download/download/electron-download-4.1.1.tgz#02e69556705cc456e520f9e035556ed5a015ebe8" + integrity sha1-AuaVVnBcxFblIPngNVVu1aAV6+g= + dependencies: + debug "^3.0.0" + env-paths "^1.0.0" + fs-extra "^4.0.1" + minimist "^1.2.0" + nugget "^2.0.1" + path-exists "^3.0.0" + rc "^1.2.1" + semver "^5.4.1" + sumchecker "^2.0.2" + electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.322, electron-to-chromium@^1.3.47: version "1.3.328" resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.328.tgz#a619575c42f1d5b443103664f25ffa5a80190ee5" integrity sha1-phlXXELx1bRDEDZk8l/6WoAZDuU= +electron@^6.0.7: + version "6.1.7" + resolved "https://registry.npm.taobao.org/electron/download/electron-6.1.7.tgz#a67695f81f5cb771e395bcf9711560520e347c54" + integrity sha1-pnaV+B9ct3Hjlbz5cRVgUg40fFQ= + dependencies: + "@types/node" "^10.12.18" + electron-download "^4.1.0" + extract-zip "^1.0.3" + elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/elegant-spinner/download/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" @@ -8992,6 +9021,11 @@ entities@^2.0.0: resolved "https://registry.npm.taobao.org/entities/download/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" integrity sha1-aNYITKsbB5dnVA2A5Wo5tCPkq/Q= +env-paths@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/env-paths/download/env-paths-1.0.0.tgz#4168133b42bb05c38a35b1ae4397c8298ab369e0" + integrity sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA= + env-paths@^2.2.0: version "2.2.0" resolved "https://registry.npm.taobao.org/env-paths/download/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" @@ -9849,6 +9883,16 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-zip@^1.0.3: + version "1.6.7" + resolved "https://registry.npm.taobao.org/extract-zip/download/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" + integrity sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k= + dependencies: + concat-stream "1.6.2" + debug "2.6.9" + mkdirp "0.5.1" + yauzl "2.4.1" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -9965,6 +10009,13 @@ fbjs@^0.8.0, fbjs@^0.8.15, fbjs@^0.8.16, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.18" +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + integrity sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU= + dependencies: + pend "~1.2.0" + fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -10489,7 +10540,7 @@ fs-extra@^3.0.1: jsonfile "^3.0.0" universalify "^0.1.0" -fs-extra@^4.0.0, fs-extra@^4.0.2: +fs-extra@^4.0.0, fs-extra@^4.0.1, fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" integrity sha1-DYUhIuW8W+tFP7Ao6cDJvzY0DJQ= @@ -12530,7 +12581,7 @@ i18next@^19.0.0: dependencies: "@babel/runtime" "^7.3.1" -iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= @@ -13863,6 +13914,22 @@ jest-each@^24.9.0: jest-util "^24.9.0" pretty-format "^24.9.0" +jest-electron@^0.1.11: + version "0.1.11" + resolved "https://registry.npm.taobao.org/jest-electron/download/jest-electron-0.1.11.tgz#18bfa722d64a7133596bfcd2b7c72aa875591331" + integrity sha1-GL+nItZKcTNZa/zSt8cqqHVZEzE= + dependencies: + electron "^6.0.7" + jest-haste-map "~24.9.0" + jest-message-util "~24.9.0" + jest-mock "~24.9.0" + jest-resolve "~24.9.0" + jest-runner "~24.9.0" + jest-runtime "~24.9.0" + jest-util "~24.9.0" + throat "^5.0.0" + tslib "^1.10.0" + jest-environment-jsdom@^24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-environment-jsdom/download/jest-environment-jsdom-24.9.0.tgz?cache=0&sync_timestamp=1566444339152&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-environment-jsdom%2Fdownload%2Fjest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b" @@ -13891,7 +13958,7 @@ jest-get-type@^24.9.0: resolved "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" integrity sha1-FoSgyKUPLkkBtmRK6GH1ee7S7w4= -jest-haste-map@^24.9.0: +jest-haste-map@^24.9.0, jest-haste-map@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-haste-map/download/jest-haste-map-24.9.0.tgz?cache=0&sync_timestamp=1566444279671&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-haste-map%2Fdownload%2Fjest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" integrity sha1-s4pdZCdJNOIfpBeump++t3zqrH0= @@ -13950,7 +14017,7 @@ jest-matcher-utils@^24.9.0: jest-get-type "^24.9.0" pretty-format "^24.9.0" -jest-message-util@^24.9.0: +jest-message-util@^24.9.0, jest-message-util@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-message-util/download/jest-message-util-24.9.0.tgz?cache=0&sync_timestamp=1566444264676&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-message-util%2Fdownload%2Fjest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" integrity sha1-Un9UoeOA9eICqNEUmw7IcvQxGeM= @@ -13964,7 +14031,7 @@ jest-message-util@^24.9.0: slash "^2.0.0" stack-utils "^1.0.1" -jest-mock@^24.9.0: +jest-mock@^24.9.0, jest-mock@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-mock/download/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" integrity sha1-wig1VB7jebkIZzrVEIeiGFwT8cY= @@ -13990,7 +14057,7 @@ jest-resolve-dependencies@^24.9.0: jest-regex-util "^24.3.0" jest-snapshot "^24.9.0" -jest-resolve@^24.9.0: +jest-resolve@^24.9.0, jest-resolve@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-resolve/download/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321" integrity sha1-3/BMdoevNMTdflJIktnPd+XRcyE= @@ -14001,7 +14068,7 @@ jest-resolve@^24.9.0: jest-pnp-resolver "^1.2.1" realpath-native "^1.1.0" -jest-runner@^24.9.0: +jest-runner@^24.9.0, jest-runner@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-runner/download/jest-runner-24.9.0.tgz?cache=0&sync_timestamp=1566444340272&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-runner%2Fdownload%2Fjest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42" integrity sha1-V0+v29VEVcKzS0vfQ2WiOFf830I= @@ -14026,7 +14093,7 @@ jest-runner@^24.9.0: source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^24.9.0: +jest-runtime@^24.9.0, jest-runtime@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-runtime/download/jest-runtime-24.9.0.tgz?cache=0&sync_timestamp=1566444299905&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-runtime%2Fdownload%2Fjest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac" integrity sha1-nxRYOvak9zFKap2fAibhp4HI5Kw= @@ -14086,7 +14153,7 @@ jest-styled-components@^6.2.1: dependencies: css "^2.2.4" -jest-util@^24.9.0: +jest-util@^24.9.0, jest-util@~24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-util/download/jest-util-24.9.0.tgz?cache=0&sync_timestamp=1566444274012&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-util%2Fdownload%2Fjest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" integrity sha1-c5aBTkhTbS6Fo33j5MQx18sUAWI= @@ -15470,7 +15537,7 @@ meow@5.0.0, meow@^5.0.0: trim-newlines "^2.0.0" yargs-parser "^10.0.0" -meow@^3.3.0, meow@^3.7.0: +meow@^3.1.0, meow@^3.3.0, meow@^3.7.0: version "3.7.0" resolved "https://registry.npm.taobao.org/meow/download/meow-3.7.0.tgz?cache=0&sync_timestamp=1575730464003&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmeow%2Fdownload%2Fmeow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= @@ -15734,7 +15801,7 @@ minimist@1.1.x: resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" integrity sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag= -minimist@1.2.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: version "1.2.0" resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= @@ -16048,15 +16115,6 @@ nearley@^2.7.10: randexp "0.4.6" semver "^5.4.1" -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.npm.taobao.org/needle/download/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha1-aDPnSXXERGQlkOFadQKIxfk5tXw= - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -16259,22 +16317,6 @@ node-object-hash@^2.0.0: resolved "https://registry.npm.taobao.org/node-object-hash/download/node-object-hash-2.0.0.tgz#9971fcdb7d254f05016bd9ccf508352bee11116b" integrity sha1-mXH8230lTwUBa9nM9Qg1K+4REWs= -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha1-mgWWUzuHcom8rU4UOYLKPZBN3IM= - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.29, node-releases@^1.1.44: version "1.1.44" resolved "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.44.tgz?cache=0&sync_timestamp=1577230945218&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-releases%2Fdownload%2Fnode-releases-1.1.44.tgz#cd66438a6eb875e3eb012b6a12e48d9f4326ffd7" @@ -16460,7 +16502,7 @@ npm-package-arg@^5.1.2: semver "^5.1.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.6, npm-packlist@^1.4.4: +npm-packlist@^1.4.4: version "1.4.7" resolved "https://registry.npm.taobao.org/npm-packlist/download/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" integrity sha1-npVDZaBrgLGBEeqQCUWvT4jtSEg= @@ -16521,7 +16563,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha1-CKfyqL9zRgR3mp76StXMcXq7lUs= @@ -16543,6 +16585,19 @@ nth-check@^1.0.1, nth-check@^1.0.2, nth-check@~1.0.1: dependencies: boolbase "~1.0.0" +nugget@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/nugget/download/nugget-2.0.1.tgz#201095a487e1ad36081b3432fa3cada4f8d071b0" + integrity sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA= + dependencies: + debug "^2.1.3" + minimist "^1.1.0" + pretty-bytes "^1.0.2" + progress-stream "^1.1.0" + request "^2.45.0" + single-line-log "^1.1.2" + throttleit "0.0.2" + null-loader@^0.1.1: version "0.1.1" resolved "https://registry.npm.taobao.org/null-loader/download/null-loader-0.1.1.tgz#17be9abfcd3ff0e1512f6fc4afcb1f5039378fae" @@ -16612,6 +16667,11 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.0, object-keys@^1.1.1 resolved "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha1-HEfyct8nfzsdrwYWd9nILiMixg4= +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.npm.taobao.org/object-keys/download/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + object-path@^0.11.2, object-path@^0.11.4: version "0.11.4" resolved "https://registry.npm.taobao.org/object-path/download/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949" @@ -18228,6 +18288,14 @@ prettier@^1.18.2, prettier@^1.19.1: resolved "https://registry.npm.taobao.org/prettier/download/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha1-99f1/4qc2HKnvkyhQglZVqYHl8s= +pretty-bytes@^1.0.2: + version "1.0.4" + resolved "https://registry.npm.taobao.org/pretty-bytes/download/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84" + integrity sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ= + dependencies: + get-stdin "^4.0.1" + meow "^3.1.0" + pretty-bytes@^5.1.0, pretty-bytes@^5.3.0: version "5.3.0" resolved "https://registry.npm.taobao.org/pretty-bytes/download/pretty-bytes-5.3.0.tgz#f2849e27db79fb4d6cfe24764fc4134f165989f2" @@ -18327,6 +18395,14 @@ process@~0.5.1: resolved "https://registry.npm.taobao.org/process/download/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= +progress-stream@^1.1.0: + version "1.2.0" + resolved "https://registry.npm.taobao.org/progress-stream/download/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77" + integrity sha1-LNPP6jO6OonJwSHsM0er6asSX3c= + dependencies: + speedometer "~0.1.2" + through2 "~0.2.3" + progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -19141,7 +19217,7 @@ rc-util@^4.0.4, rc-util@^4.1.1, rc-util@^4.13.0, rc-util@^4.15.3, rc-util@^4.15. react-lifecycles-compat "^3.0.4" shallowequal "^1.1.0" -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: +rc@^1.0.1, rc@^1.1.6, rc@^1.2.1, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0= @@ -19639,6 +19715,16 @@ read@1, read@^1.0.7, read@~1.0.1: isarray "0.0.1" string_decoder "~0.10.x" +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.npm.taobao.org/readdir-scoped-modules/download/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" @@ -20147,7 +20233,7 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.83.0, request@^2.87.0, request@^2.88.0: +request@^2.45.0, request@^2.83.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.npm.taobao.org/request/download/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha1-nC/KT301tZLv5Xx/ClXoEFIST+8= @@ -21070,6 +21156,13 @@ simplebar@^4.2.3: lodash.throttle "^4.1.1" resize-observer-polyfill "^1.5.1" +single-line-log@^1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/single-line-log/download/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364" + integrity sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q= + dependencies: + string-width "^1.0.1" + sisteransi@^1.0.3: version "1.0.4" resolved "https://registry.npm.taobao.org/sisteransi/download/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" @@ -21450,6 +21543,11 @@ specificity@^0.4.1: resolved "https://registry.npm.taobao.org/specificity/download/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019" integrity sha1-qrXmRQEtsIuhguFRFlc40AiHsBk= +speedometer@~0.1.2: + version "0.1.4" + resolved "https://registry.npm.taobao.org/speedometer/download/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d" + integrity sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0= + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -22117,6 +22215,13 @@ sugarss@^2.0.0: dependencies: postcss "^7.0.2" +sumchecker@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/sumchecker/download/sumchecker-2.0.2.tgz#0f42c10e5d05da5d42eea3e56c3399a37d6c5b3e" + integrity sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4= + dependencies: + debug "^2.2.0" + supercluster@^6.0.2: version "6.0.2" resolved "https://registry.npm.taobao.org/supercluster/download/supercluster-6.0.2.tgz#aa2eaae185ef97872f388c683ec29f6991721ee3" @@ -22322,7 +22427,7 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" -tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8: +tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.npm.taobao.org/tar/download/tar-4.4.13.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar%2Fdownload%2Ftar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha1-Q7NkvFKIjVVSmGN7ENYHkCVKtSU= @@ -22466,11 +22571,21 @@ throat@^4.0.0: resolved "https://registry.npm.taobao.org/throat/download/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= +throat@^5.0.0: + version "5.0.0" + resolved "https://registry.npm.taobao.org/throat/download/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" + integrity sha1-xRmSNYA6rRh1SmZ9ZZtecs4Wdks= + throttle-debounce@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-2.1.0.tgz#257e648f0a56bd9e54fe0f132c4ab8611df4e1d5" integrity sha1-JX5kjwpWvZ5U/g8TLEq4YR304dU= +throttleit@0.0.2: + version "0.0.2" + resolved "https://registry.npm.taobao.org/throttleit/download/throttleit-0.0.2.tgz#cfedf88e60c00dd9697b61fdd2a8343a9b680eaf" + integrity sha1-z+34jmDADdlpe2H90qg0OptoDq8= + through2@^0.6.3: version "0.6.5" resolved "https://registry.npm.taobao.org/through2/download/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -22494,6 +22609,14 @@ through2@^3.0.0: dependencies: readable-stream "2 || 3" +through2@~0.2.3: + version "0.2.3" + resolved "https://registry.npm.taobao.org/through2/download/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f" + integrity sha1-6zKE2k6jEbbMis42U3SKUqvyWj8= + dependencies: + readable-stream "~1.1.9" + xtend "~2.1.1" + through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -24329,6 +24452,13 @@ xstate@^4.7.2: resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q= +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.npm.taobao.org/xtend/download/xtend-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxtend%2Fdownload%2Fxtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + xxhashjs@^0.2.1: version "0.2.2" resolved "https://registry.npm.taobao.org/xxhashjs/download/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" @@ -24510,6 +24640,13 @@ yargs@~3.10.0: decamelize "^1.0.0" window-size "0.1.0" +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.npm.taobao.org/yauzl/download/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + integrity sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU= + dependencies: + fd-slicer "~1.0.1" + yauzl@^2.4.2: version "2.10.0" resolved "https://registry.npm.taobao.org/yauzl/download/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"