intellitester 0.2.1 → 0.2.12

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.
@@ -24,14 +24,14 @@ var prompts__default = /*#__PURE__*/_interopDefault(prompts);
24
24
 
25
25
  var nonEmptyString = zod.z.string().trim().min(1, "Value cannot be empty");
26
26
  var LocatorSchema = zod.z.object({
27
- description: zod.z.string().trim().optional(),
28
- testId: zod.z.string().trim().optional(),
29
- text: zod.z.string().trim().optional(),
30
- css: zod.z.string().trim().optional(),
31
- xpath: zod.z.string().trim().optional(),
32
- role: zod.z.string().trim().optional(),
33
- name: zod.z.string().trim().optional()
34
- }).refine(
27
+ description: zod.z.string().trim().optional().describe("AI-friendly description of the element to find"),
28
+ testId: zod.z.string().trim().optional().describe("data-testid attribute value"),
29
+ text: zod.z.string().trim().optional().describe("Visible text content"),
30
+ css: zod.z.string().trim().optional().describe("CSS selector"),
31
+ xpath: zod.z.string().trim().optional().describe("XPath selector"),
32
+ role: zod.z.string().trim().optional().describe("ARIA role"),
33
+ name: zod.z.string().trim().optional().describe("Accessible name")
34
+ }).describe("Defines how to locate an element on the page. At least one selector must be provided.").refine(
35
35
  (locator) => Boolean(
36
36
  locator.description || locator.testId || locator.text || locator.css || locator.xpath || locator.role || locator.name
37
37
  ),
@@ -39,73 +39,73 @@ var LocatorSchema = zod.z.object({
39
39
  );
40
40
  var navigateActionSchema = zod.z.object({
41
41
  type: zod.z.literal("navigate"),
42
- value: nonEmptyString
43
- });
42
+ value: nonEmptyString.describe("URL or path to navigate to")
43
+ }).describe("Navigate to a URL");
44
44
  var tapActionSchema = zod.z.object({
45
45
  type: zod.z.literal("tap"),
46
46
  target: LocatorSchema
47
- });
47
+ }).describe("Click or tap on an element");
48
48
  var inputActionSchema = zod.z.object({
49
49
  type: zod.z.literal("input"),
50
50
  target: LocatorSchema,
51
- value: zod.z.string()
52
- });
51
+ value: zod.z.string().describe("Text to input (can reference variables with ${VAR_NAME})")
52
+ }).describe("Input text into a field");
53
53
  var assertActionSchema = zod.z.object({
54
54
  type: zod.z.literal("assert"),
55
55
  target: LocatorSchema,
56
- value: zod.z.string().optional()
57
- });
56
+ value: zod.z.string().optional().describe("Expected text content")
57
+ }).describe("Assert that an element exists or contains expected text");
58
58
  var waitActionSchema = zod.z.object({
59
59
  type: zod.z.literal("wait"),
60
- target: LocatorSchema.optional(),
61
- timeout: zod.z.number().int().positive().optional()
62
- }).refine((action) => action.target || action.timeout, {
60
+ target: LocatorSchema.optional().describe("Element to wait for"),
61
+ timeout: zod.z.number().int().positive().optional().describe("Time to wait in milliseconds")
62
+ }).describe("Wait for an element or timeout").refine((action) => action.target || action.timeout, {
63
63
  message: "wait requires a target or timeout"
64
64
  });
65
65
  var scrollActionSchema = zod.z.object({
66
66
  type: zod.z.literal("scroll"),
67
- target: LocatorSchema.optional(),
68
- direction: zod.z.enum(["up", "down"]).optional(),
69
- amount: zod.z.number().int().positive().optional()
70
- });
67
+ target: LocatorSchema.optional().describe("Element to scroll"),
68
+ direction: zod.z.enum(["up", "down"]).optional().describe("Direction to scroll"),
69
+ amount: zod.z.number().int().positive().optional().describe("Amount to scroll in pixels")
70
+ }).describe("Scroll the page or an element");
71
71
  var screenshotActionSchema = zod.z.object({
72
72
  type: zod.z.literal("screenshot"),
73
- name: zod.z.string().optional()
74
- });
73
+ name: zod.z.string().optional().describe("Name for the screenshot file")
74
+ }).describe("Take a screenshot");
75
75
  var setVarActionSchema = zod.z.object({
76
76
  type: zod.z.literal("setVar"),
77
- name: nonEmptyString,
78
- value: zod.z.string().optional(),
79
- from: zod.z.enum(["response", "element", "email"]).optional(),
80
- path: zod.z.string().optional(),
81
- pattern: zod.z.string().optional()
82
- });
77
+ name: nonEmptyString.describe("Variable name to set"),
78
+ value: zod.z.string().optional().describe("Static value to set"),
79
+ from: zod.z.enum(["response", "element", "email"]).optional().describe("Extract value from a source"),
80
+ path: zod.z.string().optional().describe("JSON path or selector for extraction"),
81
+ pattern: zod.z.string().optional().describe("Regular expression pattern for extraction")
82
+ }).describe("Set a variable for use in later steps");
83
83
  var emailWaitForActionSchema = zod.z.object({
84
84
  type: zod.z.literal("email.waitFor"),
85
- mailbox: nonEmptyString,
86
- timeout: zod.z.number().int().positive().optional(),
87
- subjectContains: zod.z.string().optional()
88
- });
85
+ mailbox: nonEmptyString.describe("Email address or mailbox to check"),
86
+ timeout: zod.z.number().int().positive().optional().describe("How long to wait for email in milliseconds"),
87
+ subjectContains: zod.z.string().optional().describe("Filter by email subject")
88
+ }).describe("Wait for an email to arrive");
89
89
  var emailExtractCodeActionSchema = zod.z.object({
90
90
  type: zod.z.literal("email.extractCode"),
91
- saveTo: nonEmptyString,
92
- pattern: zod.z.string().optional()
93
- });
91
+ saveTo: nonEmptyString.describe("Variable name to save the extracted code"),
92
+ pattern: zod.z.string().optional().describe("Regular expression to extract code")
93
+ }).describe("Extract a verification code from email");
94
94
  var emailExtractLinkActionSchema = zod.z.object({
95
95
  type: zod.z.literal("email.extractLink"),
96
- saveTo: nonEmptyString,
97
- pattern: zod.z.string().optional()
98
- });
96
+ saveTo: nonEmptyString.describe("Variable name to save the extracted link"),
97
+ pattern: zod.z.string().optional().describe("Regular expression to match specific links")
98
+ }).describe("Extract a link from email");
99
99
  var emailClearActionSchema = zod.z.object({
100
100
  type: zod.z.literal("email.clear"),
101
- mailbox: nonEmptyString
102
- });
101
+ mailbox: nonEmptyString.describe("Email address or mailbox to clear")
102
+ }).describe("Clear emails from a mailbox");
103
103
  var appwriteVerifyEmailActionSchema = zod.z.object({
104
104
  type: zod.z.literal("appwrite.verifyEmail")
105
- });
105
+ }).describe("Verify email using Appwrite");
106
106
  var debugActionSchema = zod.z.object({
107
107
  type: zod.z.literal("debug")
108
- });
108
+ }).describe("Pause execution and open Playwright Inspector for debugging");
109
109
  var ActionSchema = zod.z.discriminatedUnion("type", [
110
110
  navigateActionSchema,
111
111
  tapActionSchema,
@@ -123,96 +123,92 @@ var ActionSchema = zod.z.discriminatedUnion("type", [
123
123
  debugActionSchema
124
124
  ]);
125
125
  var defaultsSchema = zod.z.object({
126
- timeout: zod.z.number().int().positive().optional(),
127
- screenshots: zod.z.enum(["on-failure", "always", "never"]).optional()
128
- });
126
+ timeout: zod.z.number().int().positive().optional().describe("Default timeout in milliseconds for all actions"),
127
+ screenshots: zod.z.enum(["on-failure", "always", "never"]).optional().describe("When to capture screenshots during test execution")
128
+ }).describe("Default settings that apply to all tests unless overridden");
129
129
  var webConfigSchema = zod.z.object({
130
- baseUrl: nonEmptyString.url().optional(),
131
- browser: zod.z.string().trim().optional(),
132
- headless: zod.z.boolean().optional(),
133
- timeout: zod.z.number().int().positive().optional()
134
- });
130
+ baseUrl: nonEmptyString.url().optional().describe("Base URL for the web application"),
131
+ browser: zod.z.string().trim().optional().describe("Browser to use for testing"),
132
+ headless: zod.z.boolean().optional().describe("Run browser in headless mode"),
133
+ timeout: zod.z.number().int().positive().optional().describe("Timeout in milliseconds for web actions")
134
+ }).describe("Web platform configuration");
135
135
  var androidConfigSchema = zod.z.object({
136
- appId: zod.z.string().trim().optional(),
137
- device: zod.z.string().trim().optional()
138
- });
136
+ appId: zod.z.string().trim().optional().describe("Android application ID"),
137
+ device: zod.z.string().trim().optional().describe("Device name or ID to run tests on")
138
+ }).describe("Android platform configuration");
139
139
  var iosConfigSchema = zod.z.object({
140
- bundleId: zod.z.string().trim().optional(),
141
- simulator: zod.z.string().trim().optional()
142
- });
140
+ bundleId: zod.z.string().trim().optional().describe("iOS bundle identifier"),
141
+ simulator: zod.z.string().trim().optional().describe("Simulator name to run tests on")
142
+ }).describe("iOS platform configuration");
143
143
  var emailConfigSchema = zod.z.object({
144
- provider: zod.z.literal("inbucket"),
145
- endpoint: nonEmptyString.url().optional()
146
- });
144
+ provider: zod.z.literal("inbucket").describe("Email testing provider"),
145
+ endpoint: nonEmptyString.url().optional().describe("Email service endpoint URL")
146
+ }).describe("Email testing configuration");
147
147
  var appwriteConfigSchema = zod.z.object({
148
- endpoint: nonEmptyString.url(),
149
- projectId: nonEmptyString,
150
- apiKey: nonEmptyString,
151
- cleanup: zod.z.boolean().optional(),
152
- cleanupOnFailure: zod.z.boolean().optional()
153
- });
148
+ endpoint: nonEmptyString.url().describe("Appwrite API endpoint"),
149
+ projectId: nonEmptyString.describe("Appwrite project ID"),
150
+ apiKey: nonEmptyString.describe("Appwrite API key with appropriate permissions"),
151
+ cleanup: zod.z.boolean().optional().describe("Enable automatic cleanup of created resources"),
152
+ cleanupOnFailure: zod.z.boolean().optional().describe("Clean up resources even when test fails")
153
+ }).describe("Appwrite backend configuration");
154
154
  var healingSchema = zod.z.object({
155
- enabled: zod.z.boolean().optional(),
156
- strategies: zod.z.array(zod.z.string().trim()).optional()
157
- });
155
+ enabled: zod.z.boolean().optional().describe("Enable self-healing capabilities"),
156
+ strategies: zod.z.array(zod.z.string().trim()).optional().describe("Healing strategies to use")
157
+ }).describe("Self-healing test configuration");
158
158
  var webServerSchema = zod.z.object({
159
- // Option 1: Explicit command
160
- command: nonEmptyString.optional(),
161
- // Option 2: Auto-detect
162
- auto: zod.z.boolean().optional(),
163
- // Option 3: Static directory
164
- static: zod.z.string().optional(),
165
- // Required
166
- url: nonEmptyString.url(),
167
- port: zod.z.number().int().positive().optional(),
168
- reuseExistingServer: zod.z.boolean().default(true),
169
- timeout: zod.z.number().int().positive().default(3e4),
170
- cwd: zod.z.string().optional()
171
- }).refine((config) => config.command || config.auto || config.static, {
159
+ command: nonEmptyString.optional().describe("Command to start the web server"),
160
+ auto: zod.z.boolean().optional().describe("Automatically detect and run the dev server from package.json"),
161
+ static: zod.z.string().optional().describe("Serve a static directory instead of running a command"),
162
+ url: nonEmptyString.url().describe("URL to wait for before starting tests"),
163
+ port: zod.z.number().int().positive().optional().describe("Port number for the web server"),
164
+ reuseExistingServer: zod.z.boolean().default(true).describe("Use existing server if already running at the specified URL"),
165
+ timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to become available"),
166
+ cwd: zod.z.string().optional().describe("Working directory for the server command")
167
+ }).describe("Configuration for starting a web server before running tests").refine((config) => config.command || config.auto || config.static, {
172
168
  message: "WebServerConfig requires command, auto: true, or static directory"
173
169
  });
174
170
  var aiSourceSchema = zod.z.object({
175
- pagesDir: zod.z.string().optional(),
176
- componentsDir: zod.z.string().optional(),
177
- extensions: zod.z.array(zod.z.string()).default([".vue", ".astro", ".tsx", ".jsx", ".svelte"])
178
- }).optional();
171
+ pagesDir: zod.z.string().optional().describe("Directory containing page components"),
172
+ componentsDir: zod.z.string().optional().describe("Directory containing reusable components"),
173
+ extensions: zod.z.array(zod.z.string()).default([".vue", ".astro", ".tsx", ".jsx", ".svelte"]).describe("File extensions to include in source code analysis")
174
+ }).optional().describe("Source code directories for AI to analyze when generating tests");
179
175
  var aiConfigSchema = zod.z.object({
180
- provider: zod.z.enum(["anthropic", "openai", "ollama"]),
181
- model: nonEmptyString,
182
- apiKey: zod.z.string().trim().optional(),
183
- baseUrl: zod.z.string().trim().url().optional(),
184
- temperature: zod.z.number().min(0).max(2).default(0.2),
185
- maxTokens: zod.z.number().int().positive().default(4096),
176
+ provider: zod.z.enum(["anthropic", "openai", "ollama"]).describe("AI provider to use for test generation"),
177
+ model: nonEmptyString.describe("Model name to use"),
178
+ apiKey: zod.z.string().trim().optional().describe("API key for the AI provider"),
179
+ baseUrl: zod.z.string().trim().url().optional().describe("Base URL for the AI API (required for Ollama)"),
180
+ temperature: zod.z.number().min(0).max(2).default(0.2).describe("Temperature for AI generation (0 = deterministic, 2 = very creative)"),
181
+ maxTokens: zod.z.number().int().positive().default(4096).describe("Maximum tokens for AI responses"),
186
182
  source: aiSourceSchema
187
- });
183
+ }).describe("AI configuration for test generation and healing");
188
184
  var cleanupDiscoverSchema = zod.z.object({
189
- enabled: zod.z.boolean().default(true),
190
- paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]),
191
- pattern: zod.z.string().default("**/*.ts")
192
- }).optional();
185
+ enabled: zod.z.boolean().default(true).describe("Enable auto-discovery of cleanup handlers in specified paths"),
186
+ paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]).describe("Directories to search for cleanup handler files"),
187
+ pattern: zod.z.string().default("**/*.ts").describe("Glob pattern to match handler files")
188
+ }).optional().describe("Auto-discovery configuration for cleanup handlers");
193
189
  var cleanupConfigSchema = zod.z.object({
194
- provider: zod.z.string().optional(),
195
- parallel: zod.z.boolean().default(false),
196
- retries: zod.z.number().min(1).max(10).default(3),
197
- types: zod.z.record(zod.z.string(), zod.z.string()).optional(),
198
- handlers: zod.z.array(zod.z.string()).optional(),
190
+ provider: zod.z.string().optional().describe("Primary cleanup provider to use"),
191
+ parallel: zod.z.boolean().default(false).describe("Execute cleanup operations in parallel"),
192
+ retries: zod.z.number().min(1).max(10).default(3).describe("Number of retry attempts for failed cleanup operations"),
193
+ types: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Map resource types to cleanup handler methods"),
194
+ handlers: zod.z.array(zod.z.string()).optional().describe("Explicit paths to custom cleanup handler files"),
199
195
  discover: cleanupDiscoverSchema
200
- }).passthrough();
196
+ }).passthrough().describe("Comprehensive resource cleanup configuration");
201
197
  var platformsSchema = zod.z.object({
202
198
  web: webConfigSchema.optional(),
203
199
  android: androidConfigSchema.optional(),
204
200
  ios: iosConfigSchema.optional()
205
- });
201
+ }).describe("Platform-specific configurations");
206
202
  var previewConfigSchema = zod.z.object({
207
203
  build: zod.z.object({
208
- command: zod.z.string().optional()
209
- }).optional(),
204
+ command: zod.z.string().optional().describe("Command to build the project")
205
+ }).optional().describe("Build configuration"),
210
206
  preview: zod.z.object({
211
- command: zod.z.string().optional()
212
- }).optional(),
213
- url: zod.z.string().url().optional(),
214
- timeout: zod.z.number().int().positive().optional()
215
- });
207
+ command: zod.z.string().optional().describe("Command to start the preview server after build")
208
+ }).optional().describe("Preview server configuration"),
209
+ url: zod.z.string().url().optional().describe("URL to wait for before starting tests"),
210
+ timeout: zod.z.number().int().positive().optional().describe("Timeout in milliseconds to wait for preview server")
211
+ }).describe("Configuration for the --preview flag (build and serve production build)");
216
212
  var TestConfigSchema = zod.z.object({
217
213
  defaults: defaultsSchema.optional(),
218
214
  web: webConfigSchema.optional(),
@@ -220,14 +216,14 @@ var TestConfigSchema = zod.z.object({
220
216
  ios: iosConfigSchema.optional(),
221
217
  email: emailConfigSchema.optional(),
222
218
  appwrite: appwriteConfigSchema.optional()
223
- });
219
+ }).describe("Test-specific configuration that overrides global settings");
224
220
  var TestDefinitionSchema = zod.z.object({
225
- name: nonEmptyString,
226
- platform: zod.z.enum(["web", "android", "ios"]),
227
- variables: zod.z.record(zod.z.string(), zod.z.string()).optional(),
221
+ name: nonEmptyString.describe("The name of the test"),
222
+ platform: zod.z.enum(["web", "android", "ios"]).describe("The platform to run the test on"),
223
+ variables: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Variables that can be referenced in test steps using ${VARIABLE_NAME} syntax"),
228
224
  config: TestConfigSchema.optional(),
229
- steps: zod.z.array(ActionSchema).min(1)
230
- });
225
+ steps: zod.z.array(ActionSchema).min(1).describe("The sequence of actions to execute in this test")
226
+ }).describe("Schema for IntelliTester test definition files");
231
227
  var IntellitesterConfigSchema = zod.z.object({
232
228
  defaults: defaultsSchema.optional(),
233
229
  ai: aiConfigSchema.optional(),
@@ -238,119 +234,114 @@ var IntellitesterConfigSchema = zod.z.object({
238
234
  cleanup: cleanupConfigSchema.optional(),
239
235
  webServer: webServerSchema.optional(),
240
236
  preview: previewConfigSchema.optional(),
241
- secrets: zod.z.record(zod.z.string(), zod.z.string().trim()).optional()
242
- });
237
+ secrets: zod.z.record(zod.z.string(), zod.z.string().trim()).optional().describe("Secret values that can be referenced in tests")
238
+ }).describe("Global configuration file for IntelliTester");
243
239
  var nonEmptyString2 = zod.z.string().trim().min(1, "Value cannot be empty");
244
240
  var testReferenceSchema = zod.z.object({
245
- file: nonEmptyString2,
246
- id: nonEmptyString2.optional(),
247
- // Optional ID for referencing in variables
248
- variables: zod.z.record(zod.z.string(), zod.z.string()).optional()
249
- // Override/inject variables
250
- });
241
+ file: nonEmptyString2.describe("Path to the test file relative to the workflow file"),
242
+ id: nonEmptyString2.optional().describe("Optional ID for referencing this test in variables or dependencies"),
243
+ variables: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Variables to inject or override for this specific test")
244
+ }).describe("Reference to a test file");
251
245
  var workflowWebConfigSchema = zod.z.object({
252
- baseUrl: nonEmptyString2.url().optional(),
253
- browser: zod.z.enum(["chromium", "firefox", "webkit"]).optional(),
254
- headless: zod.z.boolean().optional()
255
- });
246
+ baseUrl: nonEmptyString2.url().optional().describe("Base URL for all tests in this workflow"),
247
+ browser: zod.z.enum(["chromium", "firefox", "webkit"]).optional().describe("Browser to use for all web tests"),
248
+ headless: zod.z.boolean().optional().describe("Run browser in headless mode")
249
+ }).describe("Web platform configuration for the workflow");
256
250
  var workflowAppwriteConfigSchema = zod.z.object({
257
- endpoint: nonEmptyString2.url(),
258
- projectId: nonEmptyString2,
259
- apiKey: nonEmptyString2,
260
- cleanup: zod.z.boolean().default(true),
261
- // Backwards compatibility
262
- cleanupOnFailure: zod.z.boolean().default(true)
263
- // Backwards compatibility
264
- });
251
+ endpoint: nonEmptyString2.url().describe("Appwrite API endpoint"),
252
+ projectId: nonEmptyString2.describe("Appwrite project ID"),
253
+ apiKey: nonEmptyString2.describe("Appwrite API key"),
254
+ cleanup: zod.z.boolean().default(true).describe("Enable automatic cleanup of created resources"),
255
+ cleanupOnFailure: zod.z.boolean().default(true).describe("Clean up resources even when tests fail")
256
+ }).describe("Appwrite backend configuration for the workflow");
265
257
  var workflowCleanupDiscoverSchema = zod.z.object({
266
- enabled: zod.z.boolean().default(true),
267
- paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]),
268
- pattern: zod.z.string().default("**/*.ts")
269
- }).optional();
258
+ enabled: zod.z.boolean().default(true).describe("Enable auto-discovery of cleanup handlers"),
259
+ paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]).describe("Directories to search for cleanup handlers"),
260
+ pattern: zod.z.string().default("**/*.ts").describe("Glob pattern for handler files")
261
+ }).optional().describe("Auto-discovery configuration for cleanup handlers");
270
262
  var workflowCleanupConfigSchema = zod.z.object({
271
- provider: zod.z.string().optional(),
272
- parallel: zod.z.boolean().default(false),
273
- retries: zod.z.number().min(1).max(10).default(3),
274
- types: zod.z.record(zod.z.string(), zod.z.string()).optional(),
275
- handlers: zod.z.array(zod.z.string()).optional(),
263
+ provider: zod.z.string().optional().describe("Cleanup provider to use"),
264
+ parallel: zod.z.boolean().default(false).describe("Run cleanup tasks in parallel"),
265
+ retries: zod.z.number().min(1).max(10).default(3).describe("Number of retry attempts for failed cleanup operations"),
266
+ types: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Map resource types to cleanup handler methods"),
267
+ handlers: zod.z.array(zod.z.string()).optional().describe("Explicit paths to custom cleanup handler files"),
276
268
  discover: workflowCleanupDiscoverSchema
277
- }).passthrough();
269
+ }).passthrough().describe("Resource cleanup configuration");
278
270
  var workflowWebServerSchema = zod.z.object({
279
- command: nonEmptyString2.optional(),
280
- auto: zod.z.boolean().optional(),
281
- url: nonEmptyString2.url(),
282
- reuseExistingServer: zod.z.boolean().default(true),
283
- timeout: zod.z.number().int().positive().default(3e4)
284
- });
271
+ command: nonEmptyString2.optional().describe("Command to start the web server"),
272
+ auto: zod.z.boolean().optional().describe("Auto-detect server start command from package.json"),
273
+ url: nonEmptyString2.url().describe("URL to wait for before starting tests"),
274
+ reuseExistingServer: zod.z.boolean().default(true).describe("Use existing server if already running at the URL"),
275
+ timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start")
276
+ }).describe("Configuration for starting a web server before tests");
285
277
  var workflowConfigSchema = zod.z.object({
286
278
  web: workflowWebConfigSchema.optional(),
287
279
  appwrite: workflowAppwriteConfigSchema.optional(),
288
280
  cleanup: workflowCleanupConfigSchema.optional(),
289
281
  webServer: workflowWebServerSchema.optional()
290
- });
282
+ }).describe("Workflow-level configuration that applies to all tests");
291
283
  var WorkflowDefinitionSchema = zod.z.object({
292
- name: nonEmptyString2,
293
- platform: zod.z.enum(["web", "android", "ios"]).default("web"),
284
+ name: nonEmptyString2.describe("The name of the workflow"),
285
+ platform: zod.z.enum(["web", "android", "ios"]).default("web").describe("The platform to run the workflow on"),
294
286
  config: workflowConfigSchema.optional(),
295
- continueOnFailure: zod.z.boolean().default(false),
296
- tests: zod.z.array(testReferenceSchema).min(1, "Workflow must contain at least one test")
297
- });
287
+ continueOnFailure: zod.z.boolean().default(false).describe("Continue running subsequent tests even if a test fails"),
288
+ tests: zod.z.array(testReferenceSchema).min(1, "Workflow must contain at least one test").describe("List of test files to execute in this workflow")
289
+ }).describe("Schema for IntelliTester workflow files that orchestrate multiple tests");
298
290
  var nonEmptyString3 = zod.z.string().trim().min(1, "Value cannot be empty");
299
291
  var workflowReferenceSchema = zod.z.object({
300
- file: nonEmptyString3,
301
- id: nonEmptyString3.optional(),
302
- depends_on: zod.z.array(nonEmptyString3).optional(),
303
- on_failure: zod.z.enum(["skip", "fail", "ignore"]).optional(),
304
- variables: zod.z.record(zod.z.string(), zod.z.string()).optional()
305
- });
292
+ file: nonEmptyString3.describe("Path to the workflow file"),
293
+ id: nonEmptyString3.optional().describe("Optional ID for referencing this workflow in dependencies"),
294
+ depends_on: zod.z.array(nonEmptyString3).optional().describe("IDs of workflows that must complete before this one"),
295
+ on_failure: zod.z.enum(["skip", "fail", "ignore"]).optional().describe("How to handle failure of this workflow"),
296
+ variables: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Variables to inject or override for this workflow")
297
+ }).describe("Reference to a workflow file");
306
298
  var pipelineWebConfigSchema = zod.z.object({
307
- baseUrl: nonEmptyString3.url().optional(),
308
- browser: zod.z.enum(["chromium", "firefox", "webkit"]).optional(),
309
- headless: zod.z.boolean().optional()
310
- });
299
+ baseUrl: nonEmptyString3.url().optional().describe("Base URL for all workflows in this pipeline"),
300
+ browser: zod.z.enum(["chromium", "firefox", "webkit"]).optional().describe("Browser to use for all web tests"),
301
+ headless: zod.z.boolean().optional().describe("Run browser in headless mode")
302
+ }).describe("Web platform configuration for the pipeline");
311
303
  var pipelineAppwriteConfigSchema = zod.z.object({
312
- endpoint: nonEmptyString3.url(),
313
- projectId: nonEmptyString3,
314
- apiKey: nonEmptyString3,
315
- cleanup: zod.z.boolean().default(true),
316
- cleanupOnFailure: zod.z.boolean().default(true)
317
- });
304
+ endpoint: nonEmptyString3.url().describe("Appwrite API endpoint"),
305
+ projectId: nonEmptyString3.describe("Appwrite project ID"),
306
+ apiKey: nonEmptyString3.describe("Appwrite API key"),
307
+ cleanup: zod.z.boolean().default(true).describe("Enable automatic cleanup of created resources"),
308
+ cleanupOnFailure: zod.z.boolean().default(true).describe("Clean up resources even when workflows fail")
309
+ }).describe("Appwrite backend configuration for the pipeline");
318
310
  var pipelineCleanupDiscoverSchema = zod.z.object({
319
- enabled: zod.z.boolean().default(true),
320
- paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]),
321
- pattern: zod.z.string().default("**/*.ts")
322
- }).optional();
311
+ enabled: zod.z.boolean().default(true).describe("Enable auto-discovery of cleanup handlers"),
312
+ paths: zod.z.array(zod.z.string()).default(["./tests/cleanup"]).describe("Directories to search for cleanup handlers"),
313
+ pattern: zod.z.string().default("**/*.ts").describe("Glob pattern for handler files")
314
+ }).optional().describe("Auto-discovery configuration for cleanup handlers");
323
315
  var pipelineCleanupConfigSchema = zod.z.object({
324
- provider: zod.z.string().optional(),
325
- parallel: zod.z.boolean().default(false),
326
- retries: zod.z.number().min(1).max(10).default(3),
327
- types: zod.z.record(zod.z.string(), zod.z.string()).optional(),
328
- handlers: zod.z.array(zod.z.string()).optional(),
316
+ provider: zod.z.string().optional().describe("Cleanup provider to use"),
317
+ parallel: zod.z.boolean().default(false).describe("Run cleanup tasks in parallel"),
318
+ retries: zod.z.number().min(1).max(10).default(3).describe("Number of retry attempts for failed cleanup operations"),
319
+ types: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Map resource types to cleanup handler methods"),
320
+ handlers: zod.z.array(zod.z.string()).optional().describe("Explicit paths to custom cleanup handler files"),
329
321
  discover: pipelineCleanupDiscoverSchema,
330
- on_failure: zod.z.boolean().default(true)
331
- // Run cleanup even if pipeline fails
332
- }).passthrough();
322
+ on_failure: zod.z.boolean().default(true).describe("Run cleanup even if pipeline fails")
323
+ }).passthrough().describe("Resource cleanup configuration");
333
324
  var pipelineWebServerSchema = zod.z.object({
334
- command: nonEmptyString3.optional(),
335
- auto: zod.z.boolean().optional(),
336
- url: nonEmptyString3.url(),
337
- reuseExistingServer: zod.z.boolean().default(true),
338
- timeout: zod.z.number().int().positive().default(3e4)
339
- });
325
+ command: nonEmptyString3.optional().describe("Command to start the web server"),
326
+ auto: zod.z.boolean().optional().describe("Auto-detect server start command from package.json"),
327
+ url: nonEmptyString3.url().describe("URL to wait for before starting workflows"),
328
+ reuseExistingServer: zod.z.boolean().default(true).describe("Use existing server if already running at the URL"),
329
+ timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start")
330
+ }).describe("Configuration for starting a web server before workflows");
340
331
  var pipelineConfigSchema = zod.z.object({
341
332
  web: pipelineWebConfigSchema.optional(),
342
333
  appwrite: pipelineAppwriteConfigSchema.optional(),
343
334
  cleanup: pipelineCleanupConfigSchema.optional(),
344
335
  webServer: pipelineWebServerSchema.optional()
345
- });
336
+ }).describe("Pipeline-level configuration that applies to all workflows");
346
337
  var PipelineDefinitionSchema = zod.z.object({
347
- name: nonEmptyString3,
348
- platform: zod.z.enum(["web", "android", "ios"]).default("web"),
338
+ name: nonEmptyString3.describe("The name of the pipeline"),
339
+ platform: zod.z.enum(["web", "android", "ios"]).default("web").describe("The platform to run the pipeline on"),
349
340
  config: pipelineConfigSchema.optional(),
350
- on_failure: zod.z.enum(["skip", "fail", "ignore"]).default("skip"),
351
- cleanup_on_failure: zod.z.boolean().default(true),
352
- workflows: zod.z.array(workflowReferenceSchema).min(1, "Pipeline must contain at least one workflow")
353
- });
341
+ on_failure: zod.z.enum(["skip", "fail", "ignore"]).default("skip").describe("Default failure handling for workflows"),
342
+ cleanup_on_failure: zod.z.boolean().default(true).describe("Run cleanup even when pipeline fails"),
343
+ workflows: zod.z.array(workflowReferenceSchema).min(1, "Pipeline must contain at least one workflow").describe("List of workflow files to execute in this pipeline")
344
+ }).describe("Schema for IntelliTester pipeline files that orchestrate multiple workflows");
354
345
 
355
346
  // src/core/loader.ts
356
347
  var formatIssues = (issues) => issues.map((issue) => {
@@ -2578,5 +2569,5 @@ exports.runWorkflowWithContext = runWorkflowWithContext;
2578
2569
  exports.setupAppwriteTracking = setupAppwriteTracking;
2579
2570
  exports.startTrackingServer = startTrackingServer;
2580
2571
  exports.startWebServer = startWebServer;
2581
- //# sourceMappingURL=chunk-ZWHIDROO.cjs.map
2582
- //# sourceMappingURL=chunk-ZWHIDROO.cjs.map
2572
+ //# sourceMappingURL=chunk-H34IO3AV.cjs.map
2573
+ //# sourceMappingURL=chunk-H34IO3AV.cjs.map