@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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/compare-lsn.d.mts +3 -3
- package/dist/compare-lsn.d.ts +3 -3
- package/dist/compare-lsn.js +3 -3
- package/dist/constants/exclusion-reason.constant.d.mts +12 -12
- package/dist/constants/exclusion-reason.constant.d.ts +12 -12
- package/dist/constants/exclusion-reason.constant.d.ts.map +1 -1
- package/dist/constants/exclusion-reason.constant.js +12 -12
- package/dist/constants/exclusion-reason.constant.js.map +1 -1
- package/dist/constants/node-role.constant.d.mts +1 -1
- package/dist/constants/node-role.constant.d.ts +1 -1
- package/dist/constants/node-role.constant.d.ts.map +1 -1
- package/dist/constants/node-role.constant.js +1 -1
- package/dist/constants/node-role.constant.js.map +1 -1
- package/dist/constants/probe-sql.constant.d.mts +25 -25
- package/dist/constants/probe-sql.constant.d.ts +25 -25
- package/dist/constants/probe-sql.constant.js +25 -25
- package/dist/constants/replica-sync-defaults.constant.d.mts +26 -26
- package/dist/constants/replica-sync-defaults.constant.d.ts +26 -26
- package/dist/constants/replica-sync-defaults.constant.d.ts.map +1 -1
- package/dist/constants/replica-sync-defaults.constant.js +26 -26
- package/dist/constants/replica-sync-defaults.constant.js.map +1 -1
- package/dist/constants/route-reason.constant.d.mts +13 -13
- package/dist/constants/route-reason.constant.d.ts +13 -13
- package/dist/constants/route-reason.constant.d.ts.map +1 -1
- package/dist/constants/route-reason.constant.js +13 -13
- package/dist/constants/route-reason.constant.js.map +1 -1
- package/dist/constants/token-format.constant.d.mts +11 -11
- package/dist/constants/token-format.constant.d.ts +11 -11
- package/dist/constants/token-format.constant.d.ts.map +1 -1
- package/dist/constants/token-format.constant.js +11 -11
- package/dist/constants/token-format.constant.js.map +1 -1
- package/dist/constants/wal-format.constant.d.mts +6 -6
- package/dist/constants/wal-format.constant.d.ts +6 -6
- package/dist/constants/wal-format.constant.d.ts.map +1 -1
- package/dist/constants/wal-format.constant.js +6 -6
- package/dist/constants/wal-format.constant.js.map +1 -1
- package/dist/decode-canonical-base64url.d.mts +1 -1
- package/dist/decode-canonical-base64url.d.ts +1 -1
- package/dist/decode-canonical-base64url.d.ts.map +1 -1
- package/dist/decode-canonical-base64url.js +1 -1
- package/dist/decode-canonical-base64url.js.map +1 -1
- package/dist/deep-freeze.d.mts +7 -7
- package/dist/deep-freeze.d.ts +7 -7
- package/dist/deep-freeze.js +9 -9
- package/dist/deep-freeze.js.map +1 -1
- package/dist/destroy-client.d.mts +3 -3
- package/dist/destroy-client.d.ts +3 -3
- package/dist/destroy-client.js +3 -3
- package/dist/evaluate-replica.d.mts +3 -3
- package/dist/evaluate-replica.d.ts +3 -3
- package/dist/evaluate-replica.js +3 -3
- package/dist/format-lsn.d.mts +1 -1
- package/dist/format-lsn.d.ts +1 -1
- package/dist/format-lsn.d.ts.map +1 -1
- package/dist/format-lsn.js +2 -2
- package/dist/format-lsn.js.map +1 -1
- package/dist/invalid-lsn.error.d.mts +1 -1
- package/dist/invalid-lsn.error.d.ts +1 -1
- package/dist/invalid-lsn.error.d.ts.map +1 -1
- package/dist/invalid-lsn.error.js +2 -2
- package/dist/invalid-lsn.error.js.map +1 -1
- package/dist/invalid-replica-sync-options.error.d.mts +1 -1
- package/dist/invalid-replica-sync-options.error.d.ts +1 -1
- package/dist/invalid-replica-sync-options.error.d.ts.map +1 -1
- package/dist/invalid-replica-sync-options.error.js +1 -1
- package/dist/invalid-replica-sync-options.error.js.map +1 -1
- package/dist/lag-bytes.d.mts +3 -3
- package/dist/lag-bytes.d.ts +3 -3
- package/dist/lag-bytes.js +3 -3
- package/dist/lsn-or-null.d.mts +1 -1
- package/dist/lsn-or-null.d.ts +1 -1
- package/dist/lsn-or-null.d.ts.map +1 -1
- package/dist/lsn-or-null.js +1 -1
- package/dist/lsn-or-null.js.map +1 -1
- package/dist/notify.d.mts +7 -7
- package/dist/notify.d.ts +7 -7
- package/dist/notify.js +8 -8
- package/dist/notify.js.map +1 -1
- package/dist/parse-lsn.d.mts +3 -3
- package/dist/parse-lsn.d.ts +3 -3
- package/dist/parse-lsn.js +3 -3
- package/dist/probe-connection-closed.error.d.mts +1 -1
- package/dist/probe-connection-closed.error.d.ts +1 -1
- package/dist/probe-connection-closed.error.d.ts.map +1 -1
- package/dist/probe-connection-closed.error.js +2 -2
- package/dist/probe-connection-closed.error.js.map +1 -1
- package/dist/probe-connection.d.mts +20 -20
- package/dist/probe-connection.d.ts +20 -20
- package/dist/probe-connection.d.ts.map +1 -1
- package/dist/probe-connection.js +25 -25
- package/dist/probe-connection.js.map +1 -1
- package/dist/probe-timeout.error.d.mts +1 -1
- package/dist/probe-timeout.error.d.ts +1 -1
- package/dist/probe-timeout.error.d.ts.map +1 -1
- package/dist/probe-timeout.error.js +2 -2
- package/dist/probe-timeout.error.js.map +1 -1
- package/dist/read-node-state.d.mts +3 -3
- package/dist/read-node-state.d.ts +3 -3
- package/dist/read-node-state.js +4 -4
- package/dist/read-node-state.js.map +1 -1
- package/dist/replica-router.d.mts +133 -133
- package/dist/replica-router.d.ts +133 -133
- package/dist/replica-router.d.ts.map +1 -1
- package/dist/replica-router.js +162 -162
- package/dist/replica-router.js.map +1 -1
- package/dist/require-integer.d.mts +1 -1
- package/dist/require-integer.d.ts +1 -1
- package/dist/require-integer.d.ts.map +1 -1
- package/dist/require-integer.js +3 -3
- package/dist/require-integer.js.map +1 -1
- package/dist/secret-weakness.d.mts +13 -13
- package/dist/secret-weakness.d.ts +13 -13
- package/dist/secret-weakness.js +16 -16
- package/dist/secret-weakness.js.map +1 -1
- package/dist/smallest-period.d.mts +4 -4
- package/dist/smallest-period.d.ts +4 -4
- package/dist/smallest-period.js +4 -4
- package/dist/sql-state-of.d.mts +6 -6
- package/dist/sql-state-of.d.ts +6 -6
- package/dist/sql-state-of.js +6 -6
- package/dist/state-cache.d.mts +14 -14
- package/dist/state-cache.d.ts +14 -14
- package/dist/state-cache.d.ts.map +1 -1
- package/dist/state-cache.js +15 -15
- package/dist/state-cache.js.map +1 -1
- package/dist/timeline-of.d.mts +2 -2
- package/dist/timeline-of.d.ts +2 -2
- package/dist/timeline-of.js +2 -2
- package/dist/to-error.d.mts +1 -1
- package/dist/to-error.d.ts +1 -1
- package/dist/to-error.d.ts.map +1 -1
- package/dist/to-error.js +1 -1
- package/dist/to-error.js.map +1 -1
- package/dist/token-codec.d.mts +10 -10
- package/dist/token-codec.d.ts +10 -10
- package/dist/token-codec.js +31 -31
- package/dist/token-codec.js.map +1 -1
- package/dist/token-lsn.d.mts +13 -13
- package/dist/token-lsn.d.ts +13 -13
- package/dist/token-lsn.js +13 -13
- package/dist/transaction-not-committed.error.d.mts +2 -2
- package/dist/transaction-not-committed.error.d.ts +2 -2
- package/dist/transaction-not-committed.error.d.ts.map +1 -1
- package/dist/transaction-not-committed.error.js +3 -3
- package/dist/transaction-not-committed.error.js.map +1 -1
- package/dist/transaction-not-open.error.d.mts +5 -5
- package/dist/transaction-not-open.error.d.ts +5 -5
- package/dist/transaction-not-open.error.js +6 -6
- package/dist/transaction-not-open.error.js.map +1 -1
- package/dist/types/cache-entry.type.d.mts +4 -4
- package/dist/types/cache-entry.type.d.ts +4 -4
- package/dist/types/clock.type.d.mts +3 -3
- package/dist/types/clock.type.d.ts +3 -3
- package/dist/types/confirm-event.type.d.mts +3 -3
- package/dist/types/confirm-event.type.d.ts +3 -3
- package/dist/types/decoded-token.type.d.mts +2 -2
- package/dist/types/decoded-token.type.d.ts +2 -2
- package/dist/types/evaluated.type.d.mts +1 -1
- package/dist/types/evaluated.type.d.ts +1 -1
- package/dist/types/evaluated.type.d.ts.map +1 -1
- package/dist/types/exclusion.type.d.mts +1 -1
- package/dist/types/exclusion.type.d.ts +1 -1
- package/dist/types/exclusion.type.d.ts.map +1 -1
- package/dist/types/node-state.type.d.mts +13 -13
- package/dist/types/node-state.type.d.ts +13 -13
- package/dist/types/node-state.type.d.ts.map +1 -1
- package/dist/types/not-a-pool.type.d.mts +5 -5
- package/dist/types/not-a-pool.type.d.ts +5 -5
- package/dist/types/probe-event.type.d.mts +1 -1
- package/dist/types/probe-event.type.d.ts +1 -1
- package/dist/types/probe-event.type.d.ts.map +1 -1
- package/dist/types/probe-outcome.type.d.mts +1 -1
- package/dist/types/probe-outcome.type.d.ts +1 -1
- package/dist/types/probe-outcome.type.d.ts.map +1 -1
- package/dist/types/probe-sample.type.d.mts +1 -1
- package/dist/types/probe-sample.type.d.ts +1 -1
- package/dist/types/probe-sample.type.d.ts.map +1 -1
- package/dist/types/replica-node.type.d.mts +7 -7
- package/dist/types/replica-node.type.d.ts +7 -7
- package/dist/types/replica-requirement.type.d.mts +2 -2
- package/dist/types/replica-requirement.type.d.ts +2 -2
- package/dist/types/replica-router-options.type.d.mts +25 -25
- package/dist/types/replica-router-options.type.d.ts +25 -25
- package/dist/types/replica-router-options.type.d.ts.map +1 -1
- package/dist/types/route-decision.type.d.mts +5 -5
- package/dist/types/route-decision.type.d.ts +5 -5
- package/dist/types/route-decision.type.d.ts.map +1 -1
- package/dist/types/router-observer.type.d.mts +5 -5
- package/dist/types/router-observer.type.d.ts +5 -5
- package/dist/types/router-observer.type.d.ts.map +1 -1
- package/dist/types/router-stats.type.d.mts +8 -8
- package/dist/types/router-stats.type.d.ts +8 -8
- package/dist/types/router-stats.type.d.ts.map +1 -1
- package/dist/types/sql-command-executor.type.d.mts +4 -4
- package/dist/types/sql-command-executor.type.d.ts +4 -4
- package/dist/types/sql-query-executor.type.d.mts +3 -3
- package/dist/types/sql-query-executor.type.d.ts +3 -3
- package/dist/types/wal-layout.type.d.mts +1 -1
- package/dist/types/wal-layout.type.d.ts +1 -1
- package/dist/types/wal-layout.type.d.ts.map +1 -1
- package/dist/types/wal-position.type.d.mts +5 -5
- package/dist/types/wal-position.type.d.ts +5 -5
- package/dist/types/wal-position.type.d.ts.map +1 -1
- package/dist/value-text.d.mts +5 -5
- package/dist/value-text.d.ts +5 -5
- package/dist/value-text.js +6 -6
- package/dist/value-text.js.map +1 -1
- package/dist/wal-layout-of.d.mts +1 -1
- package/dist/wal-layout-of.d.ts +1 -1
- package/dist/wal-layout-of.d.ts.map +1 -1
- package/dist/wal-layout-of.js +1 -1
- package/dist/wal-layout-of.js.map +1 -1
- 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,
|
|
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,
|
|
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,
|
|
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"}
|
package/dist/deep-freeze.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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;
|
package/dist/deep-freeze.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
package/dist/deep-freeze.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deepFreeze = deepFreeze;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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(
|
|
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)) {
|
package/dist/deep-freeze.js.map
CHANGED
|
@@ -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,
|
|
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
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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;
|
package/dist/destroy-client.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Client } from 'pg';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
package/dist/destroy-client.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.destroyClient = destroyClient;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
package/dist/evaluate-replica.js
CHANGED
|
@@ -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
|
-
*
|
|
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) {
|
package/dist/format-lsn.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** 64
|
|
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;
|
package/dist/format-lsn.d.ts
CHANGED
package/dist/format-lsn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-lsn.d.ts","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":"AAEA,
|
|
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"}
|
package/dist/format-lsn.js
CHANGED
|
@@ -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
|
|
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(
|
|
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
|
}
|
package/dist/format-lsn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-lsn.js","sourceRoot":"","sources":["../src/format-lsn.ts"],"names":[],"mappings":";;AAGA,8BAKC;AARD,yEAA6D;AAE7D,
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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,
|
|
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
|
-
/**
|
|
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(
|
|
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,
|
|
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,
|
|
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,
|
|
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"}
|
package/dist/lag-bytes.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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;
|
package/dist/lag-bytes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
-
*
|
|
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;
|
package/dist/lsn-or-null.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/**
|
|
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;
|
package/dist/lsn-or-null.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/**
|
|
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,
|
|
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"}
|
package/dist/lsn-or-null.js
CHANGED
|
@@ -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
|
-
/**
|
|
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;
|
package/dist/lsn-or-null.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsn-or-null.js","sourceRoot":"","sources":["../src/lsn-or-null.ts"],"names":[],"mappings":";;AAGA,8BASC;AAZD,2CAAuC;AAEvC,
|
|
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
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
package/dist/notify.js.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/parse-lsn.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `X/Y` → 64
|
|
3
|
-
* `'10/0' < '9/0'`
|
|
4
|
-
*
|
|
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;
|
package/dist/parse-lsn.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `X/Y` → 64
|
|
3
|
-
* `'10/0' < '9/0'`
|
|
4
|
-
*
|
|
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
|
|
8
|
-
* `'10/0' < '9/0'`
|
|
9
|
-
*
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-connection-closed.error.d.ts","sourceRoot":"","sources":["../src/probe-connection-closed.error.ts"],"names":[],"mappings":"AAAA,
|
|
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
|
-
/**
|
|
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(
|
|
9
|
+
super(`the probe connection of the node ${node} is closed: the router is closed`);
|
|
10
10
|
this.node = node;
|
|
11
11
|
}
|
|
12
12
|
}
|