react-native-fast-html-parser 0.1.0 → 0.1.3

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/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # react-native-fast-html-parser
2
2
 
3
- A high-performance, zero-copy HTML-to-structured-JSON parser library for React Native. Powered by a lightning-fast Rust core engine (`html_2_json`) and integrated via direct C++ JSI using Margelo Nitro Modules.
3
+ [![npm](https://img.shields.io/npm/v/react-native-fast-html-parser?color=orange&label=npm)](https://www.npmjs.com/package/react-native-fast-html-parser)
4
+ [![license](https://img.shields.io/npm/l/react-native-fast-html-parser?color=green&label=license)](LICENSE)
5
+ [![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20Android-lightgrey)](https://github.com/abhishekce17/react-native-fast-html-parser)
6
+ [![nitro](https://img.shields.io/badge/powered%20by-Nitro%20Modules-blue)](https://nitro.margelo.com)
7
+ [![rust](https://img.shields.io/badge/core-Rust-orange?logo=rust)](https://www.rust-lang.org)
8
+
9
+ A high-performance, zero-copy HTML-to-structured-JSON parser library for React Native. Powered by a lightning-fast Rust core engine and integrated via direct C++ JSI using Margelo Nitro Modules.
4
10
 
5
11
  It achieves pure zero-copy shared-memory access on-device. This avoids standard string/JSON serialization overhead and Hermes garbage collection pauses during render loops.
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-fast-html-parser",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "A lightning-fast HTML parser library for React Native that converts raw HTML fragments into a structured JSON AST tree. Built on a high-performance Rust core and integrated via direct C++ JSI HostObjects, it achieves pure zero-copy shared-memory access on-device. This avoids standard string/JSON serialization overhead and Hermes garbage collection pauses during render loops.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -22,6 +22,7 @@
22
22
  "nitro.json",
23
23
  "*.podspec",
24
24
  "react-native.config.js",
25
+ "!ios/libs",
25
26
  "!ios/build",
26
27
  "!android/build",
27
28
  "!android/gradle",
@@ -113,7 +113,14 @@ function download(url, destPath) {
113
113
  }
114
114
  res.pipe(file);
115
115
  file.on('finish', function () {
116
- file.close(resolve);
116
+ file.close(function() {
117
+ const stat = fs.statSync(destPath);
118
+ if (stat.size === 0) {
119
+ try { fs.unlinkSync(destPath); } catch {}
120
+ return reject(new Error('Downloaded file is empty: ' + path.basename(destPath)));
121
+ }
122
+ resolve();
123
+ });
117
124
  });
118
125
  }
119
126
  )
@@ -199,7 +206,7 @@ async function main() {
199
206
  console.log(' ✓ XCFramework assembled successfully.');
200
207
  } catch (err) {
201
208
  console.error(' ✗ Failed to assemble XCFramework: ' + err.message);
202
- failed = true;
209
+ process.exit(1);
203
210
  }
204
211
  } else {
205
212
  console.log(' ✓ XCFramework already exists.');
@@ -225,7 +232,7 @@ async function main() {
225
232
  '',
226
233
  ].join('\n')
227
234
  );
228
- process.exit(0);
235
+ process.exit(1);
229
236
  }
230
237
 
231
238
  console.log('\n[react-native-fast-html-parser] All binaries ready.\n');
@@ -1,44 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>AvailableLibraries</key>
6
- <array>
7
- <dict>
8
- <key>BinaryPath</key>
9
- <string>libhtml_2_json.a</string>
10
- <key>LibraryIdentifier</key>
11
- <string>ios-arm64_x86_64-simulator</string>
12
- <key>LibraryPath</key>
13
- <string>libhtml_2_json.a</string>
14
- <key>SupportedArchitectures</key>
15
- <array>
16
- <string>arm64</string>
17
- <string>x86_64</string>
18
- </array>
19
- <key>SupportedPlatform</key>
20
- <string>ios</string>
21
- <key>SupportedPlatformVariant</key>
22
- <string>simulator</string>
23
- </dict>
24
- <dict>
25
- <key>BinaryPath</key>
26
- <string>libhtml_2_json.a</string>
27
- <key>LibraryIdentifier</key>
28
- <string>ios-arm64</string>
29
- <key>LibraryPath</key>
30
- <string>libhtml_2_json.a</string>
31
- <key>SupportedArchitectures</key>
32
- <array>
33
- <string>arm64</string>
34
- </array>
35
- <key>SupportedPlatform</key>
36
- <string>ios</string>
37
- </dict>
38
- </array>
39
- <key>CFBundlePackageType</key>
40
- <string>XFWK</string>
41
- <key>XCFrameworkFormatVersion</key>
42
- <string>1.0</string>
43
- </dict>
44
- </plist>