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

Feature/v3/entrypoint schema #308

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

1000TurquoisePogs
Copy link
Member

This PR adds a new v3 feature, which appears to be compatible with v2 schema when tested, that you can declare where your plugin entry JS file is for the desktop to load.
This is designed to let you ship a plugin which is compatible with multiple versions of the desktop.

Consider the webcontent section of the sample-angular-app https://github.com/zowe/sample-angular-app/blob/129fc6ca4d06089bb55e0c879782d35c6b751264/pluginDefinition.json#L9

If you add an "entryPoint" section within, then you can state to the Desktop where your entry point file is for each version of Zowe.
v2 is fixed to "web/main.js", but v3 could be variable by this property.
In the example below, the v3 Desktop should load "web/v3assets/main.mjs"

  "webContent": {
    "framework": "angular",
    "launchDefinition": {
      "pluginShortNameKey": "sampleangular",
      "pluginShortNameDefault": "Angular Sample",
      "imageSrc": "assets/icon.png"
    },
    "entryPoint": {
      "2.0": "main.js",
      "3.0": "v3assets/main.mjs"
    },
    "descriptionKey": "sampleangulardescription",
    "descriptionDefault": "Sample App Showcasing Angular Adapter",
    "defaultWindowStyle": {
      "width": 850,
      "height": 540
    }
  },

Copy link
Member

@DivergentEuropeans DivergentEuropeans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is difficult to review because the real description appears to be "V2 --> V3 update + schema change"

The smaller portion of the schema bits lgtm so approving

"description": "Describes a path, relative to the app's '/web' folder in the browser, where the main file is that will be loaded by the Zowe Desktop. This is assumed to be 'main.js' for Zowe versions older than v3 but allows you to ship multiple entryPoints to target different versions of Zowe",
"additionalProperties": false,
"properties": {
"2.0": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be for 2.0, 3.0 won't be for 3.0 etc. this will be for V2 or V3 right? So let's change it to
"v2" or "2" and "v3" or "3"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its intended to be a version number, so that if a change is needed there can be a "3.1", "3.2", etc.

README.md Outdated
@@ -49,6 +49,8 @@ To build the App Server and Apps, the following is required:

* **NodeJS** - v14.x minimum (except v14.17.2) up to v16.x

Note & TODO: Node 17+ will fail on Windows when running full zlux build, [more information in this thread.](https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported). An upgrade solution needs to be applied across multiple failing components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause conflicts because updated V2 readme that should be V3 has some of this stuff, but it's ok. Will be simple to merge

@1000TurquoisePogs 1000TurquoisePogs merged commit 5a162b8 into v3.x/staging Aug 27, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants