@event-driven-io/emmett-postgresql 0.38.0 → 0.38.2
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/dist/index.cjs +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -299,10 +299,12 @@ var NotifyAboutNoActiveReadersStream = (_class = class extends _webstreamspolyfi
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}, _class);
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
var getCheckpoint = (message2) => {
|
|
303
|
+
return "checkpoint" in message2.metadata && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
304
|
+
isBigint(message2.metadata.checkpoint) ? (
|
|
305
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
306
|
+
message2.metadata.checkpoint
|
|
307
|
+
) : "globalPosition" in message2.metadata && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
306
308
|
isBigint(message2.metadata.globalPosition) ? (
|
|
307
309
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
308
310
|
message2.metadata.globalPosition
|
|
@@ -371,8 +373,7 @@ var reactor = (options) => {
|
|
|
371
373
|
version: options.version,
|
|
372
374
|
message: message2,
|
|
373
375
|
lastCheckpoint,
|
|
374
|
-
partition: options.partition
|
|
375
|
-
getCheckpoint: contextualGetCheckpoint(context)
|
|
376
|
+
partition: options.partition
|
|
376
377
|
},
|
|
377
378
|
context
|
|
378
379
|
);
|
|
@@ -1477,7 +1478,7 @@ var postgreSQLCheckpointer = () => ({
|
|
|
1477
1478
|
return { lastCheckpoint: _optionalChain([result, 'optionalAccess', _48 => _48.lastProcessedPosition]) };
|
|
1478
1479
|
},
|
|
1479
1480
|
store: async (options, context) => {
|
|
1480
|
-
const newPosition = getCheckpoint(options.message
|
|
1481
|
+
const newPosition = getCheckpoint(options.message);
|
|
1481
1482
|
const result = await storeProcessorCheckpoint(context.execute, {
|
|
1482
1483
|
lastProcessedPosition: options.lastCheckpoint,
|
|
1483
1484
|
newPosition,
|