@mtkruto/node 0.1.190 → 0.1.200
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/esm/0_errors.d.ts +12 -0
- package/esm/0_errors.js +19 -0
- package/esm/1_utilities.d.ts +1 -1
- package/esm/1_utilities.js +1 -1
- package/esm/2_tl.d.ts +6 -6
- package/esm/2_tl.js +6 -6
- package/esm/3_storage.d.ts +5 -5
- package/esm/3_storage.js +5 -5
- package/esm/3_types.d.ts +6 -5
- package/esm/3_types.js +6 -5
- package/esm/4_constants.d.ts +2 -2
- package/esm/4_constants.js +2 -2
- package/esm/5_client.d.ts +1 -1
- package/esm/5_client.js +1 -1
- package/esm/client/0_client_abstract.js +3 -2
- package/esm/client/0_html.js +4 -3
- package/esm/client/0_markdown.js +6 -5
- package/esm/client/0_params.d.ts +7 -1
- package/esm/client/0_types.d.ts +1 -2
- package/esm/client/0_types.js +1 -2
- package/esm/client/0_utilities.d.ts +0 -3
- package/esm/client/0_utilities.js +2 -21
- package/esm/client/1_business_connection_manager.d.ts +11 -0
- package/esm/client/1_business_connection_manager.js +47 -0
- package/esm/client/1_client_encrypted.js +1 -1
- package/esm/client/1_client_plain.js +3 -4
- package/esm/client/1_composer.js +3 -2
- package/esm/client/1_file_manager.js +4 -4
- package/esm/client/1_update_manager.d.ts +8 -1
- package/esm/client/1_update_manager.js +88 -8
- package/esm/client/2_message_manager.d.ts +7 -6
- package/esm/client/2_message_manager.js +89 -74
- package/esm/client/3_chat_list_manager.js +3 -2
- package/esm/client/3_story_manager.js +2 -1
- package/esm/client/4_client.d.ts +422 -421
- package/esm/client/4_client.js +578 -520
- package/esm/mod.d.ts +1 -0
- package/esm/mod.js +1 -0
- package/esm/storage/0_storage.d.ts +5 -0
- package/esm/storage/0_storage.js +20 -0
- package/esm/storage/{1_storage_indexed_db.js → 2_storage_indexed_db.js} +1 -1
- package/esm/storage/{1_storage_local_storage.js → 2_storage_local_storage.js} +1 -1
- package/{script/storage/1_storage_memory.d.ts → esm/storage/2_storage_memory.d.ts} +1 -4
- package/esm/storage/{1_storage_memory.js → 2_storage_memory.js} +8 -28
- package/esm/storage/{1_storage_session_storage.js → 2_storage_session_storage.js} +1 -1
- package/esm/tl/2_types.d.ts +1071 -183
- package/esm/tl/2_types.js +2916 -464
- package/esm/tl/3_functions.d.ts +381 -17
- package/esm/tl/3_functions.js +1002 -120
- package/{script/tl/4_tl_writer.d.ts → esm/tl/5_tl_writer.d.ts} +1 -1
- package/{script/tl/4_rpc_result.d.ts → esm/tl/6_rpc_result.d.ts} +1 -1
- package/esm/tl/{4_rpc_result.js → 6_rpc_result.js} +1 -1
- package/esm/tl/{6_message.d.ts → 7_message.d.ts} +2 -2
- package/esm/tl/{6_message.js → 7_message.js} +3 -3
- package/esm/tl/{7_message_container.d.ts → 8_message_container.d.ts} +1 -1
- package/esm/tl/{7_message_container.js → 8_message_container.js} +3 -3
- package/esm/types/0_chat_photo.d.ts +1 -0
- package/esm/types/0_chat_photo.js +8 -5
- package/esm/types/0_message_entity.d.ts +1 -1
- package/esm/types/0_thumbnail.js +1 -1
- package/esm/types/1_bot_command_scope.d.ts +1 -1
- package/esm/types/1_photo.js +2 -2
- package/esm/types/1_story_privacy.d.ts +1 -1
- package/esm/types/2_business_connection.d.ts +11 -0
- package/esm/types/2_business_connection.js +12 -0
- package/esm/types/2_chat_member.d.ts +1 -1
- package/esm/types/2_chosen_inline_result.d.ts +1 -1
- package/esm/types/2_game.js +1 -1
- package/esm/types/2_inline_keyboard_button.d.ts +1 -1
- package/esm/types/2_inline_query.d.ts +1 -1
- package/esm/types/2_invite_link.d.ts +1 -1
- package/esm/types/2_message_reaction_count.d.ts +1 -1
- package/esm/types/2_message_reactions.d.ts +1 -1
- package/esm/types/2_story_content.js +1 -1
- package/{script/types/1_story_interactive_area.d.ts → esm/types/2_story_interactive_area.d.ts} +2 -2
- package/esm/types/{1_story_interactive_area.js → 2_story_interactive_area.js} +1 -1
- package/esm/types/3_chat_member_updated.d.ts +1 -1
- package/esm/types/3_reply_markup.d.ts +1 -1
- package/esm/types/3_story.d.ts +2 -2
- package/esm/types/3_story.js +1 -1
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +1 -1
- package/esm/types/4_message.d.ts +9 -3
- package/esm/types/4_message.js +22 -5
- package/esm/types/5_callback_query.d.ts +1 -1
- package/esm/types/5_callback_query.js +2 -1
- package/esm/types/5_chat.d.ts +1 -1
- package/esm/types/6_update.d.ts +12 -2
- package/esm/types/{0__file_id.js → _file_id.js} +2 -1
- package/package.json +1 -1
- package/script/0_errors.d.ts +12 -0
- package/script/0_errors.js +27 -0
- package/script/1_utilities.d.ts +1 -1
- package/script/1_utilities.js +1 -1
- package/script/2_tl.d.ts +6 -6
- package/script/2_tl.js +6 -6
- package/script/3_storage.d.ts +5 -5
- package/script/3_storage.js +5 -5
- package/script/3_types.d.ts +6 -5
- package/script/3_types.js +6 -5
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/5_client.d.ts +1 -1
- package/script/5_client.js +1 -1
- package/script/client/0_client_abstract.js +3 -2
- package/script/client/0_html.js +4 -3
- package/script/client/0_markdown.js +6 -5
- package/script/client/0_params.d.ts +7 -1
- package/script/client/0_types.d.ts +1 -2
- package/script/client/0_types.js +0 -4
- package/script/client/0_utilities.d.ts +0 -3
- package/script/client/0_utilities.js +3 -24
- package/script/client/1_business_connection_manager.d.ts +11 -0
- package/script/client/1_business_connection_manager.js +51 -0
- package/script/client/1_client_encrypted.js +2 -2
- package/script/client/1_client_plain.js +3 -4
- package/script/client/1_composer.js +3 -2
- package/script/client/1_file_manager.js +5 -5
- package/script/client/1_update_manager.d.ts +8 -1
- package/script/client/1_update_manager.js +88 -8
- package/script/client/2_message_manager.d.ts +7 -6
- package/script/client/2_message_manager.js +88 -73
- package/script/client/3_chat_list_manager.js +3 -2
- package/script/client/3_story_manager.js +2 -1
- package/script/client/4_client.d.ts +422 -421
- package/script/client/4_client.js +578 -520
- package/script/mod.d.ts +1 -0
- package/script/mod.js +1 -0
- package/script/storage/0_storage.d.ts +5 -0
- package/script/storage/0_storage.js +20 -0
- package/script/storage/{1_storage_indexed_db.js → 2_storage_indexed_db.js} +7 -7
- package/script/storage/{1_storage_local_storage.js → 2_storage_local_storage.js} +10 -10
- package/{esm/storage/1_storage_memory.d.ts → script/storage/2_storage_memory.d.ts} +1 -4
- package/script/storage/{1_storage_memory.js → 2_storage_memory.js} +12 -32
- package/script/storage/{1_storage_session_storage.js → 2_storage_session_storage.js} +10 -10
- package/script/tl/2_types.d.ts +1071 -183
- package/script/tl/2_types.js +3028 -504
- package/script/tl/3_functions.d.ts +381 -17
- package/script/tl/3_functions.js +1047 -143
- package/{esm/tl/4_tl_writer.d.ts → script/tl/5_tl_writer.d.ts} +1 -1
- package/{esm/tl/4_rpc_result.d.ts → script/tl/6_rpc_result.d.ts} +1 -1
- package/script/tl/{4_rpc_result.js → 6_rpc_result.js} +2 -2
- package/script/tl/{6_message.d.ts → 7_message.d.ts} +2 -2
- package/script/tl/{6_message.js → 7_message.js} +8 -8
- package/script/tl/{7_message_container.d.ts → 8_message_container.d.ts} +1 -1
- package/script/tl/{7_message_container.js → 8_message_container.js} +7 -7
- package/script/types/0_chat_photo.d.ts +1 -0
- package/script/types/0_chat_photo.js +16 -13
- package/script/types/0_message_entity.d.ts +1 -1
- package/script/types/0_thumbnail.js +6 -6
- package/script/types/1_bot_command_scope.d.ts +1 -1
- package/script/types/1_photo.js +7 -7
- package/script/types/1_story_privacy.d.ts +1 -1
- package/script/types/2_business_connection.d.ts +11 -0
- package/script/types/2_business_connection.js +16 -0
- package/script/types/2_chat_member.d.ts +1 -1
- package/script/types/2_chosen_inline_result.d.ts +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_inline_keyboard_button.d.ts +1 -1
- package/script/types/2_inline_query.d.ts +1 -1
- package/script/types/2_invite_link.d.ts +1 -1
- package/script/types/2_message_reaction_count.d.ts +1 -1
- package/script/types/2_message_reactions.d.ts +1 -1
- package/script/types/2_story_content.js +4 -4
- package/{esm/types/1_story_interactive_area.d.ts → script/types/2_story_interactive_area.d.ts} +2 -2
- package/script/types/{1_story_interactive_area.js → 2_story_interactive_area.js} +2 -2
- package/script/types/3_chat_member_updated.d.ts +1 -1
- package/script/types/3_reply_markup.d.ts +1 -1
- package/script/types/3_story.d.ts +2 -2
- package/script/types/3_story.js +2 -2
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +2 -2
- package/script/types/4_message.d.ts +9 -3
- package/script/types/4_message.js +37 -20
- package/script/types/5_callback_query.d.ts +1 -1
- package/script/types/5_callback_query.js +2 -1
- package/script/types/5_chat.d.ts +1 -1
- package/script/types/6_update.d.ts +12 -2
- package/script/types/{0__file_id.js → _file_id.js} +2 -1
- /package/esm/storage/{0_utilities.d.ts → 1_utilities.d.ts} +0 -0
- /package/esm/storage/{0_utilities.js → 1_utilities.js} +0 -0
- /package/esm/storage/{1_storage_indexed_db.d.ts → 2_storage_indexed_db.d.ts} +0 -0
- /package/esm/storage/{1_storage_local_storage.d.ts → 2_storage_local_storage.d.ts} +0 -0
- /package/esm/storage/{1_storage_session_storage.d.ts → 2_storage_session_storage.d.ts} +0 -0
- /package/esm/tl/{3_tl_reader.d.ts → 4_tl_reader.d.ts} +0 -0
- /package/esm/tl/{3_tl_reader.js → 4_tl_reader.js} +0 -0
- /package/esm/tl/{4_tl_writer.js → 5_tl_writer.js} +0 -0
- /package/esm/types/{0_venue.d.ts → 1_venue.d.ts} +0 -0
- /package/esm/types/{0_venue.js → 1_venue.js} +0 -0
- /package/esm/types/{0__file_id.d.ts → _file_id.d.ts} +0 -0
- /package/esm/types/{1__getters.d.ts → _getters.d.ts} +0 -0
- /package/esm/types/{1__getters.js → _getters.js} +0 -0
- /package/script/storage/{0_utilities.d.ts → 1_utilities.d.ts} +0 -0
- /package/script/storage/{0_utilities.js → 1_utilities.js} +0 -0
- /package/script/storage/{1_storage_indexed_db.d.ts → 2_storage_indexed_db.d.ts} +0 -0
- /package/script/storage/{1_storage_local_storage.d.ts → 2_storage_local_storage.d.ts} +0 -0
- /package/script/storage/{1_storage_session_storage.d.ts → 2_storage_session_storage.d.ts} +0 -0
- /package/script/tl/{3_tl_reader.d.ts → 4_tl_reader.d.ts} +0 -0
- /package/script/tl/{3_tl_reader.js → 4_tl_reader.js} +0 -0
- /package/script/tl/{4_tl_writer.js → 5_tl_writer.js} +0 -0
- /package/script/types/{0_venue.d.ts → 1_venue.d.ts} +0 -0
- /package/script/types/{0_venue.js → 1_venue.js} +0 -0
- /package/script/types/{0__file_id.d.ts → _file_id.d.ts} +0 -0
- /package/script/types/{1__getters.d.ts → _getters.d.ts} +0 -0
- /package/script/types/{1__getters.js → _getters.js} +0 -0
package/esm/mod.d.ts
CHANGED
package/esm/mod.js
CHANGED
|
@@ -39,6 +39,8 @@ export declare const K: {
|
|
|
39
39
|
filePart: (fileId: bigint, n: number) => StorageKeyPart[];
|
|
40
40
|
customEmojiDocuments: () => StorageKeyPart[];
|
|
41
41
|
customEmojiDocument: (id: bigint) => StorageKeyPart[];
|
|
42
|
+
businessConnections: () => StorageKeyPart[];
|
|
43
|
+
businessConnection: (id: string) => StorageKeyPart[];
|
|
42
44
|
};
|
|
43
45
|
messages: {
|
|
44
46
|
P: (string: string) => string;
|
|
@@ -126,6 +128,8 @@ export declare abstract class Storage {
|
|
|
126
128
|
setFilePartCount(id: bigint, partCount: number, chunkSize: number): Promise<void>;
|
|
127
129
|
setCustomEmojiDocument(id: bigint, document: types.Document): Promise<void>;
|
|
128
130
|
getCustomEmojiDocument(id: bigint): Promise<[types.Document, Date] | null>;
|
|
131
|
+
setBusinessConnection(id: string, connection: types.BotBusinessConnection | null): Promise<void>;
|
|
132
|
+
getBusinessConnection(id: string): Promise<types.BotBusinessConnection | null>;
|
|
129
133
|
setUpdate(boxId: bigint, update: enums.Update): Promise<void>;
|
|
130
134
|
deleteUpdates(): Promise<void>;
|
|
131
135
|
getFirstUpdate(boxId: bigint): Promise<[readonly StorageKeyPart[], enums.Update] | null>;
|
|
@@ -133,6 +137,7 @@ export declare abstract class Storage {
|
|
|
133
137
|
assertBot(source: string): Promise<void>;
|
|
134
138
|
deleteFiles(): Promise<void>;
|
|
135
139
|
deleteCustomEmojiDocuments(): Promise<void>;
|
|
140
|
+
deleteBusinessConnections(): Promise<void>;
|
|
136
141
|
deleteStickerSetNames(): Promise<void>;
|
|
137
142
|
deletePeers(): Promise<void>;
|
|
138
143
|
deleteUsernames(): Promise<void>;
|
package/esm/storage/0_storage.js
CHANGED
|
@@ -51,6 +51,8 @@ export const K = {
|
|
|
51
51
|
filePart: (fileId, n) => [...K.cache.fileParts(), fileId, n],
|
|
52
52
|
customEmojiDocuments: () => [K.cache.P("customEmojiDocuments")],
|
|
53
53
|
customEmojiDocument: (id) => [...K.cache.customEmojiDocuments(), id],
|
|
54
|
+
businessConnections: () => [K.cache.P("businessConnections")],
|
|
55
|
+
businessConnection: (id) => [...K.cache.businessConnections(), id],
|
|
54
56
|
},
|
|
55
57
|
messages: {
|
|
56
58
|
P: (string) => `messages.${string}`,
|
|
@@ -367,6 +369,18 @@ export class Storage {
|
|
|
367
369
|
return null;
|
|
368
370
|
}
|
|
369
371
|
}
|
|
372
|
+
async setBusinessConnection(id, connection) {
|
|
373
|
+
await this.set(K.cache.businessConnection(id), connection == null ? null : this.isMemoryStorage ? connection : rleEncode(connection[serialize]()));
|
|
374
|
+
}
|
|
375
|
+
async getBusinessConnection(id) {
|
|
376
|
+
const v = await this.get(K.cache.businessConnection(id));
|
|
377
|
+
if (v != null) {
|
|
378
|
+
return await this.getTlObject(v);
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
370
384
|
async setUpdate(boxId, update) {
|
|
371
385
|
await this.setTlObject(K.updates.update(boxId, __classPrivateFieldGet(this, _Storage_instances, "m", _Storage_getUpdateId).call(this, update)), update);
|
|
372
386
|
}
|
|
@@ -409,6 +423,11 @@ export class Storage {
|
|
|
409
423
|
await this.set(key, null);
|
|
410
424
|
}
|
|
411
425
|
}
|
|
426
|
+
async deleteBusinessConnections() {
|
|
427
|
+
for await (const [key] of await this.getMany({ prefix: K.cache.businessConnections() })) {
|
|
428
|
+
await this.set(key, null);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
412
431
|
async deleteStickerSetNames() {
|
|
413
432
|
for await (const [key] of await this.getMany({ prefix: K.cache.stickerSetNames() })) {
|
|
414
433
|
await this.set(key, null);
|
|
@@ -432,6 +451,7 @@ export class Storage {
|
|
|
432
451
|
this.deleteUpdates(),
|
|
433
452
|
this.deleteFiles(),
|
|
434
453
|
this.deleteCustomEmojiDocuments(),
|
|
454
|
+
this.deleteBusinessConnections(),
|
|
435
455
|
this.deleteStickerSetNames(),
|
|
436
456
|
this.deletePeers(),
|
|
437
457
|
this.deleteUsernames(),
|
|
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _StorageIndexedDB_instances, _StorageIndexedDB_name, _StorageIndexedDB_id, _StorageIndexedDB_supportsFiles, _StorageIndexedDB_fixKey;
|
|
13
13
|
import { Storage } from "./0_storage.js";
|
|
14
|
-
import { fixKey, getPrefixKeyRange, restoreKey } from "./
|
|
14
|
+
import { fixKey, getPrefixKeyRange, restoreKey } from "./1_utilities.js";
|
|
15
15
|
const VERSION = 1;
|
|
16
16
|
const KV_OBJECT_STORE = "kv";
|
|
17
17
|
export class StorageIndexedDB extends Storage {
|
|
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _StorageLocalStorage_prefix;
|
|
13
13
|
import { Storage } from "./0_storage.js";
|
|
14
|
-
import { fromString, isInRange, toString, WEB_STORAGE_PREFIX_EXP } from "./
|
|
14
|
+
import { fromString, isInRange, toString, WEB_STORAGE_PREFIX_EXP } from "./1_utilities.js";
|
|
15
15
|
export class StorageLocalStorage extends Storage {
|
|
16
16
|
constructor(prefix) {
|
|
17
17
|
if (typeof localStorage === "undefined") {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MaybePromise } from "../1_utilities.js";
|
|
2
2
|
import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
|
|
3
3
|
export declare class StorageMemory extends Storage implements Storage {
|
|
4
4
|
#private;
|
|
5
5
|
protected map: Map<string, unknown>;
|
|
6
|
-
protected messageMap: CacheMap<string, unknown>;
|
|
7
6
|
constructor(authString?: string);
|
|
8
7
|
get isMemoryStorage(): boolean;
|
|
9
8
|
initialize(): Promise<void>;
|
|
10
|
-
getMap(key: readonly StorageKeyPart[]): Map<string, unknown>;
|
|
11
|
-
getMaps(): [Map<string, unknown>, Map<string, unknown>];
|
|
12
9
|
branch(id: string): Storage;
|
|
13
10
|
get supportsFiles(): boolean;
|
|
14
11
|
get<T>(key: readonly StorageKeyPart[]): T | null;
|
|
@@ -10,9 +10,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _StorageMemory_instances, _StorageMemory_id, _StorageMemory_authString, _StorageMemory_fixKey, _StorageMemory_getEntries;
|
|
13
|
-
import { CacheMap } from "../1_utilities.js";
|
|
14
13
|
import { Storage } from "./0_storage.js";
|
|
15
|
-
import { fromString, isInRange, toString } from "./
|
|
14
|
+
import { fromString, isInRange, toString } from "./1_utilities.js";
|
|
16
15
|
export class StorageMemory extends Storage {
|
|
17
16
|
constructor(authString) {
|
|
18
17
|
super();
|
|
@@ -23,12 +22,6 @@ export class StorageMemory extends Storage {
|
|
|
23
22
|
writable: true,
|
|
24
23
|
value: new Map()
|
|
25
24
|
});
|
|
26
|
-
Object.defineProperty(this, "messageMap", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: new CacheMap(30000)
|
|
31
|
-
});
|
|
32
25
|
_StorageMemory_id.set(this, null);
|
|
33
26
|
_StorageMemory_authString.set(this, void 0);
|
|
34
27
|
__classPrivateFieldSet(this, _StorageMemory_authString, authString, "f");
|
|
@@ -41,17 +34,6 @@ export class StorageMemory extends Storage {
|
|
|
41
34
|
await this.importAuthString(__classPrivateFieldGet(this, _StorageMemory_authString, "f"));
|
|
42
35
|
}
|
|
43
36
|
}
|
|
44
|
-
getMap(key) {
|
|
45
|
-
if (key[0] == "messages.messages") {
|
|
46
|
-
return this.messageMap;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return this.map;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
getMaps() {
|
|
53
|
-
return [this.map, this.messageMap];
|
|
54
|
-
}
|
|
55
37
|
branch(id) {
|
|
56
38
|
const storage = new StorageMemory();
|
|
57
39
|
__classPrivateFieldSet(storage, _StorageMemory_id, id, "f");
|
|
@@ -62,7 +44,7 @@ export class StorageMemory extends Storage {
|
|
|
62
44
|
}
|
|
63
45
|
get(key) {
|
|
64
46
|
key = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_fixKey).call(this, key);
|
|
65
|
-
return this.
|
|
47
|
+
return this.map.get(toString(key)) ?? null;
|
|
66
48
|
}
|
|
67
49
|
*getMany(filter, params) {
|
|
68
50
|
let entries = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_getEntries).call(this);
|
|
@@ -95,10 +77,10 @@ export class StorageMemory extends Storage {
|
|
|
95
77
|
key_ = __classPrivateFieldGet(this, _StorageMemory_instances, "m", _StorageMemory_fixKey).call(this, key_);
|
|
96
78
|
const key = toString(key_);
|
|
97
79
|
if (value != null) {
|
|
98
|
-
this.
|
|
80
|
+
this.map.set(key, value);
|
|
99
81
|
}
|
|
100
82
|
else {
|
|
101
|
-
this.
|
|
83
|
+
this.map.delete(key);
|
|
102
84
|
}
|
|
103
85
|
}
|
|
104
86
|
incr(key, by) {
|
|
@@ -114,13 +96,11 @@ _StorageMemory_id = new WeakMap(), _StorageMemory_authString = new WeakMap(), _S
|
|
|
114
96
|
}
|
|
115
97
|
}, _StorageMemory_getEntries = function _StorageMemory_getEntries() {
|
|
116
98
|
const entries = new Array();
|
|
117
|
-
for (const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
entries.push(entry);
|
|
99
|
+
for (const entry of this.map.entries()) {
|
|
100
|
+
if (__classPrivateFieldGet(this, _StorageMemory_id, "f") !== null && !entry[0].startsWith("__S" + __classPrivateFieldGet(this, _StorageMemory_id, "f"))) {
|
|
101
|
+
continue;
|
|
123
102
|
}
|
|
103
|
+
entries.push(entry);
|
|
124
104
|
}
|
|
125
105
|
return entries;
|
|
126
106
|
};
|
|
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
11
11
|
};
|
|
12
12
|
var _StorageSessionStorage_prefix;
|
|
13
13
|
import { Storage } from "./0_storage.js";
|
|
14
|
-
import { fromString, isInRange, toString, WEB_STORAGE_PREFIX_EXP } from "./
|
|
14
|
+
import { fromString, isInRange, toString, WEB_STORAGE_PREFIX_EXP } from "./1_utilities.js";
|
|
15
15
|
export class StorageSessionStorage extends Storage {
|
|
16
16
|
constructor(prefix) {
|
|
17
17
|
if (typeof sessionStorage === "undefined") {
|