-
Notifications
You must be signed in to change notification settings - Fork 39
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
Load plugins by entrypoint urls if defined #613
Conversation
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
@@ -85,7 +85,8 @@ 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 entryPoint = pluginDefinition.getBasePlugin().getWebEntryPoint() || 'main.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended behaviour? When webContent is not present, you set entryPoint to undefined (https://github.com/zowe/zlux-platform/pull/105/files#diff-46e106c34def1f9496bcb38ec7bd10d61c9631a6c8ee643a0ce96fbe6b46a8e0R187) , but this line 88 defaults to 'main.js' regardless then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if webContent is not present, they have an invalid angular plugin and schema validation will fail it upon startup.
if somehow that passes, it becomes no worse than the prior state: main.js is attempted, a 404 is given, and the window in the desktop is blank. no other failure state seems much better given time investment in the unlikely subject
@@ -28,7 +28,8 @@ 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 entryPoint = pluginDefinition.getBasePlugin().getWebEntryPoint() || 'main.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Also, this PR should probably be part of #614 (or both need to go int oV3 branch eventually) |
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
This PR makes use of zowe/zlux-app-server#308 and zowe/zlux-platform#105 to load the correct entrypoint JS file for native plugins.
It is merely an example as this branch does not have the latest v3 code so it will cause code conflict.