@skyramp/mcp 0.0.19 → 0.0.20

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.
@@ -2,70 +2,7 @@ export function getModularizationPrompt(filePath, language) {
2
2
  return `
3
3
  **CRITICAL: Refactor code with modularization principles. Respond with complete, modularized code only WITHOUT ERRORS AND WRITTEN BACK TO THE FILE ${filePath}**
4
4
 
5
- **STEP 1: SEARCH & ANALYZE EXISTING CODE BASED ON TEST LANGUAGE AND NOT ALL LANGUAGE FILES - MANDATORY**
6
- You MUST search for existing test files by language and NOT ALL LANGUAGE FILES:
7
- ${language === "python" ? `Python: .py files with "skyramp"` : ""}
8
-
9
- ${language === "typescript" || language === "javascript"
10
- ? `TypeScript/JavaScript: .ts/.js files with "@skyramp/skyramp"`
11
- : ""}
12
-
13
- ${language === "java" ? `Java: .java files with "SkyrampClient"` : ""}
14
-
15
- You MUST look for reusable patterns: authentication, HTTP helpers, data setup, validation, configuration, cleanup functions EXCLUDE current test file from the search.
16
-
17
- **STEP 2: IMPORT & REUSE (HIGHEST PRIORITY) - MANDATORY**
18
- You MUST import existing functions instead of duplicating. If you find reusable functions, you MUST import them:
19
- ${language === "python"
20
- ? `\`\`\`python
21
- from path.to.existing import helper_function
22
- from utils.auth_helpers import authenticate
23
- \`\`\``
24
- : ""}
25
-
26
- ${language === "typescript" || language === "javascript"
27
- ? `\`\`\`typescript/javascript
28
- import { helperFunction } from './path/to/existing';
29
- import { authenticate } from './utils/authHelpers';
30
- \`\`\``
31
- : ""}
32
-
33
- ${language === "java"
34
- ? `\`\`\`java
35
- import path.to.existing.helper_function;
36
- import utils.auth_helpers.authenticate;
37
- \`\`\``
38
- : ""}
39
-
40
- if ${language === "python"
41
- ? `IMPORTANT:
42
- FOR PYTHON:
43
- - If functions are in different folders, use relative path manipulation with os.path. NEVER hardcode absolute paths:
44
- \`\`\`python
45
- import sys
46
- import os
47
- # Add parent directory to path to access sibling folders
48
- sys.path.append(os.path.dirname(os.path.dirname(__file__)))
49
- from e2e.e2e_test import helper_function
50
-
51
- # OR if importing from same directory level
52
- sys.path.append(os.path.dirname(__file__))
53
- from e2e_test import helper_function
54
- \`\`\`
55
- - Use aliases to avoid naming conflicts and prevent test execution:
56
- \`\`\`python
57
- # If importing a test file, use alias to prevent auto-execution
58
- import e2e_test as e2e_helpers
59
- # Then call: e2e_helpers.setup_auth_headers()
60
- \`\`\`
61
- - CRITICAL: When importing test files, they may auto-execute. Use \`if __name__ == "__main__":\` guards in source files.
62
- `
63
- : ""}
64
-
65
- **STEP 3: REPLACE DUPLICATE CODE - MANDATORY**
66
- You MUST replace duplicate code with imported function calls. If you imported functions, you MUST use them.
67
-
68
- **STEP 4: CREATE MINIMAL NEW HELPERS (ONLY IF NEEDED)**
5
+ **CRITICAL: DO NOT CHANGE THE FUNCTIONALITY OF THE TESTS. ONLY MODULARIZE THE CODE.**
69
6
  Only if NO existing function can be reused:
70
7
  1. Group related lines logically (e.g., login steps together) to improve readability and parameterize the test function(s) with meaningful parameters to make it more flexible.
71
8
  2. If functions are already modularized (like breakpoint_section_0, breakpoint_section_1), then rename them with meaningful names WITHOUT ANY OTHER CHANGES.
@@ -61,8 +61,8 @@ For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advance
61
61
  }
62
62
  // Temporary fix until library is updated
63
63
  if (params.outputDir) {
64
- params.traceOutputFile = path.join(params.outputDir, params.traceOutputFile);
65
- params.playwrightOutput = path.join(params.outputDir, params.playwrightOutput);
64
+ stopTraceOptions.output = path.join(stopTraceOptions.outputDir, stopTraceOptions.output);
65
+ stopTraceOptions.playwrightOutput = path.join(stopTraceOptions.outputDir, stopTraceOptions.playwrightOutput);
66
66
  }
67
67
  let errList = {
68
68
  content: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/mcp",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "main": "build/index.js",
5
5
  "type": "module",
6
6
  "bin": {