@zukhruf/mutex 0.3.16 → 0.3.18

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 (236) hide show
  1. package/README.md +7 -8
  2. package/dist/index.d.ts +3 -9
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -7
  5. package/dist/index.js.map +1 -1
  6. package/dist/lock-stores/file-system/file-lock-store.d.ts +4 -9
  7. package/dist/lock-stores/file-system/file-lock-store.d.ts.map +1 -1
  8. package/dist/lock-stores/file-system/file-lock-store.js +21 -38
  9. package/dist/lock-stores/file-system/file-lock-store.js.map +1 -1
  10. package/dist/lock-stores/file-system/lock-file-store.d.ts +1 -1
  11. package/dist/lock-stores/file-system/lock-file-store.d.ts.map +1 -1
  12. package/dist/lock-stores/file-system/lock-file-store.js +15 -24
  13. package/dist/lock-stores/file-system/lock-file-store.js.map +1 -1
  14. package/dist/lock-stores/file-system/presence.d.ts +10 -17
  15. package/dist/lock-stores/file-system/presence.d.ts.map +1 -1
  16. package/dist/lock-stores/file-system/presence.js +30 -69
  17. package/dist/lock-stores/file-system/presence.js.map +1 -1
  18. package/dist/lock-stores/file-system/record-file.d.ts +10 -0
  19. package/dist/lock-stores/file-system/record-file.d.ts.map +1 -0
  20. package/dist/lock-stores/file-system/record-file.js +21 -0
  21. package/dist/lock-stores/file-system/record-file.js.map +1 -0
  22. package/dist/lock-stores/file-system/ticket-queue-file-store.d.ts +1 -1
  23. package/dist/lock-stores/file-system/ticket-queue-file-store.d.ts.map +1 -1
  24. package/dist/lock-stores/file-system/ticket-queue-file-store.js +25 -32
  25. package/dist/lock-stores/file-system/ticket-queue-file-store.js.map +1 -1
  26. package/dist/lock-stores/ipc/child-process-connection.d.ts +3 -4
  27. package/dist/lock-stores/ipc/child-process-connection.d.ts.map +1 -1
  28. package/dist/lock-stores/ipc/child-process-connection.js +11 -27
  29. package/dist/lock-stores/ipc/child-process-connection.js.map +1 -1
  30. package/dist/lock-stores/ipc/ipc-lock-coordinator.d.ts +3 -7
  31. package/dist/lock-stores/ipc/ipc-lock-coordinator.d.ts.map +1 -1
  32. package/dist/lock-stores/ipc/ipc-lock-coordinator.js +6 -12
  33. package/dist/lock-stores/ipc/ipc-lock-coordinator.js.map +1 -1
  34. package/dist/lock-stores/ipc/ipc-store.d.ts +2 -7
  35. package/dist/lock-stores/ipc/ipc-store.d.ts.map +1 -1
  36. package/dist/lock-stores/ipc/ipc-store.js +9 -15
  37. package/dist/lock-stores/ipc/ipc-store.js.map +1 -1
  38. package/dist/lock-stores/ipc/process-channel-connection.d.ts +4 -4
  39. package/dist/lock-stores/ipc/process-channel-connection.d.ts.map +1 -1
  40. package/dist/lock-stores/ipc/process-channel-connection.js +13 -25
  41. package/dist/lock-stores/ipc/process-channel-connection.js.map +1 -1
  42. package/dist/lock-stores/memory/memory-store.d.ts +1 -1
  43. package/dist/lock-stores/memory/memory-store.d.ts.map +1 -1
  44. package/dist/lock-stores/memory/memory-store.js +1 -1
  45. package/dist/lock-stores/memory/memory-store.js.map +1 -1
  46. package/dist/lock-stores/remote/connection-supervisor.d.ts +4 -4
  47. package/dist/lock-stores/remote/connection-supervisor.d.ts.map +1 -1
  48. package/dist/lock-stores/remote/connection-supervisor.js.map +1 -1
  49. package/dist/lock-stores/remote/connection.d.ts +4 -3
  50. package/dist/lock-stores/remote/connection.d.ts.map +1 -1
  51. package/dist/lock-stores/remote/connector.d.ts +5 -5
  52. package/dist/lock-stores/remote/connector.d.ts.map +1 -1
  53. package/dist/lock-stores/remote/delegating-lock-store.d.ts +14 -0
  54. package/dist/lock-stores/remote/delegating-lock-store.d.ts.map +1 -0
  55. package/dist/lock-stores/remote/delegating-lock-store.js +20 -0
  56. package/dist/lock-stores/remote/delegating-lock-store.js.map +1 -0
  57. package/dist/lock-stores/remote/lock-coordinator.d.ts +3 -4
  58. package/dist/lock-stores/remote/lock-coordinator.d.ts.map +1 -1
  59. package/dist/lock-stores/remote/lock-coordinator.js +23 -12
  60. package/dist/lock-stores/remote/lock-coordinator.js.map +1 -1
  61. package/dist/lock-stores/remote/protocol.d.ts +6 -2
  62. package/dist/lock-stores/remote/protocol.d.ts.map +1 -1
  63. package/dist/lock-stores/remote/protocol.js +14 -8
  64. package/dist/lock-stores/remote/protocol.js.map +1 -1
  65. package/dist/lock-stores/remote/queries.d.ts +2 -2
  66. package/dist/lock-stores/remote/queries.d.ts.map +1 -1
  67. package/dist/lock-stores/remote/queries.js.map +1 -1
  68. package/dist/lock-stores/remote/remote-lock-client.d.ts +2 -2
  69. package/dist/lock-stores/remote/remote-lock-client.d.ts.map +1 -1
  70. package/dist/lock-stores/remote/remote-lock-client.js +15 -8
  71. package/dist/lock-stores/remote/remote-lock-client.js.map +1 -1
  72. package/dist/lock-stores/remote/shared-channel-connection.d.ts +27 -0
  73. package/dist/lock-stores/remote/shared-channel-connection.d.ts.map +1 -0
  74. package/dist/lock-stores/remote/shared-channel-connection.js +41 -0
  75. package/dist/lock-stores/remote/shared-channel-connection.js.map +1 -0
  76. package/dist/lock-stores/socket/advertised-ops-connection.d.ts +3 -3
  77. package/dist/lock-stores/socket/advertised-ops-connection.d.ts.map +1 -1
  78. package/dist/lock-stores/socket/advertised-ops-connection.js +4 -1
  79. package/dist/lock-stores/socket/advertised-ops-connection.js.map +1 -1
  80. package/dist/lock-stores/socket/electing-connector.d.ts +4 -5
  81. package/dist/lock-stores/socket/electing-connector.d.ts.map +1 -1
  82. package/dist/lock-stores/socket/electing-connector.js +43 -50
  83. package/dist/lock-stores/socket/electing-connector.js.map +1 -1
  84. package/dist/lock-stores/socket/handshake.d.ts.map +1 -1
  85. package/dist/lock-stores/socket/handshake.js +6 -5
  86. package/dist/lock-stores/socket/handshake.js.map +1 -1
  87. package/dist/lock-stores/socket/json-line.d.ts +6 -0
  88. package/dist/lock-stores/socket/json-line.d.ts.map +1 -0
  89. package/dist/lock-stores/socket/json-line.js +8 -0
  90. package/dist/lock-stores/socket/json-line.js.map +1 -0
  91. package/dist/lock-stores/socket/leave-errors-to-close.d.ts +9 -0
  92. package/dist/lock-stores/socket/leave-errors-to-close.d.ts.map +1 -0
  93. package/dist/lock-stores/socket/leave-errors-to-close.js +10 -0
  94. package/dist/lock-stores/socket/leave-errors-to-close.js.map +1 -0
  95. package/dist/lock-stores/socket/local-directory-connector.d.ts.map +1 -1
  96. package/dist/lock-stores/socket/local-directory-connector.js +1 -1
  97. package/dist/lock-stores/socket/local-directory-connector.js.map +1 -1
  98. package/dist/lock-stores/socket/lock-server.d.ts +7 -4
  99. package/dist/lock-stores/socket/lock-server.d.ts.map +1 -1
  100. package/dist/lock-stores/socket/lock-server.js +29 -26
  101. package/dist/lock-stores/socket/lock-server.js.map +1 -1
  102. package/dist/lock-stores/socket/socket-connection.d.ts +5 -5
  103. package/dist/lock-stores/socket/socket-connection.d.ts.map +1 -1
  104. package/dist/lock-stores/socket/socket-connection.js +21 -23
  105. package/dist/lock-stores/socket/socket-connection.js.map +1 -1
  106. package/dist/lock-stores/socket/socket-election.d.ts +9 -0
  107. package/dist/lock-stores/socket/socket-election.d.ts.map +1 -0
  108. package/dist/lock-stores/socket/socket-election.js +16 -0
  109. package/dist/lock-stores/socket/socket-election.js.map +1 -0
  110. package/dist/lock-stores/socket/socket-store.d.ts +1 -1
  111. package/dist/lock-stores/socket/socket-store.d.ts.map +1 -1
  112. package/dist/lock-stores/socket/socket-store.js +6 -6
  113. package/dist/lock-stores/socket/socket-store.js.map +1 -1
  114. package/dist/lock-stores/sqlite/holder-record.d.ts.map +1 -1
  115. package/dist/lock-stores/sqlite/holder-record.js +9 -23
  116. package/dist/lock-stores/sqlite/holder-record.js.map +1 -1
  117. package/dist/lock-stores/sqlite/sqlite-store.d.ts +6 -7
  118. package/dist/lock-stores/sqlite/sqlite-store.d.ts.map +1 -1
  119. package/dist/lock-stores/sqlite/sqlite-store.js +31 -101
  120. package/dist/lock-stores/sqlite/sqlite-store.js.map +1 -1
  121. package/dist/lock-stores/thread/parent-port-connection.d.ts +3 -4
  122. package/dist/lock-stores/thread/parent-port-connection.d.ts.map +1 -1
  123. package/dist/lock-stores/thread/parent-port-connection.js +7 -13
  124. package/dist/lock-stores/thread/parent-port-connection.js.map +1 -1
  125. package/dist/lock-stores/thread/thread-lock-coordinator.d.ts +3 -7
  126. package/dist/lock-stores/thread/thread-lock-coordinator.d.ts.map +1 -1
  127. package/dist/lock-stores/thread/thread-lock-coordinator.js +6 -12
  128. package/dist/lock-stores/thread/thread-lock-coordinator.js.map +1 -1
  129. package/dist/lock-stores/thread/thread-store.d.ts +2 -7
  130. package/dist/lock-stores/thread/thread-store.d.ts.map +1 -1
  131. package/dist/lock-stores/thread/thread-store.js +3 -12
  132. package/dist/lock-stores/thread/thread-store.js.map +1 -1
  133. package/dist/lock-stores/thread/worker-connection.d.ts +3 -4
  134. package/dist/lock-stores/thread/worker-connection.d.ts.map +1 -1
  135. package/dist/lock-stores/thread/worker-connection.js +6 -18
  136. package/dist/lock-stores/thread/worker-connection.js.map +1 -1
  137. package/dist/mutex/key.d.ts +3 -3
  138. package/dist/mutex/key.d.ts.map +1 -1
  139. package/dist/mutex/key.js.map +1 -1
  140. package/dist/mutex/lease.d.ts +2 -9
  141. package/dist/mutex/lease.d.ts.map +1 -1
  142. package/dist/mutex/lease.js +17 -12
  143. package/dist/mutex/lease.js.map +1 -1
  144. package/dist/mutex/mutex.d.ts +3 -3
  145. package/dist/mutex/mutex.d.ts.map +1 -1
  146. package/dist/mutex/mutex.js +2 -2
  147. package/dist/mutex/mutex.js.map +1 -1
  148. package/package.json +6 -9
  149. package/dist/fencing/counter-token-source.d.ts +0 -11
  150. package/dist/fencing/counter-token-source.d.ts.map +0 -1
  151. package/dist/fencing/counter-token-source.js +0 -13
  152. package/dist/fencing/counter-token-source.js.map +0 -1
  153. package/dist/fencing/epoch-token-source.d.ts +0 -13
  154. package/dist/fencing/epoch-token-source.d.ts.map +0 -1
  155. package/dist/fencing/epoch-token-source.js +0 -27
  156. package/dist/fencing/epoch-token-source.js.map +0 -1
  157. package/dist/fencing/fencing-token.d.ts +0 -12
  158. package/dist/fencing/fencing-token.d.ts.map +0 -1
  159. package/dist/fencing/fencing-token.js +0 -18
  160. package/dist/fencing/fencing-token.js.map +0 -1
  161. package/dist/fencing/file-token-source.d.ts +0 -13
  162. package/dist/fencing/file-token-source.d.ts.map +0 -1
  163. package/dist/fencing/file-token-source.js +0 -36
  164. package/dist/fencing/file-token-source.js.map +0 -1
  165. package/dist/fencing/monotonic-clock-token-source.d.ts +0 -12
  166. package/dist/fencing/monotonic-clock-token-source.d.ts.map +0 -1
  167. package/dist/fencing/monotonic-clock-token-source.js +0 -15
  168. package/dist/fencing/monotonic-clock-token-source.js.map +0 -1
  169. package/dist/fencing/token-source.d.ts +0 -9
  170. package/dist/fencing/token-source.d.ts.map +0 -1
  171. package/dist/fencing/token-source.js +0 -2
  172. package/dist/fencing/token-source.js.map +0 -1
  173. package/dist/leader-election/index.d.ts +0 -4
  174. package/dist/leader-election/index.d.ts.map +0 -1
  175. package/dist/leader-election/index.js +0 -4
  176. package/dist/leader-election/index.js.map +0 -1
  177. package/dist/leader-election/leader-election.d.ts +0 -23
  178. package/dist/leader-election/leader-election.d.ts.map +0 -1
  179. package/dist/leader-election/leader-election.js +0 -79
  180. package/dist/leader-election/leader-election.js.map +0 -1
  181. package/dist/leader-election/leadership.d.ts +0 -14
  182. package/dist/leader-election/leadership.d.ts.map +0 -1
  183. package/dist/leader-election/leadership.js +0 -23
  184. package/dist/leader-election/leadership.js.map +0 -1
  185. package/dist/local-directory/local-directory.d.ts +0 -7
  186. package/dist/local-directory/local-directory.d.ts.map +0 -1
  187. package/dist/local-directory/local-directory.js +0 -75
  188. package/dist/local-directory/local-directory.js.map +0 -1
  189. package/dist/local-directory/network-directory-error.d.ts +0 -8
  190. package/dist/local-directory/network-directory-error.d.ts.map +0 -1
  191. package/dist/local-directory/network-directory-error.js +0 -13
  192. package/dist/local-directory/network-directory-error.js.map +0 -1
  193. package/dist/mutex/lock-lost-error.d.ts +0 -6
  194. package/dist/mutex/lock-lost-error.d.ts.map +0 -1
  195. package/dist/mutex/lock-lost-error.js +0 -10
  196. package/dist/mutex/lock-lost-error.js.map +0 -1
  197. package/dist/shared/fs/atomic-write.d.ts +0 -3
  198. package/dist/shared/fs/atomic-write.d.ts.map +0 -1
  199. package/dist/shared/fs/atomic-write.js +0 -10
  200. package/dist/shared/fs/atomic-write.js.map +0 -1
  201. package/dist/shared/fs/create-exclusive.d.ts +0 -6
  202. package/dist/shared/fs/create-exclusive.d.ts.map +0 -1
  203. package/dist/shared/fs/create-exclusive.js +0 -29
  204. package/dist/shared/fs/create-exclusive.js.map +0 -1
  205. package/dist/shared/fs/durable-write.d.ts +0 -9
  206. package/dist/shared/fs/durable-write.d.ts.map +0 -1
  207. package/dist/shared/fs/durable-write.js +0 -49
  208. package/dist/shared/fs/durable-write.js.map +0 -1
  209. package/dist/shared/fs/errno.d.ts +0 -2
  210. package/dist/shared/fs/errno.d.ts.map +0 -1
  211. package/dist/shared/fs/errno.js +0 -4
  212. package/dist/shared/fs/errno.js.map +0 -1
  213. package/dist/shared/fs/patiently.d.ts +0 -3
  214. package/dist/shared/fs/patiently.d.ts.map +0 -1
  215. package/dist/shared/fs/patiently.js +0 -30
  216. package/dist/shared/fs/patiently.js.map +0 -1
  217. package/dist/shared/fs/replace-file.d.ts +0 -8
  218. package/dist/shared/fs/replace-file.d.ts.map +0 -1
  219. package/dist/shared/fs/replace-file.js +0 -12
  220. package/dist/shared/fs/replace-file.js.map +0 -1
  221. package/dist/shared/fs/safe-file-name.d.ts +0 -16
  222. package/dist/shared/fs/safe-file-name.d.ts.map +0 -1
  223. package/dist/shared/fs/safe-file-name.js +0 -37
  224. package/dist/shared/fs/safe-file-name.js.map +0 -1
  225. package/dist/shared/sqlite/is-busy.d.ts +0 -3
  226. package/dist/shared/sqlite/is-busy.d.ts.map +0 -1
  227. package/dist/shared/sqlite/is-busy.js +0 -10
  228. package/dist/shared/sqlite/is-busy.js.map +0 -1
  229. package/dist/shared/sqlite/is-cant-open.d.ts +0 -3
  230. package/dist/shared/sqlite/is-cant-open.d.ts.map +0 -1
  231. package/dist/shared/sqlite/is-cant-open.js +0 -9
  232. package/dist/shared/sqlite/is-cant-open.js.map +0 -1
  233. package/dist/shared/sqlite/is-not-a-database.d.ts +0 -3
  234. package/dist/shared/sqlite/is-not-a-database.d.ts.map +0 -1
  235. package/dist/shared/sqlite/is-not-a-database.js +0 -9
  236. package/dist/shared/sqlite/is-not-a-database.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"replace-file.d.ts","sourceRoot":"","sources":["../../../src/shared/fs/replace-file.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAEtD"}
@@ -1,12 +0,0 @@
1
- import { rename } from 'node:fs/promises';
2
- import { patiently } from "./patiently.js";
3
- /**
4
- * Moves `draft` over `path` in one step. On Windows, a rename over a file
5
- * fails while another process has that file open, for example a waiter that
6
- * reads it at that moment. The refusal is brief, so the rename is tried again;
7
- * it stays the single commit point.
8
- */
9
- export function replaceFile(draft, path) {
10
- return patiently(() => rename(draft, path));
11
- }
12
- //# sourceMappingURL=replace-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replace-file.js","sourceRoot":"","sources":["../../../src/shared/fs/replace-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,IAAY;IACrD,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9C,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Maps any key to a single path segment that still fits a file name after the
3
- * caller adds up to `longestSuffix` characters. Encoding every dot means a key
4
- * can never be `.` or `..`, and suffixes such as `.lock` can never collide with
5
- * a key. On a case-insensitive file system, keys that differ only by case share
6
- * a name, which over-locks but never under-locks.
7
- *
8
- * A key whose encoding does not fit, or that is not well-formed Unicode and so
9
- * has no encoding, gets the start of its encoding, `%%`, and the SHA-256 of its
10
- * UTF-16 code units. A key that fits keeps the name earlier versions gave it, so
11
- * processes of two versions share its lock. No encoding contains `%%`, so the
12
- * two kinds of name never meet; the digest is hex, whose one case cannot fold
13
- * two digests into one name; and the code units keep lone surrogates apart.
14
- */
15
- export declare function safeFileName(key: string, longestSuffix: number): string;
16
- //# sourceMappingURL=safe-file-name.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe-file-name.d.ts","sourceRoot":"","sources":["../../../src/shared/fs/safe-file-name.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAYvE"}
@@ -1,37 +0,0 @@
1
- import { createHash } from 'node:crypto';
2
- /** The longest file name that ext4, APFS, NTFS and tmpfs accept. */
3
- const longestFileName = 255;
4
- /** Enough of a long key's start to recognize it in a directory listing. */
5
- const visibleStart = 32;
6
- /**
7
- * Maps any key to a single path segment that still fits a file name after the
8
- * caller adds up to `longestSuffix` characters. Encoding every dot means a key
9
- * can never be `.` or `..`, and suffixes such as `.lock` can never collide with
10
- * a key. On a case-insensitive file system, keys that differ only by case share
11
- * a name, which over-locks but never under-locks.
12
- *
13
- * A key whose encoding does not fit, or that is not well-formed Unicode and so
14
- * has no encoding, gets the start of its encoding, `%%`, and the SHA-256 of its
15
- * UTF-16 code units. A key that fits keeps the name earlier versions gave it, so
16
- * processes of two versions share its lock. No encoding contains `%%`, so the
17
- * two kinds of name never meet; the digest is hex, whose one case cannot fold
18
- * two digests into one name; and the code units keep lone surrogates apart.
19
- */
20
- export function safeFileName(key, longestSuffix) {
21
- if (key.isWellFormed()) {
22
- const encoded = encode(key);
23
- if (encoded.length + longestSuffix <= longestFileName)
24
- return encoded;
25
- }
26
- const start = encode(key.toWellFormed())
27
- .slice(0, visibleStart)
28
- .replace(/%[0-9A-F]?$/, '');
29
- const digest = createHash('sha256')
30
- .update(Buffer.from(key, 'utf16le'))
31
- .digest('hex');
32
- return `${start}%%${digest}`;
33
- }
34
- function encode(key) {
35
- return encodeURIComponent(key).replaceAll('.', '%2E');
36
- }
37
- //# sourceMappingURL=safe-file-name.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe-file-name.js","sourceRoot":"","sources":["../../../src/shared/fs/safe-file-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,oEAAoE;AACpE,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,2EAA2E;AAC3E,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,aAAqB;IAC7D,IAAI,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,OAAO,CAAC,MAAM,GAAG,aAAa,IAAI,eAAe;YAAE,OAAO,OAAO,CAAC;IACxE,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;SACrC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC;SACtB,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC;SAChC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;SACnC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjB,OAAO,GAAG,KAAK,KAAK,MAAM,EAAE,CAAC;AAC/B,CAAC;AAED,SAAS,MAAM,CAAC,GAAW;IACzB,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACxD,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Whether `error` means another connection holds a conflicting lock right now. */
2
- export declare function isBusy(error: unknown): boolean;
3
- //# sourceMappingURL=is-busy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-busy.d.ts","sourceRoot":"","sources":["../../../src/shared/sqlite/is-busy.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ9C"}
@@ -1,10 +0,0 @@
1
- const SQLITE_BUSY = 5;
2
- /** Whether `error` means another connection holds a conflicting lock right now. */
3
- export function isBusy(error) {
4
- return (error instanceof Error &&
5
- 'errcode' in error &&
6
- typeof error.errcode === 'number' &&
7
- // The low byte is the primary result code, covering SQLITE_BUSY_* variants.
8
- (error.errcode & 0xff) === SQLITE_BUSY);
9
- }
10
- //# sourceMappingURL=is-busy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-busy.js","sourceRoot":"","sources":["../../../src/shared/sqlite/is-busy.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,mFAAmF;AACnF,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,4EAA4E;QAC5E,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,WAAW,CACvC,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Whether `error` means SQLite could not open the file, for example because it does not exist. */
2
- export declare function isCantOpen(error: unknown): boolean;
3
- //# sourceMappingURL=is-cant-open.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-cant-open.d.ts","sourceRoot":"","sources":["../../../src/shared/sqlite/is-cant-open.ts"],"names":[],"mappings":"AAEA,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOlD"}
@@ -1,9 +0,0 @@
1
- const SQLITE_CANTOPEN = 14;
2
- /** Whether `error` means SQLite could not open the file, for example because it does not exist. */
3
- export function isCantOpen(error) {
4
- return (error instanceof Error &&
5
- 'errcode' in error &&
6
- typeof error.errcode === 'number' &&
7
- (error.errcode & 0xff) === SQLITE_CANTOPEN);
8
- }
9
- //# sourceMappingURL=is-cant-open.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-cant-open.js","sourceRoot":"","sources":["../../../src/shared/sqlite/is-cant-open.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,eAAe,CAC3C,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Whether `error` means the file is not a SQLite database, for example a file that an older version wrote. */
2
- export declare function isNotADatabase(error: unknown): boolean;
3
- //# sourceMappingURL=is-not-a-database.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-not-a-database.d.ts","sourceRoot":"","sources":["../../../src/shared/sqlite/is-not-a-database.ts"],"names":[],"mappings":"AAEA,+GAA+G;AAC/G,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOtD"}
@@ -1,9 +0,0 @@
1
- const SQLITE_NOTADB = 26;
2
- /** Whether `error` means the file is not a SQLite database, for example a file that an older version wrote. */
3
- export function isNotADatabase(error) {
4
- return (error instanceof Error &&
5
- 'errcode' in error &&
6
- typeof error.errcode === 'number' &&
7
- (error.errcode & 0xff) === SQLITE_NOTADB);
8
- }
9
- //# sourceMappingURL=is-not-a-database.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-not-a-database.js","sourceRoot":"","sources":["../../../src/shared/sqlite/is-not-a-database.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,+GAA+G;AAC/G,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,aAAa,CACzC,CAAC;AACJ,CAAC"}