@sasjs/cli 3.5.1 → 3.6.3

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/build/cli.js +4 -4
  2. package/build/cli.spec.js +6 -6
  3. package/build/commands/add/addCommand.js +2 -2
  4. package/build/commands/add/addCredential.js +27 -27
  5. package/build/commands/add/addTarget.js +10 -10
  6. package/build/commands/add/internal/input.js +30 -30
  7. package/build/commands/add/internal/saveConfig.js +2 -2
  8. package/build/commands/add/spec/addCommand.spec.js +24 -20
  9. package/build/commands/add/spec/addCredential.spec.js +14 -14
  10. package/build/commands/add/spec/addTarget.spec.js +22 -22
  11. package/build/commands/build/build.js +81 -77
  12. package/build/commands/build/buildCommand.js +3 -3
  13. package/build/commands/build/compileBuildCommand.js +4 -4
  14. package/build/commands/build/internal/config.js +8 -8
  15. package/build/commands/build/internal/getLaunchPageCode.js +2 -2
  16. package/build/commands/build/spec/build.spec.js +10 -10
  17. package/build/commands/build/spec/buildCommand.spec.js +16 -12
  18. package/build/commands/build/spec/cb.spec.server.js +18 -18
  19. package/build/commands/build/spec/compileBuildCommand.spec.js +17 -13
  20. package/build/commands/compile/compile.js +61 -61
  21. package/build/commands/compile/compileCommand.js +10 -10
  22. package/build/commands/compile/compileSingleFile.js +17 -17
  23. package/build/commands/compile/internal/checkCompileStatus.js +11 -11
  24. package/build/commands/compile/internal/compareFolders.js +11 -11
  25. package/build/commands/compile/internal/compileJobFile.js +3 -3
  26. package/build/commands/compile/internal/compileServiceFile.js +14 -14
  27. package/build/commands/compile/internal/compileTestFile.js +41 -37
  28. package/build/commands/compile/internal/getAllJobFolders.js +13 -9
  29. package/build/commands/compile/internal/getAllServiceFolders.js +13 -9
  30. package/build/commands/compile/internal/getServerType.js +1 -1
  31. package/build/commands/compile/internal/identifySasFile.js +2 -2
  32. package/build/commands/compile/internal/loadDependencies.js +11 -7
  33. package/build/commands/compile/internal/spec/compileTestFile.spec.js +41 -41
  34. package/build/commands/compile/spec/compareFolders.spec.js +27 -27
  35. package/build/commands/compile/spec/compile.spec.js +93 -93
  36. package/build/commands/compile/spec/compileCommand.spec.js +37 -33
  37. package/build/commands/compile/spec/compileJobFile.spec.js +12 -22
  38. package/build/commands/compile/spec/compileServiceFile.spec.js +12 -22
  39. package/build/commands/compile/spec/copyFilesToBuildFolder.spec.js +7 -7
  40. package/build/commands/compile/spec/loadDependencies.spec.js +31 -162
  41. package/build/commands/context/contextCommand.js +16 -16
  42. package/build/commands/context/create.js +1 -1
  43. package/build/commands/context/delete.js +2 -2
  44. package/build/commands/context/edit.js +1 -1
  45. package/build/commands/context/export.js +5 -5
  46. package/build/commands/context/internal/validateConfigPath.js +1 -1
  47. package/build/commands/context/list.js +4 -4
  48. package/build/commands/context/spec/contextCommand.spec.js +80 -76
  49. package/build/commands/context/spec/create.spec.js +3 -3
  50. package/build/commands/context/spec/delete.spec.js +3 -3
  51. package/build/commands/context/spec/edit.spec.js +3 -3
  52. package/build/commands/context/spec/export.spec.js +8 -8
  53. package/build/commands/context/spec/list.spec.js +5 -5
  54. package/build/commands/create/create.js +12 -12
  55. package/build/commands/create/createCommand.js +2 -2
  56. package/build/commands/create/internal/createReadme.js +2 -2
  57. package/build/commands/create/spec/create.spec.js +39 -39
  58. package/build/commands/create/spec/createCommand.spec.js +14 -10
  59. package/build/commands/db/db.js +22 -22
  60. package/build/commands/db/dbCommand.js +1 -1
  61. package/build/commands/db/spec/db.spec.js +8 -8
  62. package/build/commands/db/spec/dbCommand.spec.js +11 -7
  63. package/build/commands/deploy/compileBuildDeployCommand.js +6 -6
  64. package/build/commands/deploy/deploy.js +39 -39
  65. package/build/commands/deploy/deployCommand.js +2 -2
  66. package/build/commands/deploy/internal/getDeployScripts.js +14 -10
  67. package/build/commands/deploy/spec/cbd.spec.js +16 -16
  68. package/build/commands/deploy/spec/cbd.spec.server.js +40 -40
  69. package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +18 -14
  70. package/build/commands/deploy/spec/deployCommand.spec.js +15 -11
  71. package/build/commands/deploy/spec/getDeployScripts.spec.js +8 -8
  72. package/build/commands/deploy/spec/utils.js +17 -17
  73. package/build/commands/docs/docsCommand.js +7 -7
  74. package/build/commands/docs/generateDocs.js +33 -29
  75. package/build/commands/docs/generateDot.js +12 -8
  76. package/build/commands/docs/initDocs.js +1 -1
  77. package/build/commands/docs/internal/createDotFiles.js +6 -6
  78. package/build/commands/docs/internal/getDotFileContent.js +17 -17
  79. package/build/commands/docs/internal/getFileInputs.js +1 -1
  80. package/build/commands/docs/internal/getFileOutputs.js +1 -1
  81. package/build/commands/docs/internal/getFoldersForDocs.js +4 -4
  82. package/build/commands/docs/internal/populateNodeDictionary.js +1 -1
  83. package/build/commands/docs/spec/docsCommand.spec.js +25 -21
  84. package/build/commands/docs/spec/generateDocs.spec.js +60 -60
  85. package/build/commands/docs/spec/generateDot.spec.js +23 -23
  86. package/build/commands/docs/spec/getDocConfig.spec.js +2 -2
  87. package/build/commands/docs/spec/initDocs.spec.js +7 -7
  88. package/build/commands/flow/execute.js +8 -8
  89. package/build/commands/flow/flowCommand.js +5 -5
  90. package/build/commands/flow/internal/checkPredecessorDeadlock.js +11 -7
  91. package/build/commands/flow/internal/executeFlow.js +23 -23
  92. package/build/commands/flow/internal/failAllSuccessors.js +1 -1
  93. package/build/commands/flow/internal/generateFileName.js +2 -2
  94. package/build/commands/flow/internal/normalizeFilePath.js +1 -1
  95. package/build/commands/flow/internal/parseJobDetails.js +3 -3
  96. package/build/commands/flow/internal/printError.js +1 -1
  97. package/build/commands/flow/internal/saveLog.js +8 -8
  98. package/build/commands/flow/internal/saveToCsv.js +2 -2
  99. package/build/commands/flow/internal/spec/allFlowsCompleted.spec.js +4 -4
  100. package/build/commands/flow/internal/spec/checkPredecessorDeadlock.spec.js +4 -4
  101. package/build/commands/flow/internal/spec/executeFlow.spec.js +10 -10
  102. package/build/commands/flow/internal/spec/failAllSuccessors.spec.js +1 -1
  103. package/build/commands/flow/internal/spec/saveToCsv.spec.js +16 -16
  104. package/build/commands/flow/internal/spec/validateParams.spec.js +33 -33
  105. package/build/commands/flow/internal/validateParams.js +17 -17
  106. package/build/commands/flow/spec/flow.spec.js +1 -1
  107. package/build/commands/flow/spec/flow.spec.server.js +60 -60
  108. package/build/commands/flow/spec/flowCommand.spec.js +16 -12
  109. package/build/commands/folder/create.js +2 -2
  110. package/build/commands/folder/delete.js +2 -2
  111. package/build/commands/folder/folderCommand.js +11 -11
  112. package/build/commands/folder/move.js +2 -2
  113. package/build/commands/folder/spec/folder.spec.server.js +35 -35
  114. package/build/commands/folder/spec/folderCommand.spec.js +23 -19
  115. package/build/commands/help/help.js +46 -46
  116. package/build/commands/help/helpCommand.js +1 -1
  117. package/build/commands/help/spec/help.spec.js +8 -8
  118. package/build/commands/help/spec/helpCommand.spec.js +11 -7
  119. package/build/commands/init/init.js +7 -7
  120. package/build/commands/init/initCommand.js +1 -1
  121. package/build/commands/init/spec/init.spec.server.js +17 -17
  122. package/build/commands/init/spec/initCommand.spec.js +11 -7
  123. package/build/commands/job/internal/execute/sasjs.js +1 -1
  124. package/build/commands/job/internal/execute/viya.js +35 -35
  125. package/build/commands/job/internal/utils.js +6 -6
  126. package/build/commands/job/jobCommand.js +6 -6
  127. package/build/commands/job/spec/execute.spec.js +6 -6
  128. package/build/commands/job/spec/getContextName.spec.js +2 -2
  129. package/build/commands/job/spec/job.spec.server.js +53 -53
  130. package/build/commands/job/spec/jobCommand.spec.js +17 -13
  131. package/build/commands/lint/initLint.js +2 -2
  132. package/build/commands/lint/lintCommand.js +10 -10
  133. package/build/commands/lint/processLint.js +5 -5
  134. package/build/commands/lint/spec/lintCommand.spec.js +19 -15
  135. package/build/commands/request/request.js +16 -16
  136. package/build/commands/request/requestCommand.js +5 -5
  137. package/build/commands/request/spec/request.spec.server.js +210 -178
  138. package/build/commands/request/spec/requestCommand.spec.js +17 -13
  139. package/build/commands/run/run.js +23 -23
  140. package/build/commands/run/runCommand.js +2 -2
  141. package/build/commands/run/spec/run.spec.server.js +51 -51
  142. package/build/commands/run/spec/runCommand.spec.js +10 -6
  143. package/build/commands/servicepack/deploy.js +6 -6
  144. package/build/commands/servicepack/servicePackCommand.js +3 -3
  145. package/build/commands/servicepack/spec/servicepack.spec.server.js +6 -6
  146. package/build/commands/servicepack/spec/servicepackCommand.spec.js +10 -6
  147. package/build/commands/shared/createConfigFile.js +2 -2
  148. package/build/commands/shared/createFileStructure.js +6 -6
  149. package/build/commands/shared/createLintConfigFile.js +1 -1
  150. package/build/commands/shared/deployToSasViyaWithServicePack.js +4 -4
  151. package/build/commands/shared/fetchLogFileContent.js +10 -6
  152. package/build/commands/testing/internal/saveOutput.js +39 -35
  153. package/build/commands/testing/spec/testCommand.spec.js +17 -13
  154. package/build/commands/testing/spec/testing.spec.server.js +38 -38
  155. package/build/commands/testing/test.js +45 -41
  156. package/build/commands/testing/testCommand.js +2 -2
  157. package/build/commands/version/spec/version.spec.js +1 -1
  158. package/build/commands/version/spec/versionCommand.spec.js +11 -7
  159. package/build/commands/version/version.js +3 -3
  160. package/build/commands/version/versionCommand.js +2 -2
  161. package/build/commands/web/internal/createAssetServices.js +28 -24
  162. package/build/commands/web/internal/getWebServiceContent.js +6 -6
  163. package/build/commands/web/internal/sasjsout.d.ts +1 -1
  164. package/build/commands/web/internal/sasjsout.js +1 -1
  165. package/build/commands/web/internal/spec/updateLinkTag.spec.js +2 -2
  166. package/build/commands/web/internal/spec/updateScriptTag.spec.js +10 -10
  167. package/build/commands/web/internal/updateAllTags.js +19 -15
  168. package/build/commands/web/internal/updateLinkTag.js +2 -2
  169. package/build/commands/web/internal/updateScriptTag.js +6 -6
  170. package/build/commands/web/spec/web.spec.js +23 -23
  171. package/build/commands/web/spec/webCommand.spec.js +16 -12
  172. package/build/commands/web/web.js +25 -25
  173. package/build/commands/web/webCommand.js +3 -3
  174. package/build/config.json +1 -0
  175. package/build/types/command/commandBase.js +19 -15
  176. package/build/types/command/parse.js +1 -1
  177. package/build/types/command/spec/commandBase.spec.js +16 -12
  178. package/build/types/command/targetCommand.js +4 -4
  179. package/build/types/command/unalias.js +9 -5
  180. package/build/utils/auth.js +7 -7
  181. package/build/utils/config.d.ts +1 -0
  182. package/build/utils/config.js +78 -48
  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 +2 -3
  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 +62 -60
  200. package/build/utils/utils.js +47 -43
  201. package/package.json +14 -14
@@ -70,10 +70,14 @@ var __read = (this && this.__read) || function (o, n) {
70
70
  }
71
71
  return ar;
72
72
  };
73
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
74
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
75
- to[j] = from[i];
76
- return to;
73
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
74
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
75
+ if (ar || !(i in from)) {
76
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
77
+ ar[i] = from[i];
78
+ }
79
+ }
80
+ return to.concat(ar || Array.prototype.slice.call(from));
77
81
  };
78
82
  Object.defineProperty(exports, "__esModule", { value: true });
79
83
  var createModule = __importStar(require("../create"));
@@ -99,27 +103,27 @@ describe('ContextCommand - create', function () {
99
103
  setupMocks();
100
104
  });
101
105
  it('should parse a simple sasjs context create command', function () {
102
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
106
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
103
107
  'context',
104
108
  'create',
105
109
  '--source',
106
110
  'test.json',
107
111
  '--target',
108
112
  'test'
109
- ]);
113
+ ], false);
110
114
  var command = new contextCommand_1.ContextCommand(args);
111
115
  expect(command.name).toEqual('context');
112
116
  expect(command.subCommand).toEqual('create');
113
117
  });
114
118
  it('should parse a sasjs create context command with shorthand arguments', function () {
115
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
119
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
116
120
  'context',
117
121
  'create',
118
122
  '-s',
119
123
  'test.json',
120
124
  '-t',
121
125
  'test'
122
- ]);
126
+ ], false);
123
127
  var command = new contextCommand_1.ContextCommand(args);
124
128
  expect(command.name).toEqual('context');
125
129
  expect(command.subCommand).toEqual('create');
@@ -129,14 +133,14 @@ describe('ContextCommand - create', function () {
129
133
  return __generator(this, function (_a) {
130
134
  switch (_a.label) {
131
135
  case 0:
132
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
136
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
133
137
  'context',
134
138
  'create',
135
139
  '-s',
136
140
  './test.json',
137
141
  '-t',
138
142
  'test'
139
- ]);
143
+ ], false);
140
144
  command = new contextCommand_1.ContextCommand(args);
141
145
  return [4 /*yield*/, command.getConfig()];
142
146
  case 1:
@@ -151,14 +155,14 @@ describe('ContextCommand - create', function () {
151
155
  return __generator(this, function (_a) {
152
156
  switch (_a.label) {
153
157
  case 0:
154
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
158
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
155
159
  'context',
156
160
  'create',
157
161
  '-s',
158
162
  './test.json',
159
163
  '-t',
160
164
  'test'
161
- ]);
165
+ ], false);
162
166
  command = new contextCommand_1.ContextCommand(args);
163
167
  return [4 /*yield*/, command.getConfig()];
164
168
  case 1:
@@ -178,14 +182,14 @@ describe('ContextCommand - create', function () {
178
182
  return __generator(this, function (_a) {
179
183
  switch (_a.label) {
180
184
  case 0:
181
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
185
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
182
186
  'context',
183
187
  'create',
184
188
  '-s',
185
189
  './test.json',
186
190
  '-t',
187
191
  'test'
188
- ]);
192
+ ], false);
189
193
  jest
190
194
  .spyOn(fileModule, 'fileExists')
191
195
  .mockImplementation(function () { return Promise.resolve(false); });
@@ -204,14 +208,14 @@ describe('ContextCommand - create', function () {
204
208
  return __generator(this, function (_a) {
205
209
  switch (_a.label) {
206
210
  case 0:
207
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
211
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
208
212
  'context',
209
213
  'create',
210
214
  '-s',
211
215
  './test.json',
212
216
  '-t',
213
217
  'test'
214
- ]);
218
+ ], false);
215
219
  jest
216
220
  .spyOn(fileModule, 'readFile')
217
221
  .mockImplementation(function () { return Promise.reject(new Error('Read error')); });
@@ -230,14 +234,14 @@ describe('ContextCommand - create', function () {
230
234
  return __generator(this, function (_a) {
231
235
  switch (_a.label) {
232
236
  case 0:
233
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
237
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
234
238
  'context',
235
239
  'create',
236
240
  '-s',
237
241
  './test.json',
238
242
  '-t',
239
243
  'test'
240
- ]);
244
+ ], false);
241
245
  jest
242
246
  .spyOn(fileModule, 'readFile')
243
247
  .mockImplementation(function () { return Promise.resolve('test'); });
@@ -256,14 +260,14 @@ describe('ContextCommand - create', function () {
256
260
  return __generator(this, function (_a) {
257
261
  switch (_a.label) {
258
262
  case 0:
259
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
263
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
260
264
  'context',
261
265
  'create',
262
266
  '-s',
263
267
  './test.json',
264
268
  '-t',
265
269
  'test'
266
- ]);
270
+ ], false);
267
271
  command = new contextCommand_1.ContextCommand(args);
268
272
  setupMocks();
269
273
  jest
@@ -283,14 +287,14 @@ describe('ContextCommand - create', function () {
283
287
  return __generator(this, function (_a) {
284
288
  switch (_a.label) {
285
289
  case 0:
286
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
290
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
287
291
  'context',
288
292
  'create',
289
293
  '-s',
290
294
  './test.json',
291
295
  '-t',
292
296
  'test'
293
- ]);
297
+ ], false);
294
298
  command = new contextCommand_1.ContextCommand(args);
295
299
  setupMocks();
296
300
  jest
@@ -310,14 +314,14 @@ describe('ContextCommand - create', function () {
310
314
  return __generator(this, function (_a) {
311
315
  switch (_a.label) {
312
316
  case 0:
313
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
317
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
314
318
  'context',
315
319
  'create',
316
320
  '-s',
317
321
  './test.json',
318
322
  '-t',
319
323
  'test'
320
- ]);
324
+ ], false);
321
325
  command = new contextCommand_1.ContextCommand(args);
322
326
  setupMocks();
323
327
  return [4 /*yield*/, command.execute()];
@@ -335,14 +339,14 @@ describe('ContextCommand - create', function () {
335
339
  return __generator(this, function (_a) {
336
340
  switch (_a.label) {
337
341
  case 0:
338
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
342
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
339
343
  'context',
340
344
  'create',
341
345
  '-s',
342
346
  './test.json',
343
347
  '-t',
344
348
  'test'
345
- ]);
349
+ ], false);
346
350
  command = new contextCommand_1.ContextCommand(args);
347
351
  setupMocks();
348
352
  jest
@@ -362,25 +366,25 @@ describe('ContextCommand - delete', function () {
362
366
  setupMocks();
363
367
  });
364
368
  it('should parse a simple sasjs context delete command', function () {
365
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
369
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
366
370
  'context',
367
371
  'delete',
368
372
  'testContext',
369
373
  '--target',
370
374
  'test'
371
- ]);
375
+ ], false);
372
376
  var command = new contextCommand_1.ContextCommand(args);
373
377
  expect(command.name).toEqual('context');
374
378
  expect(command.subCommand).toEqual('delete');
375
379
  });
376
380
  it('should parse a sasjs delete context command with shorthand arguments', function () {
377
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
381
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
378
382
  'context',
379
383
  'delete',
380
384
  'testContext',
381
385
  '-t',
382
386
  'test'
383
- ]);
387
+ ], false);
384
388
  var command = new contextCommand_1.ContextCommand(args);
385
389
  expect(command.name).toEqual('context');
386
390
  expect(command.subCommand).toEqual('delete');
@@ -390,13 +394,13 @@ describe('ContextCommand - delete', function () {
390
394
  return __generator(this, function (_a) {
391
395
  switch (_a.label) {
392
396
  case 0:
393
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
397
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
394
398
  'context',
395
399
  'delete',
396
400
  'testContext',
397
401
  '-t',
398
402
  'test'
399
- ]);
403
+ ], false);
400
404
  command = new contextCommand_1.ContextCommand(args);
401
405
  setupMocks();
402
406
  jest
@@ -416,13 +420,13 @@ describe('ContextCommand - delete', function () {
416
420
  return __generator(this, function (_a) {
417
421
  switch (_a.label) {
418
422
  case 0:
419
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
423
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
420
424
  'context',
421
425
  'delete',
422
426
  'testContext',
423
427
  '-t',
424
428
  'test'
425
- ]);
429
+ ], false);
426
430
  command = new contextCommand_1.ContextCommand(args);
427
431
  setupMocks();
428
432
  return [4 /*yield*/, command.execute()];
@@ -440,13 +444,13 @@ describe('ContextCommand - delete', function () {
440
444
  return __generator(this, function (_a) {
441
445
  switch (_a.label) {
442
446
  case 0:
443
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
447
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
444
448
  'context',
445
449
  'delete',
446
450
  'testContext',
447
451
  '-t',
448
452
  'test'
449
- ]);
453
+ ], false);
450
454
  command = new contextCommand_1.ContextCommand(args);
451
455
  setupMocks();
452
456
  jest
@@ -466,27 +470,27 @@ describe('ContextCommand - edit', function () {
466
470
  setupMocks();
467
471
  });
468
472
  it('should parse a simple sasjs context edit command', function () {
469
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
473
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
470
474
  'context',
471
475
  'edit',
472
476
  '--source',
473
477
  'test.json',
474
478
  '--target',
475
479
  'test'
476
- ]);
480
+ ], false);
477
481
  var command = new contextCommand_1.ContextCommand(args);
478
482
  expect(command.name).toEqual('context');
479
483
  expect(command.subCommand).toEqual('edit');
480
484
  });
481
485
  it('should parse a sasjs edit context command with shorthand arguments', function () {
482
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
486
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
483
487
  'context',
484
488
  'edit',
485
489
  '-s',
486
490
  'test.json',
487
491
  '-t',
488
492
  'test'
489
- ]);
493
+ ], false);
490
494
  var command = new contextCommand_1.ContextCommand(args);
491
495
  expect(command.name).toEqual('context');
492
496
  expect(command.subCommand).toEqual('edit');
@@ -496,14 +500,14 @@ describe('ContextCommand - edit', function () {
496
500
  return __generator(this, function (_a) {
497
501
  switch (_a.label) {
498
502
  case 0:
499
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
503
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
500
504
  'context',
501
505
  'edit',
502
506
  '-s',
503
507
  './test.json',
504
508
  '-t',
505
509
  'test'
506
- ]);
510
+ ], false);
507
511
  command = new contextCommand_1.ContextCommand(args);
508
512
  return [4 /*yield*/, command.getConfig()];
509
513
  case 1:
@@ -518,14 +522,14 @@ describe('ContextCommand - edit', function () {
518
522
  return __generator(this, function (_a) {
519
523
  switch (_a.label) {
520
524
  case 0:
521
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
525
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
522
526
  'context',
523
527
  'edit',
524
528
  '-s',
525
529
  './test.json',
526
530
  '-t',
527
531
  'test'
528
- ]);
532
+ ], false);
529
533
  command = new contextCommand_1.ContextCommand(args);
530
534
  return [4 /*yield*/, command.getConfig()];
531
535
  case 1:
@@ -545,14 +549,14 @@ describe('ContextCommand - edit', function () {
545
549
  return __generator(this, function (_a) {
546
550
  switch (_a.label) {
547
551
  case 0:
548
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
552
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
549
553
  'context',
550
554
  'edit',
551
555
  '-s',
552
556
  './test.json',
553
557
  '-t',
554
558
  'test'
555
- ]);
559
+ ], false);
556
560
  jest
557
561
  .spyOn(fileModule, 'fileExists')
558
562
  .mockImplementation(function () { return Promise.resolve(false); });
@@ -571,14 +575,14 @@ describe('ContextCommand - edit', function () {
571
575
  return __generator(this, function (_a) {
572
576
  switch (_a.label) {
573
577
  case 0:
574
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
578
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
575
579
  'context',
576
580
  'edit',
577
581
  '-s',
578
582
  './test.json',
579
583
  '-t',
580
584
  'test'
581
- ]);
585
+ ], false);
582
586
  jest
583
587
  .spyOn(fileModule, 'readFile')
584
588
  .mockImplementation(function () { return Promise.reject(new Error('Read error')); });
@@ -597,14 +601,14 @@ describe('ContextCommand - edit', function () {
597
601
  return __generator(this, function (_a) {
598
602
  switch (_a.label) {
599
603
  case 0:
600
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
604
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
601
605
  'context',
602
606
  'edit',
603
607
  '-s',
604
608
  './test.json',
605
609
  '-t',
606
610
  'test'
607
- ]);
611
+ ], false);
608
612
  jest
609
613
  .spyOn(fileModule, 'readFile')
610
614
  .mockImplementation(function () { return Promise.resolve('test'); });
@@ -623,14 +627,14 @@ describe('ContextCommand - edit', function () {
623
627
  return __generator(this, function (_a) {
624
628
  switch (_a.label) {
625
629
  case 0:
626
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
630
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
627
631
  'context',
628
632
  'edit',
629
633
  '-s',
630
634
  './test.json',
631
635
  '-t',
632
636
  'test'
633
- ]);
637
+ ], false);
634
638
  command = new contextCommand_1.ContextCommand(args);
635
639
  setupMocks();
636
640
  jest
@@ -650,14 +654,14 @@ describe('ContextCommand - edit', function () {
650
654
  return __generator(this, function (_a) {
651
655
  switch (_a.label) {
652
656
  case 0:
653
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
657
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
654
658
  'context',
655
659
  'edit',
656
660
  '-s',
657
661
  './test.json',
658
662
  '-t',
659
663
  'test'
660
- ]);
664
+ ], false);
661
665
  command = new contextCommand_1.ContextCommand(args);
662
666
  setupMocks();
663
667
  jest
@@ -677,14 +681,14 @@ describe('ContextCommand - edit', function () {
677
681
  return __generator(this, function (_a) {
678
682
  switch (_a.label) {
679
683
  case 0:
680
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
684
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
681
685
  'context',
682
686
  'edit',
683
687
  '-s',
684
688
  './test.json',
685
689
  '-t',
686
690
  'test'
687
- ]);
691
+ ], false);
688
692
  command = new contextCommand_1.ContextCommand(args);
689
693
  setupMocks();
690
694
  return [4 /*yield*/, command.execute()];
@@ -702,7 +706,7 @@ describe('ContextCommand - edit', function () {
702
706
  return __generator(this, function (_a) {
703
707
  switch (_a.label) {
704
708
  case 0:
705
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
709
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
706
710
  'context',
707
711
  'edit',
708
712
  'testContext',
@@ -710,7 +714,7 @@ describe('ContextCommand - edit', function () {
710
714
  './test.json',
711
715
  '-t',
712
716
  'test'
713
- ]);
717
+ ], false);
714
718
  command = new contextCommand_1.ContextCommand(args);
715
719
  setupMocks();
716
720
  return [4 /*yield*/, command.execute()];
@@ -728,14 +732,14 @@ describe('ContextCommand - edit', function () {
728
732
  return __generator(this, function (_a) {
729
733
  switch (_a.label) {
730
734
  case 0:
731
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
735
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
732
736
  'context',
733
737
  'edit',
734
738
  '-s',
735
739
  './test.json',
736
740
  '-t',
737
741
  'test'
738
- ]);
742
+ ], false);
739
743
  command = new contextCommand_1.ContextCommand(args);
740
744
  setupMocks();
741
745
  jest.spyOn(editModule, 'edit').mockImplementation(function () { return Promise.reject(); });
@@ -750,25 +754,25 @@ describe('ContextCommand - edit', function () {
750
754
  });
751
755
  describe('ContextCommand - export', function () {
752
756
  it('should parse a simple sasjs context export command', function () {
753
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
757
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
754
758
  'context',
755
759
  'export',
756
760
  'testContext',
757
761
  '--target',
758
762
  'test'
759
- ]);
763
+ ], false);
760
764
  var command = new contextCommand_1.ContextCommand(args);
761
765
  expect(command.name).toEqual('context');
762
766
  expect(command.subCommand).toEqual('export');
763
767
  });
764
768
  it('should parse a sasjs export context command with shorthand arguments', function () {
765
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
769
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
766
770
  'context',
767
771
  'export',
768
772
  'testContext',
769
773
  '-t',
770
774
  'test'
771
- ]);
775
+ ], false);
772
776
  var command = new contextCommand_1.ContextCommand(args);
773
777
  expect(command.name).toEqual('context');
774
778
  expect(command.subCommand).toEqual('export');
@@ -778,13 +782,13 @@ describe('ContextCommand - export', function () {
778
782
  return __generator(this, function (_a) {
779
783
  switch (_a.label) {
780
784
  case 0:
781
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
785
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
782
786
  'context',
783
787
  'export',
784
788
  'testContext',
785
789
  '-t',
786
790
  'test'
787
- ]);
791
+ ], false);
788
792
  command = new contextCommand_1.ContextCommand(args);
789
793
  setupMocks();
790
794
  jest
@@ -804,13 +808,13 @@ describe('ContextCommand - export', function () {
804
808
  return __generator(this, function (_a) {
805
809
  switch (_a.label) {
806
810
  case 0:
807
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
811
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
808
812
  'context',
809
813
  'export',
810
814
  'testContext',
811
815
  '-t',
812
816
  'test'
813
- ]);
817
+ ], false);
814
818
  command = new contextCommand_1.ContextCommand(args);
815
819
  setupMocks();
816
820
  return [4 /*yield*/, command.execute()];
@@ -828,13 +832,13 @@ describe('ContextCommand - export', function () {
828
832
  return __generator(this, function (_a) {
829
833
  switch (_a.label) {
830
834
  case 0:
831
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), [
835
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), [
832
836
  'context',
833
837
  'export',
834
838
  'testContext',
835
839
  '-t',
836
840
  'test'
837
- ]);
841
+ ], false);
838
842
  command = new contextCommand_1.ContextCommand(args);
839
843
  setupMocks();
840
844
  jest
@@ -851,13 +855,13 @@ describe('ContextCommand - export', function () {
851
855
  });
852
856
  describe('ContextCommand - list', function () {
853
857
  it('should parse a simple sasjs context export command', function () {
854
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '--target', 'test']);
858
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '--target', 'test'], false);
855
859
  var command = new contextCommand_1.ContextCommand(args);
856
860
  expect(command.name).toEqual('context');
857
861
  expect(command.subCommand).toEqual('list');
858
862
  });
859
863
  it('should parse a sasjs export context command with shorthand arguments', function () {
860
- var args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '-t', 'test']);
864
+ var args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '-t', 'test'], false);
861
865
  var command = new contextCommand_1.ContextCommand(args);
862
866
  expect(command.name).toEqual('context');
863
867
  expect(command.subCommand).toEqual('list');
@@ -867,7 +871,7 @@ describe('ContextCommand - list', function () {
867
871
  return __generator(this, function (_a) {
868
872
  switch (_a.label) {
869
873
  case 0:
870
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '-t', 'test']);
874
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '-t', 'test'], false);
871
875
  command = new contextCommand_1.ContextCommand(args);
872
876
  setupMocks();
873
877
  jest
@@ -887,7 +891,7 @@ describe('ContextCommand - list', function () {
887
891
  return __generator(this, function (_a) {
888
892
  switch (_a.label) {
889
893
  case 0:
890
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '-t', 'test']);
894
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '-t', 'test'], false);
891
895
  command = new contextCommand_1.ContextCommand(args);
892
896
  setupMocks();
893
897
  return [4 /*yield*/, command.execute()];
@@ -905,7 +909,7 @@ describe('ContextCommand - list', function () {
905
909
  return __generator(this, function (_a) {
906
910
  switch (_a.label) {
907
911
  case 0:
908
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '-t', 'test']);
912
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '-t', 'test'], false);
909
913
  command = new contextCommand_1.ContextCommand(args);
910
914
  setupMocks();
911
915
  jest.spyOn(listModule, 'list').mockImplementation(function () { return Promise.reject(); });
@@ -922,7 +926,7 @@ describe('ContextCommand - list', function () {
922
926
  return __generator(this, function (_a) {
923
927
  switch (_a.label) {
924
928
  case 0:
925
- args = __spreadArray(__spreadArray([], __read(defaultArgs)), ['context', 'list', '-t', 'test']);
929
+ args = __spreadArray(__spreadArray([], __read(defaultArgs), false), ['context', 'list', '-t', 'test'], false);
926
930
  command = new contextCommand_1.ContextCommand(args);
927
931
  setupMocks();
928
932
  jest
@@ -70,7 +70,7 @@ describe('sasjs context create', function () {
70
70
  it('should create a context with the specified configuration', function () { return __awaiter(void 0, void 0, void 0, function () {
71
71
  return __generator(this, function (_a) {
72
72
  switch (_a.label) {
73
- case 0: return [4 /*yield*/, create_1.create(testConfig, sasjs, testToken)];
73
+ case 0: return [4 /*yield*/, (0, create_1.create)(testConfig, sasjs, testToken)];
74
74
  case 1:
75
75
  _a.sent();
76
76
  expect(sasjs.createComputeContext).toHaveBeenCalledWith(testConfig.name, testConfig.launchContext.contextName, undefined, undefined, testToken);
@@ -84,7 +84,7 @@ describe('sasjs context create', function () {
84
84
  switch (_a.label) {
85
85
  case 0:
86
86
  config = __assign(__assign({}, testConfig), { environment: { autoExecLines: ['%put "hello";'] }, attributes: { runServerAs: 'me' } });
87
- return [4 /*yield*/, create_1.create(config, sasjs, testToken)];
87
+ return [4 /*yield*/, (0, create_1.create)(config, sasjs, testToken)];
88
88
  case 1:
89
89
  _a.sent();
90
90
  expect(sasjs.createComputeContext).toHaveBeenCalledWith(testConfig.name, testConfig.launchContext.contextName, config.attributes.runServerAs, config.environment.autoExecLines, testToken);
@@ -102,7 +102,7 @@ describe('sasjs context create', function () {
102
102
  jest
103
103
  .spyOn(sasjs, 'createComputeContext')
104
104
  .mockImplementation(function () { return Promise.reject(new Error('Test Error')); });
105
- return [4 /*yield*/, create_1.create(config, sasjs, testToken).catch(function (e) { return e; })];
105
+ return [4 /*yield*/, (0, create_1.create)(config, sasjs, testToken).catch(function (e) { return e; })];
106
106
  case 1:
107
107
  error = _a.sent();
108
108
  expect(sasjs.createComputeContext).toHaveBeenCalledWith(testConfig.name, testConfig.launchContext.contextName, config.attributes.runServerAs, config.environment.autoExecLines, testToken);
@@ -76,7 +76,7 @@ describe('sasjs context edit', function () {
76
76
  switch (_a.label) {
77
77
  case 0:
78
78
  expectedPath = path_1.default.join(process.cwd(), testContext.name + '.json');
79
- return [4 /*yield*/, delete_1.deleteContext('testContext', sasjs, testToken)];
79
+ return [4 /*yield*/, (0, delete_1.deleteContext)('testContext', sasjs, testToken)];
80
80
  case 1:
81
81
  _a.sent();
82
82
  expect(sasjs.deleteComputeContext).toHaveBeenCalledWith('testContext', testToken);
@@ -93,12 +93,12 @@ describe('sasjs context edit', function () {
93
93
  jest
94
94
  .spyOn(sasjs, 'deleteComputeContext')
95
95
  .mockImplementation(function () { return Promise.reject(new Error('Test Error')); });
96
- return [4 /*yield*/, delete_1.deleteContext('testContext', sasjs, testToken).catch(function (e) { return e; })];
96
+ return [4 /*yield*/, (0, delete_1.deleteContext)('testContext', sasjs, testToken).catch(function (e) { return e; })];
97
97
  case 1:
98
98
  err = _a.sent();
99
99
  expect(err).toBeInstanceOf(Error);
100
100
  expect(err.message).toEqual('Test Error');
101
- expect(process.logger.error).toHaveBeenLastCalledWith("Error deleting context '" + testContext.name + "': ", new Error('Test Error'));
101
+ expect(process.logger.error).toHaveBeenLastCalledWith("Error deleting context '".concat(testContext.name, "': "), new Error('Test Error'));
102
102
  expect(process.logger.success).not.toHaveBeenCalled();
103
103
  return [2 /*return*/];
104
104
  }