Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vweb-mvc

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vweb-mvc - npm Package Compare versions

Comparing version 1.0.40 to 1.0.41

36

lib/anno/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
var _vwebCore = require("vweb-core");

@@ -13,3 +9,2 @@

* @param name 控制器名字 或者依赖
* @param dependencies 控制器依赖
* @returns {set}

@@ -19,17 +14,5 @@ * @constructor

function Controller(name, dependencies) {
function Controller(name) {
var set = function set(target, property) {
(0, _vwebCore.onlyClass)(property);
if (Array.isArray(name)) {
dependencies = (0, _toConsumableArray2["default"])(name);
name = null;
}
if (Array.isArray(dependencies)) {
(0, _vwebCore.setAnnotation)(target, {
dependencies: dependencies
});
}
var annotation = {

@@ -54,3 +37,3 @@ name: name || _vwebCore.util.uncapitalize(target.name),

Controller.type = 'controller';
Controller.keys = ['name', 'dependencies'];
Controller.keys = ['name'];
var HTTP_METHODS = ['all', 'get', 'post', 'put', 'delete'];

@@ -160,3 +143,2 @@ /**

* @param name 拦截器的名字 或者依赖对象
* @param dependencies 需要注入的对象,根据名字注入
* @returns {Function}

@@ -166,3 +148,3 @@ * @constructor

function Interceptor(path, name, dependencies) {
function Interceptor(path, name) {
if (typeof path !== 'string') {

@@ -174,14 +156,2 @@ throw new Error("Interceptor ".concat(path.constructor.name, " must be set path"));

(0, _vwebCore.onlyClass)(property);
if (Array.isArray(name)) {
dependencies = (0, _toConsumableArray2["default"])(name);
name = null;
}
if (Array.isArray(dependencies)) {
(0, _vwebCore.setAnnotation)(target, {
dependencies: dependencies
});
}
var annotation = {

@@ -188,0 +158,0 @@ name: name || _vwebCore.util.uncapitalize(target.name),

2

package.json
{
"name": "vweb-mvc",
"version": "1.0.40",
"version": "1.0.41",
"description": "mvc ",

@@ -5,0 +5,0 @@ "main": "./lib/index",

@@ -8,16 +8,8 @@

* @param name 控制器名字 或者依赖
* @param dependencies 控制器依赖
* @returns {set}
* @constructor
*/
function Controller(name, dependencies) {
function Controller(name) {
const set = (target, property) => {
onlyClass(property);
if (Array.isArray(name)) {
dependencies = [...name];
name = null;
}
if(Array.isArray(dependencies)) {
setAnnotation(target, {dependencies});
}
let annotation = {

@@ -39,3 +31,3 @@ name: name || util.uncapitalize(target.name),

Controller.type = 'controller';
Controller.keys = ['name', 'dependencies'];
Controller.keys = ['name'];

@@ -125,7 +117,6 @@ const HTTP_METHODS = ['all', 'get', 'post', 'put', 'delete'];

* @param name 拦截器的名字 或者依赖对象
* @param dependencies 需要注入的对象,根据名字注入
* @returns {Function}
* @constructor
*/
function Interceptor(path, name, dependencies) {
function Interceptor(path, name) {
if(typeof path !== 'string') {

@@ -136,9 +127,2 @@ throw new Error(`Interceptor ${path.constructor.name} must be set path`);

onlyClass(property);
if (Array.isArray(name)) {
dependencies = [...name];
name = null;
}
if(Array.isArray(dependencies)) {
setAnnotation(target, {dependencies});
}
let annotation = {

@@ -266,2 +250,2 @@ name: name || util.uncapitalize(target.name),

module.exports = {Controller, RequestMapping, Interceptor, GetMapping, PostMapping, PutMapping, DeleteMapping, AppScope, Validator, RequestParam, ResponseBody};
module.exports = {Controller, RequestMapping, Interceptor, GetMapping, PostMapping, PutMapping, DeleteMapping, AppScope, Validator, RequestParam, ResponseBody};
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