api-tuner 0.5.3 → 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 CHANGED
@@ -77,4 +77,20 @@ api-tuner test.n3
77
77
 
78
78
  ## More examples
79
79
 
80
- TBD
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-tuner",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "license": "MIT",
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