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

cds-api

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cds-api - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

5

lib/index.js

@@ -25,4 +25,5 @@ /**

load(apiPath) {
load(apiPath, controllerPath) {
this.apiPath = apiPath;
this.controllerPath = controllerPath || path.join(path.dirname(require.main.filename), './controllers');
this.raml = raml1Parser.loadApiSync(apiPath);

@@ -62,3 +63,3 @@ this.apis = this.raml.toJSON();

}).filter((x) => x != null);
routers.push(new Router(item.method, uri, schema, checkOuts, item.description));
routers.push(new Router(item.method, uri, schema, checkOuts, item.description, this.controllerPath));
});

@@ -65,0 +66,0 @@ return routers;

@@ -12,3 +12,4 @@ /**

constructor(method, uri, schema, checkOuts, description) {
constructor(method, uri, schema, checkOuts, description, controllerPath) {
this.controllerPath = controllerPath;
this.path = `${method.toUpperCase()} ${uri}`;

@@ -62,3 +63,3 @@ this.schema = schema;

}
this.cache.import(path.join(path.dirname(require.main.filename), 'controllers', this.controller.path)).then((controller) => {
this.cache.import(path.join(this.controllerPath, this.controller.path)).then((controller) => {
if (!(this.controller.method in controller)) {

@@ -65,0 +66,0 @@ status.status = 404;

2

package.json
{
"name": "cds-api",
"version": "0.0.8",
"version": "0.0.9",
"description": "api with raml power by cds",

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

@@ -10,2 +10,3 @@ /**

const template = fs.readFileSync(path.join(__dirname, 'template', 'api.ejs')).toString();
// api.load(path.join(__dirname, './apis/api.raml'),path.join(__dirname,'./controllers'));
api.load(path.join(__dirname, './apis/api.raml'));

@@ -12,0 +13,0 @@

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