Socket
Socket
Sign inDemoInstall

redisk

Package Overview
Dependencies
36
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.1.1

dist/client/logger.client.d.ts

5

dist/redisk.js

@@ -16,2 +16,4 @@ "use strict";

const path = require("path");
const logger_1 = require("./logger/logger");
const logger_client_1 = require("./client/logger.client");
class Redisk {

@@ -23,3 +25,4 @@ constructor(metadata, client) {

static init(options) {
return new Redisk(new metadata_1.Metadata(), new client_1.RedisClient(options));
logger_1.default.info('Starting Redisk with default constructor...');
return new Redisk(new metadata_1.Metadata(), new logger_client_1.LoggerClient(new client_1.RedisClient(options)));
}

@@ -26,0 +29,0 @@ close() {

{
"name": "redisk",
"version": "2.1.0",
"version": "2.1.1",
"description": "TypeScript ORM for Redis.",

@@ -21,3 +21,4 @@ "main": "index.js",

"redis": "^2.8.0",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.1.13",
"winston": "^3.2.1"
},

@@ -24,0 +25,0 @@ "repository": {

13

README.md

@@ -82,2 +82,3 @@ <h1 align="center">

- [Delete](#delete)
- [Logging](#logging)

@@ -381,2 +382,12 @@

await redisk.delete(User, id);
```
```
## Logging
We use [winston](https://github.com/winstonjs/winston) for logging, if you want to see more info, like redis command that are being executed you can set process.env.REDISK_LOG_LEVEL to 'info'.
For example:
```bash
REDISK_LOG_LEVEL=info npm test
```

@@ -10,2 +10,4 @@ import { Type } from './metadata/type';

import * as path from 'path';
import logger from './logger/logger';
import { LoggerClient } from './client/logger.client';

@@ -21,3 +23,4 @@ export class Redisk {

static init(options: ClientOptions) {
return new Redisk(new Metadata(), new RedisClient(options));
logger.info('Starting Redisk with default constructor...');
return new Redisk(new Metadata(), new LoggerClient(new RedisClient(options)));
}

@@ -24,0 +27,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc