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

@live-change/user-service

Package Overview
Dependencies
Maintainers
1
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/user-service - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

22

index.js

@@ -43,2 +43,4 @@ const app = require("@live-change/framework").app()

async execute({ user, session }, { client, service }, emit) {
const userData = await User.get(user)
if(!userData) throw 'userNotFound'
emit({

@@ -89,3 +91,23 @@ type: "signedIn",

definition.action({
name: 'deleteMe',
properties: {
},
access: (params, { client }) => {
return !!client.user
},
async execute({ }, { client, service }, emit) {
const user = client.user
await service.trigger({
type: 'userDeleted',
user
})
emit([{
type: "deleted",
user
}])
return user
}
})
module.exports = definition

@@ -75,2 +75,15 @@ const definition = require('./definition.js')

definition.event({
name: "deleted",
properties: {
user: {
type: User
}
},
async execute({ user }) {
const authenticated = await AuthenticatedUser.indexRangeGet('byUser', user)
await Promise.all([ User.delete(user) ].concat(authenticated.map(auth => AuthenticatedUser.delete(auth))))
}
})
module.exports = { User, AuthenticatedUser }

4

package.json
{
"name": "@live-change/user-service",
"version": "0.2.10",
"version": "0.2.11",
"description": "",

@@ -27,3 +27,3 @@ "main": "index.js",

},
"gitHead": "ae86524e5ac7052eb6b6e7b34e319373b6bdef23"
"gitHead": "2b95c89678f276d6b3a039652169c5fc819df8df"
}
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