Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 685697e470 | |||
| 94b058a6e7 | |||
| a896a8e7fc | |||
| a05d2218c6 | |||
| 8908a32a68 | |||
| 695d1c1b50 | |||
| 7da16a82e5 | |||
| c297beb494 | |||
| da5bbfe1a8 | |||
| 5b116e016c | |||
| 39b5d46122 | |||
| fa606b745d | |||
| b98b3db80b | |||
| 44b8302801 | |||
| b16b775efb | |||
| f332115e6a | |||
| 24a26551ce | |||
| ef8c92a4b4 | |||
| bf88d3526f | |||
| c70435e58a | |||
| 852901b3d4 | |||
| 569b8e9fb8 | |||
| 8cdded7043 | |||
| 7513901a40 | |||
| 93e52dff3d | |||
| cc613f0ba2 | |||
| 89c79b096f |
@@ -18,6 +18,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- npm install -g vsce
|
- npm install -g vsce
|
||||||
- npm ci
|
- npm ci
|
||||||
|
- xvfb-run -a npm test
|
||||||
- vsce package
|
- vsce package
|
||||||
|
|
||||||
- name: gitea_release
|
- name: gitea_release
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,4 @@
|
|||||||
out
|
out
|
||||||
dist
|
|
||||||
node_modules
|
node_modules
|
||||||
.vscode-test/
|
.vscode-test/
|
||||||
*.vsix
|
*.vsix
|
||||||
@@ -31,3 +30,6 @@ coverage/
|
|||||||
.config/
|
.config/
|
||||||
data/
|
data/
|
||||||
.aider*
|
.aider*
|
||||||
|
/dist/
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
.twig-cs-fixer.cache
|
||||||
|
|||||||
+2
-1
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"*.js": ["eslint --fix", "prettier --write"],
|
"*.js": ["eslint --fix", "prettier --write"],
|
||||||
|
"*.ts": ["eslint --fix", "prettier --write"],
|
||||||
"*.css": ["prettier --write"],
|
"*.css": ["prettier --write"],
|
||||||
"*.jsx": ["prettier --write"],
|
"*.jsx": ["prettier --write"],
|
||||||
"*.html.twig": ["twig-cs-fixer lint --fix", "myhtmlvalidate -q"],
|
"*.tsx": ["prettier --write"],
|
||||||
"*.php": ["php-cs-fixer fix --config .php-cs-fixer.php"],
|
"*.php": ["php-cs-fixer fix --config .php-cs-fixer.php"],
|
||||||
"Dockerfile": ["hadolint --ignore DL3002 --ignore DL3003 --ignore DL3008 --ignore DL3013 --ignore DL3016 --ignore DL3022"],
|
"Dockerfile": ["hadolint --ignore DL3002 --ignore DL3003 --ignore DL3008 --ignore DL3013 --ignore DL3016 --ignore DL3022"],
|
||||||
"*.md": ["markdownlint --fix"],
|
"*.md": ["markdownlint --fix"],
|
||||||
|
|||||||
@@ -5,3 +5,6 @@ node_modules/*
|
|||||||
coverage/*
|
coverage/*
|
||||||
data/*
|
data/*
|
||||||
.vscode-test/
|
.vscode-test/
|
||||||
|
/dist/
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
legacy/*
|
||||||
|
|||||||
+3
-1
@@ -4,6 +4,8 @@ import tsplugin from '@typescript-eslint/eslint-plugin';
|
|||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
// remonte (et --fix supprime) tout eslint-disable inutile : regle deja off, inactive, ou qui ne tire pas
|
||||||
|
{ linterOptions: { reportUnusedDisableDirectives: 'error' } },
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
{
|
{
|
||||||
files: ['**/*.ts'],
|
files: ['**/*.ts'],
|
||||||
@@ -61,6 +63,6 @@ export default [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ignores: ['out/', 'dist/', '.vscode-test/', '**/*.d.ts'],
|
ignores: ['legacy/', 'out/', 'dist/', '.vscode-test/', '**/*.d.ts'],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Generated
+618
-649
File diff suppressed because it is too large
Load Diff
+11
-11
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vscodestat",
|
"name": "vscodestat",
|
||||||
"displayName": "vscodestat",
|
"displayName": "vscodestat",
|
||||||
"version": "1.2.11",
|
"version": "1.6.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
@@ -51,22 +51,22 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^10.0.1",
|
"@eslint/js": "^10.0.1",
|
||||||
"@types/mocha": "^10.0.10",
|
"@types/mocha": "^10.0.10",
|
||||||
"@types/node": "25.x",
|
"@types/node": "26.x",
|
||||||
"@types/vscode": "^1.120.0",
|
"@types/vscode": "^1.125.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
||||||
"@typescript-eslint/parser": "^8.59.3",
|
"@typescript-eslint/parser": "^8.62.0",
|
||||||
"@vscode/test-cli": "^0.0.12",
|
"@vscode/test-cli": "^0.0.15",
|
||||||
"@vscode/test-electron": "^2.5.2",
|
"@vscode/test-electron": "^3.0.0",
|
||||||
"eslint": "^10.1.0",
|
"eslint": "^10.1.0",
|
||||||
"globals": "^17.6.0",
|
"globals": "^17.7.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"lint-staged": "^17.0.5",
|
"lint-staged": "^17.0.8",
|
||||||
"prettier": "^3.8.3",
|
"prettier": "^3.9.1",
|
||||||
"ts-api-utils": "^2.5.0",
|
"ts-api-utils": "^2.5.0",
|
||||||
"typescript": "^6.0.3"
|
"typescript": "^6.0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.120.0"
|
"vscode": "^1.125.0"
|
||||||
},
|
},
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"extensionKind": [
|
"extensionKind": [
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
console.log('Opened file:', filePath);
|
console.log('Opened file:', filePath);
|
||||||
|
|
||||||
// vscode.window.showInformationMessage(`Opened file: ${filePath}`);
|
// vscode.window.showInformationMessage(`Opened file: ${filePath}`);
|
||||||
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath) });
|
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath), source: 'vscode' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
console.log('Saved file:', filePath);
|
console.log('Saved file:', filePath);
|
||||||
|
|
||||||
// vscode.window.showInformationMessage(`Saved file: ${filePath}`);
|
// vscode.window.showInformationMessage(`Saved file: ${filePath}`);
|
||||||
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath) });
|
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath), source: 'vscode' });
|
||||||
});
|
});
|
||||||
|
|
||||||
// detecte un focus / blur de la fenetre vscode
|
// detecte un focus / blur de la fenetre vscode
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
REVIEW DE CODE — 2026-04-26
|
|
||||||
============================================
|
|
||||||
|
|
||||||
Extension VSCode (TypeScript) qui collecte des metriques sur
|
|
||||||
l'activite du user dans VSCode :
|
|
||||||
- ouverture de fichier / changement d'onglet (event 'open')
|
|
||||||
- sauvegarde de fichier (event 'save')
|
|
||||||
- focus/blur de la fenetre (event 'focus')
|
|
||||||
|
|
||||||
Envoie un POST JSON a la URL configuree (`vscodestat.url`).
|
|
||||||
|
|
||||||
NB : extension force-installed dans les containers vscode + vscodeluigi
|
|
||||||
(cf vscode/todo.txt). C'est l'extension de monitoring activite dev.
|
|
||||||
|
|
||||||
SECURITE
|
|
||||||
--------
|
|
||||||
|
|
||||||
[ ] makeHttpRequest envoie au serveur l'event sans auth
|
|
||||||
src/extension.ts : `fetch(url, { method: 'POST',
|
|
||||||
headers: ..., body: JSON.stringify(json) })`. Pas de token.
|
|
||||||
Cote serveur (cf monitoringserver/todo.txt), `/vscodestat` est
|
|
||||||
aussi sans auth => tout le monde peut envoyer des metriques.
|
|
||||||
|
|
||||||
BUGS / FRAGILITE
|
|
||||||
----------------
|
|
||||||
[ ] Pas de batching
|
|
||||||
Chaque event = 1 fetch. Pas de queue + flush periodique.
|
|
||||||
Si reseau down, perte d'events (pas de retry). A capper.
|
|
||||||
|
|
||||||
[ ] makeHttpRequest catch silencieux
|
|
||||||
src/extension.ts : catch + console.error. Pas de
|
|
||||||
retry, pas de notification user. Si serveur down, events
|
|
||||||
perdus.
|
|
||||||
+1
-5
@@ -13,10 +13,6 @@
|
|||||||
],
|
],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"strict": true /* enable all strict type-checking options */
|
"strict": true
|
||||||
/* Additional Checks */
|
|
||||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
||||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
||||||
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user