react-native-rectangle-doc-scanner 2.2.0 → 2.3.0

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": "react-native-rectangle-doc-scanner",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,17 @@
18
18
  "prepare": "yarn build",
19
19
  "postinstall": "node scripts/postinstall.js"
20
20
  },
21
+ "files": [
22
+ "dist",
23
+ "src",
24
+ "android",
25
+ "ios",
26
+ "scripts",
27
+ "vendor",
28
+ "*.md",
29
+ "*.js",
30
+ "*.json"
31
+ ],
21
32
  "peerDependencies": {
22
33
  "@shopify/react-native-skia": "*",
23
34
  "react": "*",
@@ -3,11 +3,27 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
 
6
- const SCANNER_PATH = path.join(__dirname, '..', 'node_modules', 'react-native-document-scanner');
6
+ // Find react-native-document-scanner (could be in parent due to hoisting)
7
+ function findPackage(packageName) {
8
+ const locations = [
9
+ path.join(__dirname, '..', 'node_modules', packageName), // Same level
10
+ path.join(__dirname, '..', '..', packageName), // Hoisted to parent
11
+ path.join(__dirname, '..', '..', '..', packageName), // Hoisted to root
12
+ ];
13
+
14
+ for (const location of locations) {
15
+ if (fs.existsSync(location)) {
16
+ return location;
17
+ }
18
+ }
19
+ return null;
20
+ }
21
+
22
+ const SCANNER_PATH = findPackage('react-native-document-scanner');
7
23
  const VENDOR_PATH = path.join(__dirname, '..', 'vendor', 'react-native-document-scanner');
8
24
 
9
25
  // Check if react-native-document-scanner is installed
10
- if (!fs.existsSync(SCANNER_PATH)) {
26
+ if (!SCANNER_PATH) {
11
27
  console.log('⚠️ react-native-document-scanner not found, skipping quality patches');
12
28
  process.exit(0);
13
29
  }
@@ -1,10 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(node:*)",
5
- "Read(//Users/tt-mac-03/Documents/workspace/tdb/**)"
6
- ],
7
- "deny": [],
8
- "ask": []
9
- }
10
- }