Repository navigation
Mimicway 0.4.0
·
223 commits
to develop
since this release
Removed
- Breaking: the
pre_scriptandpost_scriptblocks of a rule, with their template variables{{pre_script…}}and{{post_script…}}, and the "Advanced options" of the rule form that held them. They ran at the same moment asscript, on the same request, without seeing each other's result, so they only repeated it, and "post" suggested a block run after the response, which none was. A configuration where they are empty loads as before. One where a block still holds code is refused at start, at import, at restore and through the API, with a message that names the rule and the block, rather than loaded without that code; MIGRATING.md explains how to move it intoscript. The rule tester (POST /api/rule-test) no longer takes these two blocks, and itsscript_errorsandscript_resultsitems no longer have aslot.
Fixed
- The backups of the configuration hold more than the last minute. Each change made one, and five are kept: merging an import of two groups and six services made eight within 30 ms, so the five left held that import alone, and saving a rule unchanged made one too. Changes made in a burst now share one backup, taken before the first of them: a change backs up only when the last backup is a minute old (new setting
BACKUP_MIN_INTERVAL_SECS, 60 by default,0for the former behavior). Restoring, importing a file that replaces everything and resetting still back up every time. A change that leaves the configuration as it is writes nothing, and a backup identical to the newest one is not made again. Measured on the same ten actions of the interface: 17 backups (23,645 bytes) before, 4 (3,348 bytes) after. - The backup a restore, an import or a reset takes of the state it overwrites now holds the last change: a change made a moment before was still on its way to the disk, and the backup held the state before it.
Security
- A release is published only once a maintainer approves it: the jobs that create the GitHub release and push the image run in the protected
releaseenvironment, so a pushed tag alone no longer publishes. No checkout of the release workflow keeps the job's token in the cloned repository any more (six did, among them those of the two publishing jobs, where any later step could read it);scripts/check-workflows.mjs, run by the CI, refuses a checkout that keeps it and a publishing job outside an environment, in every workflow.