@unisphere/nx 4.15.7 → 5.0.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.
Files changed (93) hide show
  1. package/dist/generators/utils.d.ts +2 -2
  2. package/dist/generators/utils.d.ts.map +1 -1
  3. package/dist/generators/utils.js +1 -1
  4. package/dist/migrations/3-15-0/add-experience-documentation.d.ts +3 -4
  5. package/dist/migrations/3-15-0/add-experience-documentation.d.ts.map +1 -1
  6. package/dist/migrations/3-15-0/add-experience-documentation.js +4 -18
  7. package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts +3 -6
  8. package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts.map +1 -1
  9. package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.js +4 -166
  10. package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts +4 -0
  11. package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts.map +1 -1
  12. package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.js +70 -0
  13. package/dist/migrations/4-15-8/templates/_publish-artifacts.template +361 -0
  14. package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts +8 -0
  15. package/dist/migrations/4-15-8/update-publish-artifacts-workflow.d.ts.map +1 -0
  16. package/dist/migrations/4-15-8/update-publish-artifacts-workflow.js +40 -0
  17. package/dist/migrations/4-15-9/templates/_publish-artifacts.template +361 -0
  18. package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts +10 -0
  19. package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts.map +1 -0
  20. package/dist/migrations/4-15-9/update-publish-artifacts-workflow.js +42 -0
  21. package/dist/migrations/5-0-0/remove-documentation.d.ts +9 -0
  22. package/dist/migrations/5-0-0/remove-documentation.d.ts.map +1 -0
  23. package/dist/migrations/5-0-0/remove-documentation.js +45 -0
  24. package/generators.json +0 -5
  25. package/migrations.json +25 -0
  26. package/package.json +1 -1
  27. package/dist/generators/add-documentation/USAGE.md +0 -64
  28. package/dist/generators/add-documentation/add-documentation.d.ts +0 -5
  29. package/dist/generators/add-documentation/add-documentation.d.ts.map +0 -1
  30. package/dist/generators/add-documentation/add-documentation.js +0 -145
  31. package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts +0 -23
  32. package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts.map +0 -1
  33. package/dist/generators/add-documentation/discover-typedoc-plugins.js +0 -128
  34. package/dist/generators/add-documentation/schema.d.ts +0 -4
  35. package/dist/generators/add-documentation/schema.json +0 -20
  36. package/dist/generators/add-documentation/templates/babel.config.js +0 -3
  37. package/dist/generators/add-documentation/templates/docs/changelog/overview.md +0 -9
  38. package/dist/generators/add-documentation/templates/docs/documentations/overview.md +0 -9
  39. package/dist/generators/add-documentation/templates/docs/reference/overview.md +0 -9
  40. package/dist/generators/add-documentation/templates/docusaurus.config.ts.template +0 -134
  41. package/dist/generators/add-documentation/templates/package.json.template +0 -59
  42. package/dist/generators/add-documentation/templates/plugins/discover-typedoc-plugins.mjs +0 -156
  43. package/dist/generators/add-documentation/templates/plugins/typedoc-plugins.ts.template +0 -7
  44. package/dist/generators/add-documentation/templates/postcss.config.js +0 -6
  45. package/dist/generators/add-documentation/templates/sidebars.ts +0 -9
  46. package/dist/generators/add-documentation/templates/src/components/demo-placeholder-card.tsx +0 -33
  47. package/dist/generators/add-documentation/templates/src/components/guides/experiences/genie/integrate-genie-guide.tsx +0 -149
  48. package/dist/generators/add-documentation/templates/src/components/guides/experiences/notifications/notifications-react-guide.tsx +0 -211
  49. package/dist/generators/add-documentation/templates/src/components/homepage-features/index.tsx +0 -141
  50. package/dist/generators/add-documentation/templates/src/components/homepage-features/styles.module.css +0 -87
  51. package/dist/generators/add-documentation/templates/src/components/homepage-modules/index.tsx +0 -76
  52. package/dist/generators/add-documentation/templates/src/components/homepage-modules/styles.module.css +0 -120
  53. package/dist/generators/add-documentation/templates/src/components/homepage-start-now/index.tsx +0 -22
  54. package/dist/generators/add-documentation/templates/src/components/homepage-start-now/styles.module.css +0 -38
  55. package/dist/generators/add-documentation/templates/src/components/interactive-code-panel.tsx +0 -258
  56. package/dist/generators/add-documentation/templates/src/components/introductions/developer-toolbox-experience.tsx +0 -84
  57. package/dist/generators/add-documentation/templates/src/components/introductions/hello-world-experience.tsx +0 -133
  58. package/dist/generators/add-documentation/templates/src/components/introductions/notificaitons-experience.tsx +0 -635
  59. package/dist/generators/add-documentation/templates/src/components/introductions/reactions-experience.tsx +0 -117
  60. package/dist/generators/add-documentation/templates/src/components/ui-shared/introduction-card.tsx +0 -117
  61. package/dist/generators/add-documentation/templates/src/components/ui-shared/playground-card.tsx +0 -67
  62. package/dist/generators/add-documentation/templates/src/components/ui-shared/use-color-mode.ts +0 -20
  63. package/dist/generators/add-documentation/templates/src/components/ui-shared/utils.ts +0 -8
  64. package/dist/generators/add-documentation/templates/src/css/custom.css +0 -710
  65. package/dist/generators/add-documentation/templates/src/css/hero.module.css +0 -190
  66. package/dist/generators/add-documentation/templates/src/pages/index.module.css +0 -59
  67. package/dist/generators/add-documentation/templates/src/pages/index.tsx.template +0 -79
  68. package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/index.tsx +0 -103
  69. package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/styles.module.css +0 -9
  70. package/dist/generators/add-documentation/templates/src/theme/Navbar/MobileSidebar/Header/index.tsx +0 -45
  71. package/dist/generators/add-documentation/templates/static/.nojekyll +0 -0
  72. package/dist/generators/add-documentation/templates/static/homepage/divider.svg +0 -5
  73. package/dist/generators/add-documentation/templates/static/homepage/icons/Architecture.svg +0 -4
  74. package/dist/generators/add-documentation/templates/static/homepage/icons/Cost.svg +0 -4
  75. package/dist/generators/add-documentation/templates/static/homepage/icons/ExternalLink.svg +0 -3
  76. package/dist/generators/add-documentation/templates/static/homepage/icons/Infra.svg +0 -8
  77. package/dist/generators/add-documentation/templates/static/homepage/icons/Redundancies.svg +0 -6
  78. package/dist/generators/add-documentation/templates/static/homepage/icons/Speed.svg +0 -6
  79. package/dist/generators/add-documentation/templates/static/homepage/icons/Standards.svg +0 -4
  80. package/dist/generators/add-documentation/templates/static/homepage/icons/Unified.svg +0 -12
  81. package/dist/generators/add-documentation/templates/static/homepage/services/custo.jpg +0 -0
  82. package/dist/generators/add-documentation/templates/static/homepage/services/flame.jpg +0 -0
  83. package/dist/generators/add-documentation/templates/static/homepage/services/keepr.jpg +0 -0
  84. package/dist/generators/add-documentation/templates/static/homepage/services/loggi.jpg +0 -0
  85. package/dist/generators/add-documentation/templates/static/homepage/services/palleto.jpg +0 -0
  86. package/dist/generators/add-documentation/templates/static/homepage/services/publi.jpg +0 -0
  87. package/dist/generators/add-documentation/templates/static/homepage/services/tinker.jpg +0 -0
  88. package/dist/generators/add-documentation/templates/static/img/favicon.ico +0 -0
  89. package/dist/generators/add-documentation/templates/static/img/logo.svg +0 -6
  90. package/dist/generators/add-documentation/templates/static/img/logo_dark.svg +0 -6
  91. package/dist/generators/add-documentation/templates/static/robots.txt +0 -5
  92. package/dist/generators/add-documentation/templates/tailwind.config.js +0 -30
  93. package/dist/generators/add-documentation/templates/tsconfig.json +0 -7
@@ -9,8 +9,8 @@ export interface UnisphereConfig {
9
9
  }
10
10
  export declare function validateUnisphereConfig(tree: Tree): UnisphereConfig;
11
11
  export declare function updateTsConfigPaths(tree: Tree, pathKey: string, pathValue: string): void;
12
- export declare function validateElementNameUnique(tree: Tree, elementName: string, targetType: 'packages' | 'runtimes' | 'applications' | 'documentation'): void;
13
- export declare function updateUnisphereConfig(tree: Tree, elementType: 'packages' | 'runtimes' | 'applications' | 'documentation', elementName: string, elementConfig: Record<string, any>): void;
12
+ export declare function validateElementNameUnique(tree: Tree, elementName: string, targetType: 'packages' | 'runtimes' | 'applications'): void;
13
+ export declare function updateUnisphereConfig(tree: Tree, elementType: 'packages' | 'runtimes' | 'applications', elementName: string, elementConfig: Record<string, any>): void;
14
14
  export declare function validateRuntimeExists(tree: Tree, runtimeName: string): string;
15
15
  export declare function findCorePackageAlias(tree: Tree): string;
16
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/generators/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AA+FD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAkEnE;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QA2BjF;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,eAAe,GACrE,IAAI,CAmBN;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,eAAe,EACvE,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA0BnC;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA4C7E;AA6BD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA6BvD;AAwBD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAuB/D;AAED,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,0G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B,aAAa,EAAE,MAAM,GACpB,IAAI,CAyBN;AAED,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAShF;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,GACvB,IAAI,CAcN"}
@@ -180,7 +180,7 @@ function validateElementNameUnique(tree, elementName, targetType) {
180
180
  }
181
181
  const config = (0, devkit_1.readJson)(tree, '.unisphere');
182
182
  const elements = config.elements || {};
183
- const allTypes = ['packages', 'runtimes', 'applications', 'documentation'];
183
+ const allTypes = ['packages', 'runtimes', 'applications'];
184
184
  for (const type of allTypes) {
185
185
  if (elements[type] && elements[type][elementName]) {
186
186
  if (type === targetType) {
@@ -1,9 +1,8 @@
1
1
  /**
2
- * Migration: Add experience-level documentation
2
+ * Migration: Add experience-level documentation (DEPRECATED)
3
3
  *
4
- * Creates a Docusaurus documentation site for the experience,
5
- * using the experience name from .unisphere config.
6
- * Skips npm install since the user will run it separately.
4
+ * Documentation support was removed in 5.0.0.
5
+ * This migration is now a no-op for projects that haven't run it yet.
7
6
  */
8
7
  import { Tree } from '@nx/devkit';
9
8
  export default function update(tree: Tree): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"add-experience-documentation.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-15-0/add-experience-documentation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAoB,MAAM,YAAY,CAAC;AAGpD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB9D"}
1
+ {"version":3,"file":"add-experience-documentation.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-15-0/add-experience-documentation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D"}
@@ -1,27 +1,13 @@
1
1
  "use strict";
2
2
  /**
3
- * Migration: Add experience-level documentation
3
+ * Migration: Add experience-level documentation (DEPRECATED)
4
4
  *
5
- * Creates a Docusaurus documentation site for the experience,
6
- * using the experience name from .unisphere config.
7
- * Skips npm install since the user will run it separately.
5
+ * Documentation support was removed in 5.0.0.
6
+ * This migration is now a no-op for projects that haven't run it yet.
8
7
  */
9
8
  Object.defineProperty(exports, "__esModule", { value: true });
10
9
  exports.default = update;
11
10
  const devkit_1 = require("@nx/devkit");
12
- const add_documentation_1 = require("../../generators/add-documentation/add-documentation");
13
11
  async function update(tree) {
14
- devkit_1.logger.info('📖 Creating experience-level documentation site...');
15
- if (tree.exists('.unisphere')) {
16
- const config = (0, devkit_1.readJson)(tree, '.unisphere');
17
- const existingSites = config.elements?.documentation;
18
- if (existingSites && Object.keys(existingSites).length > 0) {
19
- devkit_1.logger.info('ℹ️ Documentation site already exists, skipping.');
20
- return;
21
- }
22
- }
23
- await (0, add_documentation_1.addDocumentationGenerator)(tree, {
24
- skipInstall: true,
25
- });
26
- devkit_1.logger.info('✅ Documentation site created successfully.');
12
+ devkit_1.logger.info('ℹ️ Skipping add-experience-documentation: documentation support has been removed');
27
13
  }
@@ -1,11 +1,8 @@
1
1
  /**
2
- * Migration: Add TypeDoc plugin auto-discovery to documentation sites
2
+ * Migration: Add TypeDoc plugin auto-discovery to documentation sites (DEPRECATED)
3
3
  *
4
- * For each documentation site under unisphere/documentation/:
5
- * - Creates plugins/discover-typedoc-plugins.mjs (re-discovery script)
6
- * - Creates plugins/typedoc-plugins.ts (auto-discovered plugin config)
7
- * - Updates docusaurus.config.ts to import from ./plugins/typedoc-plugins
8
- * - Adds "discover-plugins" script to the site's package.json
4
+ * Documentation support was removed in 5.0.0.
5
+ * This migration is now a no-op for projects that haven't run it yet.
9
6
  */
10
7
  import { Tree } from '@nx/devkit';
11
8
  export default function update(tree: Tree): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"update-documentation-typedoc-plugins.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-23-0/update-documentation-typedoc-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAA4C,MAAM,YAAY,CAAC;AA6D5E,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA8I9D"}
1
+ {"version":3,"file":"update-documentation-typedoc-plugins.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-23-0/update-documentation-typedoc-plugins.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D"}
@@ -1,175 +1,13 @@
1
1
  "use strict";
2
2
  /**
3
- * Migration: Add TypeDoc plugin auto-discovery to documentation sites
3
+ * Migration: Add TypeDoc plugin auto-discovery to documentation sites (DEPRECATED)
4
4
  *
5
- * For each documentation site under unisphere/documentation/:
6
- * - Creates plugins/discover-typedoc-plugins.mjs (re-discovery script)
7
- * - Creates plugins/typedoc-plugins.ts (auto-discovered plugin config)
8
- * - Updates docusaurus.config.ts to import from ./plugins/typedoc-plugins
9
- * - Adds "discover-plugins" script to the site's package.json
5
+ * Documentation support was removed in 5.0.0.
6
+ * This migration is now a no-op for projects that haven't run it yet.
10
7
  */
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
12
9
  exports.default = update;
13
10
  const devkit_1 = require("@nx/devkit");
14
- const fs_1 = require("fs");
15
- const path_1 = require("path");
16
- const discover_typedoc_plugins_1 = require("../../generators/add-documentation/discover-typedoc-plugins");
17
- const TYPEDOC_IMPORT = "import typedocPlugins from './plugins/typedoc-plugins';";
18
- /**
19
- * Inserts the typedocPlugins import after the last import statement.
20
- */
21
- function addTypedocImport(content) {
22
- if (content.includes(TYPEDOC_IMPORT))
23
- return content;
24
- const lines = content.split('\n');
25
- let lastImportIndex = -1;
26
- for (let i = 0; i < lines.length; i++) {
27
- if (lines[i].startsWith('import '))
28
- lastImportIndex = i;
29
- }
30
- if (lastImportIndex === -1)
31
- return content;
32
- lines.splice(lastImportIndex + 1, 0, TYPEDOC_IMPORT);
33
- return lines.join('\n');
34
- }
35
- /**
36
- * Replaces the plugins: [...] array (possibly multi-line) with plugins: typedocPlugins,
37
- * Uses bracket counting to handle nested arrays safely.
38
- */
39
- function replacePluginsSection(content) {
40
- const pluginsMatch = content.match(/(\n[ \t]*plugins:\s*)\[/);
41
- if (!pluginsMatch || pluginsMatch.index === undefined)
42
- return content;
43
- const bracketStart = pluginsMatch.index + pluginsMatch[0].length - 1;
44
- // Count brackets to find closing ]
45
- let depth = 0;
46
- let i = bracketStart;
47
- while (i < content.length) {
48
- if (content[i] === '[')
49
- depth++;
50
- else if (content[i] === ']') {
51
- depth--;
52
- if (depth === 0)
53
- break;
54
- }
55
- i++;
56
- }
57
- // i is at closing ], consume optional comma and rest of line
58
- const lineEnd = content.indexOf('\n', i);
59
- const fullSection = content.substring(pluginsMatch.index + 1, // skip leading \n
60
- lineEnd + 1);
61
- const indent = pluginsMatch[1].replace('\n', '');
62
- return content.replace(fullSection, `${indent}typedocPlugins,\n`);
63
- }
64
11
  async function update(tree) {
65
- devkit_1.logger.info('🔄 Adding TypeDoc plugin auto-discovery to documentation sites...');
66
- // Read discover script from generator templates
67
- const discoverScriptContent = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../generators/add-documentation/templates/plugins/discover-typedoc-plugins.mjs'), 'utf-8');
68
- const docsBasePath = 'unisphere/documentation';
69
- if (!tree.exists(docsBasePath)) {
70
- devkit_1.logger.info('ℹ️ No documentation sites found, skipping');
71
- return;
72
- }
73
- const docsSites = tree.children(docsBasePath);
74
- if (docsSites.length === 0) {
75
- devkit_1.logger.info('ℹ️ No documentation sites found, skipping');
76
- return;
77
- }
78
- let createdCount = 0;
79
- let updatedCount = 0;
80
- let skippedCount = 0;
81
- for (const site of docsSites) {
82
- const sitePath = `${docsBasePath}/${site}`;
83
- try {
84
- // 1. Create plugins/discover-typedoc-plugins.mjs (idempotent)
85
- const discoverScriptPath = `${sitePath}/plugins/discover-typedoc-plugins.mjs`;
86
- const existingDiscoverScript = tree.exists(discoverScriptPath)
87
- ? tree.read(discoverScriptPath, 'utf-8') || ''
88
- : null;
89
- if (existingDiscoverScript?.trim() === discoverScriptContent.trim()) {
90
- devkit_1.logger.info(`ℹ️ ${discoverScriptPath} already up to date`);
91
- }
92
- else {
93
- tree.write(discoverScriptPath, discoverScriptContent);
94
- devkit_1.logger.info(`✅ ${existingDiscoverScript === null ? 'Created' : 'Updated'} ${discoverScriptPath}`);
95
- }
96
- // 2. Create plugins/typedoc-plugins.ts with auto-discovered content (idempotent)
97
- const typedocPluginsPath = `${sitePath}/plugins/typedoc-plugins.ts`;
98
- const discovered = (0, discover_typedoc_plugins_1.discoverTypedocPlugins)(tree, sitePath);
99
- const pluginsCode = (0, discover_typedoc_plugins_1.buildTypedocPluginsCode)(discovered);
100
- const typedocPluginsContent = `// Auto-generated by plugins/discover-typedoc-plugins.mjs\n` +
101
- `// Run "npm run discover-plugins" to regenerate\n` +
102
- `\n` +
103
- `// eslint-disable-next-line @typescript-eslint/no-explicit-any\n` +
104
- `const typedocPlugins: any[] = ${pluginsCode};\n` +
105
- `\n` +
106
- `export default typedocPlugins;\n`;
107
- const existingTypedocPlugins = tree.exists(typedocPluginsPath)
108
- ? tree.read(typedocPluginsPath, 'utf-8') || ''
109
- : null;
110
- if (existingTypedocPlugins?.trim() === typedocPluginsContent.trim()) {
111
- devkit_1.logger.info(`ℹ️ ${typedocPluginsPath} already up to date`);
112
- }
113
- else {
114
- tree.write(typedocPluginsPath, typedocPluginsContent);
115
- devkit_1.logger.info(`✅ ${existingTypedocPlugins === null ? 'Created' : 'Updated'} ${typedocPluginsPath} (${discovered.length} package(s) discovered)`);
116
- }
117
- // 3. Update docusaurus.config.ts
118
- const configPath = `${sitePath}/docusaurus.config.ts`;
119
- if (tree.exists(configPath)) {
120
- let configContent = tree.read(configPath, 'utf-8') || '';
121
- if (configContent.includes(TYPEDOC_IMPORT)) {
122
- devkit_1.logger.info(`ℹ️ ${configPath} already migrated, skipping`);
123
- skippedCount++;
124
- }
125
- else {
126
- configContent = addTypedocImport(configContent);
127
- configContent = replacePluginsSection(configContent);
128
- tree.write(configPath, configContent);
129
- devkit_1.logger.info(`✅ Updated ${configPath}`);
130
- updatedCount++;
131
- }
132
- }
133
- else {
134
- devkit_1.logger.warn(`⚠️ ${configPath} not found, skipping config update`);
135
- }
136
- // 4. Update package.json: add discover-plugins script, typedoc-plugin-markdown, webpack override
137
- const pkgPath = `${sitePath}/package.json`;
138
- if (tree.exists(pkgPath)) {
139
- const pkg = (0, devkit_1.readJson)(tree, pkgPath);
140
- let pkgChanged = false;
141
- if (!pkg.scripts?.['discover-plugins']) {
142
- pkg.scripts = pkg.scripts || {};
143
- pkg.scripts['discover-plugins'] = 'node plugins/discover-typedoc-plugins.mjs';
144
- pkgChanged = true;
145
- devkit_1.logger.info(`✅ Added discover-plugins script to ${pkgPath}`);
146
- }
147
- else {
148
- devkit_1.logger.info(`ℹ️ discover-plugins script already exists in ${pkgPath}`);
149
- }
150
- if (!pkg.devDependencies?.['typedoc-plugin-markdown']) {
151
- pkg.devDependencies = pkg.devDependencies || {};
152
- pkg.devDependencies['typedoc-plugin-markdown'] = '^4.8.0';
153
- pkgChanged = true;
154
- devkit_1.logger.info(`✅ Added typedoc-plugin-markdown to ${pkgPath}`);
155
- }
156
- if (!pkg.overrides?.['webpack']) {
157
- pkg.overrides = pkg.overrides || {};
158
- pkg.overrides['webpack'] = '5.105.4';
159
- pkgChanged = true;
160
- devkit_1.logger.info(`✅ Added webpack override to ${pkgPath}`);
161
- }
162
- if (pkgChanged) {
163
- (0, devkit_1.writeJson)(tree, pkgPath, pkg);
164
- }
165
- }
166
- createdCount++;
167
- }
168
- catch (error) {
169
- const msg = error instanceof Error ? error.message : 'Unknown error';
170
- devkit_1.logger.warn(`⚠️ Failed to update ${sitePath}: ${msg}`);
171
- }
172
- }
173
- devkit_1.logger.info(`✅ Processed ${docsSites.length} documentation site(s): ${createdCount} processed, ${skippedCount} skipped`);
174
- await (0, devkit_1.formatFiles)(tree);
12
+ devkit_1.logger.info('ℹ️ Skipping update-documentation-typedoc-plugins: documentation support has been removed');
175
13
  }
@@ -7,6 +7,10 @@
7
7
  *
8
8
  * This also resolves the critical `decompress` vulnerability from production
9
9
  * audit reports (decompress is a transitive dependency of @unisphere/cli).
10
+ *
11
+ * Additionally, this migration aligns direct dependency versions with their
12
+ * corresponding npm overrides (and yarn resolutions) to prevent EOVERRIDE
13
+ * errors when npm install runs after the package.json modification.
10
14
  */
11
15
  import { Tree } from '@nx/devkit';
12
16
  export default function update(tree: Tree): Promise<void>;
@@ -1 +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"}
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;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAwEtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA+C9D"}
@@ -8,11 +8,72 @@
8
8
  *
9
9
  * This also resolves the critical `decompress` vulnerability from production
10
10
  * audit reports (decompress is a transitive dependency of @unisphere/cli).
11
+ *
12
+ * Additionally, this migration aligns direct dependency versions with their
13
+ * corresponding npm overrides (and yarn resolutions) to prevent EOVERRIDE
14
+ * errors when npm install runs after the package.json modification.
11
15
  */
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  exports.default = update;
14
18
  const devkit_1 = require("@nx/devkit");
15
19
  const TARGET_PACKAGE = '@unisphere/cli';
20
+ /**
21
+ * Aligns direct dependency versions with their npm overrides/resolutions.
22
+ *
23
+ * When --create-commits is used, Nx runs `npm install --ignore-scripts` after
24
+ * modifying package.json. npm validates that all overrides are consistent with
25
+ * direct dependencies - if a package appears in both `dependencies` (or
26
+ * `devDependencies`) and `overrides` with different versions, npm throws
27
+ * EOVERRIDE. This pre-existing inconsistency is only surfaced when npm install
28
+ * re-validates the full dependency tree.
29
+ *
30
+ * This function updates direct dependency versions to match their override,
31
+ * since overrides are intentionally set (typically for security reasons).
32
+ */
33
+ function alignOverridesWithDependencies(packageJson) {
34
+ const aligned = [];
35
+ const overrides = packageJson.overrides || {};
36
+ for (const [pkg, overrideVersion] of Object.entries(overrides)) {
37
+ // Skip non-string overrides (nested override objects)
38
+ if (typeof overrideVersion !== 'string') {
39
+ continue;
40
+ }
41
+ // Skip overrides that use the $ reference syntax (already aligned)
42
+ if (overrideVersion.startsWith('$')) {
43
+ continue;
44
+ }
45
+ // Check dependencies
46
+ if (packageJson.dependencies?.[pkg] && packageJson.dependencies[pkg] !== overrideVersion) {
47
+ packageJson.dependencies[pkg] = overrideVersion;
48
+ aligned.push(`${pkg}@${overrideVersion} (dependencies)`);
49
+ }
50
+ // Check devDependencies
51
+ if (packageJson.devDependencies?.[pkg] && packageJson.devDependencies[pkg] !== overrideVersion) {
52
+ packageJson.devDependencies[pkg] = overrideVersion;
53
+ aligned.push(`${pkg}@${overrideVersion} (devDependencies)`);
54
+ }
55
+ }
56
+ // Also handle yarn resolutions (same concept, different field name)
57
+ const resolutions = packageJson.resolutions || {};
58
+ for (const [pkg, resolutionVersion] of Object.entries(resolutions)) {
59
+ if (typeof resolutionVersion !== 'string') {
60
+ continue;
61
+ }
62
+ // Resolutions can have patterns like "**/@pkg" - extract package name
63
+ const pkgName = pkg.includes('/') && pkg.startsWith('*')
64
+ ? pkg.replace(/^\*\*\//, '')
65
+ : pkg;
66
+ if (packageJson.dependencies?.[pkgName] && packageJson.dependencies[pkgName] !== resolutionVersion) {
67
+ packageJson.dependencies[pkgName] = resolutionVersion;
68
+ aligned.push(`${pkgName}@${resolutionVersion} (dependencies, via resolutions)`);
69
+ }
70
+ if (packageJson.devDependencies?.[pkgName] && packageJson.devDependencies[pkgName] !== resolutionVersion) {
71
+ packageJson.devDependencies[pkgName] = resolutionVersion;
72
+ aligned.push(`${pkgName}@${resolutionVersion} (devDependencies, via resolutions)`);
73
+ }
74
+ }
75
+ return aligned;
76
+ }
16
77
  async function update(tree) {
17
78
  devkit_1.logger.info('🔄 Moving @unisphere/cli to devDependencies...');
18
79
  const packageJsonPath = 'package.json';
@@ -22,6 +83,15 @@ async function update(tree) {
22
83
  }
23
84
  let moved = false;
24
85
  (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
86
+ // First, align overrides with direct dependencies to prevent EOVERRIDE
87
+ // errors when npm install runs after this modification
88
+ const aligned = alignOverridesWithDependencies(packageJson);
89
+ if (aligned.length > 0) {
90
+ devkit_1.logger.info(`🔧 Aligned override conflicts to prevent EOVERRIDE:`);
91
+ for (const entry of aligned) {
92
+ devkit_1.logger.info(` - ${entry}`);
93
+ }
94
+ }
25
95
  // If it's in dependencies, move it to devDependencies
26
96
  if (packageJson.dependencies?.[TARGET_PACKAGE]) {
27
97
  const version = packageJson.dependencies[TARGET_PACKAGE];