Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A node.js library that retrieves, parses and provides all schemas from schema.org
A node.js library that retrieves, parses and provides all schemas from schema.org
curl http://npmjs.org/install.sh | sh
[sudo] npm install schema-org
Although there is some debate from the W3C et al right now, when I came across schema.org I thought: "wow, what a gold mine of potential data formats to use in my applications." Then I looked at the site and thought: "Y U NO GIVE ME JSON FORMAT!?!?!" So I wrote this. It uses some other awesome node.js libraries:
Right now, node-schema-org
is implemented as a bin script which can be run after you install this module:
$ read-schema-org
Here is a sample of the output (all of the pre-parsed schemas are available here):
warn: Removing all schemas in /path/to/node-schema-org/schemas
info: Spawning: node /path/to/node-schema-org/list-schemas.js
info: Contacting: http://schema.org/docs/full.html
info: Parsing: http://schema.org/docs/full.html
info: Reading: http://schema.org/docs/full.html
info: Saving results to: /path/to/node-schema-org/schemas/schema-list.json
info: Done creating /path/to/node-schema-org/schemas/schema-list.json from http://schema.org/docs/full.html
info: node /path/to/node-schema-org/list-schemas.js has exited.
info: Spawning: node /path/to/node-schema-org/read-schema.js --type DataType
info: Spawning: node /path/to/node-schema-org/read-schema.js --type Boolean
info: Spawning: node /path/to/node-schema-org/read-schema.js --type Date
(....)
info: Parsing Type: Place
info: Parsing Type: Organization
info: Parsing Type: LocalBusiness
info: Writing schema: /path/to/node-schema-org/schemas/localbusiness.json
info: Done parsing schema: /path/to/node-schema-org/schemas/localbusiness.json
info: node /path/to/node-schema-org/read-schema.js --type LocalBusiness has exited.
info:
info: Done parsing all schemas from schema.org
info: They are located in: /path/to/node-schema-org/schemas
info:
{
"type": "Place",
"bases": {
"Thing": [
{
"name": "description",
"description": "A short description of the item.",
"type": "Text"
},
{
"name": "image",
"description": "URL of an image of the item.",
"type": "URL"
},
{
"name": "name",
"description": "The name of the item.",
"type": "Text"
},
{
"name": "url",
"description": "URL of the item.",
"type": "Text"
}
]
},
"properties": [
{
"name": "address",
"description": "Physical address of the item.",
"type": "PostalAddress"
},
{
"name": "aggregateRating",
"description": "The overall rating, based on a collection of reviews or ratings, of the item.",
"type": "AggregateRating"
},
{
"name": "containedIn",
"description": "The basic containment relation between places.",
"type": "Place"
},
{
"name": "events",
"description": "The events held at this place or organization.",
"type": "Event"
},
{
"name": "faxNumber",
"description": "The fax number.",
"type": "Text"
},
{
"name": "geo",
"description": "The geo coordinates of the place.",
"type": "GeoCoordinates"
},
{
"name": "interactionCount",
"description": "A count of a specific user interactions with this item—for example, 20 UserLikes, 5 UserComments, or 300 UserDownloads. The user interaction type should be one of the sub types of UserInteraction.",
"type": "Text"
},
{
"name": "maps",
"description": "A URL to a map of the place.",
"type": "Text"
},
{
"name": "photos",
"description": "Photographs of this place.",
"type": [
"Photograph",
"ImageObject"
]
},
{
"name": "reviews",
"description": "Review of the item.",
"type": "Review"
},
{
"name": "telephone",
"description": "The telephone number.",
"type": "Text"
}
]
}
FAQs
A node.js library that retrieves, parses and provides all schemas from schema.org
We found that schema-org 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.