koffi 2.3.6-beta.4 → 2.3.6-beta.5
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/package.json +2 -2
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_darwin_arm64/koffi.node +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_darwin_x64/koffi.node +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_arm64/koffi.node +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_arm64/koffi.pdb +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_ia32/koffi.node +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_ia32/koffi.pdb +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_x64/koffi.node +0 -0
- package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_x64/koffi.pdb +0 -0
- package/src/koffi/src/index.js +18 -10
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_freebsd_arm64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_freebsd_ia32/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_freebsd_x64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_linux_arm32hf/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_linux_arm64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_linux_ia32/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_linux_riscv64hf64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_linux_x64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_openbsd_ia32/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_openbsd_x64/koffi.node +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_arm64/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_arm64/koffi.lib +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_ia32/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_ia32/koffi.lib +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_x64/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.4 → 2.3.6-beta.5}/koffi_win32_x64/koffi.lib +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koffi",
|
|
3
|
-
"version": "2.3.6-beta.
|
|
3
|
+
"version": "2.3.6-beta.5",
|
|
4
4
|
"stable": "2.3.5",
|
|
5
5
|
"description": "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
6
6
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"license": "LGPL-3.0",
|
|
27
27
|
"cnoke": {
|
|
28
28
|
"napi": 8,
|
|
29
|
-
"require": "./src/koffi/
|
|
29
|
+
"require": "./src/koffi/src/koffi/src/index.js",
|
|
30
30
|
"output": "src/koffi/build/{{version}}/koffi_{{platform}}_{{arch}}"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/koffi/src/index.js
CHANGED
|
@@ -13,29 +13,37 @@
|
|
|
13
13
|
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
const cnoke = require('../../cnoke');
|
|
16
|
+
const cnoke = require('../../cnoke/src/index.js');
|
|
18
17
|
const util = require('util');
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
const pkg = (() => {
|
|
20
|
+
try {
|
|
21
|
+
return require('../../../package.json');
|
|
22
|
+
} catch (err) {
|
|
23
|
+
return require('../package.json');
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
26
|
+
|
|
27
|
+
if (process.versions.napi == null || process.versions.napi < pkg.cnoke.napi) {
|
|
21
28
|
let major = parseInt(process.versions.node, 10);
|
|
22
|
-
let required = cnoke.get_napi_version(
|
|
29
|
+
let required = cnoke.get_napi_version(pkg.cnoke.napi, major);
|
|
23
30
|
|
|
24
31
|
if (required != null) {
|
|
25
|
-
throw new Error(`Project ${pkg.name} requires Node >= ${required} in the Node ${major}.x branch (N-API >=
|
|
32
|
+
throw new Error(`Project ${pkg.name} requires Node >= ${required} in the Node ${major}.x branch (N-API >= ${pkg.cnoke.napi})`);
|
|
26
33
|
} else {
|
|
27
|
-
throw new Error(`Project ${pkg.name} does not support the Node ${major}.x branch (N-API <
|
|
34
|
+
throw new Error(`Project ${pkg.name} does not support the Node ${major}.x branch (N-API < ${pkg.cnoke.napi})`);
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
let arch = cnoke.determine_arch();
|
|
32
|
-
let filename = __dirname + `/../build/${
|
|
39
|
+
let filename = __dirname + `/../build/${pkg.version}/koffi_${process.platform}_${arch}/koffi.node`;
|
|
33
40
|
|
|
34
41
|
// Development build
|
|
35
42
|
if (!fs.existsSync(filename)) {
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
let dev_filename = __dirname + '/../build/koffi.node';
|
|
44
|
+
|
|
45
|
+
if (fs.existsSync(dev_filename))
|
|
46
|
+
filename = dev_filename;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
let native = require(filename);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|