@sasjs/cli 3.6.2 → 3.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +0 -3
  2. package/build/cli.js +4 -4
  3. package/build/cli.spec.js +6 -6
  4. package/build/commands/add/addCommand.js +2 -2
  5. package/build/commands/add/addCredential.js +27 -27
  6. package/build/commands/add/addTarget.js +10 -10
  7. package/build/commands/add/internal/input.js +30 -30
  8. package/build/commands/add/internal/saveConfig.js +2 -2
  9. package/build/commands/add/spec/addCommand.spec.js +24 -20
  10. package/build/commands/add/spec/addCredential.spec.js +14 -14
  11. package/build/commands/add/spec/addTarget.spec.js +22 -22
  12. package/build/commands/build/build.js +81 -77
  13. package/build/commands/build/buildCommand.js +3 -3
  14. package/build/commands/build/compileBuildCommand.js +4 -4
  15. package/build/commands/build/internal/config.js +8 -8
  16. package/build/commands/build/internal/getLaunchPageCode.js +2 -2
  17. package/build/commands/build/spec/build.spec.js +10 -10
  18. package/build/commands/build/spec/buildCommand.spec.js +16 -12
  19. package/build/commands/build/spec/cb.spec.server.js +18 -18
  20. package/build/commands/build/spec/compileBuildCommand.spec.js +17 -13
  21. package/build/commands/compile/compile.js +61 -61
  22. package/build/commands/compile/compileCommand.js +10 -10
  23. package/build/commands/compile/compileSingleFile.js +17 -17
  24. package/build/commands/compile/internal/checkCompileStatus.js +11 -11
  25. package/build/commands/compile/internal/compareFolders.js +11 -11
  26. package/build/commands/compile/internal/compileJobFile.js +3 -3
  27. package/build/commands/compile/internal/compileServiceFile.js +14 -14
  28. package/build/commands/compile/internal/compileTestFile.js +41 -37
  29. package/build/commands/compile/internal/getAllJobFolders.js +13 -9
  30. package/build/commands/compile/internal/getAllServiceFolders.js +13 -9
  31. package/build/commands/compile/internal/getServerType.js +1 -1
  32. package/build/commands/compile/internal/identifySasFile.js +2 -2
  33. package/build/commands/compile/internal/loadDependencies.js +5 -5
  34. package/build/commands/compile/internal/spec/compileTestFile.spec.js +40 -40
  35. package/build/commands/compile/spec/compareFolders.spec.js +27 -27
  36. package/build/commands/compile/spec/compile.spec.js +93 -93
  37. package/build/commands/compile/spec/compileCommand.spec.js +37 -33
  38. package/build/commands/compile/spec/compileJobFile.spec.js +11 -11
  39. package/build/commands/compile/spec/compileServiceFile.spec.js +11 -11
  40. package/build/commands/compile/spec/copyFilesToBuildFolder.spec.js +7 -7
  41. package/build/commands/compile/spec/loadDependencies.spec.js +30 -30
  42. package/build/commands/context/contextCommand.js +16 -16
  43. package/build/commands/context/create.js +1 -1
  44. package/build/commands/context/delete.js +2 -2
  45. package/build/commands/context/edit.js +1 -1
  46. package/build/commands/context/export.js +5 -5
  47. package/build/commands/context/internal/validateConfigPath.js +1 -1
  48. package/build/commands/context/list.js +4 -4
  49. package/build/commands/context/spec/contextCommand.spec.js +80 -76
  50. package/build/commands/context/spec/create.spec.js +3 -3
  51. package/build/commands/context/spec/delete.spec.js +3 -3
  52. package/build/commands/context/spec/edit.spec.js +3 -3
  53. package/build/commands/context/spec/export.spec.js +8 -8
  54. package/build/commands/context/spec/list.spec.js +5 -5
  55. package/build/commands/create/create.js +12 -12
  56. package/build/commands/create/createCommand.js +2 -2
  57. package/build/commands/create/internal/createReadme.js +2 -2
  58. package/build/commands/create/spec/create.spec.js +39 -39
  59. package/build/commands/create/spec/createCommand.spec.js +14 -10
  60. package/build/commands/db/db.js +22 -22
  61. package/build/commands/db/dbCommand.js +1 -1
  62. package/build/commands/db/spec/db.spec.js +8 -8
  63. package/build/commands/db/spec/dbCommand.spec.js +11 -7
  64. package/build/commands/deploy/compileBuildDeployCommand.js +6 -6
  65. package/build/commands/deploy/deploy.d.ts +7 -0
  66. package/build/commands/deploy/deploy.js +131 -81
  67. package/build/commands/deploy/deployCommand.js +2 -2
  68. package/build/commands/deploy/internal/getDeployScripts.js +14 -10
  69. package/build/commands/deploy/spec/cbd.spec.js +15 -15
  70. package/build/commands/deploy/spec/cbd.spec.server.js +40 -40
  71. package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +18 -14
  72. package/build/commands/deploy/spec/deployCommand.spec.js +15 -11
  73. package/build/commands/deploy/spec/getDeployScripts.spec.js +8 -8
  74. package/build/commands/deploy/spec/utils.js +17 -17
  75. package/build/commands/docs/docsCommand.js +7 -7
  76. package/build/commands/docs/generateDocs.js +33 -29
  77. package/build/commands/docs/generateDot.js +12 -8
  78. package/build/commands/docs/initDocs.js +1 -1
  79. package/build/commands/docs/internal/createDotFiles.js +6 -6
  80. package/build/commands/docs/internal/getDotFileContent.js +17 -17
  81. package/build/commands/docs/internal/getFileInputs.js +1 -1
  82. package/build/commands/docs/internal/getFileOutputs.js +1 -1
  83. package/build/commands/docs/internal/getFoldersForDocs.js +4 -4
  84. package/build/commands/docs/internal/populateNodeDictionary.js +1 -1
  85. package/build/commands/docs/spec/docsCommand.spec.js +25 -21
  86. package/build/commands/docs/spec/generateDocs.spec.js +60 -60
  87. package/build/commands/docs/spec/generateDot.spec.js +23 -23
  88. package/build/commands/docs/spec/getDocConfig.spec.js +2 -2
  89. package/build/commands/docs/spec/initDocs.spec.js +7 -7
  90. package/build/commands/flow/execute.js +8 -8
  91. package/build/commands/flow/flowCommand.js +5 -5
  92. package/build/commands/flow/internal/checkPredecessorDeadlock.js +11 -7
  93. package/build/commands/flow/internal/executeFlow.js +23 -23
  94. package/build/commands/flow/internal/failAllSuccessors.js +1 -1
  95. package/build/commands/flow/internal/generateFileName.js +2 -2
  96. package/build/commands/flow/internal/normalizeFilePath.js +1 -1
  97. package/build/commands/flow/internal/parseJobDetails.js +3 -3
  98. package/build/commands/flow/internal/printError.js +1 -1
  99. package/build/commands/flow/internal/saveLog.js +8 -8
  100. package/build/commands/flow/internal/saveToCsv.js +2 -2
  101. package/build/commands/flow/internal/spec/allFlowsCompleted.spec.js +4 -4
  102. package/build/commands/flow/internal/spec/checkPredecessorDeadlock.spec.js +4 -4
  103. package/build/commands/flow/internal/spec/executeFlow.spec.js +10 -10
  104. package/build/commands/flow/internal/spec/failAllSuccessors.spec.js +1 -1
  105. package/build/commands/flow/internal/spec/saveToCsv.spec.js +16 -16
  106. package/build/commands/flow/internal/spec/validateParams.spec.js +33 -33
  107. package/build/commands/flow/internal/validateParams.js +17 -17
  108. package/build/commands/flow/spec/flow.spec.js +1 -1
  109. package/build/commands/flow/spec/flow.spec.server.js +60 -60
  110. package/build/commands/flow/spec/flowCommand.spec.js +16 -12
  111. package/build/commands/folder/create.js +2 -2
  112. package/build/commands/folder/delete.js +2 -2
  113. package/build/commands/folder/folderCommand.js +11 -11
  114. package/build/commands/folder/move.js +2 -2
  115. package/build/commands/folder/spec/folder.spec.server.js +35 -35
  116. package/build/commands/folder/spec/folderCommand.spec.js +23 -19
  117. package/build/commands/help/help.js +50 -48
  118. package/build/commands/help/helpCommand.js +1 -1
  119. package/build/commands/help/spec/help.spec.js +8 -8
  120. package/build/commands/help/spec/helpCommand.spec.js +11 -7
  121. package/build/commands/init/init.js +7 -7
  122. package/build/commands/init/initCommand.js +1 -1
  123. package/build/commands/init/spec/init.spec.server.js +17 -17
  124. package/build/commands/init/spec/initCommand.spec.js +11 -7
  125. package/build/commands/job/internal/execute/sasjs.js +1 -1
  126. package/build/commands/job/internal/execute/viya.js +35 -35
  127. package/build/commands/job/internal/utils.js +6 -6
  128. package/build/commands/job/jobCommand.js +6 -6
  129. package/build/commands/job/spec/execute.spec.js +6 -6
  130. package/build/commands/job/spec/getContextName.spec.js +2 -2
  131. package/build/commands/job/spec/job.spec.server.js +53 -53
  132. package/build/commands/job/spec/jobCommand.spec.js +17 -13
  133. package/build/commands/lint/initLint.js +2 -2
  134. package/build/commands/lint/lintCommand.js +10 -10
  135. package/build/commands/lint/processLint.js +5 -5
  136. package/build/commands/lint/spec/lintCommand.spec.js +19 -15
  137. package/build/commands/request/request.js +16 -16
  138. package/build/commands/request/requestCommand.js +5 -5
  139. package/build/commands/request/spec/request.spec.server.js +71 -71
  140. package/build/commands/request/spec/requestCommand.spec.js +17 -13
  141. package/build/commands/run/run.js +23 -23
  142. package/build/commands/run/runCommand.js +2 -2
  143. package/build/commands/run/spec/run.spec.server.js +51 -51
  144. package/build/commands/run/spec/runCommand.spec.js +10 -6
  145. package/build/commands/servicepack/deploy.js +6 -6
  146. package/build/commands/servicepack/servicePackCommand.js +3 -3
  147. package/build/commands/servicepack/spec/servicepack.spec.server.js +6 -6
  148. package/build/commands/servicepack/spec/servicepackCommand.spec.js +10 -6
  149. package/build/commands/shared/createConfigFile.js +2 -2
  150. package/build/commands/shared/createFileStructure.js +6 -6
  151. package/build/commands/shared/createLintConfigFile.js +1 -1
  152. package/build/commands/shared/deployToSasViyaWithServicePack.js +4 -4
  153. package/build/commands/shared/fetchLogFileContent.js +10 -6
  154. package/build/commands/testing/internal/saveOutput.js +38 -34
  155. package/build/commands/testing/spec/testCommand.spec.js +17 -13
  156. package/build/commands/testing/spec/testing.spec.server.js +38 -38
  157. package/build/commands/testing/test.js +45 -41
  158. package/build/commands/testing/testCommand.js +2 -2
  159. package/build/commands/version/spec/version.spec.js +1 -1
  160. package/build/commands/version/spec/versionCommand.spec.js +11 -7
  161. package/build/commands/version/version.js +3 -3
  162. package/build/commands/version/versionCommand.js +2 -2
  163. package/build/commands/web/internal/createAssetServices.js +28 -24
  164. package/build/commands/web/internal/getWebServiceContent.js +6 -6
  165. package/build/commands/web/internal/sasjsout.d.ts +1 -1
  166. package/build/commands/web/internal/sasjsout.js +1 -1
  167. package/build/commands/web/internal/spec/updateLinkTag.spec.js +2 -2
  168. package/build/commands/web/internal/spec/updateScriptTag.spec.js +10 -10
  169. package/build/commands/web/internal/updateAllTags.js +19 -15
  170. package/build/commands/web/internal/updateLinkTag.js +2 -2
  171. package/build/commands/web/internal/updateScriptTag.js +6 -6
  172. package/build/commands/web/spec/web.spec.js +23 -23
  173. package/build/commands/web/spec/webCommand.spec.js +16 -12
  174. package/build/commands/web/web.js +25 -25
  175. package/build/commands/web/webCommand.js +3 -3
  176. package/build/types/command/commandBase.js +19 -15
  177. package/build/types/command/parse.js +1 -1
  178. package/build/types/command/spec/commandBase.spec.js +16 -12
  179. package/build/types/command/targetCommand.js +4 -4
  180. package/build/types/command/unalias.js +9 -5
  181. package/build/utils/auth.js +7 -7
  182. package/build/utils/config.js +56 -49
  183. package/build/utils/displayResult.js +4 -4
  184. package/build/utils/file.js +11 -11
  185. package/build/utils/fileStructures/builtFiles.js +2 -2
  186. package/build/utils/fileStructures/builtFilesCustom1.js +2 -2
  187. package/build/utils/getLogFilePath.js +1 -1
  188. package/build/utils/loadEnvVariables.js +3 -3
  189. package/build/utils/prefixAppLoc.js +1 -1
  190. package/build/utils/saveLog.js +7 -7
  191. package/build/utils/setConstants.js +4 -4
  192. package/build/utils/setProjectDir.js +2 -2
  193. package/build/utils/spec/config.spec.js +80 -80
  194. package/build/utils/spec/displayResult.spec.js +7 -7
  195. package/build/utils/spec/file.spec.js +15 -15
  196. package/build/utils/spec/removeComments.spec.js +11 -11
  197. package/build/utils/spec/setConstants.spec.js +3 -3
  198. package/build/utils/spec/utils.spec.js +55 -55
  199. package/build/utils/test.js +59 -59
  200. package/build/utils/utils.js +47 -43
  201. package/package.json +11 -11
@@ -62,10 +62,14 @@ var __read = (this && this.__read) || function (o, n) {
62
62
  }
63
63
  return ar;
64
64
  };
65
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
66
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
67
- to[j] = from[i];
68
- return to;
65
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
66
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
67
+ if (ar || !(i in from)) {
68
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
69
+ ar[i] = from[i];
70
+ }
71
+ }
72
+ return to.concat(ar || Array.prototype.slice.call(from));
69
73
  };
70
74
  var __values = (this && this.__values) || function(o) {
71
75
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -96,7 +100,7 @@ function build(target) {
96
100
  return __awaiter(this, void 0, void 0, function () {
97
101
  return __generator(this, function (_a) {
98
102
  switch (_a.label) {
99
- case 0: return [4 /*yield*/, compile_1.compile(target)];
103
+ case 0: return [4 /*yield*/, (0, compile_1.compile)(target)];
100
104
  case 1:
101
105
  _a.sent();
102
106
  return [4 /*yield*/, createFinalSasFiles(target)];
@@ -116,7 +120,7 @@ function createFinalSasFiles(target) {
116
120
  switch (_b.label) {
117
121
  case 0:
118
122
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info('Creating output SAS and JSON files.');
119
- return [4 /*yield*/, config_1.getStreamConfig(target)];
123
+ return [4 /*yield*/, (0, config_1.getStreamConfig)(target)];
120
124
  case 1:
121
125
  streamConfig = _b.sent();
122
126
  return [4 /*yield*/, createFinalSasFile(target, streamConfig)];
@@ -136,51 +140,51 @@ function createFinalSasFile(target, streamConfig) {
136
140
  case 0:
137
141
  streamWeb = (_a = streamConfig.streamWeb) !== null && _a !== void 0 ? _a : false;
138
142
  buildConfig = target.buildConfig, serverType = target.serverType, name = target.name;
139
- return [4 /*yield*/, config_1.getMacroFolders(target)];
143
+ return [4 /*yield*/, (0, config_1.getMacroFolders)(target)];
140
144
  case 1:
141
145
  macroFolders = _h.sent();
142
- buildOutputFileName = (_b = buildConfig === null || buildConfig === void 0 ? void 0 : buildConfig.buildOutputFileName) !== null && _b !== void 0 ? _b : name + ".sas";
146
+ buildOutputFileName = (_b = buildConfig === null || buildConfig === void 0 ? void 0 : buildConfig.buildOutputFileName) !== null && _b !== void 0 ? _b : "".concat(name, ".sas");
143
147
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
144
148
  finalSasFileContent = '';
145
149
  finalFilePath = path_1.default.join(buildDestinationFolder, buildOutputFileName);
146
- finalFilePathJSON = path_1.default.join(buildDestinationFolder, name + ".json");
150
+ finalFilePathJSON = path_1.default.join(buildDestinationFolder, "".concat(name, ".json"));
147
151
  return [4 /*yield*/, getBuildInfo(target, streamWeb)];
148
152
  case 2:
149
153
  buildInfo = _h.sent();
150
- finalSasFileContent += "\n" + buildInfo;
151
- return [4 /*yield*/, config_2.getBuildInit(target)];
154
+ finalSasFileContent += "\n".concat(buildInfo);
155
+ return [4 /*yield*/, (0, config_2.getBuildInit)(target)];
152
156
  case 3:
153
157
  buildInit = _h.sent();
154
- return [4 /*yield*/, config_2.getBuildTerm(target)];
158
+ return [4 /*yield*/, (0, config_2.getBuildTerm)(target)];
155
159
  case 4:
156
160
  buildTerm = _h.sent();
157
- macroCorePath = config_1.getMacroCorePath();
158
- return [4 /*yield*/, utils_1.getDependencyPaths(buildTerm + "\n" + buildInit, macroFolders, macroCorePath)];
161
+ macroCorePath = (0, config_1.getMacroCorePath)();
162
+ return [4 /*yield*/, (0, utils_1.getDependencyPaths)("".concat(buildTerm, "\n").concat(buildInit), macroFolders, macroCorePath)];
159
163
  case 5:
160
164
  dependencyFilePaths = _h.sent();
161
165
  return [4 /*yield*/, getDependencies(dependencyFilePaths)];
162
166
  case 6:
163
167
  dependenciesContent = _h.sent();
164
- finalSasFileContent += "\n" + dependenciesContent + "\n\n" + buildInit + "\n";
168
+ finalSasFileContent += "\n".concat(dependenciesContent, "\n\n").concat(buildInit, "\n");
165
169
  return [4 /*yield*/, getFolderContent(serverType)];
166
170
  case 7:
167
171
  _g = _h.sent(), folderContent = _g.folderContent, folderContentJSON = _g.folderContentJSON;
168
- finalSasFileContent += "\n" + folderContent;
169
- finalSasFileContent += "\n" + buildTerm;
172
+ finalSasFileContent += "\n".concat(folderContent);
173
+ finalSasFileContent += "\n".concat(buildTerm);
170
174
  if (streamWeb) {
171
- finalSasFileContent += getLaunchPageCode_1.getLaunchPageCode(target.serverType, streamConfig.streamServiceName);
175
+ finalSasFileContent += (0, getLaunchPageCode_1.getLaunchPageCode)(target.serverType, streamConfig.streamServiceName);
172
176
  }
173
- finalSasFileContent = utils_2.removeComments(finalSasFileContent);
174
- (_c = process.logger) === null || _c === void 0 ? void 0 : _c.debug("Creating file " + finalFilePath + " .");
175
- return [4 /*yield*/, utils_1.createFile(finalFilePath, finalSasFileContent)];
177
+ finalSasFileContent = (0, utils_2.removeComments)(finalSasFileContent);
178
+ (_c = process.logger) === null || _c === void 0 ? void 0 : _c.debug("Creating file ".concat(finalFilePath, " ."));
179
+ return [4 /*yield*/, (0, utils_1.createFile)(finalFilePath, finalSasFileContent)];
176
180
  case 8:
177
181
  _h.sent();
178
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("File " + finalFilePath + " has been created.");
179
- (_e = process.logger) === null || _e === void 0 ? void 0 : _e.debug("Creating file " + finalFilePathJSON + " .");
180
- return [4 /*yield*/, utils_1.createFile(finalFilePathJSON, JSON.stringify(folderContentJSON, null, 1))];
182
+ (_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("File ".concat(finalFilePath, " has been created."));
183
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.debug("Creating file ".concat(finalFilePathJSON, " ."));
184
+ return [4 /*yield*/, (0, utils_1.createFile)(finalFilePathJSON, JSON.stringify(folderContentJSON, null, 1))];
181
185
  case 9:
182
186
  _h.sent();
183
- (_f = process.logger) === null || _f === void 0 ? void 0 : _f.success("File " + finalFilePathJSON + " has been created.");
187
+ (_f = process.logger) === null || _f === void 0 ? void 0 : _f.success("File ".concat(finalFilePathJSON, " has been created."));
184
188
  return [2 /*return*/];
185
189
  }
186
190
  });
@@ -194,37 +198,37 @@ function getBuildInfo(target, streamWeb) {
194
198
  case 0:
195
199
  buildConfig = '';
196
200
  serverType = target.serverType, appLoc = target.appLoc;
197
- return [4 /*yield*/, config_1.getMacroFolders(target)];
201
+ return [4 /*yield*/, (0, config_1.getMacroFolders)(target)];
198
202
  case 1:
199
203
  macroFolders = _a.sent();
200
204
  return [4 /*yield*/, getCreateWebServiceScript(serverType)];
201
205
  case 2:
202
206
  createWebServiceScript = _a.sent();
203
- macroCorePath = config_1.getMacroCorePath();
204
- buildConfig += createWebServiceScript + "\n";
205
- return [4 /*yield*/, utils_1.getDependencyPaths(buildConfig, macroFolders, macroCorePath)];
207
+ macroCorePath = (0, config_1.getMacroCorePath)();
208
+ buildConfig += "".concat(createWebServiceScript, "\n");
209
+ return [4 /*yield*/, (0, utils_1.getDependencyPaths)(buildConfig, macroFolders, macroCorePath)];
206
210
  case 3:
207
211
  dependencyFilePaths = _a.sent();
208
212
  if (!(target.serverType === utils_1.ServerType.SasViya && streamWeb)) return [3 /*break*/, 8];
209
213
  return [4 /*yield*/, getCreateFileScript(serverType)];
210
214
  case 4:
211
215
  createFileScript = _a.sent();
212
- buildConfig += createFileScript + "\n";
213
- return [4 /*yield*/, utils_1.getDependencyPaths(createFileScript, macroFolders, macroCorePath)
216
+ buildConfig += "".concat(createFileScript, "\n");
217
+ return [4 /*yield*/, (0, utils_1.getDependencyPaths)(createFileScript, macroFolders, macroCorePath)
214
218
  // The gsubScript is used to perform the replacement of the appLoc within
215
219
  // the deployed index.html file. This only happens when deploying using the
216
220
  // SAS Program (build.sas) approach.
217
221
  ];
218
222
  case 5:
219
223
  dependencyFilePathsForCreateFile = _a.sent();
220
- return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/base/mp_gsubfile.sas")];
224
+ return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/base/mp_gsubfile.sas"))];
221
225
  case 6:
222
226
  gsubScript = _a.sent();
223
- buildConfig += gsubScript + "\n";
224
- return [4 /*yield*/, utils_1.getDependencyPaths(gsubScript, macroFolders, macroCorePath)];
227
+ buildConfig += "".concat(gsubScript, "\n");
228
+ return [4 /*yield*/, (0, utils_1.getDependencyPaths)(gsubScript, macroFolders, macroCorePath)];
225
229
  case 7:
226
230
  dependencyFilePathsForGsubScript = _a.sent();
227
- dependencyFilePaths = __spreadArray([], __read(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(dependencyFilePaths)), __read(dependencyFilePathsForCreateFile)), __read(dependencyFilePathsForGsubScript)))));
231
+ dependencyFilePaths = __spreadArray([], __read(new Set(__spreadArray(__spreadArray(__spreadArray([], __read(dependencyFilePaths), false), __read(dependencyFilePathsForCreateFile), false), __read(dependencyFilePathsForGsubScript), false))), false);
228
232
  _a.label = 8;
229
233
  case 8: return [4 /*yield*/, getDependencies(dependencyFilePaths)];
230
234
  case 9:
@@ -232,7 +236,7 @@ function getBuildInfo(target, streamWeb) {
232
236
  return [4 /*yield*/, getBuildVars(target)];
233
237
  case 10:
234
238
  buildVars = _a.sent();
235
- return [2 /*return*/, "\n/**\n * The appLoc represents the metadata or SAS Drive location of the app you\n * are about to deploy\n *\n * To set an alternative appLoc, simply populate the appLoc variable prior\n * to running this program, eg:\n *\n * %let apploc=/my/apploc;\n * %inc thisfile;\n *\n */\n\n%global appLoc;\n%let compiled_apploc=" + appLoc + ";\n\n%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));\n\n%let sasjs_clickmeservice=clickme;\n%let syscc=0;\noptions ps=max nonotes nosgen nomprint nomlogic nosource2 nosource noquotelenmax;\n/* user supplied build vars */\n" + buildVars + "\n/* user supplied build vars end */\n/* system macro dependencies for build process */\n" + dependenciesContent + "\n/* system macro dependencies for build process end*/\n/* system macros for build process */\n" + buildConfig + "\n/* system macros for build process end */\n"];
239
+ return [2 /*return*/, "\n/**\n * The appLoc represents the metadata or SAS Drive location of the app you\n * are about to deploy\n *\n * To set an alternative appLoc, simply populate the appLoc variable prior\n * to running this program, eg:\n *\n * %let apploc=/my/apploc;\n * %inc thisfile;\n *\n */\n\n%global appLoc;\n%let compiled_apploc=".concat(appLoc, ";\n\n%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));\n\n%let sasjs_clickmeservice=clickme;\n%let syscc=0;\noptions ps=max nonotes nosgen nomprint nomlogic nosource2 nosource noquotelenmax;\n/* user supplied build vars */\n").concat(buildVars, "\n/* user supplied build vars end */\n/* system macro dependencies for build process */\n").concat(dependenciesContent, "\n/* system macro dependencies for build process end*/\n/* system macros for build process */\n").concat(buildConfig, "\n/* system macros for build process end */\n")];
236
240
  }
237
241
  });
238
242
  });
@@ -250,15 +254,15 @@ function getCreateWebServiceScript(serverType) {
250
254
  case utils_1.ServerType.Sasjs: return [3 /*break*/, 5];
251
255
  }
252
256
  return [3 /*break*/, 7];
253
- case 1: return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/viya/mv_createwebservice.sas")];
257
+ case 1: return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/viya/mv_createwebservice.sas"))];
254
258
  case 2: return [2 /*return*/, _b.sent()];
255
- case 3: return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/meta/mm_createwebservice.sas")
259
+ case 3: return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/meta/mm_createwebservice.sas"))
256
260
  // FIXME: use sasjs/mv_createwebservice.sas ones created
257
261
  ];
258
262
  case 4: return [2 /*return*/, _b.sent()
259
263
  // FIXME: use sasjs/mv_createwebservice.sas ones created
260
264
  ];
261
- case 5: return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/viya/mv_createwebservice.sas")];
265
+ case 5: return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/viya/mv_createwebservice.sas"))];
262
266
  case 6: return [2 /*return*/, _b.sent()];
263
267
  case 7: throw new error_1.ServerTypeError();
264
268
  }
@@ -277,13 +281,13 @@ function getCreateFileScript(serverType) {
277
281
  case utils_1.ServerType.Sasjs: return [3 /*break*/, 3];
278
282
  }
279
283
  return [3 /*break*/, 5];
280
- case 1: return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/viya/mv_createfile.sas")
284
+ case 1: return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/viya/mv_createfile.sas"))
281
285
  // FIXME: use sasjs/mv_createfile.sas ones created
282
286
  ];
283
287
  case 2: return [2 /*return*/, _b.sent()
284
288
  // FIXME: use sasjs/mv_createfile.sas ones created
285
289
  ];
286
- case 3: return [4 /*yield*/, utils_1.readFile(config_1.getMacroCorePath() + "/viya/mv_createfile.sas")];
290
+ case 3: return [4 /*yield*/, (0, utils_1.readFile)("".concat((0, config_1.getMacroCorePath)(), "/viya/mv_createfile.sas"))];
287
291
  case 4: return [2 /*return*/, _b.sent()];
288
292
  case 5: throw new error_1.ServerTypeError([utils_1.ServerType.SasViya, utils_1.ServerType.Sasjs]);
289
293
  }
@@ -299,14 +303,14 @@ function getWebServiceScriptInvocation(serverType, filePath, isSASFile, encoded)
299
303
  switch (serverType) {
300
304
  case utils_1.ServerType.SasViya:
301
305
  return isSASFile
302
- ? "%mv_createwebservice(path=&appLoc/" + loc + "/&path, name=&service, code=sascode ,replace=yes)"
303
- : "%mv_createfile(path=&appLoc/" + loc + "/&path, name=&filename, inref=filecode" + encodedParam + ")";
306
+ ? "%mv_createwebservice(path=&appLoc/".concat(loc, "/&path, name=&service, code=sascode ,replace=yes)")
307
+ : "%mv_createfile(path=&appLoc/".concat(loc, "/&path, name=&filename, inref=filecode").concat(encodedParam, ")");
304
308
  case utils_1.ServerType.Sas9:
305
- return "%mm_createwebservice(path=&appLoc/" + loc + "/&path, name=&service, code=sascode ,replace=yes)";
309
+ return "%mm_createwebservice(path=&appLoc/".concat(loc, "/&path, name=&service, code=sascode ,replace=yes)");
306
310
  case utils_1.ServerType.Sasjs:
307
311
  return isSASFile
308
- ? "%mv_createwebservice(path=&appLoc/" + loc + "/&path, name=&service, code=sascode ,replace=yes)"
309
- : "%mv_createfile(path=&appLoc/" + loc + "/&path, name=&filename, inref=filecode" + encodedParam + ")";
312
+ ? "%mv_createwebservice(path=&appLoc/".concat(loc, "/&path, name=&service, code=sascode ,replace=yes)")
313
+ : "%mv_createfile(path=&appLoc/".concat(loc, "/&path, name=&filename, inref=filecode").concat(encodedParam, ")");
310
314
  default:
311
315
  throw new error_1.ServerTypeError();
312
316
  }
@@ -327,19 +331,19 @@ function getFolderContent(serverType) {
327
331
  switch (_a.label) {
328
332
  case 0:
329
333
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
330
- return [4 /*yield*/, utils_1.listSubFoldersInFolder(buildDestinationFolder)];
334
+ return [4 /*yield*/, (0, utils_1.listSubFoldersInFolder)(buildDestinationFolder)];
331
335
  case 1:
332
336
  buildSubFolders = _a.sent();
333
337
  folderContent = '';
334
338
  folderContentJSON = { members: [] };
335
- return [4 /*yield*/, utils_1.asyncForEach(buildSubFolders, function (subFolder) { return __awaiter(_this, void 0, void 0, function () {
339
+ return [4 /*yield*/, (0, utils_1.asyncForEach)(buildSubFolders, function (subFolder) { return __awaiter(_this, void 0, void 0, function () {
336
340
  var _a, content, contentJSON;
337
341
  return __generator(this, function (_b) {
338
342
  switch (_b.label) {
339
343
  case 0: return [4 /*yield*/, getContentFor(path_1.default.join(buildDestinationFolder, subFolder), path_1.default.join(buildDestinationFolder, subFolder), serverType)];
340
344
  case 1:
341
345
  _a = _b.sent(), content = _a.content, contentJSON = _a.contentJSON;
342
- folderContent += "\n" + content;
346
+ folderContent += "\n".concat(content);
343
347
  folderContentJSON.members.push(contentJSON);
344
348
  return [2 /*return*/];
345
349
  }
@@ -360,11 +364,11 @@ function getDependencies(filePaths) {
360
364
  switch (_a.label) {
361
365
  case 0:
362
366
  dependenciesContent = [];
363
- return [4 /*yield*/, utils_1.asyncForEach(__spreadArray([], __read(new Set(filePaths))), function (filePath) { return __awaiter(_this, void 0, void 0, function () {
367
+ return [4 /*yield*/, (0, utils_1.asyncForEach)(__spreadArray([], __read(new Set(filePaths)), false), function (filePath) { return __awaiter(_this, void 0, void 0, function () {
364
368
  var depFileContent;
365
369
  return __generator(this, function (_a) {
366
370
  switch (_a.label) {
367
- case 0: return [4 /*yield*/, utils_1.readFile(filePath)];
371
+ case 0: return [4 /*yield*/, (0, utils_1.readFile)(filePath)];
368
372
  case 1:
369
373
  depFileContent = _a.sent();
370
374
  dependenciesContent.push(depFileContent);
@@ -392,7 +396,7 @@ function getContentFor(rootDirectory, folderPath, serverType, testPath) {
392
396
  testPath = '';
393
397
  }
394
398
  isRootDir = folderPath === rootDirectory;
395
- content = "\n%let path=" + (isRootDir
399
+ content = "\n%let path=".concat(isRootDir
396
400
  ? ''
397
401
  : testPath !== undefined
398
402
  ? testPath
@@ -400,38 +404,38 @@ function getContentFor(rootDirectory, folderPath, serverType, testPath) {
400
404
  .replace(rootDirectory, '')
401
405
  .substr(1)
402
406
  .split(path_1.default.sep)
403
- .join('/')) + ";\n";
407
+ .join('/'), ";\n");
404
408
  contentJSON = {
405
409
  name: folderName,
406
410
  type: 'folder',
407
411
  members: []
408
412
  };
409
- return [4 /*yield*/, utils_1.listFilesInFolder(folderPath)];
413
+ return [4 /*yield*/, (0, utils_1.listFilesInFolder)(folderPath)];
410
414
  case 1:
411
415
  files = _a.sent();
412
- return [4 /*yield*/, utils_1.asyncForEach(files, function (file) { return __awaiter(_this, void 0, void 0, function () {
416
+ return [4 /*yield*/, (0, utils_1.asyncForEach)(files, function (file) { return __awaiter(_this, void 0, void 0, function () {
413
417
  var filePath, fileContent, transformedContent, fileContentEncoded, transformedContent;
414
418
  return __generator(this, function (_a) {
415
419
  switch (_a.label) {
416
420
  case 0:
417
421
  filePath = path_1.default.join(folderPath, file);
418
- if (!file_1.isSasFile(file)) return [3 /*break*/, 2];
419
- return [4 /*yield*/, utils_1.readFile(filePath)];
422
+ if (!(0, file_1.isSasFile)(file)) return [3 /*break*/, 2];
423
+ return [4 /*yield*/, (0, utils_1.readFile)(filePath)];
420
424
  case 1:
421
425
  fileContent = _a.sent();
422
426
  transformedContent = getServiceText(file, fileContent, serverType, testPath);
423
- content += "\n" + transformedContent + "\n";
427
+ content += "\n".concat(transformedContent, "\n");
424
428
  contentJSON.members.push({
425
429
  name: file.replace(/.sas$/, ''),
426
430
  type: 'service',
427
- code: utils_2.removeComments(fileContent)
431
+ code: (0, utils_2.removeComments)(fileContent)
428
432
  });
429
433
  return [3 /*break*/, 4];
430
- case 2: return [4 /*yield*/, utils_1.base64EncodeFile(filePath)];
434
+ case 2: return [4 /*yield*/, (0, utils_1.base64EncodeFile)(filePath)];
431
435
  case 3:
432
436
  fileContentEncoded = _a.sent();
433
437
  transformedContent = getFileText(file, fileContentEncoded, serverType);
434
- content += "\n" + transformedContent + "\n";
438
+ content += "\n".concat(transformedContent, "\n");
435
439
  contentJSON.members.push({
436
440
  name: file.replace(/.sas$/, ''),
437
441
  type: 'file',
@@ -444,17 +448,17 @@ function getContentFor(rootDirectory, folderPath, serverType, testPath) {
444
448
  }); })];
445
449
  case 2:
446
450
  _a.sent();
447
- return [4 /*yield*/, utils_1.listSubFoldersInFolder(folderPath)];
451
+ return [4 /*yield*/, (0, utils_1.listSubFoldersInFolder)(folderPath)];
448
452
  case 3:
449
453
  subFolders = _a.sent();
450
- return [4 /*yield*/, utils_1.asyncForEach(subFolders, function (subFolder) { return __awaiter(_this, void 0, void 0, function () {
454
+ return [4 /*yield*/, (0, utils_1.asyncForEach)(subFolders, function (subFolder) { return __awaiter(_this, void 0, void 0, function () {
451
455
  var _a, childContent, childContentJSON;
452
456
  return __generator(this, function (_b) {
453
457
  switch (_b.label) {
454
458
  case 0: return [4 /*yield*/, getContentFor(rootDirectory, path_1.default.join(folderPath, subFolder), serverType, testPath !== undefined
455
459
  ? testPath === ''
456
460
  ? subFolder
457
- : testPath + "/" + subFolder
461
+ : "".concat(testPath, "/").concat(subFolder)
458
462
  : undefined)];
459
463
  case 1:
460
464
  _a = _b.sent(), childContent = _a.content, childContentJSON = _a.contentJSON;
@@ -473,35 +477,35 @@ function getContentFor(rootDirectory, folderPath, serverType, testPath) {
473
477
  }
474
478
  function getServiceText(serviceFileName, fileContent, serverType, testPath) {
475
479
  var serviceName = serviceFileName.replace(/.sas$/, '');
476
- var sourceCodeLines = getLines(utils_2.removeComments(fileContent));
480
+ var sourceCodeLines = getLines((0, utils_2.removeComments)(fileContent));
477
481
  var content = "";
478
482
  sourceCodeLines.forEach(function (line) {
479
483
  var escapedLine = line.split("'").join("''");
480
484
  if (escapedLine.trim()) {
481
- content += "\n put '" + escapedLine.trim() + "';";
485
+ content += "\n put '".concat(escapedLine.trim(), "';");
482
486
  }
483
487
  });
484
- return "%let service=" + serviceName + ";\nfilename sascode temp lrecl=32767;\ndata _null_;\nfile sascode;\n" + content + "\n\nrun;\n" + (serverType !== utils_1.ServerType.Sasjs
485
- ? getWebServiceScriptInvocation(serverType, utils_1.isTestFile(serviceFileName) && testPath ? "" + testPath : '')
486
- : '') + "\nfilename sascode clear;\n";
488
+ return "%let service=".concat(serviceName, ";\nfilename sascode temp lrecl=32767;\ndata _null_;\nfile sascode;\n").concat(content, "\n\nrun;\n").concat(serverType !== utils_1.ServerType.Sasjs
489
+ ? getWebServiceScriptInvocation(serverType, (0, utils_1.isTestFile)(serviceFileName) && testPath ? "".concat(testPath) : '')
490
+ : '', "\nfilename sascode clear;\n");
487
491
  }
488
492
  function getFileText(fileName, fileContent, serverType) {
489
493
  var fileExtension = path_1.default.extname(fileName).substring(1).toUpperCase();
490
494
  var _a = getWebFileContent(fileContent, fileExtension), content = _a.content, maxLineLength = _a.maxLineLength;
491
- return "%let filename=" + fileName + ";\nfilename filecode temp lrecl=" + maxLineLength + ";\ndata _null_;\nfile filecode;\n" + content + "\n\nrun;\n" + (serverType !== utils_1.ServerType.Sasjs
495
+ return "%let filename=".concat(fileName, ";\nfilename filecode temp lrecl=").concat(maxLineLength, ";\ndata _null_;\nfile filecode;\n").concat(content, "\n\nrun;\n").concat(serverType !== utils_1.ServerType.Sasjs
492
496
  ? getWebServiceScriptInvocation(serverType, undefined, false, true)
493
- : '') + "\nfilename filecode clear;\n";
497
+ : '', "\nfilename filecode clear;\n");
494
498
  }
495
499
  function getWebFileContent(filecontent, type) {
496
500
  var parsedContent = '';
497
- var chunkedLines = utils_1.chunk(filecontent);
501
+ var chunkedLines = (0, utils_1.chunk)(filecontent);
498
502
  if (chunkedLines.length === 1) {
499
- parsedContent = " put '" + chunkedLines[0].split("'").join("''") + "';\n";
503
+ parsedContent = " put '".concat(chunkedLines[0].split("'").join("''"), "';\n");
500
504
  }
501
505
  else {
502
506
  var combinedLines_1 = '';
503
507
  chunkedLines.forEach(function (chunkedLine, index) {
504
- var text = " put '" + chunkedLine.split("'").join("''") + "'";
508
+ var text = " put '".concat(chunkedLine.split("'").join("''"), "'");
505
509
  if (index !== chunkedLines.length - 1)
506
510
  text += '@;\n';
507
511
  else
@@ -531,7 +535,7 @@ function getBuildVars(target) {
531
535
  switch (_e.label) {
532
536
  case 0:
533
537
  targetBuildVars = (_b = (_a = target === null || target === void 0 ? void 0 : target.buildConfig) === null || _a === void 0 ? void 0 : _a.macroVars) !== null && _b !== void 0 ? _b : {};
534
- return [4 /*yield*/, config_1.getLocalConfig()];
538
+ return [4 /*yield*/, (0, config_1.getLocalConfig)()];
535
539
  case 1:
536
540
  configuration = _e.sent();
537
541
  commonBuildVars = (_d = (_c = configuration === null || configuration === void 0 ? void 0 : configuration.buildConfig) === null || _c === void 0 ? void 0 : _c.macroVars) !== null && _d !== void 0 ? _d : {};
@@ -548,9 +552,9 @@ var convertVarsToSasFormat = function (vars) {
548
552
  try {
549
553
  for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
550
554
  var _b = __read(entries_1_1.value, 2), name_1 = _b[0], value = _b[1];
551
- var chunks = utils_1.chunk(value);
555
+ var chunks = (0, utils_1.chunk)(value);
552
556
  var chunkedString = chunks.join('%trim(\n)');
553
- varsContent += "%let " + name_1 + "=" + chunkedString + ";\n";
557
+ varsContent += "%let ".concat(name_1, "=").concat(chunkedString, ";\n");
554
558
  }
555
559
  }
556
560
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -84,18 +84,18 @@ var BuildCommand = /** @class */ (function (_super) {
84
84
  case 0: return [4 /*yield*/, this.getTargetInfo()];
85
85
  case 1:
86
86
  target = (_a.sent()).target;
87
- return [4 /*yield*/, build_1.build(target)
87
+ return [4 /*yield*/, (0, build_1.build)(target)
88
88
  .then(function () { return __awaiter(_this, void 0, void 0, function () {
89
89
  var buildDestinationFolder;
90
90
  var _a;
91
91
  return __generator(this, function (_b) {
92
92
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
93
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Services have been successfully built!\nThe build output is located in the " + buildDestinationFolder + " directory.");
93
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Services have been successfully built!\nThe build output is located in the ".concat(buildDestinationFolder, " directory."));
94
94
  return [2 /*return*/, command_1.ReturnCode.Success];
95
95
  });
96
96
  }); })
97
97
  .catch(function (err) {
98
- utils_1.displayError(err, 'An error has occurred when building services.');
98
+ (0, utils_1.displayError)(err, 'An error has occurred when building services.');
99
99
  return command_1.ReturnCode.InternalError;
100
100
  })];
101
101
  case 2: return [2 /*return*/, _a.sent()];
@@ -84,7 +84,7 @@ var CompileBuildCommand = /** @class */ (function (_super) {
84
84
  case 0: return [4 /*yield*/, this.getTargetInfo()];
85
85
  case 1:
86
86
  target = (_c.sent()).target;
87
- return [4 /*yield*/, compile_1.compile(target, true)
87
+ return [4 /*yield*/, (0, compile_1.compile)(target, true)
88
88
  .then(function () { return command_1.ReturnCode.Success; })
89
89
  .catch(function (err) {
90
90
  var _a;
@@ -97,8 +97,8 @@ var CompileBuildCommand = /** @class */ (function (_super) {
97
97
  return [2 /*return*/, returnCode];
98
98
  }
99
99
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
100
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Services have been successfully compiled!\nThe compile output is located in the " + buildDestinationFolder + " directory.");
101
- return [4 /*yield*/, build_1.build(target)
100
+ (_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("Services have been successfully compiled!\nThe compile output is located in the ".concat(buildDestinationFolder, " directory."));
101
+ return [4 /*yield*/, (0, build_1.build)(target)
102
102
  .then(function () { return command_1.ReturnCode.Success; })
103
103
  .catch(function (err) {
104
104
  var _a;
@@ -110,7 +110,7 @@ var CompileBuildCommand = /** @class */ (function (_super) {
110
110
  if (returnCode === command_1.ReturnCode.InternalError) {
111
111
  return [2 /*return*/, returnCode];
112
112
  }
113
- (_b = process.logger) === null || _b === void 0 ? void 0 : _b.success("Services have been successfully built!\nThe build output is located in the " + buildDestinationFolder + " directory.");
113
+ (_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
114
  return [2 /*return*/, returnCode];
115
115
  }
116
116
  });
@@ -52,20 +52,20 @@ var getBuildInit = function (target) { return __awaiter(void 0, void 0, void 0,
52
52
  buildSourceFolder = process.sasjsConstants.buildSourceFolder;
53
53
  buildInitContent = '';
54
54
  if (!((_a = target === null || target === void 0 ? void 0 : target.buildConfig) === null || _a === void 0 ? void 0 : _a.initProgram)) return [3 /*break*/, 2];
55
- return [4 /*yield*/, utils_1.readFile(utils_1.getAbsolutePath(target.buildConfig.initProgram, buildSourceFolder))];
55
+ return [4 /*yield*/, (0, utils_1.readFile)((0, utils_1.getAbsolutePath)(target.buildConfig.initProgram, buildSourceFolder))];
56
56
  case 1:
57
57
  buildInitContent = _c.sent();
58
58
  return [3 /*break*/, 5];
59
- case 2: return [4 /*yield*/, config_1.getConfiguration(path_1.default.join(buildSourceFolder, 'sasjs', 'sasjsconfig.json'))];
59
+ case 2: return [4 /*yield*/, (0, config_1.getConfiguration)(path_1.default.join(buildSourceFolder, 'sasjs', 'sasjsconfig.json'))];
60
60
  case 3:
61
61
  configuration = _c.sent();
62
62
  if (!((_b = configuration === null || configuration === void 0 ? void 0 : configuration.buildConfig) === null || _b === void 0 ? void 0 : _b.initProgram)) return [3 /*break*/, 5];
63
- return [4 /*yield*/, utils_1.readFile(utils_1.getAbsolutePath(configuration.buildConfig.initProgram, buildSourceFolder))];
63
+ return [4 /*yield*/, (0, utils_1.readFile)((0, utils_1.getAbsolutePath)(configuration.buildConfig.initProgram, buildSourceFolder))];
64
64
  case 4:
65
65
  buildInitContent = _c.sent();
66
66
  _c.label = 5;
67
67
  case 5: return [2 /*return*/, buildInitContent
68
- ? "\n* BuildInit start;\n" + buildInitContent + "\n* BuildInit end;"
68
+ ? "\n* BuildInit start;\n".concat(buildInitContent, "\n* BuildInit end;")
69
69
  : ''];
70
70
  }
71
71
  });
@@ -80,20 +80,20 @@ var getBuildTerm = function (target) { return __awaiter(void 0, void 0, void 0,
80
80
  buildSourceFolder = process.sasjsConstants.buildSourceFolder;
81
81
  buildTermContent = '';
82
82
  if (!((_a = target === null || target === void 0 ? void 0 : target.buildConfig) === null || _a === void 0 ? void 0 : _a.termProgram)) return [3 /*break*/, 2];
83
- return [4 /*yield*/, utils_1.readFile(utils_1.getAbsolutePath(target.buildConfig.termProgram, buildSourceFolder))];
83
+ return [4 /*yield*/, (0, utils_1.readFile)((0, utils_1.getAbsolutePath)(target.buildConfig.termProgram, buildSourceFolder))];
84
84
  case 1:
85
85
  buildTermContent = _c.sent();
86
86
  return [3 /*break*/, 5];
87
- case 2: return [4 /*yield*/, config_1.getConfiguration(path_1.default.join(buildSourceFolder, 'sasjs', 'sasjsconfig.json'))];
87
+ case 2: return [4 /*yield*/, (0, config_1.getConfiguration)(path_1.default.join(buildSourceFolder, 'sasjs', 'sasjsconfig.json'))];
88
88
  case 3:
89
89
  configuration = _c.sent();
90
90
  if (!((_b = configuration === null || configuration === void 0 ? void 0 : configuration.buildConfig) === null || _b === void 0 ? void 0 : _b.termProgram)) return [3 /*break*/, 5];
91
- return [4 /*yield*/, utils_1.readFile(utils_1.getAbsolutePath(configuration.buildConfig.termProgram, buildSourceFolder))];
91
+ return [4 /*yield*/, (0, utils_1.readFile)((0, utils_1.getAbsolutePath)(configuration.buildConfig.termProgram, buildSourceFolder))];
92
92
  case 4:
93
93
  buildTermContent = _c.sent();
94
94
  _c.label = 5;
95
95
  case 5: return [2 /*return*/, buildTermContent
96
- ? "\n* BuildTerm start;\n" + buildTermContent + "\n* BuildTerm end;"
96
+ ? "\n* BuildTerm start;\n".concat(buildTermContent, "\n* BuildTerm end;")
97
97
  : ''];
98
98
  }
99
99
  });
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLaunchPageCode = void 0;
4
4
  var error_1 = require("@sasjs/utils/error");
5
5
  var types_1 = require("@sasjs/utils/types");
6
- var SAS9Code = function (streamServiceName) { return "\noptions notes;\ndata _null_;\n format url $256.;\n rc=METADATA_GETURI(\"Stored Process Web App\",url);\n url=coalescec(url,\"localhost/SASStoredProcess\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) \"?_program=&appLoc/services/" + streamServiceName + "\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"; };
7
- var SASViyaCode = function (streamServiceName) { return "\n\n/**\n * The streamService we just deployed (as a _FILE) had the compile-time appLoc\n * In this section we replace with the deploy-time appLoc\n */\n\nfilename _homein filesrvc\n folderPath=\"&apploc/services\"\n filename=\"" + streamServiceName + ".html\"\n recfm=v\n lrecl=1048544;\n\n%let local_file=%sysfunc(pathname(work))/service.html;\nfilename _homeout \"&local_file\";\n\ndata _null_;\n rc=fcopy('_homein','_homeout');\n put rc=;\nrun;\n\n%mp_gsubfile(file=&local_file, patternvar=compiled_apploc, replacevar=apploc)\n\ndata _null_;\n rc=fcopy('_homeout','_homein');\n put rc=;\nrun;\n\n/* Tell the user where the app was deployed so they can open it */\noptions notes;\ndata _null_;\n if symexist('_baseurl') then do;\n url=symget('_baseurl');\n if subpad(url,length(url)-9,9)='SASStudio'\n then url=substr(url,1,length(url)-11);\n else url=\"&systcpiphostname\";\n end;\n else url=\"&systcpiphostname\";\n url=cats(url,\"/SASJobExecution?_FILE=&appLoc/services/\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) '" + streamServiceName + ".html&_debug=2' ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"; };
6
+ var SAS9Code = function (streamServiceName) { return "\noptions notes;\ndata _null_;\n format url $256.;\n rc=METADATA_GETURI(\"Stored Process Web App\",url);\n url=coalescec(url,\"localhost/SASStoredProcess\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) \"?_program=&appLoc/services/".concat(streamServiceName, "\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"); };
7
+ var SASViyaCode = function (streamServiceName) { return "\n\n/**\n * The streamService we just deployed (as a _FILE) had the compile-time appLoc\n * In this section we replace with the deploy-time appLoc\n */\n\nfilename _homein filesrvc\n folderPath=\"&apploc/services\"\n filename=\"".concat(streamServiceName, ".html\"\n recfm=v\n lrecl=1048544;\n\n%let local_file=%sysfunc(pathname(work))/service.html;\nfilename _homeout \"&local_file\";\n\ndata _null_;\n rc=fcopy('_homein','_homeout');\n put rc=;\nrun;\n\n%mp_gsubfile(file=&local_file, patternvar=compiled_apploc, replacevar=apploc)\n\ndata _null_;\n rc=fcopy('_homeout','_homein');\n put rc=;\nrun;\n\n/* Tell the user where the app was deployed so they can open it */\noptions notes;\ndata _null_;\n if symexist('_baseurl') then do;\n url=symget('_baseurl');\n if subpad(url,length(url)-9,9)='SASStudio'\n then url=substr(url,1,length(url)-11);\n else url=\"&systcpiphostname\";\n end;\n else url=\"&systcpiphostname\";\n url=cats(url,\"/SASJobExecution?_FILE=&appLoc/services/\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) '").concat(streamServiceName, ".html&_debug=2' ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"); };
8
8
  var getLaunchPageCode = function (serverType, streamServiceName) {
9
9
  switch (serverType) {
10
10
  case types_1.ServerType.SasViya:
@@ -49,7 +49,7 @@ describe('sasjs build', function () {
49
49
  afterEach(function () { return __awaiter(void 0, void 0, void 0, function () {
50
50
  return __generator(this, function (_a) {
51
51
  switch (_a.label) {
52
- case 0: return [4 /*yield*/, test_1.removeTestApp(__dirname, appName)];
52
+ case 0: return [4 /*yield*/, (0, test_1.removeTestApp)(__dirname, appName)];
53
53
  case 1:
54
54
  _a.sent();
55
55
  return [2 /*return*/];
@@ -61,14 +61,14 @@ describe('sasjs build', function () {
61
61
  return __generator(this, function (_a) {
62
62
  switch (_a.label) {
63
63
  case 0:
64
- appName = "test-app-build-minimal-" + utils_1.generateTimestamp();
65
- return [4 /*yield*/, test_1.createTestApp(__dirname, appName)];
64
+ appName = "test-app-build-minimal-".concat((0, utils_1.generateTimestamp)());
65
+ return [4 /*yield*/, (0, test_1.createTestApp)(__dirname, appName)];
66
66
  case 1:
67
67
  _a.sent();
68
- return [4 /*yield*/, utils_2.findTargetInConfiguration('viya')];
68
+ return [4 /*yield*/, (0, utils_2.findTargetInConfiguration)('viya')];
69
69
  case 2:
70
70
  target = (_a.sent()).target;
71
- return [4 /*yield*/, expect(build_1.build(target)).toResolve()];
71
+ return [4 /*yield*/, expect((0, build_1.build)(target)).toResolve()];
72
72
  case 3:
73
73
  _a.sent();
74
74
  return [2 /*return*/];
@@ -80,17 +80,17 @@ describe('sasjs build', function () {
80
80
  return __generator(this, function (_a) {
81
81
  switch (_a.label) {
82
82
  case 0:
83
- appName = "test-app-build-" + utils_1.generateTimestamp();
84
- return [4 /*yield*/, test_1.createTestApp(__dirname, appName)];
83
+ appName = "test-app-build-".concat((0, utils_1.generateTimestamp)());
84
+ return [4 /*yield*/, (0, test_1.createTestApp)(__dirname, appName)];
85
85
  case 1:
86
86
  _a.sent();
87
- return [4 /*yield*/, utils_2.findTargetInConfiguration('viya')];
87
+ return [4 /*yield*/, (0, utils_2.findTargetInConfiguration)('viya')];
88
88
  case 2:
89
89
  target = (_a.sent()).target;
90
- return [4 /*yield*/, __1.compile(target)];
90
+ return [4 /*yield*/, (0, __1.compile)(target)];
91
91
  case 3:
92
92
  _a.sent();
93
- return [4 /*yield*/, expect(build_1.build(target)).toResolve()];
93
+ return [4 /*yield*/, expect((0, build_1.build)(target)).toResolve()];
94
94
  case 4:
95
95
  _a.sent();
96
96
  return [2 /*return*/];