Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@swdotcom/editor-flow
Advanced tools
Handles document change events
yarn add editor-flow
import { EditorFlow, EditorType, FlowEventType, ProjectChangeInfo, VSCodeInterface } from 'editor-flow';
const iface: VSCodeInterface = {
disposable: Disposable, // vscode disposable
window: window, // vscode window namespace
workspace: workspace // vscode workspace namespace
};
const editorFlow:EditorFlow = EditorFlow.getInstance(EditorType.VSCODE, iface);
const emitter: any = editorFlow.getEmitter();
emitter.on('editor_flow_data', (data: any) => {
switch(data.flow_event_type) {
case FlowEventType.CLOSE:
this.fileCloseHandler(data.event);
break;
case FlowEventType.OPEN:
this.fileOpenHandler(data.event);
break;
case FlowEventType.SAVE:
this.fileSaveHandler(data.event);
break;
case FlowEventType.UNFOCUS:
this.windowStateChangeHandler(data.event);
break;
case FlowEventType.FOCUS:
this.windowStateChangeHandler(data.event);
break;
case FlowEventType.THEME:
this.themeKindChangeHandler(data.event);
break;
case FlowEventType.KPM:
// get the project_change_info attribute and post it
this.kpmHandler(data.project_change_info);
break;
}
});
...
private kpmHandler(
projectChangeInfo: ProjectChangeInfo) {
this.tracker.trackCodeTimeEvent(projectChangeInfo);
}
FAQs
Editor change event handler
The npm package @swdotcom/editor-flow receives a total of 11 weekly downloads. As such, @swdotcom/editor-flow popularity was classified as not popular.
We found that @swdotcom/editor-flow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.