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

@acuris/eventstore-postgresql

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acuris/eventstore-postgresql - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

dist/PgEventBatchWriter.d.ts

5

dist/PgEventSource.d.ts
import * as Pg from "pg";
import { PgSchemaManager } from "./PgSchemaManager";
import { EventBatchWriter, EventSource } from "@acuris/eventstore-api";
import { EventSource } from "@acuris/eventstore-api";
import { PgEventReader } from "./PgEventReader";

@@ -8,2 +8,3 @@ import { PgEventStreamReader } from "./PgEventStreamReader";

import { ConnectionProvider } from "./ConnectionProvider";
import { PgEventBatchWriter } from "./PgEventBatchWriter";
export declare function pgAsyncConfigForAWS(region: string, hostname: string, port: number, database: string, username: string): Pg.ClientConfig;

@@ -18,4 +19,4 @@ export declare class PgEventSource implements EventSource {

get streamWriter(): PgEventStreamWriter;
get batchWriter(): EventBatchWriter;
get batchWriter(): PgEventBatchWriter;
close(): Promise<void>;
}

4

dist/PgEventSource.js

@@ -5,6 +5,6 @@ "use strict";

const PgSchemaManager_1 = require("./PgSchemaManager");
const eventstore_api_1 = require("@acuris/eventstore-api");
const PgEventReader_1 = require("./PgEventReader");
const PgEventStreamReader_1 = require("./PgEventStreamReader");
const PgEventStreamWriter_1 = require("./PgEventStreamWriter");
const PgEventBatchWriter_1 = require("./PgEventBatchWriter");
function pgAsyncConfigForAWS(region, hostname, port, database, username) {

@@ -46,3 +46,3 @@ const AWS = require("aws-sdk");

get batchWriter() {
return new eventstore_api_1.DefaultEventBatchWriter(this.streamWriter);
return new PgEventBatchWriter_1.PgEventBatchWriter(this.provider, this.schema);
}

@@ -49,0 +49,0 @@ close() {

@@ -13,4 +13,6 @@ "use strict";

const quotedSchema = conn.escapeIdentifier(this.schema);
let nextExpectedEventNumber = expectedEventNumber;
for (const event of events) {
await conn.query(`SELECT 1 FROM ${quotedSchema}.write_event($1, $2, $3, $4, null, $5)`, [streamId.category, streamId.id, event.type, event.data, expectedEventNumber]);
await conn.query(`SELECT 1 FROM ${quotedSchema}.write_event($1, $2, $3, $4, null, $5)`, [streamId.category, streamId.id, event.type, event.data, nextExpectedEventNumber]);
nextExpectedEventNumber = undefined;
}

@@ -17,0 +19,0 @@ }));

{
"name": "@acuris/eventstore-postgresql",
"private": false,
"version": "1.2.1",
"version": "1.2.2",
"description": "Eventstore implementation storing events in Postgresql",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc