Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@equinox-js/explorer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinox-js/explorer

Equinox Explorer

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Equinox Explorer

A tool allowing you to visualise and explore your event store.

  • Recently modified streams
  • Most active categories
  • See state changes over time for a particular stream
  • View the causation tree for an event

Usage

1. Install

$ pnpm add -D @equinox-js/explorer@latest

2. Create a configuration file

// src/explorer-config.ts
export const categories = [
  { name: Invoice.Stream.category, codec: Invoice.Events.codec, fold: Invoice.Fold },
  // ...
]

3. Add a script to your package.json

{
  "scripts": {
    "explorer": "NODE_PATH=./node_modules eqx-explorer -cs $MDB_RO_CONN_STR -c ./src/explorer-config.ts"
  }
}

4. Open your browser

By default the explorer will be hosted on http://localhost:3000

Notes

Esbuild

The explorer uses esbuild under the hood to compile your config file because we can't simply import a TS file. This can cause some unforessen issues but generally seems to work fine.

Indices

The queries made by the explorer against the messages table do benefit from a couple of indices.

-- Used to render the main page view of events in the last 7 days
create index if not exists idx_messages_time_category on messages(time, category(stream_name), global_position);
-- Used to efficiently look up all correlated events
create index if not exists idx_messages_correlation_id on messages((metadata->>'$correlationId'), global_position);

FAQs

Package last updated on 08 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts