@unisphere/nx 4.5.3 → 4.5.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"update-git-ignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-7/update-git-ignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD9D"}
1
+ {"version":3,"file":"update-git-ignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-7/update-git-ignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwC9D"}
@@ -13,23 +13,9 @@ async function update(tree) {
13
13
  const currentContent = tree.read(gitignorePath, 'utf-8') || '';
14
14
  let updatedContent = currentContent;
15
15
  let addedItems = 0;
16
- // Check if migrations.json is already in .gitignore
17
- const migrationsJsonRegex = /^migrations\.json\s*$/gm;
18
- if (!migrationsJsonRegex.test(updatedContent)) {
19
- // Add migrations.json entry
20
- if (!updatedContent.includes('# Migration files')) {
21
- updatedContent = updatedContent.trim() + '\n\n# Migration files\n';
22
- }
23
- if (!updatedContent.includes('migrations.json')) {
24
- updatedContent += 'migrations.json\n';
25
- addedItems++;
26
- devkit_1.logger.info('📝 Added migrations.json to .gitignore');
27
- }
28
- }
29
16
  // Check if ai-migrations is already in .gitignore
30
17
  const aiMigrationsRegex = /^ai-migrations\s*$/gm;
31
18
  if (!aiMigrationsRegex.test(updatedContent)) {
32
- // Add ai-migrations entry
33
19
  if (!updatedContent.includes('# Migration files')) {
34
20
  updatedContent = updatedContent.trim() + '\n\n# Migration files\n';
35
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-env-to-application-gitignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/add-env-to-application-gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B9D"}
1
+ {"version":3,"file":"add-env-to-application-gitignore.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/add-env-to-application-gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAE1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9D"}
@@ -12,9 +12,8 @@ async function update(tree) {
12
12
  try {
13
13
  const currentContent = tree.read(gitignorePath, 'utf-8') || '';
14
14
  let updatedContent = currentContent;
15
- // Check if migrations.json is already in .gitignore
16
- const migrationsJsonRegex = /^\.env$/gm;
17
- if (!migrationsJsonRegex.test(updatedContent)) {
15
+ const envRegex = /^\.env$/gm;
16
+ if (!envRegex.test(updatedContent)) {
18
17
  updatedContent += '.env\n';
19
18
  tree.write(gitignorePath, updatedContent);
20
19
  devkit_1.logger.info(`✅ Successfully updated .gitignore (added .env entry)`);
@@ -1 +1 @@
1
- {"version":3,"file":"reorganize-applications-by-distribution-channel.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/reorganize-applications-by-distribution-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;EAQE;AAEF,OAAO,EACL,IAAI,EAQL,MAAM,YAAY,CAAC;AAyuBpB;;GAEG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAqE9D"}
1
+ {"version":3,"file":"reorganize-applications-by-distribution-channel.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/reorganize-applications-by-distribution-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;EAQE;AAEF,OAAO,EACL,IAAI,EAQL,MAAM,YAAY,CAAC;AAkvBpB;;GAEG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAqE9D"}
@@ -65,10 +65,19 @@ function discoverApplications(tree) {
65
65
  const applicationsConfig = unisphereConfig.elements?.applications || {};
66
66
  for (const [name, config] of Object.entries(applicationsConfig)) {
67
67
  const normalizedName = (0, devkit_1.names)(name).fileName;
68
- const distributionChannel = config.distributionChannel || 'none';
69
68
  // Get sourceRoot from .unisphere config, or fall back to default path
70
69
  const sourceRoot = config.sourceRoot;
71
70
  const currentPath = sourceRoot || `unisphere/applications/${normalizedName}`;
71
+ // Infer distributionChannel: use explicit property if present, otherwise
72
+ // infer from current path (handles re-runs after upgrade-schema-to-2-0-0
73
+ // has already removed distributionChannel).
74
+ let distributionChannel = config.distributionChannel || 'none';
75
+ if (!config.distributionChannel && currentPath.includes('/applications/server/')) {
76
+ distributionChannel = 'unisphere';
77
+ }
78
+ else if (!config.distributionChannel && currentPath.includes('/applications/local/')) {
79
+ distributionChannel = 'none';
80
+ }
72
81
  // Calculate target path
73
82
  const subdirectory = getSubdirectory(distributionChannel);
74
83
  const targetPath = `unisphere/applications/${subdirectory}/${normalizedName}`;
@@ -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,EAAU,MAAM,YAAY,CAAC;AAG1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ9D"}
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"}
@@ -12,6 +12,14 @@ const devkit_1 = require("@nx/devkit");
12
12
  const add_documentation_1 = require("../../generators/add-documentation/add-documentation");
13
13
  async function update(tree) {
14
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
+ }
15
23
  await (0, add_documentation_1.addDocumentationGenerator)(tree, {
16
24
  skipInstall: true,
17
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "4.5.3",
3
+ "version": "4.5.4",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",