mmt-testlight 1.43.1-pre → 1.43.2-pre

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/cli.js +34 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- globalThis.__MMT_CLI_VERSION__ = "1.43.1-pre";
2
+ globalThis.__MMT_CLI_VERSION__ = "1.43.2-pre";
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -66826,6 +66826,7 @@ __export(testParsePack_exports, {
66826
66826
  STAGE_KEY_ORDER: () => STAGE_KEY_ORDER,
66827
66827
  STEP_KEY_ORDER: () => STEP_KEY_ORDER,
66828
66828
  getTestFlowStepType: () => getTestFlowStepType,
66829
+ peekTestMetaFromYaml: () => peekTestMetaFromYaml,
66829
66830
  quoteExpectOperators: () => quoteExpectOperators,
66830
66831
  testToYaml: () => testToYaml,
66831
66832
  validateTestData: () => validateTestData,
@@ -67063,6 +67064,22 @@ function normalizeTestFlowStages(stages) {
67063
67064
  return normalized;
67064
67065
  });
67065
67066
  }
67067
+ function peekTestMetaFromYaml(yamlContent) {
67068
+ try {
67069
+ const doc = markupConvertor_default(quoteExpectOperators(yamlContent));
67070
+ if (!doc || typeof doc !== "object") {
67071
+ return {};
67072
+ }
67073
+ const title = typeof doc.title === "string" && doc.title.trim() ? doc.title.trim() : void 0;
67074
+ const tags = Array.isArray(doc.tags) ? doc.tags.map((t) => String(t).trim()).filter(Boolean) : void 0;
67075
+ return {
67076
+ title,
67077
+ tags: tags?.length ? tags : void 0
67078
+ };
67079
+ } catch {
67080
+ return {};
67081
+ }
67082
+ }
67066
67083
  function yamlToTest(yamlContent) {
67067
67084
  try {
67068
67085
  const doc = markupConvertor_default(quoteExpectOperators(yamlContent));
@@ -79222,11 +79239,23 @@ async function buildSuiteHierarchyFromSuiteFile(params) {
79222
79239
  let title;
79223
79240
  let tags;
79224
79241
  try {
79225
- const testDoc = isHttpFilePath(resolvedPath) ? httpToTest(raw, resolvedPath) : isBrunoFilePath(resolvedPath) ? brunoToTest(raw, resolvedPath) : yamlToTest(raw);
79226
- if (typeof testDoc?.title === "string" && testDoc.title.trim()) {
79227
- title = testDoc.title.trim();
79242
+ if (isHttpFilePath(resolvedPath)) {
79243
+ const testDoc = httpToTest(raw, resolvedPath);
79244
+ if (typeof testDoc?.title === "string" && testDoc.title.trim()) {
79245
+ title = testDoc.title.trim();
79246
+ }
79247
+ tags = optionalTags(testDoc?.tags);
79248
+ } else if (isBrunoFilePath(resolvedPath)) {
79249
+ const testDoc = brunoToTest(raw, resolvedPath);
79250
+ if (typeof testDoc?.title === "string" && testDoc.title.trim()) {
79251
+ title = testDoc.title.trim();
79252
+ }
79253
+ tags = optionalTags(testDoc?.tags);
79254
+ } else {
79255
+ const meta = peekTestMetaFromYaml(raw);
79256
+ title = meta.title;
79257
+ tags = optionalTags(meta.tags);
79228
79258
  }
79229
- tags = optionalTags(testDoc?.tags);
79230
79259
  } catch {
79231
79260
  }
79232
79261
  const testNode = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmt-testlight",
3
- "version": "1.43.1-pre",
3
+ "version": "1.43.2-pre",
4
4
  "description": "AI-powered REST Client and Git-native API testing CLI for YAML .mmt files. Same tests in VS Code and CI. Alternative to Postman.",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,