Compare commits

...

104 Commits

Author SHA1 Message Date
bot
2f300a0ab6 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-10-30 03:37:10 +00:00
7aa4310359 renovate (#43)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-30 03:37:02 +00:00
bot
51d6bed019 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-10-29 01:39:31 +00:00
92f922ff93 renovate (#42)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-29 01:39:13 +00:00
82025b9624 up 2024-10-28 22:45:40 +01:00
bot
014ef099f2 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-21 23:52:02 +00:00
febc36ef36 renovate (#41)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-21 23:51:35 +00:00
bot
9a7217cbb6 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-20 02:01:04 +00:00
64c8d8d77e renovate (#40)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-20 02:00:43 +00:00
bot
7bebd66b20 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-17 23:45:32 +00:00
7d8e82a7de renovate (#39)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-17 23:45:00 +00:00
bot
89c1150c7d fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-14 23:27:25 +00:00
65a1db8157 renovate (#38)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-14 23:27:16 +00:00
bot
c7bb134cff fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-09 08:17:14 +00:00
640ba2fbf5 renovate (#37)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-09 08:17:06 +00:00
bot
c21ddcdd2e fix: release
Some checks reported errors
continuous-integration/drone/tag Build encountered an error
2024-10-08 20:45:18 +00:00
910c941222 renovate (#36)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-08 20:44:52 +00:00
6d6c56b87c up 2024-10-08 16:02:22 +02:00
bot
96f27dadd7 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-10-05 03:28:31 +00:00
0a380910dc renovate (#35)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-05 03:28:17 +00:00
bot
98ab84e21f fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-10-04 00:35:40 +00:00
4cd0e6a1e3 renovate (#34)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-04 00:35:20 +00:00
27ef2b1e7f up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-10-02 08:58:23 +02:00
6b46502e81 up
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-02 08:53:37 +02:00
bot
cc8a946cd6 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-10-01 00:24:21 +00:00
7580bcb90a renovate (#33)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-10-01 00:23:43 +00:00
bot
07e384f98d fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-24 00:04:52 +00:00
5765b0e00b renovate (#32)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-24 00:04:28 +00:00
bot
f6a8250db8 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-20 18:19:04 +00:00
b94da7e56c renovate (#31)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-20 18:18:25 +00:00
b89a824004 fix: gitea 2024-09-17 17:34:39 +02:00
bot
b7845de2cb fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-16 23:40:48 +00:00
2f7b7645e3 renovate (#30)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-16 23:40:27 +00:00
bot
6f4502389e fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-13 07:15:12 +00:00
636e769e56 renovate (#29)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-13 07:14:32 +00:00
bot
d239610e81 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-09 17:25:28 +00:00
e82de8da2a renovate (#28)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-09 17:25:11 +00:00
bot
5232607549 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-09 16:35:58 +00:00
1bacb3f46d renovate (#27)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-09 16:34:20 +00:00
bot
6bf71399a3 fix: release
Some checks failed
continuous-integration/drone/tag Build is failing
2024-09-06 21:39:51 +00:00
4951107d89 renovate (#26)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-06 21:38:53 +00:00
bot
5581e178a5 fix: release
Some checks reported errors
continuous-integration/drone/tag Build encountered an error
2024-09-05 20:12:33 +00:00
d688b9d34a renovate (#25)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-05 20:12:17 +00:00
bot
dfe13b5ad5 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-09-03 23:55:05 +00:00
eded025bd5 renovate (#24)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-09-03 23:52:45 +00:00
bot
04ae797578 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-26 18:18:26 +00:00
e38cf200b9 renovate (#23)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-26 18:17:26 +00:00
bot
51d0d54771 fix: release
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-23 23:24:26 +00:00
664740860b renovate (#22)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-23 23:24:09 +00:00
bot
8440fd8275 fix: release
Some checks reported errors
continuous-integration/drone/tag Build encountered an error
2024-08-19 17:20:58 +00:00
084e4239b4 renovate (#21)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-19 17:20:39 +00:00
9f0c85e8d3 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 14:18:10 +02:00
66ea0ee96d up 2024-08-13 00:52:51 +02:00
5489463885 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:41:16 +02:00
cf1eca0e5c up
Some checks failed
continuous-integration/drone/tag Build is failing
2024-08-13 00:33:07 +02:00
5a28602203 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:06:19 +02:00
9b3cd8cbcc feature: wedoxa 2024-08-13 00:03:54 +02:00
b7608be252 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:02:23 +02:00
4235fd7961 up
Some checks reported errors
continuous-integration/drone/tag Build was killed
2024-08-12 23:51:11 +02:00
2f359da27a up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-12 23:10:32 +02:00
8340c1b4f2 up
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build encountered an error
2024-08-12 23:08:18 +02:00
e17c9bc287 up
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build encountered an error
2024-08-12 23:07:56 +02:00
1f31f43497 up
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build encountered an error
2024-08-12 23:07:27 +02:00
1c8c95191e up
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build encountered an error
2024-08-12 23:05:46 +02:00
497054d911 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-12 22:40:09 +02:00
55ef37fab8 renovate (#20)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-12 18:19:15 +00:00
e266af9370 renovate (#19)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-09 21:27:49 +00:00
4925404e04 renovate (#18)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-05 18:17:11 +00:00
ea16544636 up 2024-08-01 22:44:05 +02:00
91b0d32b8a renovate (#17)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-08-01 19:12:13 +00:00
bc759c3deb up 2024-07-31 23:26:16 +02:00
a9a886cbc8 up 2024-07-31 23:14:20 +02:00
5f2724bdd1 up 2024-07-08 14:16:24 +02:00
a767d334a0 up 2024-07-08 14:08:54 +02:00
c315eecc46 up 2024-07-08 11:28:19 +02:00
e0ad27be04 up 2024-07-05 15:16:09 +02:00
7f480b480f up 2024-07-04 14:48:15 +02:00
cf85a5ad24 up 2024-07-04 14:30:17 +02:00
b78d041c42 up 2024-07-04 14:28:49 +02:00
b07a29c868 up 2024-07-04 14:20:45 +02:00
5ccb93835d up 2024-07-04 14:16:32 +02:00
73b9536109 up 2024-07-04 14:12:03 +02:00
b321e19d2d renovate (#16)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-22 12:11:12 +00:00
88757a4bb3 renovate (#15)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-20 18:14:12 +00:00
da188d6c92 renovate (#14)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-17 18:39:21 +00:00
0a55a5bbdc renovate (#13)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-10 18:14:28 +00:00
74d298bc8a renovate (#12)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-05 23:25:18 +00:00
e946dfe08a renovate (#11)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-06-03 19:23:06 +00:00
75ca1feeae renovate (#10)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-29 17:24:11 +00:00
8458af9ffd renovate (#9)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-27 20:46:35 +00:00
342e56b860 renovate (#8)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-20 18:13:10 +00:00
4fd01c314f up 2024-05-17 00:04:04 +02:00
e501c0aea1 renovate (#7)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-13 21:22:18 +00:00
4afb410e11 renovate (#6)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-13 18:18:58 +00:00
1e2148a1bb renovate (#5)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-05-03 01:14:12 +00:00
52bae9f401 renovate (#4)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-04-29 17:21:10 +00:00
d131041873 renovate (#3)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-04-22 17:24:27 +00:00
71d54d5e90 renovate (#2)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-04-19 10:07:30 +00:00
6fe024eddd up 2024-04-06 00:30:47 +02:00
0b619beb75 renovate (#1)
Co-authored-by: m.schnitzler <martin.wb.2015@gmail.com>
Co-committed-by: m.schnitzler <martin.wb.2015@gmail.com>
2024-04-04 18:31:10 +00:00
d91474f3da up 2024-04-04 12:37:08 +02:00
d8730da20f up 2024-04-04 12:35:29 +02:00
67070c82bc Merge branch 'master' of ssh://gitea.raphaelpiccolo.com:10022/root/vscodestat 2024-04-04 12:34:10 +02:00
44d71cc184 up 2024-04-04 12:30:39 +02:00
10 changed files with 3611 additions and 3198 deletions

22
.drone.yml Normal file
View File

@ -0,0 +1,22 @@
kind: pipeline
name: default
trigger:
event:
- tag
steps:
- name: build
image: node
commands:
- npm install -g vsce
- npm ci
- vsce package
- name: gitea_release
image: plugins/gitea-release
settings:
base_url: https://gitea.raphaelpiccolo.com
files: ./*.vsix
api_key:
from_secret: gitea_token

27
.gitignore vendored
View File

@ -3,3 +3,30 @@ dist
node_modules
.vscode-test/
*.vsix
/core
*~
\#*#
node_modules/
log/
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env*
Thumbs.db
.DS_Store
.npm
.vscode*
*.pem
*.p12
*.p8
*.key
.vercel
.composer/
.php-cs-fixer.cache
coverage/
.cache/
.local/
.config/
data/

View File

@ -1,9 +0,0 @@
# Change Log
All notable changes to the "vscodestat" extension will be documented in this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [Unreleased]
- Initial release

1
LICENSE.md Normal file
View File

@ -0,0 +1 @@
soak

View File

@ -9,60 +9,10 @@ it can track :
- file saving
- window focus
## Requirements
nothing particular
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
* `vscodestat.setUrl`: function to set the remote server's url
this will set the variable vscodestat.url
* `vscodestat.callUrl`: funciton to test if it works
For example:
This extension contributes the following settings:
* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
## Release Notes
Users appreciate release notes as you update your extension.
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
---
## Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
## Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
## For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
Sample url : https://xxxxxx/vscodestat?userName=raf

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

6498
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +1,72 @@
{
"name": "vscodestat",
"displayName": "vscodestat",
"version": "1.0.3",
"description": "",
"categories": [
"Other"
],
"main": "./out/extension.js",
"scripts": {
"compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"pretest": "npm run compile && npm run lint",
"test": "vscode-test",
"vscode:prepublish": "npm run compile",
"watch": "tsc -watch -p ./"
},
"contributes": {
"commands": [
{
"command": "vscodestat.helloWorld",
"title": "Hello World"
},
{
"command": "vscodestat.setUrl",
"title": "setUrl"
},
{
"command": "vscodestat.callUrl",
"title": "callUrl"
}
"name": "vscodestat",
"displayName": "vscodestat",
"version": "1.1.37",
"description": "",
"categories": [
"Other"
],
"configuration": {
"title": "vscodestat",
"properties": {
"vscodestat.url": {
"type": "string",
"default": "https://example.com",
"description": "Specifies the url of the server to store the events"
"repository": {
"type": "git",
"url": "ssh://git@gitea.raphaelpiccolo.com:10022/root/vscodestat.git"
},
"license": "ISC",
"author": "Raphael Piccolo",
"main": "./out/extension.js",
"scripts": {
"compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"pretest": "npm run compile && npm run lint",
"test": "vscode-test",
"vscode:prepublish": "npm run compile",
"watch": "tsc -watch -p ./"
},
"contributes": {
"commands": [
{
"command": "vscodestat.helloWorld",
"title": "Hello World"
},
{
"command": "vscodestat.setUrl",
"title": "setUrl"
},
{
"command": "vscodestat.callUrl",
"title": "callUrl"
}
],
"configuration": {
"title": "vscodestat",
"properties": {
"vscodestat.url": {
"type": "string",
"default": "https://example.com",
"description": "Specifies the url of the server to store the events"
}
}
}
}
}
},
"activationEvents": [
"onStartupFinished"
],
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "20.x",
"@types/vscode": "^1.87.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.3.9",
"eslint": "^8.57.0",
"typescript": "^5.4.3"
},
"engines": {
"vscode": "^1.87.0"
}
},
"activationEvents": [
"onStartupFinished"
],
"devDependencies": {
"@types/mocha": "^10.0.9",
"@types/node": "22.x",
"@types/vscode": "^1.95.0",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"eslint": "^9.13.0",
"typescript": "^5.6.3"
},
"engines": {
"vscode": "^1.95.0"
},
"icon": "icon.png",
"extensionKind": [
"ui",
"workspace"
]
}

View File

@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) {
let disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
const url = await vscode.window.showInputBox({
prompt: 'Enter the URL:',
placeHolder: 'https://example.com'
placeHolder: ''
});
if (url) {
@ -31,6 +31,7 @@ export function activate(context: vscode.ExtensionContext) {
return;
}
await makeHttpRequest({ event: 'ping'});
vscode.window.showInformationMessage('callUrl done');
});
context.subscriptions.push(disposable3);
@ -40,7 +41,7 @@ export function activate(context: vscode.ExtensionContext) {
const filePath = editor.document.fileName;
console.log('Opened file:', filePath);
vscode.window.showInformationMessage(`Opened file: ${filePath}`);
// vscode.window.showInformationMessage(`Opened file: ${filePath}`);
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath) });
}
});
@ -50,7 +51,7 @@ export function activate(context: vscode.ExtensionContext) {
const filePath = document.fileName;
console.log('Saved file:', filePath);
vscode.window.showInformationMessage(`Saved file: ${filePath}`);
// vscode.window.showInformationMessage(`Saved file: ${filePath}`);
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath) });
});
@ -69,8 +70,17 @@ export function deactivate() { }
* => monitoringserver
*/
function extractProjectName(path: string) {
const match = path.match(/\/root\/(docker|projects)\/([^/]+)/);
return match?.[1];
// 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;
}
/*
@ -83,7 +93,7 @@ async function makeHttpRequest(json: Object) {
return;
}
vscode.window.showInformationMessage('Calling URL: ' + url);
// vscode.window.showInformationMessage('Calling URL: ' + url);
const rawResponse = await fetch(url, {
method: 'POST',
headers: {
@ -95,9 +105,9 @@ async function makeHttpRequest(json: Object) {
const content = await rawResponse.json();
console.log(content);
vscode.window.showInformationMessage('HTTP request successful.');
// vscode.window.showInformationMessage('HTTP request successful.');
} catch (error:any) {
console.error('Error making HTTP request:', error);
vscode.window.showErrorMessage('Error making HTTP request: ' + error.message);
// vscode.window.showErrorMessage('Error making HTTP request: ' + error.message);
}
}

View File

@ -1,43 +0,0 @@
# Welcome to your VS Code Extension
## What's in the folder
* This folder contains all of the files necessary for your extension.
* `package.json` - this is the manifest file in which you declare your extension and command.
* The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesnt yet need to load the plugin.
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
* The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
* We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
## Get up and running straight away
* Press `F5` to open a new window with your extension loaded.
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
* Set breakpoints in your code inside `src/extension.ts` to debug your extension.
* Find output from your extension in the debug console.
## Make changes
* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
## Explore the API
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
## Run tests
* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner)
* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered.
* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A`
* See the output of the test result in the Test Results view.
* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder.
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
* You can create folders inside the `test` folder to structure your tests any way you want.
## Go further
* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns.
* Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace.
* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).