Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
electron-store-vuex-sync
Advanced tools
自动同步electron-store
和vuex
const { ipcMain } = require('electron')
const Store = require('electron-store');
const { injectStore } = require('electron-store-vuex-sync')
const store = new Store();
injectStore(ipcMain, store)
import Vuex from 'vuex'
import { getVuexStoreConfig } from 'electron-store-vuex-sync'
import { ipcRenderer } from 'electron'
const store = new Vuex.Store(getVuexStoreConfig(ipcRenderer))
return store
electron
的ipcMain
用来注入监听事件electron-store
创建的store
store
的名字需要不同页面同步不同store
的时候需要,可选返回传入的store
electron
的ipcRenderer
用来注入监听事件electron-store
的schema
可以根据这个自动初始化,省去手动的问题store
的名字需要不同页面同步不同store
的时候需要,可选如果使用schema
来初始化的话,vuex
的mutation
为set:schema的key
只会生成对应的vuex
配置,像是state
,action
这些你可以通过解构等方法把自己的方法注入进去
因为electron-store
默认名字为config
,所以vuex
用来初始化和同步的事件前缀也默认为config:
background
的注入请放在最顶上
FAQs
auto sync electron-store and vuex
The npm package electron-store-vuex-sync receives a total of 0 weekly downloads. As such, electron-store-vuex-sync popularity was classified as not popular.
We found that electron-store-vuex-sync 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.