first of all, really good idea! i plan to use it in a self hosted stack of mine and you dropped it at a great time!
a question though - since the readme says "Domain SDK is server-side only", do you think it'd be worth adding some kind of guardrail to prevent the sdk from being initialized in a client env?
something as simple as a window check maybe:
function assertServerEnvironment(): void {
const isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
if (isBrowser) {
throw new Error("Domain SDK is server-side only");
}
}
happy to raise a pr if you think it's worth adding in.
first of all, really good idea! i plan to use it in a self hosted stack of mine and you dropped it at a great time!
a question though - since the readme says "Domain SDK is server-side only", do you think it'd be worth adding some kind of guardrail to prevent the sdk from being initialized in a client env?
something as simple as a
windowcheck maybe:happy to raise a pr if you think it's worth adding in.