generator-systemic
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -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', '.'); |
@@ -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 | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20647
42
4
416
+ Addedsnyk@^1.319.0
+ Added@sentry-internal/tracing@7.120.3(transitive)
+ Added@sentry/core@7.120.3(transitive)
+ Added@sentry/integrations@7.120.3(transitive)
+ Added@sentry/node@7.120.3(transitive)
+ Added@sentry/types@7.120.3(transitive)
+ Added@sentry/utils@7.120.3(transitive)
+ Added@types/node@22.12.0(transitive)
+ Addedboolean@3.2.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddetect-node@2.1.0(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes6-error@4.1.1(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedglobal-agent@3.0.0(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedimmediate@3.0.6(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedlie@3.1.1(transitive)
+ Addedlocalforage@1.10.0(transitive)
+ Addedmatcher@3.0.0(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedroarr@2.15.4(transitive)
+ Addedsemver@7.7.0(transitive)
+ Addedsemver-compare@1.0.0(transitive)
+ Addedserialize-error@7.0.1(transitive)
+ Addedsnyk@1.1295.2(transitive)
+ Addedsprintf-js@1.1.3(transitive)
+ Addedtype-fest@0.13.1(transitive)
- Removed@types/node@22.13.1(transitive)
- Removedsemver@7.7.1(transitive)
Updatedyeoman-generator@^4.10.0