-
Notifications
You must be signed in to change notification settings - Fork 638
feat: added keyboard and mouse listener #8909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9666eef
feat: added keyboard and mouse listener
syns2191 2b8f27d
feat: added package desktop-activity and implement to gauzy agent
syns2191 830b854
chore: added package desktop-activity to app with already imported de…
syns2191 4e4045e
style: fix style coding and type correction
syns2191 f2ffe59
Merge branch 'develop' of https://github.com/ever-co/ever-gauzy into …
syns2191 d530929
fix: all code suggestion
syns2191 f5df280
Merge branch 'develop' into feat/added-keyboard-mouse-listener
evereq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -570,6 +570,8 @@ | |
"lparam", | ||
"refcon", | ||
"cflags", | ||
"uiohook", | ||
"gauzyagent", | ||
"PostHog", | ||
"posthog", | ||
"autocapture" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# @gauzy/desktop-activity | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
syns2191 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Building | ||
|
||
Run `yarn nx build desktop-activity` to build the library. | ||
|
||
## Running unit tests | ||
|
||
Run `yarn nx test desktop-activity` to execute the unit tests via [Jest](https://jestjs.io). | ||
|
||
## Publishing | ||
|
||
After building your library with `yarn nx build desktop-activity`, go to the dist folder `dist/packages/desktop-activity` and run `npm publish`. | ||
|
||
## Installation | ||
|
||
Install the Desktop Activity Library using your preferred package manager: | ||
|
||
```bash | ||
npm install @gauzy/desktop-activity | ||
# or | ||
yarn add @gauzy/desktop-activity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const baseConfig = require('../../.eslintrc.json'); | ||
|
||
module.exports = [ | ||
...baseConfig, | ||
{ | ||
files: ['**/*.json'], | ||
rules: { | ||
'@nx/dependency-checks': [ | ||
'error', | ||
{ | ||
ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'] | ||
} | ||
] | ||
}, | ||
languageOptions: { | ||
parser: require('jsonc-eslint-parser') | ||
} | ||
} | ||
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
displayName: 'desktop-activity', | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }] | ||
}, | ||
syns2191 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
moduleFileExtensions: ['ts', 'js'], | ||
coverageDirectory: '../../coverage/packages/desktop-activity' | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "@gauzy/desktop-activity", | ||
"version": "0.1.0", | ||
"description": "Ever Gauzy Platform desktop activity", | ||
"author": { | ||
"name": "Ever Co. LTD", | ||
"email": "[email protected]", | ||
"url": "https://ever.co" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ever-co/ever-gauzy", | ||
"directory": "packages/desktop-activity" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ever-co/ever-gauzy/issues" | ||
}, | ||
"homepage": "https://ever.co", | ||
"license": "AGPL-3.0", | ||
"private": true, | ||
"type": "commonjs", | ||
"main": "./src/index.js", | ||
syns2191 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"typings": "./src/index.d.ts", | ||
"scripts": { | ||
"lib:build": "yarn nx build desktop-activity", | ||
"lib:build:prod": "yarn nx build desktop-activity", | ||
"lib:watch": "yarn nx build desktop-activity --watch" | ||
}, | ||
"dependencies": { | ||
"moment": "^2.30.1", | ||
"uiohook-napi": "^1.5.4", | ||
"tslib": "^2.6.2" | ||
}, | ||
syns2191 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"devDependencies": { | ||
"@types/node": "^20.14.9", | ||
"@types/unzipper": "^0.10.9", | ||
"electron": "^30.0.1" | ||
}, | ||
"keywords": [ | ||
"electron", | ||
"desktop", | ||
"desktop-activity", | ||
"ever-gauzy", | ||
"typescript", | ||
"sqlite", | ||
"knex", | ||
"embedded-queue", | ||
"moment", | ||
"offline-mode", | ||
"active-window", | ||
"file-management", | ||
"enterprise", | ||
"platform", | ||
"open-source", | ||
"agpl" | ||
], | ||
"engines": { | ||
"node": ">=20.11.1", | ||
"yarn": ">=1.22.19" | ||
}, | ||
"sideEffects": false | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "desktop-activity", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "packages/desktop-activity/src", | ||
"projectType": "library", | ||
"release": { | ||
"version": { | ||
"generatorOptions": { | ||
"packageRoot": "dist/{projectRoot}", | ||
"currentVersionResolver": "git-tag" | ||
} | ||
} | ||
}, | ||
"tags": [], | ||
"implicitDependencies": [], | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/js:tsc", | ||
"outputs": ["{options.outputPath}"], | ||
"options": { | ||
"outputPath": "dist/packages/desktop-activity", | ||
"main": "packages/desktop-activity/src/index.ts", | ||
syns2191 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"tsConfig": "packages/desktop-activity/tsconfig.lib.json", | ||
"assets": ["packages/desktop-activity/*.md"] | ||
} | ||
}, | ||
"nx-release-publish": { | ||
"options": { | ||
"packageRoot": "dist/{projectRoot}" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint" | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "packages/desktop-activity/jest.config.ts" | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './lib/kb-mouse'; | ||
export * from './lib/desktop-event-counter'; | ||
export * from './lib/kb-mouse-event-counter'; |
1 change: 1 addition & 0 deletions
1
...ktop-lib/src/lib/desktop-event-counter.ts → ...activity/src/lib/desktop-event-counter.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
import { powerMonitor } from 'electron'; | ||
|
||
export class DesktopEventCounter { | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.