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

scriptype / writ-cms / 27753299250

18 Jun 2026 10:28AM UTC coverage: 56.873% (+0.05%) from 56.828%
27753299250

push

github

scriptype
Keep fresh on all updates/creates

Implement a skipWatcher middleware that toggles the watcher's skipRun.

Use skipWatcher in all update/create endpoints, and manually trigger
build in all of them.

On the frontend, now fetchContentTree is called in onSubmitCreate*, just
like in onSubmitUpdate*. That refreshes the state (no actual necessity
atm). If create form turns into edit form after submit, this would be
useful.

A noticable unfresh case: manual file editing

645 of 1121 branches covered (57.54%)

Branch coverage included in aggregate %.

0 of 35 new or added lines in 7 files covered. (0.0%)

8 existing lines in 5 files now uncovered.

2247 of 3964 relevant lines covered (56.69%)

1642.39 hits per line

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

0.0
/src/cms/server/middleware/skipWatcher.js
NEW
1
const skipWatcher = (state) => {
×
NEW
2
  return (req, res, next) => {
×
NEW
3
    state.skipWatcherBuild()
×
4

NEW
5
    res.on('finish', () => {
×
NEW
6
      setTimeout(() => {
×
NEW
7
        state.unskipWatcherBuild()
×
8
      }, 500)
9
    })
10

NEW
11
    next()
×
12
  }
13
}
14

NEW
15
module.exports = skipWatcher
×
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