testeranto 0.219.14 → 0.219.15

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.
Files changed (237) hide show
  1. package/package.json +1 -1
  2. package/src/testeranto.ts +1 -1
  3. package/dist/common/allTestsUtils.js +0 -17
  4. package/dist/common/package.json +0 -3
  5. package/dist/common/scripts/build-example.js +0 -105
  6. package/dist/common/src/Init.js +0 -38
  7. package/dist/common/src/Types.js +0 -63
  8. package/dist/common/src/esbuildConfigs/consoleDetectorPlugin.js +0 -38
  9. package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -21
  10. package/dist/common/src/esbuildConfigs/featuresPlugin.js +0 -39
  11. package/dist/common/src/esbuildConfigs/index.js +0 -22
  12. package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -30
  13. package/dist/common/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -24
  14. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +0 -19
  15. package/dist/common/src/init-docs.js +0 -9
  16. package/dist/common/src/lib/tiposkripto/BaseGiven.js +0 -96
  17. package/dist/common/src/lib/tiposkripto/BaseSuite.js +0 -134
  18. package/dist/common/src/lib/tiposkripto/BaseThen.js +0 -65
  19. package/dist/common/src/lib/tiposkripto/BaseTiposkripto.js +0 -193
  20. package/dist/common/src/lib/tiposkripto/BaseWhen.js +0 -46
  21. package/dist/common/src/lib/tiposkripto/CoreTypes.js +0 -2
  22. package/dist/common/src/lib/tiposkripto/Node.js +0 -40
  23. package/dist/common/src/lib/tiposkripto/Tiposkripto.js +0 -49
  24. package/dist/common/src/lib/tiposkripto/Types.js +0 -2
  25. package/dist/common/src/lib/tiposkripto/Web.js +0 -70
  26. package/dist/common/src/lib/tiposkripto/abstractBase.test/MockGiven.js +0 -22
  27. package/dist/common/src/lib/tiposkripto/abstractBase.test/MockThen.js +0 -16
  28. package/dist/common/src/lib/tiposkripto/abstractBase.test/MockWhen.js +0 -18
  29. package/dist/common/src/lib/tiposkripto/abstractBase.test/adapter.js +0 -24
  30. package/dist/common/src/lib/tiposkripto/abstractBase.test/implementation.js +0 -38
  31. package/dist/common/src/lib/tiposkripto/abstractBase.test/index.js +0 -17
  32. package/dist/common/src/lib/tiposkripto/abstractBase.test/specification.js +0 -19
  33. package/dist/common/src/lib/tiposkripto/abstractBase.test/types.js +0 -2
  34. package/dist/common/src/lib/tiposkripto/index.js +0 -29
  35. package/dist/common/src/runtimes.js +0 -4
  36. package/dist/common/src/server/aider/configParser.js +0 -124
  37. package/dist/common/src/server/aider/docker.js +0 -30
  38. package/dist/common/src/server/getRunnables.js +0 -36
  39. package/dist/common/src/server/htmlTemplate.js +0 -44
  40. package/dist/common/src/server/nodeVersion.js +0 -5
  41. package/dist/common/src/server/runtimes/common.js +0 -136
  42. package/dist/common/src/server/runtimes/golang/docker.js +0 -62
  43. package/dist/common/src/server/runtimes/java/docker.js +0 -46
  44. package/dist/common/src/server/runtimes/node/docker.js +0 -42
  45. package/dist/common/src/server/runtimes/node/esbuild.js +0 -40
  46. package/dist/common/src/server/runtimes/node/node.js +0 -75
  47. package/dist/common/src/server/runtimes/python/docker.js +0 -31
  48. package/dist/common/src/server/runtimes/ruby/docker.js +0 -34
  49. package/dist/common/src/server/runtimes/rust/docker.js +0 -35
  50. package/dist/common/src/server/runtimes/web/docker.js +0 -42
  51. package/dist/common/src/server/runtimes/web/esbuild.js +0 -29
  52. package/dist/common/src/server/runtimes/web/hoist.js +0 -16
  53. package/dist/common/src/server/runtimes/web/web.js +0 -157
  54. package/dist/common/src/server/serverClasees/Server.js +0 -47
  55. package/dist/common/src/server/serverClasees/Server_Base.js +0 -18
  56. package/dist/common/src/server/serverClasees/Server_Docker.js +0 -904
  57. package/dist/common/src/server/serverClasees/Server_FS.js +0 -119
  58. package/dist/common/src/server/serverClasees/Server_HTTP.js +0 -189
  59. package/dist/common/src/server/serverClasees/Server_WS.js +0 -262
  60. package/dist/common/src/server/serverManagers/DockerManager.js +0 -28
  61. package/dist/common/src/server/serverManagers/HttpManager.js +0 -114
  62. package/dist/common/src/server/serverManagers/WsManager.js +0 -230
  63. package/dist/common/src/server/serverManagers/fs.js +0 -32
  64. package/dist/common/src/server/serverManagers/tcp.js +0 -51
  65. package/dist/common/src/server/types.js +0 -2
  66. package/dist/common/src/testeranto.js +0 -75
  67. package/dist/common/src/vscode/TerminalManager.js +0 -129
  68. package/dist/common/src/vscode/TestTreeItem.js +0 -77
  69. package/dist/common/src/vscode/extension.js +0 -185
  70. package/dist/common/src/vscode/providers/FeaturesTreeDataProvider.js +0 -445
  71. package/dist/common/src/vscode/providers/FileTreeDataProvider.js +0 -190
  72. package/dist/common/src/vscode/providers/ProcessesTreeDataProvider.js +0 -270
  73. package/dist/common/src/vscode/providers/ResultsTreeDataProvider.js +0 -87
  74. package/dist/common/src/vscode/providers/TestTreeDataProvider.js +0 -309
  75. package/dist/common/src/vscode/types.js +0 -9
  76. package/dist/common/testeranto/runtimes/node/node.js +0 -7
  77. package/dist/common/testeranto/runtimes/web/web.js +0 -6
  78. package/dist/common/testeranto/testeranto.js +0 -70
  79. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  80. package/dist/module/allTestsUtils.js +0 -13
  81. package/dist/module/package.json +0 -3
  82. package/dist/module/scripts/build-example.js +0 -100
  83. package/dist/module/src/Init.js +0 -33
  84. package/dist/module/src/Types.js +0 -62
  85. package/dist/module/src/esbuildConfigs/consoleDetectorPlugin.js +0 -32
  86. package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +0 -18
  87. package/dist/module/src/esbuildConfigs/featuresPlugin.js +0 -34
  88. package/dist/module/src/esbuildConfigs/index.js +0 -20
  89. package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -25
  90. package/dist/module/src/esbuildConfigs/nativeImportDetectorPlugin.js +0 -21
  91. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +0 -14
  92. package/dist/module/src/init-docs.js +0 -4
  93. package/dist/module/src/lib/tiposkripto/BaseGiven.js +0 -92
  94. package/dist/module/src/lib/tiposkripto/BaseSuite.js +0 -130
  95. package/dist/module/src/lib/tiposkripto/BaseThen.js +0 -61
  96. package/dist/module/src/lib/tiposkripto/BaseTiposkripto.js +0 -190
  97. package/dist/module/src/lib/tiposkripto/BaseWhen.js +0 -42
  98. package/dist/module/src/lib/tiposkripto/CoreTypes.js +0 -1
  99. package/dist/module/src/lib/tiposkripto/Node.js +0 -33
  100. package/dist/module/src/lib/tiposkripto/Tiposkripto.js +0 -14
  101. package/dist/module/src/lib/tiposkripto/Types.js +0 -1
  102. package/dist/module/src/lib/tiposkripto/Web.js +0 -63
  103. package/dist/module/src/lib/tiposkripto/abstractBase.test/MockGiven.js +0 -18
  104. package/dist/module/src/lib/tiposkripto/abstractBase.test/MockThen.js +0 -12
  105. package/dist/module/src/lib/tiposkripto/abstractBase.test/MockWhen.js +0 -14
  106. package/dist/module/src/lib/tiposkripto/abstractBase.test/adapter.js +0 -21
  107. package/dist/module/src/lib/tiposkripto/abstractBase.test/implementation.js +0 -35
  108. package/dist/module/src/lib/tiposkripto/abstractBase.test/index.js +0 -12
  109. package/dist/module/src/lib/tiposkripto/abstractBase.test/specification.js +0 -15
  110. package/dist/module/src/lib/tiposkripto/abstractBase.test/types.js +0 -1
  111. package/dist/module/src/lib/tiposkripto/index.js +0 -24
  112. package/dist/module/src/runtimes.js +0 -1
  113. package/dist/module/src/server/aider/configParser.js +0 -116
  114. package/dist/module/src/server/aider/docker.js +0 -28
  115. package/dist/module/src/server/getRunnables.js +0 -29
  116. package/dist/module/src/server/htmlTemplate.js +0 -40
  117. package/dist/module/src/server/nodeVersion.js +0 -2
  118. package/dist/module/src/server/runtimes/common.js +0 -127
  119. package/dist/module/src/server/runtimes/golang/docker.js +0 -55
  120. package/dist/module/src/server/runtimes/java/docker.js +0 -40
  121. package/dist/module/src/server/runtimes/node/docker.js +0 -36
  122. package/dist/module/src/server/runtimes/node/esbuild.js +0 -35
  123. package/dist/module/src/server/runtimes/node/node.js +0 -37
  124. package/dist/module/src/server/runtimes/python/docker.js +0 -25
  125. package/dist/module/src/server/runtimes/ruby/docker.js +0 -28
  126. package/dist/module/src/server/runtimes/rust/docker.js +0 -29
  127. package/dist/module/src/server/runtimes/web/docker.js +0 -36
  128. package/dist/module/src/server/runtimes/web/esbuild.js +0 -24
  129. package/dist/module/src/server/runtimes/web/hoist.js +0 -11
  130. package/dist/module/src/server/runtimes/web/web.js +0 -119
  131. package/dist/module/src/server/serverClasees/Server.js +0 -40
  132. package/dist/module/src/server/serverClasees/Server_Base.js +0 -14
  133. package/dist/module/src/server/serverClasees/Server_Docker.js +0 -897
  134. package/dist/module/src/server/serverClasees/Server_FS.js +0 -119
  135. package/dist/module/src/server/serverClasees/Server_HTTP.js +0 -182
  136. package/dist/module/src/server/serverClasees/Server_WS.js +0 -258
  137. package/dist/module/src/server/serverManagers/DockerManager.js +0 -28
  138. package/dist/module/src/server/serverManagers/HttpManager.js +0 -110
  139. package/dist/module/src/server/serverManagers/WsManager.js +0 -226
  140. package/dist/module/src/server/serverManagers/fs.js +0 -32
  141. package/dist/module/src/server/serverManagers/tcp.js +0 -47
  142. package/dist/module/src/server/types.js +0 -1
  143. package/dist/module/src/testeranto.js +0 -40
  144. package/dist/module/src/vscode/TerminalManager.js +0 -92
  145. package/dist/module/src/vscode/TestTreeItem.js +0 -40
  146. package/dist/module/src/vscode/extension.js +0 -148
  147. package/dist/module/src/vscode/providers/FeaturesTreeDataProvider.js +0 -408
  148. package/dist/module/src/vscode/providers/FileTreeDataProvider.js +0 -153
  149. package/dist/module/src/vscode/providers/ProcessesTreeDataProvider.js +0 -233
  150. package/dist/module/src/vscode/providers/ResultsTreeDataProvider.js +0 -50
  151. package/dist/module/src/vscode/providers/TestTreeDataProvider.js +0 -272
  152. package/dist/module/src/vscode/types.js +0 -6
  153. package/dist/module/testeranto/runtimes/node/node.js +0 -5
  154. package/dist/module/testeranto/runtimes/web/web.js +0 -4
  155. package/dist/module/testeranto/testeranto.js +0 -68
  156. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  157. package/dist/prebuild/chunk-QLT7PNPK.mjs +0 -162
  158. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +0 -20
  159. package/dist/prebuild/init-docs.mjs +0 -56
  160. package/dist/prebuild/server/runtimes/node/node.mjs +0 -80
  161. package/dist/prebuild/server/runtimes/web/hoist.mjs +0 -12
  162. package/dist/prebuild/server/runtimes/web/web.mjs +0 -162
  163. package/dist/prebuild/testeranto-6SAYRVSE.mjs +0 -72
  164. package/dist/prebuild/testeranto.mjs +0 -1692
  165. package/dist/types/src/Init.d.ts +0 -2
  166. package/dist/types/src/Types.d.ts +0 -87
  167. package/dist/types/src/esbuildConfigs/consoleDetectorPlugin.d.ts +0 -2
  168. package/dist/types/src/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
  169. package/dist/types/src/esbuildConfigs/featuresPlugin.d.ts +0 -5
  170. package/dist/types/src/esbuildConfigs/index.d.ts +0 -3
  171. package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +0 -7
  172. package/dist/types/src/esbuildConfigs/nativeImportDetectorPlugin.d.ts +0 -2
  173. package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +0 -6
  174. package/dist/types/src/init-docs.d.ts +0 -1
  175. package/dist/types/src/lib/tiposkripto/BaseGiven.d.ts +0 -42
  176. package/dist/types/src/lib/tiposkripto/BaseSuite.d.ts +0 -46
  177. package/dist/types/src/lib/tiposkripto/BaseThen.d.ts +0 -28
  178. package/dist/types/src/lib/tiposkripto/BaseTiposkripto.d.ts +0 -35
  179. package/dist/types/src/lib/tiposkripto/BaseWhen.d.ts +0 -27
  180. package/dist/types/src/lib/tiposkripto/CoreTypes.d.ts +0 -51
  181. package/dist/types/src/lib/tiposkripto/Node.d.ts +0 -9
  182. package/dist/types/src/lib/tiposkripto/Tiposkripto.d.ts +0 -5
  183. package/dist/types/src/lib/tiposkripto/Types.d.ts +0 -9
  184. package/dist/types/src/lib/tiposkripto/Web.d.ts +0 -9
  185. package/dist/types/src/lib/tiposkripto/abstractBase.test/MockGiven.d.ts +0 -9
  186. package/dist/types/src/lib/tiposkripto/abstractBase.test/MockThen.d.ts +0 -6
  187. package/dist/types/src/lib/tiposkripto/abstractBase.test/MockWhen.d.ts +0 -6
  188. package/dist/types/src/lib/tiposkripto/abstractBase.test/adapter.d.ts +0 -3
  189. package/dist/types/src/lib/tiposkripto/abstractBase.test/implementation.d.ts +0 -3
  190. package/dist/types/src/lib/tiposkripto/abstractBase.test/index.d.ts +0 -28
  191. package/dist/types/src/lib/tiposkripto/abstractBase.test/specification.d.ts +0 -3
  192. package/dist/types/src/lib/tiposkripto/abstractBase.test/types.d.ts +0 -39
  193. package/dist/types/src/lib/tiposkripto/index.d.ts +0 -56
  194. package/dist/types/src/runtimes.d.ts +0 -2
  195. package/dist/types/src/server/aider/configParser.d.ts +0 -11
  196. package/dist/types/src/server/aider/docker.d.ts +0 -2
  197. package/dist/types/src/server/getRunnables.d.ts +0 -3
  198. package/dist/types/src/server/htmlTemplate.d.ts +0 -2
  199. package/dist/types/src/server/nodeVersion.d.ts +0 -2
  200. package/dist/types/src/server/runtimes/common.d.ts +0 -12
  201. package/dist/types/src/server/runtimes/golang/docker.d.ts +0 -5
  202. package/dist/types/src/server/runtimes/java/docker.d.ts +0 -14
  203. package/dist/types/src/server/runtimes/node/docker.d.ts +0 -14
  204. package/dist/types/src/server/runtimes/node/esbuild.d.ts +0 -4
  205. package/dist/types/src/server/runtimes/node/node.d.ts +0 -1
  206. package/dist/types/src/server/runtimes/python/docker.d.ts +0 -14
  207. package/dist/types/src/server/runtimes/ruby/docker.d.ts +0 -14
  208. package/dist/types/src/server/runtimes/rust/docker.d.ts +0 -14
  209. package/dist/types/src/server/runtimes/web/docker.d.ts +0 -15
  210. package/dist/types/src/server/runtimes/web/esbuild.d.ts +0 -4
  211. package/dist/types/src/server/runtimes/web/hoist.d.ts +0 -1
  212. package/dist/types/src/server/runtimes/web/web.d.ts +0 -1
  213. package/dist/types/src/server/serverClasees/Server.d.ts +0 -8
  214. package/dist/types/src/server/serverClasees/Server_Base.d.ts +0 -9
  215. package/dist/types/src/server/serverClasees/Server_Docker.d.ts +0 -81
  216. package/dist/types/src/server/serverClasees/Server_FS.d.ts +0 -0
  217. package/dist/types/src/server/serverClasees/Server_HTTP.d.ts +0 -20
  218. package/dist/types/src/server/serverClasees/Server_WS.d.ts +0 -23
  219. package/dist/types/src/server/serverManagers/DockerManager.d.ts +0 -0
  220. package/dist/types/src/server/serverManagers/HttpManager.d.ts +0 -9
  221. package/dist/types/src/server/serverManagers/WsManager.d.ts +0 -10
  222. package/dist/types/src/server/serverManagers/fs.d.ts +0 -0
  223. package/dist/types/src/server/serverManagers/tcp.d.ts +0 -27
  224. package/dist/types/src/server/types.d.ts +0 -68
  225. package/dist/types/src/testeranto.d.ts +0 -1
  226. package/dist/types/src/vscode/TerminalManager.d.ts +0 -18
  227. package/dist/types/src/vscode/TestTreeItem.d.ts +0 -13
  228. package/dist/types/src/vscode/extension.d.ts +0 -3
  229. package/dist/types/src/vscode/providers/FeaturesTreeDataProvider.d.ts +0 -17
  230. package/dist/types/src/vscode/providers/FileTreeDataProvider.d.ts +0 -13
  231. package/dist/types/src/vscode/providers/ProcessesTreeDataProvider.d.ts +0 -23
  232. package/dist/types/src/vscode/providers/ResultsTreeDataProvider.d.ts +0 -10
  233. package/dist/types/src/vscode/providers/TestTreeDataProvider.d.ts +0 -16
  234. package/dist/types/src/vscode/types.d.ts +0 -14
  235. package/dist/types/testeranto/testeranto.d.ts +0 -3
  236. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  237. package/dist/vscode/extension.mjs +0 -5116
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "testeranto",
3
3
  "displayName": "Testeranto",
4
4
  "description": "the Dockerized, AI powered, BDD test framework for polyglot projects",
5
- "version": "0.219.14",
5
+ "version": "0.219.15",
6
6
  "engines": {
7
7
  "node": ">=20.19.0",
8
8
  "vscode": "^1.60.0"
package/src/testeranto.ts CHANGED
@@ -42,7 +42,7 @@ const main = async () => {
42
42
 
43
43
  // console.log('Parsed config:', Array.from(config.entries()));
44
44
 
45
- const config: ITestconfigV2 = (await import('../testeranto/testeranto.ts')).default;
45
+ const config = (await import(process.cwd() + '/testeranto/testeranto.ts')).default;
46
46
 
47
47
  console.log("mark123", config)
48
48
  await new Server(config, mode).start();
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createLangConfig = void 0;
4
- const createLangConfig = (testFile, checks, dockerfile, options) => {
5
- return {
6
- plugins: (options === null || options === void 0 ? void 0 : options.plugins) || [],
7
- loaders: (options === null || options === void 0 ? void 0 : options.loaders) || {},
8
- tests: { [testFile]: { ports: 0 } },
9
- externals: (options === null || options === void 0 ? void 0 : options.externals) || [],
10
- test: options === null || options === void 0 ? void 0 : options.testBlocks,
11
- prod: options === null || options === void 0 ? void 0 : options.prodBlocks,
12
- checks,
13
- volumes: options === null || options === void 0 ? void 0 : options.volumes,
14
- dockerfile,
15
- };
16
- };
17
- exports.createLangConfig = createLangConfig;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const child_process_1 = require("child_process");
7
- const fs_1 = __importDefault(require("fs"));
8
- const path_1 = __importDefault(require("path"));
9
- console.log("Building example project (ES module version)...");
10
- try {
11
- // Always work from the project root
12
- const projectRoot = path_1.default.resolve(import.meta.dirname, "..");
13
- console.log(`Project root: ${projectRoot}`);
14
- // Change to project root
15
- process.chdir(projectRoot);
16
- console.log(`Current working directory (build-example): ${projectRoot}`);
17
- // The example directory is now relative to project root
18
- const exampleDir = path_1.default.join(projectRoot, "example");
19
- console.log(`Example directory: ${exampleDir}`);
20
- // Ensure go.mod exists - create one if it doesn't
21
- const goModPath = path_1.default.join(exampleDir, "go.mod");
22
- if (!fs_1.default.existsSync(goModPath)) {
23
- console.log("go.mod not found, creating a new one...");
24
- const defaultGoMod = `module example
25
-
26
- go 1.19
27
- `;
28
- fs_1.default.writeFileSync(goModPath, defaultGoMod);
29
- console.log("Created default go.mod");
30
- }
31
- else {
32
- // Read the existing go.mod and remove any replace directives
33
- let goModContent = fs_1.default.readFileSync(goModPath, "utf8");
34
- // Remove any replace directives that might cause issues
35
- const lines = goModContent.split('\n').filter(line => !line.trim().startsWith('replace '));
36
- // Also remove any require directives for testeranto
37
- const cleanedLines = lines.filter(line => !line.trim().startsWith('require github.com/adamwong246/testeranto'));
38
- goModContent = cleanedLines.join('\n');
39
- fs_1.default.writeFileSync(goModPath, goModContent);
40
- console.log("Cleaned up go.mod by removing replace and testeranto require directives");
41
- }
42
- // Read the current go.mod content
43
- let goModContent = fs_1.default.readFileSync(goModPath, "utf8");
44
- // Ensure the module is properly set up
45
- if (!goModContent.includes("module ")) {
46
- console.log("Initializing go module...");
47
- (0, child_process_1.execSync)("go mod init example", {
48
- stdio: "pipe",
49
- cwd: exampleDir,
50
- });
51
- // Re-read the content
52
- goModContent = fs_1.default.readFileSync(goModPath, "utf8");
53
- }
54
- // Add the replace directive to point to the local testeranto
55
- // This tells Go to use the local directory instead of trying to download from GitHub
56
- if (!goModContent.includes("replace github.com/adamwong246/testeranto")) {
57
- console.log("Adding replace directive...");
58
- (0, child_process_1.execSync)("go mod edit -replace github.com/adamwong246/testeranto=../", {
59
- stdio: "pipe",
60
- cwd: exampleDir,
61
- });
62
- }
63
- // Add the require directive to explicitly list the dependency
64
- // This ensures the dependency is tracked even if it's not imported directly in the example
65
- console.log("Adding require directive...");
66
- try {
67
- (0, child_process_1.execSync)("go mod edit -require github.com/adamwong246/testeranto@v0.0.0", {
68
- stdio: "pipe",
69
- cwd: exampleDir,
70
- });
71
- }
72
- catch (error) {
73
- // It's okay if this fails - the require might already be there
74
- console.log("Require directive may already exist");
75
- }
76
- // Read the updated content
77
- goModContent = fs_1.default.readFileSync(goModPath, "utf8");
78
- console.log("Updated go.mod content:");
79
- console.log(goModContent);
80
- // Run go mod tidy to ensure dependencies are correct
81
- console.log("Running go mod tidy...");
82
- try {
83
- const tidyOutput = (0, child_process_1.execSync)("go mod tidy -v", {
84
- stdio: "pipe",
85
- encoding: "utf-8",
86
- cwd: exampleDir,
87
- });
88
- console.log("go mod tidy output:");
89
- console.log(tidyOutput);
90
- }
91
- catch (error) {
92
- console.error("go mod tidy failed:");
93
- if (error.stdout)
94
- console.error("stdout:", error.stdout.toString());
95
- if (error.stderr)
96
- console.error("stderr:", error.stderr.toString());
97
- console.error("Continuing despite go mod tidy error...");
98
- }
99
- console.log("Example project built successfully!");
100
- }
101
- catch (error) {
102
- console.error("Failed to build example project:");
103
- console.error(error);
104
- process.exit(1);
105
- }
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- exports.default = async () => {
8
- [
9
- `testeranto/`,
10
- `testeranto/bundles/`,
11
- `testeranto/bundles/node`,
12
- `testeranto/bundles/web`,
13
- `testeranto/bundles/pure`,
14
- `testeranto/bundles/golang`,
15
- `testeranto/bundles/python`,
16
- `testeranto/reports/`,
17
- `testeranto/features/`,
18
- `testeranto/metafiles/`,
19
- `testeranto/metafiles/node`,
20
- `testeranto/metafiles/web`,
21
- `testeranto/metafiles/pure`,
22
- `testeranto/metafiles/golang`,
23
- `testeranto/metafiles/python`,
24
- ].forEach((f) => {
25
- try {
26
- fs_1.default.mkdirSync(`${process.cwd()}/${f}`);
27
- }
28
- catch (e) {
29
- console.error(e);
30
- }
31
- });
32
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/Report.js`, `testeranto/Report.js`);
33
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/Report.css`, `testeranto/Report.css`);
34
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/ProcessManager.js`, `testeranto/ProcessManager.js`);
35
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/ProcessManager.css`, `testeranto/ProcessManager.css`);
36
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/Features.js`, `testeranto/ProcessManager.js`);
37
- fs_1.default.copyFileSync(`node_modules/testeranto/dist/prebuild/Features.css`, `testeranto/ProcessManager.css`);
38
- };
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // export type ITestconfig = {
4
- // httpPort: number;
5
- // featureIngestor: (s: string) => Promise<string>;
6
- // importPlugins: IPluginFactory[];
7
- // ports: string[];
8
- // src: string;
9
- // check: string;
10
- // java: {
11
- // plugins: any[];
12
- // tests: Record<string, { ports: number }>;
13
- // loaders: Record<string, string>;
14
- // checks: IChecks;
15
- // dockerfile: string;
16
- // };
17
- // rust: {
18
- // plugins: any[];
19
- // tests: Record<string, { ports: number }>;
20
- // loaders: Record<string, string>;
21
- // checks: IChecks;
22
- // dockerfile: string;
23
- // };
24
- // ruby: {
25
- // plugins: any[];
26
- // tests: Record<string, { ports: number }>;
27
- // loaders: Record<string, string>;
28
- // checks: IChecks;
29
- // dockerfile: string;
30
- // };
31
- // golang: {
32
- // plugins: any[];
33
- // tests: Record<string, { ports: number }>;
34
- // loaders: Record<string, string>;
35
- // checks: IChecks;
36
- // dockerfile: string;
37
- // };
38
- // python: {
39
- // plugins: any[];
40
- // tests: Record<string, { ports: number }>;
41
- // loaders: Record<string, string>;
42
- // checks: IChecks;
43
- // dockerfile: string;
44
- // };
45
- // node: {
46
- // plugins: any[];
47
- // tests: Record<string, { ports: number }>;
48
- // loaders: Record<string, string>;
49
- // externals: string[];
50
- // checks: IChecks;
51
- // dockerfile: string;
52
- // };
53
- // web: {
54
- // plugins: any[];
55
- // tests: Record<string, { ports: number }>;
56
- // loaders: Record<string, string>;
57
- // externals: string[];
58
- // checks: IChecks;
59
- // dockerfile: string;
60
- // };
61
- // };
62
- // export type IBuiltConfig = { buildDir: string } & ITestconfig;
63
- // export type IConfig = Map<string, [IRunTime, string, string, { tests: string[] }]>
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.consoleDetectorPlugin = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- exports.consoleDetectorPlugin = {
9
- name: "console-detector",
10
- setup(build) {
11
- build.onLoad({ filter: /\.(js|ts)$/ }, async (args) => {
12
- const contents = await fs_1.default.promises.readFile(args.path, "utf8");
13
- const consolePattern = /console\.(log|error|warn|info|debug|trace|dir|dirxml|table|group|groupEnd|clear|count|countReset|assert|profile|profileEnd|time|timeLog|timeEnd|timeStamp|context|memory)/g;
14
- const matches = contents.match(consolePattern);
15
- if (matches) {
16
- const uniqueMethods = [...new Set(matches)];
17
- return {
18
- warnings: uniqueMethods.map((method) => ({
19
- text: `call of "${method}" was detected, which is not supported in the pure runtime.`,
20
- // location: {
21
- // file: args.path,
22
- // line:
23
- // contents
24
- // .split("\n")
25
- // .findIndex((line) => line.includes(method)) + 1,
26
- // column: 0,
27
- // },
28
- })),
29
- };
30
- }
31
- return null;
32
- });
33
- build.onEnd((buildResult) => {
34
- if (buildResult.warnings.find((br) => br.pluginName === "console-detector"))
35
- console.warn(`Warning: An unsupported method call was detected in a source file used to build for the pure runtime. It is possible that this method call is in a comment block. If you really want to use this function, change this test to the "node" runtime.`);
36
- });
37
- },
38
- };
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = default_1;
4
- function default_1(results) {
5
- return results
6
- .filter((r) => r.messages.length)
7
- .map((r) => {
8
- const path = r.filePath.replace(process.cwd() + "/", "");
9
- return [
10
- path,
11
- ...r.messages.map((m) => {
12
- var _a;
13
- return [
14
- `${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
15
- ...(((_a = m.suggestions) === null || _a === void 0 ? void 0 : _a.map((s) => `- ${s.message}${s.fix ? " (fix)" : ""}`)) || []),
16
- ].join("\n");
17
- }),
18
- ].join("\n");
19
- })
20
- .join("\n\n");
21
- }
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- exports.default = {
8
- name: "feature-markdown",
9
- setup(build) {
10
- build.onResolve({ filter: /\.md$/ }, (args) => {
11
- if (args.resolveDir === "")
12
- return;
13
- return {
14
- path: path_1.default.isAbsolute(args.path)
15
- ? args.path
16
- : path_1.default.join(args.resolveDir, args.path),
17
- namespace: "feature-markdown",
18
- };
19
- });
20
- build.onLoad({ filter: /.*/, namespace: "feature-markdown" }, async (args) => {
21
- // const markdownContent = new TextDecoder().decode(
22
- // await fs.readFileSync(args.path)
23
- // );
24
- // markdownHTML = marked(markdownContent, options?.markedOptions);
25
- return {
26
- contents: `file://${args.path}`,
27
- loader: "text",
28
- // contents: JSON.stringify({ path: args.path }),
29
- // loader: "json",
30
- // contents: JSON.stringify({
31
- // // html: markdownHTML,
32
- // raw: markdownContent,
33
- // filename: args.path, //path.basename(args.path),
34
- // }),
35
- // loader: "json",
36
- };
37
- });
38
- },
39
- };
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // import { ITestconfig } from "../Types";
4
- exports.default = (config) => {
5
- return {
6
- // packages: "external",
7
- target: "esnext",
8
- format: "esm",
9
- splitting: true,
10
- outExtension: { ".js": ".mjs" },
11
- outbase: ".",
12
- jsx: "transform",
13
- bundle: true,
14
- // minify: config.minify === true,
15
- write: true,
16
- loader: {
17
- ".js": "jsx",
18
- ".png": "binary",
19
- ".jpg": "binary",
20
- },
21
- };
22
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const otherInputs = {};
8
- const register = (entrypoint, sources) => {
9
- if (!otherInputs[entrypoint]) {
10
- otherInputs[entrypoint] = new Set();
11
- }
12
- sources.forEach((s) => otherInputs[entrypoint].add(s));
13
- };
14
- exports.default = (platform, testName) => {
15
- const f = `${testName}`;
16
- // if (!fs.existsSync(``)) {
17
- // fs.mkdirSync(``, { recursive: true });
18
- // }
19
- return {
20
- register,
21
- inputFilesPluginFactory: {
22
- name: "metafileWriter",
23
- setup(build) {
24
- build.onEnd((result) => {
25
- fs_1.default.writeFileSync(f, JSON.stringify(result, null, 2));
26
- });
27
- },
28
- },
29
- };
30
- };
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nativeImportDetectorPlugin = void 0;
4
- const node_module_1 = require("node:module");
5
- exports.nativeImportDetectorPlugin = {
6
- name: "native-node-import-filter",
7
- setup(build) {
8
- build.onResolve({ filter: /fs/ }, (args) => {
9
- if ((0, node_module_1.isBuiltin)(args.path)) {
10
- return {
11
- warnings: [
12
- {
13
- text: `cannot use native node package "${args.path}" in a "pure" test. If you really want to use this package, convert this test from "pure" to "node"`,
14
- },
15
- ],
16
- };
17
- // throw new Error(
18
- // `cannot use native node package "${args.path}" in a "pure" test. If you really want to use this package, convert this test from "pure" to "node"`
19
- // );
20
- }
21
- return { path: args.path };
22
- });
23
- },
24
- };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- exports.default = (r) => {
8
- return {
9
- name: "rebuild-notify",
10
- setup: (build) => {
11
- build.onEnd((result) => {
12
- console.log(`${r} > build ended with ${result.errors.length} errors`);
13
- if (result.errors.length > 0) {
14
- fs_1.default.writeFileSync(`./testeranto/reports${r}_build_errors`, JSON.stringify(result, null, 2));
15
- }
16
- });
17
- },
18
- };
19
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Init_1 = __importDefault(require("./Init"));
7
- console.log("Initializing a testeranto project");
8
- (0, Init_1.default)();
9
- console.log("testeranto project initialized");
@@ -1,96 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseGiven = void 0;
4
- class BaseGiven {
5
- addArtifact(path) {
6
- if (typeof path !== "string") {
7
- throw new Error(`[ARTIFACT ERROR] Expected string, got ${typeof path}: ${JSON.stringify(path)}`);
8
- }
9
- const normalizedPath = path.replace(/\\/g, "/"); // Normalize path separators
10
- this.artifacts.push(normalizedPath);
11
- }
12
- constructor(features, whens, thens, givenCB, initialValues) {
13
- this.artifacts = [];
14
- this.features = features;
15
- this.whens = whens;
16
- this.thens = thens;
17
- this.givenCB = givenCB;
18
- this.initialValues = initialValues;
19
- this.fails = 0; // Initialize fail count
20
- }
21
- beforeAll(store) {
22
- return store;
23
- }
24
- toObj() {
25
- return {
26
- key: this.key,
27
- whens: (this.whens || []).map((w) => {
28
- if (w && w.toObj)
29
- return w.toObj();
30
- console.error("When step is not as expected!", JSON.stringify(w));
31
- return {};
32
- }),
33
- thens: (this.thens || []).map((t) => (t && t.toObj ? t.toObj() : {})),
34
- error: this.error ? [this.error, this.error.stack] : null,
35
- failed: this.failed,
36
- features: this.features || [],
37
- artifacts: this.artifacts,
38
- status: this.status,
39
- };
40
- }
41
- async afterEach(store, key, artifactory) {
42
- return store;
43
- }
44
- async give(subject, key, testResourceConfiguration, tester, artifactory, suiteNdx) {
45
- this.key = key;
46
- this.fails = 0; // Initialize fail count for this given
47
- const givenArtifactory = (fPath, value) => artifactory(`given-${key}/${fPath}`, value);
48
- try {
49
- // Ensure addArtifact is properly bound to 'this'
50
- const addArtifact = this.addArtifact.bind(this);
51
- this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, this.initialValues);
52
- this.status = true;
53
- }
54
- catch (e) {
55
- this.status = false;
56
- this.failed = true;
57
- this.fails++; // Increment fail count
58
- this.error = e.stack;
59
- }
60
- try {
61
- const whens = this.whens || [];
62
- for (const [thenNdx, thenStep] of this.thens.entries()) {
63
- try {
64
- const t = await thenStep.test(this.store, testResourceConfiguration, `suite-${suiteNdx}/given-${key}/then-${thenNdx}`);
65
- // If the test doesn't throw, it passed
66
- tester(t);
67
- }
68
- catch (e) {
69
- // Mark the given as failed if any then step fails
70
- this.failed = true;
71
- this.fails++; // Increment fail count
72
- // Re-throw to propagate the error
73
- throw e;
74
- }
75
- }
76
- }
77
- catch (e) {
78
- this.error = e.stack;
79
- this.failed = true;
80
- }
81
- finally {
82
- try {
83
- const addArtifact = this.addArtifact.bind(this);
84
- await this.afterEach(this.store, this.key);
85
- }
86
- catch (e) {
87
- this.failed = true;
88
- this.fails++; // Increment fail count
89
- throw e;
90
- // this.error = e.message;
91
- }
92
- }
93
- return this.store;
94
- }
95
- }
96
- exports.BaseGiven = BaseGiven;