@compass-framework/plugin 1.0.11 → 1.0.12

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.
@@ -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 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;
@@ -5,5 +5,5 @@ export declare class Identifier<API = null> {
5
5
  name: string;
6
6
  artifactId: string;
7
7
 
8
- public constructor({groupId, name, artifactId,}: Specification);
8
+ public constructor(spec: Specification);
9
9
  }
@@ -1,10 +1,12 @@
1
1
  import {Environment} from "./Environment";
2
2
  import {Identifier} from "./Identifier";
3
3
 
4
- export declare abstract class Plugin<Arguments> {
5
- public abstract onCreated(args: Arguments): Identifier;
4
+ export declare abstract class Plugin<Property> {
5
+ public abstract onCreated(property: Property): Identifier;
6
+
7
+ public abstract onMounted(env: Environment<Property>): void;
6
8
 
7
9
  public abstract onRemoved(): void;
8
10
 
9
- public abstract onFinished(env: Environment): void;
11
+ public abstract getIdentifier(): Identifier;
10
12
  }
@@ -1,10 +1,10 @@
1
- import { Context } from "@compass-framework/core";
2
- import { Plugin } from "./Plugin";
1
+ import {Context} from "@compass-framework/core";
2
+ import {Plugin} from "./Plugin";
3
3
 
4
- export declare class PluginManager<Arguments> {
5
- public constructor(context: Context, args: Arguments);
4
+ export declare class PluginManager<Property> {
5
+ public constructor(context: Context, property: Property);
6
6
 
7
- public install(plugin: Plugin<Arguments>): void;
7
+ public usePlugin(plugin: Plugin<Property>): void;
8
8
 
9
- public uninstall(plugin: Plugin<Arguments>): void;
9
+ public unUsePlugin(plugin: Plugin<Property>): void;
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/plugin",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "@compass-framework/plugin public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",