xpe 0.0.0-alpha.1
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/LICENSE +21 -0
- package/README.md +71 -0
- package/framework/es/core/Application.d.ts +126 -0
- package/framework/es/core/Command/Command.d.ts +7 -0
- package/framework/es/core/Container/Container.d.ts +80 -0
- package/framework/es/core/Contracts/AxiosAdapter.d.ts +12 -0
- package/framework/es/core/Helper/Helper.d.ts +43 -0
- package/framework/es/core/Helper/Storage/WebStorage.d.ts +71 -0
- package/framework/es/core/Libs/Exception.d.ts +24 -0
- package/framework/es/core/Libs/Lib.d.ts +72 -0
- package/framework/es/core/Provider/CommandProvider.d.ts +4 -0
- package/framework/es/core/Provider/HelperProvider.d.ts +4 -0
- package/framework/es/core/Provider/HttpProvider.d.ts +13 -0
- package/framework/es/core/Provider/ServiceProvider.d.ts +15 -0
- package/framework/es/core/Service/HttpService.d.ts +133 -0
- package/framework/es/core/Service/Service.d.ts +6 -0
- package/framework/es/core/Spanner/RESTful.d.ts +30 -0
- package/framework/es/core/Transformer/Transformer.d.ts +46 -0
- package/framework/es/core/Type/adapters.d.ts +25 -0
- package/framework/es/core/Type/types.d.ts +161 -0
- package/framework/es/core/TypeFunc/index.d.ts +6 -0
- package/framework/es/core/Wrenches/EventBus.d.ts +56 -0
- package/framework/es/core/Wrenches/is.d.ts +19 -0
- package/framework/es/ege.js +4 -0
- package/framework/es/ege.js.map +1 -0
- package/framework/es/index.d.ts +13 -0
- package/framework/es/pdd.js +4 -0
- package/framework/es/pdd.js.map +1 -0
- package/framework/es/src/core/Application.d.ts +127 -0
- package/framework/es/src/core/Application.d.ts.map +1 -0
- package/framework/es/src/core/Command/Command.d.ts +8 -0
- package/framework/es/src/core/Command/Command.d.ts.map +1 -0
- package/framework/es/src/core/Container/Container.d.ts +81 -0
- package/framework/es/src/core/Container/Container.d.ts.map +1 -0
- package/framework/es/src/core/Contracts/AxiosAdapter.d.ts +13 -0
- package/framework/es/src/core/Contracts/AxiosAdapter.d.ts.map +1 -0
- package/framework/es/src/core/Helper/Helper.d.ts +45 -0
- package/framework/es/src/core/Helper/Helper.d.ts.map +1 -0
- package/framework/es/src/core/Helper/Storage/WebStorage.d.ts +72 -0
- package/framework/es/src/core/Helper/Storage/WebStorage.d.ts.map +1 -0
- package/framework/es/src/core/Libs/Exception.d.ts +25 -0
- package/framework/es/src/core/Libs/Exception.d.ts.map +1 -0
- package/framework/es/src/core/Libs/Lib.d.ts +73 -0
- package/framework/es/src/core/Libs/Lib.d.ts.map +1 -0
- package/framework/es/src/core/Provider/CommandProvider.d.ts +5 -0
- package/framework/es/src/core/Provider/CommandProvider.d.ts.map +1 -0
- package/framework/es/src/core/Provider/HelperProvider.d.ts +5 -0
- package/framework/es/src/core/Provider/HelperProvider.d.ts.map +1 -0
- package/framework/es/src/core/Provider/HttpProvider.d.ts +14 -0
- package/framework/es/src/core/Provider/HttpProvider.d.ts.map +1 -0
- package/framework/es/src/core/Provider/ServiceProvider.d.ts +16 -0
- package/framework/es/src/core/Provider/ServiceProvider.d.ts.map +1 -0
- package/framework/es/src/core/Service/HttpService.d.ts +128 -0
- package/framework/es/src/core/Service/HttpService.d.ts.map +1 -0
- package/framework/es/src/core/Service/Service.d.ts +7 -0
- package/framework/es/src/core/Service/Service.d.ts.map +1 -0
- package/framework/es/src/core/Spanner/RESTful.d.ts +32 -0
- package/framework/es/src/core/Spanner/RESTful.d.ts.map +1 -0
- package/framework/es/src/core/Transformer/Transformer.d.ts +47 -0
- package/framework/es/src/core/Transformer/Transformer.d.ts.map +1 -0
- package/framework/es/src/core/Type/adapters.d.ts +26 -0
- package/framework/es/src/core/Type/adapters.d.ts.map +1 -0
- package/framework/es/src/core/Type/types.d.ts +186 -0
- package/framework/es/src/core/Type/types.d.ts.map +1 -0
- package/framework/es/src/core/TypeFunc/index.d.ts +8 -0
- package/framework/es/src/core/TypeFunc/index.d.ts.map +1 -0
- package/framework/es/src/core/Wrenches/EventBus.d.ts +57 -0
- package/framework/es/src/core/Wrenches/EventBus.d.ts.map +1 -0
- package/framework/es/src/core/Wrenches/is.d.ts +20 -0
- package/framework/es/src/core/Wrenches/is.d.ts.map +1 -0
- package/framework/es/src/index.d.ts +14 -0
- package/framework/es/src/index.d.ts.map +1 -0
- package/framework/es/src/utils.d.ts +17 -0
- package/framework/es/src/utils.d.ts.map +1 -0
- package/framework/es/utils.d.ts +16 -0
- package/framework/umd/core/Application.d.ts +126 -0
- package/framework/umd/core/Command/Command.d.ts +7 -0
- package/framework/umd/core/Container/Container.d.ts +80 -0
- package/framework/umd/core/Contracts/AxiosAdapter.d.ts +12 -0
- package/framework/umd/core/Helper/Helper.d.ts +43 -0
- package/framework/umd/core/Helper/Storage/WebStorage.d.ts +71 -0
- package/framework/umd/core/Libs/Exception.d.ts +24 -0
- package/framework/umd/core/Libs/Lib.d.ts +72 -0
- package/framework/umd/core/Provider/CommandProvider.d.ts +4 -0
- package/framework/umd/core/Provider/HelperProvider.d.ts +4 -0
- package/framework/umd/core/Provider/HttpProvider.d.ts +13 -0
- package/framework/umd/core/Provider/ServiceProvider.d.ts +15 -0
- package/framework/umd/core/Service/HttpService.d.ts +133 -0
- package/framework/umd/core/Service/Service.d.ts +6 -0
- package/framework/umd/core/Spanner/RESTful.d.ts +30 -0
- package/framework/umd/core/Transformer/Transformer.d.ts +46 -0
- package/framework/umd/core/Type/adapters.d.ts +25 -0
- package/framework/umd/core/Type/types.d.ts +161 -0
- package/framework/umd/core/TypeFunc/index.d.ts +6 -0
- package/framework/umd/core/Wrenches/EventBus.d.ts +56 -0
- package/framework/umd/core/Wrenches/is.d.ts +19 -0
- package/framework/umd/ege.js +4 -0
- package/framework/umd/ege.js.map +1 -0
- package/framework/umd/index.d.ts +13 -0
- package/framework/umd/pdd.js +4 -0
- package/framework/umd/pdd.js.map +1 -0
- package/framework/umd/src/core/Application.d.ts +127 -0
- package/framework/umd/src/core/Application.d.ts.map +1 -0
- package/framework/umd/src/core/Command/Command.d.ts +8 -0
- package/framework/umd/src/core/Command/Command.d.ts.map +1 -0
- package/framework/umd/src/core/Container/Container.d.ts +81 -0
- package/framework/umd/src/core/Container/Container.d.ts.map +1 -0
- package/framework/umd/src/core/Contracts/AxiosAdapter.d.ts +13 -0
- package/framework/umd/src/core/Contracts/AxiosAdapter.d.ts.map +1 -0
- package/framework/umd/src/core/Helper/Helper.d.ts +45 -0
- package/framework/umd/src/core/Helper/Helper.d.ts.map +1 -0
- package/framework/umd/src/core/Helper/Storage/WebStorage.d.ts +72 -0
- package/framework/umd/src/core/Helper/Storage/WebStorage.d.ts.map +1 -0
- package/framework/umd/src/core/Libs/Exception.d.ts +25 -0
- package/framework/umd/src/core/Libs/Exception.d.ts.map +1 -0
- package/framework/umd/src/core/Libs/Lib.d.ts +73 -0
- package/framework/umd/src/core/Libs/Lib.d.ts.map +1 -0
- package/framework/umd/src/core/Provider/CommandProvider.d.ts +5 -0
- package/framework/umd/src/core/Provider/CommandProvider.d.ts.map +1 -0
- package/framework/umd/src/core/Provider/HelperProvider.d.ts +5 -0
- package/framework/umd/src/core/Provider/HelperProvider.d.ts.map +1 -0
- package/framework/umd/src/core/Provider/HttpProvider.d.ts +14 -0
- package/framework/umd/src/core/Provider/HttpProvider.d.ts.map +1 -0
- package/framework/umd/src/core/Provider/ServiceProvider.d.ts +16 -0
- package/framework/umd/src/core/Provider/ServiceProvider.d.ts.map +1 -0
- package/framework/umd/src/core/Service/HttpService.d.ts +128 -0
- package/framework/umd/src/core/Service/HttpService.d.ts.map +1 -0
- package/framework/umd/src/core/Service/Service.d.ts +7 -0
- package/framework/umd/src/core/Service/Service.d.ts.map +1 -0
- package/framework/umd/src/core/Spanner/RESTful.d.ts +32 -0
- package/framework/umd/src/core/Spanner/RESTful.d.ts.map +1 -0
- package/framework/umd/src/core/Transformer/Transformer.d.ts +47 -0
- package/framework/umd/src/core/Transformer/Transformer.d.ts.map +1 -0
- package/framework/umd/src/core/Type/adapters.d.ts +26 -0
- package/framework/umd/src/core/Type/adapters.d.ts.map +1 -0
- package/framework/umd/src/core/Type/types.d.ts +186 -0
- package/framework/umd/src/core/Type/types.d.ts.map +1 -0
- package/framework/umd/src/core/TypeFunc/index.d.ts +8 -0
- package/framework/umd/src/core/TypeFunc/index.d.ts.map +1 -0
- package/framework/umd/src/core/Wrenches/EventBus.d.ts +57 -0
- package/framework/umd/src/core/Wrenches/EventBus.d.ts.map +1 -0
- package/framework/umd/src/core/Wrenches/is.d.ts +20 -0
- package/framework/umd/src/core/Wrenches/is.d.ts.map +1 -0
- package/framework/umd/src/index.d.ts +14 -0
- package/framework/umd/src/index.d.ts.map +1 -0
- package/framework/umd/src/utils.d.ts +17 -0
- package/framework/umd/src/utils.d.ts.map +1 -0
- package/framework/umd/utils.d.ts +16 -0
- package/index.d.ts +724 -0
- package/package.json +57 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helper.d.ts","sourceRoot":"","sources":["../../../../src/core/Helper/Helper.ts"],"names":[],"mappings":"AAMA,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,OAAO,EAER,MAAM,eAAe,CAAA;AA0BtB;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAQ,YAAW,OAAO;IACrD,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IAI9B,OAAO,CAAC,UAAU;IAoBlB;;;;OAIG;IACI,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IAK7D,MAAM;IAEb;;;;OAIG;IACI,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IAIpE;;;;;;OAMG;IAKU,IAAI,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAK;IA0BzC;;;;;;;OAOG;IAGU,IAAI,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,MAAM,KAAA,EAAE,cAAc,UAAO;IAoB3D,SAAS,IAAI,IAAI;IAExB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IACvC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI;IAO1C,OAAO,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,MAAM,KAAA;CAC1B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare type Type = "localStorage" | "sessionStorage";
|
|
2
|
+
/**
|
|
3
|
+
* Class WebStorage
|
|
4
|
+
* 浏览器存储
|
|
5
|
+
*/
|
|
6
|
+
export default class WebStorage {
|
|
7
|
+
type: Type;
|
|
8
|
+
storage: Storage;
|
|
9
|
+
/**
|
|
10
|
+
* constructor
|
|
11
|
+
* @param {String} type 存储类型
|
|
12
|
+
*/
|
|
13
|
+
constructor({ type }: {
|
|
14
|
+
type: Type;
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* get get|getAll storage
|
|
18
|
+
* @param key
|
|
19
|
+
*/
|
|
20
|
+
get(key?: string): string | any;
|
|
21
|
+
/**
|
|
22
|
+
* set
|
|
23
|
+
* Set storage 保持/设置数据
|
|
24
|
+
* @param key
|
|
25
|
+
* @param value
|
|
26
|
+
*/
|
|
27
|
+
set(key: string, value: string | any[] | Record<any, any>): void;
|
|
28
|
+
/**
|
|
29
|
+
* save
|
|
30
|
+
* Save storage as set set的别名
|
|
31
|
+
* @param key
|
|
32
|
+
* @param value
|
|
33
|
+
*/
|
|
34
|
+
save(key: string, value: string | any[] | Record<any, any>): void;
|
|
35
|
+
/**
|
|
36
|
+
* delete
|
|
37
|
+
* Delete storage 删除一个或数组内多个
|
|
38
|
+
* @param {String|Array<string>} key
|
|
39
|
+
*/
|
|
40
|
+
delete(key: string | string[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* remove
|
|
43
|
+
* Remove storage as delete delete的别名
|
|
44
|
+
* @param key
|
|
45
|
+
*/
|
|
46
|
+
remove(key: string | string[]): void;
|
|
47
|
+
/**
|
|
48
|
+
* clear
|
|
49
|
+
* Clear storage 清空
|
|
50
|
+
*/
|
|
51
|
+
clear(): void;
|
|
52
|
+
/**
|
|
53
|
+
* keys
|
|
54
|
+
* Get storage keys 获取全部键
|
|
55
|
+
* @return keys
|
|
56
|
+
*/
|
|
57
|
+
keys(): string[];
|
|
58
|
+
/**
|
|
59
|
+
* getAll
|
|
60
|
+
* Get storage key & val 获取全部键值对
|
|
61
|
+
*/
|
|
62
|
+
getAll(): Record<any, any>;
|
|
63
|
+
/**
|
|
64
|
+
* setConfig
|
|
65
|
+
* @param type
|
|
66
|
+
*/
|
|
67
|
+
setConfig({ type }: {
|
|
68
|
+
type: Type;
|
|
69
|
+
}): void;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=WebStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebStorage.d.ts","sourceRoot":"","sources":["../../../../src/core/Helper/Storage/WebStorage.ts"],"names":[],"mappings":"AAGA,aAAK,IAAI,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAEtB,IAAI,EAAE,IAAI,CAAkB;IAE5B,OAAO,UAAgE;IAE9E;;;OAGG;gBACS,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;IAIpC;;;OAGG;IACI,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG;IAUtC;;;;;OAKG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAUvE;;;;;OAKG;IACI,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAIxE;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAY3C;;;;OAIG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAI3C;;;OAGG;IACI,KAAK,IAAI,IAAI;IAIpB;;;;OAIG;IACI,IAAI,IAAI,MAAM,EAAE;IAKvB;;;OAGG;IACI,MAAM,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IAKjC;;;OAGG;IACI,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;CAG1C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exception Class
|
|
3
|
+
* 目前原生的错误类型
|
|
4
|
+
* Error [一般错误类型]
|
|
5
|
+
* SyntaxError [语法错误]
|
|
6
|
+
* ReferenceError [不存在的变量]
|
|
7
|
+
* RangeError [超出有效范围]
|
|
8
|
+
* TypeError [非预期类型]
|
|
9
|
+
* URIError [URI参数错误]
|
|
10
|
+
* EvalError [eval函数没有正确执行]
|
|
11
|
+
* Example: throw new Exception() catch(error) error.name,error.message,error.code,error.stack
|
|
12
|
+
*/
|
|
13
|
+
export default class Exception extends Error {
|
|
14
|
+
name: string;
|
|
15
|
+
message: string;
|
|
16
|
+
code: number;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param {String} name 错误名称
|
|
20
|
+
* @param {String} message 错误提示
|
|
21
|
+
* @param {Number} code 错误码
|
|
22
|
+
*/
|
|
23
|
+
constructor(name: string, message: string, code?: number);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Exception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exception.d.ts","sourceRoot":"","sources":["../../../../src/core/Libs/Exception.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,KAAK;IAEnC,IAAI,SAAW;IAEf,OAAO,SAAmB;IAE1B,IAAI,SAAO;IAElB;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAY;CAM9D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare type variableType = "string" | "number" | "object" | "undefined" | "function" | "boolean" | "bigInt" | "symbol";
|
|
2
|
+
declare type TrimType = "R" | "L" | "";
|
|
3
|
+
/**
|
|
4
|
+
* Class Lib
|
|
5
|
+
* 基础函数库,Lodash、Underscore... So big
|
|
6
|
+
*/
|
|
7
|
+
export default class Lib {
|
|
8
|
+
/**
|
|
9
|
+
* typeOf 判断变量类型
|
|
10
|
+
* @param value
|
|
11
|
+
* @param type
|
|
12
|
+
*/
|
|
13
|
+
static typeOf<T>(value: unknown, type: variableType): value is T;
|
|
14
|
+
/**
|
|
15
|
+
* getTag 判断变量类型
|
|
16
|
+
* @param value
|
|
17
|
+
*/
|
|
18
|
+
static getTag(value: unknown): string;
|
|
19
|
+
/**
|
|
20
|
+
* isFunction 是否函数
|
|
21
|
+
* @param {Function} value
|
|
22
|
+
* @return {Boolean}
|
|
23
|
+
*/
|
|
24
|
+
static isFunction(value: unknown): value is typeof Function;
|
|
25
|
+
/**
|
|
26
|
+
* isString 是否字符串
|
|
27
|
+
* @param {String} value
|
|
28
|
+
* @return {Boolean}
|
|
29
|
+
*/
|
|
30
|
+
static isString(value: unknown): value is string;
|
|
31
|
+
/**
|
|
32
|
+
* isNumber 是否数字
|
|
33
|
+
* @param value
|
|
34
|
+
* @return {Boolean}
|
|
35
|
+
*/
|
|
36
|
+
static isNumber(value: unknown): value is number;
|
|
37
|
+
/**
|
|
38
|
+
* isObject 是否对象
|
|
39
|
+
* @param {Object} value
|
|
40
|
+
*/
|
|
41
|
+
static isObject(value: unknown): value is Record<any, any>;
|
|
42
|
+
/**
|
|
43
|
+
* isObject 是否Undefined
|
|
44
|
+
* @param {*} value
|
|
45
|
+
* @return boolean
|
|
46
|
+
*/
|
|
47
|
+
static isUndefined(value: unknown): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* isNull 是否Null
|
|
50
|
+
* @param value
|
|
51
|
+
*/
|
|
52
|
+
static isNull(value: unknown): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* isEmpty 是否空
|
|
55
|
+
* 目前只对 null undefined '' {} [] 做处理
|
|
56
|
+
* @param value
|
|
57
|
+
*/
|
|
58
|
+
static isEmpty(value: unknown): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* isClass 是否类
|
|
61
|
+
* @param value
|
|
62
|
+
*/
|
|
63
|
+
static isClass(value: unknown): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 字符串去除首尾字符
|
|
66
|
+
* @param str 字符串
|
|
67
|
+
* @param char 字符
|
|
68
|
+
* @param type 类型
|
|
69
|
+
*/
|
|
70
|
+
static strTrim(str: string, char: string, type?: TrimType): string;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=Lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lib.d.ts","sourceRoot":"","sources":["../../../../src/core/Libs/Lib.ts"],"names":[],"mappings":"AAAA,aAAK,YAAY,GACb,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,UAAU,GACV,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AAEb,aAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,GAAG;IACtB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,KAAK,IAAI,CAAC;IAIhE;;;OAGG;WACW,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAI5C;;;;OAIG;WACW,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,QAAQ;IAMlE;;;;OAIG;WACW,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM;IAMvD;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM;IAIhD;;;OAGG;WACW,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;IAIjE;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAI3C;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAItC;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAavC;;;OAGG;WACW,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IA2B9C;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ;CAc1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandProvider.d.ts","sourceRoot":"","sources":["../../../../src/core/Provider/CommandProvider.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,eAAe;IACnD,QAAQ,IAAI,IAAI;CAKxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelperProvider.d.ts","sourceRoot":"","sources":["../../../../src/core/Provider/HelperProvider.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,eAAe;IAClD,QAAQ,IAAI,IAAI;CAKxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ServiceProvider from "./ServiceProvider";
|
|
2
|
+
/**
|
|
3
|
+
* @name HttpProvider
|
|
4
|
+
* @description HTTP服务提供者,对HTTP服务进行注册
|
|
5
|
+
*/
|
|
6
|
+
export default class HttpProvider extends ServiceProvider {
|
|
7
|
+
/**
|
|
8
|
+
* Method Register
|
|
9
|
+
* 注册服务
|
|
10
|
+
* @protected
|
|
11
|
+
*/
|
|
12
|
+
register(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=HttpProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpProvider.d.ts","sourceRoot":"","sources":["../../../../src/core/Provider/HttpProvider.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACvD;;;;OAIG;IACI,QAAQ,IAAI,IAAI;CA2ExB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IApplicationInstance } from '../Type/types';
|
|
2
|
+
export default abstract class ServiceProvider {
|
|
3
|
+
protected app: import("../Type/types").IApplication;
|
|
4
|
+
/**
|
|
5
|
+
* constructor
|
|
6
|
+
* @param app Application instance
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
constructor(app: IApplicationInstance);
|
|
10
|
+
/**
|
|
11
|
+
* register
|
|
12
|
+
* 注册 provider
|
|
13
|
+
*/
|
|
14
|
+
register(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ServiceProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceProvider.d.ts","sourceRoot":"","sources":["../../../../src/core/Provider/ServiceProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEzD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,eAAe;IAE3C,SAAS,CAAC,GAAG,uCAAA;IAEb;;;;OAIG;gBACS,GAAG,EAAE,oBAAoB;IAKrC;;;OAGG;IACI,QAAQ,IAAI,IAAI;CAGxB"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import Service from './Service';
|
|
2
|
+
import type { TContentType, TCarryData, TApiRoute, IHttpSendConfig, RequestMethod, HTTP_SERVICE_CONFIG, DATA_CARRYING } from '../Type/types';
|
|
3
|
+
import type { UtilityObject } from '../Type/utility';
|
|
4
|
+
declare type IApplicationInstance = any;
|
|
5
|
+
/**
|
|
6
|
+
* Class HttpService
|
|
7
|
+
*/
|
|
8
|
+
export default class HttpService extends Service {
|
|
9
|
+
_http: any;
|
|
10
|
+
_api: UtilityObject;
|
|
11
|
+
_headers: Record<string, any>;
|
|
12
|
+
_host: string;
|
|
13
|
+
_isRESTful: boolean;
|
|
14
|
+
_carryingData: UtilityObject;
|
|
15
|
+
_mode: TContentType;
|
|
16
|
+
$helper: null;
|
|
17
|
+
_requestMiddleware: CallableFunction;
|
|
18
|
+
_responseMiddleware: CallableFunction;
|
|
19
|
+
_context: any;
|
|
20
|
+
/**
|
|
21
|
+
* _contentType Request type 请求类型
|
|
22
|
+
* 'application/json' 为 Request Payload 请求方式
|
|
23
|
+
* 'application/x-www-form-urlencoded;charset=UTF-8' 为 Form Data 请求方式 需QS配合使用
|
|
24
|
+
* OTHER Query String Parameters 为 _method = 'GET'
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Constructor
|
|
28
|
+
* @param {Object} app
|
|
29
|
+
* @param {Object} HTTP_ADAPTER
|
|
30
|
+
* @param {String} HTTP_API
|
|
31
|
+
* @param {String} HTTP_HOST
|
|
32
|
+
* @param {Boolean} IS_RESTFUL
|
|
33
|
+
* @param {String} CONTENT_TYPE
|
|
34
|
+
* @param {Object} DATA_CARRYING
|
|
35
|
+
* @param {Function} REQUEST_MIDDLEWARE
|
|
36
|
+
* @param {Function} RESPONSE_MIDDLEWARE
|
|
37
|
+
*/
|
|
38
|
+
constructor(app: IApplicationInstance, { HTTP_ADAPTER, HTTP_API, HTTP_HOST, IS_RESTFUL, CONTENT_TYPE, DATA_CARRYING, REQUEST_MIDDLEWARE, RESPONSE_MIDDLEWARE }: HTTP_SERVICE_CONFIG);
|
|
39
|
+
/**
|
|
40
|
+
* Method setContentType 设置请求类型
|
|
41
|
+
* @param {String} mode
|
|
42
|
+
*/
|
|
43
|
+
setContentType(mode: TContentType): void;
|
|
44
|
+
/**
|
|
45
|
+
* Method setDataCarry 处理携带数据
|
|
46
|
+
* @param {*} REQUEST_HEADERS
|
|
47
|
+
* @param {*} REQUEST_DATA
|
|
48
|
+
*/
|
|
49
|
+
setDataCarry(REQUEST_HEADERS: DATA_CARRYING['REQUEST_HEADERS'], REQUEST_DATA: DATA_CARRYING['REQUEST_DATA']): void;
|
|
50
|
+
/**
|
|
51
|
+
* Method carryingHandle 携带数据处理
|
|
52
|
+
* @param {String} name
|
|
53
|
+
* @param {*} val
|
|
54
|
+
* @param {*} type
|
|
55
|
+
*/
|
|
56
|
+
carryingHandle(name: string, val: any, type?: TCarryData): void;
|
|
57
|
+
/**
|
|
58
|
+
* Method http 发送一个请求
|
|
59
|
+
* @param api
|
|
60
|
+
* @param {JSON} data
|
|
61
|
+
* @param headers
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
http(api: string | TApiRoute, data: Record<string, any>, headers: Record<string, any>): Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* Send Request
|
|
67
|
+
* @returns {Promise<*|*>}
|
|
68
|
+
* @param returnResponse 返回响应数据
|
|
69
|
+
*/
|
|
70
|
+
request(returnResponse: boolean): Promise<any>;
|
|
71
|
+
/**
|
|
72
|
+
* Method Send
|
|
73
|
+
* 发送一个自定义请求
|
|
74
|
+
* @param apiRoute
|
|
75
|
+
* @param data
|
|
76
|
+
* @param config
|
|
77
|
+
* @param returnResponse
|
|
78
|
+
* @returns {Promise<void>}
|
|
79
|
+
*/
|
|
80
|
+
send(apiRoute: string | TApiRoute, data: Record<string, any>, config?: IHttpSendConfig, returnResponse?: boolean): Promise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* 制作一个发型,目前发型用于二次请求相关
|
|
83
|
+
* @param apiRoute
|
|
84
|
+
*/
|
|
85
|
+
makeHairstyle(apiRoute: string | TApiRoute): TApiRoute;
|
|
86
|
+
/**
|
|
87
|
+
* Method getParameters
|
|
88
|
+
* 从Api里读取请求方法、参数和地址
|
|
89
|
+
* @param {*} apiRoute
|
|
90
|
+
* @param {*} data
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
getParameters(apiRoute: string | TApiRoute, data: Record<string, any>): {
|
|
94
|
+
api: string;
|
|
95
|
+
url: string;
|
|
96
|
+
method: string | undefined;
|
|
97
|
+
type: TContentType;
|
|
98
|
+
data: any;
|
|
99
|
+
auth: boolean | undefined;
|
|
100
|
+
hairstyle: (string | boolean | [RequestMethod, TContentType] | undefined)[];
|
|
101
|
+
body: Record<string, any>;
|
|
102
|
+
payload: any;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Method setHeaders
|
|
106
|
+
* 设置Headers multiple
|
|
107
|
+
* @param {JSON|Object} config
|
|
108
|
+
*/
|
|
109
|
+
setHeaders(config?: {}): void;
|
|
110
|
+
getHeaders(): Record<string, any>;
|
|
111
|
+
/**
|
|
112
|
+
* Method setHeader
|
|
113
|
+
* 设置Headers single
|
|
114
|
+
* @param {String} name
|
|
115
|
+
* @param {String} val
|
|
116
|
+
*/
|
|
117
|
+
setHeader(name: string, val: any): void;
|
|
118
|
+
deleteHeader(name: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Method setData
|
|
121
|
+
* 设置携带数据 通过Data
|
|
122
|
+
* @param {*} name
|
|
123
|
+
* @param {*} val
|
|
124
|
+
*/
|
|
125
|
+
setData(name: string, val: any): void;
|
|
126
|
+
}
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=HttpService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpService.d.ts","sourceRoot":"","sources":["../../../../src/core/Service/HttpService.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAS/B,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EAEV,SAAS,EACT,eAAe,EACf,aAAa,EAEb,mBAAmB,EACnB,aAAa,EACd,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGpD,aAAK,oBAAoB,GAAG,GAAG,CAAA;AAE/B;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAE9C,KAAK,EAAE,GAAG,CAAO;IAEjB,IAAI,EAAE,aAAa,CAAK;IAExB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAK;IAElC,KAAK,SAAK;IAEV,UAAU,UAAO;IAEjB,aAAa,EAAE,aAAa,CAAK;IAEjC,KAAK,EAAE,YAAY,CAAoB;IAEvC,OAAO,OAAO;IAEd,kBAAkB,EAAE,gBAAgB,CAAA;IAEpC,mBAAmB,EAAE,gBAAgB,CAAA;IAErC,QAAQ,EAAE,GAAG,CAGZ;IAED;;;;;OAKG;IAIH;;;;;;;;;;;OAWG;gBAGD,GAAG,EAAE,oBAAoB,EACzB,EACE,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACpB,EAAE,mBAAmB;IAkCxB;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY;IAejC;;;;OAIG;IACH,YAAY,CACV,eAAe,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACjD,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC;IAoB7C;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,GAAE,UAA8B;IAkC3E;;;;;;OAMG;IACG,IAAI,CACR,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IA+E9B;;;;OAIG;IACG,OAAO,CAAC,cAAc,EAAE,OAAO;IAkErC;;;;;;;;OAQG;IACG,IAAI,CACR,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,MAAM,GAAE,eAAoB,EAC5B,cAAc,UAAQ;IAuBxB;;;OAGG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAyCtD;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;IAkDrE;;;;OAIG;IACH,UAAU,CAAC,MAAM,KAAK;IAItB,UAAU;IAIV;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;IAKhC,YAAY,CAAC,IAAI,EAAE,MAAM;IAIzB;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;CAO/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../../src/core/Service/Service.ts"],"names":[],"mappings":"AACA,aAAK,oBAAoB,GAAG,GAAG,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,OAAO;IACnC,SAAS,CAAC,GAAG,EAAE,oBAAoB,CAAC;gBAExB,GAAG,EAAE,oBAAoB;CAGtC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { UtilityObject } from '../Type/utility';
|
|
2
|
+
/**
|
|
3
|
+
* Class RESTful
|
|
4
|
+
* RESTful处理类
|
|
5
|
+
* @author SunnyXu <xy@ztes.com>
|
|
6
|
+
*/
|
|
7
|
+
export default class RESTful {
|
|
8
|
+
private readonly isRESTful;
|
|
9
|
+
private api;
|
|
10
|
+
private readonly requestData;
|
|
11
|
+
/**
|
|
12
|
+
* Method constructor
|
|
13
|
+
* @param {String} api
|
|
14
|
+
* @param {*} data
|
|
15
|
+
* @param {*} mode
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
constructor(api: string, data: UtilityObject, mode: boolean);
|
|
19
|
+
/**
|
|
20
|
+
* Method create
|
|
21
|
+
* 创建RESTful数据
|
|
22
|
+
*/
|
|
23
|
+
create(): {
|
|
24
|
+
api: string;
|
|
25
|
+
data: any;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* private method transformer
|
|
29
|
+
*/
|
|
30
|
+
private transformer;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=RESTful.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RESTful.d.ts","sourceRoot":"","sources":["../../../../src/core/Spanner/RESTful.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,OAAO;IAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAE1C,OAAO,CAAC,GAAG,CAAQ;IAEnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAK;IAEjC;;;;;;OAMG;gBACS,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO;IAM3D;;;OAGG;IACH,MAAM;;;;IAWN;;OAEG;IACH,OAAO,CAAC,WAAW;CA2DpB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
declare type Callback = (item: Record<any, any>, index?: number) => Record<any, any>;
|
|
2
|
+
/**
|
|
3
|
+
* Class Transformer 转换器
|
|
4
|
+
* NewTransformer extends Transformer -> constructor(){super(data,payload)}
|
|
5
|
+
*/
|
|
6
|
+
export default class Transformer {
|
|
7
|
+
private readonly data;
|
|
8
|
+
private payload;
|
|
9
|
+
/**
|
|
10
|
+
* Method constructor
|
|
11
|
+
* @param {*} data 需处理的数据
|
|
12
|
+
* @param {*} payload 携带的载荷
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
constructor(data: any, payload?: unknown);
|
|
16
|
+
/**
|
|
17
|
+
* Method transform
|
|
18
|
+
* 转换方法
|
|
19
|
+
* @param {Object|String|Number} data
|
|
20
|
+
* @param tData
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
transform(data: any, tData?: any): any;
|
|
24
|
+
/**
|
|
25
|
+
* Method create
|
|
26
|
+
* 创建新数据
|
|
27
|
+
* @return {Array/Object|String|Number|*}
|
|
28
|
+
*/
|
|
29
|
+
create(callback?: Callback): any;
|
|
30
|
+
/**
|
|
31
|
+
* 格式化数字
|
|
32
|
+
* @param {String|Number} number 待处理数字
|
|
33
|
+
* @param {Number} places 小数点位数 -1为原样保留
|
|
34
|
+
* @param {String} thousand 千位字符串 默认为空
|
|
35
|
+
* @param {String} decimal 小数点替换字符 默认为.
|
|
36
|
+
* @return {String|Number}
|
|
37
|
+
*/
|
|
38
|
+
formatNumber(number: string | number, places?: number | string, thousand?: string, decimal?: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* formatDate 日期格式化
|
|
41
|
+
* @param {string|number} timestamp
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
formatDate(timestamp?: number | string | unknown): Record<string, number | string>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=Transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transformer.d.ts","sourceRoot":"","sources":["../../../../src/core/Transformer/Transformer.ts"],"names":[],"mappings":"AAEA,aAAK,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE7E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAM;IAE3B,OAAO,CAAC,OAAO,CAAM;IAErB;;;;;OAKG;gBACgB,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO;IAO/C;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG;IAKtC;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ;IAgB1B;;;;;;;OAOG;IACH,YAAY,CACV,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,GAAE,MAAM,GAAG,MAAW,EAC5B,QAAQ,SAAK,EACb,OAAO,SAAM;IA8Cf;;;;OAIG;IACH,UAAU,CACR,SAAS,GAAE,MAAM,GAAG,MAAM,GAAG,OAAoB,GAChD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAiDnC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IHttpAdapter, RequestConfig, RequestMethod } from './types';
|
|
2
|
+
export declare abstract class HttpAdapterInterface<T> {
|
|
3
|
+
protected http: IHttpAdapter<T>;
|
|
4
|
+
protected method: RequestMethod;
|
|
5
|
+
protected url: string;
|
|
6
|
+
protected data: {};
|
|
7
|
+
protected headers: {};
|
|
8
|
+
/**
|
|
9
|
+
* Method constructor 注入Axios
|
|
10
|
+
* @param {*} $function
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
protected constructor($function: IHttpAdapter<T>);
|
|
14
|
+
/**
|
|
15
|
+
* Method setConfig
|
|
16
|
+
* 设置配置信息
|
|
17
|
+
* @param {method,url,data,headers} param
|
|
18
|
+
*/
|
|
19
|
+
setConfig({ method, url, data, headers }: RequestConfig): void;
|
|
20
|
+
/**
|
|
21
|
+
* Method request
|
|
22
|
+
* @returns Promise
|
|
23
|
+
*/
|
|
24
|
+
request(): Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=adapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../../src/core/Type/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAA;AAGhB,8BAAsB,oBAAoB,CAAC,CAAC;IAC1C,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC/B,SAAS,CAAC,MAAM,EAAE,aAAa,CAAS;IACxC,SAAS,CAAC,GAAG,SAAK;IAClB,SAAS,CAAC,IAAI,KAAK;IACnB,SAAS,CAAC,OAAO,KAAK;IAEtB;;;;OAIG;IACH,SAAS,aAAa,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAUhD;;;;OAIG;IACI,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,aAAa;IAO9D;;;OAGG;IACI,OAAO;CAgBf"}
|