@flowscripter/dynamic-plugin-framework 1.3.4 → 1.3.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/package.json
CHANGED
|
@@ -12,7 +12,6 @@ import type PluginRepository from "./plugin_repository/PluginRepository.ts";
|
|
|
12
12
|
export default class DefaultPluginManager implements PluginManager {
|
|
13
13
|
private readonly extensionPointRegistry: ExtensionPointRegistry;
|
|
14
14
|
private readonly extensionRegistry: ExtensionRegistry;
|
|
15
|
-
private readonly pluginRepositories: Array<PluginRepository>;
|
|
16
15
|
private readonly pluginRepositoriesByExtensionHandle = new Map<
|
|
17
16
|
string,
|
|
18
17
|
PluginRepository
|
|
@@ -29,11 +28,10 @@ export default class DefaultPluginManager implements PluginManager {
|
|
|
29
28
|
* {@link InMemoryExtensionRegistry}
|
|
30
29
|
*/
|
|
31
30
|
public constructor(
|
|
32
|
-
pluginRepositories: Array<PluginRepository>,
|
|
31
|
+
private readonly pluginRepositories: Array<PluginRepository>,
|
|
33
32
|
extensionPointRegistry?: ExtensionPointRegistry,
|
|
34
33
|
extensionRegistry?: ExtensionRegistry,
|
|
35
34
|
) {
|
|
36
|
-
this.pluginRepositories = pluginRepositories;
|
|
37
35
|
this.extensionPointRegistry = extensionPointRegistry ||
|
|
38
36
|
new InMemoryExtensionPointRegistry();
|
|
39
37
|
this.extensionRegistry = extensionRegistry ||
|
|
@@ -9,7 +9,6 @@ import UrlPluginSource from "./UrlPluginSource.ts";
|
|
|
9
9
|
* When scanning for Plugins each provided URL will be used to attempt to load a Plugin and examine it.
|
|
10
10
|
*/
|
|
11
11
|
export default class UrlListPluginRepository implements PluginRepository {
|
|
12
|
-
private readonly urls: Set<string>;
|
|
13
12
|
private readonly pluginSource = new UrlPluginSource();
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,11 +16,10 @@ export default class UrlListPluginRepository implements PluginRepository {
|
|
|
17
16
|
*
|
|
18
17
|
* @throws *Error* if the URL set contains a non-valid URL.
|
|
19
18
|
*/
|
|
20
|
-
public constructor(urls: Set<string>) {
|
|
19
|
+
public constructor(private readonly urls: Set<string>) {
|
|
21
20
|
if (!urls || (urls.size === 0)) {
|
|
22
21
|
throw new Error(`Undefined or empty set of URLs provided`);
|
|
23
22
|
}
|
|
24
|
-
this.urls = urls;
|
|
25
23
|
this.urls.forEach((url) => {
|
|
26
24
|
try {
|
|
27
25
|
new URL(url);
|