New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

leo-connector-postgres

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leo-connector-postgres - npm Package Compare versions

Comparing version

to
1.3.2-116-g75dbff6

@@ -64,3 +64,2 @@ const pg = require("pg");

let walCheckpointHeartBeatTimeoutId = null;
var retry = backoff.fibonacci({

@@ -85,2 +84,4 @@ randomisationFactor: 0,

let maxDate = null;
copyDataThrough = ls.through((msg, done) => {

@@ -114,2 +115,10 @@ let lsn = {

if (log.time) {
let d = new Date(log.time);
maxDate = Math.max(d.valueOf(), maxDate);
}
// console.error("Every LSN Received", lsn.string);

@@ -134,3 +143,5 @@ // console.error("Every Last Received LSN", lastRecievedLSN);

payload: log,
correlation_id: c
correlation_id: c,
event_source_timestamp: maxDate,
timestamp: Date.now()
});

@@ -234,4 +245,4 @@ } else if (msg.chunk[0] == 0x6b) { // Primary keepalive message

if (err) return dieError(err);
console.log(`START_REPLICATION SLOT ${opts.slot_name} LOGICAL ${lastLsn} ("include-xids" '0', "skip-empty-xacts" '1')`);
replicationClient.query(`START_REPLICATION SLOT ${opts.slot_name} LOGICAL ${lastLsn} ("include-xids" '0', "skip-empty-xacts" '1')`, (err, result) => {
console.log(`START_REPLICATION SLOT ${opts.slot_name} LOGICAL ${lastLsn} ("include-timestamp" '1', include-xids" '0', "skip-empty-xacts" '1')`);
replicationClient.query(`START_REPLICATION SLOT ${opts.slot_name} LOGICAL ${lastLsn} ("include-timestamp" '1', "include-xids" '0', "skip-empty-xacts" '1')`, (err, result) => {
if (err) {

@@ -238,0 +249,0 @@ if (err.code === '58P01') requestedWalSegmentAlreadyRemoved = true;

@@ -28,5 +28,6 @@ /*

double_quote_escaped_string = "\"" t:([^"]+ / [\r\n] / "\"\"" {return "\""})* "\"" {return t[0] ? t[0].join('') : '';}
single_quote_escaped_string = "'" t:([^'\\] / [\r\n] / "''" / "\\\\" / "\\''" / "\\'" !" " / "\\\"" / "\\r" / "\\n" / "\\t" / "\\\/")* "'" {
single_quote_escaped_string = "'" t:([^'\\] / [\r\n] / "''" / "\\\\" / "\\''" / "\\'" !" " / "\\\"" / "\\r" / "\\n" / "\\t" / "\\\/" / unicodeChar / "\\" )* "'" {
return t.join('');
}
unicodeChar = "\\u" [0-9A-F][0-9A-F][0-9A-F][0-9A-F]
dot_terminated_string = t:[^.]+ {return t.join('');}

@@ -256,27 +257,33 @@ space_terminated_string = t:[^ \t\r\n]+ {return t.join('');}

peg$c69 = peg$literalExpectation("\\/", false),
peg$c70 = function(t) {
peg$c70 = "\\",
peg$c71 = peg$literalExpectation("\\", false),
peg$c72 = function(t) {
return t.join('');
},
peg$c71 = /^[^.]/,
peg$c72 = peg$classExpectation(["."], true, false),
peg$c73 = /^[^ \t\r\n]/,
peg$c74 = peg$classExpectation([" ", "\t", "\r", "\n"], true, false),
peg$c75 = /^[^:]/,
peg$c76 = peg$classExpectation([":"], true, false),
peg$c77 = /^[^[]/,
peg$c78 = peg$classExpectation(["["], true, false),
peg$c79 = /^[^\][]/,
peg$c80 = peg$classExpectation(["]", "["], true, false),
peg$c81 = "INSERT",
peg$c82 = peg$literalExpectation("INSERT", false),
peg$c83 = "UPDATE",
peg$c84 = peg$literalExpectation("UPDATE", false),
peg$c85 = "DELETE",
peg$c86 = peg$literalExpectation("DELETE", false),
peg$c87 = function(f, t, v) {return {n:f, t:t, v:v};},
peg$c88 = "(",
peg$c89 = peg$literalExpectation("(", false),
peg$c90 = /^[^))]/,
peg$c91 = peg$classExpectation([")", ")"], true, false),
peg$c92 = function(t) {return {type:"null", name:"message", value:t.join('')};},
peg$c73 = "\\u",
peg$c74 = peg$literalExpectation("\\u", false),
peg$c75 = /^[0-9A-F]/,
peg$c76 = peg$classExpectation([["0", "9"], ["A", "F"]], false, false),
peg$c77 = /^[^.]/,
peg$c78 = peg$classExpectation(["."], true, false),
peg$c79 = /^[^ \t\r\n]/,
peg$c80 = peg$classExpectation([" ", "\t", "\r", "\n"], true, false),
peg$c81 = /^[^:]/,
peg$c82 = peg$classExpectation([":"], true, false),
peg$c83 = /^[^[]/,
peg$c84 = peg$classExpectation(["["], true, false),
peg$c85 = /^[^\][]/,
peg$c86 = peg$classExpectation(["]", "["], true, false),
peg$c87 = "INSERT",
peg$c88 = peg$literalExpectation("INSERT", false),
peg$c89 = "UPDATE",
peg$c90 = peg$literalExpectation("UPDATE", false),
peg$c91 = "DELETE",
peg$c92 = peg$literalExpectation("DELETE", false),
peg$c93 = function(f, t, v) {return {n:f, t:t, v:v};},
peg$c94 = "(",
peg$c95 = peg$literalExpectation("(", false),
peg$c96 = /^[^))]/,
peg$c97 = peg$classExpectation([")", ")"], true, false),
peg$c98 = function(t) {return {type:"null", name:"message", value:t.join('')};},

@@ -1308,2 +1315,14 @@ peg$currPos = 0,

}
if (s3 === peg$FAILED) {
s3 = peg$parseunicodeChar();
if (s3 === peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 92) {
s3 = peg$c70;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c71); }
}
}
}
}

@@ -1437,2 +1456,14 @@ }

}
if (s3 === peg$FAILED) {
s3 = peg$parseunicodeChar();
if (s3 === peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 92) {
s3 = peg$c70;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c71); }
}
}
}
}

@@ -1459,3 +1490,3 @@ }

peg$savedPos = s0;
s1 = peg$c70(s2);
s1 = peg$c72(s2);
s0 = s1;

@@ -1478,2 +1509,72 @@ } else {

function peg$parseunicodeChar() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c73) {
s1 = peg$c73;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c74); }
}
if (s1 !== peg$FAILED) {
if (peg$c75.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
}
if (s2 !== peg$FAILED) {
if (peg$c75.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
}
if (s3 !== peg$FAILED) {
if (peg$c75.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
}
if (s4 !== peg$FAILED) {
if (peg$c75.test(input.charAt(peg$currPos))) {
s5 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s5 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
}
if (s5 !== peg$FAILED) {
s1 = [s1, s2, s3, s4, s5];
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
} else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsedot_terminated_string() {

@@ -1484,3 +1585,3 @@ var s0, s1, s2;

s1 = [];
if (peg$c71.test(input.charAt(peg$currPos))) {
if (peg$c77.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1490,3 +1591,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c72); }
if (peg$silentFails === 0) { peg$fail(peg$c78); }
}

@@ -1496,3 +1597,3 @@ if (s2 !== peg$FAILED) {

s1.push(s2);
if (peg$c71.test(input.charAt(peg$currPos))) {
if (peg$c77.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1502,3 +1603,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c72); }
if (peg$silentFails === 0) { peg$fail(peg$c78); }
}

@@ -1523,3 +1624,3 @@ }

s1 = [];
if (peg$c73.test(input.charAt(peg$currPos))) {
if (peg$c79.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1529,3 +1630,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c74); }
if (peg$silentFails === 0) { peg$fail(peg$c80); }
}

@@ -1535,3 +1636,3 @@ if (s2 !== peg$FAILED) {

s1.push(s2);
if (peg$c73.test(input.charAt(peg$currPos))) {
if (peg$c79.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1541,3 +1642,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c74); }
if (peg$silentFails === 0) { peg$fail(peg$c80); }
}

@@ -1562,3 +1663,3 @@ }

s1 = [];
if (peg$c75.test(input.charAt(peg$currPos))) {
if (peg$c81.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1568,3 +1669,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
if (peg$silentFails === 0) { peg$fail(peg$c82); }
}

@@ -1574,3 +1675,3 @@ if (s2 !== peg$FAILED) {

s1.push(s2);
if (peg$c75.test(input.charAt(peg$currPos))) {
if (peg$c81.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1580,3 +1681,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c76); }
if (peg$silentFails === 0) { peg$fail(peg$c82); }
}

@@ -1601,3 +1702,3 @@ }

s1 = [];
if (peg$c77.test(input.charAt(peg$currPos))) {
if (peg$c83.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1607,3 +1708,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c78); }
if (peg$silentFails === 0) { peg$fail(peg$c84); }
}

@@ -1613,3 +1714,3 @@ if (s2 !== peg$FAILED) {

s1.push(s2);
if (peg$c77.test(input.charAt(peg$currPos))) {
if (peg$c83.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1619,3 +1720,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c78); }
if (peg$silentFails === 0) { peg$fail(peg$c84); }
}

@@ -1640,3 +1741,3 @@ }

s1 = [];
if (peg$c79.test(input.charAt(peg$currPos))) {
if (peg$c85.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1646,3 +1747,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c80); }
if (peg$silentFails === 0) { peg$fail(peg$c86); }
}

@@ -1652,3 +1753,3 @@ if (s2 !== peg$FAILED) {

s1.push(s2);
if (peg$c79.test(input.charAt(peg$currPos))) {
if (peg$c85.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);

@@ -1658,3 +1759,3 @@ peg$currPos++;

s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c80); }
if (peg$silentFails === 0) { peg$fail(peg$c86); }
}

@@ -1678,24 +1779,24 @@ }

s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c81) {
s1 = peg$c81;
if (input.substr(peg$currPos, 6) === peg$c87) {
s1 = peg$c87;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c82); }
if (peg$silentFails === 0) { peg$fail(peg$c88); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 6) === peg$c83) {
s1 = peg$c83;
if (input.substr(peg$currPos, 6) === peg$c89) {
s1 = peg$c89;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c84); }
if (peg$silentFails === 0) { peg$fail(peg$c90); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 6) === peg$c85) {
s1 = peg$c85;
if (input.substr(peg$currPos, 6) === peg$c91) {
s1 = peg$c91;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c86); }
if (peg$silentFails === 0) { peg$fail(peg$c92); }
}

@@ -1734,3 +1835,3 @@ }

peg$savedPos = s0;
s1 = peg$c87(s2, s3, s5);
s1 = peg$c93(s2, s3, s5);
s0 = s1;

@@ -1768,11 +1869,11 @@ } else {

if (input.charCodeAt(peg$currPos) === 40) {
s2 = peg$c88;
s2 = peg$c94;
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c89); }
if (peg$silentFails === 0) { peg$fail(peg$c95); }
}
if (s2 !== peg$FAILED) {
s3 = [];
if (peg$c90.test(input.charAt(peg$currPos))) {
if (peg$c96.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);

@@ -1782,3 +1883,3 @@ peg$currPos++;

s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c91); }
if (peg$silentFails === 0) { peg$fail(peg$c97); }
}

@@ -1788,3 +1889,3 @@ if (s4 !== peg$FAILED) {

s3.push(s4);
if (peg$c90.test(input.charAt(peg$currPos))) {
if (peg$c96.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);

@@ -1794,3 +1895,3 @@ peg$currPos++;

s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c91); }
if (peg$silentFails === 0) { peg$fail(peg$c97); }
}

@@ -1811,3 +1912,3 @@ }

peg$savedPos = s0;
s1 = peg$c92(s3);
s1 = peg$c98(s3);
s0 = s1;

@@ -1814,0 +1915,0 @@ } else {

{
"name": "leo-connector-postgres",
"version": "1.3.2-111-g161ad0d",
"version": "1.3.2-116-g75dbff6",
"description": "A Postgres database connector for use with Leo Platform",

@@ -5,0 +5,0 @@ "repository": {