@unisphere/nx 4.15.1 → 4.15.2

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,11 @@
1
+ /**
2
+ * Migration: Add critical security overrides
3
+ *
4
+ * Adds npm overrides for critical transitive dependency vulnerabilities:
5
+ * - websocket-driver (critical): Resource limit bypass via message compression +
6
+ * message corruption via abuse of protocol length headers
7
+ * Chain: @nx/webpack → webpack-dev-server → sockjs → websocket-driver
8
+ */
9
+ import { Tree } from '@nx/devkit';
10
+ export default function update(tree: Tree): Promise<void>;
11
+ //# sourceMappingURL=add-critical-security-overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-critical-security-overrides.d.ts","sourceRoot":"","sources":["../../../src/migrations/4-15-2/add-critical-security-overrides.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAMtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C9D"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * Migration: Add critical security overrides
4
+ *
5
+ * Adds npm overrides for critical transitive dependency vulnerabilities:
6
+ * - websocket-driver (critical): Resource limit bypass via message compression +
7
+ * message corruption via abuse of protocol length headers
8
+ * Chain: @nx/webpack → webpack-dev-server → sockjs → websocket-driver
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.default = update;
12
+ const devkit_1 = require("@nx/devkit");
13
+ const SECURITY_OVERRIDES = {
14
+ 'websocket-driver': '>=0.7.5',
15
+ };
16
+ async function update(tree) {
17
+ devkit_1.logger.info('🔄 Adding security overrides for critical vulnerabilities...');
18
+ const packageJsonPath = 'package.json';
19
+ if (!tree.exists(packageJsonPath)) {
20
+ devkit_1.logger.warn('⚠️ No package.json found, skipping');
21
+ return;
22
+ }
23
+ const added = [];
24
+ const updated = [];
25
+ (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
26
+ if (!packageJson.overrides) {
27
+ packageJson.overrides = {};
28
+ }
29
+ for (const [pkg, version] of Object.entries(SECURITY_OVERRIDES)) {
30
+ if (packageJson.overrides[pkg]) {
31
+ if (packageJson.overrides[pkg] !== version) {
32
+ packageJson.overrides[pkg] = version;
33
+ updated.push(`${pkg}@${version}`);
34
+ }
35
+ }
36
+ else {
37
+ packageJson.overrides[pkg] = version;
38
+ added.push(`${pkg}@${version}`);
39
+ }
40
+ }
41
+ return packageJson;
42
+ });
43
+ if (added.length > 0) {
44
+ devkit_1.logger.info(`📦 Added overrides: ${added.join(', ')}`);
45
+ }
46
+ if (updated.length > 0) {
47
+ devkit_1.logger.info(`📦 Updated overrides: ${updated.join(', ')}`);
48
+ }
49
+ if (added.length === 0 && updated.length === 0) {
50
+ devkit_1.logger.info('ℹ️ All security overrides already present');
51
+ }
52
+ devkit_1.logger.info('✅ Critical security overrides applied');
53
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Migration: Move @unisphere/cli to devDependencies
3
+ *
4
+ * @unisphere/cli is a build/development tool and should not be in production
5
+ * dependencies. This migration moves it from dependencies to devDependencies,
6
+ * preserving the existing version.
7
+ *
8
+ * This also resolves the critical `decompress` vulnerability from production
9
+ * audit reports (decompress is a transitive dependency of @unisphere/cli).
10
+ */
11
+ import { Tree } from '@nx/devkit';
12
+ export default function update(tree: Tree): Promise<void>;
13
+ //# sourceMappingURL=move-cli-to-dev-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-cli-to-dev-dependencies.d.ts","sourceRoot":"","sources":["../../../src/migrations/4-15-2/move-cli-to-dev-dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAItD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC9D"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * Migration: Move @unisphere/cli to devDependencies
4
+ *
5
+ * @unisphere/cli is a build/development tool and should not be in production
6
+ * dependencies. This migration moves it from dependencies to devDependencies,
7
+ * preserving the existing version.
8
+ *
9
+ * This also resolves the critical `decompress` vulnerability from production
10
+ * audit reports (decompress is a transitive dependency of @unisphere/cli).
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.default = update;
14
+ const devkit_1 = require("@nx/devkit");
15
+ const TARGET_PACKAGE = '@unisphere/cli';
16
+ async function update(tree) {
17
+ devkit_1.logger.info('🔄 Moving @unisphere/cli to devDependencies...');
18
+ const packageJsonPath = 'package.json';
19
+ if (!tree.exists(packageJsonPath)) {
20
+ devkit_1.logger.warn('⚠️ No package.json found, skipping');
21
+ return;
22
+ }
23
+ let moved = false;
24
+ (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
25
+ // If it's in dependencies, move it to devDependencies
26
+ if (packageJson.dependencies?.[TARGET_PACKAGE]) {
27
+ const version = packageJson.dependencies[TARGET_PACKAGE];
28
+ // Ensure devDependencies exists
29
+ if (!packageJson.devDependencies) {
30
+ packageJson.devDependencies = {};
31
+ }
32
+ // Move to devDependencies (preserve version)
33
+ packageJson.devDependencies[TARGET_PACKAGE] = version;
34
+ delete packageJson.dependencies[TARGET_PACKAGE];
35
+ moved = true;
36
+ devkit_1.logger.info(`📦 Moved ${TARGET_PACKAGE}@${version} from dependencies to devDependencies`);
37
+ }
38
+ return packageJson;
39
+ });
40
+ if (!moved) {
41
+ devkit_1.logger.info(`ℹ️ ${TARGET_PACKAGE} is not in dependencies (already in devDependencies or not present)`);
42
+ }
43
+ devkit_1.logger.info('✅ @unisphere/cli placement verified');
44
+ }
package/migrations.json CHANGED
@@ -578,6 +578,22 @@
578
578
  "cli": {
579
579
  "postUpdateMessage": "✅ GitHub Actions upgraded to Node 24-compatible versions"
580
580
  }
581
+ },
582
+ "4.15.2-add-critical-security-overrides": {
583
+ "version": "4.15.2",
584
+ "description": "Adds npm override for websocket-driver critical vulnerability (resource limit bypass + message corruption)",
585
+ "factory": "./dist/migrations/4-15-2/add-critical-security-overrides.js",
586
+ "cli": {
587
+ "postUpdateMessage": "✅ Critical security overrides applied (websocket-driver)"
588
+ }
589
+ },
590
+ "4.15.2-move-cli-to-dev-dependencies": {
591
+ "version": "4.15.2",
592
+ "description": "Moves @unisphere/cli from dependencies to devDependencies (build tool, not production dependency)",
593
+ "factory": "./dist/migrations/4-15-2/move-cli-to-dev-dependencies.js",
594
+ "cli": {
595
+ "postUpdateMessage": "✅ @unisphere/cli moved to devDependencies"
596
+ }
581
597
  }
582
598
  },
583
599
  "packageJsonUpdates": {
@@ -1091,6 +1107,17 @@
1091
1107
  "alwaysAddToPackageJson": false
1092
1108
  }
1093
1109
  }
1110
+ },
1111
+ "4.15.2": {
1112
+ "version": "4.15.2",
1113
+ "cli": "nx",
1114
+ "postUpdateMessage": "🎉 Migration to @unisphere/nx 4.15.2 completed successfully!",
1115
+ "packages": {
1116
+ "@unisphere/cli": {
1117
+ "version": "6.0.3",
1118
+ "alwaysAddToPackageJson": false
1119
+ }
1120
+ }
1094
1121
  }
1095
1122
  }
1096
1123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "4.15.1",
3
+ "version": "4.15.2",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",