Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nestjs/core

Package Overview
Dependencies
Maintainers
1
Versions
447
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/core - npm Package Compare versions

Comparing version
11.1.23
to
11.1.24
+2
-0
injector/instance-wrapper.d.ts

@@ -94,2 +94,4 @@ import { Provider, Scope, Type } from '@nestjs/common';

private isNewable;
private registerDependencyTreeParent;
private resetDependencyTreeState;
private initialize;

@@ -96,0 +98,0 @@ private printIntrospectedAsRequestScoped;

@@ -15,2 +15,3 @@ "use strict";

exports.INSTANCE_ID_SYMBOL = Symbol.for('instance_metadata:id');
const dependencyTreeParents = new WeakMap();
class InstanceWrapper {

@@ -103,2 +104,4 @@ constructor(metadata = {}) {

this[exports.INSTANCE_METADATA_SYMBOL].dependencies[index] = wrapper;
this.registerDependencyTreeParent(wrapper);
this.resetDependencyTreeState();
}

@@ -116,2 +119,4 @@ getCtorMetadata() {

});
this.registerDependencyTreeParent(wrapper);
this.resetDependencyTreeState();
}

@@ -126,2 +131,4 @@ getPropertiesMetadata() {

this[exports.INSTANCE_METADATA_SYMBOL].enhancers.push(wrapper);
this.registerDependencyTreeParent(wrapper);
this.resetDependencyTreeState();
}

@@ -318,2 +325,20 @@ getEnhancersMetadata() {

}
registerDependencyTreeParent(wrapper) {
if (wrapper instanceof InstanceWrapper) {
const parents = dependencyTreeParents.get(wrapper) ?? new Set();
parents.add(this);
dependencyTreeParents.set(wrapper, parents);
}
}
resetDependencyTreeState(lookupRegistry = new Set()) {
if (lookupRegistry.has(this[exports.INSTANCE_ID_SYMBOL])) {
return;
}
lookupRegistry.add(this[exports.INSTANCE_ID_SYMBOL]);
this.isTreeStatic = undefined;
this.isTreeDurable = undefined;
dependencyTreeParents
.get(this)
?.forEach(parent => parent.resetDependencyTreeState(lookupRegistry));
}
initialize(metadata) {

@@ -320,0 +345,0 @@ const { instance, isResolved, ...wrapperPartial } = metadata;

@@ -25,2 +25,3 @@ import { CanActivate, ExceptionFilter, HttpServer, INestApplication, INestMicroservice, NestHybridApplicationOptions, NestInterceptor, PipeTransform, VersioningOptions, WebSocketAdapter } from '@nestjs/common';

private isListening;
private isWsModuleRegistered;
constructor(container: NestContainer, httpAdapter: HttpServer, config: ApplicationConfig, graphInspector: GraphInspector, appOptions?: NestApplicationOptions);

@@ -27,0 +28,0 @@ protected dispose(): Promise<void>;

@@ -38,2 +38,3 @@ "use strict";

this.isListening = false;
this.isWsModuleRegistered = false;
this.selectContextModule();

@@ -93,2 +94,3 @@ this.registerHttpServer();

this.socketModule.register(this.container, this.config, this.graphInspector, this.appOptions, this.httpServer);
this.isWsModuleRegistered = true;
}

@@ -257,2 +259,5 @@ async init() {

useWebSocketAdapter(adapter) {
if (this.isWsModuleRegistered) {
this.logger.warn('useWebSocketAdapter() was called after WebSocket gateways were already initialized. The provided adapter will be stored but will NOT be applied to existing gateways — they remain bound to the previously installed adapter. To install a custom adapter, call app.useWebSocketAdapter(...) BEFORE app.init() (or app.listen()).');
}
this.config.setIoAdapter(adapter);

@@ -259,0 +264,0 @@ return this;

+3
-3
{
"name": "@nestjs/core",
"version": "11.1.23",
"version": "11.1.24",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",

@@ -42,3 +42,3 @@ "author": "Kamil Mysliwiec",

"devDependencies": {
"@nestjs/common": "11.1.23"
"@nestjs/common": "11.1.24"
},

@@ -64,3 +64,3 @@ "peerDependencies": {

},
"gitHead": "b8be8c12270b2e6dcd275d435e573f08b4c79d79"
"gitHead": "d8a0ab829ddd8291b75109c9ac4fc4c7d070fc9e"
}