
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
capacitor-eventsource
Advanced tools
Because of the way Capacitor plugins are designed, it does not exactly follow the format/signature of the "real" browser EventSource API, but it works similarly.
npm install capacitor-eventsource
npx cap sync
On iOS or for pure-web use, no further steps are needed.
On Android, update your main activity to pull in the EventSource plugin:
import com.raccoonfink.plugins.eventsource.EventSource;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
add(EventSource.class);
}});
}
}
EventSource.configure({
url: 'https://my-sse-url/',
reconnectTime: 1000,
maxReconnectTime: 60000,
idleTimeout: 30000,
});
EventSource.addListener('open', (openResult) => {
console.debug('Connection opened.');
});
EventSource.addListener('message', (messageResult) => {
console.info('I got a message: ' + messageResult.message);
});
EventSource.addListener('error', (errorResult) => {
console.error('Uh-oh: ' + errorResult.error);
});
EventSource.addListener('readyStateChanged', (readyStateChangedResult) => {
console.debug('Ready state changed: ' + readyStateChangedResult.state);
});
note: all times are in milliseconds
FAQs
EventSource (SSE) API for Capacitor
We found that capacitor-eventsource 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.