@sssxyd/face-liveness-detector 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/README.md +13 -1
  2. package/package.json +12 -3
package/README.md CHANGED
@@ -16,9 +16,21 @@ A framework-agnostic, TypeScript-based npm package for face liveness detection.
16
16
  ## Installation
17
17
 
18
18
  ```bash
19
- npm install @sssxyd/face-liveness-detector
19
+ npm install @sssxyd/face-liveness-detector @vladmandic/human @techstark/opencv-js
20
20
  ```
21
21
 
22
+ Or with yarn:
23
+ ```bash
24
+ yarn add @sssxyd/face-liveness-detector @vladmandic/human @techstark/opencv-js
25
+ ```
26
+
27
+ Or with pnpm:
28
+ ```bash
29
+ pnpm add @sssxyd/face-liveness-detector @vladmandic/human @techstark/opencv-js
30
+ ```
31
+
32
+ > **Note**: `@vladmandic/human` and `@techstark/opencv-js` are peer dependencies and must be installed separately to avoid bundling large libraries. This keeps your final bundle size smaller if you're already using these libraries elsewhere in your project.
33
+
22
34
  ## Quick Start - Using Local Model Files (Recommended)
23
35
 
24
36
  To improve performance and reduce external dependencies, you can download and use local copies of model files:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sssxyd/face-liveness-detector",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Pure JS/TS implementation of liveness face detection based on human.js and opencv.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -47,12 +47,21 @@
47
47
  ],
48
48
  "author": "xuyd <sssxyd@gmail.com>",
49
49
  "license": "MIT",
50
- "dependencies": {
50
+ "peerDependencies": {
51
51
  "@techstark/opencv-js": "^4.12.0-release.1",
52
52
  "@vladmandic/human": "^3.3.0"
53
53
  },
54
+ "peerDependenciesMeta": {
55
+ "@techstark/opencv-js": {
56
+ "optional": false
57
+ },
58
+ "@vladmandic/human": {
59
+ "optional": false
60
+ }
61
+ },
54
62
  "devDependencies": {
55
- "@babel/preset-env": "^7.28.5",
63
+ "@techstark/opencv-js": "^4.12.0-release.1",
64
+ "@vladmandic/human": "^3.3.0",
56
65
  "@babel/preset-typescript": "^7.28.5",
57
66
  "@rollup/plugin-commonjs": "^29.0.0",
58
67
  "@rollup/plugin-node-resolve": "^15.1.0",