feat: complete Ancestor quote bot with production-ready Docker support

This commit is contained in:
unfunny
2026-09-13 14:14:38 -04:00
parent f2016da05a
commit fe7351a7dc
1145 changed files with 30890 additions and 97684 deletions

View File

@@ -1,4 +1,11 @@
import _defineProperty from "@babel/runtime/helpers/defineProperty";
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UnstableValue = exports.ServerControlledNamespacedValue = exports.NamespacedValue = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
/*
Copyright 2021 - 2022 The Matrix.org Foundation C.I.C.
@@ -19,7 +26,7 @@ limitations under the License.
* Represents a simple Matrix namespaced value. This will assume that if a stable prefix
* is provided that the stable prefix should be used when representing the identifier.
*/
export class NamespacedValue {
class NamespacedValue {
// Stable is optional, but one of the two parameters is required, hence the weird-looking types.
// Goal is to to have developers explicitly say there is no stable value (if applicable).
@@ -57,10 +64,10 @@ export class NamespacedValue {
findIn(obj) {
let val = undefined;
if (this.name) {
val = obj?.[this.name];
val = obj === null || obj === void 0 ? void 0 : obj[this.name];
}
if (!val && this.altName) {
val = obj?.[this.altName];
val = obj === null || obj === void 0 ? void 0 : obj[this.altName];
}
return val;
}
@@ -75,10 +82,11 @@ export class NamespacedValue {
return included;
}
}
export class ServerControlledNamespacedValue extends NamespacedValue {
exports.NamespacedValue = NamespacedValue;
class ServerControlledNamespacedValue extends NamespacedValue {
constructor(...args) {
super(...args);
_defineProperty(this, "preferUnstable", false);
(0, _defineProperty2.default)(this, "preferUnstable", false);
}
setPreferUnstable(preferUnstable) {
this.preferUnstable = preferUnstable;
@@ -95,7 +103,8 @@ export class ServerControlledNamespacedValue extends NamespacedValue {
* Represents a namespaced value which prioritizes the unstable value over the stable
* value.
*/
export class UnstableValue extends NamespacedValue {
exports.ServerControlledNamespacedValue = ServerControlledNamespacedValue;
class UnstableValue extends NamespacedValue {
// Note: Constructor difference is that `unstable` is *required*.
constructor(stable, unstable) {
super(stable, unstable);
@@ -110,4 +119,5 @@ export class UnstableValue extends NamespacedValue {
return this.stable;
}
}
exports.UnstableValue = UnstableValue;
//# sourceMappingURL=NamespacedValue.js.map