api-tuner 0.5.2 → 0.5.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.
- package/README.md +17 -1
- package/lib/summarise-results.js +1 -1
- package/package.json +11 -8
- package/rules/files.n3 +1 -1
package/README.md
CHANGED
|
@@ -77,4 +77,20 @@ api-tuner test.n3
|
|
|
77
77
|
|
|
78
78
|
## More examples
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
### Debugging
|
|
81
|
+
|
|
82
|
+
Setting the `--debug` flag will print verbose response information. The `--raw` flag will print
|
|
83
|
+
the raw triples produced by the n3 rules.
|
|
84
|
+
|
|
85
|
+
Additionally, you can inspect the raw response files, which are written to the system's temp directory. The are prefixed
|
|
86
|
+
with `api-tuner`. Thus, you can list them with `ls -l "${TMPDIR:-/tmp}"/api-tuner*`, or upload to CI artifacts, as shown
|
|
87
|
+
in the GitHub Workflow step example below.
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
- if: failure()
|
|
91
|
+
name: upload api-tuner response data
|
|
92
|
+
uses: actions/upload-artifact@v7
|
|
93
|
+
with:
|
|
94
|
+
name: api-tuner-debug
|
|
95
|
+
path: '${{ runner.temp }}/api-tuner*'
|
|
96
|
+
```
|
package/lib/summarise-results.js
CHANGED
|
@@ -9,7 +9,7 @@ export default async (resultStream) => {
|
|
|
9
9
|
const data = await rdf.dataset().import(rdf.formats.parsers.import('text/n3', resultStream, {
|
|
10
10
|
format: 'n3',
|
|
11
11
|
}));
|
|
12
|
-
const validationReport = validator.validate(data);
|
|
12
|
+
const validationReport = await validator.validate(data);
|
|
13
13
|
const testCases = rdf.clownface({ dataset: data })
|
|
14
14
|
.has(rdf.ns.rdf.type, rdf.ns.earl.TestCase)
|
|
15
15
|
.toArray();
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api-tuner",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
8
|
-
"api-tuner": "
|
|
8
|
+
"api-tuner": "bin/tuner.sh"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"download-eye": "EYE_VERSION=11.16.4 ./lib/download-eye.js",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@changesets/cli": "^2.29.7",
|
|
32
|
-
"@jeswr/pretty-turtle": "^1.
|
|
32
|
+
"@jeswr/pretty-turtle": "^1.8.2",
|
|
33
33
|
"@sindresorhus/merge-streams": "^4.0.0",
|
|
34
|
-
"@zazuko/env-node": "^
|
|
34
|
+
"@zazuko/env-node": "^3",
|
|
35
35
|
"commander": "^13.1.0",
|
|
36
36
|
"get-stream": "^9.0.1",
|
|
37
37
|
"is-absolute-url": "^4.0.1",
|
|
38
|
-
"jsonld": "^
|
|
39
|
-
"rdf-validate-shacl": "^0.5
|
|
38
|
+
"jsonld": "^9",
|
|
39
|
+
"rdf-validate-shacl": "^0.6.5",
|
|
40
40
|
"replacestream": "^4.0.3",
|
|
41
|
-
"tar": "^7.5.
|
|
41
|
+
"tar": "^7.5.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@rdfjs/types": "^
|
|
44
|
+
"@rdfjs/types": "^2",
|
|
45
45
|
"@tpluscode/eslint-config": "^0.5.0",
|
|
46
46
|
"@types/jsonld": "^1.5.15",
|
|
47
47
|
"@types/n3": "^1.24.2",
|
|
@@ -57,6 +57,9 @@
|
|
|
57
57
|
"tsx": "^4.19.3",
|
|
58
58
|
"typescript": "^5.8.3"
|
|
59
59
|
},
|
|
60
|
+
"repository": {
|
|
61
|
+
"url": "git+https://github.com/zazuko/api-tuner.git"
|
|
62
|
+
},
|
|
60
63
|
"lint-staged": {
|
|
61
64
|
"*.{js,ts}": [
|
|
62
65
|
"eslint --fix --quiet"
|
package/rules/files.n3
CHANGED
|
@@ -15,7 +15,7 @@ prefix file: <http://www.w3.org/2000/10/swap/file#>
|
|
|
15
15
|
} <= {
|
|
16
16
|
?uri log:uri ( "urn:rand:" ( 1000 )!e:random )!string:concatenation .
|
|
17
17
|
# log:shell captures the traling newline
|
|
18
|
-
( "mktemp -d"!log:shell "\n" "" ) string:replace ?tempDir .
|
|
18
|
+
( "mktemp -t api-tuner -d 2>/dev/null || mktemp -d -t api-tuner.XXXXXXXX"!log:shell "\n" "" ) string:replace ?tempDir .
|
|
19
19
|
|
|
20
20
|
(
|
|
21
21
|
?tempDir
|