### Changes:
- **verify-package-size.js**:
- Added a CLI script to calculate and display the estimated package size.
- Integrated support for parsing `.npmignore` and `package.json` `files` patterns.
- Outputs total package size and lists the largest files included.
- **.npmignore**:
- Introduced an `.npmignore` file to exclude unnecessary development, configuration, and large files from the package.
- Added patterns for source maps, development files, configuration files, and artifacts.
- **package.json**:
- Updated the `files` array to include new patterns for distribution files (`.js`, `.d.ts`, `types`).
- Improved package inclusion accuracy with precise file patterns.
### Purpose:
Introduced a new utility to provide quick insights into the package size for better maintenance and optimization. Optimized `.npmignore` and `files` configurations in `package.json` to exclude irrelevant files, ensuring a smaller, cleaner package distribution.
### Changes:
- **deploy-demo.yml**:
- Added `contents: write` permissions to ensure the workflow can access repository content during operations.
- Used `${{ secrets.GITHUB_TOKEN }}` for authentication in the deployment step.
- **package.json**:
- Removed the `deploy:demo` script and its `gh-pages` dependency to clean up unused scripts and dependencies.
### Purpose:
Enhanced the deploy workflow by explicitly defining required permissions and securely managing authentication. Simplified the configuration by removing outdated scripts and dependencies.
### Changes:
- Removed `github-pages.yml` GitHub Actions workflow file.
- Updated `README.md`:
- Added documentation for `npm run deploy:demo` to deploy the demo to GitHub Pages.
- Updated the live demo link to reflect the repository's namespace change.
- Added `gh-pages` dependency (v6.3.0) in `package.json`.
- Introduced `deploy:demo` script in `package.json` for demo deployment.
### Purpose:
Streamlined the demo deployment process by removing the dedicated GitHub Pages workflow and replacing it with a manual deployment script (`npm run deploy:demo`). This enhances developer control while maintaining simplicity in deploying updates to the live demo.
### Changes:
- Disabled the `@typescript-eslint/no-explicit-any` rule in `cloud-wrapper/package.json`.
- Reformatted ESLint rule configurations for `semi` and `@typescript-eslint/semi`.
- Reorganized dependencies in `package.json` for better readability:
- Moved `buffer`, `commander`, `omelette`, and `uuid` to the end of the list to match alphabetical order.
### Purpose:
Improved code clarity and maintainability by updating ESLint configurations and reordering dependencies in `package.json`. These adjustments ensure consistent formatting and easier navigation of dependencies.
### Changes:
- Renamed the `publish` script to `deploy` in `package.json` for clarity and consistency with deployment terminology.
- Incremented version number from `0.8.11` to `0.9.0` in `src/utils/version.ts`.
### Purpose:
Aligned the naming of the deployment script with standard practices to improve readability and maintainability. Updated the version to `0.9.0` to reflect recent changes and enhancements in the project.
### Changes:
- Added new TensorFlow.js dependencies:
- `@tensorflow/tfjs-backend-cpu`
- `@tensorflow/tfjs-converter`
- `@tensorflow/tfjs-core`
- `@tensorflow/tfjs-layers`
- Updated `package-lock.json` to reflect dependency updates and changes in peer dependencies.
- Refactored build scripts for clarity and consistency:
- Simplified build commands using `BUILD_TYPE` environment variable for unified and browser builds.
- Updated `demo` and `publish` scripts to align with new build structure.
- Introduced specific deployment scripts for AWS, GCP, and Cloudflare in `cloud-wrapper`:
- `deploy☁️aws`
- `deploy☁️gcp`
- `deploy☁️cloudflare`
- Added a user-friendly `deploy:cloud` script for deployment guidance.
- Removed redundant script configurations and legacy-based Rollup files.
### Purpose:
Enhanced dependency management and standardized build/deployment workflows by improving script clarity, removing redundancy, and aligning configurations with TensorFlow.js changes. This improves maintainability and user experience in development and production environments.
### Changes:
- Added `rollup.unified.js` for building a unified bundle with environment detection (Node.js, Browser, Serverless).
- Added `rollup_config.js` for browser-specific bundle configurations.
- Created `tsconfig.browser.json` for browser builds and `tsconfig.unified.json` for unified builds.
- Implemented custom Rollup plugins:
- **`fixThisReferences`**: Resolves `this` reference issues in TensorFlow files.
- **`nodeModuleShims`**: Provides empty shims for Node.js built-in modules in browser environments.
- Updated dependencies in `package-lock.json` to include Rollup plugins and updated `buffer` dependency for polyfills.
- Created `src/unified.ts` as the unified library entry point with dynamic environment detection.
### Purpose:
- Introduced a unified and browser-compatible build pipeline to ensure `Brainy` can seamlessly operate across multiple environments (Node.js, Browser, Serverless).
- Resolved compatibility issues with Node.js modules and specific library builds.
- Enhanced flexibility and usability for developers working in diverse runtime environments.
Introduced a cloud deployment wrapper for Brainy supporting AWS Lambda, Google Cloud Run, and Cloudflare Workers. Added configuration options, deployment scripts, and API reference. Updated `README.md` with contribution guidelines and cloud deployment documentation.
Upgraded minimum Node.js version from 18.0.0 to 23.11.0 across `README.md`, `package.json`, and `version.ts`. Optimized distance utilities and pipelines to leverage Node.js 23.11+ native performance improvements (e.g., `array.reduce`, WebStreams API). Incremented version to 0.7.4 for consistency.
Introduced `generateRandomGraph` method to create randomized graphs with configurable entity counts and types, supporting automated testing and experimentation. Enhanced metadata vectorization logic to handle various metadata formats reliably, ensuring compatibility and fallback mechanisms during embedding. Updated `README.md` with detailed feature descriptions and usage guides.
Enhanced the installation section with guidance on resolving TensorFlow.js dependency conflicts using `--legacy-peer-deps`. Added CLI autocomplete setup instructions to improve user experience. Suppressed specific TensorFlow.js Node.js backend warnings in the embedding utils. Updated dependencies to the latest versions.
Added a comprehensive command-line interface (CLI) for interacting with the Brainy vector database. The CLI supports various operations, including database initialization, adding/searching nouns, managing relationships, and querying database status. Enhanced type validation logic for nouns and verbs to ensure consistency and enforce default types for invalid inputs. Updated test scripts to verify type validation and edge cases.
Introduced configurable read-only mode for databases to restrict write operations. Added support for S3-compatible storage services, including Cloudflare R2, Amazon S3, and Google Cloud Storage. Updated `README.md` with usage examples and configuration details.
Commented out all Firestore-related code across the project, including sync, storage, and vector search features. Removed Firebase dependencies (`firebase`, `firebase-admin`) from `package.json`. Updated `README.md` to reflect the temporary unavailability of Firestore features.
Introduced Firestore vector search integration using `@firebase/firestore-vector-search`. Added support for restricting searches by specific noun types to optimize performance and relevance. Updated `README.md` to document the new functionality and usage examples.