@howuse/feedback 0.2.0 → 0.4.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/dist/index.cjs CHANGED
@@ -21,7 +21,13 @@ function tryLoadNativeLibrary() {
21
21
  } else {
22
22
  throw new Error(`Unsupported platform: ${platform}`);
23
23
  }
24
- const libPath = path.join(packageRoot, "native", libName);
24
+ let libPath = path.join(packageRoot, "native", libName);
25
+ if (libPath.includes(".asar")) {
26
+ const asarPath = libPath.replace(".asar", ".asar.unpacked");
27
+ if (fs.existsSync(asarPath)) {
28
+ libPath = asarPath;
29
+ }
30
+ }
25
31
  if (!fs.existsSync(libPath)) {
26
32
  throw new Error(`Native library not found: ${libPath}. Please run 'npm run build:native' first.`);
27
33
  }
package/dist/index.mjs CHANGED
@@ -19,7 +19,13 @@ function tryLoadNativeLibrary() {
19
19
  } else {
20
20
  throw new Error(`Unsupported platform: ${platform}`);
21
21
  }
22
- const libPath = path.join(packageRoot, "native", libName);
22
+ let libPath = path.join(packageRoot, "native", libName);
23
+ if (libPath.includes(".asar")) {
24
+ const asarPath = libPath.replace(".asar", ".asar.unpacked");
25
+ if (fs.existsSync(asarPath)) {
26
+ libPath = asarPath;
27
+ }
28
+ }
23
29
  if (!fs.existsSync(libPath)) {
24
30
  throw new Error(`Native library not found: ${libPath}. Please run 'npm run build:native' first.`);
25
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howuse/feedback",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Node.js/Electron SDK for user feedback and activation management",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",