Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(plugins): correct the PLUGIN_STATE_DIR migration note
Yudhi Armyndharis25d64be5af1e
diff --git a/.env.example b/.env.exampleindex 76a94ddcc..3883a8437 100644--- a/.env.example+++ b/.env.example@@ -689,9 +689,11 @@ PLUGINS_DIR=./data/plugins # Plugin directory (default: ./data/plugins)# this one.# Moving it does NOT carry the existing state across: point it at an empty directory and the# gateway starts with no record of installed plugins, even though their packages are still under-# PLUGINS_DIR. Move the whole `<old root>/plugins` tree yourself when you change this, not just-# registry.json: each plugin's persisted ctx.storage lives beside it as `<plugin id>/key-*.json`,-# so carrying the registry alone leaves every plugin enabled but with its state gone.+# PLUGINS_DIR. Copy `registry.json` and every `<plugin id>/key-*.json` from `<old root>/plugins`+# into `<new root>/plugins` when you change this: carrying the registry alone leaves each plugin+# enabled with its persisted ctx.storage gone. Copy those files rather than the directory, because+# on the default layout `<old root>/plugins` IS PLUGINS_DIR, and moving it would take the installed+# packages away from the loader.# PLUGIN_STATE_DIR=./data# Cap on a plugin .zip downloaded by install-from-URL (matches the 5 MB upload limit). A non-positive# or non-numeric value falls back to the default.diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1045acaf7..745f403be 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Restoring a backup no longer aborts when the target already holds the outbound delivery records. The table has no session foreign key, so the replace never cleared it and every overlapping row collided, rolling the whole import back.- Settled outbound delivery records are pruned after `WEBHOOK_OUTBOX_RETENTION_DAYS` (default 7). A record that can still be replayed is never pruned on age, and a non-positive window falls back to the default rather than letting the table grow without bound.- `PLUGIN_STATE_DIR` moves the plugin registry and per-plugin storage off the default `./data`. It was the one piece of state with no path knob, so a test run rewrote the developer's own registry.-- `backup.sh` and `restore.sh` follow `PLUGIN_STATE_DIR`. Both hardcoded the plugin state under the data dir, so with the knob set the archive carried neither the registry nor any plugin's persisted storage, and a restore put nothing back. The knob's own note now says to move the whole tree, not just `registry.json`.+- `backup.sh` and `restore.sh` follow `PLUGIN_STATE_DIR`. Both hardcoded the plugin state under the data dir, so with the knob set the archive carried neither the registry nor any plugin's persisted storage, and a restore put nothing back. The knob's own note now spells out which files to carry across when the knob changes.- The e2e lane sweeps the throwaway state roots it creates. Each suite gets its own, nothing removed them, and the temp directory accumulated hundreds of entries over a few days of runs.- e2e assertions are no longer answered by unrelated processes on the host. supertest binds its per-request listener to the wildcard address and then dials 127.0.0.1, which on macOS lets a process holding that port on 127.0.0.1 answer instead. Each suite's server now listens on loopback during init, which supertest reuses.- A stalled `apt-get` can no longer hold a CI run open. The scripts-smoke job installed sqlite3 and shellcheck unbounded, so a slow mirror held two main runs past an hour with every other job already green. Both steps now time out and skip the install when the runner already ships the tool.