apn-app-manager 1.13.0 → 1.13.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.
package/README.md
CHANGED
|
@@ -47,11 +47,11 @@ Used to duplicate all objects of an application, which replaces the namespace of
|
|
|
47
47
|
- For example, an application with objects such as `SMP APP Artifacts` and `SMP_APP_displayUser` would have a namespace of `SMP_APP`
|
|
48
48
|
- Note that this tool can only clone objects of one namepsace at a time with regular options.
|
|
49
49
|
- Advanced options:
|
|
50
|
-
1. Select your application or package zip.
|
|
51
|
-
1. If cloning a package, select the zip file(s) that
|
|
50
|
+
1. Select your application or package zip you wish to clone.
|
|
51
|
+
1. If cloning a package which is part of an application which is already cloned in the target environment, select the zip file(s) that your package from the first step contains references to, to ensure all references to objects not in the package are remapped. Use the same namespace configuration you did on the application(s) which were already cloned.
|
|
52
52
|
1. Select your import customization properties file, if you have one.
|
|
53
53
|
1. The tool will search through all object files and attempt to find every unique namespace, allowing you to specify cloning logic for each namepsace.
|
|
54
|
-
1.
|
|
54
|
+
1. Select whether you want database table names (within CDTs and records) to be renamed or not during cloning.
|
|
55
55
|
1. Access your cloned application in the generated `/out/` folder.
|
|
56
56
|
|
|
57
57
|
#### Notes
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ function main(callback) {
|
|
|
37
37
|
fileSelect.selectSingleFile("Select application or package zip", ["zip"], false, function (appZipPath) {
|
|
38
38
|
outZipPath = deriveOutPath(appZipPath);
|
|
39
39
|
fileSelect.selectMultipleFiles(
|
|
40
|
-
"Select
|
|
40
|
+
"Select application(s) and package(s) that are referenced by the zip you specified to clone",
|
|
41
41
|
["zip"],
|
|
42
42
|
[appZipPath],
|
|
43
43
|
function (allAppZipPaths) {
|
|
@@ -28,9 +28,6 @@ module.exports = {
|
|
|
28
28
|
updateDatatypeUuids(objectMaps);
|
|
29
29
|
},
|
|
30
30
|
|
|
31
|
-
// Returns the count of all objects in the objectMap
|
|
32
|
-
retrieveObjectMapCount: retrieveObjectMapCount,
|
|
33
|
-
|
|
34
31
|
// Sorts the namespaces by their relative lengths
|
|
35
32
|
sortNamespaces: function (namespaceCollector) {
|
|
36
33
|
return lodash.flatten([
|
|
@@ -48,10 +48,15 @@ module.exports = {
|
|
|
48
48
|
function modifyObjectFiles(appDir, objectMaps, usageType, additionalReplacementMaps) {
|
|
49
49
|
// Convert the extracted names & uuids to a flat replacement array
|
|
50
50
|
let replacementMaps = buildReplacementMaps(objectMaps, usageType, additionalReplacementMaps);
|
|
51
|
+
// Determine how many files to change
|
|
52
|
+
let totalCount = 0;
|
|
53
|
+
util.handleDirFiles(appDir, ["xml", "xsd", "properties"], 3, 2, function (obPath) {
|
|
54
|
+
totalCount++;
|
|
55
|
+
});
|
|
51
56
|
// Replace all object files with the new names & uuids
|
|
52
57
|
let fileCount = {
|
|
53
58
|
count: 0,
|
|
54
|
-
total:
|
|
59
|
+
total: totalCount,
|
|
55
60
|
nextProgress: progressToShow[0],
|
|
56
61
|
};
|
|
57
62
|
util.handleDirFiles(appDir, ["xml", "xsd", "properties"], 3, 2, function (obPath) {
|
|
@@ -125,7 +130,7 @@ function modifyObjectFile(replacementMaps, fileCount, obPath, trackProgress) {
|
|
|
125
130
|
if (trackProgress) {
|
|
126
131
|
fileCount.count = fileCount.count + 1;
|
|
127
132
|
if (fileCount.count / fileCount.total > fileCount.nextProgress) {
|
|
128
|
-
util.print(`${fileCount.nextProgress * 100}% complete`, true);
|
|
133
|
+
util.print(`${fileCount.nextProgress * 100}% complete (${fileCount.count} of ${fileCount.total} files updated)`, true);
|
|
129
134
|
fileCount.nextProgress = progressToShow[progressToShow.indexOf(fileCount.nextProgress) + 1];
|
|
130
135
|
}
|
|
131
136
|
}
|