• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

scriptype / writ-cms / 20903618537

11 Jan 2026 11:23PM UTC coverage: 30.125% (-3.0%) from 33.105%
20903618537

push

github

scriptype
Introduce no-rootDirectory-yet case (create)

This is the first onboarding case when desktop app will be used to init
writ. For now, add a new mode in the cli (create) that starts the CMS
without an initial state.

Speaking of which, now the cli delegates the watch mode's work to CMS.

Reasoning:
- If 'writ build' is entered, then it's ok to just run writ once
- If 'writ watch' is entered, it means we are entering the live preview
+ cms mode. So let the CMS handle the rest
- Because the CMS will anyway have to handle everything when writ is
started via desktop app

Speaking of which, now CMS server is not started within the routines of
ssg. CMS initialization logic is moved up to the clients (cli, desktop
(tbd)). This made the interior of the ssg immediately simpler. No need
for the routines-wrapping index. It's all index.js now. Injecting
cms.setState to watcher's onChange has also become simpler.

Now, since the CMS will be responsible to run build and watch, new api
endpoints, server routes and frontend modules are added. The prototype
CMS UI now has these new buttons:
- ssg.build()
- ssg.watch()
- get ssg options

SSG options is what's passed as initial state to the CMS from the CLI
(or other client). Currently, if no initial state is passed, meaning no
rootDirectory to run writ in, none of the new buttons (or any others)
work. But this is by design, for now. This case is going to evolve into
onboarding flow, where the user inputs the ssg options and more and then
watching and building will be triggered by the cms

While at it:
- Make the explore-panel (container of buttons) draggable
- Inject settings to watcher

419 of 3383 branches covered (12.39%)

Branch coverage included in aggregate %.

31 of 113 new or added lines in 12 files covered. (27.43%)

128 existing lines in 31 files now uncovered.

1262 of 2197 relevant lines covered (57.44%)

1533.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/cms/server/router/api/fileSystemTree.js
UNCOV
1
const express = require('express')
×
2

UNCOV
3
module.exports = express.Router()
×
4
  .get('/', async (req, res, next) => {
5
    try {
×
6
      res.status(200).json(
×
7
        await req.api.fileSystemTree.get()
8
      )
9
    } catch (e) {
10
      console.log('Error getting fileSystemTree', e)
×
11
      return res.status(500).send(e)
×
12
    }
13
  })
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc