Security News
RubyGems.org Adds New Maintainer Role
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.
@financial-times/dotcom-server-app-context
Advanced tools
This package provides tools to define FT app context data and a [JSON schema] definition to validate it with.
This package provides tools to define FT app context data and a JSON schema definition to validate it with.
This package is compatible with Node 8+ and is distributed on npm.
npm install -S @financial-times/dotcom-server-app-context
This package provides a single class which can be configured using options:
import { AppContext } from '@financial-times/dotcom-server-app-context'
const appContext = new AppContext()
The app context instance provides methods to get, set, and validate context data:
appContext.set('appName', 'my-application')
const property = appContext.get('appName') // "my-application"
try {
appContext.validate()
} catch (error) {
console.error('Application context data is invalid:', error)
}
get(property: string): any
Returns the value of the requested property.
set(property: string, value: any)
Sets the value of the specified property.
validate(): boolean
Validates the current data against the schema definition. If the data is invalid this method will throw an error with details of the first error encountered.
The AppContext
class accepts the following parameters. All parameters are optional:
context
An app context data object, see app context data for more information. Defaults to {}
.
Please refer to the JSON schema definition for more information.
FAQs
This package provides tools to define FT app context data and a [JSON schema] definition to validate it with. It is used to define and distribute useful information to other components including ads and tracking.
The npm package @financial-times/dotcom-server-app-context receives a total of 93 weekly downloads. As such, @financial-times/dotcom-server-app-context popularity was classified as not popular.
We found that @financial-times/dotcom-server-app-context demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
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.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.