
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@scalio-oss/nest-couchbase
Advanced tools
$ npm i @scalio-oss/nest-couchbase couchbase
@scalio-oss/nest-couchbase
uses couchbase as a data provider and the Repository
pattern to handle all items (documents) related operations.
First, let's create an Entity
:
import { Entity } from '@scalio-oss/nest-couchbase';
@Entity('cats')
export class Cat {
name: string;
}
Where cats
is the Couchbase bucket name (optional).
Then, we need to import CouchbaseModule
in our root AppModule
:
import { Module } from '@nestjs/common';
import { CouchbaseModule } from '@scalio-oss/nest-couchbase';
@Module({
imports: [
CouchbaseModule.forRoot({
url: 'couchbase://127.0.0.1',
username: 'couchbase',
password: 'couchbase',
defaultBucket: {
name: 'test',
password: 'password',
},
buckets: [
{
name: 'another_bucket',
password: 'another_password',
},
],
}),
],
})
export class AppModule {}
In our CatsModule
we need to initiate repository for our Cat
entity:
import { Module } from '@nestjs/common';
import { CouchbaseModule } from '@scalio-oss/nest-couchbase';
import { CatsService } from './cats.service';
import { CatsController } from './cats.controller';
import { Cat } from './cat.entity';
@Module({
imports: [CouchbaseModule.forFeature([Cat])],
providers: [CatsService],
controllers: [CatsController],
})
export class CatsModule {}
And here is the usage of the repository in the service:
import { Injectable } from '@nestjs/common';
import { InjectRepository, Repository } from '@scalio-oss/nest-couchbase';
import { Cat } from './cat.entity';
@Injectable()
export class CatsService {
constructor(
@InjectRepository(Cat)
private readonly catsRepository: Repository<Cat>,
) {}
findOne(id: string): Promise<Cat> {
return this.catsRepository.get(id);
}
}
Created by @zMotivat0r @ Scalio
FAQs
Couchbase module for Nest framework
The npm package @scalio-oss/nest-couchbase receives a total of 0 weekly downloads. As such, @scalio-oss/nest-couchbase popularity was classified as not popular.
We found that @scalio-oss/nest-couchbase demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.