@sasjs/cli 3.8.9 → 3.10.1

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 (27) hide show
  1. package/build/commands/build/build.js +33 -45
  2. package/build/commands/compile/compile.d.ts +2 -1
  3. package/build/commands/compile/compile.js +26 -20
  4. package/build/commands/compile/compileSingleFile.js +9 -4
  5. package/build/commands/compile/internal/compileJobFile.d.ts +2 -1
  6. package/build/commands/compile/internal/compileJobFile.js +2 -2
  7. package/build/commands/compile/internal/compileServiceFile.d.ts +2 -1
  8. package/build/commands/compile/internal/compileServiceFile.js +2 -2
  9. package/build/commands/compile/internal/compileTestFile.d.ts +2 -2
  10. package/build/commands/compile/internal/compileTestFile.js +3 -2
  11. package/build/commands/compile/internal/loadDependencies.d.ts +3 -2
  12. package/build/commands/compile/internal/loadDependencies.js +37 -16
  13. package/build/commands/compile/internal/spec/compileTestFile.spec.js +2 -2
  14. package/build/commands/compile/spec/compileJobFile.spec.js +6 -4
  15. package/build/commands/compile/spec/compileServiceFile.spec.js +6 -4
  16. package/build/commands/compile/spec/loadDependencies.spec.js +38 -32
  17. package/build/commands/deploy/deploy.js +44 -39
  18. package/build/commands/docs/generateDocs.js +3 -7
  19. package/build/commands/docs/internal/getFileInputs.js +1 -1
  20. package/build/commands/docs/internal/getFileOutputs.js +1 -1
  21. package/build/commands/web/web.js +34 -24
  22. package/build/utils/displayResult.js +1 -1
  23. package/build/utils/spec/removeComments.spec.d.ts +1 -1
  24. package/build/utils/spec/removeComments.spec.js +2 -1
  25. package/build/utils/utils.d.ts +0 -1
  26. package/build/utils/utils.js +2 -4
  27. package/package.json +2 -2
@@ -1 +1 @@
1
- export declare const sampleSasProgram = "/**\n @file mv_createfolder.sas\n @brief Creates a viya folder if that foloder does not already exist\n @details Expects oauth token in a global macro variable (default\n ACCESS_TOKEN).\n\n options mprint;\n %mv_createfolder(path=/Public)\n\n\n @param path= The full path of the folder to be created\n @param access_token_var= The global macro variable to contain the access token\n @param grant_type= valid values are \"password\" or \"authorization_code\" (unquoted).\n The default is authorization_code.\n\n\n @version VIYA V.03.04\n @author Allan Bowe\n @source https://github.com/sasjs/core\n\n <h4> SAS Macros </h4>\n @li mf_abort.sas\n @li mf_getuniquefileref.sas\n @li mf_getuniquelibref.sas\n @li mf_isblank.sas\n\n**/\n\n/* This is a comment\nthat spans\nmultiple lines */\n\n%macro mv_createfolder(path=\n ,access_token_var=ACCESS_TOKEN\n ,grant_type=authorization_code\n);";
1
+ export declare const sampleSasProgram: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sampleSasProgram = void 0;
4
4
  var utils_1 = require("../utils");
5
+ var utils_2 = require("@sasjs/utils");
5
6
  describe('removeComments', function () {
6
7
  test('should remove block comment', function () {
7
8
  var text = "/* test\n123\n456\n789 */";
@@ -43,4 +44,4 @@ describe('removeComments', function () {
43
44
  expect((0, utils_1.removeComments)(text)).toEqual(text);
44
45
  });
45
46
  });
46
- exports.sampleSasProgram = "/**\n @file mv_createfolder.sas\n @brief Creates a viya folder if that foloder does not already exist\n @details Expects oauth token in a global macro variable (default\n ACCESS_TOKEN).\n\n options mprint;\n %mv_createfolder(path=/Public)\n\n\n @param path= The full path of the folder to be created\n @param access_token_var= The global macro variable to contain the access token\n @param grant_type= valid values are \"password\" or \"authorization_code\" (unquoted).\n The default is authorization_code.\n\n\n @version VIYA V.03.04\n @author Allan Bowe\n @source https://github.com/sasjs/core\n\n <h4> SAS Macros </h4>\n @li mf_abort.sas\n @li mf_getuniquefileref.sas\n @li mf_getuniquelibref.sas\n @li mf_isblank.sas\n\n**/\n\n/* This is a comment\nthat spans\nmultiple lines */\n\n%macro mv_createfolder(path=\n ,access_token_var=ACCESS_TOKEN\n ,grant_type=authorization_code\n);";
47
+ exports.sampleSasProgram = "/**\n @file mv_createfolder.sas\n @brief Creates a viya folder if that foloder does not already exist\n @details Expects oauth token in a global macro variable (default\n ACCESS_TOKEN).\n\n options mprint;\n %mv_createfolder(path=/Public)\n\n\n @param path= The full path of the folder to be created\n @param access_token_var= The global macro variable to contain the access token\n @param grant_type= valid values are \"password\" or \"authorization_code\" (unquoted).\n The default is authorization_code.\n\n\n @version VIYA V.03.04\n @author Allan Bowe\n @source https://github.com/sasjs/core\n\n ".concat(utils_2.DependencyHeader.Macro, "\n @li mf_abort.sas\n @li mf_getuniquefileref.sas\n @li mf_getuniquelibref.sas\n @li mf_isblank.sas\n\n**/\n\n/* This is a comment\nthat spans\nmultiple lines */\n\n%macro mv_createfolder(path=\n ,access_token_var=ACCESS_TOKEN\n ,grant_type=authorization_code\n);");
@@ -34,5 +34,4 @@ export declare function getAdapterInstance(target: Target): SASjs;
34
34
  export declare function displaySasjsRunnerError(username: string): void;
35
35
  export declare const loadEnvVariables: (fileName: string) => Promise<void>;
36
36
  export declare function prefixAppLoc(appLoc?: string, path?: string): string | null;
37
- export declare const isWindows: () => boolean;
38
37
  export declare const terminateProcess: (status: number) => never;
@@ -86,7 +86,7 @@ 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.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;
89
+ exports.terminateProcess = 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;
90
90
  var shelljs_1 = __importDefault(require("shelljs"));
91
91
  var path_1 = __importDefault(require("path"));
92
92
  var ora_1 = __importDefault(require("ora"));
@@ -414,7 +414,7 @@ function executeShellScript(filePath, logFilePath) {
414
414
  return __generator(this, function (_b) {
415
415
  switch (_b.label) {
416
416
  case 0:
417
- shellCommand = (0, exports.isWindows)() ? "sh ".concat(filePath) : "bash ".concat(filePath);
417
+ shellCommand = (0, utils_1.isWindows)() ? "sh ".concat(filePath) : "bash ".concat(filePath);
418
418
  result = shelljs_1.default.exec(shellCommand, { silent: true });
419
419
  if (!result.code) return [3 /*break*/, 1];
420
420
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error("Error: ".concat(result.stderr));
@@ -555,8 +555,6 @@ function prefixAppLoc(appLoc, path) {
555
555
  .join(' ');
556
556
  }
557
557
  exports.prefixAppLoc = prefixAppLoc;
558
- var isWindows = function () { return process.platform === 'win32'; };
559
- exports.isWindows = isWindows;
560
558
  var terminateProcess = function (status) {
561
559
  var _a;
562
560
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.info("Process will be terminated with the status code ".concat(status, "."));
package/package.json CHANGED
@@ -50,7 +50,7 @@
50
50
  "@sasjs/adapter": "^3.7.14",
51
51
  "@sasjs/core": "4.15.3",
52
52
  "@sasjs/lint": "1.11.2",
53
- "@sasjs/utils": "2.36.0",
53
+ "@sasjs/utils": "2.39.0",
54
54
  "chalk": "4.1.2",
55
55
  "csv-stringify": "5.6.5",
56
56
  "dotenv": "10.0.0",
@@ -94,5 +94,5 @@
94
94
  "typescript": "4.5.4",
95
95
  "util": "0.12.4"
96
96
  },
97
- "version": "3.8.9"
97
+ "version": "3.10.1"
98
98
  }