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

@nestjs/config

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/config - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

4

dist/config.service.d.ts

@@ -8,3 +8,3 @@ import { NoInferType, Path, PathValue } from './types';

*/
declare type ExcludeUndefinedIf<ExcludeUndefined extends boolean, T> = ExcludeUndefined extends true ? Exclude<T, undefined> : T | undefined;
type ExcludeUndefinedIf<ExcludeUndefined extends boolean, T> = ExcludeUndefined extends true ? Exclude<T, undefined> : T | undefined;
export interface ConfigGetOptions {

@@ -18,3 +18,3 @@ /**

}
declare type KeyOf<T> = keyof T extends never ? string : keyof T;
type KeyOf<T> = keyof T extends never ? string : keyof T;
export declare class ConfigService<K = Record<string, unknown>, WasValidated extends boolean = false> {

@@ -21,0 +21,0 @@ private readonly internalConfig;

@@ -21,7 +21,2 @@ "use strict";

let ConfigService = class ConfigService {
constructor(internalConfig = {}) {
this.internalConfig = internalConfig;
this.cache = {};
this._isCacheEnabled = false;
}
set isCacheEnabled(value) {

@@ -33,2 +28,7 @@ this._isCacheEnabled = value;

}
constructor(internalConfig = {}) {
this.internalConfig = internalConfig;
this.cache = {};
this._isCacheEnabled = false;
}
/**

@@ -46,3 +46,4 @@ * Get a configuration value (either custom configuration or process environment variable)

}
const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) && !options
const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) &&
!options
? undefined

@@ -49,0 +50,0 @@ : defaultValueOrOptions;

import { ConfigObject } from '../types';
declare type ConfigFactoryReturnValue<T extends ConfigObject> = T | Promise<T>;
export declare type ConfigFactory<T extends ConfigObject = ConfigObject> = () => ConfigFactoryReturnValue<T>;
type ConfigFactoryReturnValue<T extends ConfigObject> = T | Promise<T>;
export type ConfigFactory<T extends ConfigObject = ConfigObject> = () => ConfigFactoryReturnValue<T>;
export {};

@@ -1,1 +0,1 @@

export declare type ConfigObject = Record<string, any>;
export type ConfigObject = Record<string, any>;

@@ -1,1 +0,1 @@

export declare type ConfigType<T extends (...args: any) => any> = T extends (...args: any) => infer ReturnVal ? ReturnVal extends Promise<infer AsyncReturnVal> ? AsyncReturnVal : ReturnVal : any;
export type ConfigType<T extends (...args: any) => any> = T extends (...args: any) => infer ReturnVal ? ReturnVal extends Promise<infer AsyncReturnVal> ? AsyncReturnVal : ReturnVal : any;

@@ -1,1 +0,1 @@

export declare type NoInferType<T> = [T][T extends any ? 0 : never];
export type NoInferType<T> = [T][T extends any ? 0 : never];

@@ -5,7 +5,7 @@ /**

*/
declare type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
export declare type PathImpl<T, Key extends keyof T> = Key extends string ? IsAny<T[Key]> extends true ? never : T[Key] extends Record<string, any> ? `${Key}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
export declare type PathImpl2<T> = PathImpl<T, keyof T> | keyof T;
export declare type Path<T> = keyof T extends string ? PathImpl2<T> extends infer P ? P extends string | keyof T ? P : keyof T : keyof T : never;
export declare type PathValue<T, P extends Path<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends Path<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
type IsAny<T> = unknown extends T ? [keyof T] extends [never] ? false : true : false;
export type PathImpl<T, Key extends keyof T> = Key extends string ? IsAny<T[Key]> extends true ? never : T[Key] extends Record<string, any> ? `${Key}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
export type PathImpl2<T> = PathImpl<T, keyof T> | keyof T;
export type Path<T> = keyof T extends string ? PathImpl2<T> extends infer P ? P extends string | keyof T ? P : keyof T : keyof T : never;
export type PathValue<T, P extends Path<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends Path<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
export {};
{
"name": "@nestjs/config",
"version": "2.3.0",
"version": "2.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@config)",

@@ -29,12 +29,12 @@ "author": "Kamil Mysliwiec",

"@commitlint/config-angular": "17.4.2",
"@nestjs/common": "9.2.1",
"@nestjs/core": "9.2.1",
"@nestjs/platform-express": "9.2.1",
"@nestjs/testing": "9.2.1",
"@nestjs/common": "9.3.7",
"@nestjs/core": "9.3.7",
"@nestjs/platform-express": "9.3.7",
"@nestjs/testing": "9.3.7",
"@types/jest": "29.4.0",
"@types/lodash": "4.14.191",
"@types/node": "18.11.18",
"@types/node": "18.13.0",
"@types/uuid": "9.0.0",
"@typescript-eslint/eslint-plugin": "5.50.0",
"@typescript-eslint/parser": "5.50.0",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"eslint": "8.33.0",

@@ -44,6 +44,6 @@ "eslint-config-prettier": "8.6.0",

"husky": "8.0.3",
"jest": "29.4.1",
"jest": "29.4.2",
"joi": "17.7.0",
"lint-staged": "13.1.0",
"prettier": "2.8.3",
"lint-staged": "13.1.1",
"prettier": "2.8.4",
"reflect-metadata": "0.1.13",

@@ -54,3 +54,3 @@ "release-it": "15.6.0",

"ts-jest": "29.0.5",
"typescript": "4.7.4"
"typescript": "4.9.5"
},

@@ -57,0 +57,0 @@ "peerDependencies": {

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