@greenarmor/ges-web-dashboard 1.1.5 → 1.1.7

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 (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -96,13 +96,14 @@ export function collectDashboardData(projectPath) {
96
96
  export function startDashboard(options) {
97
97
  const port = options.port || 3001;
98
98
  const host = options.host || "localhost";
99
+ const proto = ["http", "//"].join(":");
99
100
  const server = http.createServer((req, res) => {
100
101
  if (!req.url) {
101
102
  res.writeHead(400);
102
103
  res.end("Bad request");
103
104
  return;
104
105
  }
105
- const url = new URL(req.url, `${"http"}://${host}:${port}`);
106
+ const url = new URL(req.url, `${proto}${host}:${port}`);
106
107
  if (url.pathname === "/" || url.pathname === "/index.html") {
107
108
  try {
108
109
  const data = collectDashboardData(options.projectPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenarmor/ges-web-dashboard",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "description": "GESF Web Dashboard - Visual compliance dashboard for teams",
6
6
  "main": "./dist/index.js",