-
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
Merged
DivergentEuropeans
merged 4 commits into
v3.x/staging
from
example/v3/customizable-entrypoint-url
Aug 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7e06e4b
Example of how to customize entrypoint urls
1000TurquoisePogs 2540a79
Update angular2-plugin-factory.ts to handle missing entrypoint
1000TurquoisePogs eeec2b0
Update react-plugin-factory.ts to handle missing entrypoint
1000TurquoisePogs 6eca934
Merge branch 'v3.x/staging' into example/v3/customizable-entrypoint-url
DivergentEuropeans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefinition.getBasePlugin(), entryPoint); | ||
} | ||
|
||
private static getReactComponentsURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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