halo-fe 1.0.32 → 1.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +5588 -5347
- package/esm/@types/CreateFeOptions.d.ts +5 -2
- package/esm/@types/FeOptions.d.ts +32 -0
- package/esm/@types/index.d.ts +1 -2
- package/esm/apps/AppConstant.d.ts +1 -2
- package/esm/apps/index.d.ts +1 -2
- package/esm/coms/@types/ColumnEmit.d.ts +3 -0
- package/esm/coms/@types/ColumnProps.d.ts +5 -0
- package/esm/coms/@types/PagerEmit.d.ts +1 -2
- package/esm/coms/@types/PagerProps.d.ts +1 -2
- package/esm/coms/@types/ScrollerProps.d.ts +1 -2
- package/esm/coms/@types/SocketProgressProps.d.ts +1 -2
- package/esm/coms/@types/TabProps.d.ts +1 -2
- package/esm/coms/@types/TableEmit.d.ts +1 -2
- package/esm/coms/@types/TableProps.d.ts +1 -2
- package/esm/coms/@types/index.d.ts +9 -8
- package/esm/coms/Empty.vue.d.ts +3 -2
- package/esm/coms/Fill.vue.d.ts +3 -2
- package/esm/coms/Scroller.vue.d.ts +4 -3
- package/esm/coms/Timer.vue.d.ts +3 -2
- package/esm/coms/cards/Index.vue.d.ts +3 -2
- package/esm/coms/conditions/@types/ConditionGroupProps.d.ts +2 -3
- package/esm/coms/conditions/@types/ConditionProps.d.ts +1 -2
- package/esm/coms/conditions/@types/index.d.ts +2 -3
- package/esm/coms/conditions/Condition.vue.d.ts +1 -1
- package/esm/coms/conditions/Index.vue.d.ts +1 -1
- package/esm/coms/controls/@types/CodeEmit.d.ts +1 -2
- package/esm/coms/controls/@types/CodeIntelli.d.ts +1 -2
- package/esm/coms/controls/@types/CodeProps.d.ts +3 -4
- package/esm/coms/controls/@types/Range.d.ts +1 -2
- package/esm/coms/controls/@types/RichTextOptions.d.ts +0 -1
- package/esm/coms/controls/@types/RichTextProps.d.ts +1 -2
- package/esm/coms/controls/@types/index.d.ts +5 -6
- package/esm/coms/controls/Code.vue.d.ts +1 -1
- package/esm/coms/controls/Compare.vue.d.ts +1 -1
- package/esm/coms/controls/Input.vue.d.ts +1 -1
- package/esm/coms/controls/Option.vue.d.ts +1 -1
- package/esm/coms/controls/RichText.vue.d.ts +4 -2
- package/esm/coms/controls/Select.vue.d.ts +1 -1
- package/esm/coms/layouts/@types/RowProps.d.ts +1 -2
- package/esm/coms/layouts/@types/index.d.ts +1 -2
- package/esm/coms/layouts/Col.vue.d.ts +3 -2
- package/esm/coms/layouts/Container.vue.d.ts +3 -2
- package/esm/coms/layouts/Desc.vue.d.ts +1 -1
- package/esm/coms/layouts/Row.vue.d.ts +3 -2
- package/esm/coms/pagers/Index.vue.d.ts +1 -1
- package/esm/coms/progresses/Circle.vue.d.ts +1 -1
- package/esm/coms/progresses/Index.vue.d.ts +2 -2
- package/esm/coms/progresses/SocketProgress.vue.d.ts +3 -2
- package/esm/coms/tables/Column.vue.d.ts +22 -0
- package/esm/coms/tables/Index.vue.d.ts +9 -8
- package/esm/coms/tabs/Tab.vue.d.ts +1 -1
- package/esm/coms/tags/@types/TagProps.d.ts +1 -2
- package/esm/coms/tags/@types/index.d.ts +1 -2
- package/esm/coms/tags/Index.vue.d.ts +3 -2
- package/esm/coms/texts/@types/DanceProps.d.ts +1 -2
- package/esm/coms/texts/@types/index.d.ts +1 -2
- package/esm/coms/texts/Dance.vue.d.ts +1 -1
- package/esm/drivers/@types/IDispose.d.ts +1 -2
- package/esm/drivers/@types/IDriver.d.ts +1 -2
- package/esm/drivers/@types/IOpen.d.ts +1 -2
- package/esm/drivers/@types/index.d.ts +3 -4
- package/esm/drivers/bridges/IBridge.d.ts +1 -2
- package/esm/drivers/builders/Builder.d.ts +2 -3
- package/esm/drivers/builders/BuilderFactory.d.ts +3 -4
- package/esm/drivers/builders/IBuilder.d.ts +1 -2
- package/esm/drivers/builders/entities/ProviderTable.d.ts +1 -2
- package/esm/drivers/builders/entities/index.d.ts +1 -2
- package/esm/drivers/builders/implement/JsonBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/MongoBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/MySqlBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/SqlBuilder.d.ts +2 -3
- package/esm/drivers/builders/implement/index.d.ts +4 -0
- package/esm/drivers/builders/index.d.ts +2 -3
- package/esm/drivers/cdns/Cdn.d.ts +3 -7
- package/esm/drivers/cdns/CdnFactory.d.ts +3 -4
- package/esm/drivers/cdns/ICdn.d.ts +5 -2
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +2 -3
- package/esm/drivers/cdns/implements/ThirdCdn.d.ts +2 -3
- package/esm/drivers/cdns/implements/index.d.ts +2 -0
- package/esm/drivers/cdns/index.d.ts +3 -4
- package/esm/drivers/cryptors/Cryptor.d.ts +4 -5
- package/esm/drivers/cryptors/CryptorFactory.d.ts +2 -3
- package/esm/drivers/cryptors/ICryptor.d.ts +2 -3
- package/esm/drivers/cryptors/implements/AesCryptor.d.ts +3 -4
- package/esm/drivers/cryptors/implements/PoJunCryptor.d.ts +13 -0
- package/esm/drivers/cryptors/implements/index.d.ts +2 -0
- package/esm/drivers/cryptors/index.d.ts +2 -3
- package/esm/drivers/encoders/Encoder.d.ts +2 -3
- package/esm/drivers/encoders/EncoderFactory.d.ts +3 -4
- package/esm/drivers/encoders/IEncoder.d.ts +1 -2
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +2 -3
- package/esm/drivers/encoders/implement/UrlEncoder.d.ts +2 -3
- package/esm/drivers/encoders/implement/index.d.ts +2 -0
- package/esm/drivers/encoders/index.d.ts +2 -3
- package/esm/drivers/excels/Excel.d.ts +2 -3
- package/esm/drivers/excels/ExcelFactory.d.ts +3 -4
- package/esm/drivers/excels/IExcel.d.ts +1 -2
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +2 -3
- package/esm/drivers/excels/implements/index.d.ts +1 -0
- package/esm/drivers/excels/index.d.ts +2 -3
- package/esm/drivers/explainers/Explainer.d.ts +2 -3
- package/esm/drivers/explainers/ExplainerFactory.d.ts +3 -4
- package/esm/drivers/explainers/IExplainer.d.ts +1 -2
- package/esm/drivers/explainers/implement/JsonExplainer.d.ts +2 -3
- package/esm/drivers/explainers/implement/index.d.ts +1 -0
- package/esm/drivers/explainers/index.d.ts +1 -2
- package/esm/drivers/features/Feature.d.ts +2 -3
- package/esm/drivers/features/FeatureFactory.d.ts +3 -4
- package/esm/drivers/features/IFeature.d.ts +1 -2
- package/esm/drivers/features/implements/ExpressionFeature.d.ts +2 -3
- package/esm/drivers/features/implements/I18NFeature.d.ts +2 -3
- package/esm/drivers/features/implements/SortFeature.d.ts +2 -3
- package/esm/drivers/features/implements/index.d.ts +3 -0
- package/esm/drivers/features/index.d.ts +2 -3
- package/esm/drivers/hashers/Hasher.d.ts +2 -3
- package/esm/drivers/hashers/HasherFactory.d.ts +3 -4
- package/esm/drivers/hashers/IHasher.d.ts +1 -2
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +2 -3
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +2 -3
- package/esm/drivers/hashers/implement/index.d.ts +2 -0
- package/esm/drivers/hashers/index.d.ts +2 -3
- package/esm/drivers/https/Http.d.ts +3 -5
- package/esm/drivers/https/HttpFactory.d.ts +6 -6
- package/esm/drivers/https/IHttp.d.ts +3 -5
- package/esm/drivers/https/entities/HttpMessage.d.ts +3 -4
- package/esm/drivers/https/entities/HttpModel.d.ts +2 -3
- package/esm/drivers/https/entities/HttpProgress.d.ts +2 -3
- package/esm/drivers/https/entities/HttpRequest.d.ts +2 -3
- package/esm/drivers/https/entities/HttpResponse.d.ts +3 -4
- package/esm/drivers/https/entities/index.d.ts +4 -4
- package/esm/drivers/https/implements/DefaultHttp.d.ts +3 -5
- package/esm/drivers/https/implements/EiHttp.d.ts +13 -18
- package/esm/drivers/https/implements/FeiShuHttp.d.ts +2 -3
- package/esm/drivers/https/implements/HaloHttp.d.ts +4 -9
- package/esm/drivers/https/implements/MkHttp.d.ts +3 -4
- package/esm/drivers/https/implements/index.d.ts +5 -0
- package/esm/drivers/https/index.d.ts +3 -4
- package/esm/drivers/i18ns/I18n.d.ts +12 -13
- package/esm/drivers/i18ns/I18nFactory.d.ts +3 -4
- package/esm/drivers/i18ns/II18n.d.ts +11 -12
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +3 -4
- package/esm/drivers/i18ns/implements/index.d.ts +1 -0
- package/esm/drivers/i18ns/index.d.ts +2 -3
- package/esm/drivers/identities/IIdentity.d.ts +15 -0
- package/esm/drivers/identities/Identity.d.ts +11 -0
- package/esm/drivers/identities/IdentityFactory.d.ts +8 -0
- package/esm/drivers/identities/entities/IdentityPayload.d.ts +5 -0
- package/esm/drivers/identities/entities/index.d.ts +1 -0
- package/esm/drivers/identities/implements/DefaultIdentity.d.ts +9 -0
- package/esm/drivers/identities/implements/EiIdentity.d.ts +15 -0
- package/esm/drivers/identities/implements/index.d.ts +2 -0
- package/esm/drivers/identities/index.d.ts +3 -0
- package/esm/drivers/index.d.ts +1 -50
- package/esm/drivers/messengers/IMessenger.d.ts +1 -2
- package/esm/drivers/messengers/Messenger.d.ts +2 -3
- package/esm/drivers/messengers/MessengerFactory.d.ts +5 -6
- package/esm/drivers/messengers/implement/ConsoleMessenger.d.ts +2 -3
- package/esm/drivers/messengers/implement/index.d.ts +1 -0
- package/esm/drivers/messengers/index.d.ts +3 -4
- package/esm/drivers/providers/IProvider.d.ts +1 -2
- package/esm/drivers/providers/Provider.d.ts +2 -3
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -4
- package/esm/drivers/providers/helpers/SqlHelper.d.ts +1 -2
- package/esm/drivers/providers/helpers/index.d.ts +1 -2
- package/esm/drivers/providers/implements/CookieProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/StorageProvider.d.ts +2 -3
- package/esm/drivers/providers/implements/index.d.ts +3 -0
- package/esm/drivers/providers/index.d.ts +2 -3
- package/esm/drivers/signers/ISigner.d.ts +10 -23
- package/esm/drivers/signers/Signer.d.ts +8 -11
- package/esm/drivers/signers/SignerFactory.d.ts +3 -4
- package/esm/drivers/signers/entities/SignerInfo.d.ts +13 -0
- package/esm/drivers/signers/entities/index.d.ts +1 -0
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +11 -11
- package/esm/drivers/signers/implements/EiSigner.d.ts +21 -0
- package/esm/drivers/signers/implements/index.d.ts +2 -0
- package/esm/drivers/signers/index.d.ts +2 -3
- package/esm/drivers/sockets/@types/SubscribedWindow.d.ts +1 -2
- package/esm/drivers/sockets/@types/index.d.ts +1 -2
- package/esm/drivers/sockets/ISocket.d.ts +5 -6
- package/esm/drivers/sockets/Socket.d.ts +6 -7
- package/esm/drivers/sockets/SocketFactory.d.ts +6 -6
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +1 -2
- package/esm/drivers/sockets/entities/SocketResponse.d.ts +1 -2
- package/esm/drivers/sockets/entities/index.d.ts +2 -3
- package/esm/drivers/sockets/implement/DefaultSocket.d.ts +30 -8
- package/esm/drivers/sockets/implement/index.d.ts +1 -0
- package/esm/drivers/sockets/index.d.ts +2 -3
- package/esm/drivers/ssos/ISso.d.ts +4 -12
- package/esm/drivers/ssos/Sso.d.ts +6 -10
- package/esm/drivers/ssos/SsoFactory.d.ts +3 -4
- package/esm/drivers/ssos/entities/SsoUser.d.ts +1 -2
- package/esm/drivers/ssos/entities/index.d.ts +1 -2
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +5 -10
- package/esm/drivers/ssos/implements/BearerSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/NioSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/SecretSso.d.ts +4 -9
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +3 -9
- package/esm/drivers/ssos/implements/index.d.ts +5 -0
- package/esm/drivers/ssos/index.d.ts +2 -3
- package/esm/drivers/tasks/ITask.d.ts +1 -2
- package/esm/drivers/tasks/Task.d.ts +2 -3
- package/esm/drivers/tasks/TaskFactory.d.ts +7 -4
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +3 -4
- package/esm/drivers/tasks/implement/index.d.ts +1 -0
- package/esm/drivers/tasks/index.d.ts +2 -3
- package/esm/drivers/templates/ITemplate.d.ts +1 -2
- package/esm/drivers/templates/Template.d.ts +2 -3
- package/esm/drivers/templates/TemplateFactory.d.ts +7 -4
- package/esm/drivers/templates/implement/LiquidTemplate.d.ts +2 -3
- package/esm/drivers/templates/implement/index.d.ts +1 -0
- package/esm/drivers/templates/index.d.ts +2 -3
- package/esm/drivers/util/@types/JsonConfig.d.ts +1 -2
- package/esm/drivers/util/@types/TreeNodeProp.d.ts +1 -2
- package/esm/drivers/util/@types/index.d.ts +2 -3
- package/esm/drivers/util/IUtil.d.ts +1 -2
- package/esm/drivers/util/Util.d.ts +2 -3
- package/esm/drivers/util/UtilFactory.d.ts +4 -5
- package/esm/drivers/util/implements/ArrayUtil.d.ts +2 -3
- package/esm/drivers/util/implements/BrowserUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ComponentUtil.d.ts +2 -3
- package/esm/drivers/util/implements/DictionaryUtil.d.ts +2 -3
- package/esm/drivers/util/implements/DomUtil.d.ts +2 -3
- package/esm/drivers/util/implements/EventUtil.d.ts +2 -3
- package/esm/drivers/util/implements/FileUtil.d.ts +2 -3
- package/esm/drivers/util/implements/HtmlUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ImageUtil.d.ts +2 -3
- package/esm/drivers/util/implements/JsonUtil.d.ts +3 -4
- package/esm/drivers/util/implements/MathUtil.d.ts +2 -3
- package/esm/drivers/util/implements/MicroUtil.d.ts +2 -3
- package/esm/drivers/util/implements/MountUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ObjectUtil.d.ts +2 -3
- package/esm/drivers/util/implements/ScrollUtil.d.ts +2 -3
- package/esm/drivers/util/implements/SignUtil.d.ts +2 -3
- package/esm/drivers/util/implements/StringUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TaskUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TimeUtil.d.ts +2 -3
- package/esm/drivers/util/implements/TreeUtil.d.ts +2 -3
- package/esm/drivers/util/implements/UrlUtil.d.ts +4 -5
- package/esm/drivers/util/implements/index.d.ts +21 -0
- package/esm/drivers/util/index.d.ts +2 -23
- package/esm/drivers/utilities/@types/DragEvent.d.ts +2 -3
- package/esm/drivers/utilities/@types/DragOptions.d.ts +3 -4
- package/esm/drivers/utilities/@types/Position.d.ts +1 -2
- package/esm/drivers/utilities/@types/Rect.d.ts +2 -3
- package/esm/drivers/utilities/@types/index.d.ts +4 -5
- package/esm/drivers/utilities/IUtility.d.ts +1 -2
- package/esm/drivers/utilities/Utility.d.ts +2 -3
- package/esm/drivers/utilities/UtilityFactory.d.ts +4 -11
- package/esm/drivers/utilities/implement/AffixUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/DeltaUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/EventUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/KeyboardUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/MouseUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/RandomUtility.d.ts +2 -3
- package/esm/drivers/utilities/implement/SaveUtility.d.ts +3 -8
- package/esm/drivers/utilities/implement/index.d.ts +7 -0
- package/esm/drivers/utilities/index.d.ts +2 -8
- package/esm/drivers/videos/IVideo.d.ts +1 -2
- package/esm/drivers/videos/VideoFactory.d.ts +3 -4
- package/esm/drivers/videos/index.d.ts +1 -2
- package/esm/drivers/voices/Voice.d.ts +1 -2
- package/esm/drivers/voices/VoiceFactory.d.ts +2 -3
- package/esm/drivers/voices/implement/DefaultVoice.d.ts +1 -2
- package/esm/drivers/voices/implement/TencentVoice.d.ts +1 -2
- package/esm/drivers/voices/implement/index.d.ts +2 -0
- package/esm/drivers/voices/index.d.ts +1 -2
- package/esm/factory/Drivers.d.ts +52 -0
- package/esm/factory/Factories.d.ts +8 -5
- package/esm/factory/Factory.d.ts +5 -6
- package/esm/factory/I18ns.d.ts +25 -0
- package/esm/factory/IFactory.d.ts +1 -2
- package/esm/factory/Repos.d.ts +22 -0
- package/esm/factory/Svcs.d.ts +85 -0
- package/esm/factory/Utils.d.ts +2 -3
- package/esm/factory/index.d.ts +7 -4
- package/esm/main.d.ts +3 -3
- package/esm/plugins/Ref.d.ts +1 -2
- package/esm/plugins/index.d.ts +1 -1
- package/esm/repos/IRepo.d.ts +1 -2
- package/esm/repos/Repo.d.ts +2 -3
- package/esm/repos/RepoFactory.d.ts +4 -7
- package/esm/repos/entities/KeyboardType.d.ts +1 -2
- package/esm/repos/entities/index.d.ts +1 -2
- package/esm/repos/implements/ModuleRepo.d.ts +11 -10
- package/esm/repos/implements/QueryRepo.d.ts +2 -3
- package/esm/repos/implements/SettingRepo.d.ts +1 -2
- package/esm/repos/implements/index.d.ts +3 -0
- package/esm/repos/index.d.ts +3 -12
- package/esm/svcs/ISvc.d.ts +1 -2
- package/esm/svcs/Svc.d.ts +2 -3
- package/esm/svcs/SvcFactory.d.ts +4 -5
- package/esm/svcs/entities/AppConfig.d.ts +1 -2
- package/esm/svcs/entities/SysConfig.d.ts +26 -5
- package/esm/svcs/entities/UserConfig.d.ts +1 -2
- package/esm/svcs/entities/index.d.ts +2 -4
- package/esm/svcs/implement/ConfigSvc.d.ts +5 -6
- package/esm/svcs/implement/DriverSvc.d.ts +2 -3
- package/esm/svcs/implement/EnvSvc.d.ts +1 -2
- package/esm/svcs/implement/LogSvc.d.ts +1 -2
- package/esm/svcs/implement/SettingSvc.d.ts +1 -2
- package/esm/svcs/implement/UserSvc.d.ts +1 -2
- package/esm/svcs/implement/index.d.ts +6 -1
- package/esm/svcs/index.d.ts +1 -51
- package/package.json +5 -5
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Signer } from "../Signer";
|
2
|
+
import { IHasher } from "../../hashers";
|
3
|
+
import { HttpRequest } from "../../https";
|
4
|
+
import { SignerInfo } from "../entities";
|
5
|
+
/**
|
6
|
+
* EI签名器
|
7
|
+
*/
|
8
|
+
export declare class EiSigner extends Signer {
|
9
|
+
/**
|
10
|
+
* Hash计算器
|
11
|
+
*/
|
12
|
+
hasher: IHasher;
|
13
|
+
/**
|
14
|
+
* 盐
|
15
|
+
*/
|
16
|
+
salt: string;
|
17
|
+
openAsync(conn: string): Promise<void>;
|
18
|
+
computeRequestAsync(request: HttpRequest, authId: string): Promise<void>;
|
19
|
+
computeAsync(authId: string, url: string, body: string): Promise<SignerInfo>;
|
20
|
+
verify(): boolean;
|
21
|
+
}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { type ISigner, SignerFactory };
|
1
|
+
export * from "./ISigner";
|
2
|
+
export * from "./SignerFactory";
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { type SubscribedWindow };
|
1
|
+
export * from "./SubscribedWindow";
|
@@ -2,7 +2,7 @@ import { IDriver, IOpen } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* Socket接口
|
4
4
|
*/
|
5
|
-
interface ISocket extends IDriver, IOpen {
|
5
|
+
export interface ISocket extends IDriver, IOpen {
|
6
6
|
/**
|
7
7
|
* 是否已连接(空表示不需连接)
|
8
8
|
*/
|
@@ -14,19 +14,19 @@ interface ISocket extends IDriver, IOpen {
|
|
14
14
|
/**
|
15
15
|
* 登录后,开启Socket连接
|
16
16
|
*/
|
17
|
-
|
17
|
+
open(): Promise<void>;
|
18
18
|
/**
|
19
19
|
* 订阅多个消息类型,并缓存到订阅池
|
20
20
|
*/
|
21
|
-
subscribe(win: string, kind: string, type: string | string[]):
|
21
|
+
subscribe(win: string, kind: string, type: string | string[]): any;
|
22
22
|
/**
|
23
23
|
* 重连时,重新订阅
|
24
24
|
*/
|
25
|
-
resubscribe():
|
25
|
+
resubscribe(): void;
|
26
26
|
/**
|
27
27
|
* 取消订阅该窗口 所有Socket事件处理程序,防止内存泄漏
|
28
28
|
*/
|
29
|
-
unsubscribe(win: string):
|
29
|
+
unsubscribe(win: string): any;
|
30
30
|
/**
|
31
31
|
* 发送消息
|
32
32
|
*/
|
@@ -36,4 +36,3 @@ interface ISocket extends IDriver, IOpen {
|
|
36
36
|
*/
|
37
37
|
dispose(): void;
|
38
38
|
}
|
39
|
-
export default ISocket;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import ISocket from "./ISocket";
|
1
|
+
import { ISocket } from "./ISocket";
|
2
2
|
import { SubscribedWindow } from "./@types";
|
3
3
|
/**
|
4
4
|
* Socket基类
|
5
5
|
*/
|
6
|
-
declare abstract class Socket implements ISocket {
|
6
|
+
export declare abstract class Socket implements ISocket {
|
7
7
|
/**
|
8
8
|
* 类型
|
9
9
|
*/
|
@@ -21,11 +21,10 @@ declare abstract class Socket implements ISocket {
|
|
21
21
|
*/
|
22
22
|
subscribed: SubscribedWindow;
|
23
23
|
openAsync(conn?: string): Promise<void>;
|
24
|
-
abstract
|
25
|
-
subscribe(win: string, kind: string, type: string | string[]):
|
26
|
-
resubscribe():
|
27
|
-
unsubscribe(win: string):
|
24
|
+
abstract open(): Promise<void>;
|
25
|
+
subscribe(win: string, kind: string, type: string | string[]): void;
|
26
|
+
resubscribe(): void;
|
27
|
+
unsubscribe(win: string): any;
|
28
28
|
abstract send(data: any): void;
|
29
29
|
dispose(): void;
|
30
30
|
}
|
31
|
-
export default Socket;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import Factory from "../../factory
|
2
|
-
import ISocket from "./ISocket";
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import { ISocket } from "./ISocket";
|
3
|
+
import { SsoUser } from "../ssos";
|
3
4
|
/**
|
4
5
|
* Socket工厂
|
5
6
|
*/
|
6
|
-
declare class SocketFactory extends Factory<ISocket> {
|
7
|
+
export declare class SocketFactory extends Factory<ISocket> {
|
7
8
|
type: string;
|
8
9
|
open(): void;
|
9
10
|
/**
|
10
|
-
*
|
11
|
+
* 创建默认通信对象
|
11
12
|
*/
|
12
|
-
|
13
|
+
createDefaultAsync(baseUrl: string, user: SsoUser, language: string): Promise<ISocket>;
|
13
14
|
}
|
14
|
-
export default SocketFactory;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Socket响应消息
|
3
3
|
*/
|
4
|
-
declare class SocketResponse<T> {
|
4
|
+
export declare class SocketResponse<T> {
|
5
5
|
/**
|
6
6
|
* 是否执行成功
|
7
7
|
*/
|
@@ -39,4 +39,3 @@ declare class SocketResponse<T> {
|
|
39
39
|
*/
|
40
40
|
onError(message: string): void;
|
41
41
|
}
|
42
|
-
export default SocketResponse;
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { SocketProgress, SocketResponse, };
|
1
|
+
export * from "./SocketProgress";
|
2
|
+
export * from "./SocketResponse";
|
@@ -1,15 +1,22 @@
|
|
1
|
-
import Socket from "../Socket";
|
1
|
+
import { Socket } from "../Socket";
|
2
|
+
import { IHttp } from "../../https";
|
3
|
+
import { SsoUser } from "../../ssos";
|
2
4
|
/**
|
3
5
|
* 默认Socket通信工具
|
4
6
|
*/
|
5
|
-
declare class DefaultSocket extends Socket {
|
7
|
+
export declare class DefaultSocket extends Socket {
|
6
8
|
type: string;
|
7
9
|
/**
|
8
10
|
* 通信地址
|
9
11
|
*/
|
10
|
-
|
12
|
+
baseUrl: string;
|
11
13
|
/**
|
12
14
|
* socket连接对象
|
15
|
+
** readyState枚举:
|
16
|
+
** 0 - CONNECTING: 正在建立连接。
|
17
|
+
** 1 - OPEN: 连接已建立,可以通信。
|
18
|
+
** 2 - CLOSING: 连接正在关闭。
|
19
|
+
** 3 - CLOSED: 连接已经关闭或连接尝试失败。
|
13
20
|
*/
|
14
21
|
socket: WebSocket;
|
15
22
|
/**
|
@@ -17,16 +24,32 @@ declare class DefaultSocket extends Socket {
|
|
17
24
|
*/
|
18
25
|
connected: boolean;
|
19
26
|
/**
|
20
|
-
*
|
27
|
+
* 连接异常时,等待再执行一次的超时器
|
21
28
|
*/
|
22
|
-
|
29
|
+
socketTimeout: any;
|
23
30
|
/**
|
24
31
|
* Socket消息处理程序
|
25
32
|
*/
|
26
33
|
handler: (event: MessageEvent) => void;
|
27
|
-
connect(): Promise<void>;
|
28
34
|
/**
|
29
|
-
*
|
35
|
+
* 请求器,无法使用默认请求器,因为baseUrl不一样
|
36
|
+
*/
|
37
|
+
http: IHttp;
|
38
|
+
/**
|
39
|
+
* Http连接配置项
|
40
|
+
*/
|
41
|
+
options: {
|
42
|
+
user: SsoUser;
|
43
|
+
language: string;
|
44
|
+
};
|
45
|
+
openAsync(conn?: string): Promise<void>;
|
46
|
+
open(): Promise<void>;
|
47
|
+
/**
|
48
|
+
* 尝试再次开启Socket连接
|
49
|
+
*/
|
50
|
+
tryAgain(): void;
|
51
|
+
/**
|
52
|
+
* 发送消息,前端不支持发送自定义请求头
|
30
53
|
*/
|
31
54
|
send(data: any): void;
|
32
55
|
/**
|
@@ -34,4 +57,3 @@ declare class DefaultSocket extends Socket {
|
|
34
57
|
*/
|
35
58
|
dispose(): void;
|
36
59
|
}
|
37
|
-
export default DefaultSocket;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./DefaultSocket";
|
@@ -1,16 +1,9 @@
|
|
1
|
-
import { IDriver } from "../@types";
|
2
|
-
import SsoUser from "./entities
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
import { SsoUser } from "./entities";
|
3
3
|
/**
|
4
4
|
* SSO接口
|
5
5
|
*/
|
6
|
-
interface ISso extends IDriver {
|
7
|
-
/**
|
8
|
-
* 开启连接
|
9
|
-
*/
|
10
|
-
openAsync(auth: {
|
11
|
-
url: string;
|
12
|
-
app_id: string;
|
13
|
-
}): Promise<void>;
|
6
|
+
export interface ISso extends IDriver, IOpen {
|
14
7
|
/**
|
15
8
|
* 登录
|
16
9
|
*/
|
@@ -26,10 +19,9 @@ interface ISso extends IDriver {
|
|
26
19
|
/**
|
27
20
|
* 获取授权头,不能泄露域账号等用户标识
|
28
21
|
*/
|
29
|
-
getAuth(token: string, timestamp: number, sign: string,
|
22
|
+
getAuth(token: string, timestamp: number, sign: string, terminal: string, env: string): string;
|
30
23
|
/**
|
31
24
|
* 退出
|
32
25
|
*/
|
33
26
|
logout(): Promise<void>;
|
34
27
|
}
|
35
|
-
export default ISso;
|
@@ -1,18 +1,14 @@
|
|
1
|
-
import ISso from "./ISso";
|
2
|
-
import SsoUser from "./entities
|
1
|
+
import { ISso } from "./ISso";
|
2
|
+
import { SsoUser } from "./entities";
|
3
3
|
/**
|
4
4
|
* 单点登录基类
|
5
5
|
*/
|
6
|
-
declare abstract class Sso implements ISso {
|
6
|
+
export declare abstract class Sso implements ISso {
|
7
7
|
type: string;
|
8
|
-
|
9
|
-
|
10
|
-
app_id: string;
|
11
|
-
}): Promise<void>;
|
12
|
-
abstract getAuth(token: string, timestamp: number, sign: string, platform: string, env: string): string;
|
8
|
+
openAsync(conn: string): Promise<void>;
|
9
|
+
getAuth(token: string, timestamp: number, sign: string, terminal: string, env: string): string;
|
13
10
|
abstract getUser(): Promise<SsoUser>;
|
14
|
-
|
11
|
+
login(form: any): Promise<any>;
|
15
12
|
abstract loginUrl(callback_url: string): string;
|
16
13
|
abstract logout(): Promise<void>;
|
17
14
|
}
|
18
|
-
export default Sso;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import ISso from "./ISso";
|
2
|
-
import Factory from "../../factory
|
1
|
+
import { ISso } from "./ISso";
|
2
|
+
import { Factory } from "../../factory";
|
3
3
|
/**
|
4
4
|
* SSO工厂类
|
5
5
|
*/
|
6
|
-
declare class SsoFactory extends Factory<ISso> {
|
6
|
+
export declare class SsoFactory extends Factory<ISso> {
|
7
7
|
type: string;
|
8
8
|
/**
|
9
9
|
* 获取实例
|
@@ -14,4 +14,3 @@ declare class SsoFactory extends Factory<ISso> {
|
|
14
14
|
*/
|
15
15
|
createAsync(type: string, conn?: string): Promise<ISso>;
|
16
16
|
}
|
17
|
-
export default SsoFactory;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { SsoUser };
|
1
|
+
export * from "./SsoUser";
|
@@ -1,20 +1,15 @@
|
|
1
|
-
import Sso from "../Sso";
|
2
|
-
import SsoUser from "../entities
|
1
|
+
import { Sso } from "../Sso";
|
2
|
+
import { SsoUser } from "../entities";
|
3
3
|
import { IProvider } from "../../providers";
|
4
|
-
declare class AnonymousSso extends Sso {
|
4
|
+
export declare class AnonymousSso extends Sso {
|
5
5
|
type: string;
|
6
6
|
/**
|
7
7
|
* 数据库提供程序
|
8
8
|
*/
|
9
9
|
provider: IProvider;
|
10
|
-
openAsync(
|
11
|
-
url: string;
|
12
|
-
app_id: string;
|
13
|
-
}): Promise<void>;
|
14
|
-
login(form: any): Promise<any>;
|
10
|
+
openAsync(conn: string): Promise<void>;
|
15
11
|
loginUrl(callback_url: string): string;
|
16
12
|
getUser(): Promise<SsoUser>;
|
17
|
-
getAuth(token: string, timestamp: number,
|
13
|
+
getAuth(token: string, timestamp: number, sign: string, terminal: string, env: string): string;
|
18
14
|
logout(): Promise<void>;
|
19
15
|
}
|
20
|
-
export default AnonymousSso;
|
@@ -1,23 +1,18 @@
|
|
1
|
-
import Sso from "../Sso";
|
1
|
+
import { Sso } from "../Sso";
|
2
2
|
import { IProvider } from "../../providers";
|
3
|
-
import SsoUser from "../entities
|
3
|
+
import { SsoUser } from "../entities";
|
4
4
|
/**
|
5
5
|
* 默认登录授权
|
6
6
|
*/
|
7
|
-
declare class BearerSso
|
7
|
+
export declare class BearerSso extends Sso {
|
8
8
|
type: string;
|
9
9
|
/**
|
10
10
|
* 数据库提供程序
|
11
11
|
*/
|
12
12
|
provider: IProvider;
|
13
|
-
openAsync(
|
14
|
-
url: string;
|
15
|
-
app_id: string;
|
16
|
-
}): Promise<void>;
|
13
|
+
openAsync(conn: string): Promise<void>;
|
17
14
|
login(form: any): Promise<any>;
|
18
15
|
loginUrl(callback_url: string): string;
|
19
16
|
getUser(): Promise<SsoUser>;
|
20
|
-
getAuth(token: string, timestamp: number, signature: string, platform?: string, env?: string): string;
|
21
17
|
logout(): Promise<void>;
|
22
18
|
}
|
23
|
-
export default BearerSso;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
2
|
-
import SsoUser from "../entities/SsoUser";
|
1
|
+
import { SsoUser } from "../entities";
|
3
2
|
import { IProvider } from "../../providers";
|
3
|
+
import { Sso } from "../Sso";
|
4
4
|
/**
|
5
5
|
* NIO SSO实现
|
6
6
|
*/
|
7
|
-
declare class NioSso
|
7
|
+
export declare class NioSso extends Sso {
|
8
8
|
type: string;
|
9
9
|
url: string;
|
10
10
|
app_id: string;
|
@@ -12,14 +12,9 @@ declare class NioSso implements ISso {
|
|
12
12
|
* 数据库提供程序
|
13
13
|
*/
|
14
14
|
provider: IProvider;
|
15
|
-
openAsync(
|
16
|
-
url: string;
|
17
|
-
app_id: string;
|
18
|
-
}): Promise<void>;
|
15
|
+
openAsync(conn: string): Promise<void>;
|
19
16
|
login(form: any): Promise<any>;
|
20
17
|
loginUrl(callback_url: string): string;
|
21
18
|
getUser(): Promise<SsoUser>;
|
22
|
-
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
23
19
|
logout(): Promise<void>;
|
24
20
|
}
|
25
|
-
export default NioSso;
|
@@ -1,20 +1,15 @@
|
|
1
|
-
import ISso from "../ISso";
|
2
1
|
import { IProvider } from "../../providers";
|
3
|
-
import SsoUser from "../entities
|
4
|
-
|
2
|
+
import { SsoUser } from "../entities";
|
3
|
+
import { Sso } from "../Sso";
|
4
|
+
export declare class SecretSso extends Sso {
|
5
5
|
type: string;
|
6
6
|
/**
|
7
7
|
* 数据库提供程序
|
8
8
|
*/
|
9
9
|
provider: IProvider;
|
10
|
-
openAsync(
|
11
|
-
url: string;
|
12
|
-
app_id: string;
|
13
|
-
}): Promise<void>;
|
10
|
+
openAsync(conn: string): Promise<void>;
|
14
11
|
login(form: any): Promise<any>;
|
15
12
|
loginUrl(callback_url: string): string;
|
16
13
|
getUser(): Promise<SsoUser>;
|
17
|
-
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
18
14
|
logout(): Promise<void>;
|
19
15
|
}
|
20
|
-
export default SecretSso;
|
@@ -1,17 +1,11 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import { SsoUser } from "../entities";
|
2
|
+
import { Sso } from "../Sso";
|
3
3
|
/**
|
4
4
|
* 微信登录
|
5
5
|
*/
|
6
|
-
declare class WeiXinSso
|
6
|
+
export declare class WeiXinSso extends Sso {
|
7
7
|
type: string;
|
8
|
-
openAsync(auth: {
|
9
|
-
url: string;
|
10
|
-
}): Promise<void>;
|
11
|
-
login(form: any): Promise<any>;
|
12
8
|
loginUrl(callback_url: string): string;
|
13
9
|
getUser(): Promise<SsoUser>;
|
14
|
-
getAuth(token: string, timestamp: number, signature: string, env: string): string;
|
15
10
|
logout(): Promise<void>;
|
16
11
|
}
|
17
|
-
export default WeiXinSso;
|
@@ -2,7 +2,7 @@ import { IDriver, IDispose } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* 任务接口
|
4
4
|
*/
|
5
|
-
interface ITask extends IDriver, IDispose {
|
5
|
+
export interface ITask extends IDriver, IDispose {
|
6
6
|
/**
|
7
7
|
* 任务并发数量限制
|
8
8
|
*/
|
@@ -31,4 +31,3 @@ interface ITask extends IDriver, IDispose {
|
|
31
31
|
*/
|
32
32
|
interval(ms: number, task: () => void): void;
|
33
33
|
}
|
34
|
-
export default ITask;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import ITask from "./ITask";
|
1
|
+
import { ITask } from "./ITask";
|
2
2
|
/**
|
3
3
|
* 任务基类
|
4
4
|
*/
|
5
|
-
declare abstract class Task implements ITask {
|
5
|
+
export declare abstract class Task implements ITask {
|
6
6
|
type: string;
|
7
7
|
taskLimit: number;
|
8
8
|
abstract execute<T>(entities: T[], threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
@@ -12,4 +12,3 @@ declare abstract class Task implements ITask {
|
|
12
12
|
abstract interval(ms: number, task: () => void): void;
|
13
13
|
abstract dispose(): void;
|
14
14
|
}
|
15
|
-
export default Task;
|
@@ -1,10 +1,13 @@
|
|
1
|
-
import Factory from "../../factory
|
2
|
-
import ITask from "./ITask";
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import { ITask } from "./ITask";
|
3
3
|
/**
|
4
4
|
* 任务工厂类
|
5
5
|
*/
|
6
|
-
declare class TaskFactory extends Factory<ITask> {
|
6
|
+
export declare class TaskFactory extends Factory<ITask> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
|
+
/**
|
10
|
+
* 创建内存任务
|
11
|
+
*/
|
12
|
+
createMemory(): ITask;
|
9
13
|
}
|
10
|
-
export default TaskFactory;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import Task from "../Task";
|
1
|
+
import { Task } from "../Task";
|
2
2
|
/**
|
3
3
|
* 内存任务
|
4
4
|
*/
|
5
|
-
declare class MemoryTask extends Task {
|
5
|
+
export declare class MemoryTask extends Task {
|
6
6
|
type: string;
|
7
7
|
intervalTimeout: any;
|
8
8
|
execute<T>(entities: T[], threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
@@ -20,11 +20,10 @@ declare class MemoryTask extends Task {
|
|
20
20
|
/**
|
21
21
|
* 按照并发执行
|
22
22
|
*/
|
23
|
-
private
|
23
|
+
private runAsync;
|
24
24
|
lastDebounceTime: number;
|
25
25
|
lastDebounceTimeout: any;
|
26
26
|
debounce: (fn: (args: any) => Promise<void>, time: number, args?: any) => void;
|
27
27
|
interval(ms: number, task: () => void): void;
|
28
28
|
dispose(): void;
|
29
29
|
}
|
30
|
-
export default MemoryTask;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./MemoryTask";
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { type ITask, TaskFactory };
|
1
|
+
export * from "./ITask";
|
2
|
+
export * from "./TaskFactory";
|
@@ -2,10 +2,9 @@ import { IDriver } from "../@types";
|
|
2
2
|
/**
|
3
3
|
* 模板引擎接口
|
4
4
|
*/
|
5
|
-
interface ITemplate extends IDriver {
|
5
|
+
export interface ITemplate extends IDriver {
|
6
6
|
/**
|
7
7
|
* 模板渲染
|
8
8
|
*/
|
9
9
|
renderAsync(template: string, model: any): Promise<string>;
|
10
10
|
}
|
11
|
-
export default ITemplate;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import ITemplate from "./ITemplate";
|
2
|
-
declare abstract class Template implements ITemplate {
|
1
|
+
import { ITemplate } from "./ITemplate";
|
2
|
+
export declare abstract class Template implements ITemplate {
|
3
3
|
type: string;
|
4
4
|
abstract renderAsync(template: string, model: any): Promise<string>;
|
5
5
|
}
|
6
|
-
export default Template;
|
@@ -1,10 +1,13 @@
|
|
1
|
-
import Factory from "../../factory
|
2
|
-
import ITemplate from "./ITemplate";
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import { ITemplate } from "./ITemplate";
|
3
3
|
/**
|
4
4
|
* 模板工厂
|
5
5
|
*/
|
6
|
-
declare class TemplateFactory extends Factory<ITemplate> {
|
6
|
+
export declare class TemplateFactory extends Factory<ITemplate> {
|
7
7
|
type: string;
|
8
8
|
open(): void;
|
9
|
+
/**
|
10
|
+
* 创建Liquid模板引擎
|
11
|
+
*/
|
12
|
+
createLiquid(): ITemplate;
|
9
13
|
}
|
10
|
-
export default TemplateFactory;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import Template from "../Template";
|
2
|
-
declare class LiquidTemplate extends Template {
|
1
|
+
import { Template } from "../Template";
|
2
|
+
export declare class LiquidTemplate extends Template {
|
3
3
|
type: string;
|
4
4
|
renderAsync(template: string, model: any): Promise<string>;
|
5
5
|
}
|
6
|
-
export default LiquidTemplate;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./LiquidTemplate";
|
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { type ITemplate, TemplateFactory };
|
1
|
+
export * from "./ITemplate";
|
2
|
+
export * from "./TemplateFactory";
|