- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability) - OpenAPI: CalendarSubscription schema, Subscriptions tag - Frontend app - Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings - Config, rate limit, auth, calendar, booking, ICS, availability, user service updates Made-with: Cursor
25 lines
643 B
JavaScript
25 lines
643 B
JavaScript
const context = (() => {
|
|
if (typeof globalThis !== "undefined") {
|
|
return globalThis;
|
|
} else if (typeof self !== "undefined") {
|
|
return self;
|
|
} else if (typeof window !== "undefined") {
|
|
return window;
|
|
} else {
|
|
return Function("return this")();
|
|
}
|
|
})();
|
|
const defines = __DEFINES__;
|
|
Object.keys(defines).forEach((key) => {
|
|
const segments = key.split(".");
|
|
let target = context;
|
|
for (let i = 0; i < segments.length; i++) {
|
|
const segment = segments[i];
|
|
if (i === segments.length - 1) {
|
|
target[segment] = defines[key];
|
|
} else {
|
|
target = target[segment] || (target[segment] = {});
|
|
}
|
|
}
|
|
});
|