Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load plugins by entrypoint urls if defined #613

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ class SimpleAngularComponentFactory extends ComponentFactory {
export class Angular2PluginFactory extends PluginFactory {
private readonly logger: ZLUX.ComponentLogger = BaseLogger;
private static getAngularModuleURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefinition.getBasePlugin(), 'main.js');
let pluginDefBase = pluginDefinition.getBasePlugin();
let pluginDefAny:any = (pluginDefBase as any);
let entryPoint = 'main.js';
if (pluginDefAny.getWebEntryPoint) {
entryPoint = pluginDefAny.getWebEntryPoint() || 'main.js';
}
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefBase, entryPoint);
}

private static getAngularComponentsURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ interface MvdNativeReactPluginComponentDefinition {
export class ReactPluginFactory extends PluginFactory {
private readonly logger: ZLUX.ComponentLogger = BaseLogger;
private static getReactModuleURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
// TODO: clean this up with .d.ts file
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefinition.getBasePlugin(), 'main.js');
let pluginDefBase = pluginDefinition.getBasePlugin();
let pluginDefAny:any = (pluginDefBase as any);
let entryPoint = 'main.js';
if (pluginDefAny.getWebEntryPoint) {
entryPoint = pluginDefAny.getWebEntryPoint() || 'main.js';
}
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefBase, entryPoint);
}

private static getReactComponentsURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
Expand Down
Loading