Merge pull request #738 from antvis/fix_vite_meta

Fix vite meta
This commit is contained in:
@thinkinggis 2021-08-04 22:37:15 +08:00 committed by GitHub
commit 550acb10bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 54 additions and 63 deletions

View File

@ -30,6 +30,7 @@
"@babel/runtime": "^7.7.7",
"eventemitter3": "^4.0.0",
"inversify": "^5.0.1",
"reflect-metadata": "^0.1.13",
"load-styles": "^2.0.0"
},
"gitHead": "7eb8382ede52d803fae13a85fe6af074400260ee",

View File

@ -35,7 +35,6 @@
"inversify": "^5.0.1",
"inversify-inject-decorators": "^3.1.0",
"lodash": "^4.17.15",
"merge-json-schemas": "^1.0.0",
"probe.gl": "^3.1.1",
"reflect-metadata": "^0.1.13",
"viewport-mercator-project": "^6.2.1"

View File

@ -2,6 +2,7 @@ import { LRUCache } from '@antv/l7-utils';
// @ts-ignore
import TinySDF from '@mapbox/tiny-sdf';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { buildMapping } from '../../utils/font_util';
import {
IFontAtlas,

View File

@ -2,6 +2,7 @@
import TinySDF from '@mapbox/tiny-sdf';
import { EventEmitter } from 'eventemitter3';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { buildIconMaping } from '../../utils/font_util';
import { ITexture2D } from '../renderer/ITexture2D';

View File

@ -1,5 +1,6 @@
import { mat4 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { ICameraService, IViewport } from './ICameraService';
@injectable()

View File

@ -1,5 +1,6 @@
import { DOM } from '@antv/l7-utils';
import { Container, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { IMapService } from '../map/IMapService';
import {

View File

@ -1,4 +1,5 @@
import { Container, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { IMapService } from '../map/IMapService';
import {

View File

@ -1,4 +1,5 @@
import { Container, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { IMapService } from '../map/IMapService';
import { IPopup, IPopupService } from './IPopupService';

View File

@ -1,6 +1,7 @@
// import Ajv from 'ajv';
import { injectable, postConstruct } from 'inversify';
import { merge } from 'lodash';
import 'reflect-metadata';
import { ILayerConfig } from '../layer/ILayerService';
import { IRenderConfig } from '../renderer/IRendererService';
import { IGlobalConfigService, ISceneConfig } from './IConfigService';

View File

@ -1,5 +1,6 @@
import { mat4, vec4 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { getDistanceScales } from '../../utils/project';
import { ICameraService } from '../camera/ICameraService';

View File

@ -1,6 +1,7 @@
import EventEmitter from 'eventemitter3';
import Hammer from 'hammerjs';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
// @ts-ignore
import { TYPES } from '../../types';
import { ILogService } from '../log/ILogService';

View File

@ -1,5 +1,6 @@
import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { IGlobalConfigService, ISceneConfig } from '../config/IConfigService';
import {

View File

@ -197,10 +197,7 @@ export interface ILayer {
off(type: string, handler: (...args: any[]) => void): void;
emit(type: string, handler: unknown): void;
once(type: string, handler: (...args: any[]) => void): void;
/**
* JSON Schema
*/
getConfigSchemaForValidation(): object;
isDirty(): boolean;
/**
* 使

View File

@ -1,4 +1,5 @@
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { ILayer } from '../..';
import { TYPES } from '../../types';
import Clock from '../../utils/clock';

View File

@ -1,4 +1,5 @@
import { inject, injectable, optional } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { gl } from '../renderer/gl';
import { IAttribute } from '../renderer/IAttribute';

View File

@ -1,4 +1,5 @@
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../../types';
import { ICameraService } from '../../camera/ICameraService';
import { IInteractionService } from '../../interaction/IInteractionService';

View File

@ -1,5 +1,6 @@
import { inject, injectable } from 'inversify';
import { camelCase, isNil, upperFirst } from 'lodash';
import 'reflect-metadata';
import { IShaderModuleService } from '../../shader/IShaderModuleService';
import { gl } from '../gl';
import { IModel } from '../IModel';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import { ILayer } from '../../layer/ILayerService';
import BaseNormalPass from './BaseNormalPass';

View File

@ -1,4 +1,5 @@
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../../types';
import { ILayer } from '../../layer/ILayerService';
import {

View File

@ -1,5 +1,6 @@
import { decodePickingColor, DOM, encodePickingColor } from '@antv/l7-utils';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../../types';
import {
IInteractionTarget,

View File

@ -1,4 +1,5 @@
import { inject, injectable, postConstruct } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../../types';
import { ILayer } from '../../layer/ILayerService';
import { gl } from '../gl';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import { ILayer } from '../../layer/ILayerService';
import { PassType } from '../IMultiPassRenderer';
import BaseNormalPass from './BaseNormalPass';

View File

@ -1,4 +1,5 @@
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import blendFS from '../../../shaders/post-processing/blend.glsl';
import copyFS from '../../../shaders/post-processing/copy.glsl';
import quadVS from '../../../shaders/post-processing/quad.glsl';

View File

@ -1,5 +1,6 @@
import { injectable } from 'inversify';
import { isNil } from 'lodash';
import 'reflect-metadata';
import blur from '../../../../shaders/post-processing/blur.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import { IUniform } from '../../IUniform';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import colorHalftone from '../../../../shaders/post-processing/colorhalftone.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import copy from '../../../../shaders/post-processing/copy.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import hexagonalPixelate from '../../../../shaders/post-processing/hexagonalpixelate.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import ink from '../../../../shaders/post-processing/ink.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import noise from '../../../../shaders/post-processing/noise.glsl';
import quad from '../../../../shaders/post-processing/quad.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -1,4 +1,5 @@
import { injectable } from 'inversify';
import 'reflect-metadata';
import quad from '../../../../shaders/post-processing/quad.glsl';
import sepia from '../../../../shaders/post-processing/sepia.glsl';
import BasePostProcessingPass from '../BasePostProcessingPass';

View File

@ -4,6 +4,7 @@ import { DOM } from '@antv/l7-utils';
import elementResizeEvent, { unbind } from 'element-resize-event';
import { EventEmitter } from 'eventemitter3';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { TYPES } from '../../types';
import { createRendererContainer } from '../../utils/dom';
import { IFontService } from '../asset/IFontService';

View File

@ -1,5 +1,6 @@
import { inject, injectable } from 'inversify';
import { uniq } from 'lodash';
import 'reflect-metadata';
import { extractUniforms } from '../../utils/shader-module';
import { IModuleParams, IShaderModuleService } from './IShaderModuleService';

View File

@ -48,8 +48,6 @@ import { encodePickingColor } from '@antv/l7-utils';
import { EventEmitter } from 'eventemitter3';
import { Container } from 'inversify';
import { isFunction, isObject } from 'lodash';
// @ts-ignore
import mergeJsonSchemas from 'merge-json-schemas';
import { normalizePasses } from '../plugins/MultiPassRendererPlugin';
import { BlendTypes } from '../utils/blend';
import { handleStyleDataMapping } from '../utils/dataMappingStyle';
@ -807,18 +805,6 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
public getEncodedData() {
return this.encodedData;
}
public getConfigSchemaForValidation() {
if (!this.configSchema) {
// 相比 allOf, merge 有一些优势
// @see https://github.com/goodeggs/merge-json-schemas
this.configSchema = mergeJsonSchemas([
baseLayerSchema,
this.getConfigSchema(),
]);
}
return this.configSchema;
}
public getLegendItems(name: string): any {
const scale = this.styleAttributeService.getLayerAttributeScale(name);
if (scale) {

View File

@ -10,6 +10,7 @@ import {
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
import { mat4 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import BaseModel from '../../core/BaseModel';
import { HeatmapTriangulation } from '../../core/triangulation';
import heatmap3DFrag from '../shaders/heatmap_3d_frag.glsl';

View File

@ -1,43 +0,0 @@
// import {
// IGlobalConfigService,
// ILayer,
// ILayerPlugin,
// ILogService,
// TYPES,
// } from '@antv/l7-core';
// import { inject, injectable } from 'inversify';
// /**
// * Layer 初始化阶段以及重绘阶段首先校验传入参数,如果校验失败则中断后续插件处理。
// */
// @injectable()
// export default class ConfigSchemaValidationPlugin implements ILayerPlugin {
// @inject(TYPES.IGlobalConfigService)
// private readonly configService: IGlobalConfigService;
// @inject(TYPES.ILogService)
// private readonly logger: ILogService;
// public apply(layer: ILayer) {
// layer.hooks.init.tap('ConfigSchemaValidationPlugin', () => {
// this.configService.registerLayerConfigSchemaValidator(
// layer.name as string,
// layer.getConfigSchemaForValidation(),
// );
// const { valid, errorText } = this.configService.validateLayerConfig(
// layer.name as string,
// layer.getLayerConfig(),
// );
// if (!valid) {
// this.logger.error(errorText || '');
// // 中断 init 过程
// return false;
// }
// });
// layer.hooks.beforeRender.tap('ConfigSchemaValidationPlugin', () => {
// // TODO: 配置项发生变化,需要重新校验
// });
// }
// }

View File

@ -15,6 +15,7 @@ import {
import { rgb2arr, unProjectFlat } from '@antv/l7-utils';
import { inject, injectable } from 'inversify';
import { cloneDeep } from 'lodash';
import 'reflect-metadata';
@injectable()
export default class DataMappingPlugin implements ILayerPlugin {

View File

@ -8,6 +8,7 @@ import {
import Source from '@antv/l7-source';
import { injectable } from 'inversify';
import { cloneDeep } from 'lodash';
import 'reflect-metadata';
@injectable()
export default class DataSourcePlugin implements ILayerPlugin {

View File

@ -18,6 +18,7 @@ import { extent, ticks } from 'd3-array';
import * as d3 from 'd3-scale';
import { inject, injectable } from 'inversify';
import { isNil, isString, uniq } from 'lodash';
import 'reflect-metadata';
const dateRegex = /^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;

View File

@ -10,6 +10,7 @@ import {
TYPES,
} from '@antv/l7-core';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
@injectable()
export default class LayerAnimateStylePlugin implements ILayerPlugin {

View File

@ -1,5 +1,6 @@
import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
import { injectable } from 'inversify';
import 'reflect-metadata';
/**
* Layer Model
*/

View File

@ -2,6 +2,7 @@ import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
import Source from '@antv/l7-source';
import { encodePickingColor, rgb2arr } from '@antv/l7-utils';
import { injectable } from 'inversify';
import 'reflect-metadata';
/**
*
*/

View File

@ -9,6 +9,7 @@ import {
TYPES,
} from '@antv/l7-core';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
const lightTypeUniformMap = {
directional: {

View File

@ -8,6 +8,7 @@ import {
TYPES,
} from '@antv/l7-core';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
/**
* 'blurH' -> ['blurH', {}]

View File

@ -13,6 +13,7 @@ import {
rgb2arr,
} from '@antv/l7-utils';
import { injectable } from 'inversify';
import 'reflect-metadata';
const PickingStage = {
NONE: 0.0,

View File

@ -9,7 +9,7 @@ import {
TYPES,
} from '@antv/l7-core';
import { inject, injectable } from 'inversify';
import { isNumber } from 'lodash';
import 'reflect-metadata';
/**
* Layer indices attribute

View File

@ -11,6 +11,7 @@ import {
} from '@antv/l7-core';
import { DOM } from '@antv/l7-utils';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
/**
* Shader Uniform

View File

@ -1,5 +1,6 @@
import { ILayer, ILayerPlugin, IMapService, TYPES } from '@antv/l7-core';
import { injectable } from 'inversify';
import 'reflect-metadata';
/**
* Model
*/

View File

@ -6,6 +6,7 @@ import {
TYPES,
} from '@antv/l7-core';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
/**
* Layer indices attribute

View File

@ -35,6 +35,7 @@
"@types/mapbox-gl": "^1.11.2",
"gl-matrix": "^3.1.0",
"inversify": "^5.0.1",
"reflect-metadata": "^0.1.13",
"load-styles": "^2.0.0",
"mapbox-gl": "^1.2.1",
"viewport-mercator-project": "^6.2.1"

View File

@ -23,6 +23,7 @@ import {
import { DOM } from '@antv/l7-utils';
import { mat4, vec2, vec3 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { IAMapEvent, IAMapInstance } from '../../typings/index';
import { toPaddingOptions } from '../utils';
import { Version } from '../version';

View File

@ -24,6 +24,7 @@ import {
import { DOM } from '@antv/l7-utils';
import { mat4, vec2, vec3 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { IAMapEvent, IAMapInstance } from '../../typings/index';
import { toPaddingOptions } from '../utils';
import { Version } from '../version';

View File

@ -22,6 +22,7 @@ import { Map } from '@antv/l7-map';
import { DOM } from '@antv/l7-utils';
import { mat4, vec2, vec3 } from 'gl-matrix';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import { Version } from '../version';
import Viewport from './Viewport';
const EventMap: {

View File

@ -24,6 +24,7 @@ import { inject, injectable } from 'inversify';
import mapboxgl, { IControl, Map } from 'mapbox-gl';
// tslint:disable-next-line:no-submodule-imports
import 'mapbox-gl/dist/mapbox-gl.css';
import 'reflect-metadata';
import { IMapboxInstance } from '../../typings/index';
import { Version } from '../version';
import Viewport from './Viewport';

View File

@ -22,6 +22,7 @@ import {
ITexture2DInitializationOptions,
} from '@antv/l7-core';
import { injectable } from 'inversify';
import 'reflect-metadata';
import regl from 'regl';
import ReglAttribute from './ReglAttribute';
import ReglBuffer from './ReglBuffer';

View File

@ -37,6 +37,7 @@
"d3-hexbin": "^0.2.2",
"eventemitter3": "^4.0.0",
"inversify": "^5.0.1",
"reflect-metadata": "^0.1.13",
"lodash": "^4.17.15",
"supercluster": "^7.0.0"
},

View File

@ -48,6 +48,7 @@
"@babel/runtime": "^7.7.7",
"inversify": "^5.0.1",
"rollup": "^2.3.3",
"reflect-metadata": "^0.1.13",
"rollup-plugin-less": "^1.1.2"
},
"devDependencies": {

View File

@ -1,5 +1,6 @@
import { IMapService, IMercator, IRendererService, TYPES } from '@antv/l7';
import { inject, injectable } from 'inversify';
import 'reflect-metadata';
import {
AnimationMixer,