zcatalyst-cli 1.25.3 → 1.26.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 (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 +6 -7
  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 +17 -7
  46. package/lib/commands/token/generate.js +17 -7
  47. package/lib/commands/token/list.js +17 -7
  48. package/lib/commands/token/revoke.js +17 -7
  49. package/lib/commands/zest/generate/index.js +21 -11
  50. package/lib/deploy/features/appsail/index.js +2 -3
  51. package/lib/deploy/features/appsail/pack.d.ts +0 -1
  52. package/lib/deploy/features/appsail/pack.js +2 -3
  53. package/lib/deploy/features/appsail/utils.js +7 -8
  54. package/lib/deploy/features/functions/languages/index.js +3 -4
  55. package/lib/deploy/features/index.js +17 -7
  56. package/lib/deploy/features/slate.js +11 -8
  57. package/lib/deploy/index.js +2 -2
  58. package/lib/deploy/util.d.ts +2 -0
  59. package/lib/deploy/util.js +3 -1
  60. package/lib/docs/commands/signals/generate/generate.toml +19 -0
  61. package/lib/docs/commands/slate/unlink.toml +9 -0
  62. package/lib/docs/fn-utils/lib/node.toml +4 -0
  63. package/lib/docs/init/dependencies/python/ensure-python.toml +4 -0
  64. package/lib/docs/serve/server/lib/slate/index.toml +20 -0
  65. package/lib/docs/slate-utils.toml +9 -0
  66. package/lib/endpoints/index.d.ts +2 -1
  67. package/lib/endpoints/index.js +88 -79
  68. package/lib/endpoints/lib/apig.d.ts +0 -1
  69. package/lib/endpoints/lib/apig.js +2 -2
  70. package/lib/endpoints/lib/applogic.d.ts +0 -1
  71. package/lib/endpoints/lib/applogic.js +2 -2
  72. package/lib/endpoints/lib/appsail.d.ts +1 -4
  73. package/lib/endpoints/lib/appsail.js +7 -7
  74. package/lib/endpoints/lib/client.d.ts +0 -1
  75. package/lib/endpoints/lib/code-deck.js +1 -1
  76. package/lib/endpoints/lib/common.d.ts +0 -2
  77. package/lib/endpoints/lib/ds-bulk.js +2 -2
  78. package/lib/endpoints/lib/env.js +2 -2
  79. package/lib/endpoints/lib/filestore.d.ts +0 -1
  80. package/lib/endpoints/lib/functions.d.ts +0 -1
  81. package/lib/endpoints/lib/functions.js +2 -2
  82. package/lib/endpoints/lib/git-hub.d.ts +0 -2
  83. package/lib/endpoints/lib/iac.d.ts +0 -3
  84. package/lib/endpoints/lib/iac.js +2 -2
  85. package/lib/endpoints/lib/project.d.ts +0 -1
  86. package/lib/endpoints/lib/project.js +2 -2
  87. package/lib/endpoints/lib/sdk.d.ts +0 -2
  88. package/lib/endpoints/lib/sdk.js +1 -1
  89. package/lib/endpoints/lib/slate.d.ts +0 -1
  90. package/lib/endpoints/lib/stratus.d.ts +0 -1
  91. package/lib/endpoints/lib/user.d.ts +0 -2
  92. package/lib/endpoints/lib/user.js +2 -1
  93. package/lib/error/context-help.js +1 -1
  94. package/lib/error/index.js +2 -2
  95. package/lib/event_generate/cache.js +4 -4
  96. package/lib/event_generate/custom.js +1 -2
  97. package/lib/event_generate/datastore.js +4 -4
  98. package/lib/event_generate/filestore.js +4 -4
  99. package/lib/event_generate/github.js +2 -2
  100. package/lib/event_generate/index.js +19 -11
  101. package/lib/event_generate/stratus.js +2 -2
  102. package/lib/event_generate/user.js +2 -2
  103. package/lib/event_generate/webapp.js +2 -2
  104. package/lib/execute/caller.d.ts +0 -1
  105. package/lib/execute/caller.js +20 -7
  106. package/lib/execute/index.js +27 -4
  107. package/lib/execute-script.js +22 -13
  108. package/lib/express_middlewares/auth-checker.js +2 -3
  109. package/lib/express_middlewares/project.d.ts +1 -1
  110. package/lib/fn-utils/index.js +17 -7
  111. package/lib/fn-utils/lib/browserLogic.js +4 -5
  112. package/lib/fn-utils/lib/common.d.ts +0 -1
  113. package/lib/fn-utils/lib/common.js +25 -26
  114. package/lib/fn-utils/lib/integ.js +2 -3
  115. package/lib/fn-utils/lib/java/classpath.js +2 -3
  116. package/lib/fn-utils/lib/java/compile.js +4 -4
  117. package/lib/fn-utils/lib/java/ensure-java-userconfig.d.ts +10 -0
  118. package/lib/fn-utils/lib/java/ensure-java-userconfig.js +45 -23
  119. package/lib/fn-utils/lib/java/index.d.ts +0 -1
  120. package/lib/fn-utils/lib/java/index.js +11 -11
  121. package/lib/fn-utils/lib/java/keywords.js +2 -2
  122. package/lib/fn-utils/lib/node.d.ts +1 -1
  123. package/lib/fn-utils/lib/node.js +67 -15
  124. package/lib/fn-utils/lib/python.js +29 -19
  125. package/lib/iac/status/util/index.d.ts +1 -1
  126. package/lib/init/dependencies/npm-install.js +2 -2
  127. package/lib/init/dependencies/python/ensure-python.d.ts +2 -2
  128. package/lib/init/dependencies/python/ensure-python.js +65 -58
  129. package/lib/init/dependencies/python/pip-install.d.ts +3 -5
  130. package/lib/init/dependencies/python/pip-install.js +14 -53
  131. package/lib/init/features/appsail/utils.js +21 -12
  132. package/lib/init/features/client/index.js +18 -9
  133. package/lib/init/features/client/initializers/angular.js +17 -7
  134. package/lib/init/features/client/initializers/basic.js +17 -7
  135. package/lib/init/features/client/initializers/lyte.js +17 -7
  136. package/lib/init/features/client/initializers/react.js +17 -7
  137. package/lib/init/features/index.js +29 -20
  138. package/lib/init/features/project.js +5 -5
  139. package/lib/init/features/slate/index.js +23 -11
  140. package/lib/init/util/client.js +23 -13
  141. package/lib/init/util/common.js +5 -6
  142. package/lib/init/util/project.js +1 -1
  143. package/lib/internal/api.d.ts +0 -3
  144. package/lib/internal/api.js +19 -9
  145. package/lib/internal/command.js +18 -9
  146. package/lib/migration/global/1.25.0.d.ts +2 -0
  147. package/lib/migration/global/1.25.0.js +28 -0
  148. package/lib/migration/index.js +20 -12
  149. package/lib/option-filter.js +19 -10
  150. package/lib/optional-import.js +19 -10
  151. package/lib/plugin-loader.d.ts +0 -2
  152. package/lib/plugin-loader.js +18 -8
  153. package/lib/port-resolver.js +10 -10
  154. package/lib/prompt/index.d.ts +3 -3
  155. package/lib/prompt/index.js +17 -7
  156. package/lib/prompt/types/file-path.d.ts +0 -1
  157. package/lib/prompt/types/search-box.d.ts +0 -1
  158. package/lib/prompt/types/tree.d.ts +1 -2
  159. package/lib/prompt/types/tree.js +10 -10
  160. package/lib/prompt/types/with-description.d.ts +0 -1
  161. package/lib/pull/features/functions/index.js +71 -52
  162. package/lib/pull/features/functions/languages.js +3 -4
  163. package/lib/pull/features/index.js +17 -7
  164. package/lib/repl-server.d.ts +0 -1
  165. package/lib/repl-server.js +9 -1
  166. package/lib/serve/features/apig.js +7 -1
  167. package/lib/serve/features/appsail.d.ts +1 -0
  168. package/lib/serve/features/appsail.js +51 -7
  169. package/lib/serve/features/index.js +22 -13
  170. package/lib/serve/index.js +17 -7
  171. package/lib/serve/server/index.d.ts +0 -2
  172. package/lib/serve/server/index.js +26 -12
  173. package/lib/serve/server/lib/appsail/index.js +27 -34
  174. package/lib/serve/server/lib/appsail/util.d.ts +11 -0
  175. package/lib/serve/server/lib/appsail/util.js +69 -0
  176. package/lib/serve/server/lib/java/index.js +18 -7
  177. package/lib/serve/server/lib/master/appsail.js +3 -4
  178. package/lib/serve/server/lib/master/functions.js +1 -2
  179. package/lib/serve/server/lib/master/index.d.ts +0 -1
  180. package/lib/serve/server/lib/master/index.js +5 -5
  181. package/lib/serve/server/lib/master/slate.js +1 -2
  182. package/lib/serve/server/lib/master/unknown-req-proxy.js +5 -2
  183. package/lib/serve/server/lib/master/utils.d.ts +4 -8
  184. package/lib/serve/server/lib/master/utils.js +4 -6
  185. package/lib/serve/server/lib/master/web-client.js +1 -2
  186. package/lib/serve/server/lib/node/index.js +22 -11
  187. package/lib/serve/server/lib/node/server/browserlogic/utils/playwright-handler.js +1 -1
  188. package/lib/serve/server/lib/node/server/browserlogic/utils/puppeteer-handler.js +1 -1
  189. package/lib/serve/server/lib/node/server/browserlogic/utils/selenium-handler.js +2 -0
  190. package/lib/serve/server/lib/python/index.js +23 -14
  191. package/lib/serve/server/lib/slate/index.js +7 -0
  192. package/lib/serve/server/lib/slate/static-server.d.ts +0 -1
  193. package/lib/serve/server/lib/slate/static-server.js +5 -4
  194. package/lib/serve/server/lib/web_client/server.d.ts +0 -1
  195. package/lib/serve/server/lib/web_client/server.js +5 -4
  196. package/lib/shell/dependencies/http-functions.d.ts +0 -2
  197. package/lib/shell/dependencies/http-functions.js +7 -7
  198. package/lib/shell/dependencies/non-http-function/fn-execution-handler.d.ts +0 -2
  199. package/lib/shell/dependencies/non-http-function/fn-execution-handler.js +55 -24
  200. package/lib/shell/dependencies/non-http-function/fn-handler.d.ts +3 -3
  201. package/lib/shell/dependencies/non-http-function/fn-handler.js +54 -20
  202. package/lib/shell/dependencies/non-http-function/node.js +4 -4
  203. package/lib/shell/dependencies/non-http-function/python.d.ts +1 -1
  204. package/lib/shell/dependencies/non-http-function/python.js +11 -13
  205. package/lib/shell/dependencies/non-http-function/slave-manager.d.ts +0 -2
  206. package/lib/shell/dependencies/non-http-function/slave-manager.js +11 -7
  207. package/lib/shell/dependencies/tunnel-server.js +4 -4
  208. package/lib/shell/index.js +50 -3
  209. package/lib/shell/prepare/index.js +4 -3
  210. package/lib/shell/prepare/languages/index.js +18 -9
  211. package/lib/shell/prepare/languages/node.js +29 -19
  212. package/lib/shell/prepare/languages/python.js +6 -12
  213. package/lib/signals/index.js +19 -11
  214. package/lib/slate-utils.js +25 -16
  215. package/lib/throbber/index.d.ts +1 -2
  216. package/lib/throbber/index.js +5 -2
  217. package/lib/throbber/utils.d.ts +0 -1
  218. package/lib/throbber/utils.js +4 -5
  219. package/lib/userConfig.d.ts +14 -0
  220. package/lib/userConfig.js +15 -1
  221. package/lib/util_modules/config/index.js +17 -7
  222. package/lib/util_modules/config/lib/apig.d.ts +1 -0
  223. package/lib/util_modules/config/lib/apig.js +10 -5
  224. package/lib/util_modules/config/lib/appsail.js +7 -7
  225. package/lib/util_modules/config/lib/client.js +5 -6
  226. package/lib/util_modules/config/lib/functions.js +5 -6
  227. package/lib/util_modules/config/lib/slate.d.ts +2 -1
  228. package/lib/util_modules/config/lib/slate.js +27 -13
  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
@@ -1,10 +1,24 @@
1
1
  export declare const CONFIG_KEYS: {
2
+ node12_bin: string;
3
+ node14_bin: string;
4
+ node16_bin: string;
5
+ node18_bin: string;
6
+ node20_bin: string;
7
+ node22_bin: string;
8
+ node24_bin: string;
2
9
  python39_bin: string;
10
+ python310_bin: string;
11
+ python311_bin: string;
12
+ python312_bin: string;
13
+ python313_bin: string;
3
14
  java8_bin: string;
4
15
  java11_bin: string;
5
16
  java17_bin: string;
17
+ java21_bin: string;
18
+ java25_bin: string;
6
19
  javac_disableWarnings: string;
7
20
  serve_container: string;
21
+ functionsShell_prompt: string;
8
22
  };
9
23
  declare class UserConfig {
10
24
  private configFilePath;
package/lib/userConfig.js CHANGED
@@ -9,12 +9,26 @@ const constants_1 = require("./util_modules/constants");
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const error_1 = __importDefault(require("./error"));
11
11
  exports.CONFIG_KEYS = {
12
+ node12_bin: 'node12.bin',
13
+ node14_bin: 'node14.bin',
14
+ node16_bin: 'node16.bin',
15
+ node18_bin: 'node18.bin',
16
+ node20_bin: 'node20.bin',
17
+ node22_bin: 'node22.bin',
18
+ node24_bin: 'node24.bin',
12
19
  python39_bin: 'python3_9.bin',
20
+ python310_bin: 'python3_10.bin',
21
+ python311_bin: 'python3_11.bin',
22
+ python312_bin: 'python3_12.bin',
23
+ python313_bin: 'python3_13.bin',
13
24
  java8_bin: 'java8.bin',
14
25
  java11_bin: 'java11.bin',
15
26
  java17_bin: 'java17.bin',
27
+ java21_bin: 'java21.bin',
28
+ java25_bin: 'java25.bin',
16
29
  javac_disableWarnings: 'javac.disable_warnings',
17
- serve_container: 'serve.container'
30
+ serve_container: 'serve.container',
31
+ functionsShell_prompt: 'functions_shell.prompt'
18
32
  };
19
33
  class UserConfig {
20
34
  constructor() {
@@ -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
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.slateConfig = exports.appSailConfig = exports.apigConfig = exports.functionsConfig = exports.clientConfig = void 0;
27
37
  const apigConfig = __importStar(require("./lib/apig"));
@@ -12,4 +12,5 @@ export declare function enabled<T>(fallback?: T): boolean | T;
12
12
  export declare function script<T>(name?: string, fallback?: T): T | {
13
13
  [x: string]: string;
14
14
  } | string;
15
+ export declare function exists(): boolean;
15
16
  export declare const source: typeof rules;
@@ -3,10 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.source = exports.script = exports.enabled = exports.rules = exports.raw = void 0;
6
+ exports.source = void 0;
7
+ exports.raw = raw;
8
+ exports.rules = rules;
9
+ exports.enabled = enabled;
10
+ exports.script = script;
11
+ exports.exists = exists;
7
12
  const index_js_1 = __importDefault(require("../../../error/index.js"));
8
13
  const runtime_store_1 = __importDefault(require("../../../runtime-store"));
9
14
  const constants_1 = require("../../constants");
15
+ const index_js_2 = require("../index.js");
10
16
  function raw(throwError = false) {
11
17
  const config = runtime_store_1.default.get('config', null);
12
18
  if (config === null) {
@@ -17,17 +23,14 @@ function raw(throwError = false) {
17
23
  }
18
24
  return config.get('apig');
19
25
  }
20
- exports.raw = raw;
21
26
  function rules() {
22
27
  const apigConfig = raw();
23
28
  return (apigConfig && apigConfig.rules) || constants_1.FILENAME.apig.user_rules;
24
29
  }
25
- exports.rules = rules;
26
30
  function enabled(fallback) {
27
31
  const apigConfig = raw();
28
32
  return (apigConfig && apigConfig.enabled) || fallback || false;
29
33
  }
30
- exports.enabled = enabled;
31
34
  function script(name, fallback) {
32
35
  const apigConfig = raw();
33
36
  const rawScripts = apigConfig && (apigConfig === null || apigConfig === void 0 ? void 0 : apigConfig.scripts);
@@ -42,5 +45,7 @@ function script(name, fallback) {
42
45
  }
43
46
  return (rawScripts && rawScripts[name]) || fallback;
44
47
  }
45
- exports.script = script;
48
+ function exists() {
49
+ return index_js_2.apigConfig.raw() !== undefined;
50
+ }
46
51
  exports.source = rules;
@@ -12,7 +12,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.unlinkAppSail = exports.getAllTargetDetails = exports.getTargetDetails = exports.raw = exports.CONTAINER_IMAGE_PROTOCOLS = void 0;
15
+ exports.CONTAINER_IMAGE_PROTOCOLS = void 0;
16
+ exports.raw = raw;
17
+ exports.getTargetDetails = getTargetDetails;
18
+ exports.getAllTargetDetails = getAllTargetDetails;
19
+ exports.unlinkAppSail = unlinkAppSail;
16
20
  const path_1 = require("path");
17
21
  const error_1 = __importDefault(require("../../../error"));
18
22
  const runtime_store_1 = __importDefault(require("../../../runtime-store"));
@@ -124,7 +128,6 @@ function raw(throwError = false) {
124
128
  };
125
129
  });
126
130
  }
127
- exports.raw = raw;
128
131
  function getTargetDetails(name) {
129
132
  return __awaiter(this, void 0, void 0, function* () {
130
133
  const rawTargets = raw();
@@ -146,9 +149,8 @@ function getTargetDetails(name) {
146
149
  return Object.assign(Object.assign(Object.assign({}, target), appConfigJson), { validity: { valid: true } });
147
150
  });
148
151
  }
149
- exports.getTargetDetails = getTargetDetails;
150
- function getAllTargetDetails(throwErr = true) {
151
- return __awaiter(this, void 0, void 0, function* () {
152
+ function getAllTargetDetails() {
153
+ return __awaiter(this, arguments, void 0, function* (throwErr = true) {
152
154
  const rawTargets = raw();
153
155
  if (!rawTargets) {
154
156
  if (throwErr) {
@@ -192,7 +194,6 @@ function getAllTargetDetails(throwErr = true) {
192
194
  }, []));
193
195
  });
194
196
  }
195
- exports.getAllTargetDetails = getAllTargetDetails;
196
197
  function unlinkAppSail(name) {
197
198
  return __awaiter(this, void 0, void 0, function* () {
198
199
  const _raw = raw();
@@ -210,4 +211,3 @@ function unlinkAppSail(name) {
210
211
  return !!deleted;
211
212
  });
212
213
  }
213
- exports.unlinkAppSail = unlinkAppSail;
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.script = exports.ignore = exports.plugin = exports.source = exports.raw = void 0;
6
+ exports.raw = raw;
7
+ exports.source = source;
8
+ exports.plugin = plugin;
9
+ exports.ignore = ignore;
10
+ exports.script = script;
7
11
  const path_1 = require("path");
8
12
  const index_js_1 = __importDefault(require("../../../error/index.js"));
9
13
  const runtime_store_js_1 = __importDefault(require("../../../runtime-store.js"));
@@ -21,7 +25,6 @@ function raw(throwError = false) {
21
25
  }
22
26
  return config.get('client');
23
27
  }
24
- exports.raw = raw;
25
28
  function source(fallback = folder_names_js_1.default.client) {
26
29
  const clientConfig = raw();
27
30
  const pth = (clientConfig === null || clientConfig === void 0 ? void 0 : clientConfig.source) || fallback;
@@ -38,7 +41,6 @@ function source(fallback = folder_names_js_1.default.client) {
38
41
  }
39
42
  return resolvedSource;
40
43
  }
41
- exports.source = source;
42
44
  function plugin(name) {
43
45
  const clientConfig = raw();
44
46
  const rawPlugins = clientConfig && clientConfig.plugin;
@@ -60,7 +62,6 @@ function plugin(name) {
60
62
  }
61
63
  return rawPlugins[name];
62
64
  }
63
- exports.plugin = plugin;
64
65
  function ignore(sourcePath) {
65
66
  const clientConfig = raw();
66
67
  const ignoreArr = (clientConfig && clientConfig.ignore) || [];
@@ -78,7 +79,6 @@ function ignore(sourcePath) {
78
79
  : sourcePath + path_1.sep + value;
79
80
  });
80
81
  }
81
- exports.ignore = ignore;
82
82
  function script(name, fallback) {
83
83
  const clientConfig = raw();
84
84
  const rawScripts = clientConfig && (clientConfig === null || clientConfig === void 0 ? void 0 : clientConfig.scripts);
@@ -93,4 +93,3 @@ function script(name, fallback) {
93
93
  }
94
94
  return (rawScripts && rawScripts[name]) || fallback;
95
95
  }
96
- exports.script = script;
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.plugin = exports.script = exports.targets = exports.ignore = exports.source = void 0;
6
+ exports.source = source;
7
+ exports.ignore = ignore;
8
+ exports.targets = targets;
9
+ exports.script = script;
10
+ exports.plugin = plugin;
7
11
  const path_1 = require("path");
8
12
  const index_js_1 = __importDefault(require("../../../error/index.js"));
9
13
  const runtime_store_1 = __importDefault(require("../../../runtime-store"));
@@ -59,7 +63,6 @@ function source(fallback = constants_1.FOLDERNAME.functions) {
59
63
  }
60
64
  return resolvedSource;
61
65
  }
62
- exports.source = source;
63
66
  function ignore(sourcePath) {
64
67
  let matchTarget;
65
68
  if (sourcePath) {
@@ -87,7 +90,6 @@ function ignore(sourcePath) {
87
90
  : sourcePath + path_1.sep + value;
88
91
  });
89
92
  }
90
- exports.ignore = ignore;
91
93
  function targets(fallback) {
92
94
  const rawTargetArr = getRawTargets();
93
95
  if (rawTargetArr === null) {
@@ -108,7 +110,6 @@ function targets(fallback) {
108
110
  return targetVal;
109
111
  });
110
112
  }
111
- exports.targets = targets;
112
113
  function script(name, fallback, sourcePath) {
113
114
  let matchTarget;
114
115
  if (sourcePath) {
@@ -133,7 +134,6 @@ function script(name, fallback, sourcePath) {
133
134
  }
134
135
  return (rawScripts && rawScripts[name]) || fallback;
135
136
  }
136
- exports.script = script;
137
137
  function plugin(name, sourcePath) {
138
138
  let matchTarget;
139
139
  if (sourcePath) {
@@ -165,4 +165,3 @@ function plugin(name, sourcePath) {
165
165
  }
166
166
  return rawPlugins && rawPlugins[name];
167
167
  }
168
- exports.plugin = plugin;
@@ -95,6 +95,7 @@ export interface ISlateConfig {
95
95
  config?: ISlateConfigDetails;
96
96
  details?: ISlateUploadResponse;
97
97
  source: string;
98
+ originalSource?: string;
98
99
  name: string;
99
100
  validity: {
100
101
  valid?: boolean;
@@ -103,4 +104,4 @@ export interface ISlateConfig {
103
104
  }
104
105
  export declare function raw(throwError?: boolean): Array<ISlateConfig> | undefined;
105
106
  export declare function getTargetDetails(targ: ISlateConfig): Promise<ISlateConfig>;
106
- export declare function getAllTargetDetails(throwErr?: boolean): Promise<Array<ISlateConfig> | undefined>;
107
+ export declare function getAllTargetDetails(throwErr?: boolean, loadConfig?: boolean): Promise<Array<ISlateConfig> | undefined>;
@@ -12,7 +12,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getAllTargetDetails = exports.getTargetDetails = exports.raw = void 0;
15
+ exports.raw = raw;
16
+ exports.getTargetDetails = getTargetDetails;
17
+ exports.getAllTargetDetails = getAllTargetDetails;
16
18
  const ansi_colors_1 = require("ansi-colors");
17
19
  const error_1 = __importDefault(require("../../../error"));
18
20
  const runtime_store_1 = __importDefault(require("../../../runtime-store"));
@@ -31,7 +33,11 @@ function raw(throwError = false) {
31
33
  }
32
34
  return config.get('slate');
33
35
  }
34
- exports.raw = raw;
36
+ function normalizeTarget(target) {
37
+ const originalSource = target.source;
38
+ const resolvedSource = (0, project_1.resolveProjectPath)(originalSource);
39
+ return Object.assign(Object.assign({}, target), { source: resolvedSource, originalSource });
40
+ }
35
41
  function getTargetDetails(targ) {
36
42
  return __awaiter(this, void 0, void 0, function* () {
37
43
  const rawTargets = raw();
@@ -39,19 +45,22 @@ function getTargetDetails(targ) {
39
45
  if (!target) {
40
46
  return Object.assign(Object.assign({}, targ), { validity: { valid: false, reason: 'Slate not found' } });
41
47
  }
42
- const slateConfigPth = (0, project_1.resolveProjectPath)((0, path_1.join)(targ.source, '.catalyst', constants_1.FILENAME.slate_config));
48
+ const normalized = normalizeTarget(target);
49
+ const slateConfigPth = (0, path_1.join)(normalized.source, '.catalyst', constants_1.FILENAME.slate_config);
50
+ if (!fs_1.SYNC.fileExists(slateConfigPth)) {
51
+ return Object.assign(Object.assign({}, normalized), { validity: { valid: false, reason: 'Config file not present' } });
52
+ }
43
53
  const slateConfigJson = fs_1.SYNC.readFile(slateConfigPth);
44
54
  const slateConfig = (0, toml_1.parseTOML)(slateConfigJson);
45
55
  if (!slateConfig) {
46
- return Object.assign(Object.assign({}, targ), { validity: { valid: false, reason: 'Config file is empty' } });
56
+ return Object.assign(Object.assign({}, normalized), { validity: { valid: false, reason: 'Config file is empty' } });
47
57
  }
48
- target.config = slateConfig;
49
- return Object.assign({}, target);
58
+ normalized.config = slateConfig;
59
+ return Object.assign({}, normalized);
50
60
  });
51
61
  }
52
- exports.getTargetDetails = getTargetDetails;
53
- function getAllTargetDetails(throwErr = true) {
54
- return __awaiter(this, void 0, void 0, function* () {
62
+ function getAllTargetDetails() {
63
+ return __awaiter(this, arguments, void 0, function* (throwErr = true, loadConfig = true) {
55
64
  const rawTargets = raw();
56
65
  if (!rawTargets) {
57
66
  if (throwErr) {
@@ -59,16 +68,22 @@ function getAllTargetDetails(throwErr = true) {
59
68
  }
60
69
  return;
61
70
  }
62
- return Promise.all(rawTargets.reduce((resArr, target) => {
71
+ return Promise.all(rawTargets.reduce((resArr, rawTarget) => {
72
+ var _a;
73
+ const target = normalizeTarget(rawTarget);
63
74
  const isPath = fs_1.SYNC.dirExists(target.source);
64
75
  if (!isPath) {
65
76
  resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: {
66
77
  valid: false,
67
- reason: `Invalid source path: (${(0, ansi_colors_1.bold)(target.source)}) directory not found`
78
+ reason: `Invalid source path: (${(0, ansi_colors_1.bold)((_a = target.originalSource) !== null && _a !== void 0 ? _a : target.source)}) directory not found`
68
79
  } })));
69
80
  return resArr;
70
81
  }
71
- const slateConfigPth = (0, project_1.resolveProjectPath)((0, path_1.join)(target.source, '.catalyst', constants_1.FILENAME.slate_config));
82
+ if (!loadConfig) {
83
+ resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: { valid: true } })));
84
+ return resArr;
85
+ }
86
+ const slateConfigPth = (0, path_1.join)(target.source, '.catalyst', constants_1.FILENAME.slate_config);
72
87
  const isConfigPath = fs_1.SYNC.fileExists(slateConfigPth);
73
88
  if (!isConfigPath) {
74
89
  resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: {
@@ -91,4 +106,3 @@ function getAllTargetDetails(throwErr = true) {
91
106
  }, []));
92
107
  });
93
108
  }
94
- exports.getAllTargetDetails = getAllTargetDetails;
@@ -1,6 +1,6 @@
1
1
  export default class Store {
2
2
  private static _store;
3
- static changeStore(store: 'cli' | 'vscode', path?: string): void;
3
+ static changeStore(store: 'cli' | 'vscode' | 'zcode', path?: string): void;
4
4
  private static get istore();
5
5
  static get path(): string | undefined;
6
6
  static get store(): Record<string, unknown>;
@@ -5,22 +5,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const conf_1 = __importDefault(require("conf"));
7
7
  const path_1 = require("path");
8
+ const error_1 = __importDefault(require("../error"));
8
9
  const path = process.env['X_ZC_CREDENTIAL_PATH'];
9
10
  class Store {
10
11
  static changeStore(store, path) {
11
- if (store === 'cli') {
12
- Store._store = new conf_1.default({
13
- configName: 'zcatalyst-cli',
14
- projectName: 'zcatalyst-cli',
15
- cwd: path
16
- });
17
- return;
12
+ switch (store) {
13
+ case 'cli': {
14
+ Store._store = new conf_1.default({
15
+ configName: 'zcatalyst-cli',
16
+ projectName: 'zcatalyst-cli',
17
+ cwd: path
18
+ });
19
+ return;
20
+ }
21
+ case 'vscode': {
22
+ Store._store = new conf_1.default({
23
+ configName: 'auth',
24
+ projectName: 'zcatalyst-vscode',
25
+ cwd: path ? (0, path_1.join)(path, 'zcatalyst-vscode') : undefined
26
+ });
27
+ return;
28
+ }
29
+ case 'zcode': {
30
+ Store._store = new conf_1.default({
31
+ configName: 'auth',
32
+ projectName: 'zcatalyst-zcode',
33
+ cwd: path ? (0, path_1.join)(path, 'zcatalyst-code') : undefined
34
+ });
35
+ return;
36
+ }
37
+ default: {
38
+ throw new error_1.default('Invalid Store type: ' + store, { exit: 2 });
39
+ }
18
40
  }
19
- Store._store = new conf_1.default({
20
- configName: 'auth',
21
- projectName: 'zcatalyst-vscode',
22
- cwd: path ? (0, path_1.join)(path, 'zcatalyst-vscode') : undefined
23
- });
24
41
  }
25
42
  static get istore() {
26
43
  return Store._store;
@@ -47,9 +64,9 @@ class Store {
47
64
  return Store.istore.has(key);
48
65
  }
49
66
  }
50
- exports.default = Store;
51
67
  Store._store = new conf_1.default({
52
68
  configName: 'zcatalyst-cli',
53
69
  projectName: 'zcatalyst-cli',
54
70
  cwd: path
55
71
  });
72
+ exports.default = Store;
@@ -1,3 +1,3 @@
1
1
  import { IAPIGRules } from '../../../apig-utils';
2
- declare const _default: IAPIGRules[];
2
+ declare const _default: Array<IAPIGRules>;
3
3
  export default _default;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = Object.freeze({
4
4
  us: {
5
- loc: 'UnitedStates',
5
+ loc: 'United States',
6
6
  ref: 'us',
7
7
  value: 'com',
8
8
  w_auth: 'us',
@@ -42,7 +42,7 @@ exports.default = Object.freeze({
42
42
  ext: '.ca'
43
43
  },
44
44
  sa: {
45
- loc: 'SaudiArabia',
45
+ loc: 'Saudi Arabia',
46
46
  ref: 'sa',
47
47
  value: 'sa',
48
48
  w_auth: 'us',
@@ -58,7 +58,7 @@ exports.default = Object.freeze({
58
58
  ext: '.jp'
59
59
  },
60
60
  uae: {
61
- loc: 'UnitedArabEmirates',
61
+ loc: 'United Arab Emirates',
62
62
  ref: 'ae',
63
63
  value: 'ae',
64
64
  w_auth: 'us',
@@ -1,6 +1,6 @@
1
1
  declare const _default: Readonly<{
2
2
  client: {
3
- port: string;
3
+ domain: string;
4
4
  package: {
5
5
  name: string;
6
6
  };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = Object.freeze({
4
4
  client: {
5
- port: '{{_PORT_}}',
5
+ domain: '{{_DOMAIN_}}',
6
6
  package: {
7
7
  name: '{{_NAME_}}'
8
8
  }
@@ -35,20 +35,12 @@ class URL {
35
35
  return (0, env_js_1.envOverride)('CATALYST_CONSOLE_URL', mapDataCenterUrl(URL._consoleBase));
36
36
  }
37
37
  static get contacts() {
38
- const dc = (0, dc_js_1.getActiveDCType)();
39
- if (dc === undefined) {
40
- return URL._contacts;
41
- }
42
- if (dc.value === dc_type_js_1.default.ca.value) {
43
- return URL._contacts.replace('.zoho.com', '.zohocloud.ca');
44
- }
45
- return URL._contacts.replace('.com', dc.ext);
38
+ return (0, env_js_1.envOverride)('ZOHO_CONTACTS', mapDataCenterUrl(URL._contacts));
46
39
  }
47
40
  static get stratusSuffix() {
48
41
  return (0, env_js_1.envOverride)('CATALYST_STRATUS_RESOURCE_SUFFIX', mapDataCenterUrl(URL._stratusSuffixBase));
49
42
  }
50
43
  }
51
- exports.default = URL;
52
44
  URL._authBase = 'https://accounts.zoho.com';
53
45
  URL._portalBase = 'https://accounts.zohoportal.com';
54
46
  URL._adminBase = 'https://api.catalyst.zoho.com';
@@ -63,6 +55,7 @@ URL.external = Object.freeze({
63
55
  gitHubAPI: 'https://api.github.com',
64
56
  gitHubWeb: 'https://github.com'
65
57
  });
58
+ exports.default = URL;
66
59
  function mapDataCenterUrl(url) {
67
60
  const dc = (0, dc_js_1.getActiveDCType)();
68
61
  if (dc === undefined) {
@@ -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,7 +45,9 @@ 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 });
38
- exports.isContainer = exports.isSocketAccessible = exports.showContainerUsagePrompt = void 0;
48
+ exports.showContainerUsagePrompt = showContainerUsagePrompt;
49
+ exports.isSocketAccessible = isSocketAccessible;
50
+ exports.isContainer = isContainer;
39
51
  const ansi_colors_1 = require("ansi-colors");
40
52
  const logger_1 = require("./logger");
41
53
  const cli_table_1 = require("../cli_table");
@@ -45,8 +57,8 @@ const error_1 = __importDefault(require("@zcatalyst/container-plugin/out/error")
45
57
  const userConfig_1 = __importStar(require("../userConfig"));
46
58
  const error_2 = __importDefault(require("../error"));
47
59
  function showContainerUsagePrompt() {
48
- var _a, _b;
49
60
  return __awaiter(this, void 0, void 0, function* () {
61
+ var _a, _b;
50
62
  const headerText = 'Attention Developer !!!';
51
63
  const padding = Math.round((process.stdout.columns - headerText.length) / 2) - 2;
52
64
  const fillLen = padding + headerText.length + padding - 2;
@@ -152,9 +164,8 @@ function showContainerUsagePrompt() {
152
164
  (0, logger_1.info)('\n' + table.toString());
153
165
  });
154
166
  }
155
- exports.showContainerUsagePrompt = showContainerUsagePrompt;
156
- function isSocketAccessible(throwErr = true) {
157
- return __awaiter(this, void 0, void 0, function* () {
167
+ function isSocketAccessible() {
168
+ return __awaiter(this, arguments, void 0, function* (throwErr = true) {
158
169
  if (!(yield (0, container_plugin_1.ping)(false))) {
159
170
  const error = new error_2.default('Docker socket not accessible', {
160
171
  exit: 1,
@@ -169,8 +180,6 @@ function isSocketAccessible(throwErr = true) {
169
180
  return true;
170
181
  });
171
182
  }
172
- exports.isSocketAccessible = isSocketAccessible;
173
183
  function isContainer() {
174
184
  return false;
175
185
  }
176
- exports.isContainer = isContainer;
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.updateActiveDC = exports.getActiveDCType = exports.getActiveDC = void 0;
6
+ exports.getActiveDC = getActiveDC;
7
+ exports.getActiveDCType = getActiveDCType;
8
+ exports.updateActiveDC = updateActiveDC;
7
9
  const ansi_colors_1 = require("ansi-colors");
8
10
  const path_1 = require("path");
9
11
  const config_store_js_1 = __importDefault(require("./config-store.js"));
@@ -35,13 +37,10 @@ function getActiveDC(dcOption) {
35
37
  }
36
38
  return config_store_js_1.default.get('active_dc', dc_type_js_1.default.us.value);
37
39
  }
38
- exports.getActiveDC = getActiveDC;
39
40
  function getActiveDCType() {
40
41
  const activeDC = getActiveDC();
41
42
  return Object.values(dc_type_js_1.default).find((type) => type.value === activeDC);
42
43
  }
43
- exports.getActiveDCType = getActiveDCType;
44
44
  function updateActiveDC(dc) {
45
45
  config_store_js_1.default.set('active_dc', dc);
46
46
  }
47
- exports.updateActiveDC = updateActiveDC;
@@ -2,6 +2,9 @@ export declare const isCI: boolean;
2
2
  export declare const isMac: boolean;
3
3
  export declare const isWindows: boolean;
4
4
  export declare const isVsCode: boolean;
5
+ export declare const isZCode: boolean;
6
+ export declare const isExtension: boolean;
5
7
  export declare function isPrimaryShell(): boolean;
6
8
  export declare function envOverride(envname: string, value: string): string;
7
9
  export declare function getEnvVariable(variable: string, fallback?: unknown): unknown;
10
+ export declare const getLocalAccessDomain: (port: number, protocol?: "http" | "ws") => string;