@e-mc/types 0.13.5 → 0.13.6
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/README.md +5 -5
- package/constant.d.ts +1 -1
- package/index.js +1 -2
- package/lib/core.d.ts +5 -2
- package/lib/dom.d.ts +9 -0
- package/lib/index.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.6/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { LogArguments } from "./lib/logger";
|
|
@@ -208,10 +208,10 @@ const IMPORT_MAP: Record<string, string | undefined>;
|
|
|
208
208
|
|
|
209
209
|
## References
|
|
210
210
|
|
|
211
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
212
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
213
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
214
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
211
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/index.d.ts
|
|
212
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/logger.d.ts
|
|
213
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/module.d.ts
|
|
214
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/node.d.ts
|
|
215
215
|
|
|
216
216
|
* https://developer.mozilla.org/en-US/docs/Web/API/DOMException
|
|
217
217
|
* https://www.npmjs.com/package/@types/bytes
|
package/constant.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -176,8 +176,7 @@ function fromObject(value, typedArray, structured, shared) {
|
|
|
176
176
|
function trimQuote(value) {
|
|
177
177
|
value = value.trim();
|
|
178
178
|
const first = value[0];
|
|
179
|
-
|
|
180
|
-
return first === last && (first === '"' || first === "'" || first === "`") ? value.substring(1, value.length - 1) : value;
|
|
179
|
+
return first === value.at(-1) && (first === '"' || first === "'" || first === "`") ? value.substring(1, value.length - 1) : value;
|
|
181
180
|
}
|
|
182
181
|
function checkCipherType(value) {
|
|
183
182
|
switch (value) {
|
package/lib/core.d.ts
CHANGED
|
@@ -70,10 +70,13 @@ export interface ClientDbConstructor<T extends IHost = IHost, U extends ClientMo
|
|
|
70
70
|
convertTime(value: number | string): number;
|
|
71
71
|
findResult(source: string, credential: unknown, queryString: string, timeout: number, sessionKey?: string | boolean, renewCache?: boolean): QueryResult | undefined;
|
|
72
72
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, options: StoreResultOptions): QueryResult;
|
|
73
|
+
/** @deprecated */
|
|
73
74
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, sessionKey: string, sessionExpires: number): QueryResult;
|
|
74
75
|
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue): QueryResult;
|
|
75
|
-
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue | undefined, options: StoreResultOptions): QueryResult;
|
|
76
|
-
|
|
76
|
+
storeResult(source: string, credential: unknown, queryString: string, result: QueryResult, cache: DbCacheValue | undefined, options: Omit<StoreResultOptions, "cache">): QueryResult;
|
|
77
|
+
findSession<W = unknown>(source: string, user: string, key: string): W | undefined;
|
|
78
|
+
storeSession(source: string, user: string, key: string, result: unknown, expires?: number): void;
|
|
79
|
+
purgeResult(prefix?: string, lru?: boolean | number): Promise<number>;
|
|
77
80
|
extractUUID(credential: unknown): string;
|
|
78
81
|
setPoolConfig(value: unknown): void;
|
|
79
82
|
getPoolConfig(source: string): unknown;
|
package/lib/dom.d.ts
ADDED
package/lib/index.d.ts
CHANGED
|
@@ -625,6 +625,7 @@ declare namespace functions {
|
|
|
625
625
|
defineHttpCache(options: HttpMemorySettings, disk?: boolean): void;
|
|
626
626
|
defineHttpConnect(options: HttpConnectSettings): void;
|
|
627
627
|
defineHttpAdapter(module: unknown): void;
|
|
628
|
+
generateSessionId(): string;
|
|
628
629
|
readonly prototype: IFileManager<T>;
|
|
629
630
|
new(baseDirectory: string, config: RequestData<T>, postFinalize?: PostFinalizeCallback): IFileManager<T>;
|
|
630
631
|
new(baseDirectory: string, config: RequestData<T>, permission?: IPermission | null, postFinalize?: PostFinalizeCallback): IFileManager<T>;
|
|
@@ -689,7 +690,7 @@ declare namespace functions {
|
|
|
689
690
|
readonly status: LogStatus<StatusType>[];
|
|
690
691
|
readonly errors: unknown[];
|
|
691
692
|
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
|
|
692
|
-
supports(name: string, value?: boolean): boolean;
|
|
693
|
+
supports(name: string, value?: boolean, locked?: boolean): boolean;
|
|
693
694
|
getTempDir(options: TempDirOptions): string;
|
|
694
695
|
getTempDir(uuidDir: boolean, createDir: boolean): string;
|
|
695
696
|
getTempDir(pathname: string, createDir: boolean): string;
|
|
@@ -900,6 +901,7 @@ declare namespace functions {
|
|
|
900
901
|
sanitizeArgs(values: string[], doubleQuote?: boolean): string[];
|
|
901
902
|
purgeMemory(percent: number, limit: number, parent?: boolean): Promise<number>;
|
|
902
903
|
purgeMemory(percent?: number, limit?: number | boolean, parent?: unknown): Promise<number>;
|
|
904
|
+
availableParallelism(factor?: number): number;
|
|
903
905
|
canWrite(name: "temp" | "home"): boolean;
|
|
904
906
|
loadSettings(settings: Settings, password?: string): boolean;
|
|
905
907
|
readonly prototype: IModule<T>;
|