intellitester 0.1.12 → 0.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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var chunkXWGUA67E_cjs = require('../chunk-XWGUA67E.cjs');
4
+ var chunkEPW5ZHXG_cjs = require('../chunk-EPW5ZHXG.cjs');
5
5
  var chunkARJYJVRM_cjs = require('../chunk-ARJYJVRM.cjs');
6
6
  require('../chunk-QMYM2TCH.cjs');
7
7
  require('../chunk-PAKODOH4.cjs');
@@ -158,7 +158,7 @@ ${"=".repeat(60)}`);
158
158
  }
159
159
  let trackingServer = null;
160
160
  try {
161
- trackingServer = await chunkXWGUA67E_cjs.startTrackingServer({ port: 0 });
161
+ trackingServer = await chunkEPW5ZHXG_cjs.startTrackingServer({ port: 0 });
162
162
  console.log(`Tracking server started on port ${trackingServer.port}`);
163
163
  } catch (error) {
164
164
  console.warn("Failed to start tracking server:", error);
@@ -170,7 +170,7 @@ ${"=".repeat(60)}`);
170
170
  let serverProcess = null;
171
171
  if (pipeline.config?.webServer) {
172
172
  try {
173
- serverProcess = await chunkXWGUA67E_cjs.startWebServer({
173
+ serverProcess = await chunkEPW5ZHXG_cjs.startWebServer({
174
174
  ...pipeline.config.webServer,
175
175
  cwd: pipelineDir
176
176
  });
@@ -182,7 +182,7 @@ ${"=".repeat(60)}`);
182
182
  }
183
183
  const signalCleanup = async () => {
184
184
  console.log("\n\nInterrupted - cleaning up...");
185
- chunkXWGUA67E_cjs.killServer(serverProcess);
185
+ chunkEPW5ZHXG_cjs.killServer(serverProcess);
186
186
  if (trackingServer) await trackingServer.stop();
187
187
  process.exit(1);
188
188
  };
@@ -198,7 +198,7 @@ ${"=".repeat(60)}`);
198
198
  variables: /* @__PURE__ */ new Map(),
199
199
  lastEmail: null,
200
200
  emailClient: null,
201
- appwriteContext: chunkXWGUA67E_cjs.createTestContext(),
201
+ appwriteContext: chunkEPW5ZHXG_cjs.createTestContext(),
202
202
  appwriteConfig: pipeline.config?.appwrite ? {
203
203
  endpoint: pipeline.config.appwrite.endpoint,
204
204
  projectId: pipeline.config.appwrite.projectId,
@@ -206,7 +206,7 @@ ${"=".repeat(60)}`);
206
206
  } : void 0
207
207
  };
208
208
  if (pipeline.config?.appwrite) {
209
- chunkXWGUA67E_cjs.setupAppwriteTracking(page, executionContext);
209
+ chunkEPW5ZHXG_cjs.setupAppwriteTracking(page, executionContext);
210
210
  }
211
211
  const completedIds = /* @__PURE__ */ new Set();
212
212
  const failedIds = /* @__PURE__ */ new Set();
@@ -273,7 +273,7 @@ ${"=".repeat(40)}`);
273
273
  console.log(`File: ${workflowRef.file}`);
274
274
  console.log(`${"=".repeat(40)}`);
275
275
  try {
276
- const workflowDefinition = await chunkXWGUA67E_cjs.loadWorkflowDefinition(workflowFilePath);
276
+ const workflowDefinition = await chunkEPW5ZHXG_cjs.loadWorkflowDefinition(workflowFilePath);
277
277
  if (workflowRef.variables) {
278
278
  for (const [key, value] of Object.entries(workflowRef.variables)) {
279
279
  const interpolated = value.replace(/\{\{(\w+)\}\}/g, (match, varName) => {
@@ -294,7 +294,7 @@ ${"=".repeat(40)}`);
294
294
  sessionId,
295
295
  testStartTime
296
296
  };
297
- const result = await chunkXWGUA67E_cjs.runWorkflowWithContext(
297
+ const result = await chunkEPW5ZHXG_cjs.runWorkflowWithContext(
298
298
  workflowDefinition,
299
299
  workflowFilePath,
300
300
  workflowOptions
@@ -431,7 +431,7 @@ ${"=".repeat(60)}`);
431
431
  process.off("SIGTERM", signalCleanup);
432
432
  await browserContext.close();
433
433
  await browser.close();
434
- chunkXWGUA67E_cjs.killServer(serverProcess);
434
+ chunkEPW5ZHXG_cjs.killServer(serverProcess);
435
435
  if (trackingServer) {
436
436
  await trackingServer.stop();
437
437
  }
@@ -1096,7 +1096,7 @@ function cleanYamlResponse(response) {
1096
1096
  return cleaned;
1097
1097
  }
1098
1098
  async function generateTest(naturalLanguage, options) {
1099
- const provider = chunkXWGUA67E_cjs.createAIProvider(options.aiConfig);
1099
+ const provider = chunkEPW5ZHXG_cjs.createAIProvider(options.aiConfig);
1100
1100
  let systemPrompt = SYSTEM_PROMPT;
1101
1101
  if (options.source !== null) {
1102
1102
  const sourceConfig = options.source ?? {};
@@ -1128,7 +1128,7 @@ Please fix the issue and generate valid YAML.`;
1128
1128
  const yaml$1 = cleanYamlResponse(response);
1129
1129
  lastYaml = yaml$1;
1130
1130
  const parsed = yaml.parse(yaml$1);
1131
- const validated = chunkXWGUA67E_cjs.TestDefinitionSchema.parse(parsed);
1131
+ const validated = chunkEPW5ZHXG_cjs.TestDefinitionSchema.parse(parsed);
1132
1132
  return {
1133
1133
  success: true,
1134
1134
  test: validated,
@@ -1469,7 +1469,7 @@ var validateCommand = async (target) => {
1469
1469
  throw new Error(`No YAML files found at ${absoluteTarget}`);
1470
1470
  }
1471
1471
  for (const file of files) {
1472
- await chunkXWGUA67E_cjs.loadTestDefinition(file);
1472
+ await chunkEPW5ZHXG_cjs.loadTestDefinition(file);
1473
1473
  console.log(`\u2713 ${path4__namespace.default.relative(process2__default.default.cwd(), file)} valid`);
1474
1474
  }
1475
1475
  };
@@ -1486,8 +1486,8 @@ var runTestCommand = async (target, options) => {
1486
1486
  const configContent = await fs3__default.default.readFile(CONFIG_FILENAME, "utf8");
1487
1487
  parsedConfig = parse2(configContent);
1488
1488
  }
1489
- const configMissing = parsedConfig ? chunkXWGUA67E_cjs.collectMissingEnvVars(parsedConfig) : [];
1490
- const testMissing = chunkXWGUA67E_cjs.collectMissingEnvVars(parsedTest);
1489
+ const configMissing = parsedConfig ? chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedConfig) : [];
1490
+ const testMissing = chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedTest);
1491
1491
  const allMissing = [.../* @__PURE__ */ new Set([...configMissing, ...testMissing])];
1492
1492
  if (allMissing.length > 0) {
1493
1493
  const projectRoot = await findProjectRoot(absoluteTarget);
@@ -1496,8 +1496,8 @@ var runTestCommand = async (target, options) => {
1496
1496
  process2__default.default.exit(1);
1497
1497
  }
1498
1498
  }
1499
- const test = await chunkXWGUA67E_cjs.loadTestDefinition(absoluteTarget);
1500
- const config = hasConfigFile ? await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1499
+ const test = await chunkEPW5ZHXG_cjs.loadTestDefinition(absoluteTarget);
1500
+ const config = hasConfigFile ? await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1501
1501
  const baseUrl = resolveBaseUrl(test, config?.platforms?.web?.baseUrl);
1502
1502
  const headed = options.headed ?? false;
1503
1503
  const browser = options.browser ?? "chromium";
@@ -1511,7 +1511,7 @@ var runTestCommand = async (target, options) => {
1511
1511
  console.log(
1512
1512
  `Running ${path4__namespace.default.basename(absoluteTarget)} on web (${browser}${modeFlags.length > 0 ? ", " + modeFlags.join(", ") : ""})`
1513
1513
  );
1514
- const result = await chunkXWGUA67E_cjs.runWebTest(test, {
1514
+ const result = await chunkEPW5ZHXG_cjs.runWebTest(test, {
1515
1515
  baseUrl,
1516
1516
  headed,
1517
1517
  browser,
@@ -1543,7 +1543,7 @@ var generateCommand = async (prompt, options) => {
1543
1543
  const { parse: parse2 } = await import('yaml');
1544
1544
  const configContent = await fs3__default.default.readFile(CONFIG_FILENAME, "utf8");
1545
1545
  const parsedConfig = parse2(configContent);
1546
- const configMissing = chunkXWGUA67E_cjs.collectMissingEnvVars(parsedConfig);
1546
+ const configMissing = chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedConfig);
1547
1547
  if (configMissing.length > 0) {
1548
1548
  const projectRoot = await findProjectRoot(CONFIG_FILENAME);
1549
1549
  const canContinue = await validateEnvVars(configMissing, projectRoot || process2__default.default.cwd());
@@ -1551,7 +1551,7 @@ var generateCommand = async (prompt, options) => {
1551
1551
  process2__default.default.exit(1);
1552
1552
  }
1553
1553
  }
1554
- const config = await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME);
1554
+ const config = await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME);
1555
1555
  if (!config.ai) {
1556
1556
  throw new Error('AI configuration missing in intellitester.config.yaml. Add "ai:" section with provider, model, and apiKey.');
1557
1557
  }
@@ -1596,8 +1596,8 @@ var runWorkflowCommand = async (file, options) => {
1596
1596
  const configContent = await fs3__default.default.readFile(CONFIG_FILENAME, "utf8");
1597
1597
  parsedConfig = parse2(configContent);
1598
1598
  }
1599
- const configMissing = parsedConfig ? chunkXWGUA67E_cjs.collectMissingEnvVars(parsedConfig) : [];
1600
- const workflowMissing = chunkXWGUA67E_cjs.collectMissingEnvVars(parsedWorkflow);
1599
+ const configMissing = parsedConfig ? chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedConfig) : [];
1600
+ const workflowMissing = chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedWorkflow);
1601
1601
  const allMissing = [.../* @__PURE__ */ new Set([...configMissing, ...workflowMissing])];
1602
1602
  if (allMissing.length > 0) {
1603
1603
  const projectRoot = await findProjectRoot(workflowPath);
@@ -1606,9 +1606,9 @@ var runWorkflowCommand = async (file, options) => {
1606
1606
  process2__default.default.exit(1);
1607
1607
  }
1608
1608
  }
1609
- const workflow = await chunkXWGUA67E_cjs.loadWorkflowDefinition(workflowPath);
1610
- const config = hasConfigFile ? await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1611
- const result = await chunkXWGUA67E_cjs.runWorkflow(workflow, workflowPath, {
1609
+ const workflow = await chunkEPW5ZHXG_cjs.loadWorkflowDefinition(workflowPath);
1610
+ const config = hasConfigFile ? await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1611
+ const result = await chunkEPW5ZHXG_cjs.runWorkflow(workflow, workflowPath, {
1612
1612
  headed: options.visible,
1613
1613
  browser: options.browser,
1614
1614
  interactive: options.interactive,
@@ -1653,8 +1653,8 @@ var runPipelineCommand = async (file, options) => {
1653
1653
  const configContent = await fs3__default.default.readFile(CONFIG_FILENAME, "utf8");
1654
1654
  parsedConfig = parse2(configContent);
1655
1655
  }
1656
- const configMissing = parsedConfig ? chunkXWGUA67E_cjs.collectMissingEnvVars(parsedConfig) : [];
1657
- const pipelineMissing = chunkXWGUA67E_cjs.collectMissingEnvVars(parsedPipeline);
1656
+ const configMissing = parsedConfig ? chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedConfig) : [];
1657
+ const pipelineMissing = chunkEPW5ZHXG_cjs.collectMissingEnvVars(parsedPipeline);
1658
1658
  const allMissing = [.../* @__PURE__ */ new Set([...configMissing, ...pipelineMissing])];
1659
1659
  if (allMissing.length > 0) {
1660
1660
  const projectRoot = await findProjectRoot(pipelinePath);
@@ -1663,8 +1663,8 @@ var runPipelineCommand = async (file, options) => {
1663
1663
  process2__default.default.exit(1);
1664
1664
  }
1665
1665
  }
1666
- const pipeline = await chunkXWGUA67E_cjs.loadPipelineDefinition(pipelinePath);
1667
- hasConfigFile ? await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1666
+ const pipeline = await chunkEPW5ZHXG_cjs.loadPipelineDefinition(pipelinePath);
1667
+ hasConfigFile ? await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1668
1668
  const result = await runPipeline(pipeline, pipelinePath, {
1669
1669
  headed: options.visible,
1670
1670
  browser: options.browser,
@@ -1719,7 +1719,7 @@ var main = async () => {
1719
1719
  const browser = resolveBrowserName(options.browser || "chrome");
1720
1720
  if (options.preview) {
1721
1721
  const hasConfigFile = await fileExists(CONFIG_FILENAME);
1722
- const config = hasConfigFile ? await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1722
+ const config = hasConfigFile ? await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME) : void 0;
1723
1723
  const { cleanup } = await buildAndPreview(config, process2__default.default.cwd());
1724
1724
  previewCleanup = cleanup;
1725
1725
  }
@@ -1780,11 +1780,11 @@ var main = async () => {
1780
1780
  }
1781
1781
  return;
1782
1782
  }
1783
- if (chunkXWGUA67E_cjs.isPipelineFile(file)) {
1783
+ if (chunkEPW5ZHXG_cjs.isPipelineFile(file)) {
1784
1784
  await runPipelineCommand(file, runOpts);
1785
1785
  return;
1786
1786
  }
1787
- if (chunkXWGUA67E_cjs.isWorkflowFile(file)) {
1787
+ if (chunkEPW5ZHXG_cjs.isWorkflowFile(file)) {
1788
1788
  await runWorkflowCommand(file, runOpts);
1789
1789
  return;
1790
1790
  }
@@ -1861,7 +1861,7 @@ Found ${failedCleanups.length} failed cleanup(s):
1861
1861
  if (!hasConfigFile) {
1862
1862
  throw new Error(`No ${CONFIG_FILENAME} found. Cannot retry cleanup without provider configuration.`);
1863
1863
  }
1864
- const config = await chunkXWGUA67E_cjs.loadIntellitesterConfig(CONFIG_FILENAME);
1864
+ const config = await chunkEPW5ZHXG_cjs.loadIntellitesterConfig(CONFIG_FILENAME);
1865
1865
  const failedCleanups = await chunkARJYJVRM_cjs.loadFailedCleanups(process2__default.default.cwd());
1866
1866
  if (failedCleanups.length === 0) {
1867
1867
  console.log("No failed cleanups to retry.");
package/dist/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { loadIntellitesterConfig, isPipelineFile, isWorkflowFile, loadTestDefinition, collectMissingEnvVars, loadPipelineDefinition, loadWorkflowDefinition, runWorkflow, runWebTest, startTrackingServer, startWebServer, createTestContext, setupAppwriteTracking, runWorkflowWithContext, killServer, createAIProvider, TestDefinitionSchema } from '../chunk-5LFSLMQ7.js';
2
+ import { loadIntellitesterConfig, isPipelineFile, isWorkflowFile, loadTestDefinition, collectMissingEnvVars, loadPipelineDefinition, loadWorkflowDefinition, runWorkflow, runWebTest, startTrackingServer, startWebServer, createTestContext, setupAppwriteTracking, runWorkflowWithContext, killServer, createAIProvider, TestDefinitionSchema } from '../chunk-2BKGKVFM.js';
3
3
  import { loadFailedCleanups, loadCleanupHandlers, executeCleanup, removeFailedCleanup } from '../chunk-ECBA4GJ3.js';
4
4
  import '../chunk-DE5UFTTG.js';
5
5
  import '../chunk-6PYKWWH5.js';
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkXWGUA67E_cjs = require('./chunk-XWGUA67E.cjs');
3
+ var chunkEPW5ZHXG_cjs = require('./chunk-EPW5ZHXG.cjs');
4
4
  require('./chunk-ARJYJVRM.cjs');
5
5
  require('./chunk-QMYM2TCH.cjs');
6
6
  require('./chunk-PAKODOH4.cjs');
@@ -12,99 +12,103 @@ require('./chunk-35WJGNDA.cjs');
12
12
 
13
13
  Object.defineProperty(exports, "ActionSchema", {
14
14
  enumerable: true,
15
- get: function () { return chunkXWGUA67E_cjs.ActionSchema; }
15
+ get: function () { return chunkEPW5ZHXG_cjs.ActionSchema; }
16
16
  });
17
17
  Object.defineProperty(exports, "IntellitesterConfigSchema", {
18
18
  enumerable: true,
19
- get: function () { return chunkXWGUA67E_cjs.IntellitesterConfigSchema; }
19
+ get: function () { return chunkEPW5ZHXG_cjs.IntellitesterConfigSchema; }
20
20
  });
21
21
  Object.defineProperty(exports, "LocatorSchema", {
22
22
  enumerable: true,
23
- get: function () { return chunkXWGUA67E_cjs.LocatorSchema; }
23
+ get: function () { return chunkEPW5ZHXG_cjs.LocatorSchema; }
24
24
  });
25
25
  Object.defineProperty(exports, "TestConfigSchema", {
26
26
  enumerable: true,
27
- get: function () { return chunkXWGUA67E_cjs.TestConfigSchema; }
27
+ get: function () { return chunkEPW5ZHXG_cjs.TestConfigSchema; }
28
28
  });
29
29
  Object.defineProperty(exports, "TestDefinitionSchema", {
30
30
  enumerable: true,
31
- get: function () { return chunkXWGUA67E_cjs.TestDefinitionSchema; }
31
+ get: function () { return chunkEPW5ZHXG_cjs.TestDefinitionSchema; }
32
32
  });
33
33
  Object.defineProperty(exports, "cleanupConfigSchema", {
34
34
  enumerable: true,
35
- get: function () { return chunkXWGUA67E_cjs.cleanupConfigSchema; }
35
+ get: function () { return chunkEPW5ZHXG_cjs.cleanupConfigSchema; }
36
36
  });
37
37
  Object.defineProperty(exports, "cleanupDiscoverSchema", {
38
38
  enumerable: true,
39
- get: function () { return chunkXWGUA67E_cjs.cleanupDiscoverSchema; }
39
+ get: function () { return chunkEPW5ZHXG_cjs.cleanupDiscoverSchema; }
40
40
  });
41
41
  Object.defineProperty(exports, "collectMissingEnvVars", {
42
42
  enumerable: true,
43
- get: function () { return chunkXWGUA67E_cjs.collectMissingEnvVars; }
43
+ get: function () { return chunkEPW5ZHXG_cjs.collectMissingEnvVars; }
44
44
  });
45
45
  Object.defineProperty(exports, "isPipelineFile", {
46
46
  enumerable: true,
47
- get: function () { return chunkXWGUA67E_cjs.isPipelineFile; }
47
+ get: function () { return chunkEPW5ZHXG_cjs.isPipelineFile; }
48
48
  });
49
49
  Object.defineProperty(exports, "isWorkflowFile", {
50
50
  enumerable: true,
51
- get: function () { return chunkXWGUA67E_cjs.isWorkflowFile; }
51
+ get: function () { return chunkEPW5ZHXG_cjs.isWorkflowFile; }
52
52
  });
53
53
  Object.defineProperty(exports, "killServer", {
54
54
  enumerable: true,
55
- get: function () { return chunkXWGUA67E_cjs.killServer; }
55
+ get: function () { return chunkEPW5ZHXG_cjs.killServer; }
56
56
  });
57
57
  Object.defineProperty(exports, "loadIntellitesterConfig", {
58
58
  enumerable: true,
59
- get: function () { return chunkXWGUA67E_cjs.loadIntellitesterConfig; }
59
+ get: function () { return chunkEPW5ZHXG_cjs.loadIntellitesterConfig; }
60
60
  });
61
61
  Object.defineProperty(exports, "loadPipelineDefinition", {
62
62
  enumerable: true,
63
- get: function () { return chunkXWGUA67E_cjs.loadPipelineDefinition; }
63
+ get: function () { return chunkEPW5ZHXG_cjs.loadPipelineDefinition; }
64
64
  });
65
65
  Object.defineProperty(exports, "loadTestDefinition", {
66
66
  enumerable: true,
67
- get: function () { return chunkXWGUA67E_cjs.loadTestDefinition; }
67
+ get: function () { return chunkEPW5ZHXG_cjs.loadTestDefinition; }
68
68
  });
69
69
  Object.defineProperty(exports, "loadWorkflowDefinition", {
70
70
  enumerable: true,
71
- get: function () { return chunkXWGUA67E_cjs.loadWorkflowDefinition; }
71
+ get: function () { return chunkEPW5ZHXG_cjs.loadWorkflowDefinition; }
72
72
  });
73
73
  Object.defineProperty(exports, "parseIntellitesterConfig", {
74
74
  enumerable: true,
75
- get: function () { return chunkXWGUA67E_cjs.parseIntellitesterConfig; }
75
+ get: function () { return chunkEPW5ZHXG_cjs.parseIntellitesterConfig; }
76
76
  });
77
77
  Object.defineProperty(exports, "parsePipelineDefinition", {
78
78
  enumerable: true,
79
- get: function () { return chunkXWGUA67E_cjs.parsePipelineDefinition; }
79
+ get: function () { return chunkEPW5ZHXG_cjs.parsePipelineDefinition; }
80
80
  });
81
81
  Object.defineProperty(exports, "parseTestDefinition", {
82
82
  enumerable: true,
83
- get: function () { return chunkXWGUA67E_cjs.parseTestDefinition; }
83
+ get: function () { return chunkEPW5ZHXG_cjs.parseTestDefinition; }
84
84
  });
85
85
  Object.defineProperty(exports, "parseWorkflowDefinition", {
86
86
  enumerable: true,
87
- get: function () { return chunkXWGUA67E_cjs.parseWorkflowDefinition; }
87
+ get: function () { return chunkEPW5ZHXG_cjs.parseWorkflowDefinition; }
88
+ });
89
+ Object.defineProperty(exports, "previewConfigSchema", {
90
+ enumerable: true,
91
+ get: function () { return chunkEPW5ZHXG_cjs.previewConfigSchema; }
88
92
  });
89
93
  Object.defineProperty(exports, "runWebTest", {
90
94
  enumerable: true,
91
- get: function () { return chunkXWGUA67E_cjs.runWebTest; }
95
+ get: function () { return chunkEPW5ZHXG_cjs.runWebTest; }
92
96
  });
93
97
  Object.defineProperty(exports, "runWorkflow", {
94
98
  enumerable: true,
95
- get: function () { return chunkXWGUA67E_cjs.runWorkflow; }
99
+ get: function () { return chunkEPW5ZHXG_cjs.runWorkflow; }
96
100
  });
97
101
  Object.defineProperty(exports, "runWorkflowWithContext", {
98
102
  enumerable: true,
99
- get: function () { return chunkXWGUA67E_cjs.runWorkflowWithContext; }
103
+ get: function () { return chunkEPW5ZHXG_cjs.runWorkflowWithContext; }
100
104
  });
101
105
  Object.defineProperty(exports, "setupAppwriteTracking", {
102
106
  enumerable: true,
103
- get: function () { return chunkXWGUA67E_cjs.setupAppwriteTracking; }
107
+ get: function () { return chunkEPW5ZHXG_cjs.setupAppwriteTracking; }
104
108
  });
105
109
  Object.defineProperty(exports, "startWebServer", {
106
110
  enumerable: true,
107
- get: function () { return chunkXWGUA67E_cjs.startWebServer; }
111
+ get: function () { return chunkEPW5ZHXG_cjs.startWebServer; }
108
112
  });
109
113
  //# sourceMappingURL=index.cjs.map
110
114
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -130,6 +130,16 @@ declare const cleanupConfigSchema: z.ZodObject<{
130
130
  }, z.core.$strip>>;
131
131
  }, z.core.$loose>;
132
132
  type CleanupConfig = z.infer<typeof cleanupConfigSchema>;
133
+ declare const previewConfigSchema: z.ZodObject<{
134
+ build: z.ZodOptional<z.ZodObject<{
135
+ command: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strip>>;
137
+ preview: z.ZodOptional<z.ZodObject<{
138
+ command: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>>;
140
+ url: z.ZodOptional<z.ZodString>;
141
+ timeout: z.ZodOptional<z.ZodNumber>;
142
+ }, z.core.$strip>;
133
143
  declare const TestConfigSchema: z.ZodObject<{
134
144
  defaults: z.ZodOptional<z.ZodObject<{
135
145
  timeout: z.ZodOptional<z.ZodNumber>;
@@ -389,6 +399,16 @@ declare const IntellitesterConfigSchema: z.ZodObject<{
389
399
  timeout: z.ZodDefault<z.ZodNumber>;
390
400
  cwd: z.ZodOptional<z.ZodString>;
391
401
  }, z.core.$strip>>;
402
+ preview: z.ZodOptional<z.ZodObject<{
403
+ build: z.ZodOptional<z.ZodObject<{
404
+ command: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>;
406
+ preview: z.ZodOptional<z.ZodObject<{
407
+ command: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>>;
409
+ url: z.ZodOptional<z.ZodString>;
410
+ timeout: z.ZodOptional<z.ZodNumber>;
411
+ }, z.core.$strip>>;
392
412
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
393
413
  }, z.core.$strip>;
394
414
 
@@ -803,6 +823,7 @@ type TestConfig = z.infer<typeof TestConfigSchema>;
803
823
  type TestDefinition = z.infer<typeof TestDefinitionSchema>;
804
824
  type IntellitesterConfig = z.infer<typeof IntellitesterConfigSchema>;
805
825
  type WebServer = NonNullable<IntellitesterConfig['webServer']>;
826
+ type PreviewConfig = NonNullable<IntellitesterConfig['preview']>;
806
827
  type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
807
828
 
808
829
  interface PipelineWorkflowResult {
@@ -849,4 +870,4 @@ declare const loadPipelineDefinition: (filePath: string) => Promise<PipelineDefi
849
870
  */
850
871
  declare const collectMissingEnvVars: (obj: unknown) => string[];
851
872
 
852
- export { type Action, ActionSchema, type BrowserName, type CleanupConfig, type ExecutionContext, type IntellitesterConfig, IntellitesterConfigSchema, type Locator, LocatorSchema, type PipelineAppwriteConfig, type PipelineCleanupConfig, type PipelineConfig, type PipelineDefinition, type PipelineResult, type PipelineWebConfig, type PipelineWebServerConfig, type PipelineWorkflowResult, type StepResult, type TestConfig, TestConfigSchema, type TestDefinition, TestDefinitionSchema, type WebRunOptions, type WebRunResult, type WebServer, type WebServerConfig, type WorkflowDefinition, type WorkflowOptions, type WorkflowReference, type WorkflowResult, type WorkflowTestResult, type WorkflowWithContextOptions, type WorkflowWithContextResult, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer };
873
+ export { type Action, ActionSchema, type BrowserName, type CleanupConfig, type ExecutionContext, type IntellitesterConfig, IntellitesterConfigSchema, type Locator, LocatorSchema, type PipelineAppwriteConfig, type PipelineCleanupConfig, type PipelineConfig, type PipelineDefinition, type PipelineResult, type PipelineWebConfig, type PipelineWebServerConfig, type PipelineWorkflowResult, type PreviewConfig, type StepResult, type TestConfig, TestConfigSchema, type TestDefinition, TestDefinitionSchema, type WebRunOptions, type WebRunResult, type WebServer, type WebServerConfig, type WorkflowDefinition, type WorkflowOptions, type WorkflowReference, type WorkflowResult, type WorkflowTestResult, type WorkflowWithContextOptions, type WorkflowWithContextResult, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, previewConfigSchema, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer };
package/dist/index.d.ts CHANGED
@@ -130,6 +130,16 @@ declare const cleanupConfigSchema: z.ZodObject<{
130
130
  }, z.core.$strip>>;
131
131
  }, z.core.$loose>;
132
132
  type CleanupConfig = z.infer<typeof cleanupConfigSchema>;
133
+ declare const previewConfigSchema: z.ZodObject<{
134
+ build: z.ZodOptional<z.ZodObject<{
135
+ command: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strip>>;
137
+ preview: z.ZodOptional<z.ZodObject<{
138
+ command: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>>;
140
+ url: z.ZodOptional<z.ZodString>;
141
+ timeout: z.ZodOptional<z.ZodNumber>;
142
+ }, z.core.$strip>;
133
143
  declare const TestConfigSchema: z.ZodObject<{
134
144
  defaults: z.ZodOptional<z.ZodObject<{
135
145
  timeout: z.ZodOptional<z.ZodNumber>;
@@ -389,6 +399,16 @@ declare const IntellitesterConfigSchema: z.ZodObject<{
389
399
  timeout: z.ZodDefault<z.ZodNumber>;
390
400
  cwd: z.ZodOptional<z.ZodString>;
391
401
  }, z.core.$strip>>;
402
+ preview: z.ZodOptional<z.ZodObject<{
403
+ build: z.ZodOptional<z.ZodObject<{
404
+ command: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>;
406
+ preview: z.ZodOptional<z.ZodObject<{
407
+ command: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>>;
409
+ url: z.ZodOptional<z.ZodString>;
410
+ timeout: z.ZodOptional<z.ZodNumber>;
411
+ }, z.core.$strip>>;
392
412
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
393
413
  }, z.core.$strip>;
394
414
 
@@ -803,6 +823,7 @@ type TestConfig = z.infer<typeof TestConfigSchema>;
803
823
  type TestDefinition = z.infer<typeof TestDefinitionSchema>;
804
824
  type IntellitesterConfig = z.infer<typeof IntellitesterConfigSchema>;
805
825
  type WebServer = NonNullable<IntellitesterConfig['webServer']>;
826
+ type PreviewConfig = NonNullable<IntellitesterConfig['preview']>;
806
827
  type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
807
828
 
808
829
  interface PipelineWorkflowResult {
@@ -849,4 +870,4 @@ declare const loadPipelineDefinition: (filePath: string) => Promise<PipelineDefi
849
870
  */
850
871
  declare const collectMissingEnvVars: (obj: unknown) => string[];
851
872
 
852
- export { type Action, ActionSchema, type BrowserName, type CleanupConfig, type ExecutionContext, type IntellitesterConfig, IntellitesterConfigSchema, type Locator, LocatorSchema, type PipelineAppwriteConfig, type PipelineCleanupConfig, type PipelineConfig, type PipelineDefinition, type PipelineResult, type PipelineWebConfig, type PipelineWebServerConfig, type PipelineWorkflowResult, type StepResult, type TestConfig, TestConfigSchema, type TestDefinition, TestDefinitionSchema, type WebRunOptions, type WebRunResult, type WebServer, type WebServerConfig, type WorkflowDefinition, type WorkflowOptions, type WorkflowReference, type WorkflowResult, type WorkflowTestResult, type WorkflowWithContextOptions, type WorkflowWithContextResult, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer };
873
+ export { type Action, ActionSchema, type BrowserName, type CleanupConfig, type ExecutionContext, type IntellitesterConfig, IntellitesterConfigSchema, type Locator, LocatorSchema, type PipelineAppwriteConfig, type PipelineCleanupConfig, type PipelineConfig, type PipelineDefinition, type PipelineResult, type PipelineWebConfig, type PipelineWebServerConfig, type PipelineWorkflowResult, type PreviewConfig, type StepResult, type TestConfig, TestConfigSchema, type TestDefinition, TestDefinitionSchema, type WebRunOptions, type WebRunResult, type WebServer, type WebServerConfig, type WorkflowDefinition, type WorkflowOptions, type WorkflowReference, type WorkflowResult, type WorkflowTestResult, type WorkflowWithContextOptions, type WorkflowWithContextResult, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, previewConfigSchema, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ActionSchema, IntellitesterConfigSchema, LocatorSchema, TestConfigSchema, TestDefinitionSchema, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer } from './chunk-5LFSLMQ7.js';
1
+ export { ActionSchema, IntellitesterConfigSchema, LocatorSchema, TestConfigSchema, TestDefinitionSchema, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, isPipelineFile, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, previewConfigSchema, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startWebServer } from './chunk-2BKGKVFM.js';
2
2
  import './chunk-ECBA4GJ3.js';
3
3
  import './chunk-DE5UFTTG.js';
4
4
  import './chunk-6PYKWWH5.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intellitester",
3
- "version": "0.1.12",
3
+ "version": "0.2.0",
4
4
  "description": "Uses AI + iOS or Android emulators / web browsers to create automated test suites using simple instructions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -366,6 +366,46 @@
366
366
  }
367
367
  }
368
368
  },
369
+ "preview": {
370
+ "type": "object",
371
+ "description": "Configuration for the --preview flag (build and serve production build)",
372
+ "properties": {
373
+ "build": {
374
+ "type": "object",
375
+ "description": "Build configuration",
376
+ "properties": {
377
+ "command": {
378
+ "type": "string",
379
+ "description": "Command to build the project",
380
+ "examples": ["pnpm build", "npm run build", "yarn build", "bun run build"]
381
+ }
382
+ }
383
+ },
384
+ "preview": {
385
+ "type": "object",
386
+ "description": "Preview server configuration",
387
+ "properties": {
388
+ "command": {
389
+ "type": "string",
390
+ "description": "Command to start the preview server after build",
391
+ "examples": ["pnpm preview", "npm run preview", "serve ./dist", "npx serve build"]
392
+ }
393
+ }
394
+ },
395
+ "url": {
396
+ "type": "string",
397
+ "format": "uri",
398
+ "description": "URL to wait for before starting tests",
399
+ "examples": ["http://localhost:4321", "http://localhost:3000"]
400
+ },
401
+ "timeout": {
402
+ "type": "integer",
403
+ "minimum": 1,
404
+ "description": "Timeout in milliseconds to wait for preview server",
405
+ "default": 60000
406
+ }
407
+ }
408
+ },
369
409
  "secrets": {
370
410
  "type": "object",
371
411
  "description": "Secret values that can be referenced in tests (prefer environment variables)",