halo-fe 1.0.6 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +2209 -1813
- package/dist/{vendor-underscore-DVTek3G4.js → vendor-underscore-B0BCaBxV.js} +58 -58
- package/esm/coms/RichText.vue.d.ts +1 -1
- package/esm/coms/Timer.vue.d.ts +20 -0
- package/esm/coms/index.d.ts +4 -1
- package/esm/coms/tables/Table.vue.d.ts +2 -0
- package/esm/coms/tables/index.d.ts +1 -0
- package/esm/coms/tabs/Tab.vue.d.ts +12 -0
- package/esm/coms/tabs/TabPane.vue.d.ts +2 -0
- package/esm/coms/tabs/index.d.ts +2 -0
- package/esm/coms/tabs/types/TabProps.d.ts +7 -0
- package/esm/coms/tabs/types/index.d.ts +2 -0
- package/esm/drivers/IDisposable.d.ts +10 -0
- package/esm/drivers/bridges/IBridge.d.ts +1 -5
- package/esm/drivers/builders/Builder.d.ts +8 -0
- package/esm/drivers/builders/BuilderFactory.d.ts +9 -0
- package/esm/drivers/builders/IBuilder.d.ts +7 -0
- package/esm/drivers/builders/implement/JsonBuilder.d.ts +5 -0
- package/esm/drivers/builders/implement/MongoBuilder.d.ts +5 -0
- package/esm/drivers/builders/implement/MySqlBuilder.d.ts +5 -0
- package/esm/drivers/builders/implement/SqlBuilder.d.ts +5 -0
- package/esm/drivers/builders/index.d.ts +2 -0
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/ICdn.d.ts +2 -1
- package/esm/drivers/cdns/implements/BootCdn.d.ts +2 -2
- package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +2 -2
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +1 -2
- package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +2 -2
- package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +2 -2
- package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
- package/esm/drivers/encoders/index.d.ts +2 -2
- package/esm/drivers/excels/Excel.d.ts +10 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/excels/IExcel.d.ts +2 -9
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +4 -4
- package/esm/drivers/excels/index.d.ts +2 -2
- package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -1
- package/esm/drivers/explainers/IExplainer.d.ts +1 -1
- package/esm/drivers/explainers/implement/JsonExplainer.d.ts +3 -0
- package/esm/drivers/factories/Factories.d.ts +55 -0
- package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
- package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
- package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
- package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/index.d.ts +11 -0
- package/esm/drivers/factories/index.d.ts +5 -26
- package/esm/drivers/features/FeatureFactory.d.ts +1 -1
- package/esm/drivers/features/IFeature.d.ts +1 -1
- package/esm/drivers/features/index.d.ts +2 -2
- package/esm/drivers/hashers/HasherFactory.d.ts +1 -1
- package/esm/drivers/hashers/IHasher.d.ts +0 -1
- package/esm/drivers/hashers/index.d.ts +2 -2
- package/esm/drivers/https/HttpFactory.d.ts +6 -1
- package/esm/drivers/https/IHttp.d.ts +2 -6
- package/esm/drivers/https/index.d.ts +2 -2
- package/esm/drivers/index.d.ts +3 -1
- package/esm/drivers/providers/IProvider.d.ts +5 -1
- package/esm/drivers/providers/Provider.d.ts +9 -9
- package/esm/drivers/providers/ProviderFactory.d.ts +5 -1
- package/esm/drivers/providers/implements/CookieProvider.d.ts +15 -1
- package/esm/drivers/providers/implements/StorageProvider.d.ts +29 -0
- package/esm/drivers/providers/index.d.ts +2 -2
- package/esm/drivers/signers/ISigner.d.ts +1 -1
- package/esm/drivers/signers/SignerFactory.d.ts +1 -1
- package/esm/drivers/signers/index.d.ts +2 -2
- package/esm/drivers/ssos/ISso.d.ts +5 -8
- package/esm/drivers/ssos/Sso.d.ts +18 -0
- package/esm/drivers/ssos/SsoFactory.d.ts +2 -3
- package/esm/drivers/ssos/entities/SsoUser.d.ts +6 -0
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +11 -9
- package/esm/drivers/ssos/implements/BearerSso.d.ts +11 -10
- package/esm/drivers/ssos/implements/NioSso.d.ts +9 -7
- package/esm/drivers/ssos/implements/SecretSso.d.ts +9 -9
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +4 -7
- package/esm/drivers/ssos/index.d.ts +3 -2
- package/esm/drivers/tasks/ITask.d.ts +19 -0
- package/esm/drivers/tasks/Task.d.ts +12 -0
- package/esm/drivers/tasks/TaskFactory.d.ts +9 -0
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +13 -0
- package/esm/drivers/tasks/index.d.ts +3 -0
- package/esm/drivers/types/IDispose.d.ts +10 -0
- package/esm/drivers/types/IDriver.d.ts +10 -0
- package/esm/drivers/types/IOpen.d.ts +10 -0
- package/esm/drivers/types/index.d.ts +4 -0
- package/esm/drivers/videos/IVideo.d.ts +4 -0
- package/esm/drivers/videos/VideoFactory.d.ts +4 -1
- package/esm/drivers/videos/index.d.ts +2 -1
- package/esm/drivers/voices/IVoice.d.ts +2 -2
- package/esm/drivers/voices/Voice.d.ts +5 -2
- package/esm/drivers/voices/VoiceFactory.d.ts +1 -1
- package/esm/drivers/voices/index.d.ts +2 -1
- package/esm/factories/Factories.d.ts +55 -0
- package/esm/factories/Factory.d.ts +38 -0
- package/esm/factories/IFactory.d.ts +27 -0
- package/esm/factories/index.d.ts +26 -0
- package/esm/factorying/Factories.d.ts +59 -0
- package/esm/factorying/Factory.d.ts +38 -0
- package/esm/factorying/IFactory.d.ts +27 -0
- package/esm/factorying/index.d.ts +23 -0
- package/esm/helpers/ArrayHelper.d.ts +45 -32
- package/esm/helpers/DictionaryHelper.d.ts +12 -0
- package/esm/helpers/DomHelper.d.ts +4 -0
- package/esm/helpers/HtmlHelper.d.ts +4 -0
- package/esm/helpers/MathHelper.d.ts +16 -12
- package/esm/helpers/StringHelper.d.ts +4 -4
- package/esm/helpers/TimeHelper.d.ts +1 -1
- package/esm/helpers/index.d.ts +1 -2
- package/esm/main.d.ts +1 -0
- package/esm/plugins/Ref.d.ts +7 -0
- package/esm/plugins/index.d.ts +2 -1
- package/esm/svcs/SvcFactory.d.ts +1 -1
- package/esm/svcs/implement/SettingSvc.d.ts +24 -0
- package/esm/svcs/index.d.ts +28 -3
- package/esm/utilities/ListDelta.d.ts +10 -0
- package/esm/utilities/index.d.ts +4 -3
- package/package.json +9 -9
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import Excel from "../Excel";
|
2
2
|
/**
|
3
3
|
* XlsxExcel操作
|
4
4
|
*/
|
5
|
-
declare class XlsxExcel
|
5
|
+
declare class XlsxExcel extends Excel {
|
6
6
|
type: string;
|
7
|
-
open(conn: string): void
|
8
|
-
export(dataRows: any[], name: string):
|
7
|
+
open(conn: string): Promise<void>;
|
8
|
+
export(dataRows: any[], name: string): any;
|
9
9
|
}
|
10
10
|
export default XlsxExcel;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import IExcel from "./IExcel";
|
2
2
|
import ExcelFactory from "./ExcelFactory";
|
3
|
-
export { IExcel, ExcelFactory };
|
3
|
+
export { type IExcel, ExcelFactory };
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { HttpFactory, EncoderFactory, CdnFactory, ExplainerFactory, ExcelFactory, FeatureFactory, HasherFactory, ProviderFactory, SignerFactory, SsoFactory } from "./implement";
|
2
|
+
/**
|
3
|
+
* 驱动工厂类
|
4
|
+
*/
|
5
|
+
declare class Factories {
|
6
|
+
/**
|
7
|
+
* 工厂缓存
|
8
|
+
*/
|
9
|
+
static mappings: {};
|
10
|
+
/**
|
11
|
+
* 并缓存工厂实例
|
12
|
+
*/
|
13
|
+
static create(name: string, type: any): any;
|
14
|
+
/**
|
15
|
+
*CDN工厂
|
16
|
+
*/
|
17
|
+
static get cdn(): CdnFactory;
|
18
|
+
/**
|
19
|
+
*编码器工厂
|
20
|
+
*/
|
21
|
+
static get encoder(): EncoderFactory;
|
22
|
+
/**
|
23
|
+
*Excel工厂
|
24
|
+
*/
|
25
|
+
static get excel(): ExcelFactory;
|
26
|
+
/**
|
27
|
+
*Explainer工厂
|
28
|
+
*/
|
29
|
+
static get explainer(): ExplainerFactory;
|
30
|
+
/**
|
31
|
+
*特征工厂
|
32
|
+
*/
|
33
|
+
static get feature(): FeatureFactory;
|
34
|
+
/**
|
35
|
+
*哈希工厂
|
36
|
+
*/
|
37
|
+
static get hasher(): HasherFactory;
|
38
|
+
/**
|
39
|
+
*提供程序工厂
|
40
|
+
*/
|
41
|
+
static get provider(): ProviderFactory;
|
42
|
+
/**
|
43
|
+
*Http请求工厂
|
44
|
+
*/
|
45
|
+
static get http(): HttpFactory;
|
46
|
+
/**
|
47
|
+
*签名工厂
|
48
|
+
*/
|
49
|
+
static get signer(): SignerFactory;
|
50
|
+
/**
|
51
|
+
*SSO工厂
|
52
|
+
*/
|
53
|
+
static get sso(): SsoFactory;
|
54
|
+
}
|
55
|
+
export default Factories;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import ICdn from "../../cdns/ICdn";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* CDN工厂类
|
5
|
+
*/
|
6
|
+
declare class CdnFactory extends Factory<ICdn> {
|
7
|
+
getInstances(): ICdn[];
|
8
|
+
/**
|
9
|
+
* 获取指定CDN实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<ICdn>;
|
12
|
+
}
|
13
|
+
export default CdnFactory;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import IEncoder from "../../encoders/IEncoder";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 编码器工厂
|
5
|
+
*/
|
6
|
+
declare class EncoderFactory extends Factory<IEncoder> {
|
7
|
+
getInstances(): IEncoder[];
|
8
|
+
/**
|
9
|
+
* 创建执行类型的Hash实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IEncoder>;
|
12
|
+
/**
|
13
|
+
* 获取Base64 编码器对象
|
14
|
+
*/
|
15
|
+
getBase64(): Promise<IEncoder>;
|
16
|
+
}
|
17
|
+
export default EncoderFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import IExcel from "../../excels/IExcel";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* Excel工厂
|
5
|
+
*/
|
6
|
+
declare class ExcelFactory extends Factory<IExcel> {
|
7
|
+
getInstances(): IExcel[];
|
8
|
+
/**
|
9
|
+
* 获取Excel实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IExcel>;
|
12
|
+
}
|
13
|
+
export default ExcelFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import IFeature from "../../features/IFeature";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 特征工厂类
|
5
|
+
*/
|
6
|
+
declare class FeatureFactory extends Factory<IFeature> {
|
7
|
+
getInstances(): IFeature[];
|
8
|
+
/**
|
9
|
+
* 获取指定特征实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IFeature>;
|
12
|
+
}
|
13
|
+
export default FeatureFactory;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import IHasher from "../../hashers/IHasher";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
declare class HasherFactory extends Factory<IHasher> {
|
4
|
+
getInstances(): IHasher[];
|
5
|
+
create(type: string, conn?: string): Promise<IHasher>;
|
6
|
+
/**
|
7
|
+
* 获取MD5 Hash对象
|
8
|
+
*/
|
9
|
+
getMd5(): Promise<IHasher>;
|
10
|
+
}
|
11
|
+
export default HasherFactory;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import IHttp from "../../https/IHttp";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 请求器工厂类
|
5
|
+
*/
|
6
|
+
declare class HttpFactory extends Factory<IHttp> {
|
7
|
+
getInstances(): IHttp[];
|
8
|
+
/**
|
9
|
+
* 获取默认请求器
|
10
|
+
*/
|
11
|
+
getDefault(): Promise<IHttp>;
|
12
|
+
/**
|
13
|
+
* 获取本地请求实例
|
14
|
+
* 获取完毕后,下游第一行代码就要配置消息服务
|
15
|
+
*/
|
16
|
+
getHalo(): Promise<IHttp>;
|
17
|
+
}
|
18
|
+
export default HttpFactory;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import IProvider from "../../providers/IProvider";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 数据库提供程序工厂类
|
5
|
+
*/
|
6
|
+
declare class ProviderFactory extends Factory<IProvider> {
|
7
|
+
getInstances(): IProvider[];
|
8
|
+
/**
|
9
|
+
* 获取指定类型的提供程序
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IProvider>;
|
12
|
+
private _default;
|
13
|
+
/**
|
14
|
+
* 获取并开启默认驱动程序
|
15
|
+
*/
|
16
|
+
getDefault(store: string): Promise<IProvider>;
|
17
|
+
}
|
18
|
+
export default ProviderFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import ISigner from "../../signers/ISigner";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 签名工厂类
|
5
|
+
*/
|
6
|
+
declare class SignerFactory extends Factory<ISigner> {
|
7
|
+
getInstances(): ISigner[];
|
8
|
+
/**
|
9
|
+
* 获取指定签名实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<ISigner>;
|
12
|
+
}
|
13
|
+
export default SignerFactory;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import ISso from "../../ssos/ISso";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* SSO工厂类
|
5
|
+
* @extends {Factory<ISso>}
|
6
|
+
*/
|
7
|
+
declare class SsoFactory extends Factory<ISso> {
|
8
|
+
/**
|
9
|
+
* @extends {getInstances}
|
10
|
+
*/
|
11
|
+
getInstances(): ISso[];
|
12
|
+
/**
|
13
|
+
* 获取指定SSO实例
|
14
|
+
*/
|
15
|
+
create(type: string, conn?: string): Promise<ISso>;
|
16
|
+
}
|
17
|
+
export default SsoFactory;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import HttpFactory from "./HttpFactory";
|
2
|
+
import EncoderFactory from "./EncoderFactory";
|
3
|
+
import CdnFactory from "./CdnFactory";
|
4
|
+
import ExplainerFactory from "./ExplainerFactory";
|
5
|
+
import ExcelFactory from "./ExcelFactory";
|
6
|
+
import FeatureFactory from "./FeatureFactory";
|
7
|
+
import HasherFactory from "./HasherFactory";
|
8
|
+
import ProviderFactory from "./ProviderFactory";
|
9
|
+
import SignerFactory from "./SignerFactory";
|
10
|
+
import SsoFactory from "./SsoFactory";
|
11
|
+
export { HttpFactory, EncoderFactory, CdnFactory, ExplainerFactory, ExcelFactory, FeatureFactory, HasherFactory, ProviderFactory, SignerFactory, SsoFactory, };
|
@@ -1,28 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { ExplainerFactory } from "../explainers";
|
6
|
-
import { ExcelFactory } from "../excels";
|
7
|
-
import { FeatureFactory } from "../features";
|
8
|
-
import { HasherFactory } from "../hashers";
|
9
|
-
import { ProviderFactory } from "../providers";
|
10
|
-
import { SignerFactory } from "../signers";
|
11
|
-
import { SsoFactory } from "../ssos";
|
12
|
-
import IHasher from "../hashers/IHasher";
|
13
|
-
/**
|
14
|
-
* 默认Http请求对象
|
15
|
-
*/
|
16
|
-
declare let cdnFactory: CdnFactory;
|
17
|
-
declare let encoderFactory: EncoderFactory;
|
18
|
-
declare let excelFactory: ExcelFactory;
|
19
|
-
declare let explainerFactory: ExplainerFactory;
|
20
|
-
declare let featureFactory: FeatureFactory;
|
21
|
-
declare let hasherFactory: HasherFactory;
|
22
|
-
declare let httpFactory: HttpFactory;
|
23
|
-
declare let providerFactory: ProviderFactory;
|
24
|
-
declare let signerFactory: SignerFactory;
|
25
|
-
declare let ssoFactory: SsoFactory;
|
1
|
+
import Factories from "./Factories";
|
2
|
+
import { IEncoder } from "../encoders";
|
3
|
+
import { IHttp } from "../https";
|
4
|
+
import { IHasher } from "../hashers";
|
26
5
|
/**
|
27
6
|
* 默认base64编码
|
28
7
|
*/
|
@@ -39,4 +18,4 @@ declare let md5: IHasher;
|
|
39
18
|
* 初始化默认驱动实例
|
40
19
|
*/
|
41
20
|
declare let initDriver: () => Promise<void>;
|
42
|
-
export {
|
21
|
+
export { Factories, base64, http, md5, initDriver };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import IFeature from "./IFeature";
|
2
2
|
import FeatureFactory from "./FeatureFactory";
|
3
|
-
export { IFeature, FeatureFactory };
|
3
|
+
export { type IFeature, FeatureFactory };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import IHasher from "./IHasher";
|
2
|
-
import Factory from "
|
2
|
+
import Factory from "../../factorying/Factory";
|
3
3
|
declare class HasherFactory extends Factory<IHasher> {
|
4
4
|
getInstances(): IHasher[];
|
5
5
|
create(type: string, conn?: string): Promise<IHasher>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import IHasher from "./IHasher";
|
2
2
|
import HasherFactory from "./HasherFactory";
|
3
|
-
export { IHasher, HasherFactory };
|
3
|
+
export { type IHasher, HasherFactory };
|
@@ -1,10 +1,15 @@
|
|
1
1
|
import IHttp from "./IHttp";
|
2
|
-
import Factory from "
|
2
|
+
import Factory from "../../factorying/Factory";
|
3
|
+
import { Ref } from "../../plugins";
|
3
4
|
/**
|
4
5
|
* 请求器工厂类
|
5
6
|
*/
|
6
7
|
declare class HttpFactory extends Factory<IHttp> {
|
7
8
|
getInstances(): IHttp[];
|
9
|
+
/**
|
10
|
+
* 创建并开启
|
11
|
+
*/
|
12
|
+
createById(id: number, driverRef?: Ref<any>): Promise<IHttp>;
|
8
13
|
/**
|
9
14
|
* 获取默认请求器
|
10
15
|
*/
|
@@ -1,14 +1,10 @@
|
|
1
1
|
import HttpRequest from "./entities/HttpRequest";
|
2
2
|
import HttpResponse from "./entities/HttpResponse";
|
3
|
-
import IDriver from "../
|
3
|
+
import { IDriver, IOpen } from "../types";
|
4
4
|
/**
|
5
5
|
* 请求器接口
|
6
6
|
*/
|
7
|
-
interface IHttp extends IDriver {
|
8
|
-
/**
|
9
|
-
* 开启
|
10
|
-
*/
|
11
|
-
open(conn: string): Promise<void>;
|
7
|
+
interface IHttp extends IDriver, IOpen {
|
12
8
|
/**
|
13
9
|
* 请求时执行
|
14
10
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import IHttp from "./IHttp";
|
1
2
|
import HttpFactory from "./HttpFactory";
|
2
|
-
import type IHttp from "./IHttp";
|
3
3
|
import HttpRequest from "./entities/HttpRequest";
|
4
4
|
import HttpResponse from "./entities/HttpResponse";
|
5
5
|
import HaloHttp from "./implements/HaloHttp";
|
6
|
-
export {
|
6
|
+
export { type IHttp, HttpFactory, HttpRequest, HttpResponse, HaloHttp };
|
package/esm/drivers/index.d.ts
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
export * from "./bridges";
|
2
|
+
export * from "./builders";
|
2
3
|
export * from "./cdns";
|
3
4
|
export * from "./encoders";
|
4
5
|
export * from "./excels";
|
5
6
|
export * from "./explainers";
|
6
|
-
export * from "./factories";
|
7
7
|
export * from "./features";
|
8
8
|
export * from "./hashers";
|
9
9
|
export * from "./https";
|
10
10
|
export * from "./providers";
|
11
11
|
export * from "./signers";
|
12
12
|
export * from "./ssos";
|
13
|
+
export * from "./tasks";
|
14
|
+
export * from "./types";
|
13
15
|
export * from "./videos";
|
14
16
|
export * from "./voices";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import IDriver from "../
|
1
|
+
import { IDriver } from "../types";
|
2
2
|
/**
|
3
3
|
* 数据库提供程序接口
|
4
4
|
*/
|
@@ -19,6 +19,10 @@ interface IProvider extends IDriver {
|
|
19
19
|
* 查询数据
|
20
20
|
*/
|
21
21
|
getAsync(id: any): Promise<any>;
|
22
|
+
/**
|
23
|
+
* 查询数据,本质调用上面的重载
|
24
|
+
*/
|
25
|
+
getAsync<T>(id: any): Promise<T>;
|
22
26
|
/**
|
23
27
|
* 添加数据
|
24
28
|
*/
|
@@ -4,14 +4,14 @@ import IProvider from "./IProvider";
|
|
4
4
|
*/
|
5
5
|
declare abstract class Provider implements IProvider {
|
6
6
|
type: string;
|
7
|
-
createAsync(store: string): Promise<any>;
|
8
|
-
deleteAsync(id: any): Promise<any>;
|
9
|
-
getAsync(id: any): Promise<any>;
|
10
|
-
insertAsync(id: any, entity: any): Promise<any>;
|
11
|
-
openAsync(conn: string): Promise<number>;
|
12
|
-
saveAsync(id: any, entity: any): Promise<any>;
|
13
|
-
updateAsync(id: any, entity: any): Promise<any>;
|
14
|
-
commit(): void;
|
15
|
-
dispose(): void;
|
7
|
+
abstract createAsync(store: string): Promise<any>;
|
8
|
+
abstract deleteAsync(id: any): Promise<any>;
|
9
|
+
abstract getAsync(id: any): Promise<any>;
|
10
|
+
abstract insertAsync(id: any, entity: any): Promise<any>;
|
11
|
+
abstract openAsync(conn: string): Promise<number>;
|
12
|
+
abstract saveAsync(id: any, entity: any): Promise<any>;
|
13
|
+
abstract updateAsync(id: any, entity: any): Promise<any>;
|
14
|
+
abstract commit(): void;
|
15
|
+
abstract dispose(): void;
|
16
16
|
}
|
17
17
|
export default Provider;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import IProvider from "./IProvider";
|
2
|
-
import Factory from "
|
2
|
+
import Factory from "../../factorying/Factory";
|
3
3
|
/**
|
4
4
|
* 数据库提供程序工厂类
|
5
5
|
*/
|
@@ -14,5 +14,9 @@ declare class ProviderFactory extends Factory<IProvider> {
|
|
14
14
|
* 获取并开启默认驱动程序
|
15
15
|
*/
|
16
16
|
getDefault(store: string): Promise<IProvider>;
|
17
|
+
/**
|
18
|
+
* 获取默认Storage提供程序
|
19
|
+
*/
|
20
|
+
getStorage(): Promise<IProvider>;
|
17
21
|
}
|
18
22
|
export default ProviderFactory;
|
@@ -1,3 +1,17 @@
|
|
1
|
-
|
1
|
+
import Provider from "../Provider";
|
2
|
+
/**
|
3
|
+
* Cookie提供程序
|
4
|
+
*/
|
5
|
+
declare class CookieProvider extends Provider {
|
6
|
+
type: string;
|
7
|
+
openAsync(conn: string): Promise<number>;
|
8
|
+
createAsync(store: string): Promise<any>;
|
9
|
+
deleteAsync(id: any): Promise<any>;
|
10
|
+
getAsync(id: any): Promise<any>;
|
11
|
+
insertAsync(id: any, entity: any): Promise<any>;
|
12
|
+
saveAsync(id: any, entity: any): Promise<any>;
|
13
|
+
updateAsync(id: any, entity: any): Promise<any>;
|
14
|
+
commit(): void;
|
15
|
+
dispose(): void;
|
2
16
|
}
|
3
17
|
export default CookieProvider;
|
@@ -1,4 +1,33 @@
|
|
1
1
|
import Provider from "../Provider";
|
2
|
+
/**
|
3
|
+
* 本地存储提供程序
|
4
|
+
*/
|
2
5
|
declare class StorageProvider extends Provider {
|
6
|
+
type: string;
|
7
|
+
openAsync(conn: string): Promise<number>;
|
8
|
+
createAsync(store: string): Promise<any>;
|
9
|
+
deleteAsync(id: any): Promise<any>;
|
10
|
+
getAsync(id: any): Promise<any>;
|
11
|
+
insertAsync(id: any, entity: any): Promise<any>;
|
12
|
+
saveAsync(id: any, entity: any): Promise<any>;
|
13
|
+
updateAsync(id: any, entity: any): Promise<any>;
|
14
|
+
commit(): void;
|
15
|
+
dispose(): void;
|
16
|
+
/**
|
17
|
+
* 获取本地存储
|
18
|
+
*/
|
19
|
+
getEntity: (key: string) => any;
|
20
|
+
/**
|
21
|
+
* 设置本地存储
|
22
|
+
*/
|
23
|
+
setEntity: (key: string, value: any) => void;
|
24
|
+
/**
|
25
|
+
* 以5M为基准,获取剩余可用容量(KB)
|
26
|
+
*/
|
27
|
+
getLeftStorage: () => number;
|
28
|
+
/**
|
29
|
+
* 判断指定值是否能够存储到storage中
|
30
|
+
*/
|
31
|
+
canStorage: (value: object) => boolean;
|
3
32
|
}
|
4
33
|
export default StorageProvider;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import IProvider from "./IProvider";
|
2
2
|
import ProviderFactory from "./ProviderFactory";
|
3
|
-
export { IProvider, ProviderFactory };
|
3
|
+
export { type IProvider, ProviderFactory };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import ISigner from "./ISigner";
|
2
2
|
import SignerFactory from "./SignerFactory";
|
3
|
-
export {
|
3
|
+
export { type ISigner, SignerFactory };
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import IDriver from "../
|
1
|
+
import { IDriver } from "../types";
|
2
|
+
import SsoUser from "./entities/SsoUser";
|
2
3
|
/**
|
3
4
|
* SSO接口
|
4
5
|
*/
|
@@ -9,7 +10,7 @@ interface ISso extends IDriver {
|
|
9
10
|
open(auth: {
|
10
11
|
url: string;
|
11
12
|
app_id: string;
|
12
|
-
}): void
|
13
|
+
}): Promise<void>;
|
13
14
|
/**
|
14
15
|
* 登录
|
15
16
|
*/
|
@@ -21,11 +22,7 @@ interface ISso extends IDriver {
|
|
21
22
|
/**
|
22
23
|
* 获取用户信息
|
23
24
|
*/
|
24
|
-
getUser():
|
25
|
-
userId: string;
|
26
|
-
token: string;
|
27
|
-
secret: string;
|
28
|
-
};
|
25
|
+
getUser(): Promise<SsoUser>;
|
29
26
|
/**
|
30
27
|
* 获取授权头,不能泄露域账号等用户标识
|
31
28
|
*/
|
@@ -33,6 +30,6 @@ interface ISso extends IDriver {
|
|
33
30
|
/**
|
34
31
|
* 退出
|
35
32
|
*/
|
36
|
-
logout(): void
|
33
|
+
logout(): Promise<void>;
|
37
34
|
}
|
38
35
|
export default ISso;
|