
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
#wwpp codegen
npm install wwpm-codegen -g
wwgen -s ./schema/ -o ./output -ns com.tianpeng
a) ./schema/common.js
//common struct difinition(first char is upper case!)
exports.Product = {
id: { type: "integer" },//define a integer type
name: {type: "string" },//define a string type
provider:{//define a ref object type
$ref:"common#ProductProvider"
},
price: {
type: "number",//define a float type
minimum: 0,
exclusiveMinimum: true
}
}
exports.ProductProvider = {
id: { type: "integer" },
name: { type: "string" },
tel: { type: "string" },
email: { type: "string" }
}
b) ./schema/product.js
//resource interface difinition
//path is required, and any http methods:get ,post,delete....
exports.path = "/product/:id"
exports.get = {
schema:{
request:{id:{type:'integer'}},//ignore input define,got from router
response:{
value:{
ref:'common#Product',
},
error:{
type:'integer',
optional:true
}
}
},
action:function(req,resp){
this.value = new Promise(function(resolve,reject){...})
return '/product.xhtml'
}
}
exports.post= {
schema:{
request:{ref:'common#Product',},
response:{
error:{
type:'integer',
optional:true
}
}
},
action:async function(req,resp){
await saveProduct(req.values)
//no view returend and model(this) is stringify as json
}
}
FAQs
webwork plus plus model code gen
The npm package wwpp-model receives a total of 1 weekly downloads. As such, wwpp-model popularity was classified as not popular.
We found that wwpp-model demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.