fix(plugin-sdk): aligne le manifeste hello-plugin sur le schéma backend + fixture de test

Le manifeste hello-plugin était généré par un SDK obsolète/désaligné avec le
schéma backend actuel (champ ideaPluginManifestVersion manquant, displayName,
trustLevel, shape de contributes), ce qui faisait échouer l'installation avec
« invalid input: missing field ideaPluginManifestVersion ».

- SDK (manifest.ts/js, index.ts) aligné sur le schéma backend courant.
- hello-plugin (exemple + fixture) régénéré avec le manifeste valide.
- Base de tests fonctionnels plugins : fixture réelle versionnée
  (reference-minimal) + test d'installation/chargement bout en bout
  (plugin_install_load.rs), pour couvrir install/load/catalog depuis un
  dossier fixture réel.

Le sous-repo git imbriqué et vide (sdk/IdeaSDK/.git, 0 commit) a été
neutralisé pour que les sources du SDK soient suivies normalement dans ce
dépôt plutôt que comme gitlink vide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 10:00:44 +02:00
parent c1ff98086c
commit 6270f98e54
22 changed files with 1113 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# Hello Plugin
Minimal IdeA plugin example using the public SDK types.
```sh
npm run typecheck:examples
npm run package:hello-plugin
```
The installable archive is emitted at `examples/hello-plugin/build/hello-plugin-0.1.0.zip`.
It contains `idea-plugin.json` at the ZIP root and the compiled ESM entrypoint at
`dist/index.js`, matching the manifest `main` field.

View File

@ -0,0 +1,33 @@
{
"ideaPluginManifestVersion": 1,
"id": "com.example.hello-plugin",
"displayName": "Hello Plugin",
"publisher": "IdeA Examples",
"version": "0.1.0",
"description": "Minimal IdeA plugin example.",
"main": "dist/index.js",
"engines": {
"idea": ">=0.1.0"
},
"trustLevel": "full",
"capabilities": [
"ui"
],
"contributes": {
"menus": [
{
"id": "hello-plugin.menu",
"label": "Hello",
"topLevel": true
}
],
"menuItems": [
{
"id": "hello-plugin.sayHello.item",
"targetMenuId": "hello-plugin.menu",
"label": "Say Hello",
"command": "hello-plugin.sayHello"
}
]
}
}

View File

@ -0,0 +1,27 @@
{
"name": "hello-plugin",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hello-plugin",
"version": "0.1.0",
"dependencies": {
"@idea/plugin-sdk": "file:../.."
}
},
"../..": {
"name": "@idea/plugin-sdk",
"version": "0.1.0",
"license": "MIT",
"devDependencies": {
"typescript": "^5.5.0"
}
},
"node_modules/@idea/plugin-sdk": {
"resolved": "../..",
"link": true
}
}
}

View File

@ -0,0 +1,14 @@
{
"name": "hello-plugin",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "dist/index.js",
"scripts": {
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@idea/plugin-sdk": "file:../.."
}
}

View File

@ -0,0 +1,21 @@
import type { ActivateContext, IdeAPluginModule } from "@idea/plugin-sdk";
export function activate(ctx: ActivateContext): void {
ctx.logger.info("Hello from the IdeA hello plugin.");
const disposable = ctx.commands?.registerCommand("hello-plugin.sayHello", () => {
ctx.logger.info("Hello command executed.");
return "Hello from IdeA";
});
if (disposable) {
ctx.subscriptions.push(disposable);
}
}
const plugin: IdeAPluginModule = {
activate
};
export default plugin;

View File

@ -0,0 +1,19 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"noEmit": false,
"outDir": "dist",
"rootDir": "src",
"sourceMap": false,
"paths": {
"@idea/plugin-sdk": [
"../../dist/index.d.ts"
]
}
},
"include": [
"src/**/*.ts"
]
}

View File

@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"noEmit": true,
"rootDir": "../..",
"paths": {
"@idea/plugin-sdk": [
"../../src/index.ts"
]
}
},
"include": [
"src/**/*.ts",
"../../src/**/*.ts"
]
}