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

microgen-client

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microgen-client - npm Package Compare versions

Comparing version 0.0.7 to 0.0.9

46

index.js

@@ -59,20 +59,18 @@ const https = require('https');

if(!clientId) {
res.send({ message: "invalid hostname" })
res.send("_")
return;
}
const day = new Date().getDate();
const day = new Date().getDay();
if(day !== app.get("microgen")) {
console.log(day);
console.log(app.get("microgen"));
client(clientId)
.then(res => {
if(req.hostname.includes(res.hostname)) {
if(req.hostname.includes(res.domain)) {
app.set("microgen", day);
next();
} else {
res.send({ message: "invalid hostname" })
res.send("_")
return;

@@ -82,3 +80,3 @@ }

.catch(err => {
res.send({ message: "invalid hostname" })
res.send("_")
return;

@@ -91,6 +89,38 @@ })

const frontendMiddleware = ({ app, clientId }) => (req, res, next) => {
if(!clientId) {
res.send("_")
return;
}
const day = new Date().getDay();
if(day !== app.get("microgen")) {
client(clientId)
.then(res => {
if(req.hostname == res.hostname ) {
app.set("microgen", day);
next();
} else {
res.send("_")
return;
}
})
.catch(err => {
res.send("_")
return;
})
} else {
next();
}
}
module.exports = {
generate,
middleware
middleware,
frontendMiddleware
}

2

package.json
{
"name": "microgen-client",
"version": "0.0.7",
"version": "0.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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