@compass-framework/plugin 1.0.9 → 1.0.11

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,13 +2,11 @@ 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<Property> {
5
+ export declare interface Environment {
6
6
  exportAPIs(apis: object): void;
7
7
 
8
8
  importAPIs<T>(key: Identifier<T>): T;
9
9
 
10
- getProperty(): Property;
11
-
12
10
  getContext(): Context;
13
11
 
14
12
  getPlatform(): Platform;
@@ -1,6 +1,6 @@
1
1
  import {Specification} from "./Specification";
2
2
 
3
- export declare class Identifier<API> {
3
+ export declare class Identifier<API = null> {
4
4
  groupId: string;
5
5
  name: string;
6
6
  artifactId: string;
@@ -1,10 +1,10 @@
1
1
  import {Environment} from "./Environment";
2
2
  import {Identifier} from "./Identifier";
3
3
 
4
- export declare abstract class Plugin<Property, APIs> {
5
- public abstract onInstall(env: Environment<Property>): void;
4
+ export declare abstract class Plugin<Arguments> {
5
+ public abstract onCreated(args: Arguments): Identifier;
6
6
 
7
- public abstract onUninstall(): void;
7
+ public abstract onRemoved(): void;
8
8
 
9
- public abstract getIdentifier(): Identifier<APIs>;
9
+ public abstract onFinished(env: Environment): void;
10
10
  }
@@ -1,13 +1,10 @@
1
- import {
2
- Context
3
- } from "@compass-framework/core";
4
-
1
+ import { Context } from "@compass-framework/core";
5
2
  import { Plugin } from "./Plugin";
6
3
 
7
- export declare class PluginManager<Property> {
8
- public constructor(context: Context, property: Property);
4
+ export declare class PluginManager<Arguments> {
5
+ public constructor(context: Context, args: Arguments);
9
6
 
10
- public install(plugin: Plugin): void;
7
+ public install(plugin: Plugin<Arguments>): void;
11
8
 
12
- public uninstall(plugin: Plugin): void;
9
+ public uninstall(plugin: Plugin<Arguments>): void;
13
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-framework/plugin",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "@compass-framework/plugin public api",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.js",