refactor: simplify build system and improve model loading flexibility
- Remove Rollup bundling in favor of direct TypeScript compilation - Move from bundled models to dynamic model loading with configurable paths - Add Docker deployment examples and documentation - Implement robust model loader with fallback mechanisms - Update storage adapters for better cross-environment compatibility - Add comprehensive tests for model loading and package installation - Simplify package.json scripts and remove complex build configurations - Clean up deprecated demo files and old bundling scripts BREAKING CHANGE: Models are no longer bundled with the package. They are now loaded dynamically from CDN or custom paths.
This commit is contained in:
parent
89413ebec2
commit
52a43d51d4
51 changed files with 4835 additions and 8007 deletions
42
package.json
42
package.json
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "@soulcraft/brainy",
|
||||
"version": "0.41.0",
|
||||
"version": "0.42.0",
|
||||
"description": "A vector graph database using HNSW indexing with Origin Private File System storage",
|
||||
"main": "dist/unified.js",
|
||||
"module": "dist/unified.js",
|
||||
"types": "dist/unified.d.ts",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"sideEffects": [
|
||||
"./dist/setup.js",
|
||||
|
|
@ -14,11 +14,8 @@
|
|||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/unified.js",
|
||||
"types": "./dist/unified.d.ts"
|
||||
},
|
||||
"./min": {
|
||||
"import": "./dist/unified.min.js"
|
||||
"import": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./setup": {
|
||||
"import": "./dist/setup.js",
|
||||
|
|
@ -48,15 +45,12 @@
|
|||
"engines": {
|
||||
"node": ">=24.4.0"
|
||||
},
|
||||
"overrides": {
|
||||
"form-data": "^4.0.4"
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "echo 'Prebuild step - no version generation needed'",
|
||||
"build": "BUILD_TYPE=unified rollup -c rollup.config.js",
|
||||
"build:browser": "BUILD_TYPE=browser rollup -c rollup.config.js",
|
||||
"start": "node dist/unified.js",
|
||||
"demo": "npm run build && npm run build:browser && npx http-server -o /demo/index.html",
|
||||
"build": "tsc",
|
||||
"build:framework": "tsc",
|
||||
"start": "node dist/framework.js",
|
||||
"demo": "npm run build && cd demo/brainy-angular-demo && npm run build && npm run serve",
|
||||
"prepare": "npm run build",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
|
|
@ -74,6 +68,10 @@
|
|||
"test:environments": "vitest run tests/multi-environment.test.ts",
|
||||
"test:specialized": "vitest run tests/specialized-scenarios.test.ts",
|
||||
"test:performance": "vitest run tests/performance.test.ts",
|
||||
"test:install": "vitest run tests/package-install.test.ts",
|
||||
"test:docker": "vitest run tests/custom-models-path.test.ts",
|
||||
"test:extraction": "node tests/auto-extraction.test.js",
|
||||
"extract-models": "node scripts/extract-models.js",
|
||||
"test:comprehensive": "npm run test:error-handling && npm run test:edge-cases && npm run test:storage && npm run test:environments && npm run test:specialized",
|
||||
"_generate-pdf": "node dev/scripts/generate-architecture-pdf.js",
|
||||
"_release": "standard-version",
|
||||
|
|
@ -157,7 +155,7 @@
|
|||
"node-fetch": "^3.3.2",
|
||||
"puppeteer": "^22.15.0",
|
||||
"rollup": "^4.13.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"standard-version": "^9.5.0",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5",
|
||||
|
|
@ -165,7 +163,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.540.0",
|
||||
"@tensorflow-models/universal-sentence-encoder": "^1.3.3",
|
||||
"@tensorflow/tfjs": "^4.22.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "^4.22.0",
|
||||
"@tensorflow/tfjs-backend-webgl": "^4.22.0",
|
||||
|
|
@ -175,8 +172,13 @@
|
|||
"dotenv": "^16.4.5",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@soulcraft/brainy-models": "^1.0.0"
|
||||
"peerDependencies": {
|
||||
"@soulcraft/brainy-models": ">=0.7.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@soulcraft/brainy-models": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"arrowParens": "always",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue