Skip to Content

Installation

Package

npm install @gloocan/cat-inspector

The published runtime depends on reflect-metadata, ajv, and ws. Features that talk to Express, Minio, or Socket.IO use peer dependencies so your app supplies compatible versions.

Peer dependencies

From the published package.json:

PeerRequired when
express >=4.18.0Express pipeline registration, HTTP bridge, synthetic invoke, coverage scans against Express apps.
socket.io >=4.8.0Optional — import @gloocan/cat-inspector/socket-io for attachCatRPC. Marked optional in the package; install if you use that transport.
minio >=8.0.0Optional — host-side presign/upload helpers (Host Minio).

TypeScript and @Cat

If you use the @Cat decorator on class methods, enable decorator metadata so parameter and return types are visible at runtime:

{ "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true } }

Import reflect-metadata once at process entry before any decorated class loads:

import 'reflect-metadata'

Functional registration with cat / catModule does not require decorator metadata, but you may still want reflect-metadata if you mix in @Cat.

Subpath import (Socket.IO)

import { attachCatRPC } from '@gloocan/cat-inspector/socket-io'

See Socket.IO transport.

Continue with Quick start for a minimal copy-paste attachCatRPC example.