@specsage/cli 0.1.11 → 0.1.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.
package/lib/browser.js CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // DO NOT EDIT packages/cli/lib/browser.js - it is copied from this file during npm publish.
4
+ // See bin/publish_npm_package for details.
5
+
3
6
  import { chromium } from "playwright";
4
7
  import fs from "fs";
5
8
  import path from "path";
package/lib/dialogs.js CHANGED
@@ -2,6 +2,9 @@
2
2
  * Dialog handling module for SpecSage browser automation.
3
3
  * Captures JavaScript dialogs (alert, confirm, prompt) and exposes them
4
4
  * to the AI agent via visual overlays and pseudo-elements.
5
+ *
6
+ * DO NOT EDIT packages/cli/lib/dialogs.js - it is copied from this file during npm publish.
7
+ * See bin/publish_npm_package for details.
5
8
  */
6
9
 
7
10
  // Pending dialog state
package/lib/runner.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
+ # DO NOT EDIT packages/cli/lib/runner.rb - it is copied from this file during npm publish.
5
+ # See bin/publish_npm_package for details.
6
+
4
7
  require 'json'
5
8
  require 'timeout'
6
9
  require 'fileutils'
@@ -69,7 +72,7 @@ class Runner
69
72
  stop_node_process
70
73
  upload_video
71
74
  cleanup_temp_dir
72
- return
75
+ return 'ERROR'
73
76
  end
74
77
 
75
78
  pre_scenario_name = pre_scenario_data['name'] || pre_scenario_id
@@ -92,14 +95,14 @@ class Runner
92
95
  stop_node_process
93
96
  upload_video
94
97
  cleanup_temp_dir
95
- return
98
+ return 'FAIL'
96
99
  elsif result[:verdict] == 'ERROR'
97
100
  log "Pre-scenario '#{pre_scenario_name}' ERROR - skipping main scenario"
98
101
  send_main_scenario_verdict('PRE_SCENARIO_ERROR', "Pre-scenario '#{pre_scenario_name}' errored: #{result[:reason]}")
99
102
  stop_node_process
100
103
  upload_video
101
104
  cleanup_temp_dir
102
- return
105
+ return 'ERROR'
103
106
  end
104
107
 
105
108
  log "Pre-scenario '#{pre_scenario_name}' PASSED"
@@ -109,7 +112,7 @@ class Runner
109
112
  end
110
113
 
111
114
  # Run the main scenario
112
- run_single_scenario(
115
+ result = run_single_scenario(
113
116
  scenario_id: @scenario_id,
114
117
  scenario_data: @scenario,
115
118
  pre_scenario_for_id: nil,
@@ -119,16 +122,20 @@ class Runner
119
122
  stop_node_process
120
123
  upload_video
121
124
  cleanup_temp_dir
125
+
126
+ result[:verdict]
122
127
  rescue StepClient::StepError => e
123
128
  send_client_verdict_if_needed('ERROR', "Server error: #{e.message}")
124
129
  stop_node_process
125
130
  upload_video
126
131
  cleanup_temp_dir
132
+ 'ERROR'
127
133
  rescue StandardError => e
128
134
  send_client_verdict_if_needed('ERROR', e.message)
129
135
  stop_node_process
130
136
  upload_video
131
137
  cleanup_temp_dir
138
+ 'ERROR'
132
139
  end
133
140
 
134
141
  # Run a single scenario (either pre-scenario or main scenario)
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # DO NOT EDIT packages/cli/lib/step_client.rb - it is copied from this file during npm publish.
4
+ # See bin/publish_npm_package for details.
5
+
3
6
  require "net/http"
4
7
  require "uri"
5
8
  require "json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specsage/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "SpecSage CLI - AI-powered end-to-end testing automation (Node wrapper for Ruby CLI)",
5
5
  "type": "module",
6
6
  "bin": {