@sasjs/cli 4.11.1 → 4.12.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.
@@ -255,7 +255,9 @@ function getBuildInfo(target, streamWeb) {
255
255
  return [4 /*yield*/, getBuildVars(target)];
256
256
  case 10:
257
257
  buildVars = _a.sent();
258
- return [2 /*return*/, "\n/**\n * The appLoc represents the metadata or SAS Drive location of the app you\n * are about to deploy\n *\n * To set an alternative appLoc, simply populate the appLoc variable prior\n * to running this program, eg:\n *\n * %let apploc=/my/apploc;\n * %inc thisfile;\n *\n */\n\n%global appLoc serverName;\n%let compiled_apploc=".concat(appLoc, ";\n\n").concat(serverType === utils_1.ServerType.Sas9 ? "%let serverName=".concat(serverName, ";") : '', "\n\n%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));\n\n%let sasjs_clickmeservice=clickme;\n%let syscc=0;\noptions ps=max nonotes nosgen nomprint nomlogic nosource2 nosource noquotelenmax;\n/* user supplied build vars */\n").concat(buildVars, "\n/* user supplied build vars end */\n/* system macro dependencies for build process */\n").concat(dependenciesContent, "\n/* system macro dependencies for build process end*/\n/* system macros for build process */\n").concat((0, utils_1.removeHeader)(buildConfig), "\n/* system macros for build process end */\n")];
258
+ return [2 /*return*/, "\n/**\n * The appLoc represents the metadata or SAS Drive location of the app you\n * are about to deploy\n *\n * To set an alternative appLoc, simply populate the appLoc variable prior\n * to running this program, eg:\n *\n * %let apploc=/my/apploc;\n * %inc thisfile;\n *\n */\n\n%global appLoc;\n%let compiled_apploc=".concat(appLoc, ";\n%let appLoc=%sysfunc(coalescec(&appLoc,&compiled_apploc));\n\n\n").concat(serverType === utils_1.ServerType.Sas9
259
+ ? "\n/**\n * The serverName represents the SAS 9 logical server context\n * There is no programmatic (SAS code) way to obtain this\n * So it is taken from the sasjsconfig file OR supplied at runtime, eg:\n * \n * %let apploc=/my/apploc;\n * %let serverName=SASAppDC;\n * %inc thisfile;\n * \n * /\n\n%global serverName;\n%let compiled_serverName=".concat(serverName, ";\n%let serverName=%sysfunc(coalescec(&serverName,&compiled_serverName));\n")
260
+ : '', "\n\n%let sasjs_clickmeservice=clickme;\n%let syscc=0;\noptions ps=max nonotes nosgen nomprint nomlogic nosource2 nosource noquotelenmax;\n/* user supplied build vars */\n").concat(buildVars, "\n/* user supplied build vars end */\n/* system macro dependencies for build process */\n").concat(dependenciesContent, "\n/* system macro dependencies for build process end*/\n/* system macros for build process */\n").concat((0, utils_1.removeHeader)(buildConfig), "\n/* system macros for build process end */\n")];
259
261
  }
260
262
  });
261
263
  });
@@ -6,3 +6,4 @@ export declare const getStyleTags: (parsedHtml: JSDOM) => HTMLLinkElement[];
6
6
  export declare const getFaviconTags: (parsedHtml: JSDOM) => HTMLLinkElement[];
7
7
  export declare const getImgTags: (parsedHtml: JSDOM) => HTMLImageElement[];
8
8
  export declare const getSourceTags: (parsedHtml: JSDOM) => HTMLSourceElement[];
9
+ export declare const getManifestTags: (parsedHtml: JSDOM) => HTMLLinkElement[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSourceTags = exports.getImgTags = exports.getFaviconTags = exports.getStyleTags = exports.getStyleInPageTags = exports.getScriptTags = exports.getSasjsTags = void 0;
3
+ exports.getManifestTags = exports.getSourceTags = exports.getImgTags = exports.getFaviconTags = exports.getStyleTags = exports.getStyleInPageTags = exports.getScriptTags = exports.getSasjsTags = void 0;
4
4
  var getSasjsTags = function (parsedHtml) {
5
5
  return Array.from(parsedHtml.window.document.getElementsByTagName('sasjs'));
6
6
  };
@@ -29,3 +29,7 @@ var getSourceTags = function (parsedHtml) {
29
29
  return Array.from(parsedHtml.window.document.getElementsByTagName('source')).filter(function (s) { return s.getAttribute('src'); });
30
30
  };
31
31
  exports.getSourceTags = getSourceTags;
32
+ var getManifestTags = function (parsedHtml) {
33
+ return Array.from(parsedHtml.window.document.getElementsByTagName('link')).filter(function (s) { return s.getAttribute('rel') === 'manifest'; });
34
+ };
35
+ exports.getManifestTags = getManifestTags;
@@ -76,7 +76,7 @@ var updateSasjsTag_1 = require("./updateSasjsTag");
76
76
  var updateAllTags = function (parsedHtml, target, _a) {
77
77
  var webSourcePathFull = _a.webSourcePathFull, destinationPath = _a.destinationPath, serverType = _a.serverType, assetPathMap = _a.assetPathMap;
78
78
  return __awaiter(void 0, void 0, void 0, function () {
79
- var assetsNotFound, sasjsTags, scriptTags, styleExternalTags, styleInPageTags, styleTags, faviconTags, imgTags, sourceTags, srcTags, notFoundErrors;
79
+ var assetsNotFound, sasjsTags, scriptTags, styleExternalTags, styleInPageTags, styleTags, faviconTags, manifestTags, imgTags, sourceTags, srcTags, notFoundErrors;
80
80
  return __generator(this, function (_b) {
81
81
  switch (_b.label) {
82
82
  case 0:
@@ -122,6 +122,15 @@ var updateAllTags = function (parsedHtml, target, _a) {
122
122
  assetsNotFound.push(error);
123
123
  }
124
124
  });
125
+ manifestTags = (0, getTags_1.getManifestTags)(parsedHtml);
126
+ manifestTags.forEach(function (tag) {
127
+ try {
128
+ (0, updateLinkTag_1.updateLinkTag)(tag, assetPathMap);
129
+ }
130
+ catch (error) {
131
+ assetsNotFound.push(error);
132
+ }
133
+ });
125
134
  imgTags = (0, getTags_1.getImgTags)(parsedHtml);
126
135
  sourceTags = (0, getTags_1.getSourceTags)(parsedHtml);
127
136
  srcTags = __spreadArray(__spreadArray([], __read(imgTags), false), __read(sourceTags), false);
package/build/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- require = require('esm')(module /*, options*/);
4
3
  require('./cli').cli(process.argv);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "start:ci": "npm run build && npm run set:permissions",
12
12
  "start": "nodemon --watch \"src/**/*\" --exec \"npm run build && npm run set:permissions\"",
13
13
  "set:permissions": "node -e \"require('fs').chmodSync('build/index.js', '755')\"",
14
- "build": "rimraf build && tsc -p . && npm run copy:files",
14
+ "build": "npx rimraf build && tsc -p . && npm run copy:files",
15
15
  "copy:files": "copyfiles -u 1 ./src/config.json ./build/ && npm run copy:doxy",
16
16
  "copy:doxy": "copyfiles -u 2 src/doxy/* build/doxy/",
17
17
  "test": "npm run test:mocked && npm run test:server",
@@ -51,14 +51,13 @@
51
51
  "access": "public"
52
52
  },
53
53
  "dependencies": {
54
- "@sasjs/adapter": "4.10.1",
55
- "@sasjs/core": "4.46.3",
56
- "@sasjs/lint": "2.3.1",
57
- "@sasjs/utils": "3.4.0",
54
+ "@sasjs/adapter": "4.11.3",
55
+ "@sasjs/core": "4.54.0",
56
+ "@sasjs/lint": "2.4.3",
57
+ "@sasjs/utils": "3.5.2",
58
58
  "adm-zip": "0.5.10",
59
59
  "chalk": "4.1.2",
60
60
  "dotenv": "16.0.3",
61
- "esm": "3.2.25",
62
61
  "find": "0.3.0",
63
62
  "js-base64": "3.7.5",
64
63
  "jsdom": "22.1.0",
@@ -68,17 +67,15 @@
68
67
  "node-graphviz": "0.1.1",
69
68
  "node-powershell": "5.0.1",
70
69
  "ora": "5.4.1",
71
- "rimraf": "3.0.2",
72
70
  "shelljs": "0.8.5",
73
71
  "ssl-root-cas": "1.3.1",
74
72
  "xml": "1.0.1",
75
73
  "yargs": "17.6.2"
76
74
  },
77
75
  "devDependencies": {
78
- "@babel/core": "7.21.0",
79
- "@babel/preset-env": "7.20.2",
80
- "@babel/preset-typescript": "7.21.0",
81
- "@compodoc/compodoc": "1.1.21",
76
+ "@babel/core": "7.22.0",
77
+ "@babel/preset-env": "7.22.0",
78
+ "@babel/preset-typescript": "7.22.5",
82
79
  "@types/adm-zip": "0.5.0",
83
80
  "@types/debug": "4.1.7",
84
81
  "@types/find": "0.2.1",
@@ -90,7 +87,7 @@
90
87
  "@types/shelljs": "0.8.9",
91
88
  "@types/url-parse": "1.4.4",
92
89
  "@types/xml": "1.0.6",
93
- "babel-jest": "29.4.3",
90
+ "babel-jest": "29.7.0",
94
91
  "copyfiles": "2.4.1",
95
92
  "jest": "29.4.3",
96
93
  "jest-cli": "29.4.3",
@@ -104,5 +101,5 @@
104
101
  "typescript": "4.9.5",
105
102
  "util": "0.12.4"
106
103
  },
107
- "version": "4.11.1"
104
+ "version": "4.12.0"
108
105
  }