brainy/tsconfig.browser.json
David Snelling 93804be354 feat: add universal adapters for browser compatibility
- Create universal adapters for cross-platform support (browser/Node/serverless)
- Replace Node.js-specific imports with universal implementations
- Add OPFS support for browser persistent storage
- Maintain same BrainyData interface across all environments
- Enable real Brainy usage in browser console UI
- Keep package size optimized (no bloat)

Universal adapters in /src/universal/:
- uuid.ts: Cross-platform UUID generation
- crypto.ts: Browser/Node crypto operations
- fs.ts: OPFS/FileSystem/Memory storage adapter
- path.ts: Universal path operations
- events.ts: EventEmitter compatibility layer

This enables 'write once, run anywhere' for Brainy while maintaining
the exact same API. No breaking changes to existing code.
2025-08-08 15:22:38 -07:00

34 lines
No EOL
766 B
JSON

{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist/browser-build"
},
"include": [
"src/brainyData.ts",
"src/browserFramework.ts",
"src/universal/**/*",
"src/types/graphTypes.ts",
"src/coreTypes.ts",
"src/utils/embedding.ts",
"src/utils/environment.ts",
"src/utils/logger.ts",
"src/utils/index.ts",
"src/hnsw/**/*",
"src/storage/**/*",
"src/setup.ts"
],
"exclude": [
"node_modules",
"dist",
"**/*.test.ts",
"src/cortex/**/*",
"src/augmentations/**/*",
"src/pipeline.ts",
"src/sequentialPipeline.ts",
"src/augmentationFactory.ts",
"src/augmentationRegistry.ts",
"src/augmentationRegistryLoader.ts",
"src/chat/**/*",
"src/mcp/**/*"
]
}