@testsmith/api-spector-agent 0.6.1 → 0.6.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/dist/index.cjs +10 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -47903,6 +47903,15 @@ async function executeRunnerRequest(opts) {
|
|
|
47903
47903
|
await persistGlobals();
|
|
47904
47904
|
onScriptOutput?.("post", r52.consoleOutput, r52.error);
|
|
47905
47905
|
}
|
|
47906
|
+
if (opts.expectStatus && opts.expectStatus.length > 0) {
|
|
47907
|
+
const tag = opts.owaspTag ? `[${opts.owaspTag}] ` : "";
|
|
47908
|
+
const passed = opts.expectStatus.includes(exchange.status);
|
|
47909
|
+
testResults = [...testResults, {
|
|
47910
|
+
name: `${tag}expected status ${opts.expectStatus.join(" or ")}`,
|
|
47911
|
+
passed,
|
|
47912
|
+
error: passed ? void 0 : `got ${exchange.status} ${exchange.statusText}`
|
|
47913
|
+
}];
|
|
47914
|
+
}
|
|
47906
47915
|
const status = deriveRunStatus(postScriptError, testResults, exchange.status);
|
|
47907
47916
|
if (exchange.status >= 400 && testResults.length === 0) {
|
|
47908
47917
|
testResults = [...testResults, syntheticHttpFailure(exchange.status, exchange.statusText)];
|
|
@@ -47952,7 +47961,7 @@ var APP_URL = (process.env.APP_URL || "").replace(/\/+$/, "");
|
|
|
47952
47961
|
var AGENT_TOKEN = process.env.AGENT_TOKEN || "";
|
|
47953
47962
|
var RUNTIME_TOKEN = process.env.RUNTIME_TOKEN || "";
|
|
47954
47963
|
var POLL_MS = Number(process.env.POLL_INTERVAL_MS || 5e3);
|
|
47955
|
-
var VERSION = true ? "0.6.
|
|
47964
|
+
var VERSION = true ? "0.6.3" : "";
|
|
47956
47965
|
var authHeaders = AGENT_TOKEN ? { Authorization: `Bearer ${AGENT_TOKEN}` } : RUNTIME_TOKEN ? { "X-Runtime-Token": RUNTIME_TOKEN } : {};
|
|
47957
47966
|
async function postResult(m75, fields) {
|
|
47958
47967
|
await fetch(`${APP_URL}/api/monitor-runtime/${m75.id}/result`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testsmith/api-spector-agent",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "API Spector private runner: monitor internal/local APIs the cloud cannot reach, with no inbound connections.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://api-spector.dev",
|