@sasjs/cli 3.6.2 → 3.6.6

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 (201) hide show
  1. package/README.md +0 -3
  2. package/build/cli.js +4 -4
  3. package/build/cli.spec.js +6 -6
  4. package/build/commands/add/addCommand.js +2 -2
  5. package/build/commands/add/addCredential.js +27 -27
  6. package/build/commands/add/addTarget.js +10 -10
  7. package/build/commands/add/internal/input.js +30 -30
  8. package/build/commands/add/internal/saveConfig.js +2 -2
  9. package/build/commands/add/spec/addCommand.spec.js +24 -20
  10. package/build/commands/add/spec/addCredential.spec.js +14 -14
  11. package/build/commands/add/spec/addTarget.spec.js +22 -22
  12. package/build/commands/build/build.js +81 -77
  13. package/build/commands/build/buildCommand.js +3 -3
  14. package/build/commands/build/compileBuildCommand.js +4 -4
  15. package/build/commands/build/internal/config.js +8 -8
  16. package/build/commands/build/internal/getLaunchPageCode.js +2 -2
  17. package/build/commands/build/spec/build.spec.js +10 -10
  18. package/build/commands/build/spec/buildCommand.spec.js +16 -12
  19. package/build/commands/build/spec/cb.spec.server.js +18 -18
  20. package/build/commands/build/spec/compileBuildCommand.spec.js +17 -13
  21. package/build/commands/compile/compile.js +61 -61
  22. package/build/commands/compile/compileCommand.js +10 -10
  23. package/build/commands/compile/compileSingleFile.js +17 -17
  24. package/build/commands/compile/internal/checkCompileStatus.js +11 -11
  25. package/build/commands/compile/internal/compareFolders.js +11 -11
  26. package/build/commands/compile/internal/compileJobFile.js +3 -3
  27. package/build/commands/compile/internal/compileServiceFile.js +14 -14
  28. package/build/commands/compile/internal/compileTestFile.js +41 -37
  29. package/build/commands/compile/internal/getAllJobFolders.js +13 -9
  30. package/build/commands/compile/internal/getAllServiceFolders.js +13 -9
  31. package/build/commands/compile/internal/getServerType.js +1 -1
  32. package/build/commands/compile/internal/identifySasFile.js +2 -2
  33. package/build/commands/compile/internal/loadDependencies.js +5 -5
  34. package/build/commands/compile/internal/spec/compileTestFile.spec.js +40 -40
  35. package/build/commands/compile/spec/compareFolders.spec.js +27 -27
  36. package/build/commands/compile/spec/compile.spec.js +93 -93
  37. package/build/commands/compile/spec/compileCommand.spec.js +37 -33
  38. package/build/commands/compile/spec/compileJobFile.spec.js +11 -11
  39. package/build/commands/compile/spec/compileServiceFile.spec.js +11 -11
  40. package/build/commands/compile/spec/copyFilesToBuildFolder.spec.js +7 -7
  41. package/build/commands/compile/spec/loadDependencies.spec.js +30 -30
  42. package/build/commands/context/contextCommand.js +16 -16
  43. package/build/commands/context/create.js +1 -1
  44. package/build/commands/context/delete.js +2 -2
  45. package/build/commands/context/edit.js +1 -1
  46. package/build/commands/context/export.js +5 -5
  47. package/build/commands/context/internal/validateConfigPath.js +1 -1
  48. package/build/commands/context/list.js +4 -4
  49. package/build/commands/context/spec/contextCommand.spec.js +80 -76
  50. package/build/commands/context/spec/create.spec.js +3 -3
  51. package/build/commands/context/spec/delete.spec.js +3 -3
  52. package/build/commands/context/spec/edit.spec.js +3 -3
  53. package/build/commands/context/spec/export.spec.js +8 -8
  54. package/build/commands/context/spec/list.spec.js +5 -5
  55. package/build/commands/create/create.js +12 -12
  56. package/build/commands/create/createCommand.js +2 -2
  57. package/build/commands/create/internal/createReadme.js +2 -2
  58. package/build/commands/create/spec/create.spec.js +39 -39
  59. package/build/commands/create/spec/createCommand.spec.js +14 -10
  60. package/build/commands/db/db.js +22 -22
  61. package/build/commands/db/dbCommand.js +1 -1
  62. package/build/commands/db/spec/db.spec.js +8 -8
  63. package/build/commands/db/spec/dbCommand.spec.js +11 -7
  64. package/build/commands/deploy/compileBuildDeployCommand.js +6 -6
  65. package/build/commands/deploy/deploy.d.ts +7 -0
  66. package/build/commands/deploy/deploy.js +131 -81
  67. package/build/commands/deploy/deployCommand.js +2 -2
  68. package/build/commands/deploy/internal/getDeployScripts.js +14 -10
  69. package/build/commands/deploy/spec/cbd.spec.js +15 -15
  70. package/build/commands/deploy/spec/cbd.spec.server.js +40 -40
  71. package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +18 -14
  72. package/build/commands/deploy/spec/deployCommand.spec.js +15 -11
  73. package/build/commands/deploy/spec/getDeployScripts.spec.js +8 -8
  74. package/build/commands/deploy/spec/utils.js +17 -17
  75. package/build/commands/docs/docsCommand.js +7 -7
  76. package/build/commands/docs/generateDocs.js +33 -29
  77. package/build/commands/docs/generateDot.js +12 -8
  78. package/build/commands/docs/initDocs.js +1 -1
  79. package/build/commands/docs/internal/createDotFiles.js +6 -6
  80. package/build/commands/docs/internal/getDotFileContent.js +17 -17
  81. package/build/commands/docs/internal/getFileInputs.js +1 -1
  82. package/build/commands/docs/internal/getFileOutputs.js +1 -1
  83. package/build/commands/docs/internal/getFoldersForDocs.js +4 -4
  84. package/build/commands/docs/internal/populateNodeDictionary.js +1 -1
  85. package/build/commands/docs/spec/docsCommand.spec.js +25 -21
  86. package/build/commands/docs/spec/generateDocs.spec.js +60 -60
  87. package/build/commands/docs/spec/generateDot.spec.js +23 -23
  88. package/build/commands/docs/spec/getDocConfig.spec.js +2 -2
  89. package/build/commands/docs/spec/initDocs.spec.js +7 -7
  90. package/build/commands/flow/execute.js +8 -8
  91. package/build/commands/flow/flowCommand.js +5 -5
  92. package/build/commands/flow/internal/checkPredecessorDeadlock.js +11 -7
  93. package/build/commands/flow/internal/executeFlow.js +23 -23
  94. package/build/commands/flow/internal/failAllSuccessors.js +1 -1
  95. package/build/commands/flow/internal/generateFileName.js +2 -2
  96. package/build/commands/flow/internal/normalizeFilePath.js +1 -1
  97. package/build/commands/flow/internal/parseJobDetails.js +3 -3
  98. package/build/commands/flow/internal/printError.js +1 -1
  99. package/build/commands/flow/internal/saveLog.js +8 -8
  100. package/build/commands/flow/internal/saveToCsv.js +2 -2
  101. package/build/commands/flow/internal/spec/allFlowsCompleted.spec.js +4 -4
  102. package/build/commands/flow/internal/spec/checkPredecessorDeadlock.spec.js +4 -4
  103. package/build/commands/flow/internal/spec/executeFlow.spec.js +10 -10
  104. package/build/commands/flow/internal/spec/failAllSuccessors.spec.js +1 -1
  105. package/build/commands/flow/internal/spec/saveToCsv.spec.js +16 -16
  106. package/build/commands/flow/internal/spec/validateParams.spec.js +33 -33
  107. package/build/commands/flow/internal/validateParams.js +17 -17
  108. package/build/commands/flow/spec/flow.spec.js +1 -1
  109. package/build/commands/flow/spec/flow.spec.server.js +60 -60
  110. package/build/commands/flow/spec/flowCommand.spec.js +16 -12
  111. package/build/commands/folder/create.js +2 -2
  112. package/build/commands/folder/delete.js +2 -2
  113. package/build/commands/folder/folderCommand.js +11 -11
  114. package/build/commands/folder/move.js +2 -2
  115. package/build/commands/folder/spec/folder.spec.server.js +35 -35
  116. package/build/commands/folder/spec/folderCommand.spec.js +23 -19
  117. package/build/commands/help/help.js +50 -48
  118. package/build/commands/help/helpCommand.js +1 -1
  119. package/build/commands/help/spec/help.spec.js +8 -8
  120. package/build/commands/help/spec/helpCommand.spec.js +11 -7
  121. package/build/commands/init/init.js +7 -7
  122. package/build/commands/init/initCommand.js +1 -1
  123. package/build/commands/init/spec/init.spec.server.js +17 -17
  124. package/build/commands/init/spec/initCommand.spec.js +11 -7
  125. package/build/commands/job/internal/execute/sasjs.js +1 -1
  126. package/build/commands/job/internal/execute/viya.js +35 -35
  127. package/build/commands/job/internal/utils.js +6 -6
  128. package/build/commands/job/jobCommand.js +6 -6
  129. package/build/commands/job/spec/execute.spec.js +6 -6
  130. package/build/commands/job/spec/getContextName.spec.js +2 -2
  131. package/build/commands/job/spec/job.spec.server.js +53 -53
  132. package/build/commands/job/spec/jobCommand.spec.js +17 -13
  133. package/build/commands/lint/initLint.js +2 -2
  134. package/build/commands/lint/lintCommand.js +10 -10
  135. package/build/commands/lint/processLint.js +5 -5
  136. package/build/commands/lint/spec/lintCommand.spec.js +19 -15
  137. package/build/commands/request/request.js +16 -16
  138. package/build/commands/request/requestCommand.js +5 -5
  139. package/build/commands/request/spec/request.spec.server.js +71 -71
  140. package/build/commands/request/spec/requestCommand.spec.js +17 -13
  141. package/build/commands/run/run.js +23 -23
  142. package/build/commands/run/runCommand.js +2 -2
  143. package/build/commands/run/spec/run.spec.server.js +51 -51
  144. package/build/commands/run/spec/runCommand.spec.js +10 -6
  145. package/build/commands/servicepack/deploy.js +6 -6
  146. package/build/commands/servicepack/servicePackCommand.js +3 -3
  147. package/build/commands/servicepack/spec/servicepack.spec.server.js +6 -6
  148. package/build/commands/servicepack/spec/servicepackCommand.spec.js +10 -6
  149. package/build/commands/shared/createConfigFile.js +2 -2
  150. package/build/commands/shared/createFileStructure.js +6 -6
  151. package/build/commands/shared/createLintConfigFile.js +1 -1
  152. package/build/commands/shared/deployToSasViyaWithServicePack.js +4 -4
  153. package/build/commands/shared/fetchLogFileContent.js +10 -6
  154. package/build/commands/testing/internal/saveOutput.js +38 -34
  155. package/build/commands/testing/spec/testCommand.spec.js +17 -13
  156. package/build/commands/testing/spec/testing.spec.server.js +38 -38
  157. package/build/commands/testing/test.js +45 -41
  158. package/build/commands/testing/testCommand.js +2 -2
  159. package/build/commands/version/spec/version.spec.js +1 -1
  160. package/build/commands/version/spec/versionCommand.spec.js +11 -7
  161. package/build/commands/version/version.js +3 -3
  162. package/build/commands/version/versionCommand.js +2 -2
  163. package/build/commands/web/internal/createAssetServices.js +28 -24
  164. package/build/commands/web/internal/getWebServiceContent.js +6 -6
  165. package/build/commands/web/internal/sasjsout.d.ts +1 -1
  166. package/build/commands/web/internal/sasjsout.js +1 -1
  167. package/build/commands/web/internal/spec/updateLinkTag.spec.js +2 -2
  168. package/build/commands/web/internal/spec/updateScriptTag.spec.js +10 -10
  169. package/build/commands/web/internal/updateAllTags.js +19 -15
  170. package/build/commands/web/internal/updateLinkTag.js +2 -2
  171. package/build/commands/web/internal/updateScriptTag.js +6 -6
  172. package/build/commands/web/spec/web.spec.js +23 -23
  173. package/build/commands/web/spec/webCommand.spec.js +16 -12
  174. package/build/commands/web/web.js +25 -25
  175. package/build/commands/web/webCommand.js +3 -3
  176. package/build/types/command/commandBase.js +19 -15
  177. package/build/types/command/parse.js +1 -1
  178. package/build/types/command/spec/commandBase.spec.js +16 -12
  179. package/build/types/command/targetCommand.js +4 -4
  180. package/build/types/command/unalias.js +9 -5
  181. package/build/utils/auth.js +7 -7
  182. package/build/utils/config.js +56 -49
  183. package/build/utils/displayResult.js +4 -4
  184. package/build/utils/file.js +11 -11
  185. package/build/utils/fileStructures/builtFiles.js +2 -2
  186. package/build/utils/fileStructures/builtFilesCustom1.js +2 -2
  187. package/build/utils/getLogFilePath.js +1 -1
  188. package/build/utils/loadEnvVariables.js +3 -3
  189. package/build/utils/prefixAppLoc.js +1 -1
  190. package/build/utils/saveLog.js +7 -7
  191. package/build/utils/setConstants.js +4 -4
  192. package/build/utils/setProjectDir.js +2 -2
  193. package/build/utils/spec/config.spec.js +80 -80
  194. package/build/utils/spec/displayResult.spec.js +7 -7
  195. package/build/utils/spec/file.spec.js +15 -15
  196. package/build/utils/spec/removeComments.spec.js +11 -11
  197. package/build/utils/spec/setConstants.spec.js +3 -3
  198. package/build/utils/spec/utils.spec.js +55 -55
  199. package/build/utils/test.js +59 -59
  200. package/build/utils/utils.js +47 -43
  201. package/package.json +11 -11
@@ -193,18 +193,18 @@ var ContextCommand = /** @class */ (function (_super) {
193
193
  return [2 /*return*/, this._config];
194
194
  }
195
195
  configPath = this.parsed.source;
196
- return [4 /*yield*/, validateConfigPath_1.validateConfigPath(configPath)];
196
+ return [4 /*yield*/, (0, validateConfigPath_1.validateConfigPath)(configPath)];
197
197
  case 1:
198
198
  isValidPath = _a.sent();
199
199
  if (!isValidPath) {
200
200
  throw new Error('Invalid source JSON path.');
201
201
  }
202
- return [4 /*yield*/, utils_1.readFile(configPath).catch(function () {
203
- throw new Error("Error reading file at " + configPath + ".");
202
+ return [4 /*yield*/, (0, utils_1.readFile)(configPath).catch(function () {
203
+ throw new Error("Error reading file at ".concat(configPath, "."));
204
204
  })];
205
205
  case 2:
206
206
  content = _a.sent();
207
- this._config = parseConfig_1.parseConfig(content);
207
+ this._config = (0, parseConfig_1.parseConfig)(content);
208
208
  return [2 /*return*/, this._config];
209
209
  }
210
210
  });
@@ -227,7 +227,7 @@ var ContextCommand = /** @class */ (function (_super) {
227
227
  });
228
228
  return [4 /*yield*/, this.getConfig().catch(function (err) {
229
229
  var _a;
230
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Unable to create context. Error fetching context configuration from " + _this.parsed.source + ": ", err);
230
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Unable to create context. Error fetching context configuration from ".concat(_this.parsed.source, ": "), err);
231
231
  return null;
232
232
  })];
233
233
  case 2:
@@ -235,7 +235,7 @@ var ContextCommand = /** @class */ (function (_super) {
235
235
  if (!config) {
236
236
  return [2 /*return*/, command_1.ReturnCode.InternalError];
237
237
  }
238
- return [4 /*yield*/, utils_2.getAuthConfig(target).catch(function (err) {
238
+ return [4 /*yield*/, (0, utils_2.getAuthConfig)(target).catch(function (err) {
239
239
  var _a;
240
240
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Unable to create context. Error fetching auth config: ', err);
241
241
  return null;
@@ -245,7 +245,7 @@ var ContextCommand = /** @class */ (function (_super) {
245
245
  if (!authConfig) {
246
246
  return [2 /*return*/, command_1.ReturnCode.InternalError];
247
247
  }
248
- return [4 /*yield*/, create_1.create(config, sasjs, authConfig.access_token)
248
+ return [4 /*yield*/, (0, create_1.create)(config, sasjs, authConfig.access_token)
249
249
  .then(function () {
250
250
  return command_1.ReturnCode.Success;
251
251
  })
@@ -273,7 +273,7 @@ var ContextCommand = /** @class */ (function (_super) {
273
273
  appLoc: target.appLoc,
274
274
  serverType: target.serverType
275
275
  });
276
- return [4 /*yield*/, utils_2.getAuthConfig(target).catch(function (err) {
276
+ return [4 /*yield*/, (0, utils_2.getAuthConfig)(target).catch(function (err) {
277
277
  var _a;
278
278
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Unable to create context. Error fetching auth config: ', err);
279
279
  return null;
@@ -283,7 +283,7 @@ var ContextCommand = /** @class */ (function (_super) {
283
283
  if (!authConfig) {
284
284
  return [2 /*return*/, command_1.ReturnCode.InternalError];
285
285
  }
286
- return [4 /*yield*/, delete_1.deleteContext(this.parsed.contextName, sasjs, authConfig.access_token)
286
+ return [4 /*yield*/, (0, delete_1.deleteContext)(this.parsed.contextName, sasjs, authConfig.access_token)
287
287
  .then(function () {
288
288
  return command_1.ReturnCode.Success;
289
289
  })
@@ -314,7 +314,7 @@ var ContextCommand = /** @class */ (function (_super) {
314
314
  });
315
315
  return [4 /*yield*/, this.getConfig().catch(function (err) {
316
316
  var _a;
317
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Unable to edit context. Error fetching context configuration from " + _this.parsed.source + ": ", err);
317
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Unable to edit context. Error fetching context configuration from ".concat(_this.parsed.source, ": "), err);
318
318
  return null;
319
319
  })];
320
320
  case 2:
@@ -322,7 +322,7 @@ var ContextCommand = /** @class */ (function (_super) {
322
322
  if (!config) {
323
323
  return [2 /*return*/, command_1.ReturnCode.InternalError];
324
324
  }
325
- return [4 /*yield*/, utils_2.getAuthConfig(target).catch(function (err) {
325
+ return [4 /*yield*/, (0, utils_2.getAuthConfig)(target).catch(function (err) {
326
326
  var _a;
327
327
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Unable to edit context. Error fetching auth config: ', err);
328
328
  return null;
@@ -332,7 +332,7 @@ var ContextCommand = /** @class */ (function (_super) {
332
332
  if (!authConfig) {
333
333
  return [2 /*return*/, command_1.ReturnCode.InternalError];
334
334
  }
335
- return [4 /*yield*/, edit_1.edit(this.parsed.contextName, config, sasjs, authConfig.access_token)
335
+ return [4 /*yield*/, (0, edit_1.edit)(this.parsed.contextName, config, sasjs, authConfig.access_token)
336
336
  .then(function () {
337
337
  return command_1.ReturnCode.Success;
338
338
  })
@@ -360,7 +360,7 @@ var ContextCommand = /** @class */ (function (_super) {
360
360
  appLoc: target.appLoc,
361
361
  serverType: target.serverType
362
362
  });
363
- return [4 /*yield*/, utils_2.getAuthConfig(target).catch(function (err) {
363
+ return [4 /*yield*/, (0, utils_2.getAuthConfig)(target).catch(function (err) {
364
364
  var _a;
365
365
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Unable to create context. Error fetching auth config: ', err);
366
366
  return null;
@@ -370,7 +370,7 @@ var ContextCommand = /** @class */ (function (_super) {
370
370
  if (!authConfig) {
371
371
  return [2 /*return*/, command_1.ReturnCode.InternalError];
372
372
  }
373
- return [4 /*yield*/, export_1.exportContext(this.parsed.contextName, sasjs, authConfig.access_token)
373
+ return [4 /*yield*/, (0, export_1.exportContext)(this.parsed.contextName, sasjs, authConfig.access_token)
374
374
  .then(function () {
375
375
  return command_1.ReturnCode.Success;
376
376
  })
@@ -403,7 +403,7 @@ var ContextCommand = /** @class */ (function (_super) {
403
403
  appLoc: target.appLoc,
404
404
  serverType: target.serverType
405
405
  });
406
- return [4 /*yield*/, utils_2.getAuthConfig(target).catch(function (err) {
406
+ return [4 /*yield*/, (0, utils_2.getAuthConfig)(target).catch(function (err) {
407
407
  var _a;
408
408
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Unable to create context. Error fetching auth config: ', err);
409
409
  return null;
@@ -413,7 +413,7 @@ var ContextCommand = /** @class */ (function (_super) {
413
413
  if (!authConfig) {
414
414
  return [2 /*return*/, command_1.ReturnCode.InternalError];
415
415
  }
416
- return [4 /*yield*/, list_1.list(target, sasjs, authConfig)
416
+ return [4 /*yield*/, (0, list_1.list)(target, sasjs, authConfig)
417
417
  .then(function () {
418
418
  return command_1.ReturnCode.Success;
419
419
  })
@@ -64,7 +64,7 @@ function create(config, sasjs, accessToken) {
64
64
  case 1:
65
65
  createdContext = _b.sent();
66
66
  if (createdContext) {
67
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '" + name + "' with id '" + createdContext.id + "' successfully created!");
67
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '".concat(name, "' with id '").concat(createdContext.id, "' successfully created!"));
68
68
  }
69
69
  return [2 /*return*/];
70
70
  }
@@ -53,13 +53,13 @@ function deleteContext(contextName, sasjs, accessToken) {
53
53
  .deleteComputeContext(contextName, accessToken)
54
54
  .catch(function (err) {
55
55
  var _a;
56
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Error deleting context '" + contextName + "': ", err);
56
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Error deleting context '".concat(contextName, "': "), err);
57
57
  throw err;
58
58
  })];
59
59
  case 1:
60
60
  deletedContext = _b.sent();
61
61
  if (deletedContext) {
62
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '" + contextName + "' has been deleted!");
62
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '".concat(contextName, "' has been deleted!"));
63
63
  }
64
64
  return [2 /*return*/];
65
65
  }
@@ -64,7 +64,7 @@ function edit(configName, config, sasjs, accessToken) {
64
64
  editedContext = _b.sent();
65
65
  if (editedContext) {
66
66
  editedContextName = editedContext.result.name || '';
67
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '" + editedContextName + "' successfully updated!");
67
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Context '".concat(editedContextName, "' successfully updated!"));
68
68
  }
69
69
  return [2 /*return*/];
70
70
  }
@@ -59,7 +59,7 @@ function exportContext(contextName, sasjs, accessToken) {
59
59
  .getComputeContextByName(contextName, accessToken)
60
60
  .catch(function (err) {
61
61
  var _a;
62
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("An error has occurred while fetching context " + contextName + ": ", err);
62
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("An error has occurred while fetching context ".concat(contextName, ": "), err);
63
63
  throw err;
64
64
  })];
65
65
  case 1:
@@ -69,7 +69,7 @@ function exportContext(contextName, sasjs, accessToken) {
69
69
  .getComputeContextById(context.id, accessToken)
70
70
  .catch(function (err) {
71
71
  var _a;
72
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("An error has occurred while fetching context " + contextName + ": ", err);
72
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("An error has occurred while fetching context ".concat(contextName, ": "), err);
73
73
  throw err;
74
74
  })];
75
75
  case 2:
@@ -84,16 +84,16 @@ function exportContext(contextName, sasjs, accessToken) {
84
84
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Error stringifying context JSON: ', error);
85
85
  throw error;
86
86
  }
87
- outputFileName = file_1.sanitizeFileName(contextName) + '.json';
87
+ outputFileName = (0, file_1.sanitizeFileName)(contextName) + '.json';
88
88
  outputPath = path_1.default.join(process.cwd(), outputFileName);
89
- return [4 /*yield*/, utils_1.createFile(outputPath, output).catch(function (err) {
89
+ return [4 /*yield*/, (0, utils_1.createFile)(outputPath, output).catch(function (err) {
90
90
  var _a;
91
91
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Error creating context JSON file: ', err);
92
92
  throw err;
93
93
  })];
94
94
  case 3:
95
95
  _c.sent();
96
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("Context successfully exported to '" + outputPath + "'.");
96
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("Context successfully exported to '".concat(outputPath, "'."));
97
97
  _c.label = 4;
98
98
  case 4: return [2 /*return*/];
99
99
  }
@@ -49,7 +49,7 @@ function validateConfigPath(path) {
49
49
  isJsonFile = /\.json$/i.test(path);
50
50
  if (!isJsonFile)
51
51
  return [2 /*return*/, false];
52
- return [4 /*yield*/, file_1.fileExists(path)];
52
+ return [4 /*yield*/, (0, file_1.fileExists)(path)];
53
53
  case 1: return [2 /*return*/, _a.sent()];
54
54
  }
55
55
  });
@@ -55,7 +55,7 @@ function list(target, sasjs, authConfig) {
55
55
  switch (_d.label) {
56
56
  case 0:
57
57
  startTime = new Date().getTime();
58
- spinner = ora_1.default("Checking the compute contexts on " + target.serverUrl + " ...\n");
58
+ spinner = (0, ora_1.default)("Checking the compute contexts on ".concat(target.serverUrl, " ...\n"));
59
59
  spinner.start();
60
60
  return [4 /*yield*/, sasjs
61
61
  .getExecutableContexts(authConfig)
@@ -97,17 +97,17 @@ function list(target, sasjs, authConfig) {
97
97
  }); });
98
98
  if (accessibleContexts.length) {
99
99
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success('Accessible contexts:\n' +
100
- accessibleContexts.map(function (c, i) { return i + 1 + ". " + c.name + "\n"; }).join(''));
100
+ accessibleContexts.map(function (c, i) { return "".concat(i + 1, ". ").concat(c.name, "\n"); }).join(''));
101
101
  }
102
102
  if (inaccessibleContexts.length) {
103
103
  (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success('Inaccessible contexts:\n' +
104
- inaccessibleContexts.map(function (c, i) { return i + 1 + ". " + c.name + "\n"; }).join(''));
104
+ inaccessibleContexts.map(function (c, i) { return "".concat(i + 1, ". ").concat(c.name, "\n"); }).join(''));
105
105
  }
106
106
  _d.label = 3;
107
107
  case 3:
108
108
  spinner.stop();
109
109
  endTime = new Date().getTime();
110
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("This operation took " + (endTime - startTime) / 1000 + " seconds");
110
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("This operation took ".concat((endTime - startTime) / 1000, " seconds"));
111
111
  return [2 /*return*/];
112
112
  }
113
113
  });