@axway/axway-central-cli 4.10.0-rc.1 → 4.10.0-rc.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 (142) hide show
  1. package/package.json +1 -1
  2. package/src/cli.ts +65 -0
  3. package/src/commands/apply/index.spec.ts +756 -0
  4. package/src/commands/apply/index.ts +106 -0
  5. package/src/commands/completion/index.ts +91 -0
  6. package/src/commands/config/common/index.ts +21 -0
  7. package/src/commands/config/index.ts +15 -0
  8. package/src/commands/config/list.spec.ts +57 -0
  9. package/src/commands/config/list.ts +18 -0
  10. package/src/commands/config/set.spec.ts +242 -0
  11. package/src/commands/config/set.ts +102 -0
  12. package/src/commands/config/unset.spec.ts +74 -0
  13. package/src/commands/config/unset.ts +40 -0
  14. package/src/commands/create/agentResource.spec.ts +210 -0
  15. package/src/commands/create/agentResource.ts +154 -0
  16. package/src/commands/create/environment.spec.ts +104 -0
  17. package/src/commands/create/environment.ts +52 -0
  18. package/src/commands/create/index.spec.ts +489 -0
  19. package/src/commands/create/index.ts +101 -0
  20. package/src/commands/create/serviceAccount.spec.ts +33 -0
  21. package/src/commands/create/serviceAccount.ts +19 -0
  22. package/src/commands/delete/index.spec.ts +650 -0
  23. package/src/commands/delete/index.ts +196 -0
  24. package/src/commands/edit/environment.spec.ts +186 -0
  25. package/src/commands/edit/environment.ts +79 -0
  26. package/src/commands/edit/index.ts +25 -0
  27. package/src/commands/get/index.spec.ts +1257 -0
  28. package/src/commands/get/index.ts +305 -0
  29. package/src/commands/install/agent.spec.ts +592 -0
  30. package/src/commands/install/agents.ts +385 -0
  31. package/src/commands/install/akamaiAgents.spec.ts +511 -0
  32. package/src/commands/install/akamaiAgents.ts +334 -0
  33. package/src/commands/install/akamaiSaasAgents.spec.ts +265 -0
  34. package/src/commands/install/akamaiSaasAgents.ts +376 -0
  35. package/src/commands/install/apigeexAgents.spec.ts +339 -0
  36. package/src/commands/install/apigeexAgents.ts +277 -0
  37. package/src/commands/install/apigeexSaasAgents.spec.ts +359 -0
  38. package/src/commands/install/apigeexSaasAgents.ts +428 -0
  39. package/src/commands/install/awsAgents.spec.ts +1203 -0
  40. package/src/commands/install/awsAgents.ts +611 -0
  41. package/src/commands/install/awsSaasAgents.spec.ts +741 -0
  42. package/src/commands/install/awsSaasAgents.ts +739 -0
  43. package/src/commands/install/azureAgents.spec.ts +636 -0
  44. package/src/commands/install/azureAgents.ts +310 -0
  45. package/src/commands/install/azureSaasAgents.spec.ts +743 -0
  46. package/src/commands/install/azureSaasAgents.ts +783 -0
  47. package/src/commands/install/backstageAgents.spec.ts +299 -0
  48. package/src/commands/install/backstageAgents.ts +207 -0
  49. package/src/commands/install/edgeAgents.spec.ts +1139 -0
  50. package/src/commands/install/edgeAgents.ts +524 -0
  51. package/src/commands/install/gitHubSaasAgents.spec.ts +360 -0
  52. package/src/commands/install/gitHubSaasAgents.ts +408 -0
  53. package/src/commands/install/gitLabAgents.spec.ts +236 -0
  54. package/src/commands/install/gitLabAgents.ts +221 -0
  55. package/src/commands/install/graylogAgent.ts +203 -0
  56. package/src/commands/install/graylogAgents.spec.ts +381 -0
  57. package/src/commands/install/helpers/creators.spec.ts +46 -0
  58. package/src/commands/install/helpers/creators.ts +434 -0
  59. package/src/commands/install/helpers/deleters.ts +38 -0
  60. package/src/commands/install/helpers/getters.spec.ts +38 -0
  61. package/src/commands/install/helpers/getters.ts +111 -0
  62. package/src/commands/install/helpers/index.ts +65 -0
  63. package/src/commands/install/helpers/inputs.spec.ts +78 -0
  64. package/src/commands/install/helpers/inputs.ts +699 -0
  65. package/src/commands/install/helpers/regex.ts +74 -0
  66. package/src/commands/install/helpers/templates/akamaiTemplates.ts +109 -0
  67. package/src/commands/install/helpers/templates/apigeexTemplates.ts +99 -0
  68. package/src/commands/install/helpers/templates/awsTemplates.ts +124 -0
  69. package/src/commands/install/helpers/templates/azureTemplates.ts +115 -0
  70. package/src/commands/install/helpers/templates/backstageTemplates.ts +87 -0
  71. package/src/commands/install/helpers/templates/edgeTemplates.ts +345 -0
  72. package/src/commands/install/helpers/templates/gitLabTemplates.ts +60 -0
  73. package/src/commands/install/helpers/templates/graylogTemplates.ts +63 -0
  74. package/src/commands/install/helpers/templates/ibmAPIConnectTemplates.ts +106 -0
  75. package/src/commands/install/helpers/templates/istioTemplates.ts +204 -0
  76. package/src/commands/install/helpers/templates/kafkaTemplates.ts +184 -0
  77. package/src/commands/install/helpers/templates/sapApiPortalTemplates.ts +104 -0
  78. package/src/commands/install/helpers/templates/sensediaTemplates.ts +108 -0
  79. package/src/commands/install/helpers/templates/softwareAGWebMethodsTemplates.ts +86 -0
  80. package/src/commands/install/helpers/templates/traceableTemplates.ts +123 -0
  81. package/src/commands/install/helpers/templates/wso2Templates.ts +75 -0
  82. package/src/commands/install/helpers/util.ts +45 -0
  83. package/src/commands/install/ibmAPIConnectAgents.spec.ts +539 -0
  84. package/src/commands/install/ibmAPIConnectAgents.ts +259 -0
  85. package/src/commands/install/index.ts +30 -0
  86. package/src/commands/install/istioAgents.spec.ts +1086 -0
  87. package/src/commands/install/istioAgents.ts +471 -0
  88. package/src/commands/install/kafkaAgents.spec.ts +707 -0
  89. package/src/commands/install/kafkaAgents.ts +358 -0
  90. package/src/commands/install/platform.ts +296 -0
  91. package/src/commands/install/sapApiPortalAgents.spec.ts +318 -0
  92. package/src/commands/install/sapApiPortalAgents.ts +248 -0
  93. package/src/commands/install/sensediaAgents.spec.ts +364 -0
  94. package/src/commands/install/sensediaAgents.ts +270 -0
  95. package/src/commands/install/softwareAGWebMethodsAgents.spec.ts +503 -0
  96. package/src/commands/install/softwareAGWebMethodsAgents.ts +191 -0
  97. package/src/commands/install/swaggerHubSaasAgents.spec.ts +351 -0
  98. package/src/commands/install/swaggerHubSaasAgents.ts +358 -0
  99. package/src/commands/install/traceableAgents.spec.ts +505 -0
  100. package/src/commands/install/traceableAgents.ts +323 -0
  101. package/src/commands/install/traceableSaasAgents.spec.ts +289 -0
  102. package/src/commands/install/traceableSaasAgents.ts +388 -0
  103. package/src/commands/install/wso2Agents.spec.ts +275 -0
  104. package/src/commands/install/wso2Agents.ts +197 -0
  105. package/src/commands/productize/helpers/productizationHelper.ts +466 -0
  106. package/src/commands/productize/index.spec.ts +367 -0
  107. package/src/commands/productize/index.ts +87 -0
  108. package/src/common/ApiServerClient.spec.ts +176 -0
  109. package/src/common/ApiServerClient.ts +1341 -0
  110. package/src/common/CacheController.spec.ts +207 -0
  111. package/src/common/CacheController.ts +162 -0
  112. package/src/common/CliConfigManager.spec.ts +83 -0
  113. package/src/common/CliConfigManager.ts +84 -0
  114. package/src/common/CompositeError.spec.ts +137 -0
  115. package/src/common/CompositeError.ts +94 -0
  116. package/src/common/CoreConfigController.spec.ts +107 -0
  117. package/src/common/CoreConfigController.ts +272 -0
  118. package/src/common/DefinitionsManager.spec.ts +267 -0
  119. package/src/common/DefinitionsManager.ts +328 -0
  120. package/src/common/Kubectl.ts +72 -0
  121. package/src/common/PlatformClient.ts +144 -0
  122. package/src/common/Renderer.spec.ts +141 -0
  123. package/src/common/Renderer.ts +426 -0
  124. package/src/common/TmpFile.spec.ts +85 -0
  125. package/src/common/TmpFile.ts +77 -0
  126. package/src/common/bashCommands.ts +88 -0
  127. package/src/common/basicPrompts.spec.ts +200 -0
  128. package/src/common/basicPrompts.ts +186 -0
  129. package/src/common/dataService.spec.ts +74 -0
  130. package/src/common/dataService.ts +330 -0
  131. package/src/common/errorHandler.ts +45 -0
  132. package/src/common/kubectl.spec.ts +72 -0
  133. package/src/common/modules.d.ts +6 -0
  134. package/src/common/resultRenderers.spec.ts +26 -0
  135. package/src/common/resultsRenderers.ts +169 -0
  136. package/src/common/types.ts +881 -0
  137. package/src/common/utils.spec.ts +200 -0
  138. package/src/common/utils.ts +530 -0
  139. package/src/main.ts +6 -0
  140. package/src/scripts/postinstall.js +54 -0
  141. package/src/scripts/resources/amplify-cli-utils-envs.js +83 -0
  142. package/src/scripts/resources/amplify-sdk-envs.js +62 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "4.10.0-rc.1",
3
+ "version": "4.10.0-rc.2",
4
4
  "description": "Manage APIs, services and publish to the Amplify Marketplace",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {
package/src/cli.ts ADDED
@@ -0,0 +1,65 @@
1
+ import CLI from 'cli-kit';
2
+ import dayjs from 'dayjs';
3
+ import relativeTime from 'dayjs/plugin/relativeTime';
4
+ import { existsSync, outputJsonSync, readJsonSync } from 'fs-extra';
5
+ import { apply } from './commands/apply';
6
+ import { completion } from './commands/completion';
7
+ import { config } from './commands/config';
8
+ import { create } from './commands/create';
9
+ import { deleteCmd } from './commands/delete';
10
+ import { edit } from './commands/edit';
11
+ import { get } from './commands/get';
12
+ import { install } from './commands/install';
13
+ import { configFile, hbsCompare } from './common/utils';
14
+ import { productize } from './commands/productize';
15
+
16
+ dayjs.extend(relativeTime);
17
+ require('tls').DEFAULT_ECDH_CURVE = 'auto';
18
+ hbsCompare();
19
+
20
+ const { version } = require('../package.json');
21
+
22
+ // Create the configFile if it doesn't exist yet and read all extensions on load
23
+ if (!existsSync(configFile)) {
24
+ outputJsonSync(configFile, {});
25
+ }
26
+ const extensions = [...Object.values(readJsonSync(configFile).extensions || {})];
27
+
28
+ // cliParams export only needed for "completion" command and its testing
29
+ export const cliParams = {
30
+ title: 'Axway Engage CLI',
31
+ name: 'engage',
32
+ banner: '',
33
+ version,
34
+ commands: {
35
+ completion,
36
+ apply,
37
+ config,
38
+ create,
39
+ delete: deleteCmd,
40
+ edit,
41
+ get,
42
+ install,
43
+ productize,
44
+ },
45
+ extensions,
46
+ };
47
+
48
+ export default new CLI({
49
+ title: 'Axway Central CLI',
50
+ name: 'central',
51
+ banner: '',
52
+ version,
53
+ commands: {
54
+ completion,
55
+ apply,
56
+ config,
57
+ create,
58
+ delete: deleteCmd,
59
+ edit,
60
+ get,
61
+ install,
62
+ productize,
63
+ },
64
+ extensions,
65
+ });