New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wiki-plugin-assets

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wiki-plugin-assets - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "wiki-plugin-assets",
"version": "0.1.1",
"version": "0.1.2",
"description": "Federated Wiki - Assets Plugin",

@@ -5,0 +5,0 @@ "keywords": [

(function() {
var fs, startServer;
var async, fs, startServer;
fs = require('fs');
async = require('async');
startServer = function(params) {

@@ -11,5 +13,18 @@ var app, argv;

app.get('/plugin/assets/list', function(req, res) {
var path;
var isFile, path;
path = argv.assets + "/" + req.query.assets;
return fs.readdir(path, function(error, files) {
isFile = function(name, done) {
if (name.match(/^\./)) {
return done(false);
}
return fs.stat(path + "/" + name, function(error, stats) {
if (error) {
return res({
error: error
});
}
return done(stats.isFile());
});
};
return fs.readdir(path, function(error, names) {
if (error) {

@@ -20,4 +35,6 @@ return res.json({

}
return res.json({
files: files
return async.filter(names, isFile, function(files) {
return res.json({
files: files
});
});

@@ -24,0 +41,0 @@ });

Sorry, the diff of this file is not supported yet

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