Initial commit

This commit is contained in:
David Snelling 2025-06-24 11:41:30 -07:00
commit 5a8a6c1ba3
81 changed files with 39269 additions and 0 deletions

36
src/unified.ts Normal file
View file

@ -0,0 +1,36 @@
/**
* Unified entry point for Brainy
* This file exports everything from index.ts
* Environment detection is handled here and made available to all components
*/
// Export environment information
export const environment = {
isBrowser: typeof window !== 'undefined',
isNode:
typeof process !== 'undefined' && process.versions && process.versions.node,
isServerless:
typeof window === 'undefined' &&
(typeof process === 'undefined' ||
!process.versions ||
!process.versions.node)
}
// Make environment information available globally
if (typeof globalThis !== 'undefined') {
globalThis.__ENV__ = environment
}
// Log the detected environment
console.log(
`Brainy running in ${
environment.isBrowser
? 'browser'
: environment.isNode
? 'Node.js'
: 'serverless/unknown'
} environment`
)
// Re-export everything from index.ts
export * from './index.js'