syscall-napi 0.0.1 → 0.0.3
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/.eslintrc +1 -2
- package/package.json +4 -4
- package/generate.js +0 -14
- package/generate2.js +0 -24
- package/table.js +0 -5695
- package/test.out +0 -299
- package/test.xml +0 -261
- package/unistd.h +0 -734
package/.eslintrc
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syscall-napi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "Node.js module to perform promise-based asynchronous syscalls",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "^7.12.3",
|
|
24
24
|
"@babel/eslint-parser": "^7.12.1",
|
|
25
|
-
"c8": "^7.
|
|
26
|
-
"eslint": "^7.
|
|
27
|
-
"mocha": "^
|
|
25
|
+
"c8": "^7.9.0",
|
|
26
|
+
"eslint": "^7.32.0",
|
|
27
|
+
"mocha": "^9.1.1",
|
|
28
28
|
"node-archibald": "^0.0.5"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/generate.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import data from "./table.js";
|
|
2
|
-
|
|
3
|
-
Object.keys(data).forEach((key) => {
|
|
4
|
-
const sc = data[key];
|
|
5
|
-
// console.log("sc =", sc);
|
|
6
|
-
const name = sc[2];
|
|
7
|
-
if (!name) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const normalizedName = name.replace("sys_", "SYS_");
|
|
12
|
-
// console.log("name =", normalizedName);
|
|
13
|
-
console.log(`DEF_SYS_CONSTANT(env, constants, ${normalizedName});`);
|
|
14
|
-
});
|
package/generate2.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
|
|
3
|
-
process.nextTick(async () => {
|
|
4
|
-
const content = await fs.promises.readFile("unistd.h", "utf8");
|
|
5
|
-
|
|
6
|
-
const parts = content.split(/[\s),]/);
|
|
7
|
-
const filtered = parts.filter((part) => part.startsWith("__NR_"));
|
|
8
|
-
const constants = filtered.map((part) => {
|
|
9
|
-
// return `SYS_${part.substr("sys_".length)}`;
|
|
10
|
-
return part;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
let nodup = [];
|
|
14
|
-
constants.forEach((c) => {
|
|
15
|
-
if (nodup.indexOf(c) < 0) {
|
|
16
|
-
nodup = [...nodup, c];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
nodup.forEach((c) => {
|
|
21
|
-
console.log(`DEF_SYS_CONSTANT(env, target, ${c});`);
|
|
22
|
-
});
|
|
23
|
-
// console.log("filtered =", filtered);
|
|
24
|
-
});
|