Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webdash

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdash - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

20

api.js

@@ -7,4 +7,4 @@ const express = require('express');

const appRoot = pkgDir.sync(__dirname);
console.log(appRoot);
const appRoot = require('app-root-path').toString() + "/../..";
console.log({appRoot});

@@ -16,4 +16,4 @@ const app = express();

let config = {};
if (fs.existsSync('./webdash.json')) {
config = require('./webdash.json');
if (fs.existsSync(`${appRoot}/webdash.json`)) {
config = require(`${appRoot}/webdash.json`);
}

@@ -23,12 +23,10 @@ return config;

app.locals.appRoot = appRoot;
const bowerJson = require(`${appRoot}/bower.json`);
const bowerJson = require('./bower.json');
const plugins = getPlugins(bowerJson);
for (const plugin of plugins) {
const pluginSrc = require(`./bower_components/${plugin}/api.js`);
const pluginSrc = require(`${appRoot}/bower_components/${plugin}/api.js`);
if (!pluginSrc.routes) {

@@ -53,3 +51,3 @@ continue;

app.get('/api/webdash/info', (req, res) => {
const packageJson = require('./package.json');
const packageJson = require(`${appRoot}/package.json`);
const appName = packageJson.name;

@@ -62,4 +60,4 @@

let config = {};
if (fs.existsSync('./webdash.json')){
config = require('./webdash.json');
if (fs.existsSync(`${appRoot}/webdash.json`)){
config = require(`${appRoot}/webdash.json`);
}

@@ -66,0 +64,0 @@

{
"name": "webdash",
"version": "0.0.8",
"version": "0.0.9",
"license": "MIT",

@@ -5,0 +5,0 @@ "scripts": {

const fs = require('fs');
const pkgDir = require('pkg-dir');
const appRoot = require('app-root-path').toString()
const { COPYFILE_EXCL } = fs.constants;
const appRoot = pkgDir.sync(__dirname);
fs.copyFile(`${__dirname}/webdash-config.json`, `${appRoot}/webdash.json`, COPYFILE_EXCL, (err) => {

@@ -8,0 +6,0 @@ if (err) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc