[OpenNMS/opennms] c196fd: NMS-20150: Fix plugin UI dev-harness and vite conf...

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: c196fd74e435dd069366438bc7ce145751c56285
      https://github.com/OpenNMS/opennms/commit/c196fd74e435dd069366438bc7ce145751c56285
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M ui/packages/onms-ui-example-plugin/src/main.ts
    M ui/packages/onms-ui-example-plugin/vite.config.ts
    M ui/tests/onms-ui/OnmsTooltip.test.ts
    M ui/tests/onms-ui/exports.test.ts
    M ui/vite.config.menu.ts
    M ui/vite.config.ts

  Log Message:
  -----------
  NMS-20150: Fix plugin UI dev-harness and vite config review items

- Load .env.local (first-wins) in dotenv.config() so plugin dev-harness
  env vars work from .env.local as documented (both vite configs)
- Install the plugin dev middleware after Vite's internal middlewares so
  it sits behind the DNS-rebinding host check; match on req.originalUrl
  because Vite 6's SPA html fallback (which runs before post-hooks)
  rewrites req.url for Accept: */* requests
- Gate the exampleUiExtension middleware on VITE_EXAMPLE_PLUGIN to match
  its route registration in main.ts
- Use fileURLToPath instead of URL#pathname for aliases (pathname
  percent-encodes, breaking checkouts with spaces in the path)
- Give vite.config.menu.ts the same absolute ProductLogo alias fix that
  vite.config.ts already carries
- Add missing AGPL headers to files introduced by NMS-20054


  Commit: d267cb5b2408ad9ece93b28d75342e389826821a
      https://github.com/OpenNMS/opennms/commit/d267cb5b2408ad9ece93b28d75342e389826821a
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M .circleci/main/jobs/build/build-ui.yml
    M ui/eslint.config.js
    M ui/package.json
    M ui/packages/onms-ui/README.md

  Log Message:
  -----------
  NMS-20150: Run example plugin as a contract test in CI; extend PrimeVue ban to plugin code

- Add check:example-plugin (typecheck + build of
  @opennms/onms-ui-example-plugin) and run it in the build-ui CI job, so
  the reference plugin fails the build on any @opennms/onms-ui API drift
- Ban ALL primevue imports in plugin sources via no-restricted-imports
  (plugins compile against the host's window globals, which do not
  include PrimeVue)
- State the ban's actual scope in the onms-ui README


  Commit: 43a7be739571d7899fdcae1beed1526ea5011bdf
      https://github.com/OpenNMS/opennms/commit/43a7be739571d7899fdcae1beed1526ea5011bdf
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M ui/packages/onms-ui-example-plugin/README.md

  Log Message:
  -----------
  NMS-20150: Example plugin README fixes for external readers

- Note that @opennms/onms-ui is private/unpublished and the dependency
  pinning advice applies only once it is published; document the interim
  (build against the window.OnmsUI runtime contract)
- Correct the dev-harness URL to /#/example-plugin (hash history)
- Remove internal task numbering; point at the actual files wiring the
  dev harness
- Update the stale claim that no repo-root gate reaches this package
  (CI now runs pnpm check:example-plugin)


  Commit: 96aaf4fa38d36c118e14213c8a4f78a2c37c753a
      https://github.com/OpenNMS/opennms/commit/96aaf4fa38d36c118e14213c8a4f78a2c37c753a
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M ui/packages/onms-ui-example-plugin/README.md
    M ui/packages/onms-ui-example-plugin/package.json
    M ui/packages/onms-ui-example-plugin/vite.config.ts
    M ui/packages/onms-ui/README.md
    M ui/pnpm-lock.yaml

  Log Message:
  -----------
  NMS-20150: Replace vite-plugin-externals with rollup-plugin-external-globals

vite-plugin-externals last shipped in 2023 and pulled deprecated
transitive deps (sourcemap-codec 1.4, magic-string 0.25, es-module-lexer
0.4, fs-extra 10) into the lockfile — a poor recommendation for the
plugin-developer toolchain the example package documents.

rollup-plugin-external-globals (0.13.0, rollup 4 peer) does the same
import-to-window-global rewrite for ES-module output. Plain rollup
external + output.globals is NOT equivalent here: output.globals only
applies to umd/iife, and plugins must build ES modules for the host's
<script type=module> loader.

Verified in the dev harness: module loads, mounts, and renders against
window.OnmsUI with zero PrimeVue/Vue code bundled (6.3 kB output).


  Commit: 192b10cf373d7ef100a03c7d573da97ae6d9f6f1
      https://github.com/OpenNMS/opennms/commit/192b10cf373d7ef100a03c7d573da97ae6d9f6f1
  Author: Scott Theleman <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    M ui/eslint.config.js

  Log Message:
  -----------
  fix comments


Compare: https://github.com/OpenNMS/opennms/compare/c196fd74e435%5E...192b10cf373d

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.