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

Making ZOS module visible by default when running on ZOS in embedded JS #384

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

JoeNemo
Copy link
Contributor

@JoeNemo JoeNemo commented Jul 6, 2023

configmgr runs scripts in two ways. top levels scripts are run assuming ES6 module loading. Embedded scripts inside yaml get a fixed environment w/o module loading, but some pre-loaded modules onto the "globalThis". This change adds the "zos" module to the preloads for embedded scripts.

Type of change

Please delete options that are not relevant.

  • [ x] New feature (non-breaking change which adds functionality)

PR Checklist

Please delete options that are not relevant.

  • [ x] If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.

  • [ x] My code follows the style guidelines of this project (see: Contributing guideline)

  • [x ] My changes generate no new warnings

  • [ x] I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

run configmgr with -embeddedScript arg to test

Copy link
Member

@1000TurquoisePogs 1000TurquoisePogs left a comment

Choose a reason for hiding this comment

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

This allows me to template ${{ zos.resolveSymbol('&SYSNAME') }} which is very useful to me.

Make sure to update the CHANGELOG.md https://github.com/zowe/zowe-common-c/blob/feature/embedzos/CHANGELOG.md with an enhancement note for 2.10.

JoeNemo and others added 2 commits July 6, 2023 16:13
Signed-off-by: JoeNemo <joe.devlin@gmail.com>
Signed-off-by: 1000TurquoisePogs <sgrady@rocketsoftware.com>
@1000TurquoisePogs 1000TurquoisePogs merged commit f1c4856 into v2.x/staging Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants