[OpenNMS/opennms] e11fb0: NMS-20150: Load config env via loadEnv so gates ma...
Scott Theleman via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/jira/NMS-20150-fix-plugin-ui-issues-smoke/[email protected]> |
Branch: refs/heads/jira/NMS-20150-fix-plugin-ui-issues-smoke
Home: https://github.com/OpenNMS/opennms
Commit: e11fb0bd33e600555fd09fa2127c33c7c584e116
https://github.com/OpenNMS/opennms/commit/e11fb0bd33e600555fd09fa2127c33c7c584e116
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M ui/package.json
M ui/pnpm-lock.yaml
M ui/vite.config.menu.ts
M ui/vite.config.ts
Log Message:
-----------
NMS-20150: Load config env via loadEnv so gates match import.meta.env
The VITE_EXAMPLE_PLUGIN gate (and VITE_APP_LOGO_NAME /
VITE_SERVICENOW_PLUGIN_DIST) read process.env populated by dotenv from
only .env.local/.env, while app code reads import.meta.env which also
includes the mode files (.env.development[.local]). Putting the flag in
a mode file registered the route without the middleware, so the module
request fell through to the SPA fallback and returned index.html.
Switch both vite configs to defineConfig(({ mode }) => ...) with
loadEnv(mode, __dirname, ''), which reads exactly the file set Vite
gives app code; drop the dotenv dependency.
Commit: cccea42612c96fd78ebfae56f2f10a6fe5340afe
https://github.com/OpenNMS/opennms/commit/cccea42612c96fd78ebfae56f2f10a6fe5340afe
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M ui/eslint.config.js
M ui/package.json
M ui/packages/onms-ui-example-plugin/README.md
M ui/packages/onms-ui-example-plugin/package.json
A ui/packages/onms-ui-example-plugin/scripts/verify-dist.mjs
Log Message:
-----------
NMS-20150: Assert the built plugin artifact honors the externals contract
vite build exits 0 even when rollup-plugin-external-globals silently
bails (its transform returns early on a this.parse() failure, or when no
globals key appears as a substring of the code). Since the ids stay
external either way, a bail leaves a bare import in the ES output that
only breaks at runtime in the host browser — the CI gate previously only
proved the build ran.
Add scripts/verify-dist.mjs to the example package: fails if any
externalized id survives as a real import, or if the window.Vue /
window.OnmsUI rewrites are missing. Chain it into check:example-plugin,
document it in the README, and give **/scripts/**/*.mjs Node globals in
the eslint config.
Commit: 411ffb14f15f6c9bd33320128cce86f03b081828
https://github.com/OpenNMS/opennms/commit/411ffb14f15f6c9bd33320128cce86f03b081828
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M ui/packages/onms-ui-example-plugin/vite.config.ts
Log Message:
-----------
NMS-20150: Document why the redundant rollupOptions.external is kept
externalGlobals >= 0.13 installs its own resolver that already marks
every id in its map as external, so the explicit list is belt-and-braces:
it states the contract in standard rollup vocabulary and keeps older
plugin versions externalizing correctly.
Commit: c8b44ee4913c9b13e558e4554ffea321fc5ae626
https://github.com/OpenNMS/opennms/commit/c8b44ee4913c9b13e558e4554ffea321fc5ae626
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M ui/eslint.config.js
Log Message:
-----------
NMS-20150: Use primevue/** so the plugin PrimeVue ban crosses path levels
no-restricted-imports patterns are gitignore-style globs where * stops
at /, so primevue/* let deep subpaths like primevue/a/b escape the ban.
Commit: 718d845035c4af4e26c03e773ad10ae4792192aa
https://github.com/OpenNMS/opennms/commit/718d845035c4af4e26c03e773ad10ae4792192aa
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M ui/packages/onms-ui-example-plugin/package.json
M ui/pnpm-lock.yaml
Log Message:
-----------
NMS-20150: Declare rollup devDependency in the example plugin package
rollup-plugin-external-globals declares a rollup peerDependency
(^2.25.0 || ^3.3.0 || ^4.1.4) that was only satisfied via the hoisted
transitive dep from vite. This package is a template for external
plugin developers, so declare it explicitly rather than relying on
hoisting/auto-installed peers, which yarn and strict setups don't do.
Commit: 25320a9fa885a4b8a1245b4634e62d70ecc76c4b
https://github.com/OpenNMS/opennms/commit/25320a9fa885a4b8a1245b4634e62d70ecc76c4b
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M .gitignore
Log Message:
-----------
NMS-20150: Gitignore ui/*.local Vite env overrides
Both vite configs document .env.local / .env.development.local as the
place for dev-harness flags and machine-local paths, but nothing ignored
them. .env and .env.development stay tracked.
Commit: 1cb77e6c19fe73aae20f6b02a5a507b07e6fa984
https://github.com/OpenNMS/opennms/commit/1cb77e6c19fe73aae20f6b02a5a507b07e6fa984
Author: Scott Theleman <[email protected]>
Date: 2026-08-11 (Tue, 11 Aug 2026)
Changed paths:
M .circleci/main/jobs/build/build-ui.yml
Log Message:
-----------
NMS-20150: Run unit tests before the example-plugin contract check in CI
Surfaces test failures without waiting on the extra plugin
typecheck+build; build:all already ran, so ordering costs nothing.
Compare: https://github.com/OpenNMS/opennms/compare/192b10cf373d...1cb77e6c19fe
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs