@unisphere/nx 3.19.1 → 3.19.3

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,14 @@
1
+ /**
2
+ * Migration: Add .gitignore to documentation sites
3
+ *
4
+ * Adds .gitignore files to all documentation sites with standard ignores for:
5
+ * - Dependencies (node_modules)
6
+ * - Production builds
7
+ * - Generated files (.docusaurus, .cache-loader)
8
+ * - Environment files
9
+ * - Log files
10
+ * - Claude Code local settings
11
+ */
12
+ import { Tree } from '@nx/devkit';
13
+ export default function update(tree: Tree): Promise<void>;
14
+ //# sourceMappingURL=add-gitignore-to-documentation-sites.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-gitignore-to-documentation-sites.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-19-1/add-gitignore-to-documentation-sites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAuB,MAAM,YAAY,CAAC;AAEvD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA8E9D"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ /**
3
+ * Migration: Add .gitignore to documentation sites
4
+ *
5
+ * Adds .gitignore files to all documentation sites with standard ignores for:
6
+ * - Dependencies (node_modules)
7
+ * - Production builds
8
+ * - Generated files (.docusaurus, .cache-loader)
9
+ * - Environment files
10
+ * - Log files
11
+ * - Claude Code local settings
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.default = update;
15
+ const devkit_1 = require("@nx/devkit");
16
+ async function update(tree) {
17
+ devkit_1.logger.info('🔄 Adding .gitignore to documentation sites...');
18
+ // Content provided by user
19
+ const content = `# Dependencies
20
+ /node_modules
21
+
22
+ # Production
23
+ /build
24
+
25
+ # Generated files
26
+ .docusaurus
27
+ .cache-loader
28
+
29
+ # Misc
30
+ .DS_Store
31
+ .env.local
32
+ .env.development.local
33
+ .env.test.local
34
+ .env.production.local
35
+
36
+ npm-debug.log*
37
+ yarn-debug.log*
38
+ yarn-error.log*
39
+
40
+ .worktree
41
+
42
+ # Temporary symlink for API documentation
43
+ unisphere-core-link
44
+
45
+ # Note: API docs are now generated manually via scripts/generate-api-docs.sh
46
+ # and committed to the repository. They are NOT auto-generated during builds.
47
+
48
+ .claude/*
49
+ !.claude/skills
50
+ `;
51
+ const docsBasePath = 'unisphere/documentation';
52
+ if (!tree.exists(docsBasePath)) {
53
+ devkit_1.logger.info('â„šī¸ No documentation sites found, skipping');
54
+ return;
55
+ }
56
+ const docsSites = tree.children(docsBasePath);
57
+ if (docsSites.length === 0) {
58
+ devkit_1.logger.info('â„šī¸ No documentation sites found, skipping');
59
+ return;
60
+ }
61
+ let updatedCount = 0;
62
+ let createdCount = 0;
63
+ for (const site of docsSites) {
64
+ const sitePath = `${docsBasePath}/${site}`;
65
+ const filePath = `${sitePath}/.gitignore`;
66
+ try {
67
+ const exists = tree.exists(filePath);
68
+ tree.write(filePath, content);
69
+ if (exists) {
70
+ devkit_1.logger.info(`✅ Updated ${filePath}`);
71
+ updatedCount++;
72
+ }
73
+ else {
74
+ devkit_1.logger.info(`✅ Created ${filePath}`);
75
+ createdCount++;
76
+ }
77
+ }
78
+ catch (error) {
79
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
80
+ devkit_1.logger.warn(`âš ī¸ Failed to update ${filePath}: ${errorMessage}`);
81
+ }
82
+ }
83
+ devkit_1.logger.info(`✅ Processed ${docsSites.length} documentation site(s): ${createdCount} created, ${updatedCount} updated`);
84
+ await (0, devkit_1.formatFiles)(tree);
85
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Migration: Add Claude Code configuration to root .gitignore
3
+ *
4
+ * Adds .claude/* and !.claude/skills entries to root .gitignore to exclude
5
+ * Claude Code files while preserving skills directory.
6
+ */
7
+ import { Tree } from '@nx/devkit';
8
+ export default function update(tree: Tree): Promise<void>;
9
+ //# sourceMappingURL=add-claude-config-to-root-gitignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-claude-config-to-root-gitignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-19-3/add-claude-config-to-root-gitignore.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,CA0D9D"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * Migration: Add Claude Code configuration to root .gitignore
4
+ *
5
+ * Adds .claude/* and !.claude/skills entries to root .gitignore to exclude
6
+ * Claude Code files while preserving skills directory.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = update;
10
+ const devkit_1 = require("@nx/devkit");
11
+ async function update(tree) {
12
+ devkit_1.logger.info('🔄 Updating root .gitignore to add Claude Code configuration...');
13
+ const gitignorePath = '.gitignore';
14
+ if (!tree.exists(gitignorePath)) {
15
+ devkit_1.logger.warn('âš ī¸ .gitignore file not found, creating one');
16
+ tree.write(gitignorePath, '');
17
+ }
18
+ try {
19
+ const currentContent = tree.read(gitignorePath, 'utf-8') || '';
20
+ let updatedContent = currentContent;
21
+ let hasChanges = false;
22
+ // Check if .claude/* entry already exists
23
+ const claudeWildcardRegex = /^\.claude\/\*\s*$/gm;
24
+ if (!claudeWildcardRegex.test(updatedContent)) {
25
+ // Add section comment if needed
26
+ if (!updatedContent.includes('# Claude Code configuration')) {
27
+ updatedContent = updatedContent.trim() + '\n\n# Claude Code configuration\n';
28
+ }
29
+ // Add .claude/* entry
30
+ if (!updatedContent.includes('.claude/*')) {
31
+ updatedContent += '.claude/*\n';
32
+ devkit_1.logger.info('📝 Added .claude/* to .gitignore');
33
+ hasChanges = true;
34
+ }
35
+ }
36
+ else {
37
+ devkit_1.logger.info('â„šī¸ .claude/* already exists in .gitignore');
38
+ }
39
+ // Check if !.claude/skills entry already exists
40
+ const claudeSkillsRegex = /^!\.claude\/skills\s*$/gm;
41
+ if (!claudeSkillsRegex.test(updatedContent)) {
42
+ // Add !.claude/skills entry
43
+ if (!updatedContent.includes('!.claude/skills')) {
44
+ updatedContent += '!.claude/skills\n';
45
+ devkit_1.logger.info('📝 Added !.claude/skills to .gitignore');
46
+ hasChanges = true;
47
+ }
48
+ }
49
+ else {
50
+ devkit_1.logger.info('â„šī¸ !.claude/skills already exists in .gitignore');
51
+ }
52
+ if (hasChanges) {
53
+ tree.write(gitignorePath, updatedContent);
54
+ devkit_1.logger.info('✅ Successfully updated .gitignore');
55
+ }
56
+ else {
57
+ devkit_1.logger.info('â„šī¸ No changes needed - all entries already exist');
58
+ }
59
+ }
60
+ catch (error) {
61
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
62
+ devkit_1.logger.error(`❌ Failed to update .gitignore: ${errorMessage}`);
63
+ throw new Error(`Failed to update .gitignore: ${errorMessage}`);
64
+ }
65
+ }
package/migrations.json CHANGED
@@ -362,6 +362,14 @@
362
362
  "cli": {
363
363
  "postUpdateMessage": "✅ .gitignore files added to documentation sites"
364
364
  }
365
+ },
366
+ "3-19-3-add-claude-config-to-root-gitignore": {
367
+ "version": "3.19.3",
368
+ "description": "Adds Claude Code configuration to root .gitignore",
369
+ "factory": "./dist/migrations/3-19-3/add-claude-config-to-root-gitignore.js",
370
+ "cli": {
371
+ "postUpdateMessage": "✅ Claude Code configuration added to root .gitignore"
372
+ }
365
373
  }
366
374
  },
367
375
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "3.19.1",
3
+ "version": "3.19.3",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -91,4 +91,4 @@
91
91
  "nx-migrations": {
92
92
  "migrations": "./migrations.json"
93
93
  }
94
- }
94
+ }