up
This commit is contained in:
parent
c315eecc46
commit
a767d334a0
1
LICENSE.md
Normal file
1
LICENSE.md
Normal file
@ -0,0 +1 @@
|
||||
soak
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vscodestat",
|
||||
"displayName": "vscodestat",
|
||||
"version": "1.0.8",
|
||||
"version": "1.1.0",
|
||||
"description": "",
|
||||
"categories": [
|
||||
"Other"
|
||||
|
@ -42,7 +42,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
console.log('Opened file:', filePath);
|
||||
|
||||
// vscode.window.showInformationMessage(`Opened file: ${filePath}`);
|
||||
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath) });
|
||||
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath), filePath });
|
||||
}
|
||||
});
|
||||
|
||||
@ -52,7 +52,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
console.log('Saved file:', filePath);
|
||||
|
||||
// vscode.window.showInformationMessage(`Saved file: ${filePath}`);
|
||||
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath) });
|
||||
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath), filePath });
|
||||
});
|
||||
|
||||
// detecte un focus / blur de la fenetre vscode
|
||||
@ -70,8 +70,17 @@ export function deactivate() { }
|
||||
* => monitoringserver
|
||||
*/
|
||||
function extractProjectName(path: string) {
|
||||
const match = path.match(/\/root\/docker\/([^/]+)/);
|
||||
return match?.[2];
|
||||
// des c'est l'un des fois l'autre ?
|
||||
// /root/docker/vscodestat/src/extension.ts
|
||||
// \root\docker\vscodestat\src\extension.ts
|
||||
path = path.replace(/\\/g, '/');
|
||||
|
||||
const match = path.match(/\/docker\/([^/]+)/);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user