@sasjs/cli 4.20.0 → 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 +3 -3
  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 +10 -11
  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 +43 -11
  142. package/build/commands/job/spec/getContextName.spec.js +2 -2
  143. package/build/commands/job/spec/job.spec.server.viya.js +24 -16
  144. package/build/commands/job/spec/jobCommand.spec.js +19 -9
  145. package/build/commands/lint/initLint.js +3 -4
  146. package/build/commands/lint/lintCommand.js +2 -2
  147. package/build/commands/lint/processLint.js +13 -14
  148. package/build/commands/lint/spec/lintCommand.spec.js +19 -9
  149. package/build/commands/request/request.js +3 -4
  150. package/build/commands/request/requestCommand.js +2 -2
  151. package/build/commands/request/spec/request.spec.server.sas9.js +19 -9
  152. package/build/commands/request/spec/request.spec.server.viya.js +19 -9
  153. package/build/commands/request/spec/requestCommand.spec.js +19 -9
  154. package/build/commands/request/spec/utils.js +2 -2
  155. package/build/commands/run/run.js +29 -30
  156. package/build/commands/run/runCommand.js +2 -2
  157. package/build/commands/run/spec/run.spec.js +19 -9
  158. package/build/commands/run/spec/run.spec.server.sas9.js +2 -2
  159. package/build/commands/run/spec/run.spec.server.sasjs.js +2 -2
  160. package/build/commands/run/spec/run.spec.server.viya.js +4 -4
  161. package/build/commands/run/spec/runCommand.spec.js +19 -9
  162. package/build/commands/servicepack/deploy.js +7 -8
  163. package/build/commands/servicepack/servicePackCommand.js +7 -7
  164. package/build/commands/servicepack/spec/servicepack.spec.server.viya.js +2 -2
  165. package/build/commands/servicepack/spec/servicepackCommand.spec.js +19 -9
  166. package/build/commands/shared/createConfigFile.js +2 -2
  167. package/build/commands/shared/createFileStructure.js +2 -2
  168. package/build/commands/shared/createLintConfigFile.js +2 -2
  169. package/build/commands/shared/deployToSasViyaWithServicePack.js +6 -7
  170. package/build/commands/shared/fetchLogFileContent.js +2 -2
  171. package/build/commands/shared/spec/deployToSasViyaWithServicePack.spec.js +19 -9
  172. package/build/commands/snippets/snippets.js +3 -4
  173. package/build/commands/snippets/snippetsCommand.js +2 -2
  174. package/build/commands/snippets/spec/snippets.spec.js +2 -2
  175. package/build/commands/snippets/spec/snippetsCommand.spec.js +19 -9
  176. package/build/commands/testing/internal/saveOutput.js +23 -15
  177. package/build/commands/testing/spec/testCommand.spec.js +19 -9
  178. package/build/commands/testing/spec/testing.spec.js +19 -9
  179. package/build/commands/testing/test.js +14 -14
  180. package/build/commands/testing/testCommand.js +2 -2
  181. package/build/commands/version/spec/version.spec.js +2 -2
  182. package/build/commands/version/spec/versionCommand.spec.js +19 -9
  183. package/build/commands/version/version.js +4 -5
  184. package/build/commands/version/versionCommand.js +2 -2
  185. package/build/commands/web/internal/createAssetServices.js +39 -41
  186. package/build/commands/web/internal/sas9/createClickMeService.js +2 -2
  187. package/build/commands/web/internal/sas9/generateAssetService.js +2 -2
  188. package/build/commands/web/internal/sas9/getWebServiceContent.js +34 -5
  189. package/build/commands/web/internal/sasViya/createClickMeFile.js +2 -2
  190. package/build/commands/web/internal/spec/updateSasjstag.spec.js +2 -2
  191. package/build/commands/web/internal/spec/updateScriptTag.spec.js +2 -2
  192. package/build/commands/web/internal/spec/updateStyleTag.spec.js +2 -2
  193. package/build/commands/web/internal/updateAllTags.js +86 -88
  194. package/build/commands/web/internal/updateLinkTag.d.ts +1 -1
  195. package/build/commands/web/internal/updateScriptTag.js +2 -2
  196. package/build/commands/web/internal/updateStyleTag.js +2 -2
  197. package/build/commands/web/spec/web.spec.js +2 -2
  198. package/build/commands/web/spec/webCommand.spec.js +19 -9
  199. package/build/commands/web/web.js +10 -11
  200. package/build/commands/web/webCommand.js +2 -2
  201. package/build/types/command/commandAliases.d.ts +1 -1
  202. package/build/types/command/commandBase.js +2 -2
  203. package/build/types/command/commandFactory.d.ts +1 -1
  204. package/build/types/command/returnCode.js +1 -1
  205. package/build/types/command/spec/commandBase.spec.js +2 -2
  206. package/build/types/command/spec/targetCommand.spec.js +19 -9
  207. package/build/types/command/targetCommand.js +2 -2
  208. package/build/types/flow.js +1 -1
  209. package/build/types/targetScope.js +1 -1
  210. package/build/types/testing.js +3 -3
  211. package/build/utils/auth.js +8 -8
  212. package/build/utils/compressAndSave.js +2 -2
  213. package/build/utils/config.js +82 -84
  214. package/build/utils/displayResult.js +2 -3
  215. package/build/utils/file.js +13 -13
  216. package/build/utils/loadEnvVariables.js +4 -5
  217. package/build/utils/parseSourceFile.js +3 -4
  218. package/build/utils/saveLog.js +34 -5
  219. package/build/utils/setConstants.js +34 -5
  220. package/build/utils/setProjectDir.js +2 -2
  221. package/build/utils/spec/auth.spec.js +2 -2
  222. package/build/utils/spec/config.spec.js +19 -9
  223. package/build/utils/spec/file.spec.js +2 -2
  224. package/build/utils/spec/saveLog.spec.js +2 -2
  225. package/build/utils/spec/setConstants.spec.js +20 -10
  226. package/build/utils/spec/utils.spec.js +2 -2
  227. package/build/utils/test.d.ts +2 -3
  228. package/build/utils/test.js +103 -40
  229. package/build/utils/utils.js +22 -22
  230. package/package.json +32 -32
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
26
26
  }) : function(o, v) {
27
27
  o["default"] = v;
28
28
  });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
36
46
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
47
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
48
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
53
  });
44
54
  };
45
55
  var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
56
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
58
  function verb(n) { return function (v) { return step([n, v]); }; }
49
59
  function step(op) {
50
60
  if (f) throw new TypeError("Generator is already executing.");
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  });
21
21
  };
22
22
  var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
+ 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);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
@@ -86,7 +86,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
86
86
  return (mod && mod.__esModule) ? mod : { "default": mod };
87
87
  };
88
88
  Object.defineProperty(exports, "__esModule", { value: true });
89
- exports.getBuildVars = exports.getWebServiceScriptInvocation = exports.build = void 0;
89
+ exports.build = build;
90
+ exports.getWebServiceScriptInvocation = getWebServiceScriptInvocation;
91
+ exports.getBuildVars = getBuildVars;
90
92
  var utils_1 = require("@sasjs/utils");
91
93
  var error_1 = require("@sasjs/utils/error");
92
94
  var path_1 = __importDefault(require("path"));
@@ -99,9 +101,9 @@ var internal_1 = require("../compile/internal");
99
101
  var config_2 = require("./internal/config");
100
102
  var getLaunchPageCode_1 = require("./internal/getLaunchPageCode");
101
103
  function build(target) {
102
- var _a;
103
104
  return __awaiter(this, void 0, void 0, function () {
104
- var macroCorePath, _b;
105
+ var macroCorePath, _a;
106
+ var _b;
105
107
  return __generator(this, function (_c) {
106
108
  switch (_c.label) {
107
109
  case 0:
@@ -113,15 +115,15 @@ function build(target) {
113
115
  "Alternatively populate environment variable 'macroCorePath' with\n" +
114
116
  "the path to a local @sasjs/core package's root directory.");
115
117
  }
116
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("@sasjs/core found at ".concat(macroCorePath));
117
- _b = process.sasjsConstants.buildDestinationFolder;
118
- if (!_b) return [3 /*break*/, 2];
118
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("@sasjs/core found at ".concat(macroCorePath));
119
+ _a = process.sasjsConstants.buildDestinationFolder;
120
+ if (!_a) return [3 /*break*/, 2];
119
121
  return [4 /*yield*/, (0, utils_1.folderExists)(process.sasjsConstants.buildDestinationFolder)];
120
122
  case 1:
121
- _b = !(_c.sent());
123
+ _a = !(_c.sent());
122
124
  _c.label = 2;
123
125
  case 2:
124
- if (!_b) return [3 /*break*/, 4];
126
+ if (!_a) return [3 /*break*/, 4];
125
127
  return [4 /*yield*/, (0, compile_1.compile)(target)];
126
128
  case 3:
127
129
  _c.sent();
@@ -134,24 +136,23 @@ function build(target) {
134
136
  });
135
137
  });
136
138
  }
137
- exports.build = build;
138
139
  function createFinalSasFiles(target) {
139
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
140
140
  return __awaiter(this, void 0, void 0, function () {
141
- var streamConfig, streamWeb, buildConfig, serverType, name, macroFolders, buildOutputFileName, buildDestinationFolder, finalSasFileContent, finalFilePath, finalFilePathJSON, finalFilePathZipped, buildInfo, buildInit, buildTerm, macroCorePath, dependencyFilePaths, dependenciesContent, _k, folderContent, folderContentJSON, servicePackSASjs, servicePack;
141
+ var streamConfig, streamWeb, buildConfig, serverType, name, macroFolders, buildOutputFileName, buildDestinationFolder, finalSasFileContent, finalFilePath, finalFilePathJSON, finalFilePathZipped, buildInfo, buildInit, buildTerm, macroCorePath, dependencyFilePaths, dependenciesContent, _a, folderContent, folderContentJSON, servicePackSASjs, servicePack;
142
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
142
143
  return __generator(this, function (_l) {
143
144
  switch (_l.label) {
144
145
  case 0:
145
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info('Creating output SAS and JSON files.');
146
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info('Creating output SAS and JSON files.');
146
147
  return [4 /*yield*/, (0, config_1.getStreamConfig)(target)];
147
148
  case 1:
148
149
  streamConfig = _l.sent();
149
- streamWeb = (_b = streamConfig.streamWeb) !== null && _b !== void 0 ? _b : false;
150
+ streamWeb = (_c = streamConfig.streamWeb) !== null && _c !== void 0 ? _c : false;
150
151
  buildConfig = target.buildConfig, serverType = target.serverType, name = target.name;
151
152
  return [4 /*yield*/, (0, config_1.getMacroFolders)(target)];
152
153
  case 2:
153
154
  macroFolders = _l.sent();
154
- buildOutputFileName = (_c = buildConfig === null || buildConfig === void 0 ? void 0 : buildConfig.buildOutputFileName) !== null && _c !== void 0 ? _c : "".concat(name, ".sas");
155
+ buildOutputFileName = (_d = buildConfig === null || buildConfig === void 0 ? void 0 : buildConfig.buildOutputFileName) !== null && _d !== void 0 ? _d : "".concat(name, ".sas");
155
156
  buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
156
157
  finalSasFileContent = '';
157
158
  finalFilePath = path_1.default.join(buildDestinationFolder, buildOutputFileName);
@@ -177,7 +178,7 @@ function createFinalSasFiles(target) {
177
178
  finalSasFileContent += "\n".concat(dependenciesContent, "\n\n").concat(buildInit, "\n");
178
179
  return [4 /*yield*/, getFolderContent(serverType)];
179
180
  case 8:
180
- _k = _l.sent(), folderContent = _k.folderContent, folderContentJSON = _k.folderContentJSON;
181
+ _a = _l.sent(), folderContent = _a.folderContent, folderContentJSON = _a.folderContentJSON;
181
182
  servicePackSASjs = {
182
183
  appLoc: target.appLoc,
183
184
  fileTree: folderContentJSON
@@ -196,24 +197,24 @@ function createFinalSasFiles(target) {
196
197
  }
197
198
  }
198
199
  finalSasFileContent = (0, utils_1.removeHeader)(finalSasFileContent);
199
- (_d = process.logger) === null || _d === void 0 ? void 0 : _d.debug("Creating file ".concat(finalFilePath, " ."));
200
+ (_e = process.logger) === null || _e === void 0 ? void 0 : _e.debug("Creating file ".concat(finalFilePath, " ."));
200
201
  return [4 /*yield*/, (0, utils_1.createFile)(finalFilePath, finalSasFileContent)];
201
202
  case 9:
202
203
  _l.sent();
203
- (_e = process.logger) === null || _e === void 0 ? void 0 : _e.success("File ".concat(finalFilePath, " has been created."));
204
- (_f = process.logger) === null || _f === void 0 ? void 0 : _f.debug("Creating file ".concat(finalFilePathJSON, " ."));
204
+ (_f = process.logger) === null || _f === void 0 ? void 0 : _f.success("File ".concat(finalFilePath, " has been created."));
205
+ (_g = process.logger) === null || _g === void 0 ? void 0 : _g.debug("Creating file ".concat(finalFilePathJSON, " ."));
205
206
  servicePack = target.serverType === utils_1.ServerType.Sasjs
206
207
  ? servicePackSASjs
207
208
  : folderContentJSON;
208
209
  return [4 /*yield*/, (0, utils_1.createFile)(finalFilePathJSON, JSON.stringify(servicePack, null, 1))];
209
210
  case 10:
210
211
  _l.sent();
211
- (_g = process.logger) === null || _g === void 0 ? void 0 : _g.success("File ".concat(finalFilePathJSON, " has been created."));
212
- (_h = process.logger) === null || _h === void 0 ? void 0 : _h.debug("Creating file ".concat(finalFilePathZipped, " ."));
212
+ (_h = process.logger) === null || _h === void 0 ? void 0 : _h.success("File ".concat(finalFilePathJSON, " has been created."));
213
+ (_j = process.logger) === null || _j === void 0 ? void 0 : _j.debug("Creating file ".concat(finalFilePathZipped, " ."));
213
214
  return [4 /*yield*/, (0, compressAndSave_1.compressAndSave)(finalFilePathZipped, JSON.stringify(servicePack, null, 1))];
214
215
  case 11:
215
216
  _l.sent();
216
- (_j = process.logger) === null || _j === void 0 ? void 0 : _j.success("File ".concat(finalFilePathZipped, " has been created."));
217
+ (_k = process.logger) === null || _k === void 0 ? void 0 : _k.success("File ".concat(finalFilePathZipped, " has been created."));
217
218
  return [2 /*return*/];
218
219
  }
219
220
  });
@@ -352,7 +353,6 @@ function getWebServiceScriptInvocation(serverType, isSASFile, encoded, fileName)
352
353
  throw new error_1.ServerTypeError();
353
354
  }
354
355
  }
355
- exports.getWebServiceScriptInvocation = getWebServiceScriptInvocation;
356
356
  /**
357
357
  * Folders inside of `SASJS` folder are converted to JSON structure.
358
358
  * That JSON file is used to deploy services, jobs and tests.
@@ -527,9 +527,9 @@ function getLines(text) {
527
527
  return lines;
528
528
  }
529
529
  function getBuildVars(target) {
530
- var _a, _b, _c, _d;
531
530
  return __awaiter(this, void 0, void 0, function () {
532
531
  var targetBuildVars, configuration, commonBuildVars;
532
+ var _a, _b, _c, _d;
533
533
  return __generator(this, function (_e) {
534
534
  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 : {};
535
535
  configuration = process.sasjsConfig;
@@ -538,7 +538,6 @@ function getBuildVars(target) {
538
538
  });
539
539
  });
540
540
  }
541
- exports.getBuildVars = getBuildVars;
542
541
  var convertVarsToSasFormat = function (vars) {
543
542
  var e_1, _a;
544
543
  var entries = Object.entries(vars);
@@ -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.");
@@ -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.");
@@ -76,9 +76,9 @@ var CompileBuildCommand = /** @class */ (function (_super) {
76
76
  return _super.call(this, args, { syntax: syntax, usage: usage, aliases: aliases, description: description, examples: examples }) || this;
77
77
  }
78
78
  CompileBuildCommand.prototype.execute = function () {
79
- var _a, _b;
80
79
  return __awaiter(this, void 0, void 0, function () {
81
80
  var target, returnCode, buildDestinationFolder;
81
+ var _a, _b;
82
82
  return __generator(this, function (_c) {
83
83
  switch (_c.label) {
84
84
  case 0: return [4 /*yield*/, this.getTargetInfo()];
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -32,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
47
  function verb(n) { return function (v) { return step([n, v]); }; }
38
48
  function step(op) {
39
49
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -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.");
@@ -73,7 +83,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
73
83
  return (mod && mod.__esModule) ? mod : { "default": mod };
74
84
  };
75
85
  Object.defineProperty(exports, "__esModule", { value: true });
76
- exports.compileJobsServicesTests = exports.copyFilesToBuildFolder = exports.compile = void 0;
86
+ exports.compile = compile;
87
+ exports.copyFilesToBuildFolder = copyFilesToBuildFolder;
88
+ exports.compileJobsServicesTests = compileJobsServicesTests;
77
89
  var utils_1 = require("@sasjs/utils");
78
90
  var types_1 = require("@sasjs/utils/types");
79
91
  var error_1 = require("@sasjs/utils/error");
@@ -83,12 +95,12 @@ var file_1 = require("../../utils/file");
83
95
  var web_1 = require("../web/web");
84
96
  var compileModule = __importStar(require("./compile"));
85
97
  var internal_1 = require("./internal");
86
- function compile(target, forceCompile) {
87
- var _a, _b;
88
- if (forceCompile === void 0) { forceCompile = false; }
89
- return __awaiter(this, void 0, void 0, function () {
98
+ function compile(target_1) {
99
+ return __awaiter(this, arguments, void 0, function (target, forceCompile) {
90
100
  var result, compileTree, macroFolders, programFolders_1, buildMacroTestFolder_1, macroTestFiles;
91
101
  var _this = this;
102
+ var _a, _b;
103
+ if (forceCompile === void 0) { forceCompile = false; }
92
104
  return __generator(this, function (_c) {
93
105
  switch (_c.label) {
94
106
  case 0: return [4 /*yield*/, (0, internal_1.checkCompileStatus)(target, ['tests'])
@@ -164,12 +176,11 @@ function compile(target, forceCompile) {
164
176
  });
165
177
  });
166
178
  }
167
- exports.compile = compile;
168
179
  function copyFilesToBuildFolder(target) {
169
- var _a, _b;
170
180
  return __awaiter(this, void 0, void 0, function () {
171
181
  var buildDestinationFolder, serviceFolders, jobFolders, error_2;
172
182
  var _this = this;
183
+ var _a, _b;
173
184
  return __generator(this, function (_c) {
174
185
  switch (_c.label) {
175
186
  case 0:
@@ -231,7 +242,6 @@ function copyFilesToBuildFolder(target) {
231
242
  });
232
243
  });
233
244
  }
234
- exports.copyFilesToBuildFolder = copyFilesToBuildFolder;
235
245
  function compileJobsServicesTests(target, compileTree) {
236
246
  return __awaiter(this, void 0, void 0, function () {
237
247
  var serviceFolders, jobFolders, macroFolders_1, programFolders_2, testSetUp, testTearDown, error_3;
@@ -306,11 +316,10 @@ function compileJobsServicesTests(target, compileTree) {
306
316
  });
307
317
  });
308
318
  }
309
- exports.compileJobsServicesTests = compileJobsServicesTests;
310
319
  function recreateBuildFolder() {
311
- var _a;
312
320
  return __awaiter(this, void 0, void 0, function () {
313
321
  var buildDestinationFolder, pathExists;
322
+ var _a;
314
323
  return __generator(this, function (_b) {
315
324
  switch (_b.label) {
316
325
  case 0:
@@ -523,9 +532,9 @@ var compileJobFolder = function (target, jobFolder, macroFolders, programFolders
523
532
  });
524
533
  }); };
525
534
  function compileWeb(target) {
526
- var _a, _b;
527
535
  return __awaiter(this, void 0, void 0, function () {
528
536
  var configuration, streamConfig, streamWeb;
537
+ var _a, _b;
529
538
  return __generator(this, function (_c) {
530
539
  switch (_c.label) {
531
540
  case 0:
@@ -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.");
@@ -39,7 +39,8 @@ 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.compileSingleFile = exports.CompileSingleFileSubCommands = void 0;
42
+ exports.CompileSingleFileSubCommands = void 0;
43
+ exports.compileSingleFile = compileSingleFile;
43
44
  var path_1 = __importDefault(require("path"));
44
45
  var config_1 = require("../../utils/config");
45
46
  var utils_1 = require("@sasjs/utils");
@@ -50,16 +51,16 @@ var CompileSingleFileSubCommands;
50
51
  CompileSingleFileSubCommands["Job"] = "job";
51
52
  CompileSingleFileSubCommands["Service"] = "service";
52
53
  CompileSingleFileSubCommands["Test"] = "test";
53
- })(CompileSingleFileSubCommands = exports.CompileSingleFileSubCommands || (exports.CompileSingleFileSubCommands = {}));
54
+ })(CompileSingleFileSubCommands || (exports.CompileSingleFileSubCommands = CompileSingleFileSubCommands = {}));
54
55
  var isCompileSingleFileSubCommands = function (command) {
55
56
  return Object.values(CompileSingleFileSubCommands).includes(command);
56
57
  };
57
- function compileSingleFile(target, subCommand, source, output, insertProgramVar, currentFolder) {
58
- var _a;
59
- if (subCommand === void 0) { subCommand = 'identify'; }
60
- if (insertProgramVar === void 0) { insertProgramVar = false; }
61
- return __awaiter(this, void 0, void 0, function () {
62
- var commandExample, sourcePath, outputPathParts, leafFolderName, parentOutputFolder, pathExists, sourceFileName, destinationPath, sourceFileNameWithoutExt, macroFolders, programFolders, psMaxOption, programVar, compileTree, sourceFolder, _b;
58
+ function compileSingleFile(target_1) {
59
+ return __awaiter(this, arguments, void 0, function (target, subCommand, source, output, insertProgramVar, currentFolder) {
60
+ var commandExample, sourcePath, outputPathParts, leafFolderName, parentOutputFolder, pathExists, sourceFileName, destinationPath, sourceFileNameWithoutExt, macroFolders, programFolders, psMaxOption, programVar, compileTree, sourceFolder, _a;
61
+ var _b;
62
+ if (subCommand === void 0) { subCommand = 'identify'; }
63
+ if (insertProgramVar === void 0) { insertProgramVar = false; }
63
64
  return __generator(this, function (_c) {
64
65
  switch (_c.label) {
65
66
  case 0:
@@ -86,9 +87,9 @@ function compileSingleFile(target, subCommand, source, output, insertProgramVar,
86
87
  subCommand = _c.sent();
87
88
  _c.label = 3;
88
89
  case 3:
89
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Compiling source file:\n- ".concat(sourcePath));
90
+ (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Compiling source file:\n- ".concat(sourcePath));
90
91
  outputPathParts = output.split(path_1.default.sep);
91
- outputPathParts.pop(), outputPathParts.pop();
92
+ (outputPathParts.pop(), outputPathParts.pop());
92
93
  leafFolderName = source.split(path_1.default.sep).pop();
93
94
  parentOutputFolder = outputPathParts.join(path_1.default.sep);
94
95
  return [4 /*yield*/, (0, utils_1.fileExists)(parentOutputFolder)];
@@ -123,8 +124,8 @@ function compileSingleFile(target, subCommand, source, output, insertProgramVar,
123
124
  .split(path_1.default.sep)
124
125
  .slice(0, sourcePath.split(path_1.default.sep).length - 1)
125
126
  .join(path_1.default.sep);
126
- _b = subCommand;
127
- switch (_b) {
127
+ _a = subCommand;
128
+ switch (_a) {
128
129
  case CompileSingleFileSubCommands.Service: return [3 /*break*/, 11];
129
130
  case CompileSingleFileSubCommands.Job: return [3 /*break*/, 13];
130
131
  case CompileSingleFileSubCommands.Test: return [3 /*break*/, 15];
@@ -150,7 +151,6 @@ function compileSingleFile(target, subCommand, source, output, insertProgramVar,
150
151
  });
151
152
  });
152
153
  }
153
- exports.compileSingleFile = compileSingleFile;
154
154
  function validateSourcePath(path) {
155
155
  return __awaiter(this, void 0, void 0, function () {
156
156
  var isSourceFile;
@@ -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.checkCompileStatus = void 0;
39
+ exports.checkCompileStatus = checkCompileStatus;
40
40
  var utils_1 = require("@sasjs/utils");
41
41
  var _1 = require("./");
42
42
  function checkCompileStatus(target, exceptions) {
@@ -72,7 +72,6 @@ function checkCompileStatus(target, exceptions) {
72
72
  });
73
73
  });
74
74
  }
75
- exports.checkCompileStatus = checkCompileStatus;
76
75
  /**
77
76
  * Checks if each file in each subfolder of the specified service folders
78
77
  * is present in the `sasjsbuild/services` folder.
@@ -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.");