eyereasoner 1.14.1 → 2.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/README.md +10 -6
- package/dist/bin/index.d.ts +2 -0
- package/dist/bin/index.js +21 -0
- package/dist/eye.d.ts +2 -0
- package/dist/eye.js +3 -0
- package/dist/index.d.ts +5 -7
- package/dist/index.js +6 -8
- package/dist/swipl-bundled.temp.js +227 -264
- package/dist/transformers.d.ts +5 -38
- package/dist/transformers.js +17 -87
- package/package.json +8 -10
- package/dist/eye.pl.d.ts +0 -2
- package/dist/eye.pl.js +0 -5
- package/dist/eye.pvm.d.ts +0 -2
- package/dist/eye.pvm.js +0 -5
package/README.md
CHANGED
|
@@ -15,12 +15,8 @@ The simplest way to use this package is to execute a query over a dataset and ge
|
|
|
15
15
|
import { basicQuery } from 'eyereasoner';
|
|
16
16
|
|
|
17
17
|
async function main() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
result,
|
|
21
|
-
// The proof of the results (as an array of quads)
|
|
22
|
-
proof
|
|
23
|
-
} = await basicQuery(dataQuads, queryQuads);
|
|
18
|
+
// The result of the query (as an array of quads)
|
|
19
|
+
const result = await basicQuery(dataQuads, queryQuads);
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
main();
|
|
@@ -153,6 +149,14 @@ async function main() {
|
|
|
153
149
|
main();
|
|
154
150
|
```
|
|
155
151
|
|
|
152
|
+
## CLI Usage
|
|
153
|
+
|
|
154
|
+
Globally installing `eyereasoner` using `npm i -g eyereasoner` will also expose a CLI interface for using the reasoner:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
eyereasoner --nope --quiet ./socrates.n3 --query ./socrates-query.n3
|
|
158
|
+
```
|
|
159
|
+
|
|
156
160
|
## License
|
|
157
161
|
©2022–present
|
|
158
162
|
[Jesse Wright](https://github.com/jeswr),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const __1 = require("..");
|
|
10
|
+
async function main() {
|
|
11
|
+
const Module = await (0, __1.SwiplEye)();
|
|
12
|
+
// Make any local files available to the reasoner
|
|
13
|
+
for (const arg of process.argv.slice(2)) {
|
|
14
|
+
const p = path_1.default.join(process.cwd(), arg);
|
|
15
|
+
if (fs_1.default.existsSync(p)) {
|
|
16
|
+
Module.FS.writeFile(arg, fs_1.default.readFileSync(p));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
(0, __1.queryOnce)(Module, 'main', process.argv.slice(2));
|
|
20
|
+
}
|
|
21
|
+
main();
|