@solidxai/solidctl 0.1.18 → 0.1.19-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/solidctl",
3
- "version": "0.1.18",
3
+ "version": "0.1.19-beta.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -6,18 +6,10 @@ import { CommandFactory } from "nest-commander";
6
6
  import { resolve } from "path";
7
7
  import { AppModule } from "./app.module";
8
8
  import { configurePgInt8TypeParser } from "./database.utils";
9
+ import "./suppress-warnings";
9
10
 
10
11
  const logger = new Logger("Bootstrap");
11
12
 
12
- // Suppress punycode deprecation warning from dependencies
13
- process.removeAllListeners('warning');
14
- process.on('warning', (warning) => {
15
- if (warning.name === 'DeprecationWarning' && warning.message.includes('punycode')) {
16
- return; // Ignore known punycode deprecation from dependencies
17
- }
18
- console.warn(warning); // Still show other warnings
19
- });
20
-
21
13
  // ---- Global safety nets (must be first) ----
22
14
  process.on('unhandledRejection', (reason, promise) => {
23
15
  console.error('Unhandled Rejection at:', promise, 'reason:', reason);
@@ -15,6 +15,7 @@ import helmet from 'helmet';
15
15
  import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston';
16
16
  import { AppModule } from './app.module';
17
17
  import { configurePgInt8TypeParser } from './database.utils';
18
+ import './suppress-warnings';
18
19
 
19
20
  import qs from 'qs';
20
21
 
@@ -0,0 +1,14 @@
1
+ const SUPPRESSED_WARNINGS = [
2
+ 'punycode', // punycode deprecation from transitive dependencies
3
+ 'client.query()', // pg deprecation caused by TypeORM's internal query scheduling
4
+ ];
5
+
6
+ process.on('warning', (warning) => {
7
+ if (
8
+ warning.name === 'DeprecationWarning' &&
9
+ SUPPRESSED_WARNINGS.some((msg) => warning.message.includes(msg))
10
+ ) {
11
+ return;
12
+ }
13
+ console.warn(warning);
14
+ });