zcatalyst-cli 1.25.2 → 1.26.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 (263) hide show
  1. package/lib/api-timer.d.ts +0 -1
  2. package/lib/apig-utils.d.ts +1 -1
  3. package/lib/apig-utils.js +1 -1
  4. package/lib/appsail-utils.js +80 -13
  5. package/lib/archiver.d.ts +0 -4
  6. package/lib/archiver.js +21 -11
  7. package/lib/authentication/constants/auth.js +1 -1
  8. package/lib/authentication/credential.js +3 -3
  9. package/lib/authentication/index.js +25 -14
  10. package/lib/authentication/login.d.ts +0 -2
  11. package/lib/authentication/login.js +23 -10
  12. package/lib/bin/catalyst.js +17 -7
  13. package/lib/client-utils.d.ts +3 -3
  14. package/lib/client-utils.js +2 -2
  15. package/lib/client.js +19 -9
  16. package/lib/code-deck.d.ts +0 -2
  17. package/lib/code-deck.js +4 -4
  18. package/lib/command_needs/config.js +1 -1
  19. package/lib/command_needs/rc.js +5 -2
  20. package/lib/commands/appsail/add.js +17 -7
  21. package/lib/commands/client/setup.js +17 -7
  22. package/lib/commands/config/set.js +5 -3
  23. package/lib/commands/deploy/appsail.js +37 -14
  24. package/lib/commands/deploy/index.js +88 -66
  25. package/lib/commands/deploy/slate.js +37 -14
  26. package/lib/commands/event/generate/integ.js +18 -9
  27. package/lib/commands/functions/add.js +17 -7
  28. package/lib/commands/functions/execute.js +17 -7
  29. package/lib/commands/functions/setup.js +17 -7
  30. package/lib/commands/functions/shell.js +17 -7
  31. package/lib/commands/iac/import.js +18 -8
  32. package/lib/commands/iac/pack.js +17 -7
  33. package/lib/commands/iac/status.js +17 -7
  34. package/lib/commands/index.js +20 -12
  35. package/lib/commands/init.js +17 -7
  36. package/lib/commands/login.js +17 -7
  37. package/lib/commands/logout.js +17 -7
  38. package/lib/commands/project/list.js +17 -7
  39. package/lib/commands/project/use.js +1 -0
  40. package/lib/commands/pull.js +17 -7
  41. package/lib/commands/run.js +17 -7
  42. package/lib/commands/serve.js +17 -7
  43. package/lib/commands/signals/generate/index.js +1 -1
  44. package/lib/commands/slate/create.js +17 -7
  45. package/lib/commands/slate/link.js +18 -7
  46. package/lib/commands/slate/unlink.js +16 -4
  47. package/lib/commands/token/generate.js +17 -7
  48. package/lib/commands/token/list.js +17 -7
  49. package/lib/commands/token/revoke.js +17 -7
  50. package/lib/commands/zest/generate/index.js +21 -11
  51. package/lib/deploy/features/appsail/index.js +2 -3
  52. package/lib/deploy/features/appsail/pack.d.ts +0 -1
  53. package/lib/deploy/features/appsail/pack.js +2 -3
  54. package/lib/deploy/features/appsail/utils.js +7 -8
  55. package/lib/deploy/features/functions/languages/index.js +3 -4
  56. package/lib/deploy/features/index.js +17 -7
  57. package/lib/deploy/features/slate.js +2 -3
  58. package/lib/deploy/index.js +2 -2
  59. package/lib/deploy/util.d.ts +2 -0
  60. package/lib/deploy/util.js +3 -1
  61. package/lib/docs/commands/signals/generate/generate.toml +19 -0
  62. package/lib/docs/commands/slate/unlink.toml +9 -0
  63. package/lib/docs/fn-utils/lib/node.toml +4 -0
  64. package/lib/docs/init/dependencies/python/ensure-python.toml +4 -0
  65. package/lib/docs/serve/server/lib/slate/index.toml +15 -0
  66. package/lib/docs/slate-utils.toml +9 -0
  67. package/lib/endpoints/index.d.ts +2 -1
  68. package/lib/endpoints/index.js +88 -79
  69. package/lib/endpoints/lib/apig.d.ts +0 -1
  70. package/lib/endpoints/lib/apig.js +2 -2
  71. package/lib/endpoints/lib/applogic.d.ts +0 -1
  72. package/lib/endpoints/lib/applogic.js +2 -2
  73. package/lib/endpoints/lib/appsail.d.ts +1 -4
  74. package/lib/endpoints/lib/appsail.js +7 -7
  75. package/lib/endpoints/lib/client.d.ts +0 -1
  76. package/lib/endpoints/lib/code-deck.js +1 -1
  77. package/lib/endpoints/lib/common.d.ts +0 -2
  78. package/lib/endpoints/lib/ds-bulk.js +2 -2
  79. package/lib/endpoints/lib/env.js +2 -2
  80. package/lib/endpoints/lib/filestore.d.ts +0 -1
  81. package/lib/endpoints/lib/functions.d.ts +0 -1
  82. package/lib/endpoints/lib/functions.js +2 -2
  83. package/lib/endpoints/lib/git-hub.d.ts +0 -2
  84. package/lib/endpoints/lib/iac.d.ts +0 -3
  85. package/lib/endpoints/lib/iac.js +2 -2
  86. package/lib/endpoints/lib/project.d.ts +0 -1
  87. package/lib/endpoints/lib/project.js +2 -2
  88. package/lib/endpoints/lib/sdk.d.ts +0 -2
  89. package/lib/endpoints/lib/sdk.js +1 -1
  90. package/lib/endpoints/lib/slate.d.ts +0 -1
  91. package/lib/endpoints/lib/stratus.d.ts +0 -1
  92. package/lib/endpoints/lib/user.d.ts +0 -2
  93. package/lib/endpoints/lib/user.js +2 -1
  94. package/lib/error/context-help.js +1 -1
  95. package/lib/error/index.js +2 -2
  96. package/lib/event_generate/cache.js +4 -4
  97. package/lib/event_generate/custom.js +1 -2
  98. package/lib/event_generate/datastore.js +4 -4
  99. package/lib/event_generate/filestore.js +4 -4
  100. package/lib/event_generate/github.js +2 -2
  101. package/lib/event_generate/index.js +19 -11
  102. package/lib/event_generate/stratus.js +2 -2
  103. package/lib/event_generate/user.js +2 -2
  104. package/lib/event_generate/webapp.js +2 -2
  105. package/lib/execute/caller.d.ts +0 -1
  106. package/lib/execute/caller.js +20 -7
  107. package/lib/execute/index.js +27 -4
  108. package/lib/execute-script.js +22 -13
  109. package/lib/express_middlewares/auth-checker.js +2 -3
  110. package/lib/express_middlewares/project.d.ts +1 -1
  111. package/lib/fn-utils/index.js +17 -7
  112. package/lib/fn-utils/lib/browserLogic.js +4 -5
  113. package/lib/fn-utils/lib/common.d.ts +0 -1
  114. package/lib/fn-utils/lib/common.js +25 -26
  115. package/lib/fn-utils/lib/integ.js +2 -3
  116. package/lib/fn-utils/lib/java/classpath.js +2 -3
  117. package/lib/fn-utils/lib/java/compile.js +4 -4
  118. package/lib/fn-utils/lib/java/ensure-java-userconfig.d.ts +10 -0
  119. package/lib/fn-utils/lib/java/ensure-java-userconfig.js +45 -23
  120. package/lib/fn-utils/lib/java/index.d.ts +0 -1
  121. package/lib/fn-utils/lib/java/index.js +11 -11
  122. package/lib/fn-utils/lib/java/keywords.js +2 -2
  123. package/lib/fn-utils/lib/node.d.ts +1 -1
  124. package/lib/fn-utils/lib/node.js +67 -15
  125. package/lib/fn-utils/lib/python.js +29 -19
  126. package/lib/iac/status/util/index.d.ts +1 -1
  127. package/lib/init/dependencies/npm-install.js +2 -2
  128. package/lib/init/dependencies/python/ensure-python.d.ts +2 -2
  129. package/lib/init/dependencies/python/ensure-python.js +65 -58
  130. package/lib/init/dependencies/python/pip-install.d.ts +3 -5
  131. package/lib/init/dependencies/python/pip-install.js +14 -53
  132. package/lib/init/features/appsail/utils.js +21 -12
  133. package/lib/init/features/client/index.js +18 -9
  134. package/lib/init/features/client/initializers/angular.js +17 -7
  135. package/lib/init/features/client/initializers/basic.js +17 -7
  136. package/lib/init/features/client/initializers/lyte.js +17 -7
  137. package/lib/init/features/client/initializers/react.js +17 -7
  138. package/lib/init/features/index.js +29 -20
  139. package/lib/init/features/project.js +5 -5
  140. package/lib/init/features/slate/index.js +198 -69
  141. package/lib/init/util/client.js +23 -13
  142. package/lib/init/util/common.js +5 -6
  143. package/lib/init/util/project.js +1 -1
  144. package/lib/internal/api.d.ts +0 -3
  145. package/lib/internal/api.js +19 -9
  146. package/lib/internal/command.js +18 -9
  147. package/lib/migration/global/1.25.0.d.ts +2 -0
  148. package/lib/migration/global/1.25.0.js +28 -0
  149. package/lib/migration/index.js +20 -12
  150. package/lib/option-filter.js +19 -10
  151. package/lib/optional-import.js +19 -10
  152. package/lib/plugin-loader.d.ts +0 -2
  153. package/lib/plugin-loader.js +18 -8
  154. package/lib/port-resolver.js +10 -10
  155. package/lib/prompt/index.d.ts +3 -3
  156. package/lib/prompt/index.js +17 -7
  157. package/lib/prompt/types/file-path.d.ts +0 -1
  158. package/lib/prompt/types/search-box.d.ts +0 -1
  159. package/lib/prompt/types/tree.d.ts +1 -2
  160. package/lib/prompt/types/tree.js +10 -10
  161. package/lib/prompt/types/with-description.d.ts +0 -1
  162. package/lib/pull/features/functions/index.js +71 -52
  163. package/lib/pull/features/functions/languages.js +3 -4
  164. package/lib/pull/features/index.js +17 -7
  165. package/lib/repl-server.d.ts +0 -1
  166. package/lib/repl-server.js +9 -1
  167. package/lib/serve/features/apig.js +19 -1
  168. package/lib/serve/features/appsail.d.ts +1 -0
  169. package/lib/serve/features/appsail.js +51 -7
  170. package/lib/serve/features/index.js +22 -13
  171. package/lib/serve/index.js +20 -7
  172. package/lib/serve/server/index.d.ts +0 -2
  173. package/lib/serve/server/index.js +26 -12
  174. package/lib/serve/server/lib/appsail/index.js +31 -37
  175. package/lib/serve/server/lib/appsail/start.js +12 -5
  176. package/lib/serve/server/lib/appsail/util.d.ts +11 -0
  177. package/lib/serve/server/lib/appsail/util.js +69 -0
  178. package/lib/serve/server/lib/java/index.js +18 -7
  179. package/lib/serve/server/lib/master/appsail.js +3 -4
  180. package/lib/serve/server/lib/master/functions.js +1 -2
  181. package/lib/serve/server/lib/master/index.d.ts +0 -1
  182. package/lib/serve/server/lib/master/index.js +5 -5
  183. package/lib/serve/server/lib/master/slate.js +1 -2
  184. package/lib/serve/server/lib/master/unknown-req-proxy.js +5 -2
  185. package/lib/serve/server/lib/master/utils.d.ts +4 -8
  186. package/lib/serve/server/lib/master/utils.js +4 -6
  187. package/lib/serve/server/lib/master/web-client.js +1 -2
  188. package/lib/serve/server/lib/node/index.js +22 -11
  189. package/lib/serve/server/lib/node/server/browserlogic/utils/playwright-handler.js +1 -1
  190. package/lib/serve/server/lib/node/server/browserlogic/utils/puppeteer-handler.js +1 -1
  191. package/lib/serve/server/lib/node/server/browserlogic/utils/selenium-handler.js +2 -0
  192. package/lib/serve/server/lib/python/index.js +23 -14
  193. package/lib/serve/server/lib/slate/static-server.d.ts +0 -1
  194. package/lib/serve/server/lib/slate/static-server.js +5 -4
  195. package/lib/serve/server/lib/web_client/server.d.ts +0 -1
  196. package/lib/serve/server/lib/web_client/server.js +5 -4
  197. package/lib/shell/dependencies/http-functions.d.ts +0 -2
  198. package/lib/shell/dependencies/http-functions.js +7 -7
  199. package/lib/shell/dependencies/non-http-function/fn-execution-handler.d.ts +0 -2
  200. package/lib/shell/dependencies/non-http-function/fn-execution-handler.js +55 -24
  201. package/lib/shell/dependencies/non-http-function/fn-handler.d.ts +3 -3
  202. package/lib/shell/dependencies/non-http-function/fn-handler.js +54 -20
  203. package/lib/shell/dependencies/non-http-function/node.js +4 -4
  204. package/lib/shell/dependencies/non-http-function/python.d.ts +1 -1
  205. package/lib/shell/dependencies/non-http-function/python.js +11 -13
  206. package/lib/shell/dependencies/non-http-function/slave-manager.d.ts +0 -2
  207. package/lib/shell/dependencies/non-http-function/slave-manager.js +11 -7
  208. package/lib/shell/dependencies/tunnel-server.js +4 -4
  209. package/lib/shell/index.js +50 -3
  210. package/lib/shell/prepare/index.js +4 -3
  211. package/lib/shell/prepare/languages/index.js +18 -9
  212. package/lib/shell/prepare/languages/node.js +29 -19
  213. package/lib/shell/prepare/languages/python.js +6 -12
  214. package/lib/signals/index.js +19 -11
  215. package/lib/slate-utils.js +4 -3
  216. package/lib/throbber/index.d.ts +1 -2
  217. package/lib/throbber/index.js +5 -2
  218. package/lib/throbber/utils.d.ts +0 -1
  219. package/lib/throbber/utils.js +4 -5
  220. package/lib/userConfig.d.ts +14 -0
  221. package/lib/userConfig.js +15 -1
  222. package/lib/util_modules/config/index.js +17 -7
  223. package/lib/util_modules/config/lib/apig.d.ts +1 -0
  224. package/lib/util_modules/config/lib/apig.js +10 -5
  225. package/lib/util_modules/config/lib/appsail.js +7 -7
  226. package/lib/util_modules/config/lib/client.js +5 -6
  227. package/lib/util_modules/config/lib/functions.js +5 -6
  228. package/lib/util_modules/config/lib/slate.js +5 -6
  229. package/lib/util_modules/config-store.d.ts +1 -1
  230. package/lib/util_modules/config-store.js +30 -13
  231. package/lib/util_modules/constants/lib/apig-rules.d.ts +1 -1
  232. package/lib/util_modules/constants/lib/dc-type.js +3 -3
  233. package/lib/util_modules/constants/lib/placeholders.d.ts +1 -1
  234. package/lib/util_modules/constants/lib/placeholders.js +1 -1
  235. package/lib/util_modules/constants/lib/urls.js +2 -9
  236. package/lib/util_modules/container.js +23 -14
  237. package/lib/util_modules/dc.js +3 -4
  238. package/lib/util_modules/env.d.ts +3 -0
  239. package/lib/util_modules/env.js +64 -4
  240. package/lib/util_modules/event-emitter.d.ts +9 -0
  241. package/lib/util_modules/event-emitter.js +68 -0
  242. package/lib/util_modules/fs/index.js +17 -7
  243. package/lib/util_modules/fs/lib/async.d.ts +0 -4
  244. package/lib/util_modules/fs/lib/async.js +46 -46
  245. package/lib/util_modules/fs/lib/sync.d.ts +1 -3
  246. package/lib/util_modules/fs/lib/sync.js +40 -30
  247. package/lib/util_modules/logger/index.js +12 -12
  248. package/lib/util_modules/logger/utils.d.ts +0 -4
  249. package/lib/util_modules/logger/utils.js +1 -1
  250. package/lib/util_modules/logger/winston.js +2 -2
  251. package/lib/util_modules/option.js +5 -6
  252. package/lib/util_modules/project.js +22 -23
  253. package/lib/util_modules/runtime-store.d.ts +2 -2
  254. package/lib/util_modules/server.d.ts +1 -2
  255. package/lib/util_modules/server.js +54 -15
  256. package/lib/util_modules/shell.d.ts +0 -3
  257. package/lib/util_modules/shell.js +5 -6
  258. package/lib/util_modules/toml.js +2 -3
  259. package/package.json +13 -13
  260. package/templates/init/functions/java/event/sample.java +5 -2
  261. package/templates/web-socket.txt +1 -1
  262. /package/lib/docs/{commands/event/generate → event_generate}/index.toml +0 -0
  263. /package/templates/init/functions/java/integ/convokraft/{Sample.java → sample.java} +0 -0
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -43,8 +53,7 @@ const config_store_js_1 = __importDefault(require("../util_modules/config-store.
43
53
  const rc_1 = __importDefault(require("../internal/rc"));
44
54
  const fs_1 = require("../util_modules/fs");
45
55
  const index_1 = require("../util_modules/logger/index");
46
- const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0, function* () {
47
- var _a;
56
+ const runMigration = (rc_2, migFiles_1, ...args_1) => __awaiter(void 0, [rc_2, migFiles_1, ...args_1], void 0, function* (rc, migFiles, idx = 0) {
48
57
  if (migFiles.length <= idx) {
49
58
  return Promise.resolve();
50
59
  }
@@ -55,7 +64,7 @@ const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0
55
64
  return runMigration(rc, migFiles, ++idx);
56
65
  }
57
66
  try {
58
- const migModule = yield (_a = migFile, Promise.resolve().then(() => __importStar(require(_a))));
67
+ const migModule = yield Promise.resolve(`${migFile}`).then(s => __importStar(require(s)));
59
68
  if (migModule.isRequire()) {
60
69
  (0, index_1.debug)('migration started for v' + currentMigFileVersion);
61
70
  migModule.migrate();
@@ -84,7 +93,6 @@ const runMigration = (rc, migFiles, idx = 0) => __awaiter(void 0, void 0, void 0
84
93
  return runMigration(rc, migFiles, ++idx);
85
94
  });
86
95
  const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, function* () {
87
- var _b;
88
96
  if (migFiles.length === 0) {
89
97
  return;
90
98
  }
@@ -98,7 +106,7 @@ const runGlobalMigration = (migFiles) => __awaiter(void 0, void 0, void 0, funct
98
106
  return runGlobalMigration(migFiles);
99
107
  }
100
108
  try {
101
- const migModule = yield (_b = migFile, Promise.resolve().then(() => __importStar(require(_b))));
109
+ const migModule = yield Promise.resolve(`${migFile}`).then(s => __importStar(require(s)));
102
110
  if (migModule.isRequire()) {
103
111
  (0, index_1.debug)('migration started for v' + currentMigFileVersion);
104
112
  migModule.migrate();
@@ -15,18 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.filterTargets = exports.filterPorts = void 0;
39
+ exports.filterPorts = filterPorts;
40
+ exports.filterTargets = filterTargets;
30
41
  const ansi_colors_1 = require("ansi-colors");
31
42
  const index_js_1 = __importDefault(require("./error/index.js"));
32
43
  const runtime_store_1 = __importDefault(require("./runtime-store"));
@@ -238,7 +249,6 @@ function filterPorts() {
238
249
  runtime_store_1.default.set(`context.port.debug.${res.target.target}.${res.filter}`, res.specific);
239
250
  });
240
251
  }
241
- exports.filterPorts = filterPorts;
242
252
  function filterTargets({ pathSense = true, target } = {}) {
243
253
  const validTargetResultants = validateTargets(target);
244
254
  const config = runtime_store_1.default.get('config');
@@ -303,4 +313,3 @@ function filterTargets({ pathSense = true, target } = {}) {
303
313
  runtime_store_1.default.set('context.targets', targets);
304
314
  return targets;
305
315
  }
306
- exports.filterTargets = filterTargets;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -42,7 +52,6 @@ const async_js_1 = require("./util_modules/fs/lib/async.js");
42
52
  const index_js_1 = __importDefault(require("./error/index.js"));
43
53
  const ansi_colors_1 = require("ansi-colors");
44
54
  exports.default = (name, source) => __awaiter(void 0, void 0, void 0, function* () {
45
- var _a, _b;
46
55
  if (name === (0, path_1.basename)(name)) {
47
56
  const projectModulePath = (0, project_js_1.resolveProjectPath)((0, path_1.join)(source, 'node_modules', name));
48
57
  const projectModulePathExists = yield (0, async_js_1.dirExists)(projectModulePath);
@@ -54,7 +63,7 @@ exports.default = (name, source) => __awaiter(void 0, void 0, void 0, function*
54
63
  });
55
64
  }
56
65
  app_module_path_1.default.addPath(projectModulePath);
57
- return _a = projectModulePath, Promise.resolve().then(() => __importStar(require(_a)));
66
+ return Promise.resolve(`${projectModulePath}`).then(s => __importStar(require(s)));
58
67
  }
59
68
  const projectModulePath = (0, project_js_1.resolveProjectPath)(name);
60
69
  const projectModulePathExists = yield (0, async_js_1.dirExists)(projectModulePath);
@@ -66,5 +75,5 @@ exports.default = (name, source) => __awaiter(void 0, void 0, void 0, function*
66
75
  });
67
76
  }
68
77
  app_module_path_1.default.addPath(projectModulePath);
69
- return _b = projectModulePath, Promise.resolve().then(() => __importStar(require(_b)));
78
+ return Promise.resolve(`${projectModulePath}`).then(s => __importStar(require(s)));
70
79
  });
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { ChildProcess } from 'child_process';
4
2
  import type { Stream } from 'stream';
5
3
  export type IPlugin = (...args: Array<unknown>) => Promise<ChildProcess | EventListener | boolean | string | Stream>;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -35,6 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
46
  };
37
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.default = pluginLoader;
38
49
  const ansi_colors_1 = require("ansi-colors");
39
50
  const index_js_1 = __importDefault(require("./error/index.js"));
40
51
  const optional_import_js_1 = __importDefault(require("./optional-import.js"));
@@ -95,4 +106,3 @@ function pluginLoader(feature, name, source) {
95
106
  return;
96
107
  });
97
108
  }
98
- exports.default = pluginLoader;
@@ -37,8 +37,8 @@ class PortResolver {
37
37
  static freePort(port) {
38
38
  __classPrivateFieldGet(this, _a, "f", _PortResolver_takenPorts).delete(port);
39
39
  }
40
- static getFreePort(startPort, searchSpan = 0, dupCheck = false) {
41
- return __awaiter(this, void 0, void 0, function* () {
40
+ static getFreePort(startPort_1) {
41
+ return __awaiter(this, arguments, void 0, function* (startPort, searchSpan = 0, dupCheck = false) {
42
42
  if (searchSpan < 0) {
43
43
  throw new Error('unable to find port. searchSpan has reached the bottom line');
44
44
  }
@@ -46,18 +46,18 @@ class PortResolver {
46
46
  port: startPort,
47
47
  stopPort: startPort + searchSpan
48
48
  });
49
- if (__classPrivateFieldGet(PortResolver, _a, "m", _PortResolver_isPortTaken).call(PortResolver, port)) {
49
+ if (__classPrivateFieldGet(_a, _a, "m", _PortResolver_isPortTaken).call(_a, port)) {
50
50
  if (dupCheck) {
51
- return PortResolver.getFreePort(port + 1, searchSpan - (port - startPort), dupCheck);
51
+ return _a.getFreePort(port + 1, searchSpan - (port - startPort), dupCheck);
52
52
  }
53
53
  return port;
54
54
  }
55
- __classPrivateFieldGet(PortResolver, _a, "f", _PortResolver_takenPorts).add(port);
55
+ __classPrivateFieldGet(_a, _a, "f", _PortResolver_takenPorts).add(port);
56
56
  return port;
57
57
  });
58
58
  }
59
- static getPort(feature, type, { name = '', duplicateCheck = true, searchSpan = 20, fallbackNeeded = true, server } = {}) {
60
- return __awaiter(this, void 0, void 0, function* () {
59
+ static getPort(feature_1, type_1) {
60
+ return __awaiter(this, arguments, void 0, function* (feature, type, { name = '', duplicateCheck = true, searchSpan = 20, fallbackNeeded = true, server } = {}) {
61
61
  let port = parseInt(runtime_store_1.default.get(`context.port.${type}.${feature}.${name}`), 10);
62
62
  port = isNaN(port) ? parseInt(runtime_store_1.default.get(`context.port.${type}.${feature}`), 10) : port;
63
63
  if (isNaN(port)) {
@@ -93,7 +93,7 @@ class PortResolver {
93
93
  }
94
94
  let finalPort = port;
95
95
  try {
96
- finalPort = yield PortResolver.getFreePort(port, searchSpan, duplicateCheck);
96
+ finalPort = yield _a.getFreePort(port, searchSpan, duplicateCheck);
97
97
  }
98
98
  catch (e) {
99
99
  if (searchSpan === 0) {
@@ -126,8 +126,8 @@ class PortResolver {
126
126
  });
127
127
  }
128
128
  }
129
- exports.default = PortResolver;
130
129
  _a = PortResolver, _PortResolver_isPortTaken = function _PortResolver_isPortTaken(port) {
131
- return __classPrivateFieldGet(PortResolver, _a, "f", _PortResolver_takenPorts).has(port);
130
+ return __classPrivateFieldGet(_a, _a, "f", _PortResolver_takenPorts).has(port);
132
131
  };
133
132
  _PortResolver_takenPorts = { value: new Set() };
133
+ exports.default = PortResolver;
@@ -22,13 +22,13 @@ export interface IQuestion extends inquirer.Question, inquirer.ListQuestionOptio
22
22
  }
23
23
  export type TSeparator = Separator;
24
24
  declare const _default: {
25
- register: (type: 'file-path' | 'tree' | 'search-box' | 'with-desc') => Promise<void>;
26
- deregister: (type: 'file-path' | 'tree' | 'search-box') => void;
25
+ register: (type: "file-path" | "tree" | "search-box" | "with-desc") => Promise<void>;
26
+ deregister: (type: "file-path" | "tree" | "search-box") => void;
27
27
  separator: (line: string) => TSeparator;
28
28
  choice: (name: string, { id, value, short, disabled, checked, ...otherOpts }?: IChoice) => IChoice;
29
29
  ask: (...questions: Array<IQuestion>) => (Promise<inquirer.Answers> & {
30
30
  ui: PromptUI;
31
31
  }) | Promise<inquirer.Answers>;
32
- question: (name: string, question: string, { type, defaultAns, choices, validate, filter, when, prefix, suffix, ...otheropts }?: Omit<IQuestion, 'name'>) => IQuestion;
32
+ question: (name: string, question: string, { type, defaultAns, choices, validate, filter, when, prefix, suffix, ...otheropts }?: Omit<IQuestion, "name">) => IQuestion;
33
33
  };
34
34
  export default _default;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import InquirerAutocomplete from 'inquirer-autocomplete-prompt';
3
2
  import { Answers } from 'inquirer';
4
3
  import { Interface } from 'readline';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import inquirer, { Answers, Question } from 'inquirer';
3
2
  import Choice from 'inquirer/lib/objects/choice';
4
3
  import Choices from 'inquirer/lib/objects/choices';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Answers } from 'inquirer';
3
2
  import BasePrompt from 'inquirer/lib/prompts/base.js';
4
3
  import Paginator from 'inquirer/lib/utils/paginator.js';
@@ -23,7 +22,7 @@ export declare class TreeNode {
23
22
  }) | TreeNode>;
24
23
  activeIdx: number;
25
24
  prevActiveIdx: number;
26
- nodes: string[];
25
+ nodes: Array<string>;
27
26
  level: number;
28
27
  get indent(): number;
29
28
  constructor(root?: string);
@@ -7,7 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
- var _TreeNode_instances, _TreeNode_constructNodes;
10
+ var _TreeNode_instances, _a, _TreeNode_constructNodes;
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TreeNode = void 0;
13
13
  const ansi_colors_1 = require("ansi-colors");
@@ -40,7 +40,7 @@ class TreeNode {
40
40
  this.root = root;
41
41
  }
42
42
  addNode(node) {
43
- if (node instanceof TreeNode) {
43
+ if (node instanceof _a) {
44
44
  this.leaves.push(node);
45
45
  }
46
46
  else {
@@ -73,7 +73,7 @@ class TreeNode {
73
73
  }
74
74
  openTree(strict = false) {
75
75
  const activeLeaf = this.leaves[this.activeIdx];
76
- if (!(activeLeaf instanceof TreeNode)) {
76
+ if (!(activeLeaf instanceof _a)) {
77
77
  if (!activeLeaf.expand || strict) {
78
78
  return ETreeState.CLOSED;
79
79
  }
@@ -107,16 +107,16 @@ class TreeNode {
107
107
  }
108
108
  closeTree() {
109
109
  const activeLeaf = this.leaves[this.activeIdx];
110
- if (!(activeLeaf instanceof TreeNode) || !activeLeaf.open) {
110
+ if (!(activeLeaf instanceof _a) || !activeLeaf.open) {
111
111
  return;
112
112
  }
113
113
  const subActive = activeLeaf.leaves[activeLeaf.activeIdx];
114
- if (subActive instanceof TreeNode && subActive.open) {
114
+ if (subActive instanceof _a && subActive.open) {
115
115
  activeLeaf.closeTree();
116
116
  this.nodes[this.activeIdx] = this.nodes[this.activeIdx].replace(/\n{1}[\s\S]*/m, '\n' + activeLeaf.buildTree({ force: true }));
117
117
  return;
118
118
  }
119
- else if (!(subActive instanceof TreeNode) && subActive.expand && subActive.isExpanded) {
119
+ else if (!(subActive instanceof _a) && subActive.expand && subActive.isExpanded) {
120
120
  activeLeaf.nodes[activeLeaf.activeIdx] = this.wrapLine('+ ' + subActive.display, activeLeaf.indent - 2);
121
121
  this.nodes[this.activeIdx] =
122
122
  this.nodes[this.activeIdx].split('\n')[0] + '\n' + activeLeaf.buildTree();
@@ -130,7 +130,7 @@ class TreeNode {
130
130
  }
131
131
  moveActive(distance = 0) {
132
132
  const activeLeaf = this.leaves[this.activeIdx];
133
- if (activeLeaf instanceof TreeNode && activeLeaf.open) {
133
+ if (activeLeaf instanceof _a && activeLeaf.open) {
134
134
  activeLeaf.moveActive(distance);
135
135
  const subTree = activeLeaf.buildTree();
136
136
  this.nodes[this.activeIdx] =
@@ -158,7 +158,7 @@ class TreeNode {
158
158
  }
159
159
  getValue() {
160
160
  const activeLeaf = this.leaves[this.activeIdx];
161
- if (activeLeaf instanceof TreeNode) {
161
+ if (activeLeaf instanceof _a) {
162
162
  return activeLeaf.getValue();
163
163
  }
164
164
  return activeLeaf;
@@ -174,9 +174,9 @@ class TreeNode {
174
174
  }
175
175
  }
176
176
  exports.TreeNode = TreeNode;
177
- _TreeNode_instances = new WeakSet(), _TreeNode_constructNodes = function _TreeNode_constructNodes() {
177
+ _a = TreeNode, _TreeNode_instances = new WeakSet(), _TreeNode_constructNodes = function _TreeNode_constructNodes() {
178
178
  const nodes = this.leaves.map((leaf) => {
179
- if (leaf instanceof TreeNode) {
179
+ if (leaf instanceof _a) {
180
180
  const rootNode = this.wrapLine((leaf.open ? figures.arrowDown : figures.arrowRight) + ' ' + leaf.root, this.indent - 2);
181
181
  const subNodes = leaf.open ? '\n' + leaf.nodes.join('\n') : '';
182
182
  return rootNode + subNodes;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Answers, ListQuestionOptions } from 'inquirer';
3
2
  import Choices from 'inquirer/lib/objects/choices';
4
3
  import ListPrompt from 'inquirer/lib/prompts/list.js';
@@ -115,7 +115,7 @@ exports.default = (_fns) => __awaiter(void 0, void 0, void 0, function* () {
115
115
  }
116
116
  })));
117
117
  const dirOverwriteAns = yield prompt_1.default.ask(...dirOverwriteQns);
118
- let targets = fns.filter((fn) => {
118
+ const targets = fns.filter((fn) => {
119
119
  if (dirOverwriteAns[fn.name] === undefined || dirOverwriteAns[fn.name]) {
120
120
  return true;
121
121
  }
@@ -131,66 +131,85 @@ exports.default = (_fns) => __awaiter(void 0, void 0, void 0, function* () {
131
131
  yield fs_1.ASYNC.deleteDir(fn.source);
132
132
  }
133
133
  throbber.add('function_pull_' + fn.name, {
134
- text: `extracting function [${fn.name}]`
134
+ text: `pulling function [${fn.name}]`
135
135
  });
136
136
  }));
137
137
  runtime_store_1.default.set('context.functions.targets', targets);
138
- let isFnPulled = false;
139
138
  let isFnPulledFailed = false;
140
- targets = yield Promise.all(targets.map((fn) => __awaiter(void 0, void 0, void 0, function* () {
141
- var _a, _b, _c;
142
- try {
143
- yield fs_1.ASYNC.ensureDir(fn.source);
144
- const buffer = (yield fnAPI.download(fn.id));
145
- yield new archiver_1.default().load(buffer).extract((0, path_1.join)(fnDirPath, fn.name)).finalize();
146
- if ((_a = fn.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.node.value)) {
147
- yield (0, languages_1.node)(fn);
148
- }
149
- else if ((_b = fn.stack) === null || _b === void 0 ? void 0 : _b.startsWith(runtime_1.default.language.java.value)) {
150
- const binPath = yield (0, ensure_java_userconfig_1.ensureJava)(fn.stack);
151
- if (binPath) {
152
- yield (0, languages_1.java)(fn);
153
- }
154
- else {
155
- fn.valid = false;
156
- fn.failure_reason = 'unable to detect the java bin path';
139
+ let pulledFns = [];
140
+ const batchSize = 5;
141
+ while (targets.length > 0) {
142
+ (0, index_1.debug)('Pulling a batch of functions. Remaining functions: ' + targets.length);
143
+ const limit = targets.length > batchSize ? batchSize : targets.length;
144
+ const targetBatch = targets.splice(0, limit);
145
+ const _targets = yield Promise.all(targetBatch.map((fn) => __awaiter(void 0, void 0, void 0, function* () {
146
+ var _a, _b, _c;
147
+ try {
148
+ const spinnerName = 'function_pull_' + fn.name;
149
+ yield fs_1.ASYNC.ensureDir(fn.source);
150
+ throbber.hasSpinner(spinnerName) &&
151
+ throbber.update(spinnerName, {
152
+ text: `downloading function [${fn.name}]`
153
+ });
154
+ const buffer = (yield fnAPI.download(fn.id));
155
+ throbber.hasSpinner(spinnerName) &&
156
+ throbber.update(spinnerName, {
157
+ text: `extracting function [${fn.name}]`
158
+ });
159
+ yield new archiver_1.default().load(buffer).extract((0, path_1.join)(fnDirPath, fn.name)).finalize();
160
+ throbber.hasSpinner(spinnerName) &&
161
+ throbber.update(spinnerName, {
162
+ text: `finishing pull of function [${fn.name}]`
163
+ });
164
+ if ((_a = fn.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.node.value)) {
165
+ yield (0, languages_1.node)(fn);
157
166
  }
158
- }
159
- else if ((_c = fn.stack) === null || _c === void 0 ? void 0 : _c.startsWith(runtime_1.default.language.python.value)) {
160
- yield (0, languages_1.python)(fn);
161
- const reqFile = (0, path_1.join)(fn.source, constants_1.FILENAME.functions.python_requirements);
162
- const requirementsExists = yield fs_1.ASYNC.readFile(reqFile);
163
- if (requirementsExists && fn.valid) {
164
- try {
165
- yield (0, python_1.removeRequirements)(reqFile, fn);
167
+ else if ((_b = fn.stack) === null || _b === void 0 ? void 0 : _b.startsWith(runtime_1.default.language.java.value)) {
168
+ const binPath = yield (0, ensure_java_userconfig_1.ensureJava)(fn.stack);
169
+ if (binPath) {
170
+ yield (0, languages_1.java)(fn);
166
171
  }
167
- catch (e) {
168
- const err = error_1.default.getErrorInstance(e);
169
- (fn.valid = false), (fn.failure_reason = err.message);
172
+ else {
173
+ fn.valid = false;
174
+ fn.failure_reason = 'unable to detect the java bin path';
175
+ }
176
+ }
177
+ else if ((_c = fn.stack) === null || _c === void 0 ? void 0 : _c.startsWith(runtime_1.default.language.python.value)) {
178
+ yield (0, languages_1.python)(fn);
179
+ const reqFile = (0, path_1.join)(fn.source, constants_1.FILENAME.functions.python_requirements);
180
+ const requirementsExists = yield fs_1.ASYNC.readFile(reqFile);
181
+ if (requirementsExists && fn.valid) {
182
+ try {
183
+ yield (0, python_1.removeRequirements)(reqFile, fn);
184
+ }
185
+ catch (e) {
186
+ const err = error_1.default.getErrorInstance(e);
187
+ (fn.valid = false), (fn.failure_reason = err.message);
188
+ }
170
189
  }
171
190
  }
191
+ const catalystJsonPth = (0, path_1.join)(fn.source, constants_1.FILENAME.catalyst_config);
192
+ const catalystJson = yield fs_1.ASYNC.readJSONFile(catalystJsonPth);
193
+ const fnDetails = (yield fnAPI.getFunction(fn.id));
194
+ const envVariables = js_1.JS.get(fnDetails, 'configuration.environment.variables', false);
195
+ if (catalystJson && envVariables) {
196
+ catalystJson.deployment.env_variables = envVariables;
197
+ yield fs_1.ASYNC.writeJSONFile(catalystJsonPth, catalystJson);
198
+ }
172
199
  }
173
- const catalystJsonPth = (0, path_1.join)(fn.source, constants_1.FILENAME.catalyst_config);
174
- const catalystJson = yield fs_1.ASYNC.readJSONFile(catalystJsonPth);
175
- const fnDetails = (yield fnAPI.getFunction(fn.id));
176
- const envVariables = js_1.JS.get(fnDetails, 'configuration.environment.variables', false);
177
- if (catalystJson && envVariables) {
178
- catalystJson.deployment.env_variables = envVariables;
179
- yield fs_1.ASYNC.writeJSONFile(catalystJsonPth, catalystJson);
200
+ catch (err) {
201
+ const error = err;
202
+ throbber.remove('function_pull_' + fn.name);
203
+ (0, index_1.warning)(`Skipping pull of function(${fn.name}). ${error.message}`);
204
+ fn.failure_reason = `there was an error while pulling function [${fn.name}]. ${error.message}`;
205
+ isFnPulledFailed = true;
180
206
  }
181
- isFnPulled = true;
182
- }
183
- catch (err) {
184
- const error = err;
185
207
  throbber.remove('function_pull_' + fn.name);
186
- (0, index_1.warning)(`Skipping pull of function(${fn.name}). ${error.message}`);
187
- fn.failure_reason = `there was an error while pulling function [${fn.name}]. ${error.message}`;
188
- isFnPulledFailed = true;
189
- }
190
- throbber.remove('function_pull_' + fn.name);
191
- return fn;
192
- })));
193
- targets = targets.filter((target) => {
208
+ return fn;
209
+ })));
210
+ pulledFns.push(..._targets);
211
+ }
212
+ pulledFns = pulledFns.filter((target) => {
194
213
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
195
214
  if (!target.valid &&
196
215
  !((_a = target.failure_reason) === null || _a === void 0 ? void 0 : _a.toString().startsWith('unable to locate python')) &&
@@ -214,8 +233,8 @@ exports.default = (_fns) => __awaiter(void 0, void 0, void 0, function* () {
214
233
  });
215
234
  return target.valid;
216
235
  });
217
- if (isFnPulled) {
218
- runtime_store_1.default.set('context.payload.functions.targets', targets);
236
+ if (pulledFns.length > 0) {
237
+ runtime_store_1.default.set('context.payload.functions.targets', pulledFns);
219
238
  runtime_store_1.default.set('context.payload.functions.source', (0, path_1.basename)(config_1.functionsConfig.source()));
220
239
  if (isFnPulledFailed) {
221
240
  runtime_store_1.default.set('context.payload.functions.status', 1);
@@ -9,7 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.python = exports.java = exports.node = void 0;
12
+ exports.node = node;
13
+ exports.java = java;
14
+ exports.python = python;
13
15
  const fn_utils_1 = require("../../../fn-utils");
14
16
  const js_1 = require("../../../util_modules/js");
15
17
  function node(target) {
@@ -18,18 +20,15 @@ function node(target) {
18
20
  yield fn_utils_1.fnUtils.node.validate([js_1.JS.assignIn(target, refinedTargets[0])]);
19
21
  });
20
22
  }
21
- exports.node = node;
22
23
  function java(target) {
23
24
  return __awaiter(this, void 0, void 0, function* () {
24
25
  const refinedTargets = yield fn_utils_1.fnUtils.common.refineTargets([target.source]);
25
26
  yield fn_utils_1.fnUtils.java.validate([js_1.JS.assignIn(target, refinedTargets[0])]);
26
27
  });
27
28
  }
28
- exports.java = java;
29
29
  function python(target) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  const refinedTargets = yield fn_utils_1.fnUtils.common.refineTargets([target.source]);
32
32
  yield fn_utils_1.fnUtils.python.validate([js_1.JS.assignIn(target, refinedTargets[0])]);
33
33
  });
34
34
  }
35
- exports.python = python;