eyereasoner 15.2.12 → 16.0.0
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/dist/bin/main.js +8 -1
- package/dist/eye.d.ts +1 -1
- package/dist/eye.js +1 -1
- package/dist/lingua.d.ts +1 -1
- package/dist/lingua.js +1 -1
- package/dist/query.d.ts +10 -0
- package/dist/query.js +26 -7
- package/dist/transformers.d.ts +7 -2
- package/dist/transformers.js +6 -12
- package/package.json +4 -1
package/dist/bin/main.js
CHANGED
|
@@ -6,8 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.mainFunc = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const readline_1 = __importDefault(require("readline"));
|
|
9
10
|
const __1 = require("..");
|
|
11
|
+
const query_1 = require("../query");
|
|
10
12
|
async function mainFunc(proc) {
|
|
13
|
+
const rl = readline_1.default.promises.createInterface({
|
|
14
|
+
input: proc.stdin,
|
|
15
|
+
output: proc.stdout,
|
|
16
|
+
});
|
|
11
17
|
const Module = await (0, __1.SwiplEye)();
|
|
12
18
|
// Make any local files available to the reasoner
|
|
13
19
|
for (const arg of proc.argv.slice(2)) {
|
|
@@ -16,6 +22,7 @@ async function mainFunc(proc) {
|
|
|
16
22
|
Module.FS.writeFile(arg, fs_1.default.readFileSync(p));
|
|
17
23
|
}
|
|
18
24
|
}
|
|
19
|
-
(0,
|
|
25
|
+
await (0, query_1.qaQuery)(Module, 'main', proc.argv.slice(2), (q) => rl.question(`${q}\n|: `));
|
|
26
|
+
rl.close();
|
|
20
27
|
}
|
|
21
28
|
exports.mainFunc = mainFunc;
|