@relicx_/kernel 1.1.49 → 1.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +9 -5
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -181,6 +181,9 @@ interface IRedisInterface {
|
|
|
181
181
|
Del(key: string): Promise<boolean>;
|
|
182
182
|
MSet(datas: any): Promise<boolean>;
|
|
183
183
|
MGet(keys: string[]): Promise<string[]>;
|
|
184
|
+
HGet(key: string): Promise<Record<string, string>>;
|
|
185
|
+
HGetField(key: string, field: string): Promise<string>;
|
|
186
|
+
HSet(key: string, object: object, ttl?: number): Promise<boolean>;
|
|
184
187
|
/**
|
|
185
188
|
* @param pattern like this: "user:*"
|
|
186
189
|
*/
|
|
@@ -196,6 +199,9 @@ declare class RedisConnection extends DBConnection implements IRedisInterface {
|
|
|
196
199
|
Del(key: string): Promise<boolean>;
|
|
197
200
|
MSet(data: any): Promise<boolean>;
|
|
198
201
|
MGet(keys: string[]): Promise<string[]>;
|
|
202
|
+
HGet(key: string): Promise<Record<string, string>>;
|
|
203
|
+
HGetField(key: string, field: string): Promise<string>;
|
|
204
|
+
HSet(key: string, object: object, ttl?: number): Promise<boolean>;
|
|
199
205
|
Select(db: number): Promise<"OK">;
|
|
200
206
|
ScanKeys(pattern: string): Promise<string[]>;
|
|
201
207
|
}
|
|
@@ -267,16 +273,14 @@ declare class Database extends Module {
|
|
|
267
273
|
}
|
|
268
274
|
declare function CreateDatabase(): boolean;
|
|
269
275
|
|
|
270
|
-
declare function Encrypt(buffer: Buffer, key: string, algorithm: string, randiv?: boolean): Buffer;
|
|
271
|
-
declare function Decrypt(buffer: Buffer, key: string, algorithm: string): Buffer;
|
|
276
|
+
declare function Encrypt(buffer: Buffer, key: string, algorithm: string, randiv?: boolean, ivlen?: number): Buffer;
|
|
277
|
+
declare function Decrypt(buffer: Buffer, key: string, algorithm: string, ivlen?: number): Buffer;
|
|
272
278
|
declare function HMACSHA256(sData: string, sKey: string): string;
|
|
273
279
|
declare function HMACSHA1(sData: string): string;
|
|
274
280
|
declare function HMACSHA1Base64(sData: string): string;
|
|
275
281
|
declare function Base64Encode(sData: string): string;
|
|
276
282
|
declare function SHA256(sData: string): string;
|
|
277
283
|
declare function MD5(sData: Buffer | string): string;
|
|
278
|
-
declare function MakeGameKey(uKey: number): string;
|
|
279
|
-
declare function MakeToken(sInputString: string, sKey: string): string;
|
|
280
284
|
|
|
281
285
|
interface ITimerEvent {
|
|
282
286
|
OnTimer(timerid: number, data: any): boolean;
|
|
@@ -930,4 +934,4 @@ declare class Validate {
|
|
|
930
934
|
static IsExpired(uSeconds: number): boolean;
|
|
931
935
|
}
|
|
932
936
|
|
|
933
|
-
export { AppsflyerAds, type AppsflyerAdsEvent, Base64Encode, BigMap, ConnId, ConnStatus, CreateAdWorker, CreateDatabase, CreateFileCache, CreateHTTPWorker, CreateNetworker, CreateResourceLoader, CreateScriptLoader, CreateTimer, DBConnection, Database, Decrypt, type DeserializeFunc, Deserialize_KernelHeartbeat, Encrypt, EncryptFile, FacebookAds, type FacebookAdsEvent, GAdWorker, GConfig, GDatabase, GFileCache, GGameApplication, GHttpWorker, GListHeadIterManager, GNetWorker, GPercentBase, GRandRatioBase, GResourceLoader, GScriptLoader, GTimer, GameApplication, GeoIP, type GetMessageSizeFunc, GetMessageSize_KernelHeartbeat, GoogleAds, type GoogleAdsEvent, HMACSHA1, HMACSHA1Base64, HMACSHA256, HTTPRequest, HitRate, type IPCache, type IRedisInterface, type ISQLInterface, type ITimerEvent, InitList, IsLocal, type JsonBody, type KernelHeartbeat, KernelMessageId, KwaiAds, List, ListAdd, ListAddHead, ListAddTail, ListDel, ListHead, ListInit, ListRemoveHead, ListRemoveTail, LoadGlobalConfig, Logger, MD5,
|
|
937
|
+
export { AppsflyerAds, type AppsflyerAdsEvent, Base64Encode, BigMap, ConnId, ConnStatus, CreateAdWorker, CreateDatabase, CreateFileCache, CreateHTTPWorker, CreateNetworker, CreateResourceLoader, CreateScriptLoader, CreateTimer, DBConnection, Database, Decrypt, type DeserializeFunc, Deserialize_KernelHeartbeat, Encrypt, EncryptFile, FacebookAds, type FacebookAdsEvent, GAdWorker, GConfig, GDatabase, GFileCache, GGameApplication, GHttpWorker, GListHeadIterManager, GNetWorker, GPercentBase, GRandRatioBase, GResourceLoader, GScriptLoader, GTimer, GameApplication, GeoIP, type GetMessageSizeFunc, GetMessageSize_KernelHeartbeat, GoogleAds, type GoogleAdsEvent, HMACSHA1, HMACSHA1Base64, HMACSHA256, HTTPRequest, HitRate, type IPCache, type IRedisInterface, type ISQLInterface, type ITimerEvent, InitList, IsLocal, type JsonBody, type KernelHeartbeat, KernelMessageId, KwaiAds, List, ListAdd, ListAddHead, ListAddTail, ListDel, ListHead, ListInit, ListRemoveHead, ListRemoveTail, LoadGlobalConfig, Logger, MD5, MakeSocketId, type MessageDealerFunc, Module, type NetConfigure, NetConnection, Random, RedisConnection, ResTypes, RoundId, SHA256, SQLConnection, type SerializeFunc, Serialize_KernelHeartbeat, Thread, Timer, Utils, Validate, WSCloseReason };
|