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

generator-systemic

Package Overview
Dependencies
Maintainers
7
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-systemic - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

generators/app/templates/docs/syncapi.yaml

13

generators/app/index.js

@@ -28,2 +28,14 @@

default: '',
},
{
type: 'input',
name: 'author',
message: 'The service author',
default: 'author',
},
{
type: 'input',
name: 'email',
message: 'The service author contact email',
default: 'author@domain.com',
}];

@@ -53,2 +65,3 @@

copyFiles('docs', 'docs');
copyFiles('config', 'config');

@@ -55,0 +68,0 @@ copyFiles('root', '.');

27

generators/app/templates/config/default.js

@@ -8,21 +8,10 @@ module.exports = {

admin: {
swaggerOptions: {
swaggerDefinition: {
info: {
description: 'Documentation for <%= name %>',
title: '<%= name %>',
version: '1.0.0',
},
host: process.env.SERVICE_ENV || 'localhost:4000',
basePath: '/v1',
produces: ['application/json'],
schemes: ['http'],
securityDefinitions: {
JWT: {
type: 'apiKey',
in: 'header',
name: 'Authorization',
description: '',
},
},
swaggerValidator: {
apiDocEndpoint: '/__/docs/api',
validateRequests: true,
validateResponses: true,
validationEndpoint: '/test',
format: 'yaml',
yaml: {
file: './docs/syncapi.yaml',
},

@@ -29,0 +18,0 @@ },

@@ -1,22 +0,11 @@

const expressSwaggerGenerator = require('express-swagger-generator');
const bodyParser = require('body-parser');
const validator = require('swagger-endpoint-validator');
module.exports = () => {
const start = async ({ manifest = {}, app, config }) => {
const { swaggerOptions } = config;
const expressSwagger = expressSwaggerGenerator(app);
const options = {
swaggerDefinition: {
...swaggerOptions.swaggerDefinition,
},
basedir: __dirname,
files: ['./**/**-routes.js'],
};
expressSwagger(options);
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
/**
* This endpoint serves the manifest
* @route GET /__/manifest
* @group Admin - Everything about admin routes
* @returns 200 - Sucessful response
*/
await validator.init(app, config.swaggerValidator);
app.get('/__/manifest', (req, res) => res.json(manifest));

@@ -23,0 +12,0 @@

@@ -5,2 +5,6 @@ {

"description": "<%= description %>",
"author": {
"name": "<%= author %>",
"email": "<%= email %>"
},
"main": "index.js",

@@ -42,8 +46,7 @@ "scripts": {

"body-parser": "^1.19.0",
"boom": "^7.3.0",
"@hapi/boom": "^9.1.0",
"bunyan": "^1.8.12",
"chalk": "^3.0.0",
"chalk": "^4.0.0",
"confabulous": "^1.7.0",
"debug": "^4.1.1",
"express-swagger-generator": "^1.1.15",
"hogan.js": "^3.0.2",

@@ -54,4 +57,5 @@ "make-manifest": "^1.0.1",

"prepper": "^1.2.0",
"ramda": "^0.26.1",
"systemic": "^3.3.0",
"ramda": "^0.27.0",
"swagger-endpoint-validator": "^2.0.2",
"systemic": "^3.3.7",
"systemic-express": "^1.1.1",

@@ -58,0 +62,0 @@ "systemic-domain-runner": "^1.1.0"

{
"name": "generator-systemic",
"version": "2.2.1",
"version": "2.2.2",
"description": "A generator for a systemic microservice",

@@ -13,3 +13,5 @@ "homepage": "https://github.com/guidesmiths/generator-systemic",

"lint": "eslint .",
"lint:fix": "eslint --fix ."
"lint:fix": "eslint --fix .",
"snyk-protect": "snyk protect",
"prepare": "npm run snyk-protect"
},

@@ -35,4 +37,5 @@ "husky": {

"chalk": "^3.0.0",
"yeoman-generator": "^4.2.0",
"yosay": "^2.0.2"
"yeoman-generator": "^4.10.0",
"yosay": "^2.0.2",
"snyk": "^1.319.0"
},

@@ -57,3 +60,4 @@ "devDependencies": {

"repository": "GuideSmiths Ltd/generator-systemic",
"license": "ISC"
"license": "ISC",
"snyk": true
}
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