minidev 2.2.1 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Command } from 'commander';
4
4
  declare module 'minidev' {
5
5
 
6
6
  export type DeepPartial<T> = {
7
- [P in keyof T]?:T[P] extends Record<any, any> ? DeepPartial<T[P]> : T[P];
7
+ [P in keyof T]?: T[P] extends Record<any, any> ? DeepPartial<T[P]> : T[P];
8
8
  };
9
9
 
10
10
 
@@ -45,7 +45,7 @@ declare module 'minidev' {
45
45
 
46
46
  name: string,
47
47
 
48
- contribute(registry: IMinidevPluginRegistry, injector: { get: (token: any) => any}): void;
48
+ contribute(registry: IMinidevPluginRegistry, injector: { get: (token: any) => any }): void;
49
49
 
50
50
  }
51
51
 
@@ -114,7 +114,7 @@ declare module 'minidev' {
114
114
  devPreview(opts: IDevPreviewArgs, build?: IDevServerCompileBuild): Promise<IGenerateDebugQRCodeResult>;
115
115
 
116
116
 
117
- devWebSimulator(opts:IDevWebSimulatorArgs, build?: IDevServerCompileBuild): Promise<IWebSimulatorLauncher>
117
+ devWebSimulator(opts: IDevWebSimulatorArgs, build?: IDevServerCompileBuild): Promise<IWebSimulatorLauncher>
118
118
 
119
119
 
120
120
  /**
@@ -202,7 +202,7 @@ declare module 'minidev' {
202
202
 
203
203
  }
204
204
 
205
- export interface IRemoteDebugReturn extends IGenerateDebugQRCodeResult{
205
+ export interface IRemoteDebugReturn extends IGenerateDebugQRCodeResult {
206
206
  /**
207
207
  * 调试地址
208
208
  */
@@ -216,7 +216,7 @@ declare module 'minidev' {
216
216
 
217
217
  export interface IPublishHooks {
218
218
 
219
- onLog?:(data: string) => void;
219
+ onLog?: (data: string) => void;
220
220
 
221
221
  onTaskCreated?: (taskId: string) => void;
222
222
 
@@ -303,7 +303,7 @@ declare module 'minidev' {
303
303
  * @param options
304
304
  * @return qrCodeUrl 体验版二维码
305
305
  */
306
- setExperience(options: IAppIdAndVersionOptions): Promise<{qrCodeUrl: string}>;
306
+ setExperience(options: IAppIdAndVersionOptions): Promise<{ qrCodeUrl: string }>;
307
307
 
308
308
 
309
309
  }
@@ -389,9 +389,9 @@ declare module 'minidev' {
389
389
  */
390
390
  autoPush?: boolean;
391
391
 
392
- /**
393
- * 自定义启动参数
394
- */
392
+ /**
393
+ * 自定义启动参数
394
+ */
395
395
  launchParams?: any;
396
396
 
397
397
  }
@@ -401,27 +401,27 @@ declare module 'minidev' {
401
401
  /**
402
402
  * 入口页面
403
403
  */
404
- page?: string;
404
+ page?: string;
405
405
 
406
- /**
407
- * 页面参数, 可在当前页面的 onLoad 中取得,如: name=vendor&color=black
408
- */
409
- pageQuery?: string;
406
+ /**
407
+ * 页面参数, 可在当前页面的 onLoad 中取得,如: name=vendor&color=black
408
+ */
409
+ pageQuery?: string;
410
410
 
411
- /**
412
- * 全局参数,app.js 的 onLaunch 中取得,如: name=vendor&color=black
413
- */
414
- query?: string;
411
+ /**
412
+ * 全局参数,app.js 的 onLaunch 中取得,如: name=vendor&color=black
413
+ */
414
+ query?: string;
415
415
 
416
- /**
417
- * 场景值
418
- */
419
- scene?: string;
416
+ /**
417
+ * 场景值
418
+ */
419
+ scene?: string;
420
420
 
421
- /**
422
- * 模拟更新
423
- */
424
- simulateUpdate?: boolean;
421
+ /**
422
+ * 模拟更新
423
+ */
424
+ simulateUpdate?: boolean;
425
425
 
426
426
  }
427
427
 
@@ -672,7 +672,7 @@ declare module 'minidev' {
672
672
  once(event: 'project-config-change', listener: () => any): this;
673
673
  once(event: 'log', listener: (data: string) => any): this;
674
674
 
675
- restart(options?: {appId?: string}): Promise<void>;
675
+ restart(options?: { appId?: string }): Promise<void>;
676
676
 
677
677
  stop(): Promise<void>;
678
678
 
@@ -811,15 +811,15 @@ declare module 'minidev' {
811
811
  export type TBuildPackResult = INormalBuildPackResult | ISubPackBuildPackResult | IPluginBuildPackResult;
812
812
 
813
813
  export interface IPluginBuildPackResult {
814
- compileType: ECompileType.Plugin;
815
- enableSubPack: false;
816
- client: Omit<INormalBuildPackResult, 'compileType' | 'enableSubPack' | 'extendInfo'>;
817
- plugin: Omit<INormalBuildPackResult, 'compileType' | 'enableSubPack' | 'extendInfo'>;
818
- components?: string[];
819
- /**
820
- * 额外的启动参数
821
- */
822
- extraLaunchParams?: Record<string, unknown>;
814
+ compileType: ECompileType.Plugin;
815
+ enableSubPack: false;
816
+ client: Omit<INormalBuildPackResult, 'compileType' | 'enableSubPack' | 'extendInfo'>;
817
+ plugin: Omit<INormalBuildPackResult, 'compileType' | 'enableSubPack' | 'extendInfo'>;
818
+ components?: string[];
819
+ /**
820
+ * 额外的启动参数
821
+ */
822
+ extraLaunchParams?: Record<string, unknown>;
823
823
  }
824
824
 
825
825
  export enum ECompileType {
@@ -828,51 +828,51 @@ declare module 'minidev' {
828
828
  }
829
829
 
830
830
  export interface INormalBuildPackResult {
831
- compileType: ECompileType.MiniProgram;
832
- enableSubPack: false;
833
- tarFilePath: string;
834
- size: number;
835
- outPath?: string;
836
- components?: string[];
837
- gzipFilePath?: string;
838
- sourceMapZipFile?: string;
839
- /**
840
- * 额外的启动参数
841
- */
842
- extraLaunchParams?: Record<string, unknown>;
843
- webpackStatPath?: string;
844
- statPath?: string;
831
+ compileType: ECompileType.MiniProgram;
832
+ enableSubPack: false;
833
+ tarFilePath: string;
834
+ size: number;
835
+ outPath?: string;
836
+ components?: string[];
837
+ gzipFilePath?: string;
838
+ sourceMapZipFile?: string;
839
+ /**
840
+ * 额外的启动参数
841
+ */
842
+ extraLaunchParams?: Record<string, unknown>;
843
+ webpackStatPath?: string;
844
+ statPath?: string;
845
845
  }
846
846
 
847
847
  export interface ISubPackBuildPackResult {
848
- compileType: ECompileType.MiniProgram;
849
- enableSubPack: true;
850
- tarFilePath: string;
851
- size: number;
852
- subPackages: ISubPackageResult[];
853
- outPath?: string;
854
- components?: string[];
855
- gzipFilePath?: string;
856
- sourceMapZipFile?: string;
857
- subPackSourceMapZipFile?: string;
858
- /**
859
- * 额外的启动参数
860
- */
861
- extraLaunchParams?: Record<string, unknown>;
862
- webpackStatPath?: string;
863
- statPath?: string;
864
- webpackChunkStatPath?: string;
865
- chunkStatPath?: string;
848
+ compileType: ECompileType.MiniProgram;
849
+ enableSubPack: true;
850
+ tarFilePath: string;
851
+ size: number;
852
+ subPackages: ISubPackageResult[];
853
+ outPath?: string;
854
+ components?: string[];
855
+ gzipFilePath?: string;
856
+ sourceMapZipFile?: string;
857
+ subPackSourceMapZipFile?: string;
858
+ /**
859
+ * 额外的启动参数
860
+ */
861
+ extraLaunchParams?: Record<string, unknown>;
862
+ webpackStatPath?: string;
863
+ statPath?: string;
864
+ webpackChunkStatPath?: string;
865
+ chunkStatPath?: string;
866
866
  }
867
867
 
868
868
  export interface ISubPackageResult {
869
- type: 'MAIN' | 'SUB';
870
- path: string;
871
- size: number;
872
- tarFilePath: string;
873
- gzipFilePath?: string;
874
- statPath?: string;
875
- webpackStatPath?: string;
869
+ type: 'MAIN' | 'SUB';
870
+ path: string;
871
+ size: number;
872
+ tarFilePath: string;
873
+ gzipFilePath?: string;
874
+ statPath?: string;
875
+ webpackStatPath?: string;
876
876
  }
877
877
 
878
878
  export interface IRemoteDebugArgs extends IBuildArgs, IGenerateQrCodeArgs, IAuthPathOptions {