halo-fe 1.0.30 → 1.0.32
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/{liquidjs-C2HVw1Ra.js → liquidjs-BfOWWjtJ.js} +119 -113
- package/dist/main.js +1501 -1282
- package/dist/style.css +1 -1
- package/esm/apps/index.d.ts +2 -0
- package/esm/coms/@types/SocketProgressProps.d.ts +4 -0
- package/esm/coms/index.d.ts +1 -0
- package/esm/coms/layouts/Container.vue.d.ts +6 -2
- package/esm/coms/tags/@types/TagProps.d.ts +7 -0
- package/esm/coms/tags/@types/index.d.ts +2 -0
- package/esm/coms/tags/Index.vue.d.ts +17 -0
- package/esm/coms/tags/index.d.ts +2 -0
- package/esm/drivers/cdns/Cdn.d.ts +6 -2
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +0 -1
- package/esm/drivers/cryptors/Cryptor.d.ts +11 -0
- package/esm/drivers/cryptors/CryptorFactory.d.ts +13 -0
- package/esm/drivers/cryptors/ICryptor.d.ts +15 -0
- package/esm/drivers/cryptors/implements/AesCryptor.d.ts +10 -0
- package/esm/drivers/cryptors/index.d.ts +3 -0
- package/esm/drivers/encryptors/Encryptor.d.ts +11 -0
- package/esm/drivers/encryptors/EncryptorFactory.d.ts +13 -0
- package/esm/drivers/encryptors/IEncryptor.d.ts +15 -0
- package/esm/drivers/encryptors/implements/AesEncryptor.d.ts +10 -0
- package/esm/drivers/encryptors/index.d.ts +3 -0
- package/esm/drivers/hashers/Hasher.d.ts +1 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +5 -1
- package/esm/drivers/hashers/IHasher.d.ts +1 -1
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
- package/esm/drivers/https/Http.d.ts +5 -1
- package/esm/drivers/https/HttpFactory.d.ts +2 -2
- package/esm/drivers/https/IHttp.d.ts +2 -2
- package/esm/drivers/https/entities/HttpProgress.d.ts +9 -0
- package/esm/drivers/https/entities/HttpRequest.d.ts +4 -0
- package/esm/drivers/https/entities/index.d.ts +4 -0
- package/esm/drivers/https/implements/DefaultHttp.d.ts +0 -1
- package/esm/drivers/https/implements/EiHttp.d.ts +32 -0
- package/esm/drivers/https/implements/HaloHttp.d.ts +1 -5
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -5
- package/esm/drivers/https/index.d.ts +2 -3
- package/esm/drivers/index.d.ts +1 -0
- package/esm/drivers/providers/IProvider.d.ts +1 -1
- package/esm/drivers/providers/Provider.d.ts +10 -10
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
- package/esm/drivers/providers/implements/CookieProvider.d.ts +7 -11
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +10 -13
- package/esm/drivers/providers/implements/StorageProvider.d.ts +11 -11
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +5 -1
- package/esm/drivers/util/implements/ArrayUtil.d.ts +1 -1
- package/esm/drivers/util/implements/JsonUtil.d.ts +1 -1
- package/esm/drivers/util/implements/ObjectUtil.d.ts +8 -0
- package/esm/drivers/util/implements/StringUtil.d.ts +4 -0
- package/esm/drivers/util/implements/TimeUtil.d.ts +19 -19
- package/esm/drivers/util/implements/UrlUtil.d.ts +16 -6
- package/esm/drivers/utilities/implement/EventUtility.d.ts +1 -1
- package/esm/factory/Factories.d.ts +5 -1
- package/esm/factory/Utils.d.ts +1 -2
- package/esm/repos/implements/ModuleRepo.d.ts +18 -1
- package/package.json +4 -4
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.
|
1
|
+
html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;flex-direction:column;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.progress-tip{font-size:12px;padding:0 8px;border-radius:4px;display:flex;align-items:center}.progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.progress-tip.warning{color:#e6a23c;background:#292218;border:1px solid #3e301c}.progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress{width:100%;display:flex;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px}.ha-socket-progress .progress-bar{height:6px;background:#363637;width:100%;border-radius:4px}.ha-socket-progress .progress-percentage{height:100%;background:#67c23a;transition:width .5s;border-radius:4px}.ha-socket-progress .progress-info{font-size:12px;display:flex;justify-content:space-between;color:#aaa;gap:10px}.ha-socket-progress .progress-text{color:#cfd3dc}.ha-socket-progress.warning .progress-percentage{background:#e6a23c}.ha-socket-progress.warning .progress-text{color:#e6a23c}.ha-socket-progress.error .progress-percentage{background:#f56c6c}.ha-socket-progress.error .progress-text{color:#f56c6c}@keyframes antRotate{to{transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}.ha-spinner .spinner-dots{position:relative;font-size:20px;width:20px;height:20px;transform:rotate(45deg);animation:antRotate 1.2s linear infinite;margin:0 auto}.ha-spinner .spinner-dots i{position:absolute;display:block;width:9px;height:9px;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s linear infinite alternate}.ha-spinner .spinner-dots i:first-child{top:0;left:0}.ha-spinner .spinner-dots i:nth-child(2){top:0;right:0;animation-delay:.4s}.ha-spinner .spinner-dots i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ha-spinner .spinner-dots i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ha-spinner .spinner-title{color:#f40}.ha-spinner .stack{color:#a3a6ad;white-space:pre-wrap}.ha-spinner .spinner-text{text-align:center;font-size:14px;margin-top:10px}.ha-spinner.is-loading{height:100%;display:flex;align-items:center;justify-content:center}.ha-spinner.is-error{padding:10px;font-size:14px;transition:none}.ha-spinner.is-error .retry{color:#38c;cursor:pointer;margin-left:5px}.ha-spinner.is-error .retry:active{color:#f40}.ha-dance{display:flex;align-items:center}.ha-dance .char{animation:animationText 1s ease-in-out infinite alternate}@keyframes animationText{0%{transform:matrix(1,0,0,1,0,-2)}to{transform:matrix(1,0,0,1,0,2)}}
|
package/esm/coms/index.d.ts
CHANGED
@@ -2,7 +2,9 @@ declare function __VLS_template(): {
|
|
2
2
|
slots: {
|
3
3
|
default?(_: {}): any;
|
4
4
|
};
|
5
|
-
refs: {
|
5
|
+
refs: {
|
6
|
+
containerRef: HTMLDivElement;
|
7
|
+
};
|
6
8
|
attrs: Partial<{}>;
|
7
9
|
};
|
8
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
@@ -11,7 +13,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
11
13
|
type: BooleanConstructor;
|
12
14
|
default: boolean;
|
13
15
|
};
|
14
|
-
}>, {
|
16
|
+
}>, {
|
17
|
+
ref: import("vue").Ref<any, any>;
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
15
19
|
container: {
|
16
20
|
type: BooleanConstructor;
|
17
21
|
default: boolean;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { TagProps } from "./@types";
|
2
|
+
declare function __VLS_template(): {
|
3
|
+
slots: {
|
4
|
+
default?(_: {}): any;
|
5
|
+
};
|
6
|
+
refs: {};
|
7
|
+
attrs: Partial<{}>;
|
8
|
+
};
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
12
|
+
export default _default;
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
14
|
+
new (): {
|
15
|
+
$slots: S;
|
16
|
+
};
|
17
|
+
};
|
@@ -4,7 +4,7 @@ import { ITask } from "../tasks";
|
|
4
4
|
* CDN抽象基类
|
5
5
|
*/
|
6
6
|
declare abstract class Cdn implements ICdn {
|
7
|
-
|
7
|
+
type: string;
|
8
8
|
/**
|
9
9
|
* 任务实例,用于控制并发
|
10
10
|
*/
|
@@ -18,10 +18,14 @@ declare abstract class Cdn implements ICdn {
|
|
18
18
|
getQuill(): Promise<any>;
|
19
19
|
getWeiXin(): Promise<any>;
|
20
20
|
getXlsx(): Promise<any>;
|
21
|
+
/**
|
22
|
+
* 使用define函数加载类库,并防止define与monaco-editor的define全局函数冲突
|
23
|
+
*/
|
24
|
+
loadByDefine(name: string, basePath: string, paths: string[]): Promise<any>;
|
21
25
|
/**
|
22
26
|
* 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
|
23
27
|
*/
|
24
|
-
loadByOrder(
|
28
|
+
loadByOrder(name: string, fn: () => Promise<any>): Promise<any>;
|
25
29
|
loadFilesAsync(path: string, files: string[]): Promise<void>;
|
26
30
|
/**
|
27
31
|
* 通过注入DOM标签异步加载脚本或样式表,已防重
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import ICryptor from "./ICryptor";
|
2
|
+
/**
|
3
|
+
* 加解密基类
|
4
|
+
*/
|
5
|
+
declare abstract class Cryptor implements ICryptor {
|
6
|
+
type: string;
|
7
|
+
openAsync(conn?: string): Promise<void>;
|
8
|
+
encrypt<T>(content: T, key: string): string;
|
9
|
+
abstract encryptString(content: string, key: string): string;
|
10
|
+
}
|
11
|
+
export default Cryptor;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import ICryptor from "./ICryptor";
|
3
|
+
/**
|
4
|
+
* 加解密工厂
|
5
|
+
*/
|
6
|
+
declare class CryptorFactory extends Factory<ICryptor> {
|
7
|
+
open(): void;
|
8
|
+
/**
|
9
|
+
* 获取AES加解密器
|
10
|
+
*/
|
11
|
+
getAesAsync(): Promise<ICryptor>;
|
12
|
+
}
|
13
|
+
export default CryptorFactory;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
/**
|
3
|
+
* 加解密接口
|
4
|
+
*/
|
5
|
+
interface ICryptor extends IDriver, IOpen {
|
6
|
+
/**
|
7
|
+
* 加密任意数据
|
8
|
+
*/
|
9
|
+
encrypt<T>(content: T, key: string): string;
|
10
|
+
/**
|
11
|
+
* 加密字符串
|
12
|
+
*/
|
13
|
+
encryptString(content: string, key: string): string;
|
14
|
+
}
|
15
|
+
export default ICryptor;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import IEncryptor from "./IEncryptor";
|
2
|
+
/**
|
3
|
+
* 加解密基类
|
4
|
+
*/
|
5
|
+
declare abstract class Encryptor implements IEncryptor {
|
6
|
+
type: string;
|
7
|
+
openAsync(conn?: string): Promise<void>;
|
8
|
+
encrypt<T>(content: T, key: string): string;
|
9
|
+
abstract encryptString(content: string, key: string): string;
|
10
|
+
}
|
11
|
+
export default Encryptor;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import IEncryptor from "./IEncryptor";
|
3
|
+
/**
|
4
|
+
* 加解密工厂
|
5
|
+
*/
|
6
|
+
declare class EncryptorFactory extends Factory<IEncryptor> {
|
7
|
+
open(): void;
|
8
|
+
/**
|
9
|
+
* 获取AES加解密器
|
10
|
+
*/
|
11
|
+
getAesAsync(): Promise<IEncryptor>;
|
12
|
+
}
|
13
|
+
export default EncryptorFactory;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
/**
|
3
|
+
* 加解密接口
|
4
|
+
*/
|
5
|
+
interface IEncryptor extends IDriver, IOpen {
|
6
|
+
/**
|
7
|
+
* 加密任意数据
|
8
|
+
*/
|
9
|
+
encrypt<T>(content: T, key: string): string;
|
10
|
+
/**
|
11
|
+
* 加密字符串
|
12
|
+
*/
|
13
|
+
encryptString(content: string, key: string): string;
|
14
|
+
}
|
15
|
+
export default IEncryptor;
|
@@ -5,6 +5,6 @@ import IHasher from "./IHasher";
|
|
5
5
|
declare abstract class Hasher implements IHasher {
|
6
6
|
type: string;
|
7
7
|
abstract openAsync(conn: string): Promise<void>;
|
8
|
-
abstract
|
8
|
+
abstract computeAsync(value: string): Promise<string>;
|
9
9
|
}
|
10
10
|
export default Hasher;
|
@@ -10,6 +10,10 @@ declare class HasherFactory extends Factory<IHasher> {
|
|
10
10
|
/**
|
11
11
|
* 获取MD5 Hash对象
|
12
12
|
*/
|
13
|
-
|
13
|
+
getMd5Async(): Promise<IHasher>;
|
14
|
+
/**
|
15
|
+
* 获取Sha256 Hash对象
|
16
|
+
*/
|
17
|
+
getSha256Async(): Promise<IHasher>;
|
14
18
|
}
|
15
19
|
export default HasherFactory;
|
@@ -5,6 +5,6 @@ import Hasher from "../Hasher";
|
|
5
5
|
declare class Sha256Hasher extends Hasher {
|
6
6
|
type: string;
|
7
7
|
openAsync(conn: string): Promise<void>;
|
8
|
-
|
8
|
+
computeAsync: (value: string) => Promise<string>;
|
9
9
|
}
|
10
10
|
export default Sha256Hasher;
|
@@ -8,6 +8,10 @@ import { IEncoder } from "../encoders";
|
|
8
8
|
*/
|
9
9
|
declare abstract class Http implements IHttp {
|
10
10
|
type: string;
|
11
|
+
/**
|
12
|
+
* 基准请求地址
|
13
|
+
*/
|
14
|
+
baseUrl: string;
|
11
15
|
/**
|
12
16
|
* 默认请求器
|
13
17
|
*/
|
@@ -29,7 +33,7 @@ declare abstract class Http implements IHttp {
|
|
29
33
|
set onRequest(value: (request: HttpRequest) => Promise<void>);
|
30
34
|
get onResponse(): (response: HttpResponse) => Promise<void>;
|
31
35
|
set onResponse(value: (response: HttpResponse) => Promise<void>);
|
32
|
-
prepareAsync(request: HttpRequest
|
36
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
33
37
|
get: (path: string, params?: any) => Promise<any>;
|
34
38
|
getAsync: (path: string, params?: any) => Promise<HttpResponse>;
|
35
39
|
post: (path: string, body: any) => Promise<any>;
|
@@ -14,9 +14,9 @@ interface IHttp extends IDriver, IOpen {
|
|
14
14
|
*/
|
15
15
|
onResponse: (response: HttpResponse) => Promise<void>;
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 请求准备:替换请求变量,请求准备
|
18
18
|
*/
|
19
|
-
prepareAsync(request: HttpRequest
|
19
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
20
20
|
/**
|
21
21
|
* 发送GET请求,得到响应体
|
22
22
|
*/
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import Http from "../Http";
|
2
|
+
import HttpRequest from "../entities/HttpRequest";
|
3
|
+
import { IHasher } from "../../hashers";
|
4
|
+
import { ICryptor } from "../../cryptors";
|
5
|
+
/**
|
6
|
+
* EI请求器
|
7
|
+
*/
|
8
|
+
declare class EiHttp extends Http {
|
9
|
+
/**
|
10
|
+
* Token密钥
|
11
|
+
*/
|
12
|
+
aesKey: string;
|
13
|
+
/**
|
14
|
+
* 盐
|
15
|
+
*/
|
16
|
+
salt: string;
|
17
|
+
/**
|
18
|
+
* 加解密器
|
19
|
+
*/
|
20
|
+
encryptor: ICryptor;
|
21
|
+
/**
|
22
|
+
* Hash计算器
|
23
|
+
*/
|
24
|
+
hasher: IHasher;
|
25
|
+
openAsync(conn: string): Promise<void>;
|
26
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
27
|
+
/**
|
28
|
+
* 获取请求头
|
29
|
+
*/
|
30
|
+
getHeader(url: string, body: string, userId: string): Promise<any>;
|
31
|
+
}
|
32
|
+
export default EiHttp;
|
@@ -7,10 +7,6 @@ import { ISigner } from "../../signers";
|
|
7
7
|
*/
|
8
8
|
declare class HaloHttp extends Http {
|
9
9
|
type: string;
|
10
|
-
/**
|
11
|
-
* 基准地址
|
12
|
-
*/
|
13
|
-
baseUrl: string;
|
14
10
|
/**
|
15
11
|
* 当前用户信息
|
16
12
|
*/
|
@@ -36,7 +32,7 @@ declare class HaloHttp extends Http {
|
|
36
32
|
*/
|
37
33
|
signer: ISigner;
|
38
34
|
openAsync: (conn: string) => Promise<void>;
|
39
|
-
prepareAsync: (request: HttpRequest
|
35
|
+
prepareAsync: (request: HttpRequest) => Promise<void>;
|
40
36
|
/**
|
41
37
|
* 处理网络错误和响应错误场景
|
42
38
|
*/
|
@@ -6,10 +6,6 @@ import { IHasher } from "../../hashers";
|
|
6
6
|
*/
|
7
7
|
declare class MkHttp extends Http {
|
8
8
|
type: string;
|
9
|
-
/**
|
10
|
-
* 基准地址
|
11
|
-
*/
|
12
|
-
baseUrl: string;
|
13
9
|
/**
|
14
10
|
* AppId
|
15
11
|
*/
|
@@ -29,6 +25,6 @@ declare class MkHttp extends Http {
|
|
29
25
|
/**
|
30
26
|
* 危险操作,会暴露敏感信息
|
31
27
|
*/
|
32
|
-
prepareAsync: (request: HttpRequest
|
28
|
+
prepareAsync: (request: HttpRequest) => Promise<void>;
|
33
29
|
}
|
34
30
|
export default MkHttp;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import IHttp from "./IHttp";
|
2
2
|
import HttpFactory from "./HttpFactory";
|
3
|
-
import HttpRequest from "./entities/HttpRequest";
|
4
|
-
import HttpResponse from "./entities/HttpResponse";
|
5
3
|
import HaloHttp from "./implements/HaloHttp";
|
6
|
-
export
|
4
|
+
export * from "./entities";
|
5
|
+
export { type IHttp, HttpFactory, HaloHttp };
|
package/esm/drivers/index.d.ts
CHANGED
@@ -5,17 +5,17 @@ import IProvider from "./IProvider";
|
|
5
5
|
declare abstract class Provider implements IProvider {
|
6
6
|
type: string;
|
7
7
|
openAsync(conn: string): Promise<void>;
|
8
|
-
|
9
|
-
abstract deleteAsync(
|
10
|
-
abstract
|
11
|
-
abstract getAsync(
|
8
|
+
createAsync(table: string): Promise<any>;
|
9
|
+
abstract deleteAsync(table: string, key: any): Promise<any>;
|
10
|
+
abstract getEntityAsync<T>(table: string, key: any): Promise<T>;
|
11
|
+
abstract getAsync(table: string, key: any): Promise<any>;
|
12
12
|
abstract getKeysAsync(table: string): Promise<any[]>;
|
13
|
-
abstract insertAsync(
|
14
|
-
abstract updateAsync(
|
15
|
-
abstract saveEntity<T>(
|
16
|
-
abstract saveAsync(
|
13
|
+
abstract insertAsync(table: string, key: any, entity: any): Promise<any>;
|
14
|
+
abstract updateAsync(table: string, key: any, entity: any): Promise<any>;
|
15
|
+
abstract saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
|
16
|
+
abstract saveAsync(table: string, key: any, entity: any): Promise<any>;
|
17
17
|
replaceEntityAsync(table: string, key: any, newKey: any): Promise<void>;
|
18
|
-
|
19
|
-
|
18
|
+
commit(): void;
|
19
|
+
dispose(): void;
|
20
20
|
}
|
21
21
|
export default Provider;
|
@@ -8,12 +8,12 @@ declare class ProviderFactory extends Factory<IProvider> {
|
|
8
8
|
open(): void;
|
9
9
|
private _default;
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* 获取IndeedDb驱动程序,并自动决定创建指定名称的仓储
|
12
12
|
*/
|
13
|
-
|
13
|
+
getDbAsync(table: string): Promise<IProvider>;
|
14
14
|
/**
|
15
15
|
* 获取默认Storage提供程序
|
16
16
|
*/
|
17
|
-
|
17
|
+
getStorageAsync(): Promise<IProvider>;
|
18
18
|
}
|
19
19
|
export default ProviderFactory;
|
@@ -4,17 +4,13 @@ import Provider from "../Provider";
|
|
4
4
|
*/
|
5
5
|
declare class CookieProvider extends Provider {
|
6
6
|
type: string;
|
7
|
-
openAsync(conn: string): Promise<void>;
|
8
7
|
getKeysAsync(table: string): Promise<any[]>;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
updateAsync(kind: string, key: any, entity: any): Promise<any>;
|
17
|
-
commit(): void;
|
18
|
-
dispose(): void;
|
8
|
+
deleteAsync(table: string, key: any): Promise<any>;
|
9
|
+
getAsync(table: string, key: any): Promise<any>;
|
10
|
+
getEntityAsync<T>(table: string, key: any): Promise<T>;
|
11
|
+
insertAsync(table: string, key: any, entity: any): Promise<any>;
|
12
|
+
saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
|
13
|
+
saveAsync(table: string, key: any, entity: any): Promise<any>;
|
14
|
+
updateAsync(table: string, key: any, entity: any): Promise<any>;
|
19
15
|
}
|
20
16
|
export default CookieProvider;
|
@@ -24,15 +24,7 @@ declare class IndexedDbProvider extends Provider {
|
|
24
24
|
* 保证创建存储Store
|
25
25
|
*/
|
26
26
|
createAsync(table: string): Promise<any>;
|
27
|
-
|
28
|
-
* 打开数据库(不升级,用于执行命令)
|
29
|
-
*/
|
30
|
-
openDbAsync(): Promise<IDBDatabase>;
|
31
|
-
/**
|
32
|
-
* 开启事务
|
33
|
-
*/
|
34
|
-
openTransAsync(table: string, mode: IDBTransactionMode, db: IDBDatabase): Promise<IDBTransaction>;
|
35
|
-
getEntity<T>(table: string, id: any): Promise<T>;
|
27
|
+
getEntityAsync<T>(table: string, id: any): Promise<T>;
|
36
28
|
/**
|
37
29
|
* 查询数据
|
38
30
|
*/
|
@@ -56,12 +48,17 @@ declare class IndexedDbProvider extends Provider {
|
|
56
48
|
*/
|
57
49
|
deleteAsync: (table: string, key: any) => Promise<any>;
|
58
50
|
/**
|
59
|
-
*
|
51
|
+
* 升级数据库版本
|
52
|
+
* VIP:无需手动关闭数据空连接,系统在onsuccess中会自动关闭连接
|
53
|
+
*/
|
54
|
+
upgradeDbAsync(version: number): Promise<IDBDatabase>;
|
55
|
+
/**
|
56
|
+
* 打开数据库(不升级,用于执行命令)
|
60
57
|
*/
|
61
|
-
|
58
|
+
openDbAsync(): Promise<IDBDatabase>;
|
62
59
|
/**
|
63
|
-
*
|
60
|
+
* 开启事务
|
64
61
|
*/
|
65
|
-
|
62
|
+
openTransAsync(db: IDBDatabase, table: string, mode: IDBTransactionMode): Promise<IDBTransaction>;
|
66
63
|
}
|
67
64
|
export default IndexedDbProvider;
|