@napi-rs/image 1.4.0 → 1.4.2
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/index.d.ts +1 -5
- package/index.js +11 -1
- package/package.json +15 -15
package/index.d.ts
CHANGED
|
@@ -74,11 +74,7 @@ export const enum CompressionType {
|
|
|
74
74
|
/** Fast, minimal compression */
|
|
75
75
|
Fast = 1,
|
|
76
76
|
/** High compression level */
|
|
77
|
-
Best = 2
|
|
78
|
-
/** Huffman coding compression */
|
|
79
|
-
Huffman = 3,
|
|
80
|
-
/** Run-length encoding compression */
|
|
81
|
-
Rle = 4
|
|
77
|
+
Best = 2
|
|
82
78
|
}
|
|
83
79
|
export const enum FilterType {
|
|
84
80
|
/**
|
package/index.js
CHANGED
|
@@ -11,7 +11,8 @@ function isMusl() {
|
|
|
11
11
|
// For Node 10
|
|
12
12
|
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
13
13
|
try {
|
|
14
|
-
|
|
14
|
+
const lddPath = require('child_process').execSync('which ldd').toString().trim();
|
|
15
|
+
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
15
16
|
} catch (e) {
|
|
16
17
|
return true
|
|
17
18
|
}
|
|
@@ -101,6 +102,15 @@ switch (platform) {
|
|
|
101
102
|
}
|
|
102
103
|
break
|
|
103
104
|
case 'darwin':
|
|
105
|
+
localFileExisted = existsSync(join(__dirname, 'image.darwin-universal.node'))
|
|
106
|
+
try {
|
|
107
|
+
if (localFileExisted) {
|
|
108
|
+
nativeBinding = require('./image.darwin-universal.node')
|
|
109
|
+
} else {
|
|
110
|
+
nativeBinding = require('@napi-rs/image-darwin-universal')
|
|
111
|
+
}
|
|
112
|
+
break
|
|
113
|
+
} catch {}
|
|
104
114
|
switch (arch) {
|
|
105
115
|
case 'x64':
|
|
106
116
|
localFileExisted = existsSync(join(__dirname, 'image.darwin-x64.node'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@napi-rs/image",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"description": "Image processing library",
|
|
@@ -61,21 +61,21 @@
|
|
|
61
61
|
},
|
|
62
62
|
"repository": "git@github.com:Brooooooklyn/Image.git",
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@napi-rs/cli": "^2.
|
|
64
|
+
"@napi-rs/cli": "^2.13.2"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "f04033cfe1195d94882bf108cdf638b9a8c023cf",
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@napi-rs/image-win32-x64-msvc": "1.4.
|
|
69
|
-
"@napi-rs/image-darwin-x64": "1.4.
|
|
70
|
-
"@napi-rs/image-linux-x64-gnu": "1.4.
|
|
71
|
-
"@napi-rs/image-darwin-arm64": "1.4.
|
|
72
|
-
"@napi-rs/image-android-arm64": "1.4.
|
|
73
|
-
"@napi-rs/image-linux-arm64-gnu": "1.4.
|
|
74
|
-
"@napi-rs/image-linux-arm64-musl": "1.4.
|
|
75
|
-
"@napi-rs/image-linux-arm-gnueabihf": "1.4.
|
|
76
|
-
"@napi-rs/image-linux-x64-musl": "1.4.
|
|
77
|
-
"@napi-rs/image-freebsd-x64": "1.4.
|
|
78
|
-
"@napi-rs/image-win32-ia32-msvc": "1.4.
|
|
79
|
-
"@napi-rs/image-android-arm-eabi": "1.4.
|
|
68
|
+
"@napi-rs/image-win32-x64-msvc": "1.4.2",
|
|
69
|
+
"@napi-rs/image-darwin-x64": "1.4.2",
|
|
70
|
+
"@napi-rs/image-linux-x64-gnu": "1.4.2",
|
|
71
|
+
"@napi-rs/image-darwin-arm64": "1.4.2",
|
|
72
|
+
"@napi-rs/image-android-arm64": "1.4.2",
|
|
73
|
+
"@napi-rs/image-linux-arm64-gnu": "1.4.2",
|
|
74
|
+
"@napi-rs/image-linux-arm64-musl": "1.4.2",
|
|
75
|
+
"@napi-rs/image-linux-arm-gnueabihf": "1.4.2",
|
|
76
|
+
"@napi-rs/image-linux-x64-musl": "1.4.2",
|
|
77
|
+
"@napi-rs/image-freebsd-x64": "1.4.2",
|
|
78
|
+
"@napi-rs/image-win32-ia32-msvc": "1.4.2",
|
|
79
|
+
"@napi-rs/image-android-arm-eabi": "1.4.2"
|
|
80
80
|
}
|
|
81
81
|
}
|