@sasjs/cli 4.20.1 → 4.20.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.
Files changed (230) hide show
  1. package/build/cli.js +4 -5
  2. package/build/cli.spec.js +19 -9
  3. package/build/commands/add/addCommand.js +2 -2
  4. package/build/commands/add/addCredential.js +2 -2
  5. package/build/commands/add/addTarget.js +13 -14
  6. package/build/commands/add/internal/input.js +14 -14
  7. package/build/commands/add/internal/saveConfig.js +3 -4
  8. package/build/commands/add/spec/addCommand.spec.js +19 -9
  9. package/build/commands/add/spec/addCredential.spec.js +19 -9
  10. package/build/commands/add/spec/addTarget.spec.js +19 -9
  11. package/build/commands/auth/authCommand.js +8 -8
  12. package/build/commands/auth/login.js +40 -14
  13. package/build/commands/auth/spec/authCommand.spec.js +19 -9
  14. package/build/commands/auth/spec/login.spec.js +19 -9
  15. package/build/commands/build/build.js +25 -26
  16. package/build/commands/build/buildCommand.js +2 -2
  17. package/build/commands/build/compileBuildCommand.js +3 -3
  18. package/build/commands/build/internal/config.js +2 -2
  19. package/build/commands/build/spec/build.spec.js +2 -2
  20. package/build/commands/build/spec/buildCommand.spec.js +19 -9
  21. package/build/commands/build/spec/cb.spec.server.viya.js +2 -2
  22. package/build/commands/build/spec/compileBuildCommand.spec.js +19 -9
  23. package/build/commands/compile/compile.js +29 -20
  24. package/build/commands/compile/compileCommand.js +2 -2
  25. package/build/commands/compile/compileSingleFile.js +15 -15
  26. package/build/commands/compile/internal/checkCompileStatus.js +3 -4
  27. package/build/commands/compile/internal/compareFolders.js +2 -2
  28. package/build/commands/compile/internal/compileFile.js +6 -7
  29. package/build/commands/compile/internal/compileTestFile.js +17 -13
  30. package/build/commands/compile/internal/copySyncFolder.js +2 -2
  31. package/build/commands/compile/internal/getAllFolders.js +3 -3
  32. package/build/commands/compile/internal/identifySasFile.js +2 -2
  33. package/build/commands/compile/internal/loadDependencies.js +10 -10
  34. package/build/commands/compile/internal/spec/compileTestFile.spec.js +2 -2
  35. package/build/commands/compile/internal/spec/getAllFolders.spec.js +19 -9
  36. package/build/commands/compile/spec/compareFolders.spec.js +3 -3
  37. package/build/commands/compile/spec/compile.spec.js +19 -9
  38. package/build/commands/compile/spec/compileCommand.spec.js +19 -9
  39. package/build/commands/compile/spec/compileFile.spec.js +19 -9
  40. package/build/commands/compile/spec/compileSingleFile.spec.js +19 -9
  41. package/build/commands/compile/spec/copyFilesToBuildFolder.spec.js +20 -10
  42. package/build/commands/compile/spec/loadDependencies.spec.js +19 -9
  43. package/build/commands/context/contextCommand.js +3 -3
  44. package/build/commands/context/create.js +4 -5
  45. package/build/commands/context/delete.js +4 -5
  46. package/build/commands/context/edit.js +4 -5
  47. package/build/commands/context/export.js +4 -5
  48. package/build/commands/context/internal/parseConfig.js +1 -2
  49. package/build/commands/context/internal/validateConfigPath.js +3 -4
  50. package/build/commands/context/list.js +4 -5
  51. package/build/commands/context/spec/contextCommand.spec.js +19 -9
  52. package/build/commands/context/spec/create.spec.js +2 -2
  53. package/build/commands/context/spec/delete.spec.js +2 -2
  54. package/build/commands/context/spec/edit.spec.js +2 -2
  55. package/build/commands/context/spec/export.spec.js +19 -9
  56. package/build/commands/context/spec/list.spec.js +2 -2
  57. package/build/commands/create/create.js +4 -5
  58. package/build/commands/create/createCommand.js +2 -2
  59. package/build/commands/create/createTemplate.js +1 -1
  60. package/build/commands/create/internal/createReadme.js +3 -4
  61. package/build/commands/create/spec/create.spec.js +2 -2
  62. package/build/commands/create/spec/createCommand.spec.js +19 -9
  63. package/build/commands/db/db.js +8 -9
  64. package/build/commands/db/dbCommand.js +2 -2
  65. package/build/commands/db/spec/db.spec.js +2 -2
  66. package/build/commands/db/spec/dbCommand.spec.js +19 -9
  67. package/build/commands/deploy/compileBuildDeployCommand.js +8 -8
  68. package/build/commands/deploy/deploy.js +4 -5
  69. package/build/commands/deploy/deployCommand.js +2 -2
  70. package/build/commands/deploy/internal/deployToSASJSWithServicePack.js +11 -12
  71. package/build/commands/deploy/internal/executeDeployScript.js +3 -4
  72. package/build/commands/deploy/internal/executeDeployScriptSas9.js +10 -11
  73. package/build/commands/deploy/internal/executeDeployScriptSasViya.js +11 -12
  74. package/build/commands/deploy/internal/executeDeployScriptSasjs.js +12 -13
  75. package/build/commands/deploy/internal/executeNonSasScript.js +4 -5
  76. package/build/commands/deploy/internal/executeSasScript.js +5 -6
  77. package/build/commands/deploy/internal/getDeployScripts.js +4 -5
  78. package/build/commands/deploy/spec/cbd.spec.js +19 -9
  79. package/build/commands/deploy/spec/cbd.spec.server.viya.js +19 -9
  80. package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +19 -9
  81. package/build/commands/deploy/spec/deploy.spec.js +19 -9
  82. package/build/commands/deploy/spec/deployCommand.spec.js +19 -9
  83. package/build/commands/deploy/spec/getDeployScripts.spec.js +2 -2
  84. package/build/commands/deploy/spec/utils.js +41 -8
  85. package/build/commands/docs/docsCommand.js +2 -2
  86. package/build/commands/docs/generateDocs.js +11 -12
  87. package/build/commands/docs/generateDot.js +3 -4
  88. package/build/commands/docs/initDocs.js +3 -4
  89. package/build/commands/docs/internal/createDotFiles.js +4 -5
  90. package/build/commands/docs/internal/getDocConfig.d.ts +8 -8
  91. package/build/commands/docs/internal/getDocConfig.js +1 -2
  92. package/build/commands/docs/internal/getDotFileContent.js +3 -4
  93. package/build/commands/docs/internal/getFileInputs.js +1 -2
  94. package/build/commands/docs/internal/getFileOutputs.js +1 -2
  95. package/build/commands/docs/internal/getFoldersForDocs.js +1 -2
  96. package/build/commands/docs/internal/populateNodeDictionary.js +1 -2
  97. package/build/commands/docs/internal/populateParamNodeTypes.js +21 -22
  98. package/build/commands/docs/spec/docsCommand.spec.js +19 -9
  99. package/build/commands/docs/spec/generateDocs.spec.js +2 -2
  100. package/build/commands/docs/spec/generateDot.spec.js +2 -2
  101. package/build/commands/docs/spec/getDocConfig.spec.js +2 -2
  102. package/build/commands/docs/spec/initDocs.spec.js +2 -2
  103. package/build/commands/flow/execute.js +6 -7
  104. package/build/commands/flow/flowCommand.js +2 -2
  105. package/build/commands/flow/internal/executeFlow.js +2 -2
  106. package/build/commands/flow/internal/saveLog.js +34 -5
  107. package/build/commands/flow/internal/saveToCsv.js +2 -2
  108. package/build/commands/flow/internal/spec/executeFlow.spec.js +19 -9
  109. package/build/commands/flow/internal/spec/saveToCsv.spec.js +2 -2
  110. package/build/commands/flow/internal/spec/validateParams.spec.js +19 -9
  111. package/build/commands/flow/internal/validateParams.d.ts +4 -4
  112. package/build/commands/flow/internal/validateParams.js +2 -2
  113. package/build/commands/flow/spec/flow.spec.js +19 -9
  114. package/build/commands/flow/spec/flow.spec.server.viya.js +2 -2
  115. package/build/commands/flow/spec/flowCommand.spec.js +19 -9
  116. package/build/commands/folder/create.js +2 -2
  117. package/build/commands/folder/delete.js +2 -2
  118. package/build/commands/folder/folderCommand.js +13 -13
  119. package/build/commands/folder/list.js +2 -2
  120. package/build/commands/folder/move.js +2 -2
  121. package/build/commands/folder/spec/folder.spec.server.viya.js +2 -2
  122. package/build/commands/folder/spec/folderCommand.spec.js +19 -9
  123. package/build/commands/fs/fsCommand.js +34 -36
  124. package/build/commands/fs/internal/executeCode.js +2 -2
  125. package/build/commands/fs/spec/executeCode.spec.js +19 -9
  126. package/build/commands/fs/spec/fsCommand.spec.js +19 -9
  127. package/build/commands/help/help.js +3 -4
  128. package/build/commands/help/helpCommand.js +2 -2
  129. package/build/commands/help/spec/help.spec.js +2 -2
  130. package/build/commands/help/spec/helpCommand.spec.js +19 -9
  131. package/build/commands/index.js +1 -1
  132. package/build/commands/init/init.js +5 -5
  133. package/build/commands/init/initCommand.js +2 -2
  134. package/build/commands/init/spec/init.spec.js +2 -2
  135. package/build/commands/init/spec/initCommand.spec.js +19 -9
  136. package/build/commands/job/internal/execute/sas9.js +3 -4
  137. package/build/commands/job/internal/execute/sasjs.js +4 -5
  138. package/build/commands/job/internal/execute/viya.js +9 -10
  139. package/build/commands/job/internal/utils.js +2 -2
  140. package/build/commands/job/jobCommand.js +19 -19
  141. package/build/commands/job/spec/execute.spec.js +19 -9
  142. package/build/commands/job/spec/getContextName.spec.js +2 -2
  143. package/build/commands/job/spec/job.spec.server.viya.js +24 -16
  144. package/build/commands/job/spec/jobCommand.spec.js +19 -9
  145. package/build/commands/lint/initLint.js +3 -4
  146. package/build/commands/lint/lintCommand.js +2 -2
  147. package/build/commands/lint/processLint.js +13 -14
  148. package/build/commands/lint/spec/lintCommand.spec.js +19 -9
  149. package/build/commands/request/request.js +3 -4
  150. package/build/commands/request/requestCommand.js +2 -2
  151. package/build/commands/request/spec/request.spec.server.sas9.js +19 -9
  152. package/build/commands/request/spec/request.spec.server.viya.js +19 -9
  153. package/build/commands/request/spec/requestCommand.spec.js +19 -9
  154. package/build/commands/request/spec/utils.js +2 -2
  155. package/build/commands/run/run.js +29 -30
  156. package/build/commands/run/runCommand.js +2 -2
  157. package/build/commands/run/spec/run.spec.js +19 -9
  158. package/build/commands/run/spec/run.spec.server.sas9.js +2 -2
  159. package/build/commands/run/spec/run.spec.server.sasjs.js +2 -2
  160. package/build/commands/run/spec/run.spec.server.viya.js +4 -4
  161. package/build/commands/run/spec/runCommand.spec.js +19 -9
  162. package/build/commands/servicepack/deploy.js +7 -8
  163. package/build/commands/servicepack/servicePackCommand.js +7 -7
  164. package/build/commands/servicepack/spec/servicepack.spec.server.viya.js +2 -2
  165. package/build/commands/servicepack/spec/servicepackCommand.spec.js +19 -9
  166. package/build/commands/shared/createConfigFile.js +2 -2
  167. package/build/commands/shared/createFileStructure.js +2 -2
  168. package/build/commands/shared/createLintConfigFile.js +2 -2
  169. package/build/commands/shared/deployToSasViyaWithServicePack.js +6 -7
  170. package/build/commands/shared/fetchLogFileContent.js +2 -2
  171. package/build/commands/shared/spec/deployToSasViyaWithServicePack.spec.js +19 -9
  172. package/build/commands/snippets/snippets.js +3 -4
  173. package/build/commands/snippets/snippetsCommand.js +2 -2
  174. package/build/commands/snippets/spec/snippets.spec.js +2 -2
  175. package/build/commands/snippets/spec/snippetsCommand.spec.js +19 -9
  176. package/build/commands/testing/internal/saveOutput.js +23 -15
  177. package/build/commands/testing/spec/testCommand.spec.js +19 -9
  178. package/build/commands/testing/spec/testing.spec.js +19 -9
  179. package/build/commands/testing/test.js +14 -14
  180. package/build/commands/testing/testCommand.js +2 -2
  181. package/build/commands/version/spec/version.spec.js +2 -2
  182. package/build/commands/version/spec/versionCommand.spec.js +19 -9
  183. package/build/commands/version/version.js +4 -5
  184. package/build/commands/version/versionCommand.js +2 -2
  185. package/build/commands/web/internal/createAssetServices.js +39 -41
  186. package/build/commands/web/internal/sas9/createClickMeService.js +2 -2
  187. package/build/commands/web/internal/sas9/generateAssetService.js +2 -2
  188. package/build/commands/web/internal/sas9/getWebServiceContent.js +34 -5
  189. package/build/commands/web/internal/sasViya/createClickMeFile.js +2 -2
  190. package/build/commands/web/internal/spec/updateSasjstag.spec.js +2 -2
  191. package/build/commands/web/internal/spec/updateScriptTag.spec.js +2 -2
  192. package/build/commands/web/internal/spec/updateStyleTag.spec.js +2 -2
  193. package/build/commands/web/internal/updateAllTags.js +86 -88
  194. package/build/commands/web/internal/updateLinkTag.d.ts +1 -1
  195. package/build/commands/web/internal/updateScriptTag.js +2 -2
  196. package/build/commands/web/internal/updateStyleTag.js +2 -2
  197. package/build/commands/web/spec/web.spec.js +2 -2
  198. package/build/commands/web/spec/webCommand.spec.js +19 -9
  199. package/build/commands/web/web.js +10 -11
  200. package/build/commands/web/webCommand.js +2 -2
  201. package/build/types/command/commandAliases.d.ts +1 -1
  202. package/build/types/command/commandBase.js +2 -2
  203. package/build/types/command/commandFactory.d.ts +1 -1
  204. package/build/types/command/returnCode.js +1 -1
  205. package/build/types/command/spec/commandBase.spec.js +2 -2
  206. package/build/types/command/spec/targetCommand.spec.js +19 -9
  207. package/build/types/command/targetCommand.js +2 -2
  208. package/build/types/flow.js +1 -1
  209. package/build/types/targetScope.js +1 -1
  210. package/build/types/testing.js +3 -3
  211. package/build/utils/auth.js +8 -8
  212. package/build/utils/compressAndSave.js +2 -2
  213. package/build/utils/config.js +82 -84
  214. package/build/utils/displayResult.js +2 -3
  215. package/build/utils/file.js +13 -13
  216. package/build/utils/loadEnvVariables.js +4 -5
  217. package/build/utils/parseSourceFile.js +3 -4
  218. package/build/utils/saveLog.js +34 -5
  219. package/build/utils/setConstants.js +34 -5
  220. package/build/utils/setProjectDir.js +2 -2
  221. package/build/utils/spec/auth.spec.js +2 -2
  222. package/build/utils/spec/config.spec.js +19 -9
  223. package/build/utils/spec/file.spec.js +2 -2
  224. package/build/utils/spec/saveLog.spec.js +2 -2
  225. package/build/utils/spec/setConstants.spec.js +20 -10
  226. package/build/utils/spec/utils.spec.js +2 -2
  227. package/build/utils/test.d.ts +2 -3
  228. package/build/utils/test.js +103 -40
  229. package/build/utils/utils.js +22 -22
  230. package/package.json +32 -32
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
26
26
  }) : function(o, v) {
27
27
  o["default"] = v;
28
28
  });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
36
46
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
47
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
48
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
53
  });
44
54
  };
45
55
  var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
56
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
58
  function verb(n) { return function (v) { return step([n, v]); }; }
49
59
  function step(op) {
50
60
  if (f) throw new TypeError("Generator is already executing.");
@@ -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) {
@@ -32,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
47
  function verb(n) { return function (v) { return step([n, v]); }; }
38
48
  function step(op) {
39
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -64,7 +64,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
64
64
  return (mod && mod.__esModule) ? mod : { "default": mod };
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.runSasCode = void 0;
67
+ exports.runSasCode = runSasCode;
68
68
  var path_1 = __importDefault(require("path"));
69
69
  var node_1 = require("@sasjs/adapter/node");
70
70
  var config_1 = require("../../utils/config");
@@ -82,12 +82,12 @@ var parseSourceFile_1 = require("../../utils/parseSourceFile");
82
82
  * @param {boolean} compile - compiles sas file present at 'filePath' before running code.
83
83
  * @param {string} logFile - (Optional) Path to log file.
84
84
  */
85
- function runSasCode(target, filePath, compile, logFile, source) {
86
- var _a;
87
- if (compile === void 0) { compile = false; }
88
- return __awaiter(this, void 0, void 0, function () {
89
- var isTempFile, sourcefilePathParts, sourceFolderPath, sasFilePath, sasFileContent, linesToExecute, macroVars, macroVarStatements, _b;
85
+ function runSasCode(target_1, filePath_1) {
86
+ return __awaiter(this, arguments, void 0, function (target, filePath, compile, logFile, source) {
87
+ var isTempFile, sourcefilePathParts, sourceFolderPath, sasFilePath, sasFileContent, linesToExecute, macroVars, macroVarStatements, _a;
88
+ var _b;
90
89
  var _c;
90
+ if (compile === void 0) { compile = false; }
91
91
  return __generator(this, function (_d) {
92
92
  switch (_d.label) {
93
93
  case 0:
@@ -96,7 +96,7 @@ function runSasCode(target, filePath, compile, logFile, source) {
96
96
  ;
97
97
  return [4 /*yield*/, createFileFromUrl(filePath)];
98
98
  case 1:
99
- (_c = _d.sent(), isTempFile = _c.isTempFile, filePath = _c.tempFilePath);
99
+ (_b = _d.sent(), isTempFile = _b.isTempFile, filePath = _b.tempFilePath);
100
100
  _d.label = 2;
101
101
  case 2:
102
102
  if (!compile) return [3 /*break*/, 5];
@@ -107,7 +107,7 @@ function runSasCode(target, filePath, compile, logFile, source) {
107
107
  return [4 /*yield*/, (0, __1.compileSingleFile)(target, 'identify', filePath, (0, internal_1.getDestinationServicePath)(sourceFolderPath), true)];
108
108
  case 3:
109
109
  (filePath = (_d.sent()).destinationPath);
110
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("File Compiled and placed at: ".concat(filePath, " ."));
110
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success("File Compiled and placed at: ".concat(filePath, " ."));
111
111
  return [3 /*break*/, 5];
112
112
  case 4:
113
113
  process.logger.info('Compile flag has no effect on files with extension type other than sas');
@@ -132,8 +132,8 @@ function runSasCode(target, filePath, compile, logFile, source) {
132
132
  _d.sent();
133
133
  _d.label = 10;
134
134
  case 10:
135
- _b = target.serverType;
136
- switch (_b) {
135
+ _a = target.serverType;
136
+ switch (_a) {
137
137
  case utils_1.ServerType.SasViya: return [3 /*break*/, 11];
138
138
  case utils_1.ServerType.Sas9: return [3 /*break*/, 13];
139
139
  case utils_1.ServerType.Sasjs: return [3 /*break*/, 15];
@@ -150,19 +150,18 @@ function runSasCode(target, filePath, compile, logFile, source) {
150
150
  });
151
151
  });
152
152
  }
153
- exports.runSasCode = runSasCode;
154
153
  function executeOnSasViya(filePath, target, linesToExecute, logFile) {
155
- var _a, _b, _c, _d;
156
154
  return __awaiter(this, void 0, void 0, function () {
157
- var _e, sasjs, authConfig, contextName, log, buildDestinationResultsFolder, createdFilePath;
155
+ var _a, sasjs, authConfig, contextName, log, buildDestinationResultsFolder, createdFilePath;
158
156
  var _this = this;
157
+ var _b, _c, _d, _e;
159
158
  return __generator(this, function (_f) {
160
159
  switch (_f.label) {
161
160
  case 0:
162
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Sending ".concat(path_1.default.basename(filePath), " to SAS server for execution."));
161
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Sending ".concat(path_1.default.basename(filePath), " to SAS server for execution."));
163
162
  return [4 /*yield*/, (0, config_1.getSASjsAndAuthConfig)(target)];
164
163
  case 1:
165
- _e = _f.sent(), sasjs = _e.sasjs, authConfig = _e.authConfig;
164
+ _a = _f.sent(), sasjs = _a.sasjs, authConfig = _a.authConfig;
166
165
  contextName = target.contextName || sasjs.getSasjsConfig().contextName;
167
166
  return [4 /*yield*/, sasjs
168
167
  .executeScript({
@@ -189,28 +188,28 @@ function executeOnSasViya(filePath, target, linesToExecute, logFile) {
189
188
  }); })];
190
189
  case 2:
191
190
  log = (_f.sent()).log;
192
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success('Job execution completed!');
191
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success('Job execution completed!');
193
192
  buildDestinationResultsFolder = process.sasjsConstants.buildDestinationResultsFolder;
194
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("Creating log file in ".concat(buildDestinationResultsFolder, " ."));
193
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.info("Creating log file in ".concat(buildDestinationResultsFolder, " ."));
195
194
  return [4 /*yield*/, createOutputFile(log, logFile)];
196
195
  case 3:
197
196
  createdFilePath = _f.sent();
198
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Log file has been created at ".concat(createdFilePath, " ."));
197
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.success("Log file has been created at ".concat(createdFilePath, " ."));
199
198
  return [2 /*return*/, { log: log }];
200
199
  }
201
200
  });
202
201
  });
203
202
  }
204
203
  function executeOnSas9(target, linesToExecute, logFile) {
205
- var _a;
206
204
  return __awaiter(this, void 0, void 0, function () {
207
- var _b, sasjs, authConfigSas9, userName, password, executionResult;
205
+ var _a, sasjs, authConfigSas9, userName, password, executionResult;
208
206
  var _this = this;
207
+ var _b;
209
208
  return __generator(this, function (_c) {
210
209
  switch (_c.label) {
211
210
  case 0: return [4 /*yield*/, (0, config_1.getSASjsAndAuthConfig)(target)];
212
211
  case 1:
213
- _b = _c.sent(), sasjs = _b.sasjs, authConfigSas9 = _b.authConfigSas9;
212
+ _a = _c.sent(), sasjs = _a.sasjs, authConfigSas9 = _a.authConfigSas9;
214
213
  userName = authConfigSas9.userName;
215
214
  password = (0, utils_1.decodeFromBase64)(authConfigSas9.password);
216
215
  return [4 /*yield*/, sasjs
@@ -239,7 +238,7 @@ function executeOnSas9(target, linesToExecute, logFile) {
239
238
  }); })];
240
239
  case 2:
241
240
  executionResult = _c.sent();
242
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success('Job execution completed!');
241
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success('Job execution completed!');
243
242
  return [4 /*yield*/, createOutputFile(executionResult || '', logFile)];
244
243
  case 3:
245
244
  _c.sent();
@@ -249,9 +248,9 @@ function executeOnSas9(target, linesToExecute, logFile) {
249
248
  });
250
249
  }
251
250
  function executeOnSasJS(filePath, target, linesToExecute, logFile) {
252
- var _a;
253
251
  return __awaiter(this, void 0, void 0, function () {
254
- var sasjs, authConfig, _b, fileExtension, log;
252
+ var sasjs, authConfig, _a, fileExtension, log;
253
+ var _b;
255
254
  return __generator(this, function (_c) {
256
255
  switch (_c.label) {
257
256
  case 0:
@@ -261,13 +260,13 @@ function executeOnSasJS(filePath, target, linesToExecute, logFile) {
261
260
  if (!(_c.sent())) return [3 /*break*/, 3];
262
261
  return [4 /*yield*/, (0, config_1.getAuthConfig)(target)];
263
262
  case 2:
264
- _b = _c.sent();
263
+ _a = _c.sent();
265
264
  return [3 /*break*/, 4];
266
265
  case 3:
267
- _b = undefined;
266
+ _a = undefined;
268
267
  _c.label = 4;
269
268
  case 4:
270
- authConfig = _b;
269
+ authConfig = _a;
271
270
  fileExtension = path_1.default.extname(filePath).slice(1);
272
271
  return [4 /*yield*/, sasjs.executeScript({
273
272
  linesOfCode: linesToExecute,
@@ -279,7 +278,7 @@ function executeOnSasJS(filePath, target, linesToExecute, logFile) {
279
278
  if (!log) {
280
279
  throw new node_1.ErrorResponse('We were not able to fetch the log this time.');
281
280
  }
282
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success('Job execution completed!');
281
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success('Job execution completed!');
283
282
  return [4 /*yield*/, createOutputFile(log, logFile)];
284
283
  case 6:
285
284
  _c.sent();
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  });
25
25
  };
26
26
  var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
29
  function verb(n) { return function (v) { return step([n, v]); }; }
30
30
  function step(op) {
31
31
  if (f) throw new TypeError("Generator is already executing.");
@@ -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) {
@@ -32,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
47
  function verb(n) { return function (v) { return step([n, v]); }; }
38
48
  function step(op) {
39
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -119,7 +119,7 @@ describe('sasjs run with Viya', function () {
119
119
  url = 'https://github.com/sasjs/cli/issues/808';
120
120
  invalidSasError = process.sasjsConstants.invalidSasError;
121
121
  error = new Error("".concat(invalidSasError, "\nUrl: ").concat(url));
122
- return [4 /*yield*/, expect((0, __1.runSasCode)(target, url)).rejects.toThrowError(error)];
122
+ return [4 /*yield*/, expect((0, __1.runSasCode)(target, url)).rejects.toThrow(error)];
123
123
  case 1:
124
124
  _a.sent();
125
125
  return [2 /*return*/];
@@ -134,7 +134,7 @@ describe('sasjs run with Viya', function () {
134
134
  url = 'https://api.agify.io/?name=sabir';
135
135
  invalidSasError = process.sasjsConstants.invalidSasError;
136
136
  error = new Error("".concat(invalidSasError, "\nUrl: ").concat(url));
137
- return [4 /*yield*/, expect((0, __1.runSasCode)(target, url)).rejects.toThrowError(error)];
137
+ return [4 /*yield*/, expect((0, __1.runSasCode)(target, url)).rejects.toThrow(error)];
138
138
  case 1:
139
139
  _a.sent();
140
140
  return [2 /*return*/];
@@ -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) {
@@ -32,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
47
  function verb(n) { return function (v) { return step([n, v]); }; }
38
48
  function step(op) {
39
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -39,16 +39,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.servicePackDeploy = void 0;
42
+ exports.servicePackDeploy = servicePackDeploy;
43
43
  var path_1 = __importDefault(require("path"));
44
44
  var displayResult_1 = require("../../utils/displayResult");
45
45
  var utils_1 = require("@sasjs/utils");
46
46
  var deployToSasViyaWithServicePack_1 = require("../shared/deployToSasViyaWithServicePack");
47
- function servicePackDeploy(target, isLocal, jsonFilePath, isForced) {
48
- var _a;
49
- if (isForced === void 0) { isForced = false; }
50
- return __awaiter(this, void 0, void 0, function () {
47
+ function servicePackDeploy(target_1, isLocal_1, jsonFilePath_1) {
48
+ return __awaiter(this, arguments, void 0, function (target, isLocal, jsonFilePath, isForced) {
51
49
  var buildDestinationFolder, success;
50
+ var _a;
51
+ if (isForced === void 0) { isForced = false; }
52
52
  return __generator(this, function (_b) {
53
53
  switch (_b.label) {
54
54
  case 0:
@@ -79,4 +79,3 @@ function servicePackDeploy(target, isLocal, jsonFilePath, isForced) {
79
79
  });
80
80
  });
81
81
  }
82
- exports.servicePackDeploy = servicePackDeploy;
@@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
24
24
  });
25
25
  };
26
26
  var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
29
  function verb(n) { return function (v) { return step([n, v]); }; }
30
30
  function step(op) {
31
31
  if (f) throw new TypeError("Generator is already executing.");
@@ -95,19 +95,19 @@ var ServicePackCommand = /** @class */ (function (_super) {
95
95
  }) || this;
96
96
  }
97
97
  ServicePackCommand.prototype.execute = function () {
98
- var _a;
99
98
  return __awaiter(this, void 0, void 0, function () {
100
- var _b, target, isLocal, _c, source, force;
99
+ var _a, target, isLocal, _b, source, force;
100
+ var _c;
101
101
  return __generator(this, function (_d) {
102
102
  switch (_d.label) {
103
103
  case 0: return [4 /*yield*/, this.getTargetInfo()];
104
104
  case 1:
105
- _b = _d.sent(), target = _b.target, isLocal = _b.isLocal;
105
+ _a = _d.sent(), target = _a.target, isLocal = _a.isLocal;
106
106
  if (target.serverType !== utils_1.ServerType.SasViya) {
107
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Unable to deploy service pack to target ".concat(target.name, ". This command is only supported for server type ").concat(utils_1.ServerType.SasViya, "."));
107
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.error("Unable to deploy service pack to target ".concat(target.name, ". This command is only supported for server type ").concat(utils_1.ServerType.SasViya, "."));
108
108
  return [2 /*return*/, command_1.ReturnCode.InternalError];
109
109
  }
110
- _c = this.parsed, source = _c.source, force = _c.force;
110
+ _b = this.parsed, source = _b.source, force = _b.force;
111
111
  return [4 /*yield*/, (0, deploy_1.servicePackDeploy)(target, isLocal, source, force)
112
112
  .then(function () {
113
113
  return command_1.ReturnCode.Success;
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -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) {
@@ -32,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
47
  function verb(n) { return function (v) { return step([n, v]); }; }
38
48
  function step(op) {
39
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");