| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
) loadConfig merges both keys from config.json, but the explicit createServer allowlist in bin/jss.js omitted them — so the documented 'declare the apps in config' route (#206/#589, docs/configuration.md) silently booted a server with no plugins, exactly the missing-app failure mode the loader was designed to refuse. Same for appPaths (#582). Verified: jss start -c config.json with a plugins entry now mounts the app (route responds, config delivered to activate); before the fix the same config booted with a 404 on the plugin route.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
The CLI config-file plugins block, first item remaining from #206 (#592, #593): bin/jss.js now forwards plugins and appPaths from the loaded config to createServer, so jss start -c config.json mounts the declared apps instead of silently booting without them. The documented 'declare the apps in config' route works from the CLI, and CLI drivers like servejss can now reach the plugin loader through a config file. No config auto-loading: plugins execute only from a file explicitly passed with -c. Remaining from #206: a repeatable --plugin CLI flag and a pluginDataDir override so served trees don't collect .plugins/ (both scoped in #592), #583 raw-body mode, #564 feature migration.
| Back | FazBrowse Home | New Git URL |
Fixes #592.
Problem
loadConfig merges plugins (#589) and appPaths (#582) from config.json, but the explicit allowlist bin/jss.js passes to createServer(...) omitted both — so the documented config-file route ("declare the apps in config and the server imports, mounts, and tears them down itself") silently booted a server with no plugins and no error. That's exactly the silent-missing-app failure mode src/plugins.js was designed to refuse, and it left the #206 loader programmatic-only: nothing driving JSS through the CLI (including servejss) could mount plugins.
Fix
Forward both keys in the createServer call. createServer already defaults each when undefined (Array.isArray guards), so configs that don't set them are unaffected.
Verified (A/B)
Config with {"plugins": [{"module": "…/hello-plugin.mjs", "prefix": "/hello-app", "config": {"greeting": "hi"}}]}:
Also confirmed a bad module path now fails the boot loudly through the CLI, as the loader intends.
Follow-ups from #592 (repeatable --plugin CLI flag; pluginDataDir override so servejss-served trees don't collect .plugins/) left for separate PRs.