Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
At this moment goal of this module is to convert RAML files into JSON structures, which can be easily parsed and processed by type bindings module.
#RAML2TS
At this moment goal of this module is to convert RAML files into JSON structures, which can be easily parsed and processed by type bindings module.
In a few words it performs following transformations:
One example of transform is:
#%RAML 1.0 Library
uses:
core: coreLib.raml
types:
StudentClass:
properties:
name: string
teacherFullName: string
courseDescription: core.text
numberOfHours:
type: integer
minimum: 1
maximum: 192
transforms to:
{
"StudentClass": {
"id": "StudentClass",
"type": "object",
"properties": {
"name": {
"type": "string",
"required": true
},
"teacherFullName": {
"type": "string",
"required": true
},
"courseDescription": {
"type": "text",
"required": true
},
"numberOfHours": {
"type": "integer",
"minimum": 1,
"maximum": 192,
"required": true
}
}
}
}
in a more complex case:
#%RAML 1.0 Library
uses:
core: coreLib.raml
types:
Party:
properties:
name:
type: string
leaders:
(core.enumValues): "$.members"
members:
properties:
//:
type: string
displayName: Class
enum: ["Warrior", "Mage", "Priest", "Ranger"]
transforms to something like
{
"Party": {
"id": "Party",
"type": "object",
"properties": {
"name": {
"type": "string",
"required": true
},
"leaders": {
"type": "string",
"enumValues": "$.members",
"required": true
},
"members": {
"type": "map",
"componentType": {
"type": "string",
"displayName": "Class",
"enum": [
"Warrior",
"Mage",
"Priest",
"Ranger"
]
},
"required": true
}
}
}
}
Used format is not thought as final, it is just a very temporary solution to play with.
Actually this format is pretty similar to the one used in JS Parser now, (with except of addition of operations related connections, and more simple way to access type information, so it mmight be a good idea to check if it might be done in a more elegant way basing on latest changes in parser serialization)
Main function of the module is: parseToJSON(url: string, f: (v: ProcessingResult) => void): void
which actually performs transformation
It is planned to add typescript client gen using this representation as internal information storage to this repository later.
FAQs
At this moment goal of this module is to convert RAML files into JSON structures, which can be easily parsed and processed by type bindings module.
The npm package raml2ts receives a total of 0 weekly downloads. As such, raml2ts popularity was classified as not popular.
We found that raml2ts 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.