Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nxtedition/agent

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nxtedition/agent - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

47

index.js

@@ -17,7 +17,9 @@ const objectHash = require('object-hash')

return Observable.using(
() => ({
unsubscribe: ds.record.provide(`${hash}:agent.query`, () => Observable.of(query))
}),
() => ds.record.observe(`${hash}:agent${prop ? `.${prop}` : ``}`))
return Observable
.using(
() => ({
unsubscribe: ds.record.provide(`${hash}:agent.query`, () => Observable.of(query))
}),
() => ds.record.observe(`${hash}:agent${prop ? `.${prop}` : ``}`)
)
},

@@ -31,38 +33,3 @@ spawn (query, prop) {

return ds.record.observe(`${hash}:agent${prop ? `.${prop}` : ``}`)
},
provide (matcher) {
const ds = this
return ds.record.provide(`^.+:agent(\\.methods|\\.stats|\\.result)?$`, key => {
const [ , id, prop ] = key.match(/^(.+):agent(?:\.(stats|result|description))?/)
return ds.record
.observe(`${id}:agent.query`)
.filter(x => Object.keys(x).length > 0)
.switchMap(({ type, parent, description }) => {
if (matcher && !matcher({ type, parent, description })) {
return Observable.of(null)
}
if (!description.scene || Object.keys(description.scene).length === 0) {
return Observable.of({ error: 'invalid_scene' })
}
if (!prop) {
return Observable.of({ type, parent })
}
const name = `${objectHash(description)}:agent-${type}`
return Observable
.using(
() => ({
unsubscribe: ds.record.provide(`${name}.query`, () => Observable.of({ parent, description }))
}),
() => ds.record.observe(name)
)
.pluck(prop)
.map(x => x || {})
})
})
}
}

2

package.json
{
"name": "@nxtedition/agent",
"version": "1.0.4",
"version": "1.0.5",
"main": "index.js",

@@ -5,0 +5,0 @@ "author": "Robert Nagy <robert.nagy@boffins.se>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc