apn-app-manager 1.16.1 → 2.0.0

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
@@ -12,7 +12,7 @@ The functionality provided by this tool is not supported, nor endorsed by Appian
12
12
 
13
13
  Importing an application export modified by this tool should be done at your own discretion.
14
14
 
15
- Latest compatible Appian platform version tested against: **25.2**.
15
+ Latest compatible Appian platform version tested against: **25.3**.
16
16
 
17
17
  ## Installation
18
18
 
@@ -34,7 +34,7 @@ Currently this tool only supports cloning applications, although more functional
34
34
 
35
35
  Used to duplicate all objects of an application, which replaces the namespace of each object with a new namespace and generates unique UUIDs for each new object.
36
36
 
37
- #### Steps
37
+ #### Steps for Manual Step-Through
38
38
 
39
39
  1. Run the command `apn` in a folder containing your exported application zip.
40
40
  1. Select `clone` for "What would you like to do?".
@@ -42,6 +42,7 @@ Used to duplicate all objects of an application, which replaces the namespace of
42
42
  - Regular options:
43
43
  1. Select your application zip.
44
44
  1. Select your import customization properties file, if you have one.
45
+ 1. Select your sql files, if sql files exist.
45
46
  1. Enter your current namespace.
46
47
  1. Enter your new namespace.
47
48
  - For example, an application with objects such as `SMP APP Artifacts` and `SMP_APP_displayUser` would have a namespace of `SMP_APP`
@@ -50,20 +51,32 @@ Used to duplicate all objects of an application, which replaces the namespace of
50
51
  1. Select your application or package zip you wish to clone.
51
52
  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
53
  1. Select your import customization properties file, if you have one.
54
+ 1. Select your sql files, if sql files exist.
53
55
  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. Select whether you want database table names (within CDTs and records) to be renamed or not during cloning.
56
+ 1. Select additional options.
57
+ 1. Address problem words if any are found.
58
+ 1. Access your cloned application in the generated `/out/` folder.
59
+
60
+ #### Steps for Full CLI
61
+
62
+ 1. Run the command `apn clone -- [args]` in a folder containing your exported application zip.
63
+ - The available `args` can be found by running `apn help`.
64
+ - An example cli command would be `apn clone -- --appZipPath *.zip --sqlPaths "file1.sql, file2.sql" --namespaceMap APP_A:NEW1,APP_B:NEW2,*:ELSE --options.renameDbTables false;`
55
65
  1. Access your cloned application in the generated `/out/` folder.
56
66
 
57
67
  #### Notes
58
68
 
59
69
  1. Always inspect your cloned zip before importing to verify that what will be imported matches what you'd expect.
60
70
  1. The cloning tool is idempotent meaning it will always return the same output zip run against the same input. This also means you can develop an application, clone it, then enhance the original application, re-clone it, and that second clone will deploy over the first clone with objects being recognized as "Changed" as if you had just modified the clone directly.
61
- 1. SQL files for your application are not supported for cloning at this time. SQL scripts will have to be adjusted manually to align with the cloned objects (i.e. changing table name references).
62
- 1. There are some other documents generated in the `/out/` folder after cloning:
71
+ - By default, the tool will now always return all changed object UUIDs in a deterministic UUID format. If you need the old "append" format to clone against code that already exists in that format, use advanced options to turn this off.
72
+ 1. The cloning of SQL files largely just replaces prefixes of the text in the files. There is no guarantee that the output of these changes is still valid SQL. Properly prefixing all ddl-object-names with your application namespace is highly recommended.
73
+ 1. There are some other documents generated in the `/out/debug/` folder after cloning:
63
74
  - `objects.json` - This contains every attribute of collected metadata from every object in the package, including its current value and new value.
75
+ - `selected-files.json` - This contains the files selected for each menu or cli argument when cloning.
64
76
  - `not-cloned-uuids.json` - Warnings may appear during cloning about UUIDs in the package that the tool didn't know how to handle, which will be listed in this file. If no warnings appeared, this file will be empty. Generally these can be ignored if your inspection looks good, however these may be actual issues that come up due to XML structure changes in future Appian platform releases. Please reach out to the authors of this tool if you have any questions about this.
65
77
  - `namespaces.json` - This contains a mapping of old-to-new namespaces used when cloning.
66
78
  - `problem-terms.json` - Only output if problem terms were identified. This contains a mapping of problem words, where they were found, and what decision was made for them.
79
+ - `options.json` - This contains the options chosen (or used by default) when cloning.
67
80
  - `composer/` - This directory contains a JSON file for each application which has "Composer/Requirements/Plan" of the `requirementsCaptureB64` node in JSON format.
68
81
 
69
82
  ## License
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "apn-app-manager",
3
- "version": "1.16.1",
3
+ "version": "2.0.0",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org/"
6
+ },
4
7
  "description": "Appian App Manager",
5
8
  "license": "Apache-2.0",
6
9
  "preferGlobal": true,
@@ -8,7 +11,8 @@
8
11
  "scripts": {
9
12
  "apn": "src/index.js",
10
13
  "test": "jest *test*",
11
- "test-fix": "test/fixup.js"
14
+ "test-fix": "test/fixup.js",
15
+ "test-manual": "test/manual.js"
12
16
  },
13
17
  "bin": {
14
18
  "apn": "src/index.js"
@@ -21,17 +25,18 @@
21
25
  "dependencies": {
22
26
  "@xmldom/xmldom": "^0.8.0",
23
27
  "adm-zip": "^0.4.13",
24
- "axios": "^0.21.1",
28
+ "axios": "^1.12.0",
25
29
  "commander": "^4.1.1",
26
30
  "del": "^5.1.0",
31
+ "fast-glob": "^3.3.3",
27
32
  "fs-extra": "^8.1.0",
28
33
  "inquirer": "^8.2.0",
29
34
  "jsonpath": "^1.1.1",
30
35
  "lodash": "^4.17.21",
31
36
  "node-color-log": "^10.0.2",
32
37
  "node-excel-export": "^1.4.4",
33
- "node-xlsx": "^0.21.0",
34
- "npm": "^8.18.0",
38
+ "node-xlsx": "^0.4.0",
39
+ "npm": "^11.6.0",
35
40
  "npm-run": "^5.0.1",
36
41
  "path": "^0.12.7",
37
42
  "prompts": "^2.4.2",
@@ -39,7 +44,7 @@
39
44
  "set-immediate-shim": "^2.0.0",
40
45
  "uuid": "^9.0.0",
41
46
  "write-json-file": "^4.3.0",
42
- "xml2js": "^0.4.23",
47
+ "xml2js": "^0.6.2",
43
48
  "xpath": "0.0.34"
44
49
  },
45
50
  "devDependencies": {