mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
a8ce263dc9
commit
e56f8f3362
6 files changed
+20
-3
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
import { LensExtension } from "@lens"; // todo: handle runtime import
|
||||||
|
|
||||||
|
export class ExampleExtension extends LensExtension {
|
||||||
|
async init(): Promise<any> {
|
||||||
|
console.log('Example extension: init')
|
||||||
|
return super.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "extension-example",
|
"name": "extension-example",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Example extension",
|
"description": "Example extension",
|
||||||
"main": "extension-example.ts",
|
"main": "example-extension.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Whitespace-only changes.
@@ -46,9 +46,8 @@ export class ExtensionStore extends BaseStore<ExtensionStoreModel> {
|
|||||||
async removeById(id: ExtensionId) {
|
async removeById(id: ExtensionId) {
|
||||||
const extension = this.getById(id);
|
const extension = this.getById(id);
|
||||||
if (extension) {
|
if (extension) {
|
||||||
const unInstallStatus = await extension.uninstall()
|
await extension.uninstall();
|
||||||
this.extensions.delete(id);
|
this.extensions.delete(id);
|
||||||
return unInstallStatus;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ export class LensExtension implements ExtensionModel {
|
|||||||
this.isEnabled = enabled;
|
this.isEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async init(){
|
||||||
|
// todo?
|
||||||
|
}
|
||||||
|
|
||||||
async install() {
|
async install() {
|
||||||
// todo
|
// todo
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// todo: re-export / expose more apis
|
||||||
|
// todo: generate as Lens.d.js + add real runtime exports
|
||||||
|
|
||||||
|
declare module "@lens" {
|
||||||
|
export { LensExtension, ExtensionId, ExtensionVersion } from "./extension";
|
||||||
|
}
|
||||||
Reference in new issue
Block a user