@abraca/dabra 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2560,6 +2560,9 @@ var AbracadabraBaseProvider = class extends EventEmitter {
2560
2560
  permissionDeniedHandler(reason) {
2561
2561
  this.emit("authenticationFailed", { reason });
2562
2562
  this.isAuthenticated = false;
2563
+ if (this.manageSocket) try {
2564
+ this.configuration.websocketProvider.disconnect();
2565
+ } catch {}
2563
2566
  }
2564
2567
  authenticatedHandler(scope) {
2565
2568
  this.isAuthenticated = true;
@@ -9264,6 +9267,42 @@ var AbracadabraClient = class {
9264
9267
  if (!res.ok) throw await this.toError(res, "GET", "/admin/backup/dump");
9265
9268
  return res.blob();
9266
9269
  }
9270
+ /**
9271
+ * List every registered config field with current value + origin
9272
+ * (`default` / `env` / `global_override` / `route_override`). Requires
9273
+ * elevated role.
9274
+ */
9275
+ async adminConfigList() {
9276
+ return (await this.request("GET", "/admin/config")).items;
9277
+ }
9278
+ /** Read a single config field by dotted path (e.g. `"access.authenticated"`). */
9279
+ async adminConfigGet(path) {
9280
+ return this.request("GET", `/admin/config/fields/${encodeURIComponent(path)}`);
9281
+ }
9282
+ /**
9283
+ * Set a runtime override on a config field. The field must be marked
9284
+ * `runtime_mutable = true` in the registry; immutable fields return a
9285
+ * schema error. Persists to the `settings_overrides` table.
9286
+ */
9287
+ async adminConfigSet(path, value) {
9288
+ return this.request("PUT", `/admin/config/fields/${encodeURIComponent(path)}`, { body: { value } });
9289
+ }
9290
+ /**
9291
+ * Clear a runtime override and revert the field to its env/TOML/default
9292
+ * base value. Returns `true` when an override was actually removed.
9293
+ */
9294
+ async adminConfigUnset(path) {
9295
+ return (await this.request("DELETE", `/admin/config/fields/${encodeURIComponent(path)}`)).existed;
9296
+ }
9297
+ /**
9298
+ * Diagnostic dump of every `ABRA_*` env var the running process saw at
9299
+ * boot, mapped to its config path. Use this to debug
9300
+ * "I set this in `.env` but the server reports a different value".
9301
+ * Secrets are redacted (`value: null`, `redacted: true`).
9302
+ */
9303
+ async adminConfigEnvSnapshot() {
9304
+ return this.request("GET", "/admin/config/env-snapshot");
9305
+ }
9267
9306
  /** List snapshot metadata for a document. */
9268
9307
  async listSnapshots(docId, opts) {
9269
9308
  const params = new URLSearchParams();