Socket
Socket
Sign inDemoInstall

nats-micro

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nats-micro - npm Package Compare versions

Comparing version 0.28.2 to 0.28.3

7

lib/cjs/decorators/storage.d.ts
import { Handler, MicroserviceConfig, MicroserviceMethodConfig } from '../types/index.js';
export type StoredMicroserviceClassMethod<T, R> = {
type StoredMicroserviceClassMethod<T, R> = {
method: Handler<T, R>;

@@ -8,3 +8,3 @@ config: {

};
export type StoredMicroserviceClass = {
type StoredMicroserviceClass = {
target: unknown;

@@ -14,3 +14,3 @@ config: Omit<MicroserviceConfig, 'methods'>;

};
export declare class ClassStorage {
declare class ClassStorage {
readonly items: StoredMicroserviceClass[];

@@ -22,1 +22,2 @@ ensureClassAdded(target: unknown): StoredMicroserviceClass;

export declare const storage: ClassStorage;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.storage = exports.ClassStorage = void 0;
exports.storage = void 0;
const misc_js_1 = require("../utils/misc.js");

@@ -8,14 +8,2 @@ class ClassStorage {

this.items = [];
// addMethod<T, R>(
// targetClass: unknown,
// targetMethodName: string,
// targetMethod: Handler<T, R>,
// data: Partial<MicroserviceMethodConfig<T, R>>,
// ): void {
// const storedMethod = {
// ...storage.ensureClassMethodAdded<T, R>(targetClass, targetMethodName),
// };
// storedMethod.config.handler = targetMethod;
// storedMethod.config = { ...storedMethod.config, ...data };
// }
}

@@ -69,4 +57,3 @@ ensureClassAdded(target) {

}
exports.ClassStorage = ClassStorage;
exports.storage = new ClassStorage();
//# sourceMappingURL=storage.js.map
import { Handler, MicroserviceConfig, MicroserviceMethodConfig } from '../types/index.js';
export type StoredMicroserviceClassMethod<T, R> = {
type StoredMicroserviceClassMethod<T, R> = {
method: Handler<T, R>;

@@ -8,3 +8,3 @@ config: {

};
export type StoredMicroserviceClass = {
type StoredMicroserviceClass = {
target: unknown;

@@ -14,3 +14,3 @@ config: Omit<MicroserviceConfig, 'methods'>;

};
export declare class ClassStorage {
declare class ClassStorage {
readonly items: StoredMicroserviceClass[];

@@ -22,1 +22,2 @@ ensureClassAdded(target: unknown): StoredMicroserviceClass;

export declare const storage: ClassStorage;
export {};
import { kebabCase } from '../utils/misc.js';
export class ClassStorage {
class ClassStorage {
constructor() {
this.items = [];
// addMethod<T, R>(
// targetClass: unknown,
// targetMethodName: string,
// targetMethod: Handler<T, R>,
// data: Partial<MicroserviceMethodConfig<T, R>>,
// ): void {
// const storedMethod = {
// ...storage.ensureClassMethodAdded<T, R>(targetClass, targetMethodName),
// };
// storedMethod.config.handler = targetMethod;
// storedMethod.config = { ...storedMethod.config, ...data };
// }
}

@@ -18,0 +6,0 @@ ensureClassAdded(target) {

{
"name": "nats-micro",
"version": "0.28.2",
"version": "0.28.3",
"description": "NATS micro compatible extra-lightweight microservice library",

@@ -46,7 +46,3 @@ "main": "lib/cjs/index.js",

"dependencies": {
"chai-like": "^1.1.1",
"chai-things": "^0.2.0",
"debug-threads-ns": "^0.2.3",
"errio": "^1.2.2",
"fast-safe-stringify": "^2.1.1",
"moment": "^2.29.4",

@@ -72,4 +68,5 @@ "nanoid": "^3.3.5",

"chai-as-promised": "^7.1.1",
"chai-like": "^1.1.1",
"chai-subset": "^1.6.0",
"clean-package": "^2.2.0",
"chai-things": "^0.2.0",
"coverage-badge-creator": "^1.0.18",

@@ -92,3 +89,2 @@ "eslint": "^8.34.0",

"mocha-multi-reporters": "^1.5.1",
"nyc": "^15.1.0",
"sinon": "^9.0.2",

@@ -95,0 +91,0 @@ "ts-mocha": "^10.0.0",

import { Handler, MicroserviceConfig, MicroserviceMethodConfig } from '../types/index.js';
import { kebabCase } from '../utils/misc.js';
export type StoredMicroserviceClassMethod<T, R> = {
type StoredMicroserviceClassMethod<T, R> = {
method: Handler<T, R>;

@@ -9,3 +9,3 @@ config: { name?: string; } & Omit<MicroserviceMethodConfig<T, R>, 'handler'>;

export type StoredMicroserviceClass = {
type StoredMicroserviceClass = {
target: unknown; // class constructor

@@ -17,3 +17,3 @@ config: Omit<MicroserviceConfig, 'methods'>;

export class ClassStorage {
class ClassStorage {
public readonly items: StoredMicroserviceClass[] = [];

@@ -80,20 +80,4 @@

}
// addMethod<T, R>(
// targetClass: unknown,
// targetMethodName: string,
// targetMethod: Handler<T, R>,
// data: Partial<MicroserviceMethodConfig<T, R>>,
// ): void {
// const storedMethod = {
// ...storage.ensureClassMethodAdded<T, R>(targetClass, targetMethodName),
// };
// storedMethod.config.handler = targetMethod;
// storedMethod.config = { ...storedMethod.config, ...data };
// }
}
export const storage = new ClassStorage();

Sorry, the diff of this file is not supported yet

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