@teambit/harmony 0.0.0-51994f3ca4aa48975968091e6b3099c520f5f971
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/aspect.ts +52 -0
- package/config/config.ts +36 -0
- package/config/index.ts +1 -0
- package/container.ts +22 -0
- package/dist/aspect.d.ts +27 -0
- package/dist/aspect.js +33 -0
- package/dist/aspect.js.map +1 -0
- package/dist/config/config.d.ts +22 -0
- package/dist/config/config.js +37 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/container.d.ts +8 -0
- package/dist/container.js +22 -0
- package/dist/container.js.map +1 -0
- package/dist/exceptions/extension-init-error.d.ts +2 -0
- package/dist/exceptions/extension-init-error.js +7 -0
- package/dist/exceptions/extension-init-error.js.map +1 -0
- package/dist/exceptions/extension-load-error.d.ts +29 -0
- package/dist/exceptions/extension-load-error.js +29 -0
- package/dist/exceptions/extension-load-error.js.map +1 -0
- package/dist/exceptions/extension-potential-circular.d.ts +22 -0
- package/dist/exceptions/extension-potential-circular.js +25 -0
- package/dist/exceptions/extension-potential-circular.js.map +1 -0
- package/dist/exceptions/harmony-already-running.d.ts +2 -0
- package/dist/exceptions/harmony-already-running.js +7 -0
- package/dist/exceptions/harmony-already-running.js.map +1 -0
- package/dist/exceptions/harmony-error.d.ts +2 -0
- package/dist/exceptions/harmony-error.js +7 -0
- package/dist/exceptions/harmony-error.js.map +1 -0
- package/dist/exceptions/hook-not-found.d.ts +2 -0
- package/dist/exceptions/hook-not-found.js +7 -0
- package/dist/exceptions/hook-not-found.js.map +1 -0
- package/dist/exceptions/index.d.ts +5 -0
- package/dist/exceptions/index.js +17 -0
- package/dist/exceptions/index.js.map +1 -0
- package/dist/exceptions/runtime-not-defined.d.ts +0 -0
- package/dist/exceptions/runtime-not-defined.js +1 -0
- package/dist/exceptions/runtime-not-defined.js.map +1 -0
- package/dist/extension/any-extension.d.ts +5 -0
- package/dist/extension/any-extension.js +8 -0
- package/dist/extension/any-extension.js.map +1 -0
- package/dist/extension/decorator.d.ts +27 -0
- package/dist/extension/decorator.js +109 -0
- package/dist/extension/decorator.js.map +1 -0
- package/dist/extension/extension-manifest.d.ts +41 -0
- package/dist/extension/extension-manifest.js +3 -0
- package/dist/extension/extension-manifest.js.map +1 -0
- package/dist/extension/extension.d.ts +50 -0
- package/dist/extension/extension.js +128 -0
- package/dist/extension/extension.js.map +1 -0
- package/dist/extension/index.d.ts +3 -0
- package/dist/extension/index.js +13 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension-graph/extension-graph.d.ts +34 -0
- package/dist/extension-graph/extension-graph.js +152 -0
- package/dist/extension-graph/extension-graph.js.map +1 -0
- package/dist/extension-graph/from-extension.d.ts +31 -0
- package/dist/extension-graph/from-extension.js +63 -0
- package/dist/extension-graph/from-extension.js.map +1 -0
- package/dist/extension-graph/index.d.ts +1 -0
- package/dist/extension-graph/index.js +9 -0
- package/dist/extension-graph/index.js.map +1 -0
- package/dist/factory/extension-factory.d.ts +3 -0
- package/dist/factory/extension-factory.js +11 -0
- package/dist/factory/extension-factory.js.map +1 -0
- package/dist/factory/index.d.ts +1 -0
- package/dist/factory/index.js +6 -0
- package/dist/factory/index.js.map +1 -0
- package/dist/fixtures/aspects/babel/babel.aspect.d.ts +5 -0
- package/dist/fixtures/aspects/babel/babel.aspect.js +13 -0
- package/dist/fixtures/aspects/babel/babel.aspect.js.map +1 -0
- package/dist/fixtures/aspects/babel/babel.cli.d.ts +5 -0
- package/dist/fixtures/aspects/babel/babel.cli.js +28 -0
- package/dist/fixtures/aspects/babel/babel.cli.js.map +1 -0
- package/dist/fixtures/aspects/react/react.aspect.d.ts +6 -0
- package/dist/fixtures/aspects/react/react.aspect.js +19 -0
- package/dist/fixtures/aspects/react/react.aspect.js.map +1 -0
- package/dist/fixtures/aspects/react/react.cli.d.ts +11 -0
- package/dist/fixtures/aspects/react/react.cli.js +71 -0
- package/dist/fixtures/aspects/react/react.cli.js.map +1 -0
- package/dist/fixtures/aspects/react/react.ui.d.ts +5 -0
- package/dist/fixtures/aspects/react/react.ui.js +31 -0
- package/dist/fixtures/aspects/react/react.ui.js.map +1 -0
- package/dist/fixtures/aspects/ui/ui.aspect.d.ts +4 -0
- package/dist/fixtures/aspects/ui/ui.aspect.js +15 -0
- package/dist/fixtures/aspects/ui/ui.aspect.js.map +1 -0
- package/dist/fixtures/aspects/ui/ui.ui.d.ts +4 -0
- package/dist/fixtures/aspects/ui/ui.ui.js +24 -0
- package/dist/fixtures/aspects/ui/ui.ui.js.map +1 -0
- package/dist/fixtures/babel/babel.extension.d.ts +9 -0
- package/dist/fixtures/babel/babel.extension.js +30 -0
- package/dist/fixtures/babel/babel.extension.js.map +1 -0
- package/dist/fixtures/babel/index.d.ts +0 -0
- package/dist/fixtures/babel/index.js +1 -0
- package/dist/fixtures/babel/index.js.map +1 -0
- package/dist/fixtures/base-compiler/base-compiler.extension.d.ts +13 -0
- package/dist/fixtures/base-compiler/base-compiler.extension.js +30 -0
- package/dist/fixtures/base-compiler/base-compiler.extension.js.map +1 -0
- package/dist/fixtures/base-compiler/index.d.ts +1 -0
- package/dist/fixtures/base-compiler/index.js +6 -0
- package/dist/fixtures/base-compiler/index.js.map +1 -0
- package/dist/fixtures/cli/cli.extension.d.ts +18 -0
- package/dist/fixtures/cli/cli.extension.js +24 -0
- package/dist/fixtures/cli/cli.extension.js.map +1 -0
- package/dist/fixtures/cli/command.d.ts +6 -0
- package/dist/fixtures/cli/command.js +1 -0
- package/dist/fixtures/cli/command.js.map +1 -0
- package/dist/fixtures/cli/index.d.ts +1 -0
- package/dist/fixtures/cli/index.js +18 -0
- package/dist/fixtures/cli/index.js.map +1 -0
- package/dist/fixtures/typescript/index.d.ts +0 -0
- package/dist/fixtures/typescript/index.js +1 -0
- package/dist/fixtures/typescript/index.js.map +1 -0
- package/dist/fixtures/typescript/typescript.d.ts +7 -0
- package/dist/fixtures/typescript/typescript.js +31 -0
- package/dist/fixtures/typescript/typescript.js.map +1 -0
- package/dist/harmony-config/config-reader.d.ts +1 -0
- package/dist/harmony-config/config-reader.js +20 -0
- package/dist/harmony-config/config-reader.js.map +1 -0
- package/dist/harmony-config/exceptions/index.d.ts +1 -0
- package/dist/harmony-config/exceptions/index.js +6 -0
- package/dist/harmony-config/exceptions/index.js.map +1 -0
- package/dist/harmony-config/exceptions/read-config-error.d.ts +5 -0
- package/dist/harmony-config/exceptions/read-config-error.js +14 -0
- package/dist/harmony-config/exceptions/read-config-error.js.map +1 -0
- package/dist/harmony-config/harmony-config.d.ts +17 -0
- package/dist/harmony-config/harmony-config.js +36 -0
- package/dist/harmony-config/harmony-config.js.map +1 -0
- package/dist/harmony-config/index.d.ts +1 -0
- package/dist/harmony-config/index.js +6 -0
- package/dist/harmony-config/index.js.map +1 -0
- package/dist/harmony-config/locator.d.ts +0 -0
- package/dist/harmony-config/locator.js +1 -0
- package/dist/harmony-config/locator.js.map +1 -0
- package/dist/harmony.d.ts +63 -0
- package/dist/harmony.docs.mdx +250 -0
- package/dist/harmony.js +151 -0
- package/dist/harmony.js.map +1 -0
- package/dist/harmony.spec.old.d.ts +1 -0
- package/dist/harmony.spec.old.js +144 -0
- package/dist/harmony.spec.old.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1781902061115.js +7 -0
- package/dist/readme.md +80 -0
- package/dist/runtimes/exceptions/index.d.ts +2 -0
- package/dist/runtimes/exceptions/index.js +8 -0
- package/dist/runtimes/exceptions/index.js.map +1 -0
- package/dist/runtimes/exceptions/runtime-module-error.d.ts +5 -0
- package/dist/runtimes/exceptions/runtime-module-error.js +14 -0
- package/dist/runtimes/exceptions/runtime-module-error.js.map +1 -0
- package/dist/runtimes/exceptions/runtime-not-defined.d.ts +3 -0
- package/dist/runtimes/exceptions/runtime-not-defined.js +8 -0
- package/dist/runtimes/exceptions/runtime-not-defined.js.map +1 -0
- package/dist/runtimes/index.d.ts +3 -0
- package/dist/runtimes/index.js +8 -0
- package/dist/runtimes/index.js.map +1 -0
- package/dist/runtimes/runtime-definition.d.ts +11 -0
- package/dist/runtimes/runtime-definition.js +27 -0
- package/dist/runtimes/runtime-definition.js.map +1 -0
- package/dist/runtimes/runtime-manifest.d.ts +13 -0
- package/dist/runtimes/runtime-manifest.js +3 -0
- package/dist/runtimes/runtime-manifest.js.map +1 -0
- package/dist/runtimes/runtimes.d.ts +14 -0
- package/dist/runtimes/runtimes.js +43 -0
- package/dist/runtimes/runtimes.js.map +1 -0
- package/dist/slots/index.d.ts +2 -0
- package/dist/slots/index.js +8 -0
- package/dist/slots/index.js.map +1 -0
- package/dist/slots/registry.d.ts +21 -0
- package/dist/slots/registry.js +36 -0
- package/dist/slots/registry.js.map +1 -0
- package/dist/slots/slot.d.ts +5 -0
- package/dist/slots/slot.js +13 -0
- package/dist/slots/slot.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/async-for-each.d.ts +5 -0
- package/dist/utils/async-for-each.js +25 -0
- package/dist/utils/async-for-each.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/exceptions/extension-init-error.ts +1 -0
- package/exceptions/extension-load-error.ts +28 -0
- package/exceptions/extension-potential-circular.ts +24 -0
- package/exceptions/harmony-already-running.ts +1 -0
- package/exceptions/harmony-error.ts +1 -0
- package/exceptions/hook-not-found.ts +1 -0
- package/exceptions/index.ts +5 -0
- package/exceptions/runtime-not-defined.ts +0 -0
- package/extension/any-extension.ts +8 -0
- package/extension/decorator.ts +126 -0
- package/extension/extension-manifest.ts +51 -0
- package/extension/extension.ts +142 -0
- package/extension/index.ts +3 -0
- package/extension-graph/extension-graph.ts +165 -0
- package/extension-graph/from-extension.ts +72 -0
- package/extension-graph/index.ts +1 -0
- package/factory/extension-factory.ts +8 -0
- package/factory/index.ts +1 -0
- package/fixtures/aspects/babel/babel.aspect.ts +14 -0
- package/fixtures/aspects/babel/babel.cli.ts +16 -0
- package/fixtures/aspects/react/react.aspect.ts +22 -0
- package/fixtures/aspects/react/react.cli.ts +26 -0
- package/fixtures/aspects/react/react.ui.ts +16 -0
- package/fixtures/aspects/ui/ui.aspect.ts +13 -0
- package/fixtures/aspects/ui/ui.ui.ts +11 -0
- package/fixtures/babel/babel.extension.ts +20 -0
- package/fixtures/babel/index.ts +0 -0
- package/fixtures/base-compiler/base-compiler.extension.ts +31 -0
- package/fixtures/base-compiler/index.ts +1 -0
- package/fixtures/cli/cli.extension.ts +25 -0
- package/fixtures/cli/command.ts +6 -0
- package/fixtures/cli/index.ts +1 -0
- package/fixtures/typescript/index.ts +0 -0
- package/fixtures/typescript/typescript.ts +20 -0
- package/harmony-config/config-reader.ts +17 -0
- package/harmony-config/exceptions/index.ts +1 -0
- package/harmony-config/exceptions/read-config-error.ts +9 -0
- package/harmony-config/harmony-config.ts +49 -0
- package/harmony-config/index.ts +1 -0
- package/harmony-config/locator.ts +0 -0
- package/harmony.docs.mdx +250 -0
- package/harmony.spec.old.ts +177 -0
- package/harmony.ts +148 -0
- package/index.ts +13 -0
- package/package.json +68 -0
- package/readme.md +80 -0
- package/runtimes/exceptions/index.ts +2 -0
- package/runtimes/exceptions/runtime-module-error.ts +9 -0
- package/runtimes/exceptions/runtime-not-defined.ts +5 -0
- package/runtimes/index.ts +3 -0
- package/runtimes/runtime-definition.ts +32 -0
- package/runtimes/runtime-manifest.ts +12 -0
- package/runtimes/runtimes.ts +34 -0
- package/slots/index.ts +2 -0
- package/slots/registry.ts +36 -0
- package/slots/slot.ts +11 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
- package/types.ts +7 -0
- package/utils/async-for-each.ts +10 -0
- package/utils/index.ts +1 -0
package/aspect.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SlotProvider } from './slots';
|
|
2
|
+
import { RuntimeManifest } from './runtimes/runtime-manifest';
|
|
3
|
+
import { RuntimeDefinition } from './runtimes';
|
|
4
|
+
|
|
5
|
+
export type AspectManifest = {
|
|
6
|
+
id: string,
|
|
7
|
+
dependencies?: Aspect[],
|
|
8
|
+
slots?: SlotProvider<unknown>[],
|
|
9
|
+
defaultConfig?: {[key: string]: any},
|
|
10
|
+
declareRuntime?: RuntimeDefinition,
|
|
11
|
+
files?: string[]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export class Aspect {
|
|
15
|
+
constructor(
|
|
16
|
+
public id: string,
|
|
17
|
+
public dependencies: Aspect[],
|
|
18
|
+
readonly slots: SlotProvider<unknown>[],
|
|
19
|
+
readonly defaultConfig = {},
|
|
20
|
+
readonly declareRuntime: RuntimeDefinition|undefined,
|
|
21
|
+
readonly files: string[]
|
|
22
|
+
) {}
|
|
23
|
+
|
|
24
|
+
private _runtimes: RuntimeManifest[] = [];
|
|
25
|
+
|
|
26
|
+
addRuntime(runtimeManifest: RuntimeManifest) {
|
|
27
|
+
this._runtimes.push(runtimeManifest);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getRuntime(runtimeDef: RuntimeDefinition): undefined|RuntimeManifest {
|
|
32
|
+
return this._runtimes.find((runtime) => {
|
|
33
|
+
if (typeof runtime.runtime === 'string') return runtime.runtime === runtimeDef.name;
|
|
34
|
+
return runtime.runtime.name === runtimeDef.name;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
getRuntimes(): RuntimeManifest[] {
|
|
39
|
+
return this._runtimes;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static create(manifest: AspectManifest) {
|
|
43
|
+
return new Aspect(
|
|
44
|
+
manifest.id,
|
|
45
|
+
manifest.dependencies || [],
|
|
46
|
+
manifest.slots || [],
|
|
47
|
+
manifest.defaultConfig,
|
|
48
|
+
manifest.declareRuntime,
|
|
49
|
+
manifest.files || []
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
package/config/config.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export class Config {
|
|
2
|
+
constructor(
|
|
3
|
+
readonly raw: Map<string, object>
|
|
4
|
+
) {}
|
|
5
|
+
|
|
6
|
+
toObject() {
|
|
7
|
+
return Array.from(this.raw.entries()).reduce<any>((acc, [id, config]) => {
|
|
8
|
+
acc[id] = config;
|
|
9
|
+
return acc;
|
|
10
|
+
}, {});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* set an extension config to the registry.
|
|
15
|
+
* @param id extension id
|
|
16
|
+
* @param config plain config object
|
|
17
|
+
*/
|
|
18
|
+
set(id: string, config: object) {
|
|
19
|
+
this.raw.set(id, config);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* get a config entry
|
|
24
|
+
* @param id extension id.
|
|
25
|
+
*/
|
|
26
|
+
get(id: string) {
|
|
27
|
+
return this.raw.get(id);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* instantiate from a plain config-like object.
|
|
32
|
+
*/
|
|
33
|
+
static from(raw: { [key: string]: object }) {
|
|
34
|
+
return new Config(new Map(Object.entries(raw)));
|
|
35
|
+
}
|
|
36
|
+
}
|
package/config/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Config } from './config';
|
package/container.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Extension } from './extension/extension';
|
|
2
|
+
|
|
3
|
+
export default class Container {
|
|
4
|
+
constructor(private instances = new Map()) {}
|
|
5
|
+
|
|
6
|
+
register<AnyExtension>(token: string, instance: AnyExtension) {
|
|
7
|
+
this.instances.set(token, instance);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
resolve<AnyExtension>(token: string) {
|
|
11
|
+
return this.instances.get(token);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static loadWith(defaults: Extension[]) {
|
|
15
|
+
const extensionMap = new Map(defaults.map(extension => [extension.name, extension]));
|
|
16
|
+
|
|
17
|
+
return new Container(extensionMap);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// A -> B -> C
|
|
21
|
+
// A -> C
|
|
22
|
+
// instantiate A then B and C
|
package/dist/aspect.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SlotProvider } from './slots';
|
|
2
|
+
import { RuntimeManifest } from './runtimes/runtime-manifest';
|
|
3
|
+
import { RuntimeDefinition } from './runtimes';
|
|
4
|
+
export type AspectManifest = {
|
|
5
|
+
id: string;
|
|
6
|
+
dependencies?: Aspect[];
|
|
7
|
+
slots?: SlotProvider<unknown>[];
|
|
8
|
+
defaultConfig?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
declareRuntime?: RuntimeDefinition;
|
|
12
|
+
files?: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare class Aspect {
|
|
15
|
+
id: string;
|
|
16
|
+
dependencies: Aspect[];
|
|
17
|
+
readonly slots: SlotProvider<unknown>[];
|
|
18
|
+
readonly defaultConfig: {};
|
|
19
|
+
readonly declareRuntime: RuntimeDefinition | undefined;
|
|
20
|
+
readonly files: string[];
|
|
21
|
+
constructor(id: string, dependencies: Aspect[], slots: SlotProvider<unknown>[], defaultConfig: {}, declareRuntime: RuntimeDefinition | undefined, files: string[]);
|
|
22
|
+
private _runtimes;
|
|
23
|
+
addRuntime(runtimeManifest: RuntimeManifest): this;
|
|
24
|
+
getRuntime(runtimeDef: RuntimeDefinition): undefined | RuntimeManifest;
|
|
25
|
+
getRuntimes(): RuntimeManifest[];
|
|
26
|
+
static create(manifest: AspectManifest): Aspect;
|
|
27
|
+
}
|
package/dist/aspect.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Aspect = void 0;
|
|
4
|
+
class Aspect {
|
|
5
|
+
constructor(id, dependencies, slots, defaultConfig = {}, declareRuntime, files) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.dependencies = dependencies;
|
|
8
|
+
this.slots = slots;
|
|
9
|
+
this.defaultConfig = defaultConfig;
|
|
10
|
+
this.declareRuntime = declareRuntime;
|
|
11
|
+
this.files = files;
|
|
12
|
+
this._runtimes = [];
|
|
13
|
+
}
|
|
14
|
+
addRuntime(runtimeManifest) {
|
|
15
|
+
this._runtimes.push(runtimeManifest);
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
getRuntime(runtimeDef) {
|
|
19
|
+
return this._runtimes.find((runtime) => {
|
|
20
|
+
if (typeof runtime.runtime === 'string')
|
|
21
|
+
return runtime.runtime === runtimeDef.name;
|
|
22
|
+
return runtime.runtime.name === runtimeDef.name;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
getRuntimes() {
|
|
26
|
+
return this._runtimes;
|
|
27
|
+
}
|
|
28
|
+
static create(manifest) {
|
|
29
|
+
return new Aspect(manifest.id, manifest.dependencies || [], manifest.slots || [], manifest.defaultConfig, manifest.declareRuntime, manifest.files || []);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Aspect = Aspect;
|
|
33
|
+
//# sourceMappingURL=aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect.js","sourceRoot":"","sources":["../aspect.ts"],"names":[],"mappings":";;;AAaA,MAAa,MAAM;IACjB,YACS,EAAU,EACV,YAAsB,EACpB,KAA8B,EAC9B,gBAAgB,EAAE,EAClB,cAA2C,EAC3C,KAAe;QALjB,OAAE,GAAF,EAAE,CAAQ;QACV,iBAAY,GAAZ,YAAY,CAAU;QACpB,UAAK,GAAL,KAAK,CAAyB;QAC9B,kBAAa,GAAb,aAAa,CAAK;QAClB,mBAAc,GAAd,cAAc,CAA6B;QAC3C,UAAK,GAAL,KAAK,CAAU;QAGlB,cAAS,GAAsB,EAAE,CAAC;IAFvC,CAAC;IAIJ,UAAU,CAAC,eAAgC;QACzC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,UAAU,CAAC,UAA6B;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YACrC,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ;gBAAE,OAAO,OAAO,CAAC,OAAO,KAAK,UAAU,CAAC,IAAI,CAAC;YACpF,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAwB;QACpC,OAAO,IAAI,MAAM,CACf,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,YAAY,IAAI,EAAE,EAC3B,QAAQ,CAAC,KAAK,IAAI,EAAE,EACpB,QAAQ,CAAC,aAAa,EACtB,QAAQ,CAAC,cAAc,EACvB,QAAQ,CAAC,KAAK,IAAI,EAAE,CACrB,CAAC;IACJ,CAAC;CACF;AAtCD,wBAsCC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class Config {
|
|
2
|
+
readonly raw: Map<string, object>;
|
|
3
|
+
constructor(raw: Map<string, object>);
|
|
4
|
+
toObject(): any;
|
|
5
|
+
/**
|
|
6
|
+
* set an extension config to the registry.
|
|
7
|
+
* @param id extension id
|
|
8
|
+
* @param config plain config object
|
|
9
|
+
*/
|
|
10
|
+
set(id: string, config: object): void;
|
|
11
|
+
/**
|
|
12
|
+
* get a config entry
|
|
13
|
+
* @param id extension id.
|
|
14
|
+
*/
|
|
15
|
+
get(id: string): object;
|
|
16
|
+
/**
|
|
17
|
+
* instantiate from a plain config-like object.
|
|
18
|
+
*/
|
|
19
|
+
static from(raw: {
|
|
20
|
+
[key: string]: object;
|
|
21
|
+
}): Config;
|
|
22
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Config = void 0;
|
|
4
|
+
class Config {
|
|
5
|
+
constructor(raw) {
|
|
6
|
+
this.raw = raw;
|
|
7
|
+
}
|
|
8
|
+
toObject() {
|
|
9
|
+
return Array.from(this.raw.entries()).reduce((acc, [id, config]) => {
|
|
10
|
+
acc[id] = config;
|
|
11
|
+
return acc;
|
|
12
|
+
}, {});
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* set an extension config to the registry.
|
|
16
|
+
* @param id extension id
|
|
17
|
+
* @param config plain config object
|
|
18
|
+
*/
|
|
19
|
+
set(id, config) {
|
|
20
|
+
this.raw.set(id, config);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* get a config entry
|
|
24
|
+
* @param id extension id.
|
|
25
|
+
*/
|
|
26
|
+
get(id) {
|
|
27
|
+
return this.raw.get(id);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* instantiate from a plain config-like object.
|
|
31
|
+
*/
|
|
32
|
+
static from(raw) {
|
|
33
|
+
return new Config(new Map(Object.entries(raw)));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Config = Config;
|
|
37
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../config/config.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;IACjB,YACW,GAAwB;QAAxB,QAAG,GAAH,GAAG,CAAqB;IAChC,CAAC;IAEJ,QAAQ;QACN,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAM,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE;YACtE,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;YACjB,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,EAAU,EAAE,MAAc;QAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,GAA8B;QACxC,OAAO,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC;CACF;AAnCD,wBAmCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Config } from './config';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Config = void 0;
|
|
4
|
+
var config_1 = require("./config");
|
|
5
|
+
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Extension } from './extension/extension';
|
|
2
|
+
export default class Container {
|
|
3
|
+
private instances;
|
|
4
|
+
constructor(instances?: Map<any, any>);
|
|
5
|
+
register<AnyExtension>(token: string, instance: AnyExtension): void;
|
|
6
|
+
resolve<AnyExtension>(token: string): any;
|
|
7
|
+
static loadWith(defaults: Extension[]): Container;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Container {
|
|
4
|
+
constructor(instances = new Map()) {
|
|
5
|
+
this.instances = instances;
|
|
6
|
+
}
|
|
7
|
+
register(token, instance) {
|
|
8
|
+
this.instances.set(token, instance);
|
|
9
|
+
}
|
|
10
|
+
resolve(token) {
|
|
11
|
+
return this.instances.get(token);
|
|
12
|
+
}
|
|
13
|
+
static loadWith(defaults) {
|
|
14
|
+
const extensionMap = new Map(defaults.map(extension => [extension.name, extension]));
|
|
15
|
+
return new Container(extensionMap);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = Container;
|
|
19
|
+
// A -> B -> C
|
|
20
|
+
// A -> C
|
|
21
|
+
// instantiate A then B and C
|
|
22
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../container.ts"],"names":[],"mappings":";;AAEA,MAAqB,SAAS;IAC5B,YAAoB,YAAY,IAAI,GAAG,EAAE;QAArB,cAAS,GAAT,SAAS,CAAY;IAAG,CAAC;IAE7C,QAAQ,CAAe,KAAa,EAAE,QAAsB;QAC1D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,CAAe,KAAa;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,QAAqB;QACnC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAErF,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC;CACF;AAhBD,4BAgBC;AACD,cAAc;AACd,SAAS;AACT,6BAA6B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtensionInstantiationException = void 0;
|
|
4
|
+
class ExtensionInstantiationException extends Error {
|
|
5
|
+
}
|
|
6
|
+
exports.ExtensionInstantiationException = ExtensionInstantiationException;
|
|
7
|
+
//# sourceMappingURL=extension-init-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-init-error.js","sourceRoot":"","sources":["../../exceptions/extension-init-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,+BAAgC,SAAQ,KAAK;CAAG;AAA7D,0EAA6D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Extension } from '../extension/extension';
|
|
2
|
+
export default class ExtensionLoadError extends Error {
|
|
3
|
+
/**
|
|
4
|
+
* failed extension
|
|
5
|
+
*/
|
|
6
|
+
private extension;
|
|
7
|
+
/**
|
|
8
|
+
* extension error
|
|
9
|
+
*/
|
|
10
|
+
private originalError;
|
|
11
|
+
/**
|
|
12
|
+
* extension formatted / handled error message
|
|
13
|
+
*/
|
|
14
|
+
private msg?;
|
|
15
|
+
constructor(
|
|
16
|
+
/**
|
|
17
|
+
* failed extension
|
|
18
|
+
*/
|
|
19
|
+
extension: Extension,
|
|
20
|
+
/**
|
|
21
|
+
* extension error
|
|
22
|
+
*/
|
|
23
|
+
originalError: Error,
|
|
24
|
+
/**
|
|
25
|
+
* extension formatted / handled error message
|
|
26
|
+
*/
|
|
27
|
+
msg?: string);
|
|
28
|
+
toString(): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ExtensionLoadError extends Error {
|
|
4
|
+
constructor(
|
|
5
|
+
/**
|
|
6
|
+
* failed extension
|
|
7
|
+
*/
|
|
8
|
+
extension,
|
|
9
|
+
/**
|
|
10
|
+
* extension error
|
|
11
|
+
*/
|
|
12
|
+
originalError,
|
|
13
|
+
/**
|
|
14
|
+
* extension formatted / handled error message
|
|
15
|
+
*/
|
|
16
|
+
msg) {
|
|
17
|
+
super();
|
|
18
|
+
this.extension = extension;
|
|
19
|
+
this.originalError = originalError;
|
|
20
|
+
this.msg = msg;
|
|
21
|
+
}
|
|
22
|
+
toString() {
|
|
23
|
+
return `failed to load extension: ${this.extension.name} with error:
|
|
24
|
+
|
|
25
|
+
${this.msg || this.originalError.stack}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = ExtensionLoadError;
|
|
29
|
+
//# sourceMappingURL=extension-load-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-load-error.js","sourceRoot":"","sources":["../../exceptions/extension-load-error.ts"],"names":[],"mappings":";;AAEA,MAAqB,kBAAmB,SAAQ,KAAK;IACnD;IACE;;OAEG;IACK,SAAoB;IAE5B;;OAEG;IACK,aAAoB;IAE5B;;OAEG;IACK,GAAY;QAEpB,KAAK,EAAE,CAAC;QAZA,cAAS,GAAT,SAAS,CAAW;QAKpB,kBAAa,GAAb,aAAa,CAAO;QAKpB,QAAG,GAAH,GAAG,CAAS;IAGtB,CAAC;IAED,QAAQ;QACN,OAAO,6BAA6B,IAAI,CAAC,SAAS,CAAC,IAAI;;EAEzD,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC;CACF;AAzBD,qCAyBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Extension } from '../extension/extension';
|
|
2
|
+
import { HarmonyError } from './harmony-error';
|
|
3
|
+
export default class ExtensionPotentialCircular extends HarmonyError {
|
|
4
|
+
/**
|
|
5
|
+
* failed extension
|
|
6
|
+
*/
|
|
7
|
+
private extension;
|
|
8
|
+
/**
|
|
9
|
+
* valid extensions dependencies
|
|
10
|
+
*/
|
|
11
|
+
private validDeps;
|
|
12
|
+
constructor(
|
|
13
|
+
/**
|
|
14
|
+
* failed extension
|
|
15
|
+
*/
|
|
16
|
+
extension: Extension,
|
|
17
|
+
/**
|
|
18
|
+
* valid extensions dependencies
|
|
19
|
+
*/
|
|
20
|
+
validDeps: Extension[]);
|
|
21
|
+
toString(): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const harmony_error_1 = require("./harmony-error");
|
|
4
|
+
class ExtensionPotentialCircular extends harmony_error_1.HarmonyError {
|
|
5
|
+
constructor(
|
|
6
|
+
/**
|
|
7
|
+
* failed extension
|
|
8
|
+
*/
|
|
9
|
+
extension,
|
|
10
|
+
/**
|
|
11
|
+
* valid extensions dependencies
|
|
12
|
+
*/
|
|
13
|
+
validDeps) {
|
|
14
|
+
super();
|
|
15
|
+
this.extension = extension;
|
|
16
|
+
this.validDeps = validDeps;
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
return `Failed to load the dependencies for extension .
|
|
20
|
+
This may result from a wrong import or from circular dependencies in imports.
|
|
21
|
+
The following dependencies succeeded loading:`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = ExtensionPotentialCircular;
|
|
25
|
+
//# sourceMappingURL=extension-potential-circular.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-potential-circular.js","sourceRoot":"","sources":["../../exceptions/extension-potential-circular.ts"],"names":[],"mappings":";;AACA,mDAA+C;AAE/C,MAAqB,0BAA2B,SAAQ,4BAAY;IAClE;IACE;;OAEG;IACK,SAAoB;IAE5B;;OAEG;IACK,SAAsB;QAE9B,KAAK,EAAE,CAAC;QAPA,cAAS,GAAT,SAAS,CAAW;QAKpB,cAAS,GAAT,SAAS,CAAa;IAGhC,CAAC;IAED,QAAQ;QACN,OAAO;;8CAEmC,CAAC;IAC7C,CAAC;CACF;AApBD,6CAoBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HarmonyAlreadyRunning = void 0;
|
|
4
|
+
class HarmonyAlreadyRunning extends Error {
|
|
5
|
+
}
|
|
6
|
+
exports.HarmonyAlreadyRunning = HarmonyAlreadyRunning;
|
|
7
|
+
//# sourceMappingURL=harmony-already-running.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harmony-already-running.js","sourceRoot":"","sources":["../../exceptions/harmony-already-running.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAsB,SAAQ,KAAK;CAAG;AAAnD,sDAAmD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harmony-error.js","sourceRoot":"","sources":["../../exceptions/harmony-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;CAAG;AAA1C,oCAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-not-found.js","sourceRoot":"","sources":["../../exceptions/hook-not-found.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;CAAG;AAA1C,oCAA0C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ExtensionLoadError } from './extension-load-error';
|
|
2
|
+
export { default as ExtensionPotentialCircular } from './extension-potential-circular';
|
|
3
|
+
export { HarmonyAlreadyRunning } from './harmony-already-running';
|
|
4
|
+
export { HookNotFound } from './hook-not-found';
|
|
5
|
+
export { ExtensionInstantiationException } from './extension-init-error';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExtensionInstantiationException = exports.HookNotFound = exports.HarmonyAlreadyRunning = exports.ExtensionPotentialCircular = exports.ExtensionLoadError = void 0;
|
|
7
|
+
var extension_load_error_1 = require("./extension-load-error");
|
|
8
|
+
Object.defineProperty(exports, "ExtensionLoadError", { enumerable: true, get: function () { return __importDefault(extension_load_error_1).default; } });
|
|
9
|
+
var extension_potential_circular_1 = require("./extension-potential-circular");
|
|
10
|
+
Object.defineProperty(exports, "ExtensionPotentialCircular", { enumerable: true, get: function () { return __importDefault(extension_potential_circular_1).default; } });
|
|
11
|
+
var harmony_already_running_1 = require("./harmony-already-running");
|
|
12
|
+
Object.defineProperty(exports, "HarmonyAlreadyRunning", { enumerable: true, get: function () { return harmony_already_running_1.HarmonyAlreadyRunning; } });
|
|
13
|
+
var hook_not_found_1 = require("./hook-not-found");
|
|
14
|
+
Object.defineProperty(exports, "HookNotFound", { enumerable: true, get: function () { return hook_not_found_1.HookNotFound; } });
|
|
15
|
+
var extension_init_error_1 = require("./extension-init-error");
|
|
16
|
+
Object.defineProperty(exports, "ExtensionInstantiationException", { enumerable: true, get: function () { return extension_init_error_1.ExtensionInstantiationException; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../exceptions/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAuE;AAA9D,2IAAA,OAAO,OAAsB;AACtC,+EAAuF;AAA9E,2JAAA,OAAO,OAA8B;AAC9C,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+DAAyE;AAAhE,uIAAA,+BAA+B,OAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=runtime-not-defined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-not-defined.js","sourceRoot":"","sources":["../../exceptions/runtime-not-defined.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Class extension of type any. this class is indended for use inside Harmony
|
|
5
|
+
* where extension generics type relevance is low.
|
|
6
|
+
*/
|
|
7
|
+
// export class AnyExtension extends Extension {}
|
|
8
|
+
//# sourceMappingURL=any-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any-extension.js","sourceRoot":"","sources":["../../extension/any-extension.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AAEH,iDAAiD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ExtensionManifest } from "./extension-manifest";
|
|
2
|
+
export type ExtensionOptions = {
|
|
3
|
+
dependencies?: ExtensionManifest[];
|
|
4
|
+
name?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* decorator for an Harmony extension.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ExtensionDecorator({ name, dependencies }?: ExtensionOptions): <T extends {
|
|
10
|
+
new (...args: any[]): {};
|
|
11
|
+
}>(constructor: T) => void;
|
|
12
|
+
export declare function provider(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
13
|
+
export declare function register(extension: ExtensionManifest, name?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
14
|
+
export declare function createHook(): {
|
|
15
|
+
(target: any, propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
16
|
+
hash: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function hook(name?: string): (target: any, propertyKey: string) => void;
|
|
19
|
+
export declare class HookRegistry<T> {
|
|
20
|
+
private fillers;
|
|
21
|
+
readonly hash?: string;
|
|
22
|
+
constructor(fillers: T[], hash?: string);
|
|
23
|
+
register(filler: T): void;
|
|
24
|
+
list(): T[];
|
|
25
|
+
static of<T>(hook: any): HookRegistry<T>;
|
|
26
|
+
static create<T>(): HookRegistry<T>;
|
|
27
|
+
}
|