zcatalyst-cli 1.17.1 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@ const runtime_1 = __importDefault(require("../../../util_modules/constants/lib/r
24
24
  const env_1 = require("../../../util_modules/env");
25
25
  const ensure_python_1 = require("./ensure-python");
26
26
  const userConfig_1 = __importDefault(require("../../../userConfig"));
27
+ const logger_1 = require("../../../util_modules/logger");
27
28
  const sdkPipOpts = (0, env_1.envOverride)('CATALYST_SDK_PIP_OPTS', 'zcatalyst-sdk');
28
29
  const cliqSdkPipOpts = (0, env_1.envOverride)('CATALYST_CLIQ_SDK_PIP_OPTS', 'zcatalyst-cliq');
29
30
  const testPypi = (0, env_1.envOverride)('CATALYST_TEST_PYPI', 'false');
@@ -90,6 +91,7 @@ function ensurePyRuntime(pth, stack) {
90
91
  errData.push(chunk);
91
92
  });
92
93
  child.on('error', (err) => {
94
+ (0, logger_1.info)(Buffer.concat(errData).toString());
93
95
  reject(new error_1.default(`Error while installing python${stackVersion.replace('_', '.')} runtime`, {
94
96
  original: err,
95
97
  exit: 2
@@ -168,6 +170,7 @@ function installRequirements(reqFile, pth, stackVersion, linuxMode = false) {
168
170
  errData.push(chunk);
169
171
  });
170
172
  child.on('error', (err) => {
173
+ (0, logger_1.info)(Buffer.concat(errData).toString());
171
174
  reject(new error_1.default('unable to process requirements.txt', {
172
175
  exit: 2,
173
176
  original: err
@@ -19,8 +19,8 @@ const userConfig_1 = __importDefault(require("../../../../userConfig"));
19
19
  const constants_1 = require("../../../../util_modules/constants");
20
20
  const project_1 = require("../../../../util_modules/project");
21
21
  const shell_1 = require("../../../../util_modules/shell");
22
+ const error_1 = __importDefault(require("../../../../error"));
22
23
  const logger_1 = require("../../../../util_modules/logger");
23
- const util_1 = require("util");
24
24
  exports.default = (details) => __awaiter(void 0, void 0, void 0, function* () {
25
25
  var _a, _b;
26
26
  const projectRoot = runtime_store_1.default.get('project.root');
@@ -31,7 +31,8 @@ exports.default = (details) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  '-u',
32
32
  (0, path_1.join)(runtimesDir, constants_1.RUNTIME.language.python.value, `zcatalyst_runtime_${stackVersion === null || stackVersion === void 0 ? void 0 : stackVersion.replace('_', '')}`, 'main.py')
33
33
  ];
34
- return new Promise((res) => {
34
+ return new Promise((resolve, reject) => {
35
+ var _a;
35
36
  const child = (0, shell_1.spawn)(userConfig_1.default.get(`python${stackVersion}.bin`), opts, {
36
37
  cwd: targetSource === null || targetSource === void 0 ? void 0 : targetSource.replace(projectRoot, (0, path_1.join)(projectRoot, constants_1.FOLDERNAME.build)),
37
38
  stdio: 'pipe',
@@ -40,10 +41,17 @@ exports.default = (details) => __awaiter(void 0, void 0, void 0, function* () {
40
41
  child.on('spawn', () => __awaiter(void 0, void 0, void 0, function* () {
41
42
  yield (0, http_functions_1.checkIfRuntimeServerRunning)(details.httpPort.toString());
42
43
  }));
44
+ const errData = [];
45
+ (_a = child.stderr) === null || _a === void 0 ? void 0 : _a.on('data', (chunk) => {
46
+ errData.push(chunk);
47
+ });
43
48
  child.on('error', (err) => {
44
- (0, logger_1.debug)('Python Child spawn error');
45
- (0, logger_1.debug)((0, util_1.inspect)(err));
49
+ (0, logger_1.info)(Buffer.concat(errData).toString());
50
+ reject(new error_1.default(`Error while starting python runtime server`, {
51
+ original: err,
52
+ exit: 2
53
+ }));
46
54
  });
47
- res(child);
55
+ resolve(child);
48
56
  });
49
57
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {