@pdftron/pdfnet-node 11.11.0 → 11.11.1

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/license.pdf CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdftron/pdfnet-node",
3
- "version": "11.11.0",
3
+ "version": "11.11.1",
4
4
  "main": "./lib/pdfnet.js",
5
5
  "types": "./lib/types.d.ts",
6
6
  "scripts": {
@@ -4,7 +4,12 @@ const path = require('path');
4
4
  const pkg = require(path.join(__dirname, '../package.json'));
5
5
 
6
6
  const abi = process.versions.modules; // Node ABI
7
- const platform = process.platform; // linux, darwin, win32
7
+ let platform = process.platform; // linux, darwin, win32
8
+ const isAlpine = fs.existsSync('/etc/alpine-release');
9
+ if (isAlpine) {
10
+ platform = "alpine"
11
+ }
12
+
8
13
  const arch = process.arch; // x64, arm64, etc.
9
14
  const version = pkg.version;
10
15
  const isElectron = !!process.versions.electron;
@@ -18,23 +23,8 @@ if (isElectron) {
18
23
 
19
24
  console.log('Downloading prebuilt binary from:', prebuildUrl);
20
25
 
21
- function npmSupportsExec() {
22
- try {
23
- const version = execSync('npm --version', { encoding: 'utf8' }).trim();
24
- const major = Number(version.split('.')[0]);
25
- return major >= 7;
26
- } catch {
27
- return false;
28
- }
29
- }
30
-
31
26
  try {
32
- if (npmSupportsExec()) {
33
- execSync(`npm exec prebuild-install -- --download ${prebuildUrl} --verbose`, { stdio: 'inherit' });
34
- } else {
35
- console.log("npm exec not found, falling back to npx")
36
- execSync(`npx prebuild-install --download ${prebuildUrl} --verbose`, { stdio: 'inherit' });
37
- }
27
+ execSync(`npx prebuild-install --download ${prebuildUrl} --verbose`, { stdio: 'inherit' });
38
28
 
39
29
  const extractedFolder = `node-v${abi}-${platform}-${arch}`;
40
30
  const libFolder = path.join(extractedFolder, 'lib');