@testsmith/api-spector-agent 0.5.8 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.cjs +9 -1
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -44886,6 +44886,11 @@ function interpolate(str, vars) {
44886
44886
  return match;
44887
44887
  });
44888
44888
  }
44889
+ function resolveDataRow(row, scope) {
44890
+ return Object.fromEntries(
44891
+ Object.entries(row).map(([k68, v60]) => [k68, typeof v60 === "string" ? interpolate(v60, scope) : v60])
44892
+ );
44893
+ }
44889
44894
  function buildUrl(baseUrl, params, vars) {
44890
44895
  const templateTokens = /* @__PURE__ */ new Set();
44891
44896
  baseUrl.replace(/\{\{([^}]+)\}\}/g, (_m, name) => {
@@ -47813,6 +47818,9 @@ async function executeRunnerRequest(opts) {
47813
47818
  status: "running"
47814
47819
  };
47815
47820
  const dynamicVars = await buildDynamicVars();
47821
+ if (localVars && Object.keys(localVars).length > 0) {
47822
+ localVars = resolveDataRow(localVars, mergeVars(envVars, collectionVars, globals2, {}, dynamicVars));
47823
+ }
47816
47824
  let vars = mergeVars(envVars, collectionVars, globals2, localVars, dynamicVars);
47817
47825
  let updatedEnvVars = { ...envVars };
47818
47826
  let updatedCollectionVars = { ...collectionVars };
@@ -47944,7 +47952,7 @@ var APP_URL = (process.env.APP_URL || "").replace(/\/+$/, "");
47944
47952
  var AGENT_TOKEN = process.env.AGENT_TOKEN || "";
47945
47953
  var RUNTIME_TOKEN = process.env.RUNTIME_TOKEN || "";
47946
47954
  var POLL_MS = Number(process.env.POLL_INTERVAL_MS || 5e3);
47947
- var VERSION = true ? "0.5.8" : "";
47955
+ var VERSION = true ? "0.6.0" : "";
47948
47956
  var authHeaders = AGENT_TOKEN ? { Authorization: `Bearer ${AGENT_TOKEN}` } : RUNTIME_TOKEN ? { "X-Runtime-Token": RUNTIME_TOKEN } : {};
47949
47957
  async function postResult(m75, fields) {
47950
47958
  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.5.8",
3
+ "version": "0.6.0",
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",