@spigell/my-nodejs-libs
v0.1.5
Published
Shared Node.js TypeScript utilities for workers, HTTP, logging, metrics, and messaging.
Readme
@spigell/my-nodejs-libs
Shared Node.js and TypeScript helpers for small services and workers.
This package currently groups together:
- app worker primitives for periodic, queue-based, and WebSocket-driven jobs
- HTTP server and client helpers
- Prometheus and OpenTelemetry metric helpers
- Winston-based logging and request middleware
- utility helpers such as retry, chunking, and coin amount conversion
- a Telegram sender wrapper
Installation
From npm
Install the package:
yarn add @spigell/my-nodejs-libsLocal development
Build the package locally:
yarn install
yarn buildLink it into another repository in one of these ways:
yarn link
In this repository:
yarn linkIn the consumer repository:
yarn link "@spigell/my-nodejs-libs"file:dependency
{
"dependencies": {
"@spigell/my-nodejs-libs": "file:../my-nodejs-libs"
}
}- Monorepo workspace dependency
{
"dependencies": {
"@spigell/my-nodejs-libs": "workspace:*"
}
}Exported modules
The package root exports everything from src/index.ts, including:
- app:
Worker,PeriodicWorker,QueueWorker,WebSocketWorker,CircularBuffer - HTTP:
Server,JsonAxiosInstance - logging:
Logging,createMiddleware - metrics:
PromClient,MetricRegistry - messaging:
TelegramSender - utils:
RetryError,simple,chunk,Coin
Consumers should import from the package root:
import {
Logging,
MetricRegistry,
PromClient,
Server,
} from '@spigell/my-nodejs-libs';Do not import from src/ in consumers. Published output comes from dist/.
Development commands
yarn install
yarn typecheck
yarn lint
yarn build
yarn testRelease flow
This repository is configured to publish to the public npm registry via the shared workflow in spigell/my-shared-workflows.
Release steps:
- Push your changes to the default branch.
- Create and push a tag.
- GitHub Actions publishes the package to
registry.npmjs.org.
The release workflow is defined in .github/workflows/tags-package-release.yaml.
Notes and caveats
- This library is a shared internal toolkit, not a polished public SDK.
- Some worker abstractions assume long-running Node.js processes and do not yet expose lifecycle shutdown hooks.
src/fuel/wallet/wallet.tsis currently a compatibility stub because the referenced wallet implementation is not present in this repository.
