![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
coleslaw
Advanced tools
Readme
Coleslaw is a Domain Specific Language (DSL) and related tools, for designing and creating Models.
$ npm install coleslaw --save
This library has 2 main apis:
The compilation step converts your model code into into model definition objects. Next you pass these model definitions into builders.
This library also contains the main Model builder.
// example.cls
model Example {
field auto id eid: string
field name: string
validate eid: uuid
validate name: alphanum, required
authorize allow ? update
child tests: Test // 1:Many relationship with the Test model
}
module.exports = Example
The coleslaw language inherits from ecmascript 5. Which means that it is ecmascript with the addition of the model
statement.
During your build process, or at runtime, you can compile a model into javascript which can then be require
d or eval
'd.
var fs = require('fs')
var path = require('path')
var coleslaw = require('coleslaw')
coleslaw.compile(fs.readFileSync(path.join(__dirname, 'example.cls'), 'utf8'), (err, code) => {
if (err) throw err
eval(code)
})
The resulting code is a plain javascript object representing the model described. This model can be used by various coleslaw builders.
The default model builder can be used to generate Model instances from model defintions. Model instances have standard CRUD (create, retrieve, update, delete) functionality.
model Example {
field value: string
}
var ExampleModel = coleslaw.build(Example, options) // Example is the model definition
var instance = new ExampleModel({ value: 'test' }) // from an existing object
instance.set('value', 'success') // update a field value
instance.save() // Calls dataAccess.update()
In this case we are using the coleslaw.build
example to create a Model type from the Example model definition. Next we can create an instance of ExampleModel and do basic CRUD operations. The model keeps track of the state of the object.
FAQs
Coleslaw is a Domain Specific Language (DSL) and related tools, for designing and creating Models.
The npm package coleslaw receives a total of 0 weekly downloads. As such, coleslaw popularity was classified as not popular.
We found that coleslaw 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.