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

astroboy

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astroboy - npm Package Compare versions

Comparing version 3.0.0-beta.1 to 3.0.0-rc.0

4

loader/AstroboyRouterLoader.js

@@ -8,3 +8,5 @@ "use strict";

const Ajv = require('ajv');
const ajv = new Ajv();
const ajv = new Ajv({
coerceTypes: true,
});
function check(data) {

@@ -11,0 +13,0 @@ return Object.prototype.toString.call(data) === '[object Object]' && Object.keys(data).length > 0;

{
"name": "astroboy",
"version": "3.0.0-beta.1",
"version": "3.0.0-rc.0",
"description": "Astroboy(阿童木)is a Nodejs SFB(Separation of Front and Back ends) framework, built on koa2.",

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

@@ -11,2 +11,3 @@ "use strict";

console.log('开始注册路由 ===>');
let counter = 0;
app.routers.forEach((router) => {

@@ -17,3 +18,7 @@ for (let i = 0; i < router.method.length; i++) {

const path = router.path[j];
console.log(`注册路由:${method} ${path} ==> ${router.controllerName}:${router.controllerMethods.join(' > ')}`);
const name = router.name || '';
const controllerName = router.controllerName;
const controllerMethods = router.controllerMethods || [];
counter++;
console.log(`${name}:${method} ${path} ==> ${controllerName}:${controllerMethods.join(' > ')}`);
koaRouter[method](router.name, path, async function (ctx, next) {

@@ -69,3 +74,3 @@ if (router.compiledSchema.header) {

});
console.log(`所有路由注册成功,共注册 ${app.routers.length} 个路由\n`);
console.log(`所有路由注册成功,共注册 ${counter} 个路由\n`);
let fn = compose([koaRouter.routes(), koaRouter.allowedMethods()]);

@@ -72,0 +77,0 @@ fn._name = 'astroboy-router';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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