@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
@@ -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.");
@@ -77,14 +77,14 @@ var CompileBuildDeployCommand = /** @class */ (function (_super) {
77
77
  return _super.call(this, args, { syntax: syntax, usage: usage, aliases: aliases, description: description, examples: examples }) || this;
78
78
  }
79
79
  CompileBuildDeployCommand.prototype.execute = function () {
80
- var _a, _b, _c;
81
80
  return __awaiter(this, void 0, void 0, function () {
82
- var _d, target, isLocal, returnCode, buildDestinationFolder;
81
+ var _a, target, isLocal, returnCode, buildDestinationFolder;
82
+ var _b, _c, _d;
83
83
  return __generator(this, function (_e) {
84
84
  switch (_e.label) {
85
85
  case 0: return [4 /*yield*/, this.getTargetInfo()];
86
86
  case 1:
87
- _d = _e.sent(), target = _d.target, isLocal = _d.isLocal;
87
+ _a = _e.sent(), target = _a.target, isLocal = _a.isLocal;
88
88
  return [4 /*yield*/, (0, compile_1.compile)(target, true)
89
89
  .then(function () { return command_1.ReturnCode.Success; })
90
90
  .catch(function (err) {
@@ -98,7 +98,7 @@ var CompileBuildDeployCommand = /** @class */ (function (_super) {
98
98
  return [2 /*return*/, returnCode];
99
99
  }
100
100
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
101
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("The project was successfully compiled for ".concat(target.serverType, " using target '").concat(target.name, "'\nThe compile output is located in the ").concat(buildDestinationFolder, " directory."));
101
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("The project was successfully compiled for ".concat(target.serverType, " using target '").concat(target.name, "'\nThe compile output is located in the ").concat(buildDestinationFolder, " directory."));
102
102
  return [4 /*yield*/, (0, build_1.build)(target)
103
103
  .then(function () { return command_1.ReturnCode.Success; })
104
104
  .catch(function (err) {
@@ -111,7 +111,7 @@ var CompileBuildDeployCommand = /** @class */ (function (_super) {
111
111
  if (returnCode === command_1.ReturnCode.InternalError) {
112
112
  return [2 /*return*/, returnCode];
113
113
  }
114
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("Services have been successfully built!\nThe build output is located in the ".concat(buildDestinationFolder, " directory."));
114
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success("Services have been successfully built!\nThe build output is located in the ".concat(buildDestinationFolder, " directory."));
115
115
  return [4 /*yield*/, (0, deploy_1.deploy)(target, isLocal)
116
116
  .then(function () { return command_1.ReturnCode.Success; })
117
117
  .catch(function (err) {
@@ -124,7 +124,7 @@ var CompileBuildDeployCommand = /** @class */ (function (_super) {
124
124
  if (returnCode === command_1.ReturnCode.InternalError) {
125
125
  return [2 /*return*/, returnCode];
126
126
  }
127
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success("Services have been successfully deployed to ".concat(target.serverUrl));
127
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Services have been successfully deployed to ".concat(target.serverUrl));
128
128
  return [2 /*return*/, returnCode];
129
129
  }
130
130
  });
@@ -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,7 +39,7 @@ 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.deploy = void 0;
42
+ exports.deploy = deploy;
43
43
  var path_1 = __importDefault(require("path"));
44
44
  var config_1 = require("../../utils/config");
45
45
  var utils_1 = require("@sasjs/utils");
@@ -52,10 +52,10 @@ var internal_1 = require("./internal");
52
52
  * from local sasjsconfig or global sasjsconfig file.
53
53
  */
54
54
  function deploy(target, isLocal) {
55
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
56
55
  return __awaiter(this, void 0, void 0, function () {
57
56
  var streamConfig, buildDestinationFolder, finalFilePathJSON, appLoc, jsonObject, servicesFolder, webIndexFileName, buildOutputFileName, deployScriptPath, deployScripts;
58
57
  var _this = this;
58
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
59
59
  return __generator(this, function (_l) {
60
60
  switch (_l.label) {
61
61
  case 0: return [4 /*yield*/, (0, config_1.getStreamConfig)(target)];
@@ -120,4 +120,3 @@ function deploy(target, isLocal) {
120
120
  });
121
121
  });
122
122
  }
123
- exports.deploy = deploy;
@@ -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.");
@@ -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.");
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.deployToSasjsWithServicePack = void 0;
39
+ exports.deployToSasjsWithServicePack = deployToSasjsWithServicePack;
40
40
  var node_1 = require("@sasjs/adapter/node");
41
41
  var config_1 = require("../../../utils/config");
42
42
  var utils_1 = require("../../../utils/utils");
@@ -47,9 +47,9 @@ var utils_2 = require("@sasjs/utils");
47
47
  * @param {object} streamConfig - optional config for deploying streaming app.
48
48
  */
49
49
  function deployToSasjsWithServicePack(jsonFilePath, target, streamConfig) {
50
- var _a, _b, _c;
51
50
  return __awaiter(this, void 0, void 0, function () {
52
- var sasjsApiClient, authConfig, _d, result, zipFilePath, jsonContent, payload, webAppStreamUrl;
51
+ var sasjsApiClient, authConfig, _a, result, zipFilePath, jsonContent, payload, webAppStreamUrl;
52
+ var _b, _c, _d;
53
53
  return __generator(this, function (_e) {
54
54
  switch (_e.label) {
55
55
  case 0:
@@ -59,13 +59,13 @@ function deployToSasjsWithServicePack(jsonFilePath, target, streamConfig) {
59
59
  if (!(_e.sent())) return [3 /*break*/, 3];
60
60
  return [4 /*yield*/, (0, config_1.getAuthConfig)(target)];
61
61
  case 2:
62
- _d = _e.sent();
62
+ _a = _e.sent();
63
63
  return [3 /*break*/, 4];
64
64
  case 3:
65
- _d = undefined;
65
+ _a = undefined;
66
66
  _e.label = 4;
67
67
  case 4:
68
- authConfig = _d;
68
+ authConfig = _a;
69
69
  zipFilePath = jsonFilePath + '.zip';
70
70
  return [4 /*yield*/, (0, utils_2.fileExists)(zipFilePath)];
71
71
  case 5:
@@ -96,19 +96,18 @@ function deployToSasjsWithServicePack(jsonFilePath, target, streamConfig) {
96
96
  _e.label = 10;
97
97
  case 10:
98
98
  if ((result === null || result === void 0 ? void 0 : result.status) === 'failure') {
99
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error(result.message);
99
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.error(result.message);
100
100
  if (result.example) {
101
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Payload example:\n".concat(JSON.stringify(result.example, null, 2)));
101
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("Payload example:\n".concat(JSON.stringify(result.example, null, 2)));
102
102
  }
103
103
  throw new Error('Deploy service pack error');
104
104
  }
105
105
  if ((streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) && (result === null || result === void 0 ? void 0 : result.streamServiceName)) {
106
106
  webAppStreamUrl = "".concat(target.serverUrl, "/AppStream/").concat(result.streamServiceName);
107
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("Web app is available at ".concat(webAppStreamUrl));
107
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.info("Web app is available at ".concat(webAppStreamUrl));
108
108
  }
109
109
  return [2 /*return*/];
110
110
  }
111
111
  });
112
112
  });
113
113
  }
114
- exports.deployToSasjsWithServicePack = deployToSasjsWithServicePack;
@@ -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.");
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.executeDeployScript = void 0;
39
+ exports.executeDeployScript = executeDeployScript;
40
40
  var file_1 = require("../../../utils/file");
41
41
  var _1 = require("./");
42
42
  function executeDeployScript(scriptPath, target, streamConfig) {
@@ -52,4 +52,3 @@ function executeDeployScript(scriptPath, target, streamConfig) {
52
52
  });
53
53
  });
54
54
  }
55
- exports.executeDeployScript = executeDeployScript;
@@ -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.");
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.executeDeployScriptSas9 = void 0;
39
+ exports.executeDeployScriptSas9 = executeDeployScriptSas9;
40
40
  var config_1 = require("../../../utils/config");
41
41
  var utils_1 = require("@sasjs/utils");
42
42
  var _1 = require("./");
@@ -51,14 +51,14 @@ var _1 = require("./");
51
51
  * for printing web app url on console.
52
52
  */
53
53
  function executeDeployScriptSas9(deployScriptName, target, linesToExecute, logFilePath, streamConfig) {
54
- var _a, _b, _c, _d;
55
54
  return __awaiter(this, void 0, void 0, function () {
56
- var _e, sasjs, authConfigSas9, userName, password, completedWithError, executionResult, logContent, appLoc, webAppStreamUrl;
55
+ var _a, sasjs, authConfigSas9, userName, password, completedWithError, executionResult, logContent, appLoc, webAppStreamUrl;
56
+ var _b, _c, _d, _e;
57
57
  return __generator(this, function (_f) {
58
58
  switch (_f.label) {
59
59
  case 0: return [4 /*yield*/, (0, config_1.getSASjsAndAuthConfig)(target)];
60
60
  case 1:
61
- _e = _f.sent(), sasjs = _e.sasjs, authConfigSas9 = _e.authConfigSas9;
61
+ _a = _f.sent(), sasjs = _a.sasjs, authConfigSas9 = _a.authConfigSas9;
62
62
  userName = authConfigSas9.userName;
63
63
  password = (0, utils_1.decodeFromBase64)(authConfigSas9.password);
64
64
  completedWithError = false;
@@ -76,7 +76,7 @@ function executeDeployScriptSas9(deployScriptName, target, linesToExecute, logFi
76
76
  case 2:
77
77
  executionResult = _f.sent();
78
78
  if (!executionResult) {
79
- return [2 /*return*/, (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('Error getting execution log')];
79
+ return [2 /*return*/, (_b = process.logger) === null || _b === void 0 ? void 0 : _b.error('Error getting execution log')];
80
80
  }
81
81
  logContent = completedWithError
82
82
  ? executionResult.result
@@ -85,18 +85,17 @@ function executeDeployScriptSas9(deployScriptName, target, linesToExecute, logFi
85
85
  case 3:
86
86
  _f.sent();
87
87
  if (completedWithError) {
88
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
88
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
89
89
  throw new Error("Deployment failed.");
90
90
  }
91
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success("Deployment completed! Log is available at ".concat(logFilePath));
91
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Deployment completed! Log is available at ".concat(logFilePath));
92
92
  if (streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) {
93
93
  appLoc = encodeURI(target.appLoc);
94
94
  webAppStreamUrl = "".concat(target.serverUrl, "/SASStoredProcess/?_PROGRAM=").concat(appLoc, "/services/").concat(streamConfig.streamServiceName);
95
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.info("Web app is available at ".concat(webAppStreamUrl));
95
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.info("Web app is available at ".concat(webAppStreamUrl));
96
96
  }
97
97
  return [2 /*return*/];
98
98
  }
99
99
  });
100
100
  });
101
101
  }
102
- exports.executeDeployScriptSas9 = executeDeployScriptSas9;
@@ -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,7 +39,7 @@ 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.executeDeployScriptSasViya = void 0;
42
+ exports.executeDeployScriptSasViya = executeDeployScriptSasViya;
43
43
  var os_1 = __importDefault(require("os"));
44
44
  var config_1 = require("../../../utils/config");
45
45
  var utils_1 = require("@sasjs/utils");
@@ -54,20 +54,20 @@ var utils_1 = require("@sasjs/utils");
54
54
  * for printing web app url on console.
55
55
  */
56
56
  function executeDeployScriptSasViya(deployScriptName, target, linesToExecute, logFilePath, streamConfig) {
57
- var _a, _b, _c, _d, _e;
58
57
  return __awaiter(this, void 0, void 0, function () {
59
- var contextName, _f, sasjs, authConfig, executionResult, log, appLoc, webAppStreamUrl;
58
+ var contextName, _a, sasjs, authConfig, executionResult, log, appLoc, webAppStreamUrl;
59
+ var _b, _c, _d, _e, _f;
60
60
  return __generator(this, function (_g) {
61
61
  switch (_g.label) {
62
62
  case 0:
63
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Sending ".concat(deployScriptName, " to SAS server for execution."));
63
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Sending ".concat(deployScriptName, " to SAS server for execution."));
64
64
  contextName = target.contextName;
65
65
  if (!contextName) {
66
66
  throw new Error('Compute Context Name is required for SAS Viya deployments.\n Please ensure that `contextName` is present in your build target configuration or in your .env file, and try again.\n');
67
67
  }
68
68
  return [4 /*yield*/, (0, config_1.getSASjsAndAuthConfig)(target)];
69
69
  case 1:
70
- _f = _g.sent(), sasjs = _f.sasjs, authConfig = _f.authConfig;
70
+ _a = _g.sent(), sasjs = _a.sasjs, authConfig = _a.authConfig;
71
71
  return [4 /*yield*/, sasjs
72
72
  .executeScript({
73
73
  fileName: deployScriptName,
@@ -96,25 +96,24 @@ function executeDeployScriptSasViya(deployScriptName, target, linesToExecute, lo
96
96
  }
97
97
  }
98
98
  catch (e) {
99
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.error("An error occurred when parsing the execution response: ".concat(e.message));
99
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.error("An error occurred when parsing the execution response: ".concat(e.message));
100
100
  log = executionResult;
101
101
  }
102
102
  return [4 /*yield*/, (0, utils_1.createFile)(logFilePath, log)];
103
103
  case 3:
104
104
  _g.sent();
105
105
  if (executionResult.completedWithError) {
106
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
106
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
107
107
  throw new Error("Deployment failed.");
108
108
  }
109
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Deployment completed! Log is available at ".concat(logFilePath));
109
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.success("Deployment completed! Log is available at ".concat(logFilePath));
110
110
  if (streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) {
111
111
  appLoc = encodeURI(target.appLoc);
112
112
  webAppStreamUrl = "".concat(target.serverUrl, "/SASJobExecution?_FILE=").concat(appLoc, "/services/").concat(streamConfig.streamServiceName, ".html");
113
- (_e = process.logger) === null || _e === void 0 ? void 0 : _e.info("Web app is available at ".concat(webAppStreamUrl));
113
+ (_f = process.logger) === null || _f === void 0 ? void 0 : _f.info("Web app is available at ".concat(webAppStreamUrl));
114
114
  }
115
115
  return [2 /*return*/];
116
116
  }
117
117
  });
118
118
  });
119
119
  }
120
- exports.executeDeployScriptSasViya = executeDeployScriptSasViya;
@@ -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.");
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.executeDeployScriptSasjs = void 0;
39
+ exports.executeDeployScriptSasjs = executeDeployScriptSasjs;
40
40
  var utils_1 = require("@sasjs/utils");
41
41
  var config_1 = require("../../../utils/config");
42
42
  var utils_2 = require("../../../utils/utils");
@@ -52,25 +52,25 @@ var _1 = require(".");
52
52
  * for printing web app url on console.
53
53
  */
54
54
  function executeDeployScriptSasjs(deployScriptName, target, linesToExecute, logFilePath, streamConfig) {
55
- var _a, _b, _c, _d;
56
55
  return __awaiter(this, void 0, void 0, function () {
57
- var authConfig, _e, sasjs, completedWithError, executionResult, logContent, webAppStreamUrl;
56
+ var authConfig, _a, sasjs, completedWithError, executionResult, logContent, webAppStreamUrl;
57
+ var _b, _c, _d, _e;
58
58
  return __generator(this, function (_f) {
59
59
  switch (_f.label) {
60
60
  case 0:
61
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Sending ".concat(deployScriptName, " to SASJS server for execution."));
61
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Sending ".concat(deployScriptName, " to SASJS server for execution."));
62
62
  return [4 /*yield*/, (0, utils_2.isSasJsServerInServerMode)(target)];
63
63
  case 1:
64
64
  if (!(_f.sent())) return [3 /*break*/, 3];
65
65
  return [4 /*yield*/, (0, config_1.getAuthConfig)(target)];
66
66
  case 2:
67
- _e = _f.sent();
67
+ _a = _f.sent();
68
68
  return [3 /*break*/, 4];
69
69
  case 3:
70
- _e = undefined;
70
+ _a = undefined;
71
71
  _f.label = 4;
72
72
  case 4:
73
- authConfig = _e;
73
+ authConfig = _a;
74
74
  sasjs = (0, config_1.getSASjs)(target);
75
75
  completedWithError = false;
76
76
  return [4 /*yield*/, sasjs
@@ -93,17 +93,16 @@ function executeDeployScriptSasjs(deployScriptName, target, linesToExecute, logF
93
93
  case 6:
94
94
  _f.sent();
95
95
  if (completedWithError) {
96
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
96
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.error("Deployment failed with errors! Log is available at ".concat(logFilePath));
97
97
  throw new Error("Deployment failed.");
98
98
  }
99
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.success("Deployment completed! Log is available at ".concat(logFilePath));
99
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Deployment completed! Log is available at ".concat(logFilePath));
100
100
  if (streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) {
101
101
  webAppStreamUrl = "".concat(target.serverUrl, "/AppStream/").concat(streamConfig.streamServiceName);
102
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.info("Web app is available at ".concat(webAppStreamUrl));
102
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.info("Web app is available at ".concat(webAppStreamUrl));
103
103
  }
104
104
  return [2 /*return*/];
105
105
  }
106
106
  });
107
107
  });
108
108
  }
109
- exports.executeDeployScriptSasjs = executeDeployScriptSasjs;
@@ -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,14 +39,14 @@ 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.executeNonSasScript = void 0;
42
+ exports.executeNonSasScript = executeNonSasScript;
43
43
  var path_1 = __importDefault(require("path"));
44
44
  var utils_1 = require("../../../utils/utils");
45
45
  var file_1 = require("../../../utils/file");
46
46
  function executeNonSasScript(scriptPath) {
47
- var _a, _b, _c, _d, _e;
48
47
  return __awaiter(this, void 0, void 0, function () {
49
48
  var fileExtension, buildDestinationResultsLogsFolder, logPath;
49
+ var _a, _b, _c, _d, _e;
50
50
  return __generator(this, function (_f) {
51
51
  switch (_f.label) {
52
52
  case 0:
@@ -75,4 +75,3 @@ function executeNonSasScript(scriptPath) {
75
75
  });
76
76
  });
77
77
  }
78
- exports.executeNonSasScript = executeNonSasScript;
@@ -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,14 +39,15 @@ 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.formatErrorString = exports.executeSasScript = void 0;
42
+ exports.executeSasScript = executeSasScript;
43
+ exports.formatErrorString = formatErrorString;
43
44
  var path_1 = __importDefault(require("path"));
44
45
  var utils_1 = require("@sasjs/utils");
45
46
  var _1 = require("./");
46
47
  function executeSasScript(scriptPath, target, streamConfig) {
47
- var _a;
48
48
  return __awaiter(this, void 0, void 0, function () {
49
49
  var logFolder, deployScriptName, logFilePath, deployScriptContent, linesToExecute;
50
+ var _a;
50
51
  return __generator(this, function (_b) {
51
52
  switch (_b.label) {
52
53
  case 0:
@@ -78,7 +79,6 @@ function executeSasScript(scriptPath, target, streamConfig) {
78
79
  });
79
80
  });
80
81
  }
81
- exports.executeSasScript = executeSasScript;
82
82
  /**
83
83
  * this function formats the error string to dump error log on console
84
84
  * @param error
@@ -94,7 +94,6 @@ function formatErrorString(error) {
94
94
  err += "data: ".concat(((_d = error.response) === null || _d === void 0 ? void 0 : _d.data) ? error.response.data : '');
95
95
  return err;
96
96
  }
97
- exports.formatErrorString = formatErrorString;
98
97
  /**
99
98
  * removes password from url
100
99
  * @param str parameter of type string
@@ -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.");
@@ -61,11 +61,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
61
61
  return to.concat(ar || Array.prototype.slice.call(from));
62
62
  };
63
63
  Object.defineProperty(exports, "__esModule", { value: true });
64
- exports.getDeployScripts = void 0;
64
+ exports.getDeployScripts = getDeployScripts;
65
65
  function getDeployScripts(target) {
66
- var _a, _b;
67
66
  return __awaiter(this, void 0, void 0, function () {
68
67
  var configuration, allDeployScripts;
68
+ var _a, _b;
69
69
  return __generator(this, function (_c) {
70
70
  configuration = process.sasjsConfig;
71
71
  allDeployScripts = __spreadArray(__spreadArray([], __read((((_a = configuration === null || configuration === void 0 ? void 0 : configuration.deployConfig) === null || _a === void 0 ? void 0 : _a.deployScripts) || [])), false), __read((((_b = target.deployConfig) === null || _b === void 0 ? void 0 : _b.deployScripts) || [])), false);
@@ -73,4 +73,3 @@ function getDeployScripts(target) {
73
73
  });
74
74
  });
75
75
  }
76
- exports.getDeployScripts = getDeployScripts;
@@ -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.");
@@ -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.");