@ngn-net/nestjs-telescope 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/telescope.module.js
CHANGED
|
@@ -48,6 +48,7 @@ let TelescopeModule = TelescopeModule_1 = class TelescopeModule {
|
|
|
48
48
|
}
|
|
49
49
|
onModuleInit() {
|
|
50
50
|
// Dynamic peer dependency validation at bootstrap
|
|
51
|
+
const warnedTypes = new Set();
|
|
51
52
|
const hasDependency = (type, packageName) => {
|
|
52
53
|
try {
|
|
53
54
|
require(packageName);
|
|
@@ -55,19 +56,17 @@ let TelescopeModule = TelescopeModule_1 = class TelescopeModule {
|
|
|
55
56
|
}
|
|
56
57
|
catch (e) {
|
|
57
58
|
if (this.options.enabledEntryTypes && this.options.enabledEntryTypes.includes(type)) {
|
|
58
|
-
|
|
59
|
+
if (!warnedTypes.has(type)) {
|
|
60
|
+
warnedTypes.add(type);
|
|
61
|
+
common_1.Logger.warn(`EntryType '${type}' was explicitly enabled in config, but the required peer dependency '${packageName}' is not installed. The '${type}' watcher has been disabled.`, 'TelescopeModule');
|
|
62
|
+
}
|
|
59
63
|
}
|
|
60
64
|
return false;
|
|
61
65
|
}
|
|
62
66
|
};
|
|
63
67
|
hasDependency(entry_type_enum_1.EntryType.CACHE, '@nestjs/cache-manager');
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (this.options.enabledEntryTypes && this.options.enabledEntryTypes.includes(entry_type_enum_1.EntryType.JOB)) {
|
|
67
|
-
if (!hasBull || !hasBullmq) {
|
|
68
|
-
throw new Error(`NestJS Telescope Error: EntryType 'JOB' was explicitly enabled in config, but the required peer dependencies '@nestjs/bullmq' and 'bullmq' are not installed.`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
68
|
+
hasDependency(entry_type_enum_1.EntryType.JOB, '@nestjs/bullmq');
|
|
69
|
+
hasDependency(entry_type_enum_1.EntryType.JOB, 'bullmq');
|
|
71
70
|
hasDependency(entry_type_enum_1.EntryType.EVENT, '@nestjs/event-emitter');
|
|
72
71
|
hasDependency(entry_type_enum_1.EntryType.SCHEDULED_TASK, '@nestjs/schedule');
|
|
73
72
|
hasDependency(entry_type_enum_1.EntryType.MAIL, 'nodemailer');
|
package/dist/ui/manifest.json
CHANGED