@testsmith/testblocks 0.2.0 → 0.3.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.
@@ -16,8 +16,8 @@
16
16
  overflow: hidden;
17
17
  }
18
18
  </style>
19
- <script type="module" crossorigin src="/assets/index-q27f2_ju.js"></script>
20
- <link rel="stylesheet" crossorigin href="/assets/index-DbvW1Eh_.css">
19
+ <script type="module" crossorigin src="/assets/index-DOJk7uTQ.js"></script>
20
+ <link rel="stylesheet" crossorigin href="/assets/index-CIvp_myM.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
@@ -7,6 +7,11 @@ exports.TestExecutor = void 0;
7
7
  const express_1 = __importDefault(require("express"));
8
8
  const cors_1 = __importDefault(require("cors"));
9
9
  const path_1 = __importDefault(require("path"));
10
+ const fs_1 = __importDefault(require("fs"));
11
+ // Read version from package.json
12
+ const packageJsonPath = path_1.default.join(__dirname, '../../package.json');
13
+ const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, 'utf-8'));
14
+ const VERSION = packageJson.version || '0.0.0';
10
15
  const executor_1 = require("./executor");
11
16
  Object.defineProperty(exports, "TestExecutor", { enumerable: true, get: function () { return executor_1.TestExecutor; } });
12
17
  const reporters_1 = require("../cli/reporters");
@@ -86,7 +91,11 @@ app.use((0, cors_1.default)());
86
91
  app.use(express_1.default.json({ limit: '10mb' }));
87
92
  // Health check
88
93
  app.get('/api/health', (req, res) => {
89
- res.json({ status: 'ok', version: '1.0.0' });
94
+ res.json({ status: 'ok', version: VERSION });
95
+ });
96
+ // Version endpoint
97
+ app.get('/api/version', (req, res) => {
98
+ res.json({ version: VERSION });
90
99
  });
91
100
  // List available plugins (with full block definitions for client registration)
92
101
  app.get('/api/plugins', (req, res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testsmith/testblocks",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Visual test automation tool with Blockly - API and Playwright testing",
5
5
  "author": "Roy de Kleijn",
6
6
  "license": "MIT",