How to use the @nestjs/core/injector.ModulesContainer function in @nestjs/core

To help you get started, weโ€™ve selected a few @nestjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adrien2p / nestjs-dialogflow / lib / module / dialog-flow.module.js View on Github external
}
    onModuleInit() {
        const scanner = new core_2.Scanner(this.moduleRef, this.modulesContainer, this.handlerContainer);
        scanner.scanAndRegisterHandlers();
    }
    configure(consumer) {
        return consumer.apply(dialog_flow_authorization_middleware_1.DialogFlowAuthorizationMiddleware).forRoutes(dialog_flow_controller_1.DialogFlowController);
    }
};
DialogFlowModule = DialogFlowModule_1 = __decorate([
    common_1.Module({
        providers: [dialog_flow_component_1.DialogFlowComponent, core_2.HandlerContainer],
        controllers: [dialog_flow_controller_1.DialogFlowController],
    }),
    __metadata("design:paramtypes", [core_1.ModuleRef,
        injector_1.ModulesContainer,
        core_2.HandlerContainer])
], DialogFlowModule);
exports.DialogFlowModule = DialogFlowModule;
github notadd / next / packages / workflow / services / workflow-explorer.service.js View on Github external
identification: Reflect.getMetadata(this.identification, metatype),
        };
        if (isWorkflow && workflowMeta.identification) {
            workflowMeta.target = instance;
            return [
                workflowMeta,
            ];
        }
        else {
            return [];
        }
    }
};
WorkflowExplorerService = __decorate([
    common_1.Injectable(),
    __metadata("design:paramtypes", [injector_1.ModulesContainer,
        metadata_scanner_1.MetadataScanner,
        setting_service_1.SettingService])
], WorkflowExplorerService);
exports.WorkflowExplorerService = WorkflowExplorerService;

//# sourceMappingURL=workflow-explorer.service.js.map
github notadd / next / packages / injection / services / page-explorer.service.js View on Github external
if (instance.schema.name) {
                    pageMetadata.schema = instance.schema;
                }
            });
            return [
                pageMetadata,
            ];
        }
        else {
            return [];
        }
    }
};
PageExplorerService = __decorate([
    common_1.Injectable(),
    __metadata("design:paramtypes", [injector_1.ModulesContainer,
        metadata_scanner_1.MetadataScanner])
], PageExplorerService);
exports.PageExplorerService = PageExplorerService;

//# sourceMappingURL=page-explorer.service.js.map
github notadd / next / packages / injection / services / dashboard-explorer.service.js View on Github external
return components
            .filter(dashboard => dashboard.name && dashboard.methodName)
            .map(dashboard => {
            const callback = instance[dashboard.methodName].bind(instance);
            return Object.assign({ callback }, dashboard);
        });
    }
    flatMap(components, callback) {
        return lodash_1.flattenDeep(components.map(component => {
            return [...component.values()].map(({ instance }) => callback(instance));
        }));
    }
};
DashboardExplorerService = __decorate([
    common_1.Injectable(),
    __metadata("design:paramtypes", [injector_1.ModulesContainer,
        metadata_scanner_1.MetadataScanner])
], DashboardExplorerService);
exports.DashboardExplorerService = DashboardExplorerService;

//# sourceMappingURL=dashboard-explorer.service.js.map
github adrien2p / nestjs-dialogflow / lib / module / dialog-flow.provider.js View on Github external
components.map(component => {
                const reflectedMetadata = metadataScanner
                    .scanFromPrototype(null, component.prototype, method => {
                    const intentOrAction = Reflect.getMetadata(constant_1.DIALOG_FLOW_INTENT, Reflect.getOwnPropertyDescriptor(component.prototype, method).value) ||
                        Reflect.getMetadata(constant_1.DIALOG_FLOW_ACTION, Reflect.getOwnPropertyDescriptor(component.prototype, method).value);
                    return intentOrAction ? { handler: component.prototype[method], intentOrAction } : null;
                })
                    .filter(v => v);
                [...reflectedMetadata].forEach(metadata => {
                    handlers.set(metadata.intentOrAction, metadata.handler);
                });
            });
        });
        return handlers;
    },
    inject: [injector_1.ModulesContainer],
};
github notadd / next / packages / internationalization / services / internationalization-explorer.service.js View on Github external
return components
            .filter(dashboard => {
            return dashboard.name && dashboard.methodName;
        })
            .map(dashboard => {
            const callback = instance[dashboard.methodName].bind(instance);
            return Object.assign({ callback }, dashboard);
        });
    }
    flatMap(components, callback) {
        return lodash_1.flattenDeep(components.map(component => [...component.values()].map(({ instance }) => callback(instance))));
    }
};
InternationalizationExplorerService = __decorate([
    common_1.Injectable(),
    __metadata("design:paramtypes", [injector_1.ModulesContainer,
        metadata_scanner_1.MetadataScanner])
], InternationalizationExplorerService);
exports.InternationalizationExplorerService = InternationalizationExplorerService;

//# sourceMappingURL=internationalization-explorer.service.js.map