@hoshinotatsuya/pg-replica-sync 0.2.2 → 0.3.0

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 (215) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/compare-lsn.d.mts +3 -3
  4. package/dist/compare-lsn.d.ts +3 -3
  5. package/dist/compare-lsn.js +3 -3
  6. package/dist/constants/exclusion-reason.constant.d.mts +12 -12
  7. package/dist/constants/exclusion-reason.constant.d.ts +12 -12
  8. package/dist/constants/exclusion-reason.constant.d.ts.map +1 -1
  9. package/dist/constants/exclusion-reason.constant.js +12 -12
  10. package/dist/constants/exclusion-reason.constant.js.map +1 -1
  11. package/dist/constants/node-role.constant.d.mts +1 -1
  12. package/dist/constants/node-role.constant.d.ts +1 -1
  13. package/dist/constants/node-role.constant.d.ts.map +1 -1
  14. package/dist/constants/node-role.constant.js +1 -1
  15. package/dist/constants/node-role.constant.js.map +1 -1
  16. package/dist/constants/probe-sql.constant.d.mts +25 -25
  17. package/dist/constants/probe-sql.constant.d.ts +25 -25
  18. package/dist/constants/probe-sql.constant.js +25 -25
  19. package/dist/constants/replica-sync-defaults.constant.d.mts +26 -26
  20. package/dist/constants/replica-sync-defaults.constant.d.ts +26 -26
  21. package/dist/constants/replica-sync-defaults.constant.d.ts.map +1 -1
  22. package/dist/constants/replica-sync-defaults.constant.js +26 -26
  23. package/dist/constants/replica-sync-defaults.constant.js.map +1 -1
  24. package/dist/constants/route-reason.constant.d.mts +13 -13
  25. package/dist/constants/route-reason.constant.d.ts +13 -13
  26. package/dist/constants/route-reason.constant.d.ts.map +1 -1
  27. package/dist/constants/route-reason.constant.js +13 -13
  28. package/dist/constants/route-reason.constant.js.map +1 -1
  29. package/dist/constants/token-format.constant.d.mts +11 -11
  30. package/dist/constants/token-format.constant.d.ts +11 -11
  31. package/dist/constants/token-format.constant.d.ts.map +1 -1
  32. package/dist/constants/token-format.constant.js +11 -11
  33. package/dist/constants/token-format.constant.js.map +1 -1
  34. package/dist/constants/wal-format.constant.d.mts +6 -6
  35. package/dist/constants/wal-format.constant.d.ts +6 -6
  36. package/dist/constants/wal-format.constant.d.ts.map +1 -1
  37. package/dist/constants/wal-format.constant.js +6 -6
  38. package/dist/constants/wal-format.constant.js.map +1 -1
  39. package/dist/decode-canonical-base64url.d.mts +1 -1
  40. package/dist/decode-canonical-base64url.d.ts +1 -1
  41. package/dist/decode-canonical-base64url.d.ts.map +1 -1
  42. package/dist/decode-canonical-base64url.js +1 -1
  43. package/dist/decode-canonical-base64url.js.map +1 -1
  44. package/dist/deep-freeze.d.mts +7 -7
  45. package/dist/deep-freeze.d.ts +7 -7
  46. package/dist/deep-freeze.js +9 -9
  47. package/dist/deep-freeze.js.map +1 -1
  48. package/dist/destroy-client.d.mts +3 -3
  49. package/dist/destroy-client.d.ts +3 -3
  50. package/dist/destroy-client.js +3 -3
  51. package/dist/evaluate-replica.d.mts +3 -3
  52. package/dist/evaluate-replica.d.ts +3 -3
  53. package/dist/evaluate-replica.js +3 -3
  54. package/dist/format-lsn.d.mts +1 -1
  55. package/dist/format-lsn.d.ts +1 -1
  56. package/dist/format-lsn.d.ts.map +1 -1
  57. package/dist/format-lsn.js +2 -2
  58. package/dist/format-lsn.js.map +1 -1
  59. package/dist/invalid-lsn.error.d.mts +1 -1
  60. package/dist/invalid-lsn.error.d.ts +1 -1
  61. package/dist/invalid-lsn.error.d.ts.map +1 -1
  62. package/dist/invalid-lsn.error.js +2 -2
  63. package/dist/invalid-lsn.error.js.map +1 -1
  64. package/dist/invalid-replica-sync-options.error.d.mts +1 -1
  65. package/dist/invalid-replica-sync-options.error.d.ts +1 -1
  66. package/dist/invalid-replica-sync-options.error.d.ts.map +1 -1
  67. package/dist/invalid-replica-sync-options.error.js +1 -1
  68. package/dist/invalid-replica-sync-options.error.js.map +1 -1
  69. package/dist/lag-bytes.d.mts +3 -3
  70. package/dist/lag-bytes.d.ts +3 -3
  71. package/dist/lag-bytes.js +3 -3
  72. package/dist/lsn-or-null.d.mts +1 -1
  73. package/dist/lsn-or-null.d.ts +1 -1
  74. package/dist/lsn-or-null.d.ts.map +1 -1
  75. package/dist/lsn-or-null.js +1 -1
  76. package/dist/lsn-or-null.js.map +1 -1
  77. package/dist/notify.d.mts +7 -7
  78. package/dist/notify.d.ts +7 -7
  79. package/dist/notify.js +8 -8
  80. package/dist/notify.js.map +1 -1
  81. package/dist/parse-lsn.d.mts +3 -3
  82. package/dist/parse-lsn.d.ts +3 -3
  83. package/dist/parse-lsn.js +3 -3
  84. package/dist/probe-connection-closed.error.d.mts +1 -1
  85. package/dist/probe-connection-closed.error.d.ts +1 -1
  86. package/dist/probe-connection-closed.error.d.ts.map +1 -1
  87. package/dist/probe-connection-closed.error.js +2 -2
  88. package/dist/probe-connection-closed.error.js.map +1 -1
  89. package/dist/probe-connection.d.mts +20 -20
  90. package/dist/probe-connection.d.ts +20 -20
  91. package/dist/probe-connection.d.ts.map +1 -1
  92. package/dist/probe-connection.js +25 -25
  93. package/dist/probe-connection.js.map +1 -1
  94. package/dist/probe-timeout.error.d.mts +1 -1
  95. package/dist/probe-timeout.error.d.ts +1 -1
  96. package/dist/probe-timeout.error.d.ts.map +1 -1
  97. package/dist/probe-timeout.error.js +2 -2
  98. package/dist/probe-timeout.error.js.map +1 -1
  99. package/dist/read-node-state.d.mts +3 -3
  100. package/dist/read-node-state.d.ts +3 -3
  101. package/dist/read-node-state.js +4 -4
  102. package/dist/read-node-state.js.map +1 -1
  103. package/dist/replica-router.d.mts +133 -133
  104. package/dist/replica-router.d.ts +133 -133
  105. package/dist/replica-router.d.ts.map +1 -1
  106. package/dist/replica-router.js +162 -162
  107. package/dist/replica-router.js.map +1 -1
  108. package/dist/require-integer.d.mts +1 -1
  109. package/dist/require-integer.d.ts +1 -1
  110. package/dist/require-integer.d.ts.map +1 -1
  111. package/dist/require-integer.js +3 -3
  112. package/dist/require-integer.js.map +1 -1
  113. package/dist/secret-weakness.d.mts +13 -13
  114. package/dist/secret-weakness.d.ts +13 -13
  115. package/dist/secret-weakness.js +16 -16
  116. package/dist/secret-weakness.js.map +1 -1
  117. package/dist/smallest-period.d.mts +4 -4
  118. package/dist/smallest-period.d.ts +4 -4
  119. package/dist/smallest-period.js +4 -4
  120. package/dist/sql-state-of.d.mts +6 -6
  121. package/dist/sql-state-of.d.ts +6 -6
  122. package/dist/sql-state-of.js +6 -6
  123. package/dist/state-cache.d.mts +14 -14
  124. package/dist/state-cache.d.ts +14 -14
  125. package/dist/state-cache.d.ts.map +1 -1
  126. package/dist/state-cache.js +15 -15
  127. package/dist/state-cache.js.map +1 -1
  128. package/dist/timeline-of.d.mts +2 -2
  129. package/dist/timeline-of.d.ts +2 -2
  130. package/dist/timeline-of.js +2 -2
  131. package/dist/to-error.d.mts +1 -1
  132. package/dist/to-error.d.ts +1 -1
  133. package/dist/to-error.d.ts.map +1 -1
  134. package/dist/to-error.js +1 -1
  135. package/dist/to-error.js.map +1 -1
  136. package/dist/token-codec.d.mts +10 -10
  137. package/dist/token-codec.d.ts +10 -10
  138. package/dist/token-codec.js +31 -31
  139. package/dist/token-codec.js.map +1 -1
  140. package/dist/token-lsn.d.mts +13 -13
  141. package/dist/token-lsn.d.ts +13 -13
  142. package/dist/token-lsn.js +13 -13
  143. package/dist/transaction-not-committed.error.d.mts +2 -2
  144. package/dist/transaction-not-committed.error.d.ts +2 -2
  145. package/dist/transaction-not-committed.error.d.ts.map +1 -1
  146. package/dist/transaction-not-committed.error.js +3 -3
  147. package/dist/transaction-not-committed.error.js.map +1 -1
  148. package/dist/transaction-not-open.error.d.mts +5 -5
  149. package/dist/transaction-not-open.error.d.ts +5 -5
  150. package/dist/transaction-not-open.error.js +6 -6
  151. package/dist/transaction-not-open.error.js.map +1 -1
  152. package/dist/types/cache-entry.type.d.mts +4 -4
  153. package/dist/types/cache-entry.type.d.ts +4 -4
  154. package/dist/types/clock.type.d.mts +3 -3
  155. package/dist/types/clock.type.d.ts +3 -3
  156. package/dist/types/confirm-event.type.d.mts +3 -3
  157. package/dist/types/confirm-event.type.d.ts +3 -3
  158. package/dist/types/decoded-token.type.d.mts +2 -2
  159. package/dist/types/decoded-token.type.d.ts +2 -2
  160. package/dist/types/evaluated.type.d.mts +1 -1
  161. package/dist/types/evaluated.type.d.ts +1 -1
  162. package/dist/types/evaluated.type.d.ts.map +1 -1
  163. package/dist/types/exclusion.type.d.mts +1 -1
  164. package/dist/types/exclusion.type.d.ts +1 -1
  165. package/dist/types/exclusion.type.d.ts.map +1 -1
  166. package/dist/types/node-state.type.d.mts +13 -13
  167. package/dist/types/node-state.type.d.ts +13 -13
  168. package/dist/types/node-state.type.d.ts.map +1 -1
  169. package/dist/types/not-a-pool.type.d.mts +5 -5
  170. package/dist/types/not-a-pool.type.d.ts +5 -5
  171. package/dist/types/probe-event.type.d.mts +1 -1
  172. package/dist/types/probe-event.type.d.ts +1 -1
  173. package/dist/types/probe-event.type.d.ts.map +1 -1
  174. package/dist/types/probe-outcome.type.d.mts +1 -1
  175. package/dist/types/probe-outcome.type.d.ts +1 -1
  176. package/dist/types/probe-outcome.type.d.ts.map +1 -1
  177. package/dist/types/probe-sample.type.d.mts +1 -1
  178. package/dist/types/probe-sample.type.d.ts +1 -1
  179. package/dist/types/probe-sample.type.d.ts.map +1 -1
  180. package/dist/types/replica-node.type.d.mts +7 -7
  181. package/dist/types/replica-node.type.d.ts +7 -7
  182. package/dist/types/replica-requirement.type.d.mts +2 -2
  183. package/dist/types/replica-requirement.type.d.ts +2 -2
  184. package/dist/types/replica-router-options.type.d.mts +25 -25
  185. package/dist/types/replica-router-options.type.d.ts +25 -25
  186. package/dist/types/replica-router-options.type.d.ts.map +1 -1
  187. package/dist/types/route-decision.type.d.mts +5 -5
  188. package/dist/types/route-decision.type.d.ts +5 -5
  189. package/dist/types/route-decision.type.d.ts.map +1 -1
  190. package/dist/types/router-observer.type.d.mts +5 -5
  191. package/dist/types/router-observer.type.d.ts +5 -5
  192. package/dist/types/router-observer.type.d.ts.map +1 -1
  193. package/dist/types/router-stats.type.d.mts +8 -8
  194. package/dist/types/router-stats.type.d.ts +8 -8
  195. package/dist/types/router-stats.type.d.ts.map +1 -1
  196. package/dist/types/sql-command-executor.type.d.mts +4 -4
  197. package/dist/types/sql-command-executor.type.d.ts +4 -4
  198. package/dist/types/sql-query-executor.type.d.mts +3 -3
  199. package/dist/types/sql-query-executor.type.d.ts +3 -3
  200. package/dist/types/wal-layout.type.d.mts +1 -1
  201. package/dist/types/wal-layout.type.d.ts +1 -1
  202. package/dist/types/wal-layout.type.d.ts.map +1 -1
  203. package/dist/types/wal-position.type.d.mts +5 -5
  204. package/dist/types/wal-position.type.d.ts +5 -5
  205. package/dist/types/wal-position.type.d.ts.map +1 -1
  206. package/dist/value-text.d.mts +5 -5
  207. package/dist/value-text.d.ts +5 -5
  208. package/dist/value-text.js +6 -6
  209. package/dist/value-text.js.map +1 -1
  210. package/dist/wal-layout-of.d.mts +1 -1
  211. package/dist/wal-layout-of.d.ts +1 -1
  212. package/dist/wal-layout-of.d.ts.map +1 -1
  213. package/dist/wal-layout-of.js +1 -1
  214. package/dist/wal-layout-of.js.map +1 -1
  215. package/package.json +11 -9
@@ -1 +1 @@
1
- {"version":3,"file":"wal-format.constant.js","sourceRoot":"","sources":["../../src/constants/wal-format.constant.ts"],"names":[],"mappings":";;;AAAA,gDAA4C;AAE5C,sFAAsF;AACzE,QAAA,UAAU,GAAG;IACxB,+DAA+D;IAC/D,QAAQ,EAAE,0CAA0C;IACpD,8DAA8D;IAC9D,QAAQ,EAAE,6BAA6B;IACvC,wDAAwD;IACxD,SAAS,EAAE,eAAe;IAC1B,4DAA4D;IAC5D,aAAa,EAAE,mBAAmB;IAClC,YAAY,EAAE,UAAU;IACxB,OAAO,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,EAAE;IACzB,kFAAkF;IAClF,UAAU,EAAE,YAAY;CAChB,CAAC;AACX,IAAA,wBAAU,EAAC,kBAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"wal-format.constant.js","sourceRoot":"","sources":["../../src/constants/wal-format.constant.ts"],"names":[],"mappings":";;;AAAA,gDAA4C;AAE5C,oHAAoH;AACvG,QAAA,UAAU,GAAG;IACxB,4DAA4D;IAC5D,QAAQ,EAAE,0CAA0C;IACpD,4EAA4E;IAC5E,QAAQ,EAAE,6BAA6B;IACvC,2DAA2D;IAC3D,SAAS,EAAE,eAAe;IAC1B,gEAAgE;IAChE,aAAa,EAAE,mBAAmB;IAClC,YAAY,EAAE,UAAU;IACxB,OAAO,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,EAAE;IACzB,qFAAqF;IACrF,UAAU,EAAE,YAAY;CAChB,CAAC;AACX,IAAA,wBAAU,EAAC,kBAAU,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- /** base64url только в канонической форме: иначе разные строки давали бы один и тот же токен. */
1
+ /** base64url only in the canonical form: otherwise different strings would give the same token. */
2
2
  export declare function decodeCanonicalBase64Url(text: string): Buffer | null;
@@ -1,3 +1,3 @@
1
- /** base64url только в канонической форме: иначе разные строки давали бы один и тот же токен. */
1
+ /** base64url only in the canonical form: otherwise different strings would give the same token. */
2
2
  export declare function decodeCanonicalBase64Url(text: string): Buffer | null;
3
3
  //# sourceMappingURL=decode-canonical-base64url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decode-canonical-base64url.d.ts","sourceRoot":"","sources":["../src/decode-canonical-base64url.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGpE"}
1
+ {"version":3,"file":"decode-canonical-base64url.d.ts","sourceRoot":"","sources":["../src/decode-canonical-base64url.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGpE"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.decodeCanonicalBase64Url = decodeCanonicalBase64Url;
4
- /** base64url только в канонической форме: иначе разные строки давали бы один и тот же токен. */
4
+ /** base64url only in the canonical form: otherwise different strings would give the same token. */
5
5
  function decodeCanonicalBase64Url(text) {
6
6
  const bytes = Buffer.from(text, 'base64url');
7
7
  return bytes.toString('base64url') === text ? bytes : null;
@@ -1 +1 @@
1
- {"version":3,"file":"decode-canonical-base64url.js","sourceRoot":"","sources":["../src/decode-canonical-base64url.ts"],"names":[],"mappings":";;AACA,4DAGC;AAJD,gGAAgG;AAChG,SAAgB,wBAAwB,CAAC,IAAY;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"file":"decode-canonical-base64url.js","sourceRoot":"","sources":["../src/decode-canonical-base64url.ts"],"names":[],"mappings":";;AACA,4DAGC;AAJD,mGAAmG;AACnG,SAAgB,wBAAwB,CAAC,IAAY;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Заморозить экспортированное значение целиком, со вложенными объектами и
3
- * массивами. `as const` — только тип: без заморозки любая зависимость
4
- * потребителя переписала бы словарь для всего процесса (`СПИСОК.length = 0`
5
- * молча выключал проверку). Регулярное выражение с флагом g или y в общем
6
- * словаре — отказ при загрузке: его `lastIndex` — общее изменяемое состояние,
7
- * а замороженное оно падало бы на первом `replace`. Set и Map — тоже отказ:
8
- * заморозка не мешает `add` и `set`.
2
+ * Freeze an exported value entirely, with nested objects and
3
+ * arrays. `as const` is only a type: without freezing any dependency of the
4
+ * consumer could rewrite a dictionary for the whole process (`LIST.length = 0`
5
+ * silently turned a check off). A regular expression with the g or y flag in a shared
6
+ * dictionary is a refusal at load time: its `lastIndex` is shared mutable state,
7
+ * and frozen it would fail on the first `replace`. A Set and a Map are a refusal too:
8
+ * freezing does not prevent `add` and `set`.
9
9
  */
10
10
  export declare function deepFreeze(value: unknown, seen?: WeakSet<object>): void;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Заморозить экспортированное значение целиком, со вложенными объектами и
3
- * массивами. `as const` — только тип: без заморозки любая зависимость
4
- * потребителя переписала бы словарь для всего процесса (`СПИСОК.length = 0`
5
- * молча выключал проверку). Регулярное выражение с флагом g или y в общем
6
- * словаре — отказ при загрузке: его `lastIndex` — общее изменяемое состояние,
7
- * а замороженное оно падало бы на первом `replace`. Set и Map — тоже отказ:
8
- * заморозка не мешает `add` и `set`.
2
+ * Freeze an exported value entirely, with nested objects and
3
+ * arrays. `as const` is only a type: without freezing any dependency of the
4
+ * consumer could rewrite a dictionary for the whole process (`LIST.length = 0`
5
+ * silently turned a check off). A regular expression with the g or y flag in a shared
6
+ * dictionary is a refusal at load time: its `lastIndex` is shared mutable state,
7
+ * and frozen it would fail on the first `replace`. A Set and a Map are a refusal too:
8
+ * freezing does not prevent `add` and `set`.
9
9
  */
10
10
  export declare function deepFreeze(value: unknown, seen?: WeakSet<object>): void;
11
11
  //# sourceMappingURL=deep-freeze.d.ts.map
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deepFreeze = deepFreeze;
4
4
  /**
5
- * Заморозить экспортированное значение целиком, со вложенными объектами и
6
- * массивами. `as const` — только тип: без заморозки любая зависимость
7
- * потребителя переписала бы словарь для всего процесса (`СПИСОК.length = 0`
8
- * молча выключал проверку). Регулярное выражение с флагом g или y в общем
9
- * словаре — отказ при загрузке: его `lastIndex` — общее изменяемое состояние,
10
- * а замороженное оно падало бы на первом `replace`. Set и Map — тоже отказ:
11
- * заморозка не мешает `add` и `set`.
5
+ * Freeze an exported value entirely, with nested objects and
6
+ * arrays. `as const` is only a type: without freezing any dependency of the
7
+ * consumer could rewrite a dictionary for the whole process (`LIST.length = 0`
8
+ * silently turned a check off). A regular expression with the g or y flag in a shared
9
+ * dictionary is a refusal at load time: its `lastIndex` is shared mutable state,
10
+ * and frozen it would fail on the first `replace`. A Set and a Map are a refusal too:
11
+ * freezing does not prevent `add` and `set`.
12
12
  */
13
13
  function deepFreeze(value, seen = new WeakSet()) {
14
14
  if (typeof value !== 'object' || value === null || seen.has(value)) {
@@ -16,10 +16,10 @@ function deepFreeze(value, seen = new WeakSet()) {
16
16
  }
17
17
  seen.add(value);
18
18
  if (value instanceof RegExp && (value.global || value.sticky)) {
19
- throw new Error(`регулярное выражение /${value.source}/${value.flags} в замороженном словаре: флаг g или y`);
19
+ throw new Error(`regular expression /${value.source}/${value.flags} in a frozen dictionary: the g or y flag`);
20
20
  }
21
21
  if (value instanceof Set || value instanceof Map) {
22
- throw new Error(`${value.constructor.name} в замороженном словаре: заморозка не мешает изменять его содержимое`);
22
+ throw new Error(`${value.constructor.name} in a frozen dictionary: freezing does not prevent changing its content`);
23
23
  }
24
24
  Object.freeze(value);
25
25
  for (const inner of Object.values(value)) {
@@ -1 +1 @@
1
- {"version":3,"file":"deep-freeze.js","sourceRoot":"","sources":["../src/deep-freeze.ts"],"names":[],"mappings":";;AASA,gCAmBC;AA5BD;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAC,KAAc,EAAE,OAAwB,IAAI,OAAO,EAAE;IAC9E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACnE,OAAO;IACT,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,IAAI,KAAK,YAAY,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CACb,yBAAyB,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,uCAAuC,CAC5F,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,YAAY,GAAG,IAAI,KAAK,YAAY,GAAG,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,sEAAsE,CAChG,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"deep-freeze.js","sourceRoot":"","sources":["../src/deep-freeze.ts"],"names":[],"mappings":";;AASA,gCAmBC;AA5BD;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAC,KAAc,EAAE,OAAwB,IAAI,OAAO,EAAE;IAC9E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACnE,OAAO;IACT,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,IAAI,KAAK,YAAY,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CACb,uBAAuB,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,0CAA0C,CAC7F,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,YAAY,GAAG,IAAI,KAAK,YAAY,GAAG,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,yEAAyE,CACnG,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Client } from 'pg';
2
2
  /**
3
- * Закрыть сокет соединения сразу. `client.end()` шлёт Terminate и ждёт сервер:
4
- * на замёрзшей сети он висел бы до таймаута TCP и держал бы цикл событий.
5
- * Сокет берётся по форме: у pg это `client.connection.stream`.
3
+ * Close the connection socket right away. `client.end()` sends Terminate and waits for the server:
4
+ * on a frozen network it would hang until the TCP timeout and would hold the event loop.
5
+ * The socket is taken by shape: in pg it is `client.connection.stream`.
6
6
  */
7
7
  export declare function destroyClient(client: Client): void;
@@ -1,8 +1,8 @@
1
1
  import type { Client } from 'pg';
2
2
  /**
3
- * Закрыть сокет соединения сразу. `client.end()` шлёт Terminate и ждёт сервер:
4
- * на замёрзшей сети он висел бы до таймаута TCP и держал бы цикл событий.
5
- * Сокет берётся по форме: у pg это `client.connection.stream`.
3
+ * Close the connection socket right away. `client.end()` sends Terminate and waits for the server:
4
+ * on a frozen network it would hang until the TCP timeout and would hold the event loop.
5
+ * The socket is taken by shape: in pg it is `client.connection.stream`.
6
6
  */
7
7
  export declare function destroyClient(client: Client): void;
8
8
  //# sourceMappingURL=destroy-client.d.ts.map
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.destroyClient = destroyClient;
4
4
  /**
5
- * Закрыть сокет соединения сразу. `client.end()` шлёт Terminate и ждёт сервер:
6
- * на замёрзшей сети он висел бы до таймаута TCP и держал бы цикл событий.
7
- * Сокет берётся по форме: у pg это `client.connection.stream`.
5
+ * Close the connection socket right away. `client.end()` sends Terminate and waits for the server:
6
+ * on a frozen network it would hang until the TCP timeout and would hold the event loop.
7
+ * The socket is taken by shape: in pg it is `client.connection.stream`.
8
8
  */
9
9
  function destroyClient(client) {
10
10
  const stream = client.connection
@@ -2,8 +2,8 @@ import type { ExclusionReason } from './types/exclusion-reason.type.mjs';
2
2
  import type { ProbeOutcome } from './types/probe-outcome.type.mjs';
3
3
  import type { ReplicaRequirement } from './types/replica-requirement.type.mjs';
4
4
  /**
5
- * Подходит ли реплика: `null` — да, иначе причина. Допуск — только когда КАЖДОЕ
6
- * условие установлено: «не смогли определить» любое поле — исключение.
7
- * Порядок проверок задаёт, какая причина назовётся, когда их несколько.
5
+ * Whether a replica fits: `null` means yes, otherwise the reason. Admission happens only when EACH
6
+ * condition is established: "could not determine" for any field is an exclusion.
7
+ * The order of the checks sets which reason is named when there are several.
8
8
  */
9
9
  export declare function evaluateReplica(outcome: ProbeOutcome, requirement: ReplicaRequirement): ExclusionReason | null;
@@ -2,9 +2,9 @@ import type { ExclusionReason } from './types/exclusion-reason.type';
2
2
  import type { ProbeOutcome } from './types/probe-outcome.type';
3
3
  import type { ReplicaRequirement } from './types/replica-requirement.type';
4
4
  /**
5
- * Подходит ли реплика: `null` — да, иначе причина. Допуск — только когда КАЖДОЕ
6
- * условие установлено: «не смогли определить» любое поле — исключение.
7
- * Порядок проверок задаёт, какая причина назовётся, когда их несколько.
5
+ * Whether a replica fits: `null` means yes, otherwise the reason. Admission happens only when EACH
6
+ * condition is established: "could not determine" for any field is an exclusion.
7
+ * The order of the checks sets which reason is named when there are several.
8
8
  */
9
9
  export declare function evaluateReplica(outcome: ProbeOutcome, requirement: ReplicaRequirement): ExclusionReason | null;
10
10
  //# sourceMappingURL=evaluate-replica.d.ts.map
@@ -5,9 +5,9 @@ const compare_lsn_1 = require("./compare-lsn");
5
5
  const exclusion_reason_constant_1 = require("./constants/exclusion-reason.constant");
6
6
  const lag_bytes_1 = require("./lag-bytes");
7
7
  /**
8
- * Подходит ли реплика: `null` — да, иначе причина. Допуск — только когда КАЖДОЕ
9
- * условие установлено: «не смогли определить» любое поле — исключение.
10
- * Порядок проверок задаёт, какая причина назовётся, когда их несколько.
8
+ * Whether a replica fits: `null` means yes, otherwise the reason. Admission happens only when EACH
9
+ * condition is established: "could not determine" for any field is an exclusion.
10
+ * The order of the checks sets which reason is named when there are several.
11
11
  */
12
12
  function evaluateReplica(outcome, requirement) {
13
13
  if (!outcome.ok) {
@@ -1,2 +1,2 @@
1
- /** 64-битная позиция → `X/Y` в форме Postgres (`pg_lsn` принимает её обратно). */
1
+ /** A 64-bit position → `X/Y` in the Postgres form (`pg_lsn` accepts it back). */
2
2
  export declare function formatLsn(value: bigint): string;
@@ -1,3 +1,3 @@
1
- /** 64-битная позиция → `X/Y` в форме Postgres (`pg_lsn` принимает её обратно). */
1
+ /** A 64-bit position → `X/Y` in the Postgres form (`pg_lsn` accepts it back). */
2
2
  export declare function formatLsn(value: bigint): string;
3
3
  //# sourceMappingURL=format-lsn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-lsn.d.ts","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK/C"}
1
+ {"version":3,"file":"format-lsn.d.ts","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK/C"}
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatLsn = formatLsn;
4
4
  const wal_format_constant_1 = require("./constants/wal-format.constant");
5
- /** 64-битная позиция → `X/Y` в форме Postgres (`pg_lsn` принимает её обратно). */
5
+ /** A 64-bit position → `X/Y` in the Postgres form (`pg_lsn` accepts it back). */
6
6
  function formatLsn(value) {
7
7
  if (value < 0n || value > wal_format_constant_1.WAL_FORMAT.MAX_LSN) {
8
- throw new RangeError(`позиция WAL вне 64 бит: ${value}`);
8
+ throw new RangeError(`the WAL position is outside 64 bits: ${value}`);
9
9
  }
10
10
  return `${(value >> 32n).toString(16).toUpperCase()}/${(value & 0xffffffffn).toString(16).toUpperCase()}`;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"format-lsn.js","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":";;AAGA,8BAKC;AARD,yEAA6D;AAE7D,kFAAkF;AAClF,SAAgB,SAAS,CAAC,KAAa;IACrC,IAAI,KAAK,GAAG,EAAE,IAAI,KAAK,GAAG,gCAAU,CAAC,OAAO,EAAE,CAAC;QAC7C,MAAM,IAAI,UAAU,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;AAC5G,CAAC"}
1
+ {"version":3,"file":"format-lsn.js","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":";;AAGA,8BAKC;AARD,yEAA6D;AAE7D,iFAAiF;AACjF,SAAgB,SAAS,CAAC,KAAa;IACrC,IAAI,KAAK,GAAG,EAAE,IAAI,KAAK,GAAG,gCAAU,CAAC,OAAO,EAAE,CAAC;QAC7C,MAAM,IAAI,UAAU,CAAC,wCAAwC,KAAK,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;AAC5G,CAAC"}
@@ -1,4 +1,4 @@
1
- /** Текст не является позицией WAL в форме `X/Y` (по 1–8 шестнадцатеричных цифр). */
1
+ /** The text is not a WAL position in the `X/Y` form (1–8 hexadecimal digits each). */
2
2
  export declare class InvalidLsnError extends Error {
3
3
  readonly input: string;
4
4
  readonly name = "InvalidLsnError";
@@ -1,4 +1,4 @@
1
- /** Текст не является позицией WAL в форме `X/Y` (по 1–8 шестнадцатеричных цифр). */
1
+ /** The text is not a WAL position in the `X/Y` form (1–8 hexadecimal digits each). */
2
2
  export declare class InvalidLsnError extends Error {
3
3
  readonly input: string;
4
4
  readonly name = "InvalidLsnError";
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-lsn.error.d.ts","sourceRoot":"","sources":["../src/invalid-lsn.error.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,qBAAa,eAAgB,SAAQ,KAAK;IAG5B,QAAQ,CAAC,KAAK,EAAE,MAAM;IAFlC,SAAkB,IAAI,qBAAqB;gBAEtB,KAAK,EAAE,MAAM;CAKnC"}
1
+ {"version":3,"file":"invalid-lsn.error.d.ts","sourceRoot":"","sources":["../src/invalid-lsn.error.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,qBAAa,eAAgB,SAAQ,KAAK;IAG5B,QAAQ,CAAC,KAAK,EAAE,MAAM;IAFlC,SAAkB,IAAI,qBAAqB;gBAEtB,KAAK,EAAE,MAAM;CAKnC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InvalidLsnError = void 0;
4
- /** Текст не является позицией WAL в форме `X/Y` (по 1–8 шестнадцатеричных цифр). */
4
+ /** The text is not a WAL position in the `X/Y` form (1–8 hexadecimal digits each). */
5
5
  class InvalidLsnError extends Error {
6
6
  input;
7
7
  name = 'InvalidLsnError';
8
8
  constructor(input) {
9
- super(`не позиция WAL: ${JSON.stringify(input.slice(0, 40))} (ожидается X/Y, по 1–8 шестнадцатеричных цифр)`);
9
+ super(`not a WAL position: ${JSON.stringify(input.slice(0, 40))} (X/Y is expected, 1–8 hexadecimal digits each)`);
10
10
  this.input = input;
11
11
  }
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-lsn.error.js","sourceRoot":"","sources":["../src/invalid-lsn.error.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACpF,MAAa,eAAgB,SAAQ,KAAK;IAGnB;IAFH,IAAI,GAAG,iBAAiB,CAAC;IAE3C,YAAqB,KAAa;QAChC,KAAK,CACH,mBAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,iDAAiD,CACvG,CAAC;QAHiB,UAAK,GAAL,KAAK,CAAQ;IAIlC,CAAC;CACF;AARD,0CAQC"}
1
+ {"version":3,"file":"invalid-lsn.error.js","sourceRoot":"","sources":["../src/invalid-lsn.error.ts"],"names":[],"mappings":";;;AAAA,sFAAsF;AACtF,MAAa,eAAgB,SAAQ,KAAK;IAGnB;IAFH,IAAI,GAAG,iBAAiB,CAAC;IAE3C,YAAqB,KAAa;QAChC,KAAK,CACH,uBAAuB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,iDAAiD,CAC3G,CAAC;QAHiB,UAAK,GAAL,KAAK,CAAQ;IAIlC,CAAC;CACF;AARD,0CAQC"}
@@ -1,4 +1,4 @@
1
- /** Настройка маршрутизатора или кодека токенов неверна: отказ при создании, а не при первом чтении. */
1
+ /** A router or token codec setting is wrong: a refusal at creation, not at the first read. */
2
2
  export declare class InvalidReplicaSyncOptionsError extends Error {
3
3
  readonly name = "InvalidReplicaSyncOptionsError";
4
4
  }
@@ -1,4 +1,4 @@
1
- /** Настройка маршрутизатора или кодека токенов неверна: отказ при создании, а не при первом чтении. */
1
+ /** A router or token codec setting is wrong: a refusal at creation, not at the first read. */
2
2
  export declare class InvalidReplicaSyncOptionsError extends Error {
3
3
  readonly name = "InvalidReplicaSyncOptionsError";
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-replica-sync-options.error.d.ts","sourceRoot":"","sources":["../src/invalid-replica-sync-options.error.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,SAAkB,IAAI,oCAAoC;CAC3D"}
1
+ {"version":3,"file":"invalid-replica-sync-options.error.d.ts","sourceRoot":"","sources":["../src/invalid-replica-sync-options.error.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,SAAkB,IAAI,oCAAoC;CAC3D"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InvalidReplicaSyncOptionsError = void 0;
4
- /** Настройка маршрутизатора или кодека токенов неверна: отказ при создании, а не при первом чтении. */
4
+ /** A router or token codec setting is wrong: a refusal at creation, not at the first read. */
5
5
  class InvalidReplicaSyncOptionsError extends Error {
6
6
  name = 'InvalidReplicaSyncOptionsError';
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-replica-sync-options.error.js","sourceRoot":"","sources":["../src/invalid-replica-sync-options.error.ts"],"names":[],"mappings":";;;AAAA,uGAAuG;AACvG,MAAa,8BAA+B,SAAQ,KAAK;IACrC,IAAI,GAAG,gCAAgC,CAAC;CAC3D;AAFD,wEAEC"}
1
+ {"version":3,"file":"invalid-replica-sync-options.error.js","sourceRoot":"","sources":["../src/invalid-replica-sync-options.error.ts"],"names":[],"mappings":";;;AAAA,8FAA8F;AAC9F,MAAa,8BAA+B,SAAQ,KAAK;IACrC,IAAI,GAAG,gCAAgC,CAAC;CAC3D;AAFD,wEAEC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Отставание реплики от мастера в байтах WAL. Состояния сняты в разные моменты,
3
- * поэтому реплика может оказаться «впереди» снятой раньше позиции мастера —
4
- * это ноль, а не отрицательное отставание.
2
+ * The replica lag behind the primary in bytes of WAL. The states are taken at different moments,
3
+ * so a replica may turn out to be "ahead" of a primary position taken earlier —
4
+ * that is zero, not a negative lag.
5
5
  */
6
6
  export declare function lagBytes(primaryInsertLsn: bigint, replicaReplayLsn: bigint): bigint;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Отставание реплики от мастера в байтах WAL. Состояния сняты в разные моменты,
3
- * поэтому реплика может оказаться «впереди» снятой раньше позиции мастера —
4
- * это ноль, а не отрицательное отставание.
2
+ * The replica lag behind the primary in bytes of WAL. The states are taken at different moments,
3
+ * so a replica may turn out to be "ahead" of a primary position taken earlier —
4
+ * that is zero, not a negative lag.
5
5
  */
6
6
  export declare function lagBytes(primaryInsertLsn: bigint, replicaReplayLsn: bigint): bigint;
7
7
  //# sourceMappingURL=lag-bytes.d.ts.map
package/dist/lag-bytes.js CHANGED
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lagBytes = lagBytes;
4
4
  /**
5
- * Отставание реплики от мастера в байтах WAL. Состояния сняты в разные моменты,
6
- * поэтому реплика может оказаться «впереди» снятой раньше позиции мастера —
7
- * это ноль, а не отрицательное отставание.
5
+ * The replica lag behind the primary in bytes of WAL. The states are taken at different moments,
6
+ * so a replica may turn out to be "ahead" of a primary position taken earlier —
7
+ * that is zero, not a negative lag.
8
8
  */
9
9
  function lagBytes(primaryInsertLsn, replicaReplayLsn) {
10
10
  const lag = primaryInsertLsn - replicaReplayLsn;
@@ -1,2 +1,2 @@
1
- /** Позиция из ответа сервера или `null`, если её нет или она не в форме. */
1
+ /** A position from a server answer or `null` if there is none or it is not in the form. */
2
2
  export declare function lsnOrNull(value: unknown): bigint | null;
@@ -1,3 +1,3 @@
1
- /** Позиция из ответа сервера или `null`, если её нет или она не в форме. */
1
+ /** A position from a server answer or `null` if there is none or it is not in the form. */
2
2
  export declare function lsnOrNull(value: unknown): bigint | null;
3
3
  //# sourceMappingURL=lsn-or-null.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lsn-or-null.d.ts","sourceRoot":"","sources":["../src/lsn-or-null.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CASvD"}
1
+ {"version":3,"file":"lsn-or-null.d.ts","sourceRoot":"","sources":["../src/lsn-or-null.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CASvD"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lsnOrNull = lsnOrNull;
4
4
  const parse_lsn_1 = require("./parse-lsn");
5
- /** Позиция из ответа сервера или `null`, если её нет или она не в форме. */
5
+ /** A position from a server answer or `null` if there is none or it is not in the form. */
6
6
  function lsnOrNull(value) {
7
7
  if (typeof value !== 'string') {
8
8
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"lsn-or-null.js","sourceRoot":"","sources":["../src/lsn-or-null.ts"],"names":[],"mappings":";;AAGA,8BASC;AAZD,2CAAuC;AAEvC,4EAA4E;AAC5E,SAAgB,SAAS,CAAC,KAAc;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAA,oBAAQ,EAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"lsn-or-null.js","sourceRoot":"","sources":["../src/lsn-or-null.ts"],"names":[],"mappings":";;AAGA,8BASC;AAZD,2CAAuC;AAEvC,2FAA2F;AAC3F,SAAgB,SAAS,CAAC,KAAc;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAA,oBAAQ,EAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
package/dist/notify.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Вызвать хук наблюдателя; его отказ маршрутизацию не роняет. Хук может быть
3
- * `async`: тогда отказ приходит отклонённым промисом, а не исключением, и без
4
- * обработчика стал бы `unhandledRejection` — по умолчанию это падение процесса.
5
- * Поэтому у возвращённого промиса (любого thenable) отказ тоже глушится.
6
- * Хук читается функцией `read` ВНУТРИ защиты: свойство наблюдателя может быть
7
- * геттером (прокси, ленивый объект метрик), и его исключение — тоже отказ
8
- * наблюдателя, а не решения.
2
+ * Call an observer hook; its refusal does not fail the routing. A hook can be
3
+ * `async`: then the refusal comes as a rejected promise, not an exception, and without
4
+ * a handler it would become an `unhandledRejection` — by default that crashes the process.
5
+ * So the refusal of a returned promise (any thenable) is silenced too.
6
+ * The hook is read by the `read` function INSIDE the protection: an observer property can be
7
+ * a getter (a proxy, a lazy metrics object), and its exception is also a refusal of the
8
+ * observer, not of the decision.
9
9
  */
10
10
  export declare function notify<T>(read: () => ((event: T) => unknown) | undefined, event: T): void;
package/dist/notify.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Вызвать хук наблюдателя; его отказ маршрутизацию не роняет. Хук может быть
3
- * `async`: тогда отказ приходит отклонённым промисом, а не исключением, и без
4
- * обработчика стал бы `unhandledRejection` — по умолчанию это падение процесса.
5
- * Поэтому у возвращённого промиса (любого thenable) отказ тоже глушится.
6
- * Хук читается функцией `read` ВНУТРИ защиты: свойство наблюдателя может быть
7
- * геттером (прокси, ленивый объект метрик), и его исключение — тоже отказ
8
- * наблюдателя, а не решения.
2
+ * Call an observer hook; its refusal does not fail the routing. A hook can be
3
+ * `async`: then the refusal comes as a rejected promise, not an exception, and without
4
+ * a handler it would become an `unhandledRejection` — by default that crashes the process.
5
+ * So the refusal of a returned promise (any thenable) is silenced too.
6
+ * The hook is read by the `read` function INSIDE the protection: an observer property can be
7
+ * a getter (a proxy, a lazy metrics object), and its exception is also a refusal of the
8
+ * observer, not of the decision.
9
9
  */
10
10
  export declare function notify<T>(read: () => ((event: T) => unknown) | undefined, event: T): void;
11
11
  //# sourceMappingURL=notify.d.ts.map
package/dist/notify.js CHANGED
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.notify = notify;
4
4
  /**
5
- * Вызвать хук наблюдателя; его отказ маршрутизацию не роняет. Хук может быть
6
- * `async`: тогда отказ приходит отклонённым промисом, а не исключением, и без
7
- * обработчика стал бы `unhandledRejection` — по умолчанию это падение процесса.
8
- * Поэтому у возвращённого промиса (любого thenable) отказ тоже глушится.
9
- * Хук читается функцией `read` ВНУТРИ защиты: свойство наблюдателя может быть
10
- * геттером (прокси, ленивый объект метрик), и его исключение — тоже отказ
11
- * наблюдателя, а не решения.
5
+ * Call an observer hook; its refusal does not fail the routing. A hook can be
6
+ * `async`: then the refusal comes as a rejected promise, not an exception, and without
7
+ * a handler it would become an `unhandledRejection` — by default that crashes the process.
8
+ * So the refusal of a returned promise (any thenable) is silenced too.
9
+ * The hook is read by the `read` function INSIDE the protection: an observer property can be
10
+ * a getter (a proxy, a lazy metrics object), and its exception is also a refusal of the
11
+ * observer, not of the decision.
12
12
  */
13
13
  function notify(read, event) {
14
14
  try {
@@ -24,7 +24,7 @@ function notify(read, event) {
24
24
  }
25
25
  }
26
26
  catch {
27
- // наблюдатель — не часть решения
27
+ // the observer is not part of the decision
28
28
  }
29
29
  }
30
30
  //# sourceMappingURL=notify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notify.js","sourceRoot":"","sources":["../src/notify.ts"],"names":[],"mappings":";;AASA,wBAiBC;AA1BD;;;;;;;;GAQG;AACH,SAAgB,MAAM,CAAI,IAA+C,EAAE,KAAQ;IACjF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,EAAE,CAAC;QACpB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,IACE,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,KAAK,IAAI;YACf,OAAQ,MAA+B,CAAC,IAAI,KAAK,UAAU,EAC3D,CAAC;YACA,MAA+B,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,iCAAiC;IACnC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"notify.js","sourceRoot":"","sources":["../src/notify.ts"],"names":[],"mappings":";;AASA,wBAiBC;AA1BD;;;;;;;;GAQG;AACH,SAAgB,MAAM,CAAI,IAA+C,EAAE,KAAQ;IACjF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,EAAE,CAAC;QACpB,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,IACE,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,KAAK,IAAI;YACf,OAAQ,MAA+B,CAAC,IAAI,KAAK,UAAU,EAC3D,CAAC;YACA,MAA+B,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2CAA2C;IAC7C,CAAC;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * `X/Y` → 64-битная позиция `X·2³² + Y`. Сравнивать позиции строками нельзя:
3
- * `'10/0' < '9/0'` и `'0/FFFFFFFF' > '1/0'` лексикографически, а по WAL —
4
- * наоборот. Всё, что не в форме Postgres, — отказ, а не «ноль».
2
+ * `X/Y` → a 64-bit position `X·2³² + Y`. Positions cannot be compared as strings:
3
+ * `'10/0' < '9/0'` and `'0/FFFFFFFF' > '1/0'` lexicographically, while by WAL it is
4
+ * the other way around. Everything not in the Postgres form is a refusal, not "zero".
5
5
  */
6
6
  export declare function parseLsn(text: string): bigint;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * `X/Y` → 64-битная позиция `X·2³² + Y`. Сравнивать позиции строками нельзя:
3
- * `'10/0' < '9/0'` и `'0/FFFFFFFF' > '1/0'` лексикографически, а по WAL —
4
- * наоборот. Всё, что не в форме Postgres, — отказ, а не «ноль».
2
+ * `X/Y` → a 64-bit position `X·2³² + Y`. Positions cannot be compared as strings:
3
+ * `'10/0' < '9/0'` and `'0/FFFFFFFF' > '1/0'` lexicographically, while by WAL it is
4
+ * the other way around. Everything not in the Postgres form is a refusal, not "zero".
5
5
  */
6
6
  export declare function parseLsn(text: string): bigint;
7
7
  //# sourceMappingURL=parse-lsn.d.ts.map
package/dist/parse-lsn.js CHANGED
@@ -4,9 +4,9 @@ exports.parseLsn = parseLsn;
4
4
  const wal_format_constant_1 = require("./constants/wal-format.constant");
5
5
  const invalid_lsn_error_1 = require("./invalid-lsn.error");
6
6
  /**
7
- * `X/Y` → 64-битная позиция `X·2³² + Y`. Сравнивать позиции строками нельзя:
8
- * `'10/0' < '9/0'` и `'0/FFFFFFFF' > '1/0'` лексикографически, а по WAL —
9
- * наоборот. Всё, что не в форме Postgres, — отказ, а не «ноль».
7
+ * `X/Y` → a 64-bit position `X·2³² + Y`. Positions cannot be compared as strings:
8
+ * `'10/0' < '9/0'` and `'0/FFFFFFFF' > '1/0'` lexicographically, while by WAL it is
9
+ * the other way around. Everything not in the Postgres form is a refusal, not "zero".
10
10
  */
11
11
  function parseLsn(text) {
12
12
  const match = wal_format_constant_1.WAL_FORMAT.LSN_TEXT.exec(text);
@@ -1,4 +1,4 @@
1
- /** Зонд после `close()`: соединение больше не открывается. */
1
+ /** A probe after `close()`: the connection is no longer opened. */
2
2
  export declare class ProbeConnectionClosedError extends Error {
3
3
  readonly node: string;
4
4
  readonly name = "ProbeConnectionClosedError";
@@ -1,4 +1,4 @@
1
- /** Зонд после `close()`: соединение больше не открывается. */
1
+ /** A probe after `close()`: the connection is no longer opened. */
2
2
  export declare class ProbeConnectionClosedError extends Error {
3
3
  readonly node: string;
4
4
  readonly name = "ProbeConnectionClosedError";
@@ -1 +1 @@
1
- {"version":3,"file":"probe-connection-closed.error.d.ts","sourceRoot":"","sources":["../src/probe-connection-closed.error.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,qBAAa,0BAA2B,SAAQ,KAAK;IAGvC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAFjC,SAAkB,IAAI,gCAAgC;gBAEjC,IAAI,EAAE,MAAM;CAGlC"}
1
+ {"version":3,"file":"probe-connection-closed.error.d.ts","sourceRoot":"","sources":["../src/probe-connection-closed.error.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,qBAAa,0BAA2B,SAAQ,KAAK;IAGvC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAFjC,SAAkB,IAAI,gCAAgC;gBAEjC,IAAI,EAAE,MAAM;CAGlC"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProbeConnectionClosedError = void 0;
4
- /** Зонд после `close()`: соединение больше не открывается. */
4
+ /** A probe after `close()`: the connection is no longer opened. */
5
5
  class ProbeConnectionClosedError extends Error {
6
6
  node;
7
7
  name = 'ProbeConnectionClosedError';
8
8
  constructor(node) {
9
- super(`соединение зонда узла ${node} закрыто: маршрутизатор закрыт`);
9
+ super(`the probe connection of the node ${node} is closed: the router is closed`);
10
10
  this.node = node;
11
11
  }
12
12
  }