network-ai 4.13.1 → 4.15.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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * postinstall: patch third-party tsconfig files that trigger TS 6.x deprecation warnings.
3
+ * Safe to run repeatedly — skips files that are already patched or missing.
4
+ */
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+
8
+ const targets = [
9
+ path.join(__dirname, '..', 'node_modules', 'openai', 'src', 'tsconfig.json'),
10
+ ];
11
+
12
+ for (const file of targets) {
13
+ if (!fs.existsSync(file)) continue;
14
+ let text = fs.readFileSync(file, 'utf8');
15
+ if (text.includes('ignoreDeprecations')) continue;
16
+ text = text.replace(
17
+ /"moduleResolution":\s*"node"/,
18
+ '"moduleResolution": "node",\n "ignoreDeprecations": "6.0"',
19
+ );
20
+ fs.writeFileSync(file, text);
21
+ }