Forked from hermes-frontend, stripped openclaw/bun specifics: - Auth tokens: openclaw_session -> nyx_session - Vite proxy: localhost:3003 -> localhost:8000 (assay) - Prod WS: wss://assay.loop42.de/ws - Workspace paths: removed openclaw-specific paths - Added missing deps: @heroicons/vue, overlayscrollbars-vue - Branding: title -> nyx Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
612 B
JavaScript
19 lines
612 B
JavaScript
//#region src/client/env.ts
|
|
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] = {});
|
|
}
|
|
});
|
|
|
|
//#endregion
|