PowerShell / PowerShell/vscode-powershell
Add a public API to enable add-on extensions
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 1.9k
- Fork
- 548
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Summary of the new feature
As a writer of a PowerShellEditorServices extension I want to enable users to install a vscode extension containing my module.
I need that extension to be able to:
- Use the integrated console to install the module from the gallery, or provide an additional
PSModulePath - Import the PSES extension module on vscode extension activation
I want that extension to be able to:
- Register new requests and notifications that PSES would redirect to my module
The current install process is as follows:
- Install the module manually from the gallery
- Add an
Import-Modulestatement to your profile - Manually add keybinds to
keybinds.json(using syntax you can only determine from reading vscode-powershell's source or a posted example)
That's a lot to ask of folks just to try out a module.
Proposed technical implementation details (optional)
The getExtension function allows vscode extensions to acquire a public API from another extension. This API would need to be surfaced by vscode-powershell internally, and optionally (though ideally) a typescript type definition would also be published to npm.
The bare minimum needed in this API would be an exported function that just imports a module from a path. Something like:
tryImportPowerShellModule(path: string) => bool
Edit: Actually a simple import function would be pretty inconsistent since it would be lost every time the console was restarted/version changed. Maybe something like:
registerPSESExtensionModule(path: string) => void;
Where vscode-powershell internally tracks registered modules and reimports them at startup.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
La issue identifica l’API getExtension di VS Code come punto di ingresso per l’integrazione e suggerisce un’API TypeScript pubblica, con definizioni dei tipi npm opzionali. Inizia tracciando come vscode-powershell potrebbe esporre tale API e mantenere i moduli registrati tra i riavvii della console; il lavoro è completato quando le estensioni possono registrare o importare il proprio modulo e registrare facoltativamente requests e notifications reindirizzati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, typescript, vscode
- Ambito
- api, developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100