IS-10950 reading listing template from env-var, previever script impr.#57
IS-10950 reading listing template from env-var, previever script impr.#57
Conversation
There was a problem hiding this comment.
Pull request overview
Enables selecting the Identity Server preview “listing template” via the LISTING_TEMPLATE environment variable.
Changes:
- Update
previewer.jsto append-l <LISTING_TEMPLATE>to the Java process args when the env var is set. - Replace string throws with
Errorinstances for required argument validation. - Align
package-lock.jsonworkspaces with the current repo layout (removes non-existentsrc/login-web-appentry).
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/identity-server/previewer.js |
Adds env-var-driven listing template argument and improves error throwing style. |
package-lock.json |
Updates workspace list to match the repository’s existing workspaces. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/identity-server/previewer.js
Outdated
|
|
||
| if (process.env.LISTING_TEMPLATE) { | ||
| procArgs.push('-l'); | ||
| procArgs.push(process.env.LISTING_TEMPLATE) |
There was a problem hiding this comment.
Avoid automated semicolon insertion (92% of all statements in the enclosing function have an explicit semicolon).
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| procArgs.push(optionsOrArgv['additional-static-root']) | ||
| } | ||
|
|
||
| if (process.env.LISTING_TEMPLATE) { |
There was a problem hiding this comment.
I'm not familiar with this script, but would it make sense to pass this via optionsOrArgv, as with other things above?
There was a problem hiding this comment.
That would require to change all npm scripts to allow setting this param and because it's intended just for an internal use I think the env. var. is better approach here.
Co-authored-by: markoweb <2862929+markoweb@users.noreply.github.com>
Co-authored-by: markoweb <2862929+markoweb@users.noreply.github.com>
Add missing semicolons for ASI consistency
This PR is allowing to change the listing template by setting the
LISTING_TEMPLATEenv var.