fast-osmpbf-js 0.1.3 → 0.1.4
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -19,6 +19,14 @@ function getBindingPath() {
|
|
|
19
19
|
arm64: "aarch64",
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const nodeFileMap = {
|
|
23
|
+
"linux-x64": "index.linux-x64-gnu.node",
|
|
24
|
+
"linux-arm64": "index.linux-arm64-gnu.node",
|
|
25
|
+
"darwin-x64": "index.darwin-x64.node",
|
|
26
|
+
"darwin-arm64": "index.darwin-arm64.node",
|
|
27
|
+
"win32-x64": "index.win32-x64-msvc.node",
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
const mappedPlatform = platformMap[platform]
|
|
23
31
|
const mappedArch = archMap[arch]
|
|
24
32
|
|
|
@@ -27,7 +35,13 @@ function getBindingPath() {
|
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
const bindingFolder = `bindings-${mappedArch}-${mappedPlatform}`
|
|
30
|
-
|
|
38
|
+
const nodeFile = nodeFileMap[`${platform}-${arch}`]
|
|
39
|
+
|
|
40
|
+
if (!nodeFile) {
|
|
41
|
+
throw new Error(`No binding available for ${platform}-${arch}`)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return join(__dirname, bindingFolder, nodeFile)
|
|
31
45
|
}
|
|
32
46
|
|
|
33
47
|
const native = require(getBindingPath())
|