@compass-framework/plugin 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/@types/Environment.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import {Context} from "@compass-framework/core";
|
|
|
2
2
|
import {Platform} from "./Platform";
|
|
3
3
|
import {Identifier} from "./Identifier";
|
|
4
4
|
|
|
5
|
-
export declare interface Environment {
|
|
5
|
+
export declare interface Environment<Property> {
|
|
6
6
|
exportAPIs(apis: object): void;
|
|
7
7
|
|
|
8
8
|
importAPIs<T>(key: Identifier<T>): T;
|
|
9
9
|
|
|
10
|
+
getProperty(): Property;
|
|
11
|
+
|
|
10
12
|
getContext(): Context;
|
|
11
13
|
|
|
12
14
|
getPlatform(): Platform;
|
package/@types/Plugin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {Environment} from "./Environment";
|
|
|
2
2
|
import {Identifier} from "./Identifier";
|
|
3
3
|
|
|
4
4
|
export declare abstract class Plugin {
|
|
5
|
-
public abstract onInstall<T>(env: Environment): void;
|
|
5
|
+
public abstract onInstall<T>(env: Environment<T>): void;
|
|
6
6
|
|
|
7
7
|
public abstract onUninstall(): void;
|
|
8
8
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
Context
|
|
3
|
+
} from "@compass-framework/core";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
import { Plugin } from "./Plugin";
|
|
6
|
+
|
|
7
|
+
export declare class PluginManager<Property> {
|
|
8
|
+
public constructor(context: Context, property: Property);
|
|
6
9
|
|
|
7
10
|
public install(plugin: Plugin): void;
|
|
8
11
|
|