apn-app-manager 0.1.6 → 0.2.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.
Files changed (49) hide show
  1. package/{CT APP Clone Tester.zip → NEW A PACK.zip} +0 -0
  2. package/{out/NEW - CT APP Clone Tester.zip → NEW Clone Tester.zip} +0 -0
  3. package/README.md +46 -49
  4. package/out/TWO_PRE - NEW Clone Tester.zip +0 -0
  5. package/out/objects.json +474 -408
  6. package/out/temp/META-INF/MANIFEST.MF +1 -1
  7. package/out/temp/META-INF/export.log +742 -759
  8. package/out/temp/application/{_a-0000e88d-6440-8000-9bf2-011c48011c48_855378-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_855378-two-pre.xml} +61 -53
  9. package/out/temp/connectedSystem/{_a-0000e88d-6440-8000-9bf2-011c48011c48_864509-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_864509-two-pre.xml} +8 -7
  10. package/out/temp/content/1d6e665c-14b4-4bb9-88fb-ae64e1eddbf3-two-pre.xml +75 -0
  11. package/out/temp/content/{6b262b50-0d7a-4dc9-a31b-473fd11f347a-new.xml → 6b262b50-0d7a-4dc9-a31b-473fd11f347a-two-pre.xml} +9 -9
  12. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_855525-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_855525-two-pre.xml} +43 -40
  13. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863563-new → _a-0000e88d-6440-8000-9bf2-011c48011c48_863563-two-pre}/file.png +0 -0
  14. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863563-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863563-two-pre.xml} +7 -6
  15. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863564-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863564-two-pre.xml} +10 -8
  16. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863573-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863573-two-pre.xml} +7 -6
  17. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863584-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863584-two-pre.xml} +12 -10
  18. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863603-new → _a-0000e88d-6440-8000-9bf2-011c48011c48_863603-two-pre}/file.properties +1 -1
  19. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863603-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863603-two-pre.xml} +7 -6
  20. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863609-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863609-two-pre.xml} +9 -8
  21. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_863616-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_863616-two-pre.xml} +8 -7
  22. package/out/temp/content/{_a-0000e88d-6440-8000-9bf2-011c48011c48_864578-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_864578-two-pre.xml} +9 -8
  23. package/out/temp/content/{b639666e-eb53-4a1a-b963-c2a21ca400f7-new.xml → b639666e-eb53-4a1a-b963-c2a21ca400f7-two-pre.xml} +6 -6
  24. package/out/temp/content/{c1448a43-e704-42c3-8588-2180b74a138a-new.xml → c1448a43-e704-42c3-8588-2180b74a138a-two-pre.xml} +28 -25
  25. package/out/temp/content/fcb9b72f-10dd-4744-8870-a44a7fcb4aeb-two-pre.xml +77 -0
  26. package/out/temp/dataStore/{_a-0000e88d-6440-8000-9bf2-011c48011c48_855385-new.xml → _a-0000e88d-6440-8000-9bf2-011c48011c48_855385-two-pre.xml} +13 -11
  27. package/out/temp/datatype/{%7Burn%3Acom%3Aappian%3Atypes%3ANEW%7DNEW_TEST_TABLE.xsd → %7Burn%3Acom%3Aappian%3Atypes%3ATWO%3APRE%7DTWO_PRE_TEST_TABLE.xsd} +11 -10
  28. package/out/temp/datatype/{%7Burn%3Acom%3Aappian%3Atypes%3ANEW%7DNEW_TEST_TABLE_REFERENCE.xsd → %7Burn%3Acom%3Aappian%3Atypes%3ATWO%3APRE%7DTWO_PRE_TEST_TABLE_REFERENCE.xsd} +9 -8
  29. package/out/temp/group/{_e-0000e88d-6440-8000-9b3f-01075c01075c_807-new.xml → _e-0000e88d-6440-8000-9b3f-01075c01075c_805-two-pre.xml} +5 -5
  30. package/out/temp/group/{_e-0000e88d-6440-8000-9b3f-01075c01075c_805-new.xml → _e-0000e88d-6440-8000-9b3f-01075c01075c_807-two-pre.xml} +5 -5
  31. package/out/temp/groupType/{_f-0000e88d-6440-8000-9b3f-01075c01075c_1-new.xml → _f-0000e88d-6440-8000-9b3f-01075c01075c_1-two-pre.xml} +4 -4
  32. package/out/temp/processModel/{0002e8ba-9f2b-8000-1196-7f0000014e7a-new.xml → 0002e8ba-9f2b-8000-1196-7f0000014e7a-two-pre.xml} +21 -19
  33. package/out/temp/processModelFolder/{_g-0000e88d-6441-8000-10c5-7f0000014e7a_197-new.xml → _g-0000e88d-6441-8000-10c5-7f0000014e7a_197-two-pre.xml} +10 -8
  34. package/out/temp/recordType/{00262392-ae09-4941-8b80-d46df28c734f-new.xml → 00262392-ae09-4941-8b80-d46df28c734f-two-pre.xml} +59 -59
  35. package/out/temp/recordType/{0c9e7b5a-c28d-496b-a7c1-8ad7227e513a-new.xml → 0c9e7b5a-c28d-496b-a7c1-8ad7227e513a-two-pre.xml} +30 -30
  36. package/out/temp/recordType/{cbbc5029-b0c1-43a2-9430-24fa704c512c-new.xml → cbbc5029-b0c1-43a2-9430-24fa704c512c-two-pre.xml} +37 -37
  37. package/out/temp/site/{15c1e536-fd29-4412-879d-219b02bd1c59-new.xml → 15c1e536-fd29-4412-879d-219b02bd1c59-two-pre.xml} +7 -7
  38. package/out/temp/tempoReport/{eb755f20-5148-4f8f-92cc-fd69980d6082-new.xml → eb755f20-5148-4f8f-92cc-fd69980d6082-two-pre.xml} +8 -8
  39. package/out/temp/webApi/{3a013f66-bd81-414a-a72e-bbd03c8befe9-new.xml → 3a013f66-bd81-414a-a72e-bbd03c8befe9-two-pre.xml} +7 -7
  40. package/package.json +1 -1
  41. package/src/actions/cloneAction.js +1 -1
  42. package/src/cons.js +1 -1
  43. package/src/util.js +22 -14
  44. package/ACT APP Clone Tester - Dan Tobias package - 2022-08-31_1856.zip +0 -0
  45. package/AS MSG Messaging.zip +0 -0
  46. package/msg all.zip +0 -0
  47. package/msg cdt.zip +0 -0
  48. package/out/temp/content/1d6e665c-14b4-4bb9-88fb-ae64e1eddbf3-new.xml +0 -75
  49. package/out/temp/content/fcb9b72f-10dd-4744-8870-a44a7fcb4aeb-new.xml +0 -77
package/README.md CHANGED
@@ -1,60 +1,57 @@
1
1
  # Node.js: apn-app-manager
2
2
 
3
- `apn-app-manager` is a command line tool for managing Appian applications
3
+ `apn-app-manager` is a command line tool for managing Appian applications.
4
4
 
5
5
  ## Why?
6
6
 
7
- Todo...
7
+ When app building you may want to do things in bulk that are easiest to do via an application's exported XML files and a re-import. This tool helps to automate some of those tasks.
8
+
9
+ ## Disclaimer
10
+
11
+ The functionality provided by this tool is not supported nor endorsed by Appian. It is merely a tool to manipulate XML files following strict rules. The structure of these XML files will change between platform releases, and that may break this tool.
12
+
13
+ Importing an application export modified by this tool should be done at your own discretion.
14
+
15
+ Latest compatible Appian platform version for which we've tested against: **22.3**.
8
16
 
9
17
  ## Installation
10
18
 
11
- 1. Download and install [the latest version of node](https://nodejs.org/en/download/) if you don't already have it
12
- 1. Clone this repository
13
- 1. Navigate to `[repo]\node\app-manager` in your command line
14
- 1. Run `npm i`
15
- 1. Run `npm link`
16
-
17
- ## Building Solutions Application Package
18
-
19
- 1. First, ensure you have the latest version of this package installed. Within your Git tool, fetch and pull the latest version from master.
20
- 2. Open up your command line and run the command `apn package --prefix <prefix>` where `<prefix>` should be one of the following:
21
- - `IO` - Institutional Onboarding
22
- - `KYC` - Know your Customer
23
- - `RM` - Requirements Management
24
- - `WS` - Workforce Safety
25
- - `AM` - Award Management
26
- - `MS` - (GAM) Management Suite
27
- 3. This should begin the packaging process, and once complete, all of the files will be available to import into your test environment in a new folder called `/out` which will be inside of the folder in which you ran the command
28
- - To wipe the existing database tables, first run the SQL file that contains the word `WIPE`, then the other SQL file
29
-
30
- #### Notes regarding packaging
31
-
32
- - **Important** If the package script fails (it will be obvious), then navigate to the folder in your file explorer, delete the newly generated folder called `out`, and just re-run the packaging command.
33
- - The little metrics about how many files are mapped/updated are currently inaccurate. Don't pay them attention at this time.
34
-
35
- ## Renaming Objects in Bulk (currently broken)
36
-
37
- 1. Download an application package of objects you'd like to rename
38
- - If you are renaming CDTs, ensure that all direct dependents of the CDTs are also included in the application package
39
- 1. Navigate to the folder containing the application package in your command line
40
- 1. Run `apn r`
41
- - If this doesn't work, there was likely an issue when running `npm link` above
42
- 1. Follow the prompts to select the application package and provide the new namespace
43
- - If you are not renaming to a new namespace, just provide the same value for current and new namespace
44
- 1. Modify the Excel file (appears in a new `/out` directory) with the new names for names, descriptions, and any other values
45
- - DO NOT modify the structure of the Excel file or modify any columns that do not end in `_new`
46
- 1. Save the Excel file and the resultant application package will appear in the new `/out` directory
47
- 1. Import your new application package to your environment, including [force_update\_.properties](resources/force_update_.properties) as the properties file to ensure the objects are updated
48
-
49
- #### Notes regarding renaming
50
-
51
- - It is recommend to always test the import against a sandbox site (e.g. CI site) before importing to your actual site - At worst, the tool may not perform as expected, however it shouldn't corrupt any files - For the future notes about unsupported behavior, you can always try it out and see if it works ¯\\_(ツ)_/¯
52
- - The prompt for current and new namespace will auto-replace all instances of the current namespace to the new namespace, and is meant to be a shortcut to common renaming use cases - As mentioned above, providing the same value for current and new namespace will result in nothing being auto-renamed prior to the Excel output
53
- - Renaming multiple objects that currently have the same name to each have different names is not currently supported - e.g. Changing the name of a data store entity and a CDT, which are currently the same, to be different - This INCLUDES setting the description on a number of objects whose description is currently null
54
- - Description fields with special characters (&, carriage returns, etc) are not currently supported
55
- - Be careful if renaming any fields that are array types (such as data store entity names), maintain the exact same delimination as exists in the Excel file
56
- - CDTs cannot actual be renamed, instead new CDTs will be created with the new names, and you'll have to manually delete the old CDTs (all references should be updated)
19
+ 1. Download and install [the latest version of node](https://nodejs.org/en/download/) if you don't already have it.
20
+ 1. Globally install or upgrade on your local machine in your favorite command-line terminal via command .
21
+ - `npm i -g apn-app-manager`
22
+ 1. Check installation or your current version of this tool by running `npm list -g`.
23
+ 1. After installing, you should have access to the command `apn` globally in your terminal.
24
+ - If this command is not recognized, you will need to troubleshoot. Since this is machine-specific, it's something you may have to google related to the npm "prefix" config. Here are helpful links to troubleshoot for [Windows](https://www.google.com/search?q=npm+global+command+not+found+windows) and [Mac](https://www.google.com/search?q=npm+global+command+not+found+mac).
25
+
26
+ ## Usage
27
+
28
+ 1. Download any Appian application zip and navigate to the folder containing the download in your favorite command-line terminal.
29
+ 1. Run the command `apn` and follow the prompts to modify the application.
30
+
31
+ Currently this tool only supports cloning applications, although more functionality may come in future releases.
32
+
33
+ ### Cloning
34
+
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
+
37
+ #### Steps
38
+
39
+ 1. Run the command `apn` in a folder containing your exported application zip.
40
+ 1. Select `clone` for "What would you like to do?".
41
+ 1. Select your application zip.
42
+ 1. Enter your current namespace.
43
+ - For example, an application with objects such as `SMP APP Artifacts` and `SMP_APP_displayUser` would have a namespace of `SMP_APP`
44
+ 1. Enter your new namespace.
45
+ 1. Access your cloned application in the generated `/out/` folder.
46
+
47
+ #### Notes
48
+
49
+ 1. Always inspect your cloned zip before importing to verify that what will be imported matches what you'd expect.
50
+ 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.
51
+ 1. It is highly recommended that all objects in your application have the same prefix (including objects that generally aren't prefixed such as applications, groups, process models, etc). Otherwise, the cloning tool will not be able to generate a unique name for these objects, and certain objects are required to have unique names.
52
+ 1. Warnings may appear during cloning around UUIDs that weren't recognized. 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 releases. Please reach out to the authors of this tool if you have any questions about this.
53
+ 1. Import properties files and SQL files for your application are not supported at this time. These will have to be adjusted manually to align with the cloned objects.
57
54
 
58
55
  ## License
59
56
 
60
- Todo...
57
+ Licensed under [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)