You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the #433/#435 landing-page work, startup seeds /index.html, /.acl, and /index.html.acl into DATA_ROOT (skip-if-exists). This also happens in --public mode, where:
WAC is bypassed, so the seeded ACLs are never consulted — they are dead files.
For the serve-a-directory use case that --public was created for (#107 explicitly lists the jsserve wrapper as a primary motivation: "use JSS as a simple 'just serve this folder' tool like npx serve"), this writes three files into the user's project directory.
Reproduced with jss start --root <dir> --public on 0.0.210: the served tree gains index.html, .acl, index.html.acl. This regressed servejss's "like serve" behaviour — early JSS versions left the served directory untouched.
Fix
Skip seedServerRoot when options.public is set, alongside the existing read-only skip (src/server.js). Operators who want a landing page in public mode can still create /index.html by hand — skip-if-exists already honours it. Regression tests in test/server-root.test.js (public mode seeds nothing; container listing + file reads still work).
The two features were built for disjoint audiences — the landing page for pod providers (#276 / #303: "new pod providers had to build a landing page from scratch"), --public for serve-style file serving (#107) — and no point in the #276→#435 design history considered the --public case, so the collision is an oversight rather than a decision.
Considered alternatives
Explicit --no-root-page flag — leaves bare jss --public polluted by default (the exact complaint) and adds plumbing; explicitness only helps when the default is right.
servejss deletes seeded files post-start — racy, churns file watchers, risks deleting a legitimate user-owned index.html unless it fingerprints the template.
Virtual (never-written) landing page — the deeper Default index.html for server root #276 redesign; orthogonal and can layer on later, at which point the public-mode skip becomes redundant rather than wrong.
Problem
Since the #433/#435 landing-page work, startup seeds
/index.html,/.acl, and/index.html.aclinto DATA_ROOT (skip-if-exists). This also happens in--publicmode, where:For the serve-a-directory use case that
--publicwas created for (#107 explicitly lists the jsserve wrapper as a primary motivation: "use JSS as a simple 'just serve this folder' tool like npx serve"), this writes three files into the user's project directory.Reproduced with
jss start --root <dir> --publicon 0.0.210: the served tree gainsindex.html,.acl,index.html.acl. This regressed servejss's "likeserve" behaviour — early JSS versions left the served directory untouched.Fix
Skip
seedServerRootwhenoptions.publicis set, alongside the existing read-only skip (src/server.js). Operators who want a landing page in public mode can still create/index.htmlby hand — skip-if-exists already honours it. Regression tests intest/server-root.test.js(public mode seeds nothing; container listing + file reads still work).The two features were built for disjoint audiences — the landing page for pod providers (#276 / #303: "new pod providers had to build a landing page from scratch"),
--publicfor serve-style file serving (#107) — and no point in the #276→#435 design history considered the--publiccase, so the collision is an oversight rather than a decision.Considered alternatives
--no-root-pageflag — leaves barejss --publicpolluted by default (the exact complaint) and adds plumbing; explicitness only helps when the default is right.index.htmlunless it fingerprints the template.Refs #107, #276, #433, #435, #459, #108.