Socket
Socket
Sign inDemoInstall

@edirect/audit-domain

Package Overview
Dependencies
Maintainers
26
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edirect/audit-domain - npm Package Compare versions

Comparing version 1.5.15 to 1.5.16

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## [1.5.16](https://bitbucket.org/gofrank/audit-service-nodejs/compare/v1.5.15...v1.5.16) (2023-09-19)
## [1.5.15](https://bitbucket.org/gofrank/audit-service-nodejs/compare/v1.5.14...v1.5.15) (2023-09-19)

@@ -7,0 +9,0 @@

2

package.json
{
"name": "@edirect/audit-domain",
"version": "1.5.15",
"version": "1.5.16",
"private": false,

@@ -5,0 +5,0 @@ "dependencies": {

@@ -0,14 +1,6 @@

import { Namespace } from 'cls-hooked';
export declare class Context {
static startup(): void;
/**
* Get value from context
* @param {string} key
*/
static start(callback: (namespace: Namespace<Record<string, any>>) => void): void;
static get<T>(key: string): T | undefined;
/**
* Set value in context
* @param {string} key
*/
static set<T>(key: string, value: T): void;
static shutdown(): void;
}

@@ -5,27 +5,14 @@ "use strict";

const cls_hooked_1 = require("cls-hooked");
const NAMESPACE = 'NS-Audit-Service';
const NAMESPACE = 'NS-AUDIT-SERVICE';
class Context {
static startup() {
(0, cls_hooked_1.createNamespace)(NAMESPACE);
static start(callback) {
const ns = (0, cls_hooked_1.createNamespace)(NAMESPACE);
ns.run(() => callback(ns));
}
/**
* Get value from context
* @param {string} key
*/
static get(key) {
const namespace = (0, cls_hooked_1.getNamespace)(NAMESPACE);
if (namespace && namespace.active) {
return namespace.get(`audit-data.${key}`);
if (namespace) {
return namespace.get(key);
}
}
/**
* Set value in context
* @param {string} key
*/
static set(key, value) {
const namespace = (0, cls_hooked_1.getNamespace)(NAMESPACE);
if (namespace && namespace.active) {
return namespace.set(`auditdata.${key}`, value);
}
}
static shutdown() {

@@ -32,0 +19,0 @@ (0, cls_hooked_1.destroyNamespace)(NAMESPACE);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc