@ngn-net/nestjs-telescope 0.3.3 → 0.3.5

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.
@@ -55,19 +55,12 @@ let TelescopeModule = TelescopeModule_1 = class TelescopeModule {
55
55
  Reflect.defineMetadata('path', path, telescope_controller_1.TelescopeController);
56
56
  }
57
57
  onModuleInit() {
58
- const warnedTypes = new Set();
59
58
  const hasDependency = (type, packageName) => {
60
59
  try {
61
60
  require(packageName);
62
61
  return true;
63
62
  }
64
63
  catch (e) {
65
- if (this.options.enabledEntryTypes && this.options.enabledEntryTypes.includes(type)) {
66
- if (!warnedTypes.has(type)) {
67
- warnedTypes.add(type);
68
- 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');
69
- }
70
- }
71
64
  return false;
72
65
  }
73
66
  };
@@ -502,6 +502,7 @@
502
502
  .badge-model { background-color: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
503
503
  .badge-notification { background-color: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
504
504
  .badge-dump { background-color: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
505
+ .badge-rabbitmq { background-color: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
505
506
 
506
507
  .badge-get { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
507
508
  .badge-post { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
@@ -869,6 +870,7 @@
869
870
  { id: 'command', label: 'Commands', icon: '💻' },
870
871
  { id: 'model', label: 'Models', icon: '📦' },
871
872
  { id: 'notification', label: 'Notifications', icon: '🔔' },
873
+ { id: 'rabbitmq', label: 'RabbitMQ', icon: '🐰' },
872
874
  { id: 'dump', label: 'Dumps', icon: '🗑️' },
873
875
  ];
874
876
 
@@ -1419,6 +1421,7 @@
1419
1421
  item.type === 'http_client' ? (`${item.content.method || 'GET'} ${item.content.url}`) :
1420
1422
  item.type === 'cache' ? (`Cache ${item.content.action?.toUpperCase()}: ${item.content.key}`) :
1421
1423
  item.type === 'redis' ? (`Redis: ${item.content.command}`) :
1424
+ item.type === 'rabbitmq' ? (`${item.content.direction === 'outgoing' ? '→' : '←'} ${item.content.exchange} → ${item.content.routingKey}`) :
1422
1425
  JSON.stringify(item.content)}
1423
1426
  </span>
1424
1427
  {item.type === 'query' && item.content.duration !== undefined && (
@@ -1452,7 +1455,7 @@
1452
1455
 
1453
1456
  // Determine font family for subtitle
1454
1457
  function varMono(type) {
1455
- return (type === 'query' || type === 'redis' || type === 'request' || type === 'http_client' || type === 'command') ? 'var(--font-mono)' : 'var(--font-sans)';
1458
+ return (type === 'query' || type === 'redis' || type === 'request' || type === 'http_client' || type === 'command' || type === 'rabbitmq') ? 'var(--font-mono)' : 'var(--font-sans)';
1456
1459
  }
1457
1460
 
1458
1461
  // Helper functions for displaying table items
@@ -1591,6 +1594,19 @@
1591
1594
  subtitle: typeof content.message === 'string' ? content.message : JSON.stringify(content.message),
1592
1595
  status: <span className="badge badge-status-ok">dumped</span>
1593
1596
  };
1597
+ case 'rabbitmq':
1598
+ const dir = content.direction || 'unknown';
1599
+ const dirIcon = dir === 'outgoing' ? '→' : '←';
1600
+ const dirColor = dir === 'outgoing' ? 'var(--accent-blue)' : 'var(--accent-green)';
1601
+ return {
1602
+ title: `${dirIcon} ${content.exchange || ''}`,
1603
+ subtitle: `${content.routingKey || ''} (${content.handler || content.queue || ''})`,
1604
+ status: content.status === 'failed' ? (
1605
+ <span className="badge badge-status-err">failed</span>
1606
+ ) : (
1607
+ <span className="badge badge-rabbitmq" style={{ color: dirColor }}>{dir}</span>
1608
+ )
1609
+ };
1594
1610
  default:
1595
1611
  return {
1596
1612
  title: 'Telescope Entry',
@@ -1974,6 +1990,65 @@
1974
1990
  </div>
1975
1991
  </React.Fragment>
1976
1992
  );
1993
+ case 'rabbitmq':
1994
+ return (
1995
+ <React.Fragment>
1996
+ <div className="key-val-row">
1997
+ <div className="key-val-label">Direction</div>
1998
+ <div className="key-val-value" style={{ fontWeight: '600', color: '#fff', textTransform: 'uppercase' }}>{content.direction}</div>
1999
+ </div>
2000
+ <div className="key-val-row">
2001
+ <div className="key-val-label">Exchange</div>
2002
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)', color: '#818cf8' }}>{content.exchange}</div>
2003
+ </div>
2004
+ <div className="key-val-row">
2005
+ <div className="key-val-label">Routing Key</div>
2006
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.routingKey}</div>
2007
+ </div>
2008
+ {content.queue && (
2009
+ <div className="key-val-row">
2010
+ <div className="key-val-label">Queue</div>
2011
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.queue}</div>
2012
+ </div>
2013
+ )}
2014
+ {content.handler && (
2015
+ <div className="key-val-row">
2016
+ <div className="key-val-label">Handler</div>
2017
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.handler}</div>
2018
+ </div>
2019
+ )}
2020
+ {content.duration !== undefined && (
2021
+ <div className="key-val-row">
2022
+ <div className="key-val-label">Duration</div>
2023
+ <div className="key-val-value">{content.duration} ms</div>
2024
+ </div>
2025
+ )}
2026
+ {content.status && (
2027
+ <div className="key-val-row">
2028
+ <div className="key-val-label">Status</div>
2029
+ <div className="key-val-value">
2030
+ {content.status === 'failed' ? (
2031
+ <span className="badge badge-status-err">failed</span>
2032
+ ) : (
2033
+ <span className="badge badge-status-ok">{content.status}</span>
2034
+ )}
2035
+ </div>
2036
+ </div>
2037
+ )}
2038
+ {content.error && (
2039
+ <div className="key-val-row">
2040
+ <div className="key-val-label">Error</div>
2041
+ <div className="key-val-value" style={{ color: 'var(--accent-red)' }}>{content.error}</div>
2042
+ </div>
2043
+ )}
2044
+ {content.message && (
2045
+ <div className="key-val-row" style={{ flexDirection: 'column', display: 'flex', gap: '8px' }}>
2046
+ <div className="key-val-label">Message Payload</div>
2047
+ <pre className="json-code">{JSON.stringify(content.message, null, 2)}</pre>
2048
+ </div>
2049
+ )}
2050
+ </React.Fragment>
2051
+ );
1977
2052
  default:
1978
2053
  return (
1979
2054
  <div className="key-val-row">
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ngn-net/nestjs-telescope",
3
- "version": "0.3.3",
4
- "builtAt": "2026-06-13T10:32:49.119Z"
3
+ "version": "0.3.5",
4
+ "builtAt": "2026-06-13T10:45:28.758Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngn-net/nestjs-telescope",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/ui/index.html CHANGED
@@ -502,6 +502,7 @@
502
502
  .badge-model { background-color: rgba(16, 185, 129, 0.12); color: var(--accent-green); }
503
503
  .badge-notification { background-color: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
504
504
  .badge-dump { background-color: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
505
+ .badge-rabbitmq { background-color: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
505
506
 
506
507
  .badge-get { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
507
508
  .badge-post { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
@@ -869,6 +870,7 @@
869
870
  { id: 'command', label: 'Commands', icon: '💻' },
870
871
  { id: 'model', label: 'Models', icon: '📦' },
871
872
  { id: 'notification', label: 'Notifications', icon: '🔔' },
873
+ { id: 'rabbitmq', label: 'RabbitMQ', icon: '🐰' },
872
874
  { id: 'dump', label: 'Dumps', icon: '🗑️' },
873
875
  ];
874
876
 
@@ -1419,6 +1421,7 @@
1419
1421
  item.type === 'http_client' ? (`${item.content.method || 'GET'} ${item.content.url}`) :
1420
1422
  item.type === 'cache' ? (`Cache ${item.content.action?.toUpperCase()}: ${item.content.key}`) :
1421
1423
  item.type === 'redis' ? (`Redis: ${item.content.command}`) :
1424
+ item.type === 'rabbitmq' ? (`${item.content.direction === 'outgoing' ? '→' : '←'} ${item.content.exchange} → ${item.content.routingKey}`) :
1422
1425
  JSON.stringify(item.content)}
1423
1426
  </span>
1424
1427
  {item.type === 'query' && item.content.duration !== undefined && (
@@ -1452,7 +1455,7 @@
1452
1455
 
1453
1456
  // Determine font family for subtitle
1454
1457
  function varMono(type) {
1455
- return (type === 'query' || type === 'redis' || type === 'request' || type === 'http_client' || type === 'command') ? 'var(--font-mono)' : 'var(--font-sans)';
1458
+ return (type === 'query' || type === 'redis' || type === 'request' || type === 'http_client' || type === 'command' || type === 'rabbitmq') ? 'var(--font-mono)' : 'var(--font-sans)';
1456
1459
  }
1457
1460
 
1458
1461
  // Helper functions for displaying table items
@@ -1591,6 +1594,19 @@
1591
1594
  subtitle: typeof content.message === 'string' ? content.message : JSON.stringify(content.message),
1592
1595
  status: <span className="badge badge-status-ok">dumped</span>
1593
1596
  };
1597
+ case 'rabbitmq':
1598
+ const dir = content.direction || 'unknown';
1599
+ const dirIcon = dir === 'outgoing' ? '→' : '←';
1600
+ const dirColor = dir === 'outgoing' ? 'var(--accent-blue)' : 'var(--accent-green)';
1601
+ return {
1602
+ title: `${dirIcon} ${content.exchange || ''}`,
1603
+ subtitle: `${content.routingKey || ''} (${content.handler || content.queue || ''})`,
1604
+ status: content.status === 'failed' ? (
1605
+ <span className="badge badge-status-err">failed</span>
1606
+ ) : (
1607
+ <span className="badge badge-rabbitmq" style={{ color: dirColor }}>{dir}</span>
1608
+ )
1609
+ };
1594
1610
  default:
1595
1611
  return {
1596
1612
  title: 'Telescope Entry',
@@ -1974,6 +1990,65 @@
1974
1990
  </div>
1975
1991
  </React.Fragment>
1976
1992
  );
1993
+ case 'rabbitmq':
1994
+ return (
1995
+ <React.Fragment>
1996
+ <div className="key-val-row">
1997
+ <div className="key-val-label">Direction</div>
1998
+ <div className="key-val-value" style={{ fontWeight: '600', color: '#fff', textTransform: 'uppercase' }}>{content.direction}</div>
1999
+ </div>
2000
+ <div className="key-val-row">
2001
+ <div className="key-val-label">Exchange</div>
2002
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)', color: '#818cf8' }}>{content.exchange}</div>
2003
+ </div>
2004
+ <div className="key-val-row">
2005
+ <div className="key-val-label">Routing Key</div>
2006
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.routingKey}</div>
2007
+ </div>
2008
+ {content.queue && (
2009
+ <div className="key-val-row">
2010
+ <div className="key-val-label">Queue</div>
2011
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.queue}</div>
2012
+ </div>
2013
+ )}
2014
+ {content.handler && (
2015
+ <div className="key-val-row">
2016
+ <div className="key-val-label">Handler</div>
2017
+ <div className="key-val-value" style={{ fontFamily: 'var(--font-mono)' }}>{content.handler}</div>
2018
+ </div>
2019
+ )}
2020
+ {content.duration !== undefined && (
2021
+ <div className="key-val-row">
2022
+ <div className="key-val-label">Duration</div>
2023
+ <div className="key-val-value">{content.duration} ms</div>
2024
+ </div>
2025
+ )}
2026
+ {content.status && (
2027
+ <div className="key-val-row">
2028
+ <div className="key-val-label">Status</div>
2029
+ <div className="key-val-value">
2030
+ {content.status === 'failed' ? (
2031
+ <span className="badge badge-status-err">failed</span>
2032
+ ) : (
2033
+ <span className="badge badge-status-ok">{content.status}</span>
2034
+ )}
2035
+ </div>
2036
+ </div>
2037
+ )}
2038
+ {content.error && (
2039
+ <div className="key-val-row">
2040
+ <div className="key-val-label">Error</div>
2041
+ <div className="key-val-value" style={{ color: 'var(--accent-red)' }}>{content.error}</div>
2042
+ </div>
2043
+ )}
2044
+ {content.message && (
2045
+ <div className="key-val-row" style={{ flexDirection: 'column', display: 'flex', gap: '8px' }}>
2046
+ <div className="key-val-label">Message Payload</div>
2047
+ <pre className="json-code">{JSON.stringify(content.message, null, 2)}</pre>
2048
+ </div>
2049
+ )}
2050
+ </React.Fragment>
2051
+ );
1977
2052
  default:
1978
2053
  return (
1979
2054
  <div className="key-val-row">