apn-app-manager 1.1.0 → 1.2.0-beta.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.
Files changed (61) hide show
  1. package/README.md +2 -0
  2. package/package.json +1 -1
  3. package/src/actions/cloneAction.js +83 -47
  4. package/src/cons.js +3 -2
  5. package/src/handlers/objectExtractHandler.js +42 -10
  6. package/src/handlers/objectMapsUpdateHandler.js +85 -21
  7. package/src/handlers/objectModifyHandler.js +23 -9
  8. package/src/objectProps.js +8 -7
  9. package/src/util.js +12 -29
  10. package/APPS.properties +0 -45
  11. package/APPS.zip +0 -0
  12. package/AS GSS Full Application.zip +0 -0
  13. package/AS IO Full Application.zip +0 -0
  14. package/AS MSG Messaging.zip +0 -0
  15. package/CT APP Clone Tester.zip +0 -0
  16. package/NEW - CT APP Clone Tester.zip +0 -0
  17. package/lib/aim/import-manager_template.properties +0 -50
  18. package/lib/aim/lib/log4j.properties +0 -17
  19. package/lib/aim/metrics.properties +0 -10
  20. package/out/NEW Clone Tester.zip +0 -0
  21. package/out/namespaces.json +0 -8
  22. package/out/not-cloned-uuids.json +0 -6
  23. package/out/objects.json +0 -1090
  24. package/out/temp/META-INF/MANIFEST.MF +0 -4
  25. package/out/temp/META-INF/export.log +0 -925
  26. package/out/temp/META-INF/plugins.txt +0 -4
  27. package/out/temp/application/_a-0000e88d-6440-8000-9bf2-011c48011c48_855378-new.xml +0 -373
  28. package/out/temp/connectedSystem/_a-0000e88d-6440-8000-9bf2-011c48011c48_864509-new.xml +0 -63
  29. package/out/temp/content/1d6e665c-14b4-4bb9-88fb-ae64e1eddbf3-new.xml +0 -75
  30. package/out/temp/content/6b262b50-0d7a-4dc9-a31b-473fd11f347a-new.xml +0 -100
  31. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_855525-new.xml +0 -181
  32. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863563-new/file.png +0 -0
  33. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863563-new.xml +0 -51
  34. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863564-new.xml +0 -57
  35. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863573-new.xml +0 -50
  36. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863584-new.xml +0 -57
  37. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863603-new/file.properties +0 -1
  38. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863603-new.xml +0 -51
  39. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863609-new.xml +0 -57
  40. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_863616-new.xml +0 -55
  41. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_864578-new.xml +0 -162
  42. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_874621-new.xml +0 -55
  43. package/out/temp/content/_a-0000e88d-6440-8000-9bf2-011c48011c48_879069.xml +0 -51
  44. package/out/temp/content/b639666e-eb53-4a1a-b963-c2a21ca400f7-new.xml +0 -89
  45. package/out/temp/content/c1448a43-e704-42c3-8588-2180b74a138a-new.xml +0 -255
  46. package/out/temp/content/fcb9b72f-10dd-4744-8870-a44a7fcb4aeb-new.xml +0 -77
  47. package/out/temp/dataStore/_a-0000e88d-6440-8000-9bf2-011c48011c48_855385-new.xml +0 -57
  48. package/out/temp/datatype/%7Burn%3Acom%3Aappian%3Atypes%3ANEW%7DNEW_TEST_TABLE.xsd +0 -48
  49. package/out/temp/datatype/%7Burn%3Acom%3Aappian%3Atypes%3ANEW%7DNEW_TEST_TABLE_REFERENCE.xsd +0 -31
  50. package/out/temp/group/_e-0000e88d-6440-8000-9b3f-01075c01075c_805-new.xml +0 -29
  51. package/out/temp/group/_e-0000e88d-6440-8000-9b3f-01075c01075c_807-new.xml +0 -29
  52. package/out/temp/groupType/_f-0000e88d-6440-8000-9b3f-01075c01075c_1-new.xml +0 -13
  53. package/out/temp/processModel/0002e8ba-9f2b-8000-1196-7f0000014e7a-new.xml +0 -1964
  54. package/out/temp/processModelFolder/_g-0000e88d-6441-8000-10c5-7f0000014e7a_197-new.xml +0 -46
  55. package/out/temp/recordType/00262392-ae09-4941-8b80-d46df28c734f-new.xml +0 -325
  56. package/out/temp/recordType/0c9e7b5a-c28d-496b-a7c1-8ad7227e513a-new.xml +0 -155
  57. package/out/temp/recordType/cbbc5029-b0c1-43a2-9430-24fa704c512c-new.xml +0 -223
  58. package/out/temp/site/15c1e536-fd29-4412-879d-219b02bd1c59-new.xml +0 -47
  59. package/out/temp/tempoReport/eb755f20-5148-4f8f-92cc-fd69980d6082-new.xml +0 -27
  60. package/out/temp/webApi/3a013f66-bd81-414a-a72e-bbd03c8befe9-new.xml +0 -62
  61. package/resources/force_update_.properties +0 -1
package/src/util.js CHANGED
@@ -13,6 +13,7 @@ const xpathpkg = require("xpath");
13
13
  const colorlog = require("node-color-log");
14
14
  const xmldom = require("@xmldom/xmldom").DOMParser;
15
15
  const cons = require("./cons");
16
+ const { matches } = require("lodash");
16
17
 
17
18
  // Exports
18
19
  module.exports = {
@@ -39,32 +40,6 @@ module.exports = {
39
40
  isFunction(callback) ? callback(params) : {};
40
41
  },
41
42
 
42
- // Creates the regex replacement for a namespace
43
- buildNamespaceReplacementRegex: function (curNamespace, newNamespace, regexTags) {
44
- // See regex examples here:
45
- // 1 prefix -> 1 prefix: regexr.com/6t509
46
- // 1 prefix -> 2 prefix: regexr.com/6t50f
47
- // 1 prefix -> 3 prefix: regexr.com/6t50i
48
- // 2 prefix -> 1 prefix: regexr.com/6t50u
49
- // 2 prefix -> 2 prefix: regexr.com/6t511
50
- // 2 prefix -> 3 prefix: regexr.com/6t514
51
- // 3 prefix -> 1 prefix: regexr.com/6t51d
52
- // 3 prefix -> 2 prefix: regexr.com/6t51j
53
- // 3 prefix -> 3 prefix: regexr.com/6t51p
54
-
55
- let findRegex = new RegExp(
56
- cons.namespaceDelimiterRegexString +
57
- curNamespace.split("_").join(cons.namespaceDelimiterRegexString) +
58
- cons.namespaceDelimiterRegexString,
59
- regexTags
60
- );
61
- let curNamespaceLevelCount = curNamespace.split("_").length;
62
- let replaceStringGroupDelim = curNamespaceLevelCount == 1 ? "$1$2" : "$2";
63
- let replaceString = "$1" + newNamespace.split("_").join(replaceStringGroupDelim) + "$" + (curNamespaceLevelCount + 1);
64
- let returnMap = { from: findRegex, to: replaceString };
65
- return returnMap;
66
- },
67
-
68
43
  // Builds a CDT uuid
69
44
  buildCdtUuid: function (namespace, cdtName) {
70
45
  return `{${namespace}}${cdtName}`;
@@ -82,9 +57,7 @@ module.exports = {
82
57
 
83
58
  // Validates the new namespace is only letters and numbers with no whitespace
84
59
  validateNamespace: function (namespace) {
85
- if (isBlank(namespace)) {
86
- return `Namespace cannot be null`;
87
- } else if (!namespace.match(/^\b(?:[A-Za-z0-9]+_?)+\b$/g)) {
60
+ if (!namespace.match(/^\b(?:[A-Za-z0-9]+_?)+\b$/g) && !isBlank(namespace)) {
88
61
  return `Namespace can only be sets of uppercase letters and numbers separated by underscores`;
89
62
  } else {
90
63
  return true;
@@ -308,6 +281,16 @@ module.exports = {
308
281
  return string.match(regex);
309
282
  },
310
283
 
284
+ // Returns the first match in the string from the regex expression, or a default if no match
285
+ firstMatch: function (string, regex, defaultValue) {
286
+ let matches = string.match(regex);
287
+ if (isBlank(matches)) {
288
+ return defaultValue;
289
+ } else {
290
+ return matches[0];
291
+ }
292
+ },
293
+
311
294
  // Escapes special characters from a Regex Expression
312
295
  regexEscape: function (string) {
313
296
  return regexEscape(string);
package/APPS.properties DELETED
@@ -1,45 +0,0 @@
1
- ## ----------------------------------------------------------------------
2
- ## Instructions
3
- ##
4
- ## All of the properties in this file are commented out; they have a pound
5
- ## symbol at the start of each line that renders them inert.
6
- ##
7
- ## Instructions and headings are marked with two preceding pound
8
- ## symbols (##).
9
- ##
10
- ## On import, all commented-out properties are ignored, and the
11
- ## corresponding values in the destination environment remain
12
- ## unchanged.
13
- ##
14
- ## To set or change a property on import using this file,
15
- ## uncomment the property by removing the pound symbol from the start
16
- ## of its line. Then enter a value for the property after the equals
17
- ## sign (=) at the end of that import customization file.
18
- ##
19
- ## If you uncomment a property, but provide no value, the value of
20
- ## that property will be set to null in the destination environment.
21
- ## Properties that correspond to admin console settings and require a value
22
- ## will be set to their default value instead of being set to null. Default
23
- ## values of settings may be different between versions of Appian.
24
- ##
25
- ## To force sync of a record type please add an entry to the file in the following format
26
- ## recordType.<UUID>.forceSync=true
27
- ##
28
- ## To force import unchanged objects add the following line in the file
29
- ## importSetting.FORCE_UPDATE=true
30
- ##
31
- ## Note: Never remove the double pound symbols (##) in front of instructions
32
- ## and headings.
33
- ## ----------------------------------------------------------------------
34
-
35
- ## Constant: CT_APP_ENV_SPECIFIC
36
- ## Type: Number (Integer)
37
- ##
38
- ## Integer values can only contain numeric characters.
39
- #content._a-0000e88d-6440-8000-9bf2-011c48011c48_874621.VALUE=1
40
-
41
- ## Constant: NEW_ENV_SPECIFIC
42
- ## Type: Number (Integer)
43
- ##
44
- ## Integer values can only contain numeric characters.
45
- #content._a-0000e88d-6440-8000-9bf2-011c48011c48_874621-new.VALUE=1
package/APPS.zip DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,50 +0,0 @@
1
- ## REQUIRED. Username of the Appian user account
2
- username=
3
-
4
- ## REQUIRED. Password of the Appian user account
5
- password=
6
-
7
- ## REQUIRED. URL of the environment
8
- url=
9
-
10
- ## Optional. URL of the proxy to use to connect to Appian
11
- #proxyUrl=
12
-
13
- ## Optional. Port of the proxy server to use to connect to Appian. This parameter is only used if the parameter proxyUrl is defined. The default value is 8080.
14
- #proxyPort=
15
-
16
- ## Optional. Username for the proxy to allow connection from machine to Appian
17
- #proxyUsername=
18
-
19
- ## Optional. Password for the proxy to allow connection from machine to Appian
20
- #proxyPassword=
21
-
22
-
23
- ### Import-specific properties
24
-
25
- ## Path for the application ZIP file to import
26
- applicationPath=
27
-
28
- ## UUID of the application to which patch contents will be added
29
- #uuid=
30
-
31
- ## List of comma-separated paths for the DDL files to execute
32
- #ddlPath=C:\\Users\\acme.corp\\Documents\\script1.sql,C:\\Users\\acme.corp\\Documents\\script2.sql
33
-
34
- ## List of comma-separated paths for the directories to execute DB migrations via Flyway
35
- #flywayPath=C:\\Users\\acme.corp\\Documents\\db\\migration1,C:\\Users\\acme.corp\\Documents\\db\\migration2
36
-
37
- ## List of comma-separated datasources associated with the provided DDL files. Required if using ddlPath or flywayPath.
38
- #ddlDs=jdbc/businessds1,jdbc/businessds2
39
-
40
- ## Indicates the path to the import customization file
41
- #importCustomizationPath=
42
-
43
- ## Path for the admin console ZIP file to import
44
- #adminConsolePath=C:\\Users\\acme.corp\\Documents\\adminConsoleSettings.zip
45
-
46
- ## Optional. A boolean flag to indicate that the package should not be imported but inspected only
47
- #inspectOnly=false
48
-
49
- ## Optional. A boolean flag which specifies whether or not the import ignores impact analysis results. If true, the import will occur even if objects with CDT references are missing.
50
- #forceImport=false
@@ -1,17 +0,0 @@
1
- ###### Default
2
- log4j.rootLogger=INFO, CONSOLE, LOG_FILE
3
-
4
- #################################### APPENDERS
5
- ###### CONSOLE appender
6
- log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
7
- log4j.appender.CONSOLE.layout.ConversionPattern=%d - %m%n
8
- log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
9
-
10
- ###### LOG_FILE file appender
11
- log4j.appender.LOG_FILE=org.apache.log4j.RollingFileAppender
12
- log4j.appender.LOG_FILE.layout=org.apache.log4j.PatternLayout
13
- log4j.appender.LOG_FILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
14
- log4j.appender.LOG_FILE.File=deploymentautomation.log
15
- log4j.appender.LOG_FILE.MaxFileSize=10MB
16
- log4j.appender.LOG_FILE.MaxBackupIndex=1000
17
- log4j.appender.LOG_FILE.encoding=UTF-8
@@ -1,10 +0,0 @@
1
- ## Metrics collected with Google Analytics
2
- ## We do not collect data that “allows Google to personally identify an individual (such as certain names, social security numbers, email addresses, or any similar data),
3
- ## or data that permanently identifies a particular device (such as a mobile phone’s unique device identifier if such an identifier cannot be reset).”
4
- ## This is in accordance with Google Analytics’ User-ID Policy
5
-
6
- ## Enables ability to collect metrics. You can opt-out by setting property to false.
7
- collectMetrics=true
8
-
9
- ## Indicates whether the tool is being run from the pipeline, or standalone. DO NOT TOUCH.
10
- pipelineUsage=false
Binary file
@@ -1,8 +0,0 @@
1
- {
2
- "CT_APP": {
3
- "newNamespace": "NEW"
4
- },
5
- "Objects with no found namespace": {
6
- "newNamespace": ""
7
- }
8
- }
@@ -1,6 +0,0 @@
1
- {
2
- "uuids": [
3
- "_a-0000e88d-6440-8000-9bf2-011c48011c48_879069",
4
- "_a-0000e88d-6440-8000-9bf2-011c48011c48_879073"
5
- ]
6
- }