intellitester 0.2.19 → 0.2.21

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/dist/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { loadIntellitesterConfig, isPipelineFile, isWorkflowFile, isPipelineContent, isWorkflowContent, loadTestDefinition, collectMissingEnvVars, loadPipelineDefinition, loadWorkflowDefinition, runWorkflow, runWebTest, startTrackingServer, startWebServer, createTestContext, setupAppwriteTracking, generateRandomUsername, runWorkflowWithContext, killServer, createAIProvider, TestDefinitionSchema } from '../chunk-LKSREGQS.js';
2
+ import { loadIntellitesterConfig, isPipelineFile, isWorkflowFile, isPipelineContent, isWorkflowContent, loadTestDefinition, collectMissingEnvVars, loadPipelineDefinition, loadWorkflowDefinition, runWorkflow, runWebTest, startTrackingServer, startWebServer, createTestContext, setupAppwriteTracking, interpolateVariables, runWorkflowWithContext, killServer, createAIProvider, TestDefinitionSchema } from '../chunk-CKUSY4ZM.js';
3
3
  import { loadFailedCleanups, loadCleanupHandlers, executeCleanup, removeFailedCleanup } from '../chunk-ECBA4GJ3.js';
4
4
  import '../chunk-DE5UFTTG.js';
5
5
  import '../chunk-6PYKWWH5.js';
@@ -248,15 +248,7 @@ ${"=".repeat(40)}`);
248
248
  const workflowDefinition = await loadWorkflowDefinition(workflowFilePath);
249
249
  if (workflowRef.variables) {
250
250
  for (const [key, value] of Object.entries(workflowRef.variables)) {
251
- const interpolated = value.replace(/\{\{(\w+)\}\}/g, (match, varName) => {
252
- if (varName === "uuid") {
253
- return crypto.randomUUID().split("-")[0];
254
- }
255
- if (varName === "randomUsername") {
256
- return generateRandomUsername();
257
- }
258
- return executionContext.variables.get(varName) ?? match;
259
- });
251
+ const interpolated = interpolateVariables(value, executionContext.variables);
260
252
  executionContext.variables.set(key, interpolated);
261
253
  }
262
254
  }