wllama-service 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wllama-service",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Framework-agnostic browser LLM service wrapper with WebGPU and WebAssembly support",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -14,17 +14,12 @@
14
14
  },
15
15
  "files": [
16
16
  "dist",
17
- "scripts",
18
17
  "README.md"
19
18
  ],
20
19
  "scripts": {
21
20
  "build": "tsup",
22
21
  "dev": "tsup --watch",
23
- "prepublishOnly": "npm run build",
24
- "postinstall": "node scripts/postinstall.js"
25
- },
26
- "bin": {
27
- "wllama-copy-wasm": "./scripts/postinstall.js"
22
+ "prepublishOnly": "npm run build"
28
23
  },
29
24
  "keywords": [
30
25
  "wllama",
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env node
2
- const fs = require('fs');
3
- const path = require('path');
4
-
5
- // Find the consuming app's public directory
6
- const possiblePublicDirs = [
7
- path.resolve(process.cwd(), '../../public'), // monorepo
8
- path.resolve(process.cwd(), '../../../public'), // deeper monorepo
9
- path.resolve(process.cwd(), 'public'), // root install
10
- ];
11
-
12
- const wasmSrc = path.resolve(
13
- __dirname,
14
- '../node_modules/@wllama/wllama/esm/wasm/wllama.wasm'
15
- );
16
-
17
- if (!fs.existsSync(wasmSrc)) {
18
- console.warn('[wllama-service] Could not find wllama.wasm — run copy manually');
19
- process.exit(0);
20
- }
21
-
22
- const publicDir = possiblePublicDirs.find(fs.existsSync);
23
- if (!publicDir) {
24
- console.warn('[wllama-service] Could not find public/ directory — copy wllama.wasm manually');
25
- process.exit(0);
26
- }
27
-
28
- const dest = path.join(publicDir, 'wllama', 'wllama.wasm');
29
- fs.mkdirSync(path.dirname(dest), { recursive: true });
30
- fs.copyFileSync(wasmSrc, dest);
31
- console.log(`[wllama-service] ✓ Copied wllama.wasm to ${dest}`);