@sasjs/cli 3.0.2 → 3.2.0

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 (81) hide show
  1. package/build/commands/add/addCredential.d.ts +6 -2
  2. package/build/commands/add/addCredential.js +79 -47
  3. package/build/commands/add/addTarget.js +32 -20
  4. package/build/commands/add/internal/input.d.ts +7 -0
  5. package/build/commands/add/internal/input.js +53 -8
  6. package/build/commands/add/spec/addTarget.spec.js +78 -0
  7. package/build/commands/build/build.js +11 -11
  8. package/build/commands/build/internal/config.d.ts +1 -1
  9. package/build/commands/build/internal/config.js +5 -6
  10. package/build/commands/compile/compile.js +4 -4
  11. package/build/commands/compile/compileCommand.js +2 -1
  12. package/build/commands/compile/compileSingleFile.d.ts +1 -1
  13. package/build/commands/compile/compileSingleFile.js +6 -7
  14. package/build/commands/compile/internal/compareFolders.js +1 -2
  15. package/build/commands/compile/internal/compileJobFile.js +1 -1
  16. package/build/commands/compile/internal/compileServiceFile.js +32 -16
  17. package/build/commands/compile/internal/compileTestFile.d.ts +0 -2
  18. package/build/commands/compile/internal/compileTestFile.js +10 -14
  19. package/build/commands/compile/internal/getAllJobFolders.js +1 -1
  20. package/build/commands/compile/internal/getAllServiceFolders.js +1 -1
  21. package/build/commands/compile/internal/loadDependencies.d.ts +2 -3
  22. package/build/commands/compile/internal/loadDependencies.js +43 -230
  23. package/build/commands/compile/internal/spec/compileTestFile.spec.js +8 -8
  24. package/build/commands/compile/spec/compileJobFile.spec.js +3 -3
  25. package/build/commands/compile/spec/compileServiceFile.spec.js +3 -3
  26. package/build/commands/compile/spec/loadDependencies.spec.js +37 -37
  27. package/build/commands/create/spec/reactAppFiles.js +5 -5
  28. package/build/commands/deploy/deploy.js +1 -1
  29. package/build/commands/deploy/spec/cbd.spec.js +19 -3
  30. package/build/commands/docs/generateDocs.js +4 -5
  31. package/build/commands/docs/internal/getFileInputs.d.ts +1 -1
  32. package/build/commands/docs/internal/getFileInputs.js +2 -2
  33. package/build/commands/docs/internal/getFileOutputs.d.ts +1 -1
  34. package/build/commands/docs/internal/getFileOutputs.js +2 -2
  35. package/build/commands/docs/internal/getFoldersForDocs.d.ts +1 -1
  36. package/build/commands/docs/internal/getFoldersForDocs.js +1 -1
  37. package/build/commands/job/internal/execute/viya.js +0 -6
  38. package/build/commands/job/internal/utils.js +6 -8
  39. package/build/commands/job/jobCommand.d.ts +1 -0
  40. package/build/commands/job/jobCommand.js +8 -3
  41. package/build/commands/job/spec/jobCommand.spec.js +10 -3
  42. package/build/commands/request/request.js +2 -2
  43. package/build/commands/run/run.js +1 -1
  44. package/build/commands/servicepack/deploy.js +1 -1
  45. package/build/commands/shared/fetchLogFileContent.js +6 -8
  46. package/build/commands/testing/test.js +1 -1
  47. package/build/commands/web/internal/getTags.d.ts +2 -1
  48. package/build/commands/web/internal/getTags.js +10 -12
  49. package/build/commands/web/internal/getWebServiceContent.js +1 -2
  50. package/build/commands/web/internal/sasjsout.d.ts +1 -1
  51. package/build/commands/web/internal/sasjsout.js +1 -1
  52. package/build/commands/web/internal/spec/updateLinkTag.spec.d.ts +4 -0
  53. package/build/commands/web/internal/spec/updateLinkTag.spec.js +32 -0
  54. package/build/commands/web/internal/updateAllTags.js +33 -8
  55. package/build/commands/web/internal/updateLinkTag.d.ts +4 -0
  56. package/build/commands/web/internal/updateLinkTag.js +24 -0
  57. package/build/commands/web/web.js +12 -13
  58. package/build/utils/auth.d.ts +10 -4
  59. package/build/utils/auth.js +17 -15
  60. package/build/utils/config.d.ts +2 -3
  61. package/build/utils/config.js +14 -16
  62. package/build/utils/file.d.ts +0 -6
  63. package/build/utils/file.js +1 -43
  64. package/build/utils/setConstants.js +1 -1
  65. package/build/utils/spec/utils.spec.js +31 -5
  66. package/build/utils/utils.d.ts +0 -2
  67. package/build/utils/utils.js +2 -21
  68. package/package.json +8 -14
  69. package/CHANGELOG.md +0 -30
  70. package/build/commands/compile/internal/config.d.ts +0 -25
  71. package/build/commands/compile/internal/config.js +0 -259
  72. package/build/commands/compile/spec/getDependencyPaths.spec.d.ts +0 -1
  73. package/build/commands/compile/spec/getDependencyPaths.spec.js +0 -263
  74. package/build/commands/compile/spec/getProgramDependencies.spec.d.ts +0 -1
  75. package/build/commands/compile/spec/getProgramDependencies.spec.js +0 -403
  76. package/build/commands/shared/dependencies.d.ts +0 -12
  77. package/build/commands/shared/dependencies.js +0 -332
  78. package/build/commands/web/internal/updateLinkHref.d.ts +0 -4
  79. package/build/commands/web/internal/updateLinkHref.js +0 -18
  80. package/build/utils/spec/utils.spec.server.d.ts +0 -1
  81. package/build/utils/spec/utils.spec.server.js +0 -72
@@ -633,7 +633,7 @@ function getProgramFolders(target) {
633
633
  }
634
634
  buildSourceFolder = process.sasjsConstants.buildSourceFolder;
635
635
  programFolders = programFolders.map(function (programFolder) {
636
- return utils_2.getAbsolutePath(programFolder, buildSourceFolder);
636
+ return utils_1.getAbsolutePath(programFolder, buildSourceFolder);
637
637
  });
638
638
  return [2 /*return*/, __spreadArray([], __read(new Set(programFolders)))];
639
639
  }
@@ -664,7 +664,7 @@ function getMacroFolders(target) {
664
664
  }
665
665
  buildSourceFolder = process.sasjsConstants.buildSourceFolder;
666
666
  macroFolders = macroFolders.map(function (macroFolder) {
667
- return utils_2.getAbsolutePath(macroFolder, buildSourceFolder);
667
+ return utils_1.getAbsolutePath(macroFolder, buildSourceFolder);
668
668
  });
669
669
  return [2 /*return*/, __spreadArray([], __read(new Set(macroFolders)))];
670
670
  }
@@ -691,10 +691,7 @@ function getStreamConfig(target) {
691
691
  });
692
692
  }
693
693
  exports.getStreamConfig = getStreamConfig;
694
- function getMacroCorePath() {
695
- var macroCorePath = process.sasjsConstants.macroCorePath;
696
- return macroCorePath;
697
- }
694
+ var getMacroCorePath = function () { return process.sasjsConstants.macroCorePath; };
698
695
  exports.getMacroCorePath = getMacroCorePath;
699
696
  /**
700
697
  * Sanitizes app location string.
@@ -761,7 +758,7 @@ exports.getProjectRoot = getProjectRoot;
761
758
  function getAuthConfig(target) {
762
759
  var _a, _b, _c, _d;
763
760
  return __awaiter(this, void 0, void 0, function () {
764
- var access_token, refresh_token, client, secret, authConfig, sasjs;
761
+ var access_token, refresh_token, client, secret, sasjs, tokens;
765
762
  return __generator(this, function (_e) {
766
763
  switch (_e.label) {
767
764
  case 0:
@@ -811,18 +808,19 @@ function getAuthConfig(target) {
811
808
  httpsAgentOptions: target.httpsAgentOptions,
812
809
  serverType: target.serverType
813
810
  });
811
+ tokens = void 0;
814
812
  if (!auth_1.isRefreshTokenExpiring(refresh_token)) return [3 /*break*/, 4];
815
813
  return [4 /*yield*/, auth_1.getNewAccessToken(sasjs, client, secret, target)];
816
814
  case 3:
817
- authConfig = _e.sent();
815
+ tokens = _e.sent();
818
816
  return [3 /*break*/, 6];
819
817
  case 4: return [4 /*yield*/, auth_1.refreshTokens(sasjs, client, secret, refresh_token)];
820
818
  case 5:
821
- authConfig = _e.sent();
819
+ tokens = _e.sent();
822
820
  _e.label = 6;
823
821
  case 6:
824
- access_token = (authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token) || access_token;
825
- refresh_token = (authConfig === null || authConfig === void 0 ? void 0 : authConfig.refresh_token) || refresh_token;
822
+ access_token = (tokens === null || tokens === void 0 ? void 0 : tokens.access_token) || access_token;
823
+ refresh_token = (tokens === null || tokens === void 0 ? void 0 : tokens.refresh_token) || refresh_token;
826
824
  _e.label = 7;
827
825
  case 7: return [2 /*return*/, {
828
826
  access_token: access_token,
@@ -852,7 +850,7 @@ exports.getAuthConfig = getAuthConfig;
852
850
  function getAccessToken(target, checkIfExpiring) {
853
851
  if (checkIfExpiring === void 0) { checkIfExpiring = true; }
854
852
  return __awaiter(this, void 0, void 0, function () {
855
- var accessToken, sasjs, client, secret, refreshToken, authConfig;
853
+ var accessToken, sasjs, client, secret, refreshToken, tokens;
856
854
  return __generator(this, function (_a) {
857
855
  switch (_a.label) {
858
856
  case 0:
@@ -907,18 +905,18 @@ function getAccessToken(target, checkIfExpiring) {
907
905
  (refreshToken.trim() === 'null' || refreshToken.trim() === 'undefined')
908
906
  ? undefined
909
907
  : refreshToken;
910
- authConfig = void 0;
908
+ tokens = void 0;
911
909
  if (!auth_1.isRefreshTokenExpiring(refreshToken)) return [3 /*break*/, 4];
912
910
  return [4 /*yield*/, auth_1.getNewAccessToken(sasjs, client, secret, target)];
913
911
  case 3:
914
- authConfig = _a.sent();
912
+ tokens = _a.sent();
915
913
  return [3 /*break*/, 6];
916
914
  case 4: return [4 /*yield*/, auth_1.refreshTokens(sasjs, client, secret, refreshToken)];
917
915
  case 5:
918
- authConfig = _a.sent();
916
+ tokens = _a.sent();
919
917
  _a.label = 6;
920
918
  case 6:
921
- accessToken = authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token;
919
+ accessToken = tokens === null || tokens === void 0 ? void 0 : tokens.access_token;
922
920
  _a.label = 7;
923
921
  case 7: return [2 /*return*/, accessToken];
924
922
  }
@@ -4,12 +4,6 @@ export function isSasFile(filePath: any): boolean;
4
4
  export function isJsonFile(filePath: any): boolean;
5
5
  export function isCsvFile(filePath: any): boolean;
6
6
  export function isShellScript(filePath: any): boolean;
7
- /**
8
- * Gets a list of @li items from the supplied file content with the specified header.
9
- * @param {string} listHeader - the header of the section to look for - e.g. <h4> SAS Macros </h4>.
10
- * @param {string} fileContent - the text content of the file.
11
- */
12
- export function getList(listHeader: string, fileContent: string): any[];
13
7
  export function getBrief(fileContent: any): any;
14
8
  export function getRelativePath(from: any, to: any): any[];
15
9
  export function saveToDefaultLocation(filePath: any, data: any): Promise<{
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.sasFileRegExp = exports.saveToDefaultLocation = exports.getRelativePath = exports.getBrief = exports.getList = exports.sanitizeFileName = exports.isShellScript = exports.isCsvFile = exports.isJsonFile = exports.isSasFile = exports.unifyFilePath = exports.createFolderStructure = void 0;
42
+ exports.sasFileRegExp = exports.saveToDefaultLocation = exports.getRelativePath = exports.getBrief = exports.sanitizeFileName = exports.isShellScript = exports.isCsvFile = exports.isJsonFile = exports.isSasFile = exports.unifyFilePath = exports.createFolderStructure = void 0;
43
43
  var path_1 = __importDefault(require("path"));
44
44
  var utils_1 = require("@sasjs/utils");
45
45
  var config_1 = require("./config");
@@ -129,48 +129,6 @@ var sanitizeFileName = function (fileName) {
129
129
  return fileName.replace(/[^a-z0-9]/gi, '_');
130
130
  };
131
131
  exports.sanitizeFileName = sanitizeFileName;
132
- /**
133
- * Gets a list of @li items from the supplied file content with the specified header.
134
- * @param {string} listHeader - the header of the section to look for - e.g. <h4> SAS Macros </h4>.
135
- * @param {string} fileContent - the text content of the file.
136
- */
137
- function getList(listHeader, fileContent) {
138
- var _a;
139
- var fileHeader;
140
- try {
141
- var hasFileHeader = fileContent.split('/**')[0] !== fileContent;
142
- if (!hasFileHeader)
143
- return [];
144
- fileHeader = fileContent.split('/**')[1].split('**/')[0];
145
- }
146
- catch (e) {
147
- (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error('File header parse error.\nPlease make sure your file header is in the correct format.');
148
- }
149
- var list = [];
150
- var lines = fileHeader.split('\n').map(function (s) { return (s ? s.trim() : s); });
151
- var startIndex = null;
152
- var endIndex = null;
153
- for (var i = 0; i < lines.length; i++) {
154
- if (new RegExp(listHeader, 'i').test(lines[i])) {
155
- startIndex = i + 1;
156
- break;
157
- }
158
- }
159
- for (var i = startIndex; i < lines.length; i++) {
160
- if (!lines[i]) {
161
- endIndex = i;
162
- break;
163
- }
164
- }
165
- for (var i = startIndex; i < endIndex; i++) {
166
- list.push(lines[i]);
167
- }
168
- return list
169
- .filter(function (l) { return l.startsWith('@li'); })
170
- .map(function (d) { return d.replace(/\@li/g, ''); })
171
- .map(function (d) { return d.trim(); });
172
- }
173
- exports.getList = getList;
174
132
  function getBrief(fileContent) {
175
133
  var fileHeader;
176
134
  try {
@@ -43,7 +43,7 @@ exports.setConstants = exports.contextName = void 0;
43
43
  var path_1 = __importDefault(require("path"));
44
44
  var get_installed_path_1 = require("get-installed-path");
45
45
  var config_1 = require("./config");
46
- var utils_1 = require("./utils");
46
+ var utils_1 = require("@sasjs/utils");
47
47
  exports.contextName = 'sasjs cli compute context';
48
48
  var setConstants = function () { return __awaiter(void 0, void 0, void 0, function () {
49
49
  var _a, configuration, isLocal, buildOutputFolder, buildResultsFolder, homeDir, getMacroCoreGlobalPath, buildSourceFolder, buildSourceDbFolder, buildDestinationFolder, buildDestinationServicesFolder, buildDestinationTestFolder, buildDestinationJobsFolder, buildDestinationDbFolder, buildDestinationDocsFolder, macroCorePath, _b, buildDestinationResultsFolder, buildDestinationResultsLogsFolder, sas9CredentialsError, invalidSasError;
@@ -235,11 +235,11 @@ describe('utils', function () {
235
235
  describe('chunk', function () {
236
236
  it('should return an array with only one element that is equal to text itself if text size is less than max length', function () {
237
237
  var txt = '0B0pFTOzHXyRuikRydwnd8uQdwvITllwNOX20vQLsT0JgkXa1W';
238
- expect(utils_1.chunk(txt)[0]).toBe(txt);
238
+ expect(utils_2.chunk(txt)[0]).toBe(txt);
239
239
  });
240
240
  it('should return an array with 3 elements', function () {
241
241
  var txt = 'SGmqg3pnHCJn0iPQC4Rd9AnFS3k5V7dDc81GlF6lCCurmsEJq7VS\nig42yjxerV7OAjE1HIOgJZXqID30\nkaVJsCwWrtFEIL8mQepjp4zLGeCaWk7ymu9BqolSnqA3udaiWuHcm6m80E36mWYWU0lITAgdp1QzVwIczpopXRaUWtJamiPnHyflksdNEXkboKlAT5RuR795ShUOc6KajQZ1qH2ZGJPV2DxjEqtXA9uvNbpisOVY6MpRdEzWNgdDsXlfuXkrBk5RqA7PkdtjBtNHA7JtEklTnYKrOdge03qFXKjh';
242
- expect(utils_1.chunk(txt)).toBeArrayOfSize(3);
242
+ expect(utils_2.chunk(txt)).toBeArrayOfSize(3);
243
243
  });
244
244
  });
245
245
  describe('arrToObj', function () {
@@ -307,18 +307,18 @@ describe('utils', function () {
307
307
  var relativePath = './my-path/xyz';
308
308
  var pathRelativeTo = '/home/abc';
309
309
  var expectedAbsolutePath = ['', 'home', 'abc', 'my-path', 'xyz'].join(path_1.default.sep);
310
- expect(utils_1.getAbsolutePath(relativePath, pathRelativeTo)).toEqual(expectedAbsolutePath);
310
+ expect(utils_2.getAbsolutePath(relativePath, pathRelativeTo)).toEqual(expectedAbsolutePath);
311
311
  });
312
312
  it('should convert tilde from absolute path', function () {
313
313
  var relativePath = '~/my-path/xyz';
314
314
  var expectedAbsolutePath = homedir + ['', 'my-path', 'xyz'].join(path_1.default.sep);
315
- expect(utils_1.getAbsolutePath(relativePath, '')).toEqual(expectedAbsolutePath);
315
+ expect(utils_2.getAbsolutePath(relativePath, '')).toEqual(expectedAbsolutePath);
316
316
  });
317
317
  it('should return same path if path is absolute', function () {
318
318
  var absolutePath = '/my-path/xyz';
319
319
  var pathRelativeTo = '/home/abc';
320
320
  var expectedAbsolutePath = ['', 'my-path', 'xyz'].join(path_1.default.sep);
321
- expect(utils_1.getAbsolutePath(absolutePath, pathRelativeTo)).toEqual(expectedAbsolutePath);
321
+ expect(utils_2.getAbsolutePath(absolutePath, pathRelativeTo)).toEqual(expectedAbsolutePath);
322
322
  });
323
323
  });
324
324
  describe('loadEnvVariables', function () {
@@ -359,4 +359,30 @@ describe('utils', function () {
359
359
  });
360
360
  }); });
361
361
  });
362
+ describe('createReactApp', function () {
363
+ it('should create React app', function () { return __awaiter(void 0, void 0, void 0, function () {
364
+ var reactFolder, reactFolderPath, sasjsFolderPath;
365
+ return __generator(this, function (_a) {
366
+ switch (_a.label) {
367
+ case 0:
368
+ reactFolder = 'react-seed-app';
369
+ reactFolderPath = path_1.default.join(__dirname, reactFolder);
370
+ sasjsFolderPath = path_1.default.join(reactFolderPath, 'sasjs');
371
+ return [4 /*yield*/, utils_2.createFolder(reactFolderPath)];
372
+ case 1:
373
+ _a.sent();
374
+ return [4 /*yield*/, expect(utils_1.createReactApp(reactFolderPath)).toResolve()];
375
+ case 2:
376
+ _a.sent();
377
+ return [4 /*yield*/, expect(utils_2.folderExists(sasjsFolderPath)).resolves.toEqual(true)];
378
+ case 3:
379
+ _a.sent();
380
+ return [4 /*yield*/, utils_2.deleteFolder(reactFolderPath)];
381
+ case 4:
382
+ _a.sent();
383
+ return [2 /*return*/];
384
+ }
385
+ });
386
+ }); }, 600000);
387
+ });
362
388
  });
@@ -18,7 +18,6 @@ export declare function setupDoxygen(folderPath: string): Promise<void>;
18
18
  export declare function removeComments(text: string): string;
19
19
  export declare function getUniqServicesObj(services: string[]): any;
20
20
  export declare function executeShellScript(filePath: string, logFilePath: string): Promise<unknown>;
21
- export declare function chunk(text: string, maxLength?: number): string[];
22
21
  /**
23
22
  * Extracts plain text job log from fetched json log
24
23
  * @param {object} logJson
@@ -33,7 +32,6 @@ export declare const millisecondsToDdHhMmSs: (milliseconds: number) => string;
33
32
  export declare function checkNodeVersion(): void;
34
33
  export declare function getAdapterInstance(target: Target): SASjs;
35
34
  export declare function displaySasjsRunnerError(username: string): void;
36
- export declare const getAbsolutePath: (providedPath: string, relativePath: string) => string;
37
35
  export declare const loadEnvVariables: (fileName: string) => Promise<void>;
38
36
  export declare function prefixAppLoc(appLoc?: string, path?: string): string | null;
39
37
  export declare const isWindows: () => boolean;
@@ -82,10 +82,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
82
82
  return (mod && mod.__esModule) ? mod : { "default": mod };
83
83
  };
84
84
  Object.defineProperty(exports, "__esModule", { value: true });
85
- exports.terminateProcess = exports.isWindows = exports.prefixAppLoc = exports.loadEnvVariables = exports.getAbsolutePath = exports.displaySasjsRunnerError = exports.getAdapterInstance = exports.checkNodeVersion = exports.millisecondsToDdHhMmSs = exports.arrToObj = exports.parseLogLines = exports.chunk = exports.executeShellScript = exports.getUniqServicesObj = exports.removeComments = exports.setupDoxygen = exports.setupGhooks = exports.setupGitIgnore = exports.setupNpmProject = exports.createTemplateApp = exports.createMinimalApp = exports.createAngularApp = exports.createReactApp = exports.diff = exports.inExistingProject = void 0;
85
+ exports.terminateProcess = exports.isWindows = exports.prefixAppLoc = exports.loadEnvVariables = exports.displaySasjsRunnerError = exports.getAdapterInstance = exports.checkNodeVersion = exports.millisecondsToDdHhMmSs = exports.arrToObj = exports.parseLogLines = exports.executeShellScript = exports.getUniqServicesObj = exports.removeComments = exports.setupDoxygen = exports.setupGhooks = exports.setupGitIgnore = exports.setupNpmProject = exports.createTemplateApp = exports.createMinimalApp = exports.createAngularApp = exports.createReactApp = exports.diff = exports.inExistingProject = void 0;
86
86
  var shelljs_1 = __importDefault(require("shelljs"));
87
87
  var path_1 = __importDefault(require("path"));
88
- var os_1 = __importDefault(require("os"));
89
88
  var ora_1 = __importDefault(require("ora"));
90
89
  var utils_1 = require("@sasjs/utils");
91
90
  var node_1 = __importDefault(require("@sasjs/adapter/node"));
@@ -187,11 +186,7 @@ function createApp(folderPath, repoUrl, installDependencies) {
187
186
  if (installDependencies === void 0) { installDependencies = true; }
188
187
  var spinner = ora_1.default("Creating SASjs project in " + folderPath + ".");
189
188
  spinner.start();
190
- var gitBranch = repoUrl.includes('template_sasonly')
191
- ? 'master'
192
- : repoUrl.includes('template_jobs')
193
- ? 'master'
194
- : 'main';
189
+ var gitBranch = repoUrl.includes('template_sasonly') ? 'master' : 'main';
195
190
  shelljs_1.default.exec("cd \"" + folderPath + "\" && git clone --depth 1 -b " + gitBranch + " " + repoUrl + " .", { silent: true });
196
191
  shelljs_1.default.rm('-rf', path_1.default.join(folderPath, '.git'));
197
192
  spinner.stop();
@@ -438,14 +433,6 @@ function executeShellScript(filePath, logFilePath) {
438
433
  });
439
434
  }
440
435
  exports.executeShellScript = executeShellScript;
441
- function chunk(text, maxLength) {
442
- if (maxLength === void 0) { maxLength = 220; }
443
- if (text.length <= maxLength) {
444
- return [text];
445
- }
446
- return (text.match(new RegExp('.{1,' + maxLength + '}', 'g')) || []).filter(function (m) { return !!m; });
447
- }
448
- exports.chunk = chunk;
449
436
  /**
450
437
  * Extracts plain text job log from fetched json log
451
438
  * @param {object} logJson
@@ -526,12 +513,6 @@ function displaySasjsRunnerError(username) {
526
513
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Please deploy the SASjs runner by running the code below and try again:\n" + sasjsRunnerCode);
527
514
  }
528
515
  exports.displaySasjsRunnerError = displaySasjsRunnerError;
529
- var getAbsolutePath = function (providedPath, relativePath) {
530
- return path_1.default.isAbsolute(providedPath) || /^~/.exec(providedPath)
531
- ? path_1.default.normalize(providedPath.replace(/^~/, os_1.default.homedir()))
532
- : path_1.default.join(relativePath, providedPath);
533
- };
534
- exports.getAbsolutePath = getAbsolutePath;
535
516
  var loadEnvVariables = function (fileName) { return __awaiter(void 0, void 0, void 0, function () {
536
517
  var envFileExistsInCurrentPath, envFileExistsInParentPath, envFilePath;
537
518
  return __generator(this, function (_a) {
package/package.json CHANGED
@@ -19,7 +19,8 @@
19
19
  "test:mocked": "jest --silent --runInBand --config=jest.config.js --coverage",
20
20
  "semantic-release": "semantic-release -d",
21
21
  "lint:fix": "npx prettier --write \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
22
- "lint": "npx prettier --check \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\""
22
+ "lint": "npx prettier --check \"{src,test}/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
23
+ "prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
23
24
  },
24
25
  "release": {
25
26
  "branches": [
@@ -47,16 +48,11 @@
47
48
  "publishConfig": {
48
49
  "access": "public"
49
50
  },
50
- "config": {
51
- "ghooks": {
52
- "commit-msg": "validate-commit-msg"
53
- }
54
- },
55
51
  "dependencies": {
56
- "@sasjs/adapter": "3.0.0",
57
- "@sasjs/core": "2.45.2",
52
+ "@sasjs/adapter": "3.3.0",
53
+ "@sasjs/core": "2.54.1",
58
54
  "@sasjs/lint": "1.11.2",
59
- "@sasjs/utils": "2.33.1",
55
+ "@sasjs/utils": "2.34.1",
60
56
  "chalk": "4.1.2",
61
57
  "csv-stringify": "5.6.5",
62
58
  "dotenv": "10.0.0",
@@ -90,9 +86,8 @@
90
86
  "@types/xml": "1.0.6",
91
87
  "babel-jest": "27.2.4",
92
88
  "copyfiles": "2.4.1",
93
- "ghooks": "2.0.4",
94
89
  "jest": "27.2.4",
95
- "jest-cli": "27.2.4",
90
+ "jest-cli": "27.3.1",
96
91
  "jest-extended": "1.1.0",
97
92
  "nodemon": "2.0.13",
98
93
  "semantic-release": "17.4.7",
@@ -100,8 +95,7 @@
100
95
  "ts-node": "10.2.1",
101
96
  "tslib": "2.3.1",
102
97
  "typescript": "4.3.5",
103
- "util": "0.12.4",
104
- "validate-commit-msg": "1.1.3"
98
+ "util": "0.12.4"
105
99
  },
106
- "version": "3.0.2"
100
+ "version": "3.2.0"
107
101
  }
package/CHANGELOG.md DELETED
@@ -1,30 +0,0 @@
1
- # Change Log
2
-
3
- Since March 7th, 2020, the changelog is managed by github releases. See [https://github.com/sasjs/cli/releases](https://github.com/sasjs/cli/releases).
4
-
5
- ## Changes Prior to March 7th 2020
6
-
7
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
8
-
9
- <a name="1.0.4"></a>
10
- ## [1.0.4](https://gitlab.com/macropeople/sasjs-cli/compare/v1.0.3...v1.0.4) (2020-03-07)
11
-
12
-
13
- ### Bug Fixes
14
-
15
- * redo comment stripping logic ([84a1a91](https://gitlab.com/macropeople/sasjs-cli/commit/84a1a91))
16
-
17
-
18
-
19
- <a name="1.0.3"></a>
20
- ## [1.0.3](https://gitlab.com/macropeople/sasjs-cli/compare/v1.0.2...v1.0.3) (2020-03-07)
21
-
22
-
23
-
24
- <a name="1.0.2"></a>
25
- ## [1.0.2](https://gitlab.com/macropeople/sasjs-cli/compare/v1.0.1...v1.0.2) (2020-03-07)
26
-
27
-
28
-
29
- <a name="1.0.1"></a>
30
- ## 1.0.1 (2020-03-07)
@@ -1,25 +0,0 @@
1
- import { Target } from '@sasjs/utils/types';
2
- export declare const getServiceInit: (target: Target) => Promise<{
3
- content: string;
4
- filePath: string;
5
- }>;
6
- export declare const getServiceTerm: (target: Target) => Promise<{
7
- content: string;
8
- filePath: string;
9
- }>;
10
- export declare const getJobInit: (target: Target) => Promise<{
11
- content: string;
12
- filePath: string;
13
- }>;
14
- export declare const getJobTerm: (target: Target) => Promise<{
15
- content: string;
16
- filePath: string;
17
- }>;
18
- export declare const getTestInit: (target: Target) => Promise<{
19
- content: string;
20
- filePath: string;
21
- }>;
22
- export declare const getTestTerm: (target: Target) => Promise<{
23
- content: string;
24
- filePath: string;
25
- }>;