@boolesai/tspec-cli 1.1.0 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boolesai/tspec-cli",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "CLI for @boolesai/tspec testing framework",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "@boolesai/tspec": "^1.1.0",
25
+ "@boolesai/tspec": "1.2.0",
26
26
  "@modelcontextprotocol/sdk": "^1.0.0",
27
27
  "chalk": "^5.0.0",
28
28
  "commander": "^12.0.0",
@@ -4,7 +4,7 @@ export interface FileResolutionResult {
4
4
  errors: string[];
5
5
  }
6
6
  /**
7
- * Represents a discovered .tspec file without loading its content.
7
+ * Represents a discovered .tcase file without loading its content.
8
8
  * Used for lazy file loading - files are scanned first, content read on-demand.
9
9
  */
10
10
  export interface TSpecFileDescriptor {
@@ -12,9 +12,9 @@ export interface TSpecFileDescriptor {
12
12
  path: string;
13
13
  /** Path relative to working directory */
14
14
  relativePath: string;
15
- /** Base filename (e.g., "login.http.tspec") */
15
+ /** Base filename (e.g., "login.http.tcase") */
16
16
  fileName: string;
17
- /** Protocol type extracted from filename (e.g., "http" from "login.http.tspec") */
17
+ /** Protocol type extracted from filename (e.g., "http" from "login.http.tcase") */
18
18
  protocol: ProtocolType | null;
19
19
  }
20
20
  export interface DiscoveryResult {
@@ -25,7 +25,7 @@ export declare function resolveFiles(patterns: string[], cwd?: string): Promise<
25
25
  export declare function filterByExtension(files: string[], extension: string): string[];
26
26
  export declare function getTspecFiles(files: string[]): string[];
27
27
  /**
28
- * Discovers .tspec files without loading their content.
28
+ * Discovers .tcase files without loading their content.
29
29
  * Files are scanned and classified, content is read on-demand during validation/parsing/execution.
30
30
  *
31
31
  * @param patterns - File paths, directory paths, or glob patterns
@@ -33,3 +33,42 @@ export declare function getTspecFiles(files: string[]): string[];
33
33
  * @returns DiscoveryResult with file descriptors and any errors
34
34
  */
35
35
  export declare function discoverTSpecFiles(patterns: string[], cwd?: string): Promise<DiscoveryResult>;
36
+ /**
37
+ * Represents a discovered .tsuite file without loading its content.
38
+ * Used for lazy file loading - files are scanned first, content read on-demand.
39
+ */
40
+ export interface TSuiteFileDescriptor {
41
+ /** Absolute path to the file */
42
+ path: string;
43
+ /** Path relative to working directory */
44
+ relativePath: string;
45
+ /** Base filename (e.g., "bookstore.http.tsuite") */
46
+ fileName: string;
47
+ /** Protocol type extracted from filename (e.g., "http" from "bookstore.http.tsuite"), null for mixed protocol */
48
+ protocol: ProtocolType | null;
49
+ /** Whether this is a template file (*.tsuite.yaml) */
50
+ isTemplate: boolean;
51
+ }
52
+ export interface SuiteDiscoveryResult {
53
+ suites: TSuiteFileDescriptor[];
54
+ errors: string[];
55
+ }
56
+ /**
57
+ * Discovers .tsuite files without loading their content.
58
+ * Files are scanned and classified, content is read on-demand during validation/parsing/execution.
59
+ *
60
+ * @param patterns - File paths, directory paths, or glob patterns
61
+ * @param cwd - Working directory for resolving relative paths
62
+ * @returns SuiteDiscoveryResult with file descriptors and any errors
63
+ */
64
+ export declare function discoverSuiteFiles(patterns: string[], cwd?: string): Promise<SuiteDiscoveryResult>;
65
+ /**
66
+ * Discovers both .tcase and .tsuite files.
67
+ * Useful when processing mixed inputs.
68
+ */
69
+ export interface MixedDiscoveryResult {
70
+ tspecFiles: TSpecFileDescriptor[];
71
+ suiteFiles: TSuiteFileDescriptor[];
72
+ errors: string[];
73
+ }
74
+ export declare function discoverAllTestFiles(patterns: string[], cwd?: string): Promise<MixedDiscoveryResult>;