Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@homeofthings/nestjs-utils

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homeofthings/nestjs-utils - npm Package Compare versions

Comparing version 1.0.6 to 2.0.0

LICENSE

3

CHANGELOG.md
# CHANGELOG for @homeofthings/nestjs-utils
| Release | Notes |
| ------- | ------------------------------------------------------------------------------------------------------------ |
|---------|--------------------------------------------------------------------------------------------------------------|
| 2.0.0 | nestjs 10x |
| 1.0.4-6 | maintenance release |
| 1.0.3 | feature: dynamic root module: multiple dynamic module support by using multiple register/registerAsync calls |
| 1.0.2 | first version |
{
"name": "@homeofthings/nestjs-utils",
"description": "HomeOfThings - NestJs Utils: various utilities and common types",
"version": "1.0.6",
"version": "2.0.0",
"keywords": [

@@ -23,10 +23,11 @@ "nestjs",

"homepage": "https://github.com/gms1/HomeOfThings",
"dependencies": {
"@nestjs/common": "*",
"rxjs": "*",
"mkdirp": "*",
"type-fest": "*",
"tslib": "*"
},
"main": "./src/index.js",
"typings": "./src/index.d.ts",
"dependencies": {},
"peerDependencies": {
"@nestjs/common": "^8.4.7",
"rxjs": "~7.5.5",
"tslib": "^2.4.0"
}
}
"type": "commonjs"
}
[![npm version](https://badge.fury.io/js/%40homeofthings%2Fnestjs-utils.svg)](https://badge.fury.io/js/%40homeofthings%2Fnestjs-utils)
[![Build Workflow](https://github.com/gms1/HomeOfThings/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/gms1/HomeOfThings/actions/workflows/build.yml)
[![Coverage Status](https://codecov.io/gh/gms1/HomeOfThings/branch/master/graph/badge.svg?flag=nestjs-utils)](https://codecov.io/gh/gms1/HomeOfThings)
[![Coverage Status](https://codecov.io/gh/gms1/HomeOfThings/branch/master/graph/badge.svg?flag=nestjs-utils)](https://app.codecov.io/gh/gms1/HomeOfThings/tree/master/packages%2Fnode%2F%40homeofthings%2Fnestjs-utils)
[![DeepScan grade](https://deepscan.io/api/teams/439/projects/987/branches/1954/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=439&pid=987&bid=1954)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![License](https://img.shields.io/npm/l/@homeofthings/nestjs-utils.svg?style=flat-square)](https://github.com/gms1/HomeOfThings/blob/master/LICENSE)
[![License](https://img.shields.io/npm/l/@homeofthings/nestjs-utils.svg?style=flat-square)](https://github.com/gms1/HomeOfThings/blob/master/packages/node/@homeofthings/nestjs-utils/LICENSE)

@@ -9,0 +9,0 @@ # HomeOfThings - common utilities for NestJs

@@ -10,6 +10,4 @@ "use strict";

class AsyncContext {
constructor(defaultValue) {
this._storage = new async_hooks_1.AsyncLocalStorage();
this._default = defaultValue;
}
_storage = new async_hooks_1.AsyncLocalStorage();
_default;
get defaultValue() {

@@ -21,2 +19,5 @@ return this._default;

}
constructor(defaultValue) {
this._default = defaultValue;
}
set(value) {

@@ -23,0 +24,0 @@ this._storage.enterWith(value);

@@ -7,3 +7,3 @@ import { DynamicModule, Type } from '@nestjs/common';

}
export declare type DynamicRootBaseModuleExtended<T, Os, Oa extends AsyncModuleBasicOptions = AsyncModuleOptions<Os>> = Constructor<DynamicRootBaseModule> & {
export type DynamicRootBaseModuleExtended<T, Os, Oa extends AsyncModuleBasicOptions = AsyncModuleOptions<Os>> = Constructor<DynamicRootBaseModule> & {
isRegistered: boolean;

@@ -10,0 +10,0 @@ forRoot(moduleCtor: Type<T>, moduleOptions: Os): DynamicModule;

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

class DynamicRootModule extends DynamicRootBaseModule {
static dynamicModule$ = new rxjs_1.ReplaySubject(1);
static _isRegistered;
static get isRegistered() {

@@ -85,3 +87,2 @@ return DynamicRootModule._isRegistered;

}
DynamicRootModule.dynamicModule$ = new rxjs_1.ReplaySubject(1);
return DynamicRootModule;

@@ -88,0 +89,0 @@ }

@@ -11,26 +11,24 @@ "use strict";

const writeFile = util.promisify(fs.writeFile);
function writeFileIfChanged(outputPath, content) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
let oldContent;
try {
oldContent = yield readFile(outputPath, { encoding: 'utf8' });
}
catch (err) {
oldContent = undefined;
}
if (oldContent === content) {
return false;
}
const dirname = path.dirname(outputPath);
try {
mkdirp.sync(dirname);
yield writeFile(outputPath, content, { encoding: 'utf8' });
}
catch (err) {
return Promise.reject(err);
}
return true;
});
async function writeFileIfChanged(outputPath, content) {
let oldContent;
try {
oldContent = await readFile(outputPath, { encoding: 'utf8' });
}
catch (err) {
oldContent = undefined;
}
if (oldContent === content) {
return false;
}
const dirname = path.dirname(outputPath);
try {
mkdirp.sync(dirname);
await writeFile(outputPath, content, { encoding: 'utf8' });
}
catch (err) {
return Promise.reject(err);
}
return true;
}
exports.writeFileIfChanged = writeFileIfChanged;
//# sourceMappingURL=write-file-if-changed.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LruCache = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-function */
class LruCache {
constructor(_maxEntries = 20) {
this._maxEntries = _maxEntries;
this._map = new Map();
}
_maxEntries;
_map = new Map();
get maxEntries() {

@@ -20,4 +19,7 @@ return this._maxEntries;

}
constructor(_maxEntries = 20) {
this._maxEntries = _maxEntries;
}
get(key) {
let item;
let item = undefined;
if (this._map.has(key)) {

@@ -24,0 +26,0 @@ // mark item as least recently used

export { Type } from '@nestjs/common';
export type { Constructor, JsonValue, Primitive } from 'type-fest';
export declare type GenericDictionary<T> = Record<string, T>;
export declare type Dictionary = GenericDictionary<string>;
export declare type AnyObject = GenericDictionary<unknown>;
export type GenericDictionary<T> = Record<string, T>;
export type Dictionary = GenericDictionary<string>;
export type AnyObject = GenericDictionary<unknown>;
import { AnyObject, Constructor } from './common-types';
export declare type MixinTarget<T extends AnyObject> = Constructor<{
export type MixinTarget<T extends AnyObject> = Constructor<{
[P in keyof T]: T[P];
}>;
import { ModuleMetadata, Type } from '@nestjs/common';
export declare type InjectionToken = string | symbol | Type<any>;
export type InjectionToken = string | symbol | Type<any>;
export interface AsyncModuleBasicOptions extends Pick<ModuleMetadata, 'imports' | 'exports' | 'providers'> {

@@ -4,0 +4,0 @@ useFactory: (...args: any[]) => Promise<any> | any;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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