brainy/src/utils
David Snelling da760a34ed **feat(cli, workers): introduce text encoding patches and worker improvements**
- Added `cli-package/brainy-wrapper.js` to patch global `TextEncoder` and `TextDecoder` for Node.js environments, ensuring compatibility with TensorFlow.js.
- Implemented unified text encoding utilities in `cli-package/src/utils/textEncoding.ts` for cross-environment consistency.
- Enhanced `src/worker.js` and introduced `src/worker.ts` to improve worker execution with better function serialization and error handling.
- Updated `package.json`:
  - Modified the `build` script to include a patch for `TextEncoder`.
  - Added `test-all` script for multi-environment testing.
  - Introduced the Puppeteer dependency for browser testing.
- Created a favicon generation script `scripts/create-favicon.js` using a base64-encoded icon.
- Added `scripts/test-all-environments.js` to run automated tests across Node.js, browser, and CLI environments.
- Enhanced `src/utils/workerUtils.ts` to support improved fallback mechanisms and robust worker pooling.

This update improves the project's compatibility across environments, refines worker functionalities, and adds comprehensive testing support for reliability.
2025-07-04 14:42:33 -07:00
..
distance.ts feat(src/brainyData, src/utils): enhance embedding efficiency with batch processing and initialize safeguards 2025-06-27 14:06:59 -07:00
embedding.ts **feat: improve TensorFlow.js compatibility and remove unnecessary patches** 2025-07-02 16:16:19 -07:00
environment.ts **chore(deps): update dependencies and Node.js version requirements** 2025-07-04 12:19:48 -07:00
index.ts feat(src/brainyData, src/utils): enhance embedding efficiency with batch processing and initialize safeguards 2025-06-27 14:06:59 -07:00
tensorflowUtils.ts **feat(cli, workers): introduce text encoding patches and worker improvements** 2025-07-04 14:42:33 -07:00
textEncoding.ts **feat(cli, workers): introduce text encoding patches and worker improvements** 2025-07-04 14:42:33 -07:00
version.ts **chore(version): bump version to 0.9.36 and update references** 2025-07-04 12:33:28 -07:00
workerUtils.ts **feat(cli, workers): introduce text encoding patches and worker improvements** 2025-07-04 14:42:33 -07:00