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

zhike-chaos

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

zhike-chaos - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "zhike-chaos",
"version": "1.0.1",
"version": "1.0.2",
"description": "chaos - boilerplate generator",

@@ -5,0 +5,0 @@ "main": "bin/chaos",

@@ -9,2 +9,3 @@ 'use strict';

const db = require('../src/common/db.js');
const log = require('rainbowlog');

@@ -15,3 +16,2 @@ // 加载models

const dir = fs.readdirSync(cntPath).filter(exclude(['schemas', 'migrations', 'index.js']));
for (let i = 0; i < dir.length; i++) {

@@ -29,8 +29,14 @@ if (fs.statSync(path.join(cntPath, dir[i])).isDirectory()) {

const classMethods = require(path.join(cntPath, dir[i]));
schemas[name].options.classMethods = classMethods;
if (schemas[name] != null) {
schemas[name].options.classMethods = classMethods;
} else {
log.warning(`Has no schema "${name}" but defined methods for it.`);
}
}
const model = db.define(name, schemas[name].attributes, schemas[name].options);
models[name] = model;
}
}
for (const name of Object.keys(schemas)) {
const model = db.define(name, schemas[name].attributes, schemas[name].options);
models[name] = model;
}
};

@@ -37,0 +43,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