zcatalyst-cli 1.12.0 → 1.13.1

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 (181) hide show
  1. package/lib/apig-utils.js +39 -39
  2. package/lib/archiver.js +13 -9
  3. package/lib/authentication/index.js +22 -18
  4. package/lib/authentication/login.js +37 -39
  5. package/lib/bin/catalyst.js +15 -15
  6. package/lib/cli_table/src/cell.js +26 -26
  7. package/lib/cli_table/src/layout-manager.js +44 -45
  8. package/lib/cli_table/src/table.js +9 -9
  9. package/lib/cli_table/src/utils.js +35 -36
  10. package/lib/client-utils.js +18 -18
  11. package/lib/client.js +1 -1
  12. package/lib/command_needs/auth.js +7 -7
  13. package/lib/command_needs/rc.js +24 -24
  14. package/lib/commands/apig/disable.js +5 -5
  15. package/lib/commands/apig/enable.js +5 -5
  16. package/lib/commands/apig/status.js +9 -9
  17. package/lib/commands/client/delete.js +19 -19
  18. package/lib/commands/client/setup.js +8 -4
  19. package/lib/commands/deploy.js +18 -14
  20. package/lib/commands/ds/export.js +11 -11
  21. package/lib/commands/ds/import.js +12 -12
  22. package/lib/commands/ds/status.js +15 -15
  23. package/lib/commands/event/generate/index.js +21 -17
  24. package/lib/commands/event/generate/integ.js +7 -3
  25. package/lib/commands/functions/add.js +8 -4
  26. package/lib/commands/functions/config.js +5 -5
  27. package/lib/commands/functions/delete.js +22 -22
  28. package/lib/commands/functions/setup.js +8 -4
  29. package/lib/commands/functions/shell.js +7 -3
  30. package/lib/commands/help.js +4 -4
  31. package/lib/commands/iac/export.js +8 -8
  32. package/lib/commands/iac/import.js +29 -21
  33. package/lib/commands/iac/pack.js +15 -11
  34. package/lib/commands/iac/status.js +6 -2
  35. package/lib/commands/index.js +5 -1
  36. package/lib/commands/init.js +14 -10
  37. package/lib/commands/login.js +5 -1
  38. package/lib/commands/logout.js +5 -1
  39. package/lib/commands/project/list.js +14 -10
  40. package/lib/commands/project/reset.js +5 -5
  41. package/lib/commands/project/use.js +9 -9
  42. package/lib/commands/pull.js +18 -14
  43. package/lib/commands/run.js +13 -9
  44. package/lib/commands/serve.js +5 -1
  45. package/lib/commands/token/generate.js +6 -2
  46. package/lib/commands/token/list.js +7 -3
  47. package/lib/commands/token/revoke.js +6 -2
  48. package/lib/commands/whoami.js +3 -3
  49. package/lib/dc.js +2 -2
  50. package/lib/deploy/features/apig.js +6 -6
  51. package/lib/deploy/features/client.js +1 -1
  52. package/lib/deploy/features/functions/index.js +9 -9
  53. package/lib/deploy/features/index.js +5 -1
  54. package/lib/deploy/index.js +2 -2
  55. package/lib/endpoints/index.js +17 -13
  56. package/lib/endpoints/lib/apig.js +5 -5
  57. package/lib/endpoints/lib/applogic.js +4 -4
  58. package/lib/endpoints/lib/cache.js +3 -3
  59. package/lib/endpoints/lib/catalyst-details.js +1 -1
  60. package/lib/endpoints/lib/client.js +5 -5
  61. package/lib/endpoints/lib/datastore.js +2 -2
  62. package/lib/endpoints/lib/ds-bulk.js +5 -5
  63. package/lib/endpoints/lib/env.js +1 -1
  64. package/lib/endpoints/lib/event-bus.js +1 -1
  65. package/lib/endpoints/lib/filestore.js +2 -2
  66. package/lib/endpoints/lib/functions.js +4 -4
  67. package/lib/endpoints/lib/iac.js +10 -10
  68. package/lib/endpoints/lib/project.js +20 -5
  69. package/lib/endpoints/lib/queue.js +3 -3
  70. package/lib/endpoints/lib/sdk.js +1 -1
  71. package/lib/endpoints/lib/zcql.js +1 -1
  72. package/lib/error.js +1 -1
  73. package/lib/errorOut.js +2 -2
  74. package/lib/event_generate/cache.js +5 -5
  75. package/lib/event_generate/custom.js +2 -2
  76. package/lib/event_generate/datastore.js +5 -5
  77. package/lib/event_generate/filestore.js +5 -5
  78. package/lib/event_generate/integration/cliq.js +3 -3
  79. package/lib/event_generate/user.js +1 -1
  80. package/lib/event_generate/webapp.js +5 -5
  81. package/lib/execute-script.js +19 -15
  82. package/lib/express_middlewares/authenticator.js +29 -4
  83. package/lib/express_middlewares/logger.js +2 -2
  84. package/lib/express_middlewares/unknownReqProxy.js +1 -1
  85. package/lib/fn-utils/index.js +5 -1
  86. package/lib/fn-utils/lib/common.js +44 -44
  87. package/lib/fn-utils/lib/integ.js +9 -9
  88. package/lib/fn-utils/lib/java.js +48 -46
  89. package/lib/fn-utils/lib/node.js +7 -7
  90. package/lib/fn-watcher.js +9 -11
  91. package/lib/iac/status/bundle.js +5 -5
  92. package/lib/iac/status/deploy.js +4 -4
  93. package/lib/index.js +2 -2
  94. package/lib/init/dependencies/npm-install.js +1 -1
  95. package/lib/init/dependencies/package-json.js +6 -6
  96. package/lib/init/features/client/index.js +5 -1
  97. package/lib/init/features/client/initializers/angular.js +16 -12
  98. package/lib/init/features/client/initializers/basic.js +10 -6
  99. package/lib/init/features/client/initializers/lyte.js +11 -7
  100. package/lib/init/features/client/initializers/react.js +13 -9
  101. package/lib/init/features/functions/index.js +23 -14
  102. package/lib/init/features/functions/languages/java.js +10 -10
  103. package/lib/init/features/functions/languages/node.js +9 -9
  104. package/lib/init/features/index.js +12 -8
  105. package/lib/init/features/project.js +20 -20
  106. package/lib/init/index.js +2 -2
  107. package/lib/init/util/client.js +7 -3
  108. package/lib/init/util/functions.js +1 -1
  109. package/lib/init/util/project.js +4 -4
  110. package/lib/internal/api.js +19 -19
  111. package/lib/internal/command.js +20 -16
  112. package/lib/internal/config.js +5 -5
  113. package/lib/internal/credential.js +10 -10
  114. package/lib/internal/crypt.js +5 -5
  115. package/lib/internal/rc.js +5 -5
  116. package/lib/migration/global/1.6.2.js +3 -3
  117. package/lib/migration/index.js +22 -18
  118. package/lib/option-filter.js +34 -30
  119. package/lib/optional-import.js +12 -8
  120. package/lib/plugin-loader.js +7 -3
  121. package/lib/port-resolver.js +4 -4
  122. package/lib/progress.js +2 -2
  123. package/lib/prompt/index.js +6 -2
  124. package/lib/prompt/types/file-path.js +1 -1
  125. package/lib/pull/features/apig.js +9 -9
  126. package/lib/pull/features/client.js +7 -7
  127. package/lib/pull/features/functions/index.js +15 -15
  128. package/lib/pull/features/index.js +5 -1
  129. package/lib/pull/index.js +4 -4
  130. package/lib/repl-server.js +2 -2
  131. package/lib/serve/features/apig.js +1 -1
  132. package/lib/serve/features/index.js +8 -4
  133. package/lib/serve/index.js +15 -11
  134. package/lib/serve/server/index.js +34 -27
  135. package/lib/serve/server/lib/java/JavaaioServer.java +5 -3
  136. package/lib/serve/server/lib/java/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
  137. package/lib/serve/server/lib/java/lib/catalyst-java-runtime-1.0.0.jar +0 -0
  138. package/lib/serve/server/lib/java/lib/zip4j-2.5.0.jar +0 -0
  139. package/lib/serve/server/lib/master.js +33 -36
  140. package/lib/serve/server/lib/node.js +7 -3
  141. package/lib/serve/server/lib/web_client/index.js +3 -3
  142. package/lib/serve/server/lib/web_client/server.js +22 -19
  143. package/lib/shell/dependencies/http-functions.js +38 -33
  144. package/lib/shell/dependencies/invoker/bio/java/JavabioInvoker.java +14 -3
  145. package/lib/shell/dependencies/invoker/bio/node.js +5 -2
  146. package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +7 -2
  147. package/lib/shell/dependencies/invoker/event/java/JavaeventInvoker.java +7 -2
  148. package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +7 -2
  149. package/lib/shell/dependencies/invoker/integ/node.js +8 -4
  150. package/lib/shell/dependencies/local-function.js +44 -40
  151. package/lib/shell/index.js +12 -12
  152. package/lib/shell/prepare/index.js +2 -2
  153. package/lib/shell/prepare/languages/index.js +5 -1
  154. package/lib/shell/prepare/languages/java.js +1 -1
  155. package/lib/throbber/index.js +17 -17
  156. package/lib/throbber/utils.js +9 -9
  157. package/lib/track.js +7 -7
  158. package/lib/util_modules/config/index.js +5 -1
  159. package/lib/util_modules/constants/lib/auth.js +6 -6
  160. package/lib/util_modules/constants/lib/cliq-handlers.js +2 -2
  161. package/lib/util_modules/constants/lib/template.js +21 -21
  162. package/lib/util_modules/constants/lib/urls.js +11 -11
  163. package/lib/util_modules/context-help.js +15 -15
  164. package/lib/util_modules/fs/index.js +5 -1
  165. package/lib/util_modules/fs/lib/async.js +4 -4
  166. package/lib/util_modules/fs/utils.js +1 -1
  167. package/lib/util_modules/logger.js +2 -2
  168. package/lib/util_modules/parser/toml.js +1 -1
  169. package/lib/util_modules/project.js +6 -6
  170. package/lib/util_modules/server.js +53 -0
  171. package/lib/util_modules/shell.js +4 -4
  172. package/lib/winston.js +5 -5
  173. package/package.json +39 -39
  174. package/scripts/postInstall.js +7 -6
  175. package/templates/init/functions/java/integ/cliq/com/handlers/BotHandler.java +21 -3
  176. package/{docs → templates/init/functions/node/integ/cliq}/.DS_Store +0 -0
  177. package/templates/init/functions/node/integ/cliq/handlers/bot-handler.js +21 -5
  178. package/templates/init/functions/node/integ/cliq/handlers/command-handler.js +3 -3
  179. package/templates/init/functions/node/integ/cliq/package.json +2 -1
  180. package/templates/init/functions/node/integ/cliq/sample.js +3 -1
  181. package/lib/serve/server/lib/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
@@ -36,17 +36,17 @@ command.executionHandler(async (req, res) => {
36
36
 
37
37
  command.suggestionHandler(async (req, res) => {
38
38
  if(comp(req.name,'catalystresource')) {
39
- const suggestion1 = command.newCommandSugestion();
39
+ const suggestion1 = command.newCommandSuggestion();
40
40
  suggestion1.title = 'API doc';
41
41
  suggestion1.description = 'Catalyst API documentation';
42
42
  suggestion1.imageurl = 'https://www.zohowebstatic.com/sites/default/files/styles/product-home-page/public/catalyst-icon.png';
43
43
 
44
- const suggestion2 = command.newCommandSugestion();
44
+ const suggestion2 = command.newCommandSuggestion();
45
45
  suggestion2.title = 'CLI doc';
46
46
  suggestion2.description = 'Catalyst CLI documentation';
47
47
  suggestion2.imageurl = 'https://www.zohowebstatic.com/sites/default/files/styles/product-home-page/public/catalyst-icon.png';
48
48
 
49
- const suggestion3 = command.newCommandSugestion();
49
+ const suggestion3 = command.newCommandSuggestion();
50
50
  suggestion3.title = 'Help docs';
51
51
  suggestion3.description = 'Catalyst help documentation';
52
52
  suggestion3.imageurl = 'https://www.zohowebstatic.com/sites/default/files/styles/product-home-page/public/catalyst-icon.png';
@@ -4,6 +4,7 @@
4
4
  "main": "{{_MAIN_}}",
5
5
  "author": "{{_AUTHOR_}}",
6
6
  "dependencies": {
7
- "zcatalyst-integ-cliq": "latest"
7
+ "zcatalyst-integ-cliq": "latest",
8
+ "zcatalyst-sdk-node": "^2.1.0"
8
9
  }
9
10
  }
@@ -1,9 +1,11 @@
1
1
  'use strict';
2
2
  const Cliq = require('zcatalyst-integ-cliq');
3
+ const catalyst = require('zcatalyst-sdk-node');
3
4
 
4
5
  module.exports = async (request, response) => {
5
6
  try {
6
- const handlerResponse = await Cliq.default(request);
7
+ const app = catalyst.initialize(request);
8
+ const handlerResponse = await Cliq.default(request, app);
7
9
  response.end(handlerResponse);
8
10
  } catch (err) {
9
11
  console.log('Error while executing handler. ', err);