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.
@dasmeta/event-manager-platform-helper
Advanced tools
yarn add @dasmeta/event-manager-platform-helper
DEPLOYER_PLATFORM=gcf
DATABASE_URL_EVENT = mongodb://username:password@localhost:27017/event?authSource=admin
// example1.js
const platformHelper = require('@dasmeta/event-manager-platform-helper')
const doThing = () => {
console.log('function executed.')
}
const handler = platformHelper.wrapHandler(doThing)
DEPLOYER_PLATFORM=gcf node example1.js
// example2.js
const platformHelper = require('@dasmeta/event-manager-platform-helper')
const doThing = () => {
console.log('function executed.')
}
const handler = platformHelper.wrapHandler(doThing, 'gcf')
node example2.js
src/adapter/platforms/fission.js
to new adapter file eg. src/adapter/platforms/awsLambda.js
const platformHelper = require('@dasmeta/event-manager-platform-helper')
async function test(platform) {
const log = (...all) => {
console.log(`${platform}\n`, ...all, "\n");
}
const mockHandler = (data, context) => {
log('function executed.\n', {data, context})
}
const wrappedHandler = platformHelper.wrapHandler(mockHandler, platform)
const event = {
eventId: 123,
traceId: 'aabbccddee',
data: {application: "data"},
dataSource: "something",
subscription: ""
}
const payloads = {
gcf: [
{ data: Buffer.from(JSON.stringify(event)).toString('base64')},
{
resource: {
name: 'some-namespace/some-name'
}
}
],
fission: [{
request: {
get: (key) => {
log(`must get '${key}'`);
return `${key} data`
},
body: event
}
}]
}
const rs = await wrappedHandler(...payloads[platform])
log("rs", rs)
}
test('gcf');
test('fission');
FAQs
Event platform helper
The npm package @dasmeta/event-manager-platform-helper receives a total of 0 weekly downloads. As such, @dasmeta/event-manager-platform-helper popularity was classified as not popular.
We found that @dasmeta/event-manager-platform-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.