@testsmith/api-spector 0.8.1 → 0.8.2

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/out/main/flow.js CHANGED
@@ -268,7 +268,7 @@ async function main() {
268
268
  const envName = args.environment ?? args.env;
269
269
  const env = environments.selectEnvironment(workspace, environments$1, envName);
270
270
  const verbose = Boolean(args.verbose);
271
- const version = `v${"0.8.1"}`;
271
+ const version = `v${"0.8.2"}`;
272
272
  console.log("");
273
273
  console.log(cliCommon.color(" API Flow Runner" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
274
274
  console.log(cliCommon.color(` Flow: ${flow.name}`, cliCommon.C.gray));
package/out/main/index.js CHANGED
@@ -1106,9 +1106,12 @@ const INSOMNIA_RULES = [
1106
1106
  [/\bcontext\.response\.getStatusCode\(\)/g, "sp.response.code"],
1107
1107
  [/\bcontext\.response\.getHeader\(/g, "sp.response.headers.get("]
1108
1108
  ];
1109
+ const COMMON_RULES = [
1110
+ [/\brequire\(\s*['"]moment['"]\s*\)/g, "dayjs"]
1111
+ ];
1109
1112
  function translateScript(source, format) {
1110
- const rules = format === "postman" ? POSTMAN_RULES : format === "bruno" ? BRUNO_RULES : INSOMNIA_RULES;
1111
- return rules.reduce((src, [pattern, replacement]) => src.replace(pattern, replacement), source);
1113
+ const formatRules = format === "postman" ? POSTMAN_RULES : format === "bruno" ? BRUNO_RULES : INSOMNIA_RULES;
1114
+ return [...formatRules, ...COMMON_RULES].reduce((src, [pattern, replacement]) => src.replace(pattern, replacement), source);
1112
1115
  }
1113
1116
  function parseHeaders$1(raw) {
1114
1117
  return (raw ?? []).map((h) => ({
@@ -7312,7 +7315,7 @@ function isNewer(a, b) {
7312
7315
  return a2 > b2;
7313
7316
  }
7314
7317
  async function checkForUpdate() {
7315
- const current = "0.8.1";
7318
+ const current = "0.8.2";
7316
7319
  try {
7317
7320
  const res = await fetch(REGISTRY_URL, { signal: AbortSignal.timeout(4e3) });
7318
7321
  if (!res.ok) return null;
package/out/main/perf.js CHANGED
@@ -191,7 +191,7 @@ async function main() {
191
191
  targetLabel = `flow: ${flow.name}`;
192
192
  }
193
193
  const load = perfRun.deriveLoad(plan);
194
- const version = `v${"0.8.1"}`;
194
+ const version = `v${"0.8.2"}`;
195
195
  console.log("");
196
196
  console.log(cliCommon.color(" API Performance" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
197
197
  console.log(cliCommon.color(` Plan: ${plan.name}`, cliCommon.C.gray));
@@ -551,7 +551,7 @@ async function main() {
551
551
  } else if (!envName && workspace.settings?.defaultEnvironment && !env) {
552
552
  console.warn(cliCommon.color(`Warning: default environment "${workspace.settings.defaultEnvironment}" not found. Running without environment.`, cliCommon.C.yellow));
553
553
  }
554
- const version = `v${"0.8.1"}`;
554
+ const version = `v${"0.8.2"}`;
555
555
  console.log("");
556
556
  console.log(cliCommon.color(" API Test Runner" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
557
557
  console.log(cliCommon.color(` Workspace: ${wsPath}`, cliCommon.C.gray));
@@ -1,5 +1,5 @@
1
1
  import { l as linter, E as EditorView, L as LanguageSupport, f as LRLanguage, s as styleTags, i as indentNodeProp, m as delimitedIndent, n as foldNodeProp, p as foldInside, S as StateField, q as LRParser, u as StateEffect, v as tags, a as reactExports, j as jsxRuntimeExports, d as ReactCodeMirror, o as oneDark, c as json } from "./codemirror-CdIFBPs2.js";
2
- import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-B_7rAo5x.js";
2
+ import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-CRFyHn2H.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  function devAssert(condition, message) {
5
5
  const booleanCondition = Boolean(condition);
@@ -1,5 +1,5 @@
1
1
  import { a as reactExports, j as jsxRuntimeExports, d as ReactCodeMirror, o as oneDark, x as xml } from "./codemirror-CdIFBPs2.js";
2
- import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-B_7rAo5x.js";
2
+ import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-CRFyHn2H.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  const SOAP_11_CONTENT_TYPE = "text/xml; charset=utf-8";
5
5
  const SOAP_12_CONTENT_TYPE = "application/soap+xml; charset=utf-8";