Socket
Socket
Sign inDemoInstall

server

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

coverage/lcov-report/favicon.png

96

Gruntfile.js

@@ -1,12 +0,18 @@

const filters = require('./docs/filters.js');
const files = require('./docs/files.js');
const filters = require("./docs/filters.js");
const files = require("./docs/files.js");
const sass = require("node-sass");
const fs = require('fs')
const fs = require("fs");
function extract(src) {
const data = {};
const readme = fs.readFileSync(src + 'README.md', 'utf-8');
data.title = (readme.match(/^\#\s(.+)/mg) || []).map(one => one.replace(/^\#\s/, ''))[0];
if (!data.title) throw new Error('Your file ' + file + '/README.md has no h1 in markdown');
data.sections = (readme.match(/^\#\#[\s](.+)/gm) || []).map(one => one.replace(/^\#\#\s/, ''));
const readme = fs.readFileSync(src + "README.md", "utf-8");
data.title = (readme.match(/^\#\s(.+)/gm) || []).map(one =>
one.replace(/^\#\s/, "")
)[0];
if (!data.title)
throw new Error("Your file " + file + "/README.md has no h1 in markdown");
data.sections = (readme.match(/^\#\#[\s](.+)/gm) || []).map(one =>
one.replace(/^\#\#\s/, "")
);
return data;

@@ -19,7 +25,7 @@ }

if (/documentation/.test(src)) {
const base = { title: 'Introduction', url: '/documentation/' };
const base = { title: "Introduction", url: "/documentation/" };
info.introduction = Object.assign({}, extract(src), base);
}
return require(src).reduce((obj, one) => {
return Object.assign({}, obj, { [one]: extract(src + one + '/') });
return Object.assign({}, obj, { [one]: extract(src + one + "/") });
}, info);

@@ -29,21 +35,17 @@ }

// Generate the documentation final:origin pairs
const transform = dir => files(__dirname + '/' + dir)
.filter(str => /\.html\.pug$/.test(str))
.reduce((docs, one) => {
docs[one.replace(/\.pug$/, '')] = one;
return docs;
}, {});
const transform = dir =>
files(__dirname + "/" + dir)
.filter(str => /\.html\.pug$/.test(str))
.reduce((docs, one) => {
docs[one.replace(/\.pug$/, "")] = one;
return docs;
}, {});
// This builds the library itself
module.exports = function (grunt) {
module.exports = function(grunt) {
// Configuration
grunt.initConfig({
bytesize: {
all: {
src: [
'docs/assets/style.min.css',
'docs/assets/javascript.js'
]
src: ["docs/assets/style.min.css", "docs/assets/javascript.js"]
}

@@ -54,3 +56,3 @@ },

options: { esversion: 6 },
src: ['Gruntfile.js', 'server.js', 'src']
src: ["Gruntfile.js", "server.js", "src"]
},

@@ -63,4 +65,4 @@

port: 3000,
hostname: '*',
base: 'docs',
hostname: "*",
base: "docs",
livereload: true,

@@ -74,4 +76,4 @@ useAvailablePort: false

dist: {
options: { style: 'compressed' },
files: { 'docs/assets/style.min.css': 'docs/assets/style.scss' }
options: { implementation: sass, outputStyle: "compressed" },
files: { "docs/assets/style.min.css": "docs/assets/style.scss" }
}

@@ -88,5 +90,5 @@ },

file,
tutorials: getInfo('./docs/tutorials/'),
documentation: getInfo('./docs/documentation/'),
slug: str => str.toLowerCase().replace(/[^\w]+/g, '-')
tutorials: getInfo("./docs/tutorials/"),
documentation: getInfo("./docs/documentation/"),
slug: str => str.toLowerCase().replace(/[^\w]+/g, "-")
};

@@ -96,3 +98,3 @@ },

},
files: transform('docs')
files: transform("docs")
}

@@ -104,16 +106,16 @@ },

files: [
'Gruntfile.js',
"Gruntfile.js",
// Docs
'docs/**/*.*',
'README.md',
"docs/**/*.*",
"README.md",
// For testing:
'server.js',
'src/**/*.js',
"server.js",
"src/**/*.js",
// To bump versions
'package.js'
"package.js"
],
tasks: ['default'],
tasks: ["default"],
options: {

@@ -127,12 +129,12 @@ spawn: false,

grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-pug');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-bytesize');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-pug");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-bytesize");
grunt.loadNpmTasks("grunt-sass");
grunt.registerTask('build', ['sass', 'pug']);
grunt.registerTask('test', ['bytesize']);
grunt.registerTask('default', ['build', 'test', 'connect']);
grunt.registerTask("build", ["sass", "pug"]);
grunt.registerTask("test", ["bytesize"]);
grunt.registerTask("default", ["build", "test", "connect"]);
};
{
"name": "server",
"version": "1.0.22",
"version": "1.0.23",
"description": "A modern and powerful server for Node.js",

@@ -49,3 +49,3 @@ "homepage": "https://serverjs.io/",

"extend": "^3.0.0",
"hbs": "^4.0.5",
"hbs": "^4.1.0",
"helmet": "^3.9.0",

@@ -71,6 +71,7 @@ "loadware": "^2.0.0",

"grunt-contrib-pug": "^1.0.0",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-sass": "^3.1.0",
"jest": "^25.0.0",
"jstransformer-marked": "^1.0.2",
"node-sass": "^4.13.1",
"picnic": "^6.4.0",

@@ -77,0 +78,0 @@ "request-promises": "^1.0.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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