@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.
@@ -2530,6 +2530,9 @@ var AbracadabraBaseProvider = class extends EventEmitter {
2530
2530
  permissionDeniedHandler(reason) {
2531
2531
  this.emit("authenticationFailed", { reason });
2532
2532
  this.isAuthenticated = false;
2533
+ if (this.manageSocket) try {
2534
+ this.configuration.websocketProvider.disconnect();
2535
+ } catch {}
2533
2536
  }
2534
2537
  authenticatedHandler(scope) {
2535
2538
  this.isAuthenticated = true;
@@ -9234,6 +9237,42 @@ var AbracadabraClient = class {
9234
9237
  if (!res.ok) throw await this.toError(res, "GET", "/admin/backup/dump");
9235
9238
  return res.blob();
9236
9239
  }
9240
+ /**
9241
+ * List every registered config field with current value + origin
9242
+ * (`default` / `env` / `global_override` / `route_override`). Requires
9243
+ * elevated role.
9244
+ */
9245
+ async adminConfigList() {
9246
+ return (await this.request("GET", "/admin/config")).items;
9247
+ }
9248
+ /** Read a single config field by dotted path (e.g. `"access.authenticated"`). */
9249
+ async adminConfigGet(path) {
9250
+ return this.request("GET", `/admin/config/fields/${encodeURIComponent(path)}`);
9251
+ }
9252
+ /**
9253
+ * Set a runtime override on a config field. The field must be marked
9254
+ * `runtime_mutable = true` in the registry; immutable fields return a
9255
+ * schema error. Persists to the `settings_overrides` table.
9256
+ */
9257
+ async adminConfigSet(path, value) {
9258
+ return this.request("PUT", `/admin/config/fields/${encodeURIComponent(path)}`, { body: { value } });
9259
+ }
9260
+ /**
9261
+ * Clear a runtime override and revert the field to its env/TOML/default
9262
+ * base value. Returns `true` when an override was actually removed.
9263
+ */
9264
+ async adminConfigUnset(path) {
9265
+ return (await this.request("DELETE", `/admin/config/fields/${encodeURIComponent(path)}`)).existed;
9266
+ }
9267
+ /**
9268
+ * Diagnostic dump of every `ABRA_*` env var the running process saw at
9269
+ * boot, mapped to its config path. Use this to debug
9270
+ * "I set this in `.env` but the server reports a different value".
9271
+ * Secrets are redacted (`value: null`, `redacted: true`).
9272
+ */
9273
+ async adminConfigEnvSnapshot() {
9274
+ return this.request("GET", "/admin/config/env-snapshot");
9275
+ }
9237
9276
  /** List snapshot metadata for a document. */
9238
9277
  async listSnapshots(docId, opts) {
9239
9278
  const params = new URLSearchParams();