
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
nestjs-consul-kv-realtime
Advanced tools
NestJS library for work with consul-kv
npm i --save consul nestjs-consul-kv-realtime
https://www.npmjs.com/package/ilink-console-tools - Console tools with method for save .env file to consul-kv and method for download from consul-kv to .env file.
https://github.com/i-link-pro-team/ilink/blob/develop/libs/nestjs-consul-kv-realtime/tests/e2e/nestjs-consul-kv-realtime.spec.ts - Tests for all exists feature of library.
import { Module } from '@nestjs/common';
import { NestjsConsulKvRealtimeModule } from 'nestjs-consul-kv-realtime';
@Module({
imports: [
NestjsConsulKvRealtimeModule.forRootAsync({
useFactory: async () => ({
port: '8500',
host: 'localhost',
defaults: {
token: `CONSUL_HTTP_TOKEN`,
},
watchers: [
{
interval: 1000,
key: 'consul-key',
callback: async (value: { key: string }) => {
console.log('New value from consul:', value);
},
},
],
}),
}),
],
})
export class AppModule {}
import { Injectable } from '@nestjs/common';
import { NestjsConsulKvRealtimeService } from 'nestjs-consul-kv-realtime';
@Injectable()
export class MyService {
constructor(
private readonly nestjsConsulKvRealtimeService: NestjsConsulKvRealtimeService
) {}
async method() {
const value = await this.nestjsConsulKvRealtimeService.getValue(
'consul-key'
);
console.log('Value from consul:', value);
return value;
}
}
import { Controller, Get } from '@nestjs/common';
import { NestjsConsulKvRealtimeService } from 'nestjs-consul-kv-realtime';
import { tap } from 'rxjs/operators';
@Controller()
export class MyController {
constructor(
private readonly nestjsConsulKvRealtimeService: NestjsConsulKvRealtimeService
) {}
@Get()
getConsulValue() {
return this.nestjsConsulKvRealtimeService
.listen({ key: 'consul-key' })
.pipe(tap((value) => console.log('New value from consul:', value)));
}
}
import { Injectable } from '@nestjs/common';
import { ConsulKeyValue } from 'nestjs-consul-kv-realtime';
@Injectable()
export class MyService {
@ConsulKeyValue({
key: 'consul-key',
})
value!: { key: string };
async method() {
console.log('Value from consul:', this.value);
return this.value;
}
}
import { Injectable } from '@nestjs/common';
import { ConsulKeyValue } from 'nestjs-consul-kv-realtime';
class ExternalLibrary {
public options?: { key1: string };
private connected = false;
async connect(options: { key1: string }) {
this.options = options;
this.connected = true;
}
async waitEndOfAllCurrentOperations() {
return true;
}
async disconnect() {
this.connected = false;
}
async isConnected() {
return this.connected === true;
}
}
@Injectable()
export class MyService {
@ConsulKeyValue({
interval: 500,
key: 'file',
factory: async (
newConsulValue: { key1: string },
oldValue?: ExternalLibrary
) => {
if (oldValue) {
await oldValue.waitEndOfAllCurrentOperations();
await oldValue.disconnect();
}
const externalLibrary = new ExternalLibrary();
await externalLibrary.connect(newConsulValue);
return externalLibrary;
},
})
externalLibrary!: ExternalLibrary;
async isConnected() {
const isConnected = this.externalLibrary.isConnected();
console.log('Connection state:', isConnected);
return isConnected;
}
}
MIT
FAQs
NestJS library for work with consul-kv
We found that nestjs-consul-kv-realtime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.