@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.
Files changed (205) hide show
  1. package/esm/0_errors.d.ts +12 -0
  2. package/esm/0_errors.js +19 -0
  3. package/esm/1_utilities.d.ts +1 -1
  4. package/esm/1_utilities.js +1 -1
  5. package/esm/2_tl.d.ts +6 -6
  6. package/esm/2_tl.js +6 -6
  7. package/esm/3_storage.d.ts +5 -5
  8. package/esm/3_storage.js +5 -5
  9. package/esm/3_types.d.ts +6 -5
  10. package/esm/3_types.js +6 -5
  11. package/esm/4_constants.d.ts +2 -2
  12. package/esm/4_constants.js +2 -2
  13. package/esm/5_client.d.ts +1 -1
  14. package/esm/5_client.js +1 -1
  15. package/esm/client/0_client_abstract.js +3 -2
  16. package/esm/client/0_html.js +4 -3
  17. package/esm/client/0_markdown.js +6 -5
  18. package/esm/client/0_params.d.ts +7 -1
  19. package/esm/client/0_types.d.ts +1 -2
  20. package/esm/client/0_types.js +1 -2
  21. package/esm/client/0_utilities.d.ts +0 -3
  22. package/esm/client/0_utilities.js +2 -21
  23. package/esm/client/1_business_connection_manager.d.ts +11 -0
  24. package/esm/client/1_business_connection_manager.js +47 -0
  25. package/esm/client/1_client_encrypted.js +1 -1
  26. package/esm/client/1_client_plain.js +3 -4
  27. package/esm/client/1_composer.js +3 -2
  28. package/esm/client/1_file_manager.js +4 -4
  29. package/esm/client/1_update_manager.d.ts +8 -1
  30. package/esm/client/1_update_manager.js +88 -8
  31. package/esm/client/2_message_manager.d.ts +7 -6
  32. package/esm/client/2_message_manager.js +89 -74
  33. package/esm/client/3_chat_list_manager.js +3 -2
  34. package/esm/client/3_story_manager.js +2 -1
  35. package/esm/client/4_client.d.ts +422 -421
  36. package/esm/client/4_client.js +578 -520
  37. package/esm/mod.d.ts +1 -0
  38. package/esm/mod.js +1 -0
  39. package/esm/storage/0_storage.d.ts +5 -0
  40. package/esm/storage/0_storage.js +20 -0
  41. package/esm/storage/{1_storage_indexed_db.js → 2_storage_indexed_db.js} +1 -1
  42. package/esm/storage/{1_storage_local_storage.js → 2_storage_local_storage.js} +1 -1
  43. package/{script/storage/1_storage_memory.d.ts → esm/storage/2_storage_memory.d.ts} +1 -4
  44. package/esm/storage/{1_storage_memory.js → 2_storage_memory.js} +8 -28
  45. package/esm/storage/{1_storage_session_storage.js → 2_storage_session_storage.js} +1 -1
  46. package/esm/tl/2_types.d.ts +1071 -183
  47. package/esm/tl/2_types.js +2916 -464
  48. package/esm/tl/3_functions.d.ts +381 -17
  49. package/esm/tl/3_functions.js +1002 -120
  50. package/{script/tl/4_tl_writer.d.ts → esm/tl/5_tl_writer.d.ts} +1 -1
  51. package/{script/tl/4_rpc_result.d.ts → esm/tl/6_rpc_result.d.ts} +1 -1
  52. package/esm/tl/{4_rpc_result.js → 6_rpc_result.js} +1 -1
  53. package/esm/tl/{6_message.d.ts → 7_message.d.ts} +2 -2
  54. package/esm/tl/{6_message.js → 7_message.js} +3 -3
  55. package/esm/tl/{7_message_container.d.ts → 8_message_container.d.ts} +1 -1
  56. package/esm/tl/{7_message_container.js → 8_message_container.js} +3 -3
  57. package/esm/types/0_chat_photo.d.ts +1 -0
  58. package/esm/types/0_chat_photo.js +8 -5
  59. package/esm/types/0_message_entity.d.ts +1 -1
  60. package/esm/types/0_thumbnail.js +1 -1
  61. package/esm/types/1_bot_command_scope.d.ts +1 -1
  62. package/esm/types/1_photo.js +2 -2
  63. package/esm/types/1_story_privacy.d.ts +1 -1
  64. package/esm/types/2_business_connection.d.ts +11 -0
  65. package/esm/types/2_business_connection.js +12 -0
  66. package/esm/types/2_chat_member.d.ts +1 -1
  67. package/esm/types/2_chosen_inline_result.d.ts +1 -1
  68. package/esm/types/2_game.js +1 -1
  69. package/esm/types/2_inline_keyboard_button.d.ts +1 -1
  70. package/esm/types/2_inline_query.d.ts +1 -1
  71. package/esm/types/2_invite_link.d.ts +1 -1
  72. package/esm/types/2_message_reaction_count.d.ts +1 -1
  73. package/esm/types/2_message_reactions.d.ts +1 -1
  74. package/esm/types/2_story_content.js +1 -1
  75. package/{script/types/1_story_interactive_area.d.ts → esm/types/2_story_interactive_area.d.ts} +2 -2
  76. package/esm/types/{1_story_interactive_area.js → 2_story_interactive_area.js} +1 -1
  77. package/esm/types/3_chat_member_updated.d.ts +1 -1
  78. package/esm/types/3_reply_markup.d.ts +1 -1
  79. package/esm/types/3_story.d.ts +2 -2
  80. package/esm/types/3_story.js +1 -1
  81. package/esm/types/4_inline_query_result.d.ts +1 -1
  82. package/esm/types/4_inline_query_result.js +1 -1
  83. package/esm/types/4_message.d.ts +9 -3
  84. package/esm/types/4_message.js +22 -5
  85. package/esm/types/5_callback_query.d.ts +1 -1
  86. package/esm/types/5_callback_query.js +2 -1
  87. package/esm/types/5_chat.d.ts +1 -1
  88. package/esm/types/6_update.d.ts +12 -2
  89. package/esm/types/{0__file_id.js → _file_id.js} +2 -1
  90. package/package.json +1 -1
  91. package/script/0_errors.d.ts +12 -0
  92. package/script/0_errors.js +27 -0
  93. package/script/1_utilities.d.ts +1 -1
  94. package/script/1_utilities.js +1 -1
  95. package/script/2_tl.d.ts +6 -6
  96. package/script/2_tl.js +6 -6
  97. package/script/3_storage.d.ts +5 -5
  98. package/script/3_storage.js +5 -5
  99. package/script/3_types.d.ts +6 -5
  100. package/script/3_types.js +6 -5
  101. package/script/4_constants.d.ts +2 -2
  102. package/script/4_constants.js +2 -2
  103. package/script/5_client.d.ts +1 -1
  104. package/script/5_client.js +1 -1
  105. package/script/client/0_client_abstract.js +3 -2
  106. package/script/client/0_html.js +4 -3
  107. package/script/client/0_markdown.js +6 -5
  108. package/script/client/0_params.d.ts +7 -1
  109. package/script/client/0_types.d.ts +1 -2
  110. package/script/client/0_types.js +0 -4
  111. package/script/client/0_utilities.d.ts +0 -3
  112. package/script/client/0_utilities.js +3 -24
  113. package/script/client/1_business_connection_manager.d.ts +11 -0
  114. package/script/client/1_business_connection_manager.js +51 -0
  115. package/script/client/1_client_encrypted.js +2 -2
  116. package/script/client/1_client_plain.js +3 -4
  117. package/script/client/1_composer.js +3 -2
  118. package/script/client/1_file_manager.js +5 -5
  119. package/script/client/1_update_manager.d.ts +8 -1
  120. package/script/client/1_update_manager.js +88 -8
  121. package/script/client/2_message_manager.d.ts +7 -6
  122. package/script/client/2_message_manager.js +88 -73
  123. package/script/client/3_chat_list_manager.js +3 -2
  124. package/script/client/3_story_manager.js +2 -1
  125. package/script/client/4_client.d.ts +422 -421
  126. package/script/client/4_client.js +578 -520
  127. package/script/mod.d.ts +1 -0
  128. package/script/mod.js +1 -0
  129. package/script/storage/0_storage.d.ts +5 -0
  130. package/script/storage/0_storage.js +20 -0
  131. package/script/storage/{1_storage_indexed_db.js → 2_storage_indexed_db.js} +7 -7
  132. package/script/storage/{1_storage_local_storage.js → 2_storage_local_storage.js} +10 -10
  133. package/{esm/storage/1_storage_memory.d.ts → script/storage/2_storage_memory.d.ts} +1 -4
  134. package/script/storage/{1_storage_memory.js → 2_storage_memory.js} +12 -32
  135. package/script/storage/{1_storage_session_storage.js → 2_storage_session_storage.js} +10 -10
  136. package/script/tl/2_types.d.ts +1071 -183
  137. package/script/tl/2_types.js +3028 -504
  138. package/script/tl/3_functions.d.ts +381 -17
  139. package/script/tl/3_functions.js +1047 -143
  140. package/{esm/tl/4_tl_writer.d.ts → script/tl/5_tl_writer.d.ts} +1 -1
  141. package/{esm/tl/4_rpc_result.d.ts → script/tl/6_rpc_result.d.ts} +1 -1
  142. package/script/tl/{4_rpc_result.js → 6_rpc_result.js} +2 -2
  143. package/script/tl/{6_message.d.ts → 7_message.d.ts} +2 -2
  144. package/script/tl/{6_message.js → 7_message.js} +8 -8
  145. package/script/tl/{7_message_container.d.ts → 8_message_container.d.ts} +1 -1
  146. package/script/tl/{7_message_container.js → 8_message_container.js} +7 -7
  147. package/script/types/0_chat_photo.d.ts +1 -0
  148. package/script/types/0_chat_photo.js +16 -13
  149. package/script/types/0_message_entity.d.ts +1 -1
  150. package/script/types/0_thumbnail.js +6 -6
  151. package/script/types/1_bot_command_scope.d.ts +1 -1
  152. package/script/types/1_photo.js +7 -7
  153. package/script/types/1_story_privacy.d.ts +1 -1
  154. package/script/types/2_business_connection.d.ts +11 -0
  155. package/script/types/2_business_connection.js +16 -0
  156. package/script/types/2_chat_member.d.ts +1 -1
  157. package/script/types/2_chosen_inline_result.d.ts +1 -1
  158. package/script/types/2_game.js +3 -3
  159. package/script/types/2_inline_keyboard_button.d.ts +1 -1
  160. package/script/types/2_inline_query.d.ts +1 -1
  161. package/script/types/2_invite_link.d.ts +1 -1
  162. package/script/types/2_message_reaction_count.d.ts +1 -1
  163. package/script/types/2_message_reactions.d.ts +1 -1
  164. package/script/types/2_story_content.js +4 -4
  165. package/{esm/types/1_story_interactive_area.d.ts → script/types/2_story_interactive_area.d.ts} +2 -2
  166. package/script/types/{1_story_interactive_area.js → 2_story_interactive_area.js} +2 -2
  167. package/script/types/3_chat_member_updated.d.ts +1 -1
  168. package/script/types/3_reply_markup.d.ts +1 -1
  169. package/script/types/3_story.d.ts +2 -2
  170. package/script/types/3_story.js +2 -2
  171. package/script/types/4_inline_query_result.d.ts +1 -1
  172. package/script/types/4_inline_query_result.js +2 -2
  173. package/script/types/4_message.d.ts +9 -3
  174. package/script/types/4_message.js +37 -20
  175. package/script/types/5_callback_query.d.ts +1 -1
  176. package/script/types/5_callback_query.js +2 -1
  177. package/script/types/5_chat.d.ts +1 -1
  178. package/script/types/6_update.d.ts +12 -2
  179. package/script/types/{0__file_id.js → _file_id.js} +2 -1
  180. /package/esm/storage/{0_utilities.d.ts → 1_utilities.d.ts} +0 -0
  181. /package/esm/storage/{0_utilities.js → 1_utilities.js} +0 -0
  182. /package/esm/storage/{1_storage_indexed_db.d.ts → 2_storage_indexed_db.d.ts} +0 -0
  183. /package/esm/storage/{1_storage_local_storage.d.ts → 2_storage_local_storage.d.ts} +0 -0
  184. /package/esm/storage/{1_storage_session_storage.d.ts → 2_storage_session_storage.d.ts} +0 -0
  185. /package/esm/tl/{3_tl_reader.d.ts → 4_tl_reader.d.ts} +0 -0
  186. /package/esm/tl/{3_tl_reader.js → 4_tl_reader.js} +0 -0
  187. /package/esm/tl/{4_tl_writer.js → 5_tl_writer.js} +0 -0
  188. /package/esm/types/{0_venue.d.ts → 1_venue.d.ts} +0 -0
  189. /package/esm/types/{0_venue.js → 1_venue.js} +0 -0
  190. /package/esm/types/{0__file_id.d.ts → _file_id.d.ts} +0 -0
  191. /package/esm/types/{1__getters.d.ts → _getters.d.ts} +0 -0
  192. /package/esm/types/{1__getters.js → _getters.js} +0 -0
  193. /package/script/storage/{0_utilities.d.ts → 1_utilities.d.ts} +0 -0
  194. /package/script/storage/{0_utilities.js → 1_utilities.js} +0 -0
  195. /package/script/storage/{1_storage_indexed_db.d.ts → 2_storage_indexed_db.d.ts} +0 -0
  196. /package/script/storage/{1_storage_local_storage.d.ts → 2_storage_local_storage.d.ts} +0 -0
  197. /package/script/storage/{1_storage_session_storage.d.ts → 2_storage_session_storage.d.ts} +0 -0
  198. /package/script/tl/{3_tl_reader.d.ts → 4_tl_reader.d.ts} +0 -0
  199. /package/script/tl/{3_tl_reader.js → 4_tl_reader.js} +0 -0
  200. /package/script/tl/{4_tl_writer.js → 5_tl_writer.js} +0 -0
  201. /package/script/types/{0_venue.d.ts → 1_venue.d.ts} +0 -0
  202. /package/script/types/{0_venue.js → 1_venue.js} +0 -0
  203. /package/script/types/{0__file_id.d.ts → _file_id.d.ts} +0 -0
  204. /package/script/types/{1__getters.d.ts → _getters.d.ts} +0 -0
  205. /package/script/types/{1__getters.js → _getters.js} +0 -0
package/esm/mod.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./0_errors.js";
1
2
  export { getColorFromPeerId, getColorName, getRandomId, setLogVerbosity } from "./1_utilities.js";
2
3
  export { checkPassword } from "./client/0_password.js";
3
4
  export * from "./2_connection.js";
package/esm/mod.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./0_errors.js";
1
2
  export { getColorFromPeerId, getColorName, getRandomId, setLogVerbosity } from "./1_utilities.js";
2
3
  export { checkPassword } from "./client/0_password.js";
3
4
  export * from "./2_connection.js";
@@ -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>;
@@ -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 "./0_utilities.js";
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 "./0_utilities.js";
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 { CacheMap, MaybePromise } from "../1_utilities.js";
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 "./0_utilities.js";
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.getMap(key).get(toString(key)) ?? null;
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.getMap(key_).set(key, value);
80
+ this.map.set(key, value);
99
81
  }
100
82
  else {
101
- this.getMap(key_).delete(key);
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 map of this.getMaps()) {
118
- for (const entry of map.entries()) {
119
- if (__classPrivateFieldGet(this, _StorageMemory_id, "f") !== null && !entry[0].startsWith("__S" + __classPrivateFieldGet(this, _StorageMemory_id, "f"))) {
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 "./0_utilities.js";
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") {