Socket
Socket
Sign inDemoInstall

@arque/core

Package Overview
Dependencies
Maintainers
4
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arque/core - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

12

dist/libs/projection.d.ts

@@ -9,7 +9,15 @@ import { ConfigAdapter, StoreAdapter, StreamAdapter } from './adapters';

private readonly _state;
private readonly logger;
private readonly opts?;
protected readonly logger: {
info: any;
error: any;
warn: any;
verbose: any;
};
private readonly eventHandlers;
private subscriber;
private timestampLastEventReceived;
constructor(store: StoreAdapter, stream: StreamAdapter, config: ConfigAdapter, eventHandlers: TEventHandler[], _id: string, _state: TState);
constructor(store: StoreAdapter, stream: StreamAdapter, config: ConfigAdapter, eventHandlers: TEventHandler[], _id: string, _state: TState, opts?: {
disableSaveStream?: true;
});
get id(): string;

@@ -16,0 +24,0 @@ get state(): TState;

14

dist/libs/projection.js

@@ -8,3 +8,3 @@ "use strict";

class Projection {
constructor(store, stream, config, eventHandlers, _id, _state) {
constructor(store, stream, config, eventHandlers, _id, _state, opts) {
this.store = store;

@@ -15,2 +15,3 @@ this.stream = stream;

this._state = _state;
this.opts = opts;
this.logger = {

@@ -51,9 +52,12 @@ info: (0, debug_1.default)('Broker:info'),

async start() {
var _a;
if (this.subscriber) {
throw new Error('already started');
}
await this.config.saveStream({
id: this.id,
events: [...new Set([...this.eventHandlers.values()].map(item => item.type)).values()],
});
if (!((_a = this.opts) === null || _a === void 0 ? void 0 : _a.disableSaveStream)) {
await this.config.saveStream({
id: this.id,
events: [...new Set([...this.eventHandlers.values()].map(item => item.type)).values()],
});
}
this.subscriber = await this.stream.subscribe(this.id, async (event) => {

@@ -60,0 +64,0 @@ await this.handleEvent(event);

{
"name": "@arque/core",
"version": "0.4.0",
"version": "0.4.1",
"description": "`arque` core library",

@@ -34,3 +34,3 @@ "author": "ScaleForge",

},
"gitHead": "673ab93d4cbf92ca13dc1b88d7277db49af7d295"
"gitHead": "23c0b82bc66e088d1bf50a2f06c7c009870950d0"
}

Sorry, the diff of this file is not supported yet

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