diff --git a/package-lock.json b/package-lock.json index 944b26a2..2f532fc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,10 @@ "@aws-sdk/client-s3": "^3.427.0", "@tensorflow-models/universal-sentence-encoder": "^1.3.3", "@tensorflow/tfjs": "^4.22.0", + "@tensorflow/tfjs-backend-cpu": "^4.22.0", + "@tensorflow/tfjs-converter": "^4.22.0", + "@tensorflow/tfjs-core": "^4.22.0", + "@tensorflow/tfjs-layers": "^4.22.0", "buffer": "^6.0.3", "commander": "^14.0.0", "omelette": "^0.4.17", @@ -43,11 +47,6 @@ }, "engines": { "node": ">=23.11.0" - }, - "optionalDependencies": { - "@tensorflow/tfjs-backend-cpu": "^4.22.0", - "@tensorflow/tfjs-core": "^4.22.0", - "@tensorflow/tfjs-layers": "^4.22.0" } }, "node_modules/@ampproject/remapping": { @@ -3368,6 +3367,15 @@ "@tensorflow/tfjs-core": "4.22.0" } }, + "node_modules/@tensorflow/tfjs-converter": { + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.22.0.tgz", + "integrity": "sha512-PT43MGlnzIo+YfbsjM79Lxk9lOq6uUwZuCc8rrp0hfpLjF6Jv8jS84u2jFb+WpUeuF4K33ZDNx8CjiYrGQ2trQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@tensorflow/tfjs-core": "4.22.0" + } + }, "node_modules/@tensorflow/tfjs-core": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.22.0.tgz", @@ -3416,15 +3424,6 @@ "@tensorflow/tfjs-core": "4.22.0" } }, - "node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-converter": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.22.0.tgz", - "integrity": "sha512-PT43MGlnzIo+YfbsjM79Lxk9lOq6uUwZuCc8rrp0hfpLjF6Jv8jS84u2jFb+WpUeuF4K33ZDNx8CjiYrGQ2trQ==", - "license": "Apache-2.0", - "peerDependencies": { - "@tensorflow/tfjs-core": "4.22.0" - } - }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", diff --git a/package.json b/package.json index a3783fe4..f14bd7ce 100644 --- a/package.json +++ b/package.json @@ -29,18 +29,19 @@ }, "scripts": { "prebuild": "node scripts/generate-version.js", - "build:tsc": "tsc -p tsconfig.unified.json", - "build:browser": "rollup -c rollup_config.js", - "build:unified": "rollup -c rollup.unified.js", - "build": "npm run build:unified", - "build:all": "npm run build:tsc && npm run build:browser && npm run build:unified", + "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:all && npx http-server -o /examples/demo.html", + "demo": "npm run build && npm run build:browser && npx http-server -o /examples/demo.html", "cli": "node ./cli-wrapper.js", "version:patch": "npm version patch", "version:minor": "npm version minor", "version:major": "npm version major", - "deploy": "npm run build:all && npm publish", + "publish": "npm run build && npm publish", + "deploy:cloud:aws": "cd cloud-wrapper && npm run build && npm run deploy:aws", + "deploy:cloud:gcp": "cd cloud-wrapper && npm run build && npm run deploy:gcp", + "deploy:cloud:cloudflare": "cd cloud-wrapper && npm run build && npm run deploy:cloudflare", + "deploy:cloud": "echo 'Please use one of the following commands to deploy to a specific cloud provider:' && echo ' npm run deploy:cloud:aws' && echo ' npm run deploy:cloud:gcp' && echo ' npm run deploy:cloud:cloudflare'", "postinstall": "echo 'Note: If you encounter dependency conflicts with TensorFlow.js packages, please use: npm install --legacy-peer-deps'" }, "bin": { @@ -99,6 +100,7 @@ "@tensorflow-models/universal-sentence-encoder": "^1.3.3", "@tensorflow/tfjs": "^4.22.0", "@tensorflow/tfjs-backend-cpu": "^4.22.0", + "@tensorflow/tfjs-converter": "^4.22.0", "@tensorflow/tfjs-core": "^4.22.0", "@tensorflow/tfjs-layers": "^4.22.0" },