@compass-framework/plugin 1.2.4 → 1.2.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/{Plugin.d.ts → BasePlugin.d.ts} +2 -2
- package/@types/BasePluginManager.d.ts +11 -0
- package/@types/PluginIdentifier.d.ts +9 -0
- package/@types/PluginPlatform.d.ts +4 -0
- package/@types/PluginRuntime.d.ts +12 -0
- package/@types/{Specification.ts → PluginSpecification.ts} +1 -1
- package/index.d.ts +5 -5
- package/package.json +2 -5
- package/@types/Environment.d.ts +0 -15
- package/@types/Identifier.d.ts +0 -9
- package/@types/Platform.d.ts +0 -4
- package/@types/PluginManager.d.ts +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {Environment} from "./
|
|
2
|
-
import {Identifier} from "./
|
|
1
|
+
import {Environment} from "./PluginRuntime";
|
|
2
|
+
import {Identifier} from "./PluginIdentifier";
|
|
3
3
|
|
|
4
4
|
export declare abstract class Plugin<Property, Arguments> {
|
|
5
5
|
public abstract onCreated(args: Arguments): Identifier;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {Plugin} from "./BasePlugin";
|
|
2
|
+
|
|
3
|
+
export declare abstract class PluginManager<Property, Arguments> {
|
|
4
|
+
protected constructor(args: Arguments);
|
|
5
|
+
|
|
6
|
+
public abstract getPluginProperty(): Property;
|
|
7
|
+
|
|
8
|
+
public installPlugin(plugin: Plugin<Property, Arguments>): void;
|
|
9
|
+
|
|
10
|
+
public unInstallPlugin(plugin: Plugin<Property, Arguments>): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {PluginIdentifier} from "./PluginIdentifier";
|
|
2
|
+
import {PluginPlatform} from "./PluginPlatform";
|
|
3
|
+
|
|
4
|
+
export interface Environment<Property> {
|
|
5
|
+
exportAPIs(apis: object): void;
|
|
6
|
+
|
|
7
|
+
importAPIs<T>(key: PluginIdentifier<T>): T;
|
|
8
|
+
|
|
9
|
+
getProperty(): Property;
|
|
10
|
+
|
|
11
|
+
getPlatform(): PluginPlatform;
|
|
12
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./@types/
|
|
2
|
-
export * from "./@types/
|
|
3
|
-
export * from "./@types/
|
|
4
|
-
export * from "./@types/
|
|
5
|
-
export * from "./@types/
|
|
1
|
+
export * from "./@types/PluginRuntime";
|
|
2
|
+
export * from "./@types/PluginPlatform";
|
|
3
|
+
export * from "./@types/PluginIdentifier";
|
|
4
|
+
export * from "./@types/BasePlugin";
|
|
5
|
+
export * from "./@types/BasePluginManager";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compass-framework/plugin",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "@compass-framework/plugin public api",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,8 +10,5 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@compass-framework/library": "1.0.5",
|
|
15
|
-
"@compass-framework/core": "1.2.4"
|
|
16
|
-
}
|
|
13
|
+
"dependencies": {}
|
|
17
14
|
}
|
package/@types/Environment.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {Context} from "@compass-framework/core";
|
|
2
|
-
import {Platform} from "./Platform";
|
|
3
|
-
import {Identifier} from "./Identifier";
|
|
4
|
-
|
|
5
|
-
export interface Environment<Property> {
|
|
6
|
-
exportAPIs(apis: object): void;
|
|
7
|
-
|
|
8
|
-
importAPIs<T>(key: Identifier<T>): T;
|
|
9
|
-
|
|
10
|
-
getProperty(): Property;
|
|
11
|
-
|
|
12
|
-
getPlatform(): Platform;
|
|
13
|
-
|
|
14
|
-
getContext(global?: boolean): Context;
|
|
15
|
-
}
|
package/@types/Identifier.d.ts
DELETED
package/@types/Platform.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {Context} from "@compass-framework/core";
|
|
2
|
-
import {Plugin} from "./Plugin";
|
|
3
|
-
|
|
4
|
-
export declare class PluginManager<Property, Arguments> {
|
|
5
|
-
public constructor(context: Context, property: Property, args: Arguments);
|
|
6
|
-
|
|
7
|
-
public usePlugin(plugin: Plugin<Property, Arguments>): void;
|
|
8
|
-
|
|
9
|
-
public unUsePlugin(plugin: Plugin<Property, Arguments>): void;
|
|
10
|
-
}
|