@unisphere/nx 4.5.2 â 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.
- package/dist/generators/change-application-scope/change-application-scope.d.ts.map +1 -1
- package/dist/generators/change-application-scope/change-application-scope.js +1 -0
- package/dist/generators/change-package-scope/change-package-scope.d.ts.map +1 -1
- package/dist/generators/change-package-scope/change-package-scope.js +1 -0
- package/dist/generators/remove/remove.d.ts.map +1 -1
- package/dist/generators/remove/remove.js +1 -0
- package/dist/generators/rename-application/rename-application.d.ts.map +1 -1
- package/dist/generators/rename-application/rename-application.js +1 -0
- package/dist/generators/rename-package/rename-package.d.ts.map +1 -1
- package/dist/generators/rename-package/rename-package.js +1 -0
- package/dist/migrations/1-22-7/update-git-ignore.d.ts.map +1 -1
- package/dist/migrations/1-22-7/update-git-ignore.js +0 -14
- package/dist/migrations/3-0-0/add-env-to-application-gitignore.d.ts.map +1 -1
- package/dist/migrations/3-0-0/add-env-to-application-gitignore.js +2 -3
- package/dist/migrations/3-0-0/reorganize-applications-by-distribution-channel.d.ts.map +1 -1
- package/dist/migrations/3-0-0/reorganize-applications-by-distribution-channel.js +10 -1
- package/dist/migrations/3-0-0/reorganize-packages-by-distribution-channel.d.ts.map +1 -1
- package/dist/migrations/3-0-0/reorganize-packages-by-distribution-channel.js +2 -0
- package/dist/migrations/3-15-0/add-experience-documentation.d.ts.map +1 -1
- package/dist/migrations/3-15-0/add-experience-documentation.js +8 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-application-scope.d.ts","sourceRoot":"","sources":["../../../src/generators/change-application-scope/change-application-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"change-application-scope.d.ts","sourceRoot":"","sources":["../../../src/generators/change-application-scope/change-application-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAqRjE,wBAAsB,+BAA+B,CACnD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,qCAAqC,iBA6E/C;AAED,eAAe,+BAA+B,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.changeApplicationScopeGenerator = changeApplicationScopeGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
require('chalk').__esModule = true;
|
|
5
6
|
const generators_1 = require("@nx/workspace/generators");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
function validateOptions(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-package-scope.d.ts","sourceRoot":"","sources":["../../../src/generators/change-package-scope/change-package-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,IAAI,EAIL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"change-package-scope.d.ts","sourceRoot":"","sources":["../../../src/generators/change-package-scope/change-package-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,IAAI,EAIL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;AAwY7D,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,iCAAiC,iBAuI3C;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.changePackageScopeGenerator = changePackageScopeGenerator;
|
|
22
22
|
const devkit_1 = require("@nx/devkit");
|
|
23
|
+
require('chalk').__esModule = true;
|
|
23
24
|
const generators_1 = require("@nx/workspace/generators");
|
|
24
25
|
const utils_1 = require("../utils");
|
|
25
26
|
const utils_2 = require("./utils");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/generators/remove/remove.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/generators/remove/remove.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA6RjD,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,qBAAqB,iBAwF/B;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.removeGenerator = removeGenerator;
|
|
18
18
|
const devkit_1 = require("@nx/devkit");
|
|
19
|
+
require('chalk').__esModule = true;
|
|
19
20
|
const generators_1 = require("@nx/workspace/generators");
|
|
20
21
|
const utils_1 = require("../utils");
|
|
21
22
|
const remove_utils_1 = require("./remove-utils");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rename-application.d.ts","sourceRoot":"","sources":["../../../src/generators/rename-application/rename-application.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"rename-application.d.ts","sourceRoot":"","sources":["../../../src/generators/rename-application/rename-application.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAyX5D,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gCAAgC,iBA+E1C;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renameApplicationGenerator = renameApplicationGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
require('chalk').__esModule = true;
|
|
5
6
|
const generators_1 = require("@nx/workspace/generators");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
function validateOptions(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rename-package.d.ts","sourceRoot":"","sources":["../../../src/generators/rename-package/rename-package.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"rename-package.d.ts","sourceRoot":"","sources":["../../../src/generators/rename-package/rename-package.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAmexD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,iBA8GtC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.renamePackageGenerator = renamePackageGenerator;
|
|
20
20
|
const devkit_1 = require("@nx/devkit");
|
|
21
|
+
require('chalk').__esModule = true;
|
|
21
22
|
const generators_1 = require("@nx/workspace/generators");
|
|
22
23
|
const utils_1 = require("../utils");
|
|
23
24
|
function validateOptions(options) {
|
|
@@ -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,
|
|
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,
|
|
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
|
-
|
|
16
|
-
|
|
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;
|
|
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":"reorganize-packages-by-distribution-channel.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/reorganize-packages-by-distribution-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"reorganize-packages-by-distribution-channel.d.ts","sourceRoot":"","sources":["../../../src/migrations/3-0-0/reorganize-packages-by-distribution-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAkuBpB;;GAEG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAyH9D"}
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.default = update;
|
|
21
21
|
const devkit_1 = require("@nx/devkit");
|
|
22
|
+
// Workaround: chalk + tslib >=2.8 incompatibility causes @nx/workspace barrel to crash
|
|
23
|
+
require('chalk').__esModule = true;
|
|
22
24
|
const generators_1 = require("@nx/workspace/generators");
|
|
23
25
|
const fs_1 = require("fs");
|
|
24
26
|
const path_1 = require("path");
|
|
@@ -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,
|
|
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
|
});
|